@ecan-bi/datav 1.5.86 → 1.5.88
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.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.5.
|
|
1
|
+
/*! @ecan-bi/datav@1.5.88 */
|
|
2
2
|
(function(wi,Di){typeof exports=="object"&&typeof module<"u"?Di(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("echarts/renderers"),require("echarts/charts"),require("echarts/components"),require("ant-design-vue/es/modal/style"),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"),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","echarts/renderers","echarts/charts","echarts/components","ant-design-vue/es/modal/style","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","ant-design-vue/es/table/style","ant-design-vue/es/notification/style","xlsx","big.js"],Di):(wi=typeof globalThis<"u"?globalThis:wi||self,Di(wi["@ecan/bi-datav"]={},wi.Vue,wi["echarts/core"],wi.ResizeDetector,wi.AntDesignVue,null,null,wi.LodashEs,wi.Dayjs,wi.Axios,wi.Mitt,wi["echarts/renderers"],wi["echarts/charts"],wi["echarts/components"],null,null,null,null,wi["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,wi.Echarts,null,null,wi.Xlsx,wi.big.js))})(this,function(exports,vue,core$1,resizeDetector,antDesignVue,style$1,style$2,lodashEs,dayjs,axios,mitt,renderers,charts,components$1,style$3,style$4,style$5,style$6,locale,style$7,style$8,style$9,style$a,echarts,style$b,style$c,xlsx,big_js){var wi,Di,Bi,Fi;"use strict";function _interopNamespaceDefault(c){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const d in c)if(d!=="default"){const f=Object.getOwnPropertyDescriptor(c,d);Object.defineProperty(u,d,f.get?f:{enumerable:!0,get:()=>c[d]})}}return u.default=c,Object.freeze(u)}const echarts__namespace=_interopNamespaceDefault(echarts),METHOD_NAMES=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function usePublicAPI(c,u){function d(h){return(...v)=>{if(c.value||u(),!c.value)throw new Error("ECharts is not initialized yet.");return c.value[h].apply(c.value,v)}}function f(){const h=Object.create(null);return METHOD_NAMES.forEach(v=>{h[v]=d(v)}),h}return f()}function useAutoresize(c,u,d){let f=null;vue.watch([d,c,u],([h,v,p],m,g)=>{h&&v&&p&&(f=core$1.throttle(()=>{v.resize()},100),resizeDetector.addListener(h,f)),g(()=>{f&&h&&resizeDetector.removeListener(h,f)})})}const autoresizeProps={autoresize:Boolean},LOADING_OPTIONS_KEY="ecLoadingOptions";function useLoading(c,u,d){const f=vue.inject(LOADING_OPTIONS_KEY,{}),h=vue.computed(()=>({...vue.unref(f),...d==null?void 0:d.value}));vue.watchEffect(()=>{const v=c.value;v&&(u.value?v.showLoading(h.value):v.hideLoading())})}const loadingProps$1={loading:Boolean,loadingOptions:Object},style="",onRE=/^on[^a-z]/,isOn=c=>onRE.test(c);function omitOn(c){const u={};for(const d in c)isOn(d)||(u[d]=c[d]);return u}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(c,{attrs:u,listeners:d}){const f=vue.shallowRef(),h=vue.shallowRef(),v=vue.shallowRef(),p=vue.inject(THEME_KEY,null),m=vue.inject(INIT_OPTIONS_KEY,null),g=vue.inject(UPDATE_OPTIONS_KEY,null),{autoresize:y,manualUpdate:b,loading:re,loadingOptions:x}=vue.toRefs(c),vn=vue.computed(()=>v.value||c.option||Object.create(null)),j=vue.computed(()=>c.theme||vue.unref(p)||{}),Pn=vue.computed(()=>c.initOptions||vue.unref(m)||{}),qn=vue.computed(()=>c.updateOptions||vue.unref(g)||{}),Bn=vue.computed(()=>omitOn(u));function w(Wn){if(h.value||!f.value)return;const Yn=h.value=core$1.init(f.value,j.value,Pn.value);c.group&&(Yn.group=c.group);let Jn=d;Jn||(Jn={},Object.keys(u).filter(Qn=>Qn.indexOf("on")===0&&Qn.length>2).forEach(Qn=>{const ar=Qn.charAt(2).toLowerCase()+Qn.slice(3);Jn[ar]=u[Qn]})),Object.keys(Jn).forEach(Qn=>{const ar=Jn[Qn];ar&&(Qn.indexOf("zr:")===0?Yn.getZr().on(Qn.slice(3).toLowerCase(),ar):Yn.on(Qn.toLowerCase(),ar))});function tr(){if(Yn&&!Yn.isDisposed())try{Yn.resize()}catch(Qn){if(Qn.message==="Cannot read property 'get' of undefined")return;throw Qn}}function nr(){Yn.setOption(Wn||vn.value,qn.value)}y.value?vue.nextTick(()=>{tr(),nr()}):nr()}function J(Wn,Yn){c.manualUpdate&&(v.value=Wn),h.value?h.value.setOption(Wn,Yn||{}):w(Wn)}function gn(){h.value&&(h.value.dispose(),h.value=void 0)}let Rn=null;vue.watch(b,Wn=>{typeof Rn=="function"&&(Rn(),Rn=null),Wn||(Rn=vue.watch(()=>c.option,Yn=>{Yn&&(h.value?h.value.setOption(Yn,qn.value):w())},{deep:!0}))},{immediate:!0}),vue.watch([j,Pn],()=>{gn(),w()},{deep:!0}),vue.watchEffect(()=>{c.group&&h.value&&(h.value.group=c.group)});const zn=usePublicAPI(h,w);return useLoading(h,re,x),useAutoresize(h,y,f),vue.onMounted(()=>{c.option&&w()}),vue.onUnmounted(gn),{chart:h,root:f,setOption:J,nonEventAttrs:Bn,...zn}},render(){const c={...this.nonEventAttrs};return c.ref="root",c.class=c.class?["echarts"].concat(c.class):"echarts",vue.h(TAG_NAME,c)}});function bound01(c,u){isOnePointZero(c)&&(c="100%");var d=isPercentage(c);return c=u===360?c:Math.min(u,Math.max(0,parseFloat(c))),d&&(c=parseInt(String(c*u),10)/100),Math.abs(c-u)<1e-6?1:(u===360?c=(c<0?c%u+u:c%u)/parseFloat(String(u)):c=c%u/parseFloat(String(u)),c)}function isOnePointZero(c){return typeof c=="string"&&c.indexOf(".")!==-1&&parseFloat(c)===1}function isPercentage(c){return typeof c=="string"&&c.indexOf("%")!==-1}function boundAlpha(c){return c=parseFloat(c),(isNaN(c)||c<0||c>1)&&(c=1),c}function convertToPercentage(c){return c<=1?"".concat(Number(c)*100,"%"):c}function pad2(c){return c.length===1?"0"+c:String(c)}function rgbToRgb(c,u,d){return{r:bound01(c,255)*255,g:bound01(u,255)*255,b:bound01(d,255)*255}}function hue2rgb(c,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?c+(u-c)*(6*d):d<1/2?u:d<2/3?c+(u-c)*(2/3-d)*6:c}function hslToRgb(c,u,d){var f,h,v;if(c=bound01(c,360),u=bound01(u,100),d=bound01(d,100),u===0)h=d,v=d,f=d;else{var p=d<.5?d*(1+u):d+u-d*u,m=2*d-p;f=hue2rgb(m,p,c+1/3),h=hue2rgb(m,p,c),v=hue2rgb(m,p,c-1/3)}return{r:f*255,g:h*255,b:v*255}}function rgbToHsv(c,u,d){c=bound01(c,255),u=bound01(u,255),d=bound01(d,255);var f=Math.max(c,u,d),h=Math.min(c,u,d),v=0,p=f,m=f-h,g=f===0?0:m/f;if(f===h)v=0;else{switch(f){case c:v=(u-d)/m+(u<d?6:0);break;case u:v=(d-c)/m+2;break;case d:v=(c-u)/m+4;break}v/=6}return{h:v,s:g,v:p}}function hsvToRgb(c,u,d){c=bound01(c,360)*6,u=bound01(u,100),d=bound01(d,100);var f=Math.floor(c),h=c-f,v=d*(1-u),p=d*(1-h*u),m=d*(1-(1-h)*u),g=f%6,y=[d,p,v,v,m,d][g],b=[m,d,d,p,v,v][g],re=[v,v,m,d,d,p][g];return{r:y*255,g:b*255,b:re*255}}function rgbToHex(c,u,d,f){var h=[pad2(Math.round(c).toString(16)),pad2(Math.round(u).toString(16)),pad2(Math.round(d).toString(16))];return f&&h[0].startsWith(h[0].charAt(1))&&h[1].startsWith(h[1].charAt(1))&&h[2].startsWith(h[2].charAt(1))?h[0].charAt(0)+h[1].charAt(0)+h[2].charAt(0):h.join("")}function convertHexToDecimal(c){return parseIntFromHex(c)/255}function parseIntFromHex(c){return parseInt(c,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(c){var u={r:0,g:0,b:0},d=1,f=null,h=null,v=null,p=!1,m=!1;return typeof c=="string"&&(c=stringInputToObject(c)),typeof c=="object"&&(isValidCSSUnit(c.r)&&isValidCSSUnit(c.g)&&isValidCSSUnit(c.b)?(u=rgbToRgb(c.r,c.g,c.b),p=!0,m=String(c.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(c.h)&&isValidCSSUnit(c.s)&&isValidCSSUnit(c.v)?(f=convertToPercentage(c.s),h=convertToPercentage(c.v),u=hsvToRgb(c.h,f,h),p=!0,m="hsv"):isValidCSSUnit(c.h)&&isValidCSSUnit(c.s)&&isValidCSSUnit(c.l)&&(f=convertToPercentage(c.s),v=convertToPercentage(c.l),u=hslToRgb(c.h,f,v),p=!0,m="hsl"),Object.prototype.hasOwnProperty.call(c,"a")&&(d=c.a)),d=boundAlpha(d),{ok:p,format:c.format||m,r:Math.min(255,Math.max(u.r,0)),g:Math.min(255,Math.max(u.g,0)),b:Math.min(255,Math.max(u.b,0)),a:d}}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(c){if(c=c.trim().toLowerCase(),c.length===0)return!1;var u=!1;if(names[c])c=names[c],u=!0;else if(c==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var d=matchers.rgb.exec(c);return d?{r:d[1],g:d[2],b:d[3]}:(d=matchers.rgba.exec(c),d?{r:d[1],g:d[2],b:d[3],a:d[4]}:(d=matchers.hsl.exec(c),d?{h:d[1],s:d[2],l:d[3]}:(d=matchers.hsla.exec(c),d?{h:d[1],s:d[2],l:d[3],a:d[4]}:(d=matchers.hsv.exec(c),d?{h:d[1],s:d[2],v:d[3]}:(d=matchers.hsva.exec(c),d?{h:d[1],s:d[2],v:d[3],a:d[4]}:(d=matchers.hex8.exec(c),d?{r:parseIntFromHex(d[1]),g:parseIntFromHex(d[2]),b:parseIntFromHex(d[3]),a:convertHexToDecimal(d[4]),format:u?"name":"hex8"}:(d=matchers.hex6.exec(c),d?{r:parseIntFromHex(d[1]),g:parseIntFromHex(d[2]),b:parseIntFromHex(d[3]),format:u?"name":"hex"}:(d=matchers.hex4.exec(c),d?{r:parseIntFromHex(d[1]+d[1]),g:parseIntFromHex(d[2]+d[2]),b:parseIntFromHex(d[3]+d[3]),a:convertHexToDecimal(d[4]+d[4]),format:u?"name":"hex8"}:(d=matchers.hex3.exec(c),d?{r:parseIntFromHex(d[1]+d[1]),g:parseIntFromHex(d[2]+d[2]),b:parseIntFromHex(d[3]+d[3]),format:u?"name":"hex"}:!1)))))))))}function isValidCSSUnit(c){return!!matchers.CSS_UNIT.exec(String(c))}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(c){var u=c.r,d=c.g,f=c.b,h=rgbToHsv(u,d,f);return{h:h.h*360,s:h.s,v:h.v}}function toHex(c){var u=c.r,d=c.g,f=c.b;return"#".concat(rgbToHex(u,d,f,!1))}function mix(c,u,d){var f=d/100,h={r:(u.r-c.r)*f+c.r,g:(u.g-c.g)*f+c.g,b:(u.b-c.b)*f+c.b};return h}function getHue(c,u,d){var f;return Math.round(c.h)>=60&&Math.round(c.h)<=240?f=d?Math.round(c.h)-hueStep*u:Math.round(c.h)+hueStep*u:f=d?Math.round(c.h)+hueStep*u:Math.round(c.h)-hueStep*u,f<0?f+=360:f>=360&&(f-=360),f}function getSaturation(c,u,d){if(c.h===0&&c.s===0)return c.s;var f;return d?f=c.s-saturationStep*u:u===darkColorCount?f=c.s+saturationStep:f=c.s+saturationStep2*u,f>1&&(f=1),d&&u===lightColorCount&&f>.1&&(f=.1),f<.06&&(f=.06),Number(f.toFixed(2))}function getValue(c,u,d){var f;return d?f=c.v+brightnessStep1*u:f=c.v-brightnessStep2*u,f>1&&(f=1),Number(f.toFixed(2))}function generate$1(c){for(var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=[],f=inputToRGB(c),h=lightColorCount;h>0;h-=1){var v=toHsv(f),p=toHex(inputToRGB({h:getHue(v,h,!0),s:getSaturation(v,h,!0),v:getValue(v,h,!0)}));d.push(p)}d.push(toHex(f));for(var m=1;m<=darkColorCount;m+=1){var g=toHsv(f),y=toHex(inputToRGB({h:getHue(g,m),s:getSaturation(g,m),v:getValue(g,m)}));d.push(y)}return u.theme==="dark"?darkColorMap.map(function(b){var re=b.index,x=b.opacity,vn=toHex(mix(inputToRGB(u.backgroundColor||"#141414"),inputToRGB(d[re]),x*100));return vn}):d}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(c){presetPalettes[c]=generate$1(presetPrimaryColors[c]),presetPalettes[c].primary=presetPalettes[c][5],presetDarkPalettes[c]=generate$1(presetPrimaryColors[c],{theme:"dark",backgroundColor:"#141414"}),presetDarkPalettes[c].primary=presetDarkPalettes[c][5]});var containers=[],styleElements=[],usage="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function createStyleElement(){var c=document.createElement("style");return c.setAttribute("type","text/css"),c}function insertCss(c,u){if(u=u||{},c===void 0)throw new Error(usage);var d=u.prepend===!0?"prepend":"append",f=u.container!==void 0?u.container:document.querySelector("head"),h=containers.indexOf(f);h===-1&&(h=containers.push(f)-1,styleElements[h]={});var v;return styleElements[h]!==void 0&&styleElements[h][d]!==void 0?v=styleElements[h][d]:(v=styleElements[h][d]=createStyleElement(),d==="prepend"?f.insertBefore(v,f.childNodes[0]):f.appendChild(v)),c.charCodeAt(0)===65279&&(c=c.substr(1,c.length)),v.styleSheet?v.styleSheet.cssText+=c:v.textContent+=c,v}function _objectSpread$e(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?Object(arguments[u]):{},f=Object.keys(d);typeof Object.getOwnPropertySymbols=="function"&&(f=f.concat(Object.getOwnPropertySymbols(d).filter(function(h){return Object.getOwnPropertyDescriptor(d,h).enumerable}))),f.forEach(function(h){_defineProperty$f(c,h,d[h])})}return c}function _defineProperty$f(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function warn(c,u){process.env.NODE_ENV!=="production"&&!c&&console!==void 0&&console.error("Warning: ".concat(u))}function warning(c,u){warn(c,"[@ant-design/icons-vue] ".concat(u))}function isIconDefinition(c){return typeof c=="object"&&typeof c.name=="string"&&typeof c.theme=="string"&&(typeof c.icon=="object"||typeof c.icon=="function")}function generate(c,u,d){return d?vue.h(c.tag,_objectSpread$e({key:u},d,c.attrs),(c.children||[]).map(function(f,h){return generate(f,"".concat(u,"-").concat(c.tag,"-").concat(h))})):vue.h(c.tag,_objectSpread$e({key:u},c.attrs),(c.children||[]).map(function(f,h){return generate(f,"".concat(u,"-").concat(c.tag,"-").concat(h))}))}function getSecondaryColor(c){return generate$1(c)[0]}function normalizeTwoToneColors(c){return c?Array.isArray(c)?c:[c]:[]}var iconStyles=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
@@ -99,14 +99,14 @@ version: 2.9.0
|
|
|
99
99
|
`,d+="-----END PUBLIC KEY-----",d},u.hasPublicKeyProperty=function(d){return d=d||{},d.hasOwnProperty("n")&&d.hasOwnProperty("e")},u.hasPrivateKeyProperty=function(d){return d=d||{},d.hasOwnProperty("n")&&d.hasOwnProperty("e")&&d.hasOwnProperty("d")&&d.hasOwnProperty("p")&&d.hasOwnProperty("q")&&d.hasOwnProperty("dmp1")&&d.hasOwnProperty("dmq1")&&d.hasOwnProperty("coeff")},u.prototype.parsePropertiesFrom=function(d){this.n=d.n,this.e=d.e,d.hasOwnProperty("d")&&(this.d=d.d,this.p=d.p,this.q=d.q,this.dmp1=d.dmp1,this.dmq1=d.dmq1,this.coeff=d.coeff)},u}(RSAKey),_a,version$1=typeof process<"u"?(_a=process.env)===null||_a===void 0?void 0:_a.npm_package_version:void 0,JSEncrypt=function(){function c(u){u===void 0&&(u={}),u=u||{},this.default_key_size=u.default_key_size?parseInt(u.default_key_size,10):1024,this.default_public_exponent=u.default_public_exponent||"010001",this.log=u.log||!1,this.key=null}return c.prototype.setKey=function(u){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(u)},c.prototype.setPrivateKey=function(u){this.setKey(u)},c.prototype.setPublicKey=function(u){this.setKey(u)},c.prototype.decrypt=function(u){try{return this.getKey().decrypt(b64tohex(u))}catch{return!1}},c.prototype.encrypt=function(u){try{return hex2b64(this.getKey().encrypt(u))}catch{return!1}},c.prototype.sign=function(u,d,f){try{return hex2b64(this.getKey().sign(u,d,f))}catch{return!1}},c.prototype.verify=function(u,d,f){try{return this.getKey().verify(u,b64tohex(d),f)}catch{return!1}},c.prototype.getKey=function(u){if(!this.key){if(this.key=new JSEncryptRSAKey,u&&{}.toString.call(u)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,u);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},c.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},c.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},c.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},c.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},c.version=version$1,c}();const encryptor=new JSEncrypt,aesKey=createAesKey();function createAesKey(){let u=Math.random().toString(36).substr(2);for(;u.length<16;)u+=Math.random().toString(36).substr(2);return u=u.substr(0,16),u}const iv=CryptoJS.enc.Utf8.parse("ABCDEF1234123412");function aesEncrypt(c,u){u=u||aesKey;const d=CryptoJS.enc.Utf8.parse(u);let f="";switch(typeof c){case"string":f=CryptoJS.enc.Utf8.parse(c);break;case"object":f=CryptoJS.enc.Utf8.parse(JSON.stringify(c));break;default:f=CryptoJS.enc.Utf8.parse(c.toString())}return CryptoJS.AES.encrypt(f,d,{iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding}).toString()}function aesDecrypt(c,u){u=u||aesKey;const d=CryptoJS.enc.Utf8.parse(u),f=CryptoJS.AES.decrypt(c,d,{iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding});return CryptoJS.enc.Utf8.stringify(f).toString()}function setPublicKey(c){encryptor.setPublicKey(c)}function rsaEncrypt(c){return encryptor.encrypt(c)}function hasEncryptUrl(c=""){c.startsWith("/")||(c="/"+c),c=c.split("?")[0];const d=["/diagram","/dataview"].map(f=>`^(.*?)${f}(/|$)`);for(const f of d)if(new RegExp(f).test(c))return!0;return!1}function EncryptConfigParam(c){const{paramType:u,data:d,params:f,method:h}=c;u==="form"?["get","delete"].includes(h)?c.params=getEncryptParam(f,"string"):c.data=getEncryptParam(d,"string"):["get","delete"].includes(h)?c.params=getEncryptParam(f,"string"):c.data=getEncryptParam(d)}function getEncryptParam(c,u){let d=c||{};if(u==="string"){d="";for(const m in c)if(Object.hasOwnProperty.call(c,m)){const g=c[m];d+=`${m}=${encodeURIComponent(g)}&`}}setPublicKey("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const h=rsaEncrypt(aesKey);return{c:aesEncrypt(d,aesKey),p:h}}window.getEncryptParam=getEncryptParam;function encryptData(c,u){var d;(d=window==null?void 0:window.config)!=null&&d.encryptFlag&&hasEncryptUrl(c.url)&&(c.data instanceof FormData?c.data=getEncryptFileParam(c.data):EncryptConfigParam(c))}function getEncryptFileParam(c){const u=c.entries(),d=new FormData,f={};for(const v of u){const p=v[0],m=v[1];m instanceof Blob?d.append(p,m):f[p]=m}const h=getEncryptParam(f,"json");return typeof h=="object"&&(d.append("c",h.c),d.append("p",h.p)),d}window.xhaesKey=aesKey,window.xhaesDecrypt=aesDecrypt;function decryptData(c,u){var d;if((d=window==null?void 0:window.config)!=null&&d.encryptFlag&&hasEncryptUrl(c.config.url)&&!(c.data instanceof Blob)&&c.data.data!==void 0){const f=aesDecrypt(c.data.data.content,aesKey);c.data=JSON.parse(f)}}const requestErrorTip=window.config.requestErrorTip,request=axios.create({timeout:1e3*180});request.interceptors.request.use(c=>{const{requestParams:u={}}=window.config;return u!=null&&u.pltToken&&(c.headers["Plt-Token"]=u.pltToken),encryptData(c),c},c=>Promise.reject(c)),request.interceptors.response.use(c=>{var u,d,f;return requestErrorTip&&+((u=c==null?void 0:c.data)==null?void 0:u.code)==500&&antDesignVue.message.error({content:((d=c==null?void 0:c.data)==null?void 0:d.msg)||((f=c==null?void 0:c.data)==null?void 0:f.message)||"服务器异常",key:"SERVER_ERROR",duration:2}),decryptData(c),c},c=>{if(decryptData(c==null?void 0:c.response),requestErrorTip)if(c.message.includes("timeout"))antDesignVue.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT",duration:2});else{const{status:u}=(c==null?void 0:c.response)||{};u>=400&&u<500&&antDesignVue.message.error({content:"请求异常",key:"REQUEST_ERROR",duration:2}),u>=500&&antDesignVue.message.error({content:"服务器异常",key:"REQUEST_ERROR",duration:2})}return Promise.reject(c)});const handleFormatter=c=>c.replace(/\\n/g,`
|
|
100
100
|
`),formatMoney=(c,u=2)=>{const d=parseFloat(c+"");return isNaN(d)?c:d.toFixed(u).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},formatThousands=c=>{const u=parseFloat(c+"");return isNaN(u)?c:(u+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},formatPercentage=(c,u=2)=>{const d=c+"";if(d.includes("%"))return c;const f=parseFloat(d);return isNaN(f)?c:`${(f*100).toFixed(u)}%`},formatDecimals=(c,u=2)=>{const d=c+"",f=parseFloat(d);return isNaN(f)?c:f.toFixed(u)},formatCustom=(c,u)=>Fn(u,c),getFixedValueDatas=c=>{const{leftAxisList:u=[],rightAxisList:d=[],queryColumnList:f=[],indicators:h=[]}=c;return[...u,...d,...f,...h].filter(v=>(v==null?void 0:v.calcType)==="COMPONENT").map(v=>({keyName:v.builtInCalcWay,id:v.builtInValueSource}))},canRequestIndicator=(c,u)=>{let d=!0;const f=getFixedValueDatas(c);return f!=null&&f.length&&(d=f.map(h=>u[h.id]).every(h=>h)),d},getLegendFormat=(c,u)=>{var p;const d=c.match(/\{(.+?)\}/g),f=((p=c.split(`
|
|
101
101
|
`))==null?void 0:p.length)-1;let h="";if(f)for(let m=0;m<f;m++)h+=`
|
|
102
|
-
`;let v=c;if(d!=null&&d.length){for(const m of d){const g=hn(m,{textData:u},{useNewline:!1,useSpace:!1});g&&(v=v.replace(m,g))}return`${h}{text|${v}}`}else return c},setDefaultRangeVal=(c,u)=>{const{props:d,componentList:f,getGlobalModel:h}=c,{graphicConfig:v={},startValue:p,endValue:m}=d,g=getdefCompleteData({graphicConfig:v,startValue:p,endValue:m,componentList:f,getGlobalModel:h}),{dimensions:y,dataset:b}=u,{classificationList:re=[]}=v,vn=re.find(j=>j.show).label||"";for(const j of g)!y.find(Pn=>+Pn==+j)&&!isNaN(+j)&&y.push(+j);y.sort((j,Pn)=>dayjs(j).isBefore(dayjs(Pn))?-1:1);for(const j of b){const{data:Pn}=j;if(Pn!=null&&Pn.length){const qn=[];for(const Bn of g)if(!Pn.find(w=>+w[vn]==+Bn)&&!isNaN(+Bn)){const w=lodashEs.cloneDeep(Pn[0]);for(const J in w)J===vn?w[J]=+Bn:w[J]=0;qn.push(w)}j.data.push(...qn),j.data.sort((Bn,w)=>dayjs(Bn[vn]).isBefore(dayjs(w[vn]))?-1:1)}}};function getdefCompleteData(c){const{startValue:u,endValue:d,componentList:f,graphicConfig:h,getGlobalModel:v}=c,p=getVariableAndField(u),m=getVariableAndField(d),g=[];if(p&&m){const y=f.find(re=>re.keyName===p.keyName),b=f.find(re=>re.keyName===m.keyName);if(y&&b){const re=v(y.id),x=v(b.id),{classificationList:vn=[]}=h,j=vn.find(Pn=>Pn.show);if(j){let Pn="YYYY-MM";switch(j.name){case"the_year":Pn="YYYY";break;case"the_month":Pn="MM";break;case"the_day":Pn="DD";break;case"the_date":Pn=(j==null?void 0:j.dateFormat)||Pn;break}const qn=getFormatStep(Pn);if(Pn){const Bn=vue.unref(re[p.field]),w=vue.unref(x[m.field]);let J=dayjs(Bn);const gn=dayjs(w);for(g.push(gn.format(Pn));J.isBefore(gn);)g.push(J.format(Pn)),J=J.add(1,qn)}}}}return g}function getVariableAndField(c){let u=null;if(c){const d=c.match(/\{(.+?)\}/g);if(d!=null&&d.length){let f=d[0].slice(1,-1).trim();const h=f.match(/\[(.+?)\]/g);let v="";h!=null&&h.length&&(f=f.replace(h[0],""),v=h[0].slice(1,-1).trim()),u={keyName:f,field:v}}}return u}function getFormatStep(c){const u=c.split("-");let d="";if(u!=null&&u.length)switch(u[u.length-1]){case"YYYY":d="year";break;case"MM":d="month";break;case"DD":d="day";break}return d}function handleJumpLink(c,u){var re;const{pageMode:d,targetTemplate:f,getRecordValueByKeyName:h,setTemplateData:v}=u,p=c.linkPage||"",m=usePageUrl(d,p),g=c.href;let y=g||m;y=hn(y);const b=c.target;if(b)if(b==="event")window.parent.postMessage({type:"openPage",url:g},"*");else{const x={pageId:p,componentId:f};if((re=c.transParams)!=null&&re.length){y.includes("?")?y+="&":y+="?";const vn=[];for(const j of c.transParams){const Pn=h(String(j.fieldName));vn.push(`${j.keyName}=${Pn}`),x[j.keyName]=Pn}y+=vn.join("&")}b==="template"?(Object.prototype.hasOwnProperty.call(window,"oldPageId")||(window.oldPageId=""),window.oldPageId&&(window.controller.abort(),window.controller=new AbortController),window.oldPageId=p,v(x)):(b==="blank"&&(y+=`${y.includes("?")?"&":"?"}drillFlag=1`),window.open(y,"_"+b))}}function getPageUrlParams(c){var d,f;let u={};if(c){const h=(((d=window.config)==null?void 0:d.urlParams)||{})[c]||{};for(const v in h)v.includes("{")||(u[v]=h[v])}else u=((f=window.config)==null?void 0:f.requestParams)||{};return u}function getNewValueFromUrlParams(c,u,d){let f="";const{urlParams:h}=window.config;if(c&&h[c])for(const v in h[c]){const p=h[c][v];if(v===`{${u}[${d}]}`&&p){f=p;break}}return f}function getFormatWh(c,u){return typeof c=="number"?c:typeof c=="string"?parseFloat(c):c.suffix==="px"?+c.value:c.suffix==="%"?parseFloat(u)*(c.value/100):0}const hasChinese=c=>/[\u4e00-\u9fa5]/.test(c),dragModalAction=(c,u)=>{const d=document.querySelector(u);if(!d)return;d.style.cursor="move",d.style.userSelect="none";const f=d.parentElement,h=200,v=f.getBoundingClientRect(),{width:p,left:m,top:g}=v,y=window.innerWidth,b=window.innerHeight,re=c.clientX,x=c.clientY,vn=parseFloat(f.style.left)||0,j=parseFloat(f.style.top)||0,Pn=-(m+p-h-vn),qn=y-m+vn-h,Bn=-(g-j),w=b-g+j-h,J=Rn=>{Rn.preventDefault();const zn=Rn.clientX-re,Wn=Rn.clientY-x;let Yn=vn+zn,Jn=j+Wn;Yn=Math.max(Pn,Math.min(Yn,qn)),Jn=Math.max(Bn,Math.min(Jn,w)),f.style.left=`${Yn}px`,f.style.top=`${Jn}px`},gn=()=>{d.style.cursor="",d.style.userSelect="",document.removeEventListener("mousemove",J),document.removeEventListener("mouseup",gn)};document.addEventListener("mousemove",J),document.addEventListener("mouseup",gn)},getPageId=()=>{var u;let c=((u=window==null?void 0:window.config)==null?void 0:u.pageId)||"";if(!c){const{pathname:d}=window==null?void 0:window.location;if(d){const f=d.split("/");f!=null&&f.length&&(c=f[f.length-1])}}return c};function loopConditions(c,u,d){const f=[];for(const h of c)h[u]?f.push(...loopConditions(h[u],u,d)):h.filter?f.push({...h.filter,label:h.label}):(!d||h.dataType!=="component"&&!(h.fieldValue.startsWith("${")&&h.fieldValue.endsWith("}")))&&f.push(h);return f}function isThousandWithUnit(c){if(typeof c!="string")return!1;const u=c.trim();return/^(\d{1,3}(,\d{3})*)(\.\d+)?([^\d].*)?$/.test(u)}function isValidDateStr(c){if(!c)return!1;const u=new Date(c);return u instanceof Date&&!isNaN(u.getTime())}function swapArrItem(c,u,d){return u<0||d<0||u>=c.length||d>=c.length||([c[u],c[d]]=[c[d],c[u]]),c}const useRequestData=(c,u,d=()=>{})=>{var ar;const{requestUrl:f,requestMethod:h,requestHeaders:v,requestParams:p,requestInterval:m,isOpenRequestTimer:g,openCustomRequestData:y,projectRequestUrl:b="",getModel:re,requestParamsMode:x,customRequestParams:vn,dataSetParam:j,requestType:Pn,dataType:qn,dataSetchecked:Bn}=c,{pageMode:w}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"})||{},{pageId:J}=vue.inject("templateOperate",{pageId:""})||{},{contextRequestUrl:gn,touchEventId:Rn}=vue.inject(GLOBAL_CONFIG,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:zn}=vue.inject(GLOBAL_MODEL,{getGlobalModel:cr=>{}})||{},Wn=vue.inject(COMMON_OPERATE,{operateAction:(cr,fr)=>{}}),Yn=re||zn;let Jn=hn(f),tr=vue.unref(gn)||b||"";(qn==="request"&&Bn||Pn===1)&&(tr="",Jn=((ar=window.config)==null?void 0:ar.dataSetUrl)||"/api/datav/dataset/data2");const nr=async(cr={},fr={})=>{var or;if(vue.unref(w)==="design")return;if(qn!=="request"&&Qn){clearInterval(Qn);return}if(!Jn||!h||!v)return;let Gn={};for(const sr of p){const{key:dr,value:Xn}=sr;if((Xn==null?void 0:Xn.id)==="PARENT"&&(Xn!=null&&Xn.prop)){const hr=(((or=window.config)==null?void 0:or.record)||{})[Xn.prop];if(hr){const vr=hr[Xn.propKey||"value"];vr&&(["date","range"].some(br=>yn(hr==null?void 0:hr.type,br))?Gn[dr]=vue.unref(vr).format(hr.format||"YYYY-MM-DD"):Gn[dr]=vue.unref(vr))}continue}if(typeof Xn=="object"&&Xn!=null&&Xn.id){let lr={};const{id:hr,prop:vr,propKey:yr,operate:br}=Xn;let pr=!1;try{JSON.parse(hr),pr=!0}catch{pr=!1}hr==="THIS"?lr=Yn(vue.unref(Rn))||{}:lr=Yn(hr)||{};const mr=vue.unref(lr[vr]);let Er=null;if(["date","range"].some(Cr=>yn(lr==null?void 0:lr.type,Cr))){const{value:Cr,type:xr,mode:Ar}=br||{};if(Cr&&xr&&Ar)switch(xr){case"add":Er=vue.unref(mr).add(Cr,Ar);break;case"minus":Er=vue.unref(mr).subtract(Cr,Ar);break}Er==null&&(Er=vue.unref(mr)),Er=Er&&(Er==null?void 0:Er.format((yr==null?void 0:yr.trim())||lr.format))||""}else if(Object.prototype.toString.call(mr)==="[object Object]")yr?Er=mr[yr]:Er=vr?mr[vr]:mr;else if(yn(lr==null?void 0:lr.type,"select")&&vue.unref(mr)&&vr&&Array.isArray(vue.unref(mr)))Er=vue.unref(mr).map(Cr=>Object.prototype.hasOwnProperty.call(Cr,vr)?Cr[vr]:Cr);else if(pr){const Cr=JSON.parse(hr);console.log(Cr,"urlvalue"),Er=Cr.value}else Er=mr;Gn[dr]=Er}else typeof Xn=="object"&&!Xn.id&&Pn===1?(console.log(Xn.propKey,"value.propKey"),Gn[dr]=Xn.propKey):typeof Xn=="string"&&(Gn[dr]=hn(Xn))}if(Pn===1){console.log(Gn,"_params");const sr=Object.entries(Gn);let dr=j;if(!j.param&&Array.isArray(j)){const Xn={};for(const lr of j)Xn[lr.key]=lr.value;dr=Xn}dr.param=dr.param.map((Xn,lr)=>({...Xn,paramKey:sr[lr][0],defaultValue:sr[lr][1]||""})),Gn=dr}if(x==="2"&&vn!=="{}"){const sr=JSON.parse(vn);Zn(sr),sr&&(Gn=sr)}function Zn(sr){const dr={...Gn,...getPageUrlParams(J)};if(Array.isArray(sr))sr.forEach((Xn,lr)=>{if(typeof Xn=="string"){const hr=Xn.match(/\${(.+?)\}/g);if(hr!=null&&hr.length){const vr=hr[0].slice(2,-1);vr&&dr[vr]?sr[lr]=dr[vr]:sr[lr]=""}}else Zn(Xn)});else if(Object.prototype.toString.call(sr)==="[object Object]")for(const Xn in sr)if(typeof sr[Xn]=="string"){const lr=sr[Xn].match(/\${(.+?)\}/g);if(lr!=null&&lr.length){const hr=lr[0].slice(2,-1);hr&&dr[hr]?sr[Xn]=dr[hr]:sr[Xn]=""}}else Zn(sr[Xn])}const Hn=getPageUrlParams(J);for(const sr in Hn)Hn[sr]&&(Hn[sr]=decodeURIComponent(Hn[sr]));if(Gn={...Hn,...cr,...Gn},fr){const{callback:sr,pageParams:dr}=fr;dr&&(Gn={...Gn,...dr}),sr&&sr(Gn)}let Un="";const er=Object.keys(Gn),Kn=er.length-1,ir=er.length;er.forEach((sr,dr)=>{let Xn=Gn[sr];Object.prototype.toString.call(Xn)==="[object Object]"&&(Xn=JSON.stringify(Xn)),dr===0?ir!==1?Un+=`?${sr}=${Xn}&`:Un+=`?${sr}=${Xn}`:dr===Kn?Un+=`${sr}=${Xn}`:Un+=`${sr}=${Xn}&`}),Jn.includes("?")&&(Un=Un.replace("?","&"));function ur(sr){var dr;if(Pn===1)return{Authentication:(dr=window==null?void 0:window.config)==null?void 0:dr.indicatorToken};if(typeof sr=="string"){const Xn=JSON.parse(sr),lr=getPageUrlParams(J);if(Object.prototype.toString.call(Xn)==="[object Object]"){for(const hr in Xn)if(typeof Xn[hr]=="string"){const vr=Xn[hr].match(/\${(.+?)\}/g);if(vr!=null&&vr.length){const yr=vr[0].slice(2,-1);yr&&lr[yr]?Xn[hr]=lr[yr]:Xn[hr]=""}}}return Xn}else return sr}try{const sr=["get","head"].includes(h),dr={};let Xn=sr?Jn+Un:Jn;Gn.dataSqlId&&!Xn.includes("dataSqlId")&&(Xn+=`${Xn.includes("?")?"&":"?"}dataSqlId=${Gn.dataSqlId}`),Object.prototype.hasOwnProperty.call(Gn,"signal")?dr.signal=Gn.signal:window.controller&&(dr.signal=window.controller.signal);const lr=await request({baseURL:tr,url:Xn,method:h,headers:v?ur(v):{},data:sr?{}:Gn,...dr});return d(lr),Wn==null||Wn.operateAction("SAVE_COMPONENT_RES_DATA",{id:c.id,data:(lr==null?void 0:lr.data)||{}}),lr}catch(sr){console.error(sr)}},Qn=vue.unref(w)!=="design"&&g&&(y||y===void 0)&&setInterval(nr,m*1e3);return vue.onUnmounted(()=>{clearInterval(Qn)}),nr},useImagePath=(c,u=!1)=>{var f;if(!c)return c;let d="";return c!=null&&c.includes("://")?d=c:d=((f=window==null?void 0:window.config)==null?void 0:f.uploadPath)+c,u&&(d=`url(${d})`),d},usePageUrl=(c,u)=>{const d=`${BASE_URL}/preview?pageId=${u}`,f=`${BASE_URL}/${u}`;return c==="preview"?d:f},useIndicatorData=(c={},u=()=>{})=>{var re;const{pageMode:d}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:f}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:h}=vue.inject(LOADED_DATA,{setLoadedData:(x,vn)=>{}}),{getAllGlobalModel:v}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),{pageId:p}=vue.inject("templateOperate",{pageId:""})||{},m=vue.inject(COMMON_OPERATE,{operateAction:(x,vn)=>{}}),g=vue.inject("componentList",[]);c.dataType==="indicator"&&f();const y=async(x={})=>{var gn,Rn,zn,Wn,Yn;if(vue.unref(d)==="design")return;const vn=v();h(c.id,!1);const j=En({...c,globalModel:vn,allComponentList:vue.unref(g)},x),{url:Pn,...qn}=j||{},{pathname:Bn,search:w}=window==null?void 0:window.location;let J=p||((gn=window==null?void 0:window.config)==null?void 0:gn.pageId);if(!J&&Bn){const Jn=Bn.split("/");Jn!=null&&Jn.length&&(J=Jn[Jn.length-1])}if(Pn&&qn){let Jn,tr;if(c.type==="ecanIndexPanel"&&(Jn=c.theFlag),["/diagram/formData","/diagram"].includes(Pn)){tr={};const Qn=w.slice(1,w.length).split("&");for(const ar of Qn)if(ar){const cr=ar.split("=");if(cr[0])if(cr[0]==="userInfo")try{tr.token=(zn=(Rn=JSON.parse(decodeURIComponent(cr[1])))==null?void 0:Rn.baseInfo)==null?void 0:zn.hrpToken}catch(fr){console.log(fr)}else tr[cr[0]]=cr[1]}}try{const nr=await request({url:`${INDICATOR_URL}${Pn}`,method:"post",headers:{Authentication:(Wn=window==null?void 0:window.config)==null?void 0:Wn.indicatorToken,operateContext:CONTEXT},data:{...qn,pageId:J,theFlag:Jn,extParam:tr},signal:((Yn=window.controller)==null?void 0:Yn.signal)||""});return x!=null&&x.isTimer&&u(nr),m==null||m.operateAction("SAVE_COMPONENT_RES_DATA",{id:c.id,data:(nr==null?void 0:nr.data)||{}}),c.type==="ecanIndexPanel"&&(m==null||m.operateAction("SAVE_INDEX_PANEL_REQ_PARAMS",qn)),nr}catch(nr){console.error(nr)}}},b=vue.unref(d)!=="design"&&((re=c==null?void 0:c.graphicConfig)==null?void 0:re.pageMode)!=="design"&&c.isOpenRequestTimer&&c.requestInterval&&setInterval(()=>{y({isTimer:!0})},c.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(b)}),y},useHrefParamsToGlobalVariables=()=>{const u=window.location.search.slice(1).split("&"),d=u.length,f={};for(let h=0;h<d;h++){const v=u[h];if(v==null||v==="")continue;const p=v.split("=");if(Array.isArray(p)){const m=p[0];m.includes("{")||(f[m]=p[1])}}window.config.requestParams={...window.config.requestParams,...f},window.config={...window.config,...f}},_sfc_main$C=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps,pageId:{type:String,default:""},customId:{type:String,default:"container"},portId:{type:String,default:"norPageConfig"}},setup(c){const{width:u,height:d,isCompatible:f}=vue.inject(GLOBAL_CONFIG,{width:null,height:null,isCompatible:null}),h=vue.inject("setPageHeight",zn=>{}),v=vue.inject("isMobile",!1),p=vue.computed(()=>{const zn={};return(!f.value||!v)&&(zn.width=u.value,zn.height=d.value),{...zn,backgroundColor:c.pageId?"transparent":c.backgroundColor,backgroundImage:useImagePath(c.backgroundImage,!0),backgroundSize:c.backgroundSize}}),m=vue.ref(0),g=vue.ref(0),y=vue.ref(0),b=vue.ref(0),re=vue.ref(!1),x=vue.ref();let vn;const j=()=>new Promise(zn=>{vue.nextTick(()=>{u.value&&d.value?(m.value=parseFloat(u.value),g.value=parseFloat(d.value)):(m.value=x.value.clientWidth,g.value=x.value.clientHeight),(!y.value||!b.value)&&(y.value=window.screen.width,b.value=window.screen.height),zn()})}),Pn=()=>{m.value&&g.value?(x.value.style.width=`${m.value}px`,x.value.style.height=`${g.value}px`):(x.value.style.width=`${y.value}px`,x.value.style.height=`${b.value}px`)};vue.watch([u,d],async()=>{c.pageId||(await j(),Pn(),Bn(),window.addEventListener("resize",J),gn()),re.value=!0},{immediate:!0});const qn=vue.ref({});vue.provide("scaleValue",qn);const Bn=()=>{if(f.value&&v){x.value.style.width="100%",x.value.style.height="auto",h("auto");return}const zn=document.body.clientWidth,Wn=document.body.clientHeight,Yn=m.value||y.value,Jn=g.value||b.value,tr=zn/Yn;let nr=Wn/Jn;(m.value!==1920||g.value!==1080)&&(nr=g.value/m.value*zn/Jn),qn.value={widthScale:tr,heightScale:nr},x.value&&(x.value.style.transform=`scale(${tr}, ${nr})`),h(qn.value)},w=vue.computed(()=>{var Wn;let zn={};return c.customId==="modalContainer"&&((Wn=vue.unref(qn))!=null&&Wn.heightScale)&&(zn.height=100/vue.unref(qn).heightScale+"vh"),zn}),J=lodashEs.debounce(async()=>{await j(),Bn()},100),gn=()=>{const zn=window.MutationObserver;vn=new zn(J),vn.observe(x.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},Rn=()=>{vn&&(vn.disconnect(),vn.takeRecords(),vn=null)};return vue.onMounted(()=>{re.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",J),Rn()}),{style:p,container:x,ready:re,scaleValue:qn,containerStyle:w}}}),PageConfig_vue_vue_type_style_index_0_scoped_eced44d2_lang="",_hoisted_1$q=["id"],_hoisted_2$g=["id"];function _sfc_render$H(c,u,d,f,h,v){return vue.openBlock(),vue.createElementBlock("div",{class:"page-config-container",id:c.customId,style:vue.normalizeStyle(c.containerStyle),ref:"container"},[c.customId!=="modalContainer"&&(c.ready||c.pageId)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",id:c.portId,style:vue.normalizeStyle(c.style)},[vue.renderSlot(c.$slots,"default",{},void 0,!0)],12,_hoisted_2$g)):vue.createCommentVNode("",!0)],12,_hoisted_1$q)}const PageConfig=_export_sfc$1(_sfc_main$C,[["render",_sfc_render$H],["__scopeId","data-v-eced44d2"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",textColor:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[],events:[],isCompatible:!0,variableList:[],drillingMode:"pivotTable",pivotTableFontSize:"16px",drillDetailUrl:""},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$B=vue.defineComponent({name:"IndicatorDetailModal",components:{BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,ZoomInOutlined:ZoomInOutlined$1,ZoomOutOutlined:ZoomOutOutlined$1,RedoOutlined:RedoOutlined$1},props:{theme:{type:String,default:"light"}},setup(c,{expose:u}){const d=vue.ref(!1),f=vue.ref([]),h=vue.ref(!1),v=vue.ref(),p=vue.ref(!0),m=vue.ref(1),g=vue.inject("isMobile",!1),y=vue.computed(()=>c.theme),b=vue.computed(()=>m.value!==1?{transform:`scale(${m.value})`,transformOrigin:"left top"}:{}),re=async({data:zn,indicatorUrl:Wn,indicatorToken:Yn,context:Jn,pageId:tr})=>{var cr,fr;p.value=!0,h.value=!0,d.value=!0;let nr=[];const{graphicConfig:Qn,theFlag:ar}=vue.unref(zn)||{};if(Qn){const{leftAxisList:Gn=[],rightAxisList:Zn=[],indicators:Hn=[]}=Qn,Un=Gn.concat(Zn).concat(Hn);Un!=null&&Un.length&&(nr=Un.map(er=>({calcType:er.calcType||"COLUMN",columnName:er.name,hrpIndexCode:er.indexCode,hrpIndexCodeNum:er.indexCodeNum,label:er.label,show:er.show,formula:er.formula})))}if(nr!=null&&nr.length)try{const Gn=await request({url:`${vue.unref(Wn)}/diagram/obtainIndicatorInfo`,method:"post",headers:{Authentication:Yn,operateContext:Jn},data:{source:"INDICATOR_LIB",pageId:tr,indicatorList:nr,theFlag:ar}}),Zn=((cr=Gn==null?void 0:Gn.data)==null?void 0:cr.data)||[];(fr=Zn[0])!=null&&fr.remark?(v.value=Zn[0].remark,f.value=[]):(v.value=null,f.value=Zn)}catch{}finally{h.value=!1}vue.nextTick(()=>{j(!0),Pn(!0)})},x=()=>document.querySelector("#modalContainer")||document.body,vn=vue.computed(()=>{let zn="ind-detail-modal";return(p.value||vue.unref(g))&&(zn+=" full",vue.unref(g)&&(zn+=" mobile")),vue.unref(y)==="darkBlue"&&(zn+=" darkBlue"),zn}),j=zn=>{const Wn=document.querySelector(".ind-detail-modal .ant-modal-header");Wn&&(zn?Wn.addEventListener("dblclick",Bn):Wn.removeEventListener("dblclick",Bn))},Pn=zn=>{const Wn=document.querySelector(".ind-detail-modal .ant-modal-header");if(Wn)if(zn)Wn.addEventListener("mousedown",qn);else{const Yn=Wn.parentElement;Yn&&(Yn.style.left="",Yn.style.top=""),Wn.removeEventListener("mousedown",qn)}};function qn(zn){dragModalAction(zn,".ind-detail-modal .ant-modal-header")}const Bn=()=>{p.value=!p.value,vue.nextTick(()=>{p.value?Pn(!1):Pn(!0)})},w=()=>{j(!1),Pn(!1)},J=()=>{m.value+=.5},gn=()=>{vue.unref(m)>1&&(m.value-=.5)},Rn=()=>{m.value=1};return vue.watch(m,zn=>{localStorage.setItem("indDetailZoom",String(zn))}),vue.watch(d,zn=>{zn?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"}),vue.onMounted(()=>{var Wn,Yn;const zn=localStorage.getItem("indDetailZoom");if(zn&&(m.value=+zn),vue.unref(g)){const Jn=document.querySelector("#modalContainer");p.value=!0,(Wn=Jn==null?void 0:Jn.style)==null||Wn.setProperty("--window-screen-width",document.body.clientWidth+"px"),(Yn=Jn==null?void 0:Jn.style)==null||Yn.setProperty("--window-screen-height",document.body.clientHeight+"px")}}),u({showModal:re}),{visible:d,dataList:f,isLoading:h,hasOwn:mn,remarkData:v,wrapClassName:vn,isIndFullScreen:p,infoStyle:b,indDetailZoom:m,isMobile:g,getContainer:x,toggleFullScreen:Bn,onDetailCancel:w,handleZoomIn:J,handleZoomOut:gn,handleResetZoom:Rn}}}),IndicatorDetailModal_vue_vue_type_style_index_0_scoped_3af47b3e_lang="",IndicatorDetailModal_vue_vue_type_style_index_1_lang="",_withScopeId$9=c=>(vue.pushScopeId("data-v-3af47b3e"),c=c(),vue.popScopeId(),c),_hoisted_1$p=_withScopeId$9(()=>vue.createElementVNode("div",{class:"modal-title"},"指标详情",-1)),_hoisted_2$f={class:"zoom-btn"},_hoisted_3$8={key:0,class:"spin-container"},_hoisted_4$6=["innerHTML"],_hoisted_5$5={class:"index-name"},_hoisted_6$4={key:0,class:"card-row"},_hoisted_7$4=_withScopeId$9(()=>vue.createElementVNode("div",{class:"label"},"计量单位:",-1)),_hoisted_8$4={class:"content"},_hoisted_9$3={key:1,class:"card-row"},_hoisted_10$3=_withScopeId$9(()=>vue.createElementVNode("div",{class:"label"},"指标定义:",-1)),_hoisted_11$3={class:"content"},_hoisted_12$3={key:2,class:"card-row"},_hoisted_13$3=_withScopeId$9(()=>vue.createElementVNode("div",{class:"label"},"计算方法:",-1)),_hoisted_14$3={class:"content"},_hoisted_15$2={key:3,class:"card-row"},_hoisted_16$1=_withScopeId$9(()=>vue.createElementVNode("div",{class:"label"},"指标说明:",-1)),_hoisted_17$1={class:"content"};function _sfc_render$G(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("redo-outlined"),g=vue.resolveComponent("zoom-out-outlined"),y=vue.resolveComponent("zoom-in-outlined"),b=vue.resolveComponent("switcher-outlined"),re=vue.resolveComponent("border-outlined"),x=vue.resolveComponent("a-spin"),vn=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(vn,{visible:c.visible,"onUpdate:visible":u[0]||(u[0]=j=>c.visible=j),width:"55%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,bodyStyle:{maxHeight:c.isIndFullScreen?"":"70vh",height:c.isIndFullScreen?"100vh":"",overflow:"auto",padding:"20px 24px 24px"},"wrap-class-name":c.wrapClassName,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[_hoisted_1$p]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["close-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$f,[c.indDetailZoom>1?(vue.openBlock(),vue.createBlock(m,{key:0,class:"modal-icon",title:"还原",onClick:c.handleResetZoom},null,8,["onClick"])):vue.createCommentVNode("",!0),c.indDetailZoom>1?(vue.openBlock(),vue.createBlock(g,{key:1,class:"modal-icon",title:"缩小内容",onClick:c.handleZoomOut},null,8,["onClick"])):vue.createCommentVNode("",!0),vue.createVNode(y,{class:"modal-icon",title:"放大内容",onClick:vue.withModifiers(c.handleZoomIn,["stop","prevent"])},null,8,["onClick"]),!c.isMobile&&c.isIndFullScreen?(vue.openBlock(),vue.createBlock(b,{key:2,class:vue.normalizeClass(["modal-icon",c.theme]),title:"取消全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"])):c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(re,{key:3,class:vue.normalizeClass(["modal-icon",c.theme]),title:"全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"]))]),c.isLoading?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$8,[vue.createVNode(x,{size:"large"})])):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"info-container",style:vue.normalizeStyle(c.infoStyle)},[c.remarkData?(vue.openBlock(),vue.createElementBlock("div",{key:0,innerHTML:c.remarkData},null,8,_hoisted_4$6)):c.dataList.length?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(c.dataList,(j,Pn)=>(vue.openBlock(),vue.createElementBlock("div",{class:"detail-wrap",key:Pn},[vue.createElementVNode("div",_hoisted_5$5,vue.toDisplayString(j.indexName||"--"),1),c.hasOwn(j,"theUnit")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$4,[_hoisted_7$4,vue.createElementVNode("div",_hoisted_8$4,vue.toDisplayString(j.theUnit||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(j,"meaning")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$3,[_hoisted_10$3,vue.createElementVNode("div",_hoisted_11$3,vue.toDisplayString(j.meaning||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(j,"theFormula")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_12$3,[_hoisted_13$3,vue.createElementVNode("div",_hoisted_14$3,vue.toDisplayString(j.theFormula||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(j,"theExplain")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$2,[_hoisted_16$1,vue.createElementVNode("div",_hoisted_17$1,vue.toDisplayString(j.theExplain||"--"),1)])):vue.createCommentVNode("",!0)]))),128)):vue.createCommentVNode("",!0)],4))]),_:1},8,["visible","getContainer","bodyStyle","wrap-class-name","onCancel"])}const IndicatorDetailModal=_export_sfc$1(_sfc_main$B,[["render",_sfc_render$G],["__scopeId","data-v-3af47b3e"]]),lineProps={...props$1,id:"",name:"折线图",keyName:"折线图",type:"ecanLine",width:"400px",height:"400px",top:"",left:"",rotate:"",data:[{name:"名称一",value:235,type:"类型一"},{name:"名称二",value:280,type:"类型一"},{name:"名称三",value:230,type:"类型一"},{name:"名称四",value:335,type:"类型一"}],titleText:"",titleFontSize:"12px",titleColor:"#333",fontWeight:400,textAlign:"left",titleSubtext:"",titleLeft:"",legendShow:!0,legendOrient:"horizontal",legendTextStyleColor:"#333",legendTop:"top",legendLeft:"center",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitAreaShow:!1,xAxisSplitLineInterval:0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineShow:!0,xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitAreaShow:!1,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",valueTypeDataFieldNames:{name:"name",value:"value",type:"type"},keyTypeDataFieldNames:{name:"name",types:[]},dataFieldConfigType:"value",graphicConfig:{},tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,areaGradientShow:!1,areaGradientColor:"",isBoundaryGap:!0,yAxisLabelShow:!0,yAxisSplitLineType:"solid",legendItemGap:10,legendItemWidth:25,legendItemHeight:14,legendType:"",shadowColor:"",shadowBlur:0,shadowOffsetY:0,shadowOffsetX:0,legendFontSize:"12px",xAxisLabelFontSize:"12px",yAxisLabelFontSize:"12px",graphicType:"ecanLine",tooltipPosition:"",isShowMarkLine:!1,markLineType:"average",legendFormatter:"{name}",legendWidth:null,legendHeight:null,legendTextWidth:null,legendScroll:!1,yAxisName:"",xAxisName:"",xAxisMaxValue:null,yAxisMaxValue:null,xAxisLabelShow:!0,tooltipTextStyleColor:"",noDataTip:!1,tipText:"暂无数据",tipTextColor:"#000000",tipTextFontSize:"18px",defaultRangeValue:!1,startValue:"",endValue:"",isForbidClick:!1,backgroundColor:""},lineComponentProps=transformToComponentProps(lineProps),lineEvents=["click","refreshData","resetRecord"],useDownloadFile=async c=>{var g;const u=await request.post(c,{},{responseType:"blob"}),{data:d,headers:f}=u,h=f["content-disposition"].replace(/\w+;filename=(.*)/,"$1"),v=new Blob([d]),p=document.createElement("a"),m=window.URL.createObjectURL(v);p.href=m,p.download=decodeURI(h),p.style.display="none",document.body.appendChild(p),p.click(),(g=p.parentNode)==null||g.removeChild(p),window.URL.revokeObjectURL(m)},modalProps={id:"",type:"ecanModal",title:"",titleFontSize:"14px",titleColor:"",width:"1000px",height:"800px",originalWidth:"1920px",originalHeight:"1080px",backgroundColor:"#fff",backgroundImage:"",backgroundSize:"100% 100%",keyName:"弹窗",componentList:[],fullModal:!1,destroyOnClose:!0,position:"default",closeBtnColor:"#333",isShowCloseBtn:!0,events:[],borderRadius:"0",borderWidth:"0px",borderColor:"",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",allComponentList:[],requestList:[],parentIframeId:"",banScale:!1},modalComponentProps=transformToComponentProps(modalProps),modalEvents=["showModal","hideModal"],containerType=["ecanBorder","ecanTabs","ecanCirculate"];function handleScrollCombinations(c){const{containerMap:u={},sourceList:d=[],pageConfig:f={}}=c,h=lodashEs.cloneDeep(c.componentList),v=h.filter(p=>p.type==="ecanTabs"&&p.isAutoScroll);if(v!=null&&v.length)for(const p of v){const m=u[p.id],g=[];if((!mn(p,"componentList")||!(p!=null&&p.componentList))&&(p.componentList=[]),m){let y=0;for(const b in m){const re=m[b],x=[];if(re!=null&&re.length)for(const vn of re){let j=h.find(Pn=>Pn.id===vn);j||(j=d.find(Pn=>Pn.id===vn)),j&&(x.push(j),containerType.includes(j.type)&&x.push(...getComponentByContainer(j.id,u,d)))}for(const vn of x)mn(vn,"scale")?parseFloat(b)>0&&(vn.left=parseFloat(vn.left)+y+"px"):(vn.left=parseFloat(vn.sourceLeft||vn.left)-parseFloat(p.sourceLeft||p.left)+y+"px",vn.top=parseFloat(vn.sourceTop||vn.top)-parseFloat(p.sourceTop||p.top)+"px"),g.includes(vn.id)||g.push(vn.id);p.componentList.push(...x),y=getMaxLeftInComponents(x,f)}}for(const y of g){const b=h.findIndex(re=>re.id===y);b!==-1&&h.splice(b,1)}}return h}function compatibleMobileList(c){var g,y,b,re,x;const u=["ecanPie","ecanLine","ecanBar","ecanScatter","ecanComboGraph","ecanCustomGraph","ecanRadar","ecanMap","ecanTable"],d=document.body.clientWidth,{combinationMap:f={},sourceList:h=[],pageConfig:v={}}=c,p=c.containerMap,m=lodashEs.cloneDeep([...c.componentList,...getTabsSomeComponentList(p,h)]);if(handleContainerMap(p,m),(g=Object.keys(p))!=null&&g.length||(y=Object.keys(f))!=null&&y.length){for(const Bn in p){const w=m.find(J=>J.id===Bn);if(w){if(w!=null&&w.isFlowGrid){w.sourceLeft=w.left,w.sourceTop=w.top;continue}mn(w,"parentId")||(w.parentId="",w.sourceLeft=w.left,w.sourceTop=w.top);let J;if(w.type==="ecanBorder"&&((b=p[Bn][0])==null?void 0:b.length)===1&&(J=m.find(gn=>gn.id===p[Bn][0][0]),u.includes(J==null?void 0:J.type)||(J=null)),J){if(w.width=d,w.height=getFormatWh(J.height,v==null?void 0:v.height),J.parentId=Bn,J.width=d-20+"px",J.sourceLeft=J.left,J.sourceTop=J.top,J.left="10px",J.top="0px",J.type==="ecanTable"){const{columns:gn=[]}=J;J.scrollX="max-content";for(const Rn of gn)(re=Rn==null?void 0:Rn.width)!=null&&re.includes("%")&&(Rn.width=parseFloat(Rn.width)/100*d+"px")}}else for(const gn in p[Bn])if(p[Bn][gn])for(const Rn of p[Bn][gn]){const zn=m.find(Wn=>Wn.id===Rn);if(zn&&(zn.parentId=Bn,zn.sourceLeft=zn.left,zn.sourceTop=zn.top,zn.left=parseFloat(zn.left)-parseFloat(w.sourceLeft||w.left)+"px",zn.top=parseFloat(zn.top)-parseFloat(w.sourceTop||w.top)+"px",zn.type==="ecanIndexPanel")){const{componentIds:Wn}=zn;for(const Yn of Wn){const Jn=m.find(tr=>tr.id===Yn);Jn&&(Jn.left=parseFloat(Jn.left)-parseFloat(zn.sourceLeft)+"px",Jn.top=parseFloat(Jn.top)-parseFloat(zn.sourceTop)+"px")}}}}}const vn=Array.from(new Set(m.filter(Bn=>(!mn(Bn,"parentId")||Bn.parentId==="")&&Bn.combinationId).map(Bn=>Bn.combinationId))),j=getCombinationList(vn,{...c,componentList:m,pageConfig:v});j!=null&&j.length&&m.unshift(...j);const Pn=m.filter(Bn=>u.includes(Bn.type)&&!mn(Bn,"parentId")),qn=[];for(const Bn of Pn)if(Bn){const w=Bn.id+"_vir";if(qn.push({id:w,keyName:Bn.keyName+"_vir",parentId:"",type:"ecanBorder",borderRadius:"",borderWidth:null,width:d,height:getFormatWh(Bn.height,v==null?void 0:v.height),left:Bn.left,top:Bn.top,sourceLeft:Bn.left,sourceTop:Bn.top}),Bn.parentId=w,Bn.sourceLeft=Bn.left,Bn.sourceTop=Bn.top,Bn.left=10,Bn.top=0,Bn.width=d-20+"px",Bn.type==="ecanTable"){const{columns:J=[]}=Bn;Bn.scrollX="max-content";for(const gn of J)(x=gn==null?void 0:gn.width)!=null&&x.includes("%")&&(gn.width=parseFloat(gn.width)/100*d+"px")}}qn!=null&&qn.length&&m.unshift(...qn);for(const Bn of m){if(Bn.parentId===""&&containerType.includes(Bn.type))Bn.sourceWidth=getFormatWh(Bn.width,v==null?void 0:v.width),Bn.height=(d/(Bn.sourceWidth/getFormatWh(Bn.height,v==null?void 0:v.height))).toFixed(2)+"px",Bn.width="100%",Bn.position="relative",Bn.top="auto",Bn.left="auto";else{const w=m.find(J=>J.id===Bn.parentId);if((w==null?void 0:w.parentId)===""){const J=w.sourceWidth||getFormatWh(w.width,v==null?void 0:v.width),gn=d/J;Bn.scale=gn,Bn.top=parseFloat(Bn.top)*gn-getFormatWh(Bn.height,v==null?void 0:v.height)*(1-gn)/2+"px",Bn.left=parseFloat(Bn.left)*gn-getFormatWh(Bn.width,v==null?void 0:v.width)*(1-gn)/2+"px"}}Bn.type==="ecanModal"&&(Bn.parentId="",Bn.fullModal=!0)}return sortList(m)}return m}function handleContainerMap(c,u){const d=lodashEs.cloneDeep(c),f=u.filter(h=>h.type==="ecanTabs"&&h.isAutoScroll);if(f!=null&&f.length)for(const h of f){const v=d[h.id];for(const p in v)for(const m of v[p]){const g=u.find(y=>y.id===m);if(g&&containerType.includes(g.type)){const y=getComponentByContainer(g.id,d,u);for(const b of y)c[h.id][p].push(b.id),containerType.includes(b.type)&&delete c[b.id];delete c[g.id]}}}}function getTabsSomeComponentList(c,u){const d=[],f=u.filter(h=>h.type==="ecanTabs"&&h.isAutoScroll);if(f!=null&&f.length)for(const h of f){const v=c[h.id];for(const p in v)if(parseFloat(p)>0)for(const m of v[p]){const g=u.find(y=>y.id===m);g&&(d.push(g),containerType.includes(g.type)&&d.push(...getComponentByContainer(g.id,c,u)))}}return d}function getComponentByContainer(c,u,d){const f=[],h=u[c];for(const v in h)for(const p of h[v]){const m=d.find(g=>g.id===p);m&&(f.push(m),containerType.includes(m.type)&&f.push(...getComponentByContainer(m.id,u,d)))}return f}function getCombinationList(c,u,d){const{combinationMap:f={},componentList:h=[],pageConfig:v={}}=u,p=[];for(const m of c){const g=f[m];if(g!=null&&g.length){const y=h.filter(b=>g.includes(b.id));if(y!=null&&y.length){const b=getCombinateRect(y,v);if(b){p.push({...b,id:m,keyName:m,parentId:d||"",type:"ecanBorder",borderRadius:"",borderWidth:null,sourceLeft:b.left,sourceTop:b.top});for(const re of y)re&&(re.parentId=m,re.sourceLeft=re.left,re.sourceTop=re.top,re.left=parseFloat(re.left)-parseFloat(b.left)+"px",re.top=parseFloat(re.top)-parseFloat(b.top)+"px")}}}}return p}function sortList(c){const d=c.filter(f=>f.parentId===""||(f==null?void 0:f.isFlowGrid)).sort((f,h)=>{const v=f.sourceTop?typeof f.sourceTop=="object"?parseFloat(f.sourceTop.value):parseFloat(f.sourceTop):0,p=h.sourceTop?typeof h.sourceTop=="object"?parseFloat(h.sourceTop.value):parseFloat(h.sourceTop):0;return isNaN(v)||isNaN(p)?0:v-p});if(d!=null&&d.length){const f=lodashEs.cloneDeep(d).map(h=>({...h,sourceTop:parseFloat(h.sourceTop),sourceLeft:parseFloat(h.sourceLeft)}));for(let h=0;h<f.length-1;h++)for(let v=0;v<f.length-h-1;v++){let p=!1;if((f[v].sourceTop-f[v+1].sourceTop>40||Math.abs(f[v+1].sourceTop-f[v].sourceTop)<=40&&f[v].sourceLeft>f[v+1].sourceLeft)&&(p=!0),p){const m=f[v];f[v]=f[v+1],f[v+1]=m}}for(const h of f){const v=c.findIndex(p=>p.id===h.id);v!==-1&&c.splice(v,1)}return[...f,...c]}return c}function getCombinateRect(c,u){const d=c.sort((p,m)=>parseFloat(p.top)-parseFloat(m.top))[0],f=c.sort((p,m)=>parseFloat(p.left)-parseFloat(m.left))[0],h=c.map(p=>({...p,computedTop:parseFloat(p.top)+getFormatWh(p.height,u==null?void 0:u.height)})).sort((p,m)=>m.computedTop-p.computedTop)[0],v=c.map(p=>({...p,computedLeft:parseFloat(p.left)+getFormatWh(p.width,u==null?void 0:u.width)})).sort((p,m)=>m.computedLeft-p.computedLeft)[0];return d&&f&&h&&v?{left:f.left,top:d.top,width:v.computedLeft-parseFloat(f.left)+"px",height:h.computedTop-parseFloat(d.top)+"px"}:null}function getMaxLeftInComponents(c,u){const d=c.map(f=>parseFloat(f.left)+getFormatWh(f.width,u==null?void 0:u.width)).sort((f,h)=>h-f)[0];return d||0}function moveToComponentList(c,u,d){const f=c[d],h=[];if(f)for(const v in f){const p=f[v];for(const m of p){const g=u.find(y=>y.id===m);g&&(h.push(g),containerType.includes(g.type)&&h.push(...getComponentByContainer(g.id,c,u)))}}return h}const _sfc_main$A=vue.defineComponent({name:"Render",props:{component:{type:Object,default:()=>{}}},setup(c,{emit:u}){u("ready",c.component.id)}});function _sfc_render$F(c,u,d,f,h,v){return c.component.parentId?(vue.openBlock(),vue.createBlock(vue.Teleport,{key:0,to:"#container_"+c.component.parentId},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(c.component.type),vue.mergeProps({style:{scale:c.component.scale}},c.component),null,16,["style"]))],8,["to"])):(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(c.component.type),vue.normalizeProps(vue.mergeProps({key:1},c.component)),null,16))}const Render=_export_sfc$1(_sfc_main$A,[["render",_sfc_render$F]]),EcanRender=withInstall$1(Render),_sfc_main$z=vue.defineComponent({name:"EcanModal",components:{AModal:antDesignVue.Modal,CloseOutlined:CloseOutlined$1,Render:EcanRender},props:{...modalComponentProps},setup(c,{emit:u}){const d=vue.ref([]),f=vue.inject("isMobile",!1),{width:h,height:v}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),p=vue.computed(()=>c.fullModal),m=vue.inject("getContainerMap",()=>{}),g=vue.inject("getCombinationMap",()=>{}),{clearInteractiveData:y,interactiveData:b,setRequestData:re}=vue.inject(GLOBAL_MODEL,{setRequestData:(_r,Cr)=>{},clearInteractiveData:()=>{},interactiveData:null}),x=()=>document.getElementById("ProviderConfig")||document.body,vn=vue.computed(()=>{const _r=c.position;return{verticalAlign:{default:"",top:"top",center:"middle",bottom:"bottom"}[_r]}}),j=c.fullModal?"1920px":c.width,Pn=c.fullModal?"1080px":c.height,qn=c.originalWidth,Bn=c.originalHeight,w=vue.ref("80%"),J=vue.ref(0),gn=vue.ref(),Rn=vue.ref(0),zn=vue.ref({}),Wn=usePickComponentStyle(c),Yn=vue.ref({}),Jn=vue.ref(!1),tr=vue.ref();let nr;const Qn=()=>{gn.value=parseFloat(j)/parseFloat(qn);const _r=parseFloat(Pn)/parseFloat(Bn),Cr=document.body.offsetWidth,xr=document.body.offsetHeight;if(J.value=Cr*vue.unref(gn),Rn.value=xr*_r,w.value=`${vue.unref(gn)*100}%`,zn.value={width:`${vue.unref(J)}px`,height:`${vue.unref(Rn)}px`,border:`${c.borderWidth} solid ${c.borderColor}`,borderRadius:c.borderRadius+"px",boxShadow:c.boxShadow},Yn.value={...vue.unref(Wn),backgroundImage:useImagePath(c.backgroundImage,!0)},f)Yn.value={...Yn.value,width:"100%",height:"100%"};else{const Ar={...Yn.value,width:j,height:Pn};c.banScale&&vue.unref(p)?(Ar.width="100%",Ar.height="100%"):Ar.transform=`scale(${vue.unref(J)/parseFloat(j)},${vue.unref(Rn)/parseFloat(Pn)})`,Yn.value=Ar}},ar=lodashEs.debounce(()=>{Qn()},100),cr=()=>{const _r=window.MutationObserver;nr=new _r(ar),nr.observe(document.body,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},fr=()=>{nr&&(nr.disconnect(),nr.takeRecords(),nr=null)},Gn=vue.ref(!1),{touchRequest:Zn}=vue.inject(REQUEST_MODEL,{touchRequest:()=>{}}),Hn=vue.ref(""),Un=()=>{var xr;const{title:_r}=c,Cr=(xr=vue.unref(b))==null?void 0:xr.RECORD;return Cr?hn(_r,{textData:Cr},{useNewline:!1,useSpace:!1}):_r},er=useEmitEvent(c),Kn=_r=>{const{changeIframeStyle:Cr}=window.parent;Cr&&typeof Cr=="function"&&Cr({iframeId:c.parentIframeId||"",action:_r})},ir=()=>{vue.unref(p)&&Kn("open"),f&&(document.documentElement.style.overflow="hidden"),Hn.value=Un(),Gn.value=!0},ur=er("hideModal",()=>{vue.unref(p)&&Kn("close"),u("close"),f&&(document.documentElement.style.overflow="hidden auto",d.value=[]),Gn.value=!1}),or=()=>{ur()},sr=()=>{ur(),y()},{setModalModel:dr,pushUseModalIds:Xn,popUseModalIds:lr}=vue.inject(MODAL_MODEL,{pushUseModalIds:_r=>{},popUseModalIds:()=>{},setModalModel:(_r,Cr)=>{}}),hr=vue.computed(()=>{let _r=c.componentList;const Cr=lodashEs.cloneDeep(c.componentList),xr=m(),Ar=g(),gr={containerMap:xr,combinationMap:Ar};f&&(_r=compatibleMobileList({...gr,componentList:Cr,sourceList:c.allComponentList,pageConfig:{width:vue.unref(h),height:vue.unref(v)}})),_r=handleScrollCombinations({...gr,componentList:_r,sourceList:c.allComponentList,pageConfig:{width:vue.unref(h),height:vue.unref(v)}});const wr=[];for(const Tr of _r)if(Tr.type==="ecanCirculate"){const Pr=moveToComponentList(xr,vue.unref(Cr),Tr.id);Tr.componentList=Pr,wr.push(...Pr.map(Dr=>Dr.id))}else if(Tr.type==="ecanTable"){const{headerFontSize:Pr,fontSize:Dr,size:Kr,bodyRowHeight:Vr,headRowHeight:Hr}=Tr;if(!Vr||!Hr)if(Tr.size){let Xr=0;switch(Kr){case"default":Xr=16;break;case"middle":Xr=12;break;case"small":Xr=8;break}Vr||(Tr.bodyRowHeight=(Xr*2+parseFloat(Dr)*1.5715).toFixed(0)+"px"),Hr||(Tr.headRowHeight=(Xr*2+parseFloat(Pr)*1.5715).toFixed(0)+"px")}else Vr||(Tr.bodyRowHeight="54px"),Hr||(Tr.headRowHeight="54px")}if(wr!=null&&wr.length)for(const Tr of wr){const Pr=_r.findIndex(Dr=>Dr.id===Tr);Pr!==-1&&_r.splice(Pr,1)}return _r}),vr=()=>{const _r=c.id;let Cr=[];const xr=c.componentList;Array.isArray(xr)&&(Cr=xr.map(Ar=>Ar.id),dr(_r,[...new Set(Cr)]))},yr=vue.ref(!1),br={};for(const _r of c.requestList)br[_r.requestName]=useRequestData(_r);vue.watch(()=>Gn.value,async _r=>{if(_r)Jn.value=!1,Xn(c.id),vr(),await vue.nextTick(()=>{Qn(),window.addEventListener("resize",ar),cr(),Jn.value=!0}),Zn();else{if(re)for(const Cr in br)re(Cr,{});lr(),window.removeEventListener("resize",ar),fr()}});const pr=vue.computed(()=>vue.unref(gn)>=1),mr=vue.computed(()=>{let _r="ecan-modal";return vue.unref(pr)&&(_r+=" ecan-full-width-modal"),vue.unref(p)&&(_r+=" ecan-full-modal"),_r});return useOnEvent(c,{showModal:ir,hideModal:ur}),{modalRef:tr,containStyle:zn,contentStyle:Yn,getContainer:x,modalStyle:vn,modalWith:w,isFullModal:p,style:Wn,visible:Gn,showModal:ir,onOk:or,onCancel:sr,isFullWidth:pr,wrapClassName:mr,ready:Jn,usedComponentList:hr,isMobile:f,readyIds:d,hasOwn:mn,onComponentReady:_r=>{d.value.push(_r)},formatTitle:Hn,requestLoaded:yr}}}),Modal_vue_vue_type_style_index_0_scoped_e8d3acb6_lang="",Modal_vue_vue_type_style_index_1_lang="";function _sfc_render$E(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("render"),g=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(g,{getContainer:c.getContainer,wrapClassName:c.wrapClassName,centered:"",visible:c.visible,footer:null,width:c.isFullModal||c.isFullWidth?"100%":c.modalWith,destroyOnClose:c.destroyOnClose,style:vue.normalizeStyle(c.modalStyle),closable:!1,onOk:c.onOk,onCancel:c.onCancel,ref:"modalRef",id:"container_"+c.id},{default:vue.withCtx(()=>[vue.createElementVNode("div",{class:"contain",ref:"containRef",style:vue.normalizeStyle(c.containStyle)},[c.ready?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"content",style:vue.normalizeStyle(c.contentStyle)},[vue.createElementVNode("div",{class:"header-bar",style:vue.normalizeStyle({backgroundColor:c.backgroundColor,padding:"20px 30px",height:c.isMobile?"62px":""})},[c.formatTitle?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"ant-modal-title",style:vue.normalizeStyle({fontSize:c.titleFontSize,color:c.titleColor})},vue.toDisplayString(c.formatTitle),5)):vue.createCommentVNode("",!0),c.isShowCloseBtn?(vue.openBlock(),vue.createBlock(p,{key:1,class:"close-icon",style:vue.normalizeStyle({color:c.closeBtnColor}),onClick:c.onCancel},null,8,["style","onClick"])):vue.createCommentVNode("",!0)],4),c.usedComponentList.length?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(c.isMobile?"mobile-wrap":"")},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.usedComponentList,(y,b)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:y.id+b},[c.isMobile?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[c.hasOwn(y,"parentId")&&(c.readyIds.includes(y.parentId)||y.parentId==="")?(vue.openBlock(),vue.createBlock(m,{key:0,component:y,onReady:c.onComponentReady},null,8,["component","onReady"])):vue.createCommentVNode("",!0)],64)):(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.type),vue.mergeProps({key:1},y,{cpntid:y.id}),null,16,["cpntid"]))],64))),128))],2)):vue.renderSlot(c.$slots,"default",{key:1},void 0,!0)],4)):vue.createCommentVNode("",!0)],4)]),_:3},8,["getContainer","wrapClassName","visible","width","destroyOnClose","style","onOk","onCancel","id"])}const Modal=_export_sfc$1(_sfc_main$z,[["render",_sfc_render$E],["__scopeId","data-v-e8d3acb6"]]),EcanModal=withInstall$1(Modal);core$1.use([renderers.CanvasRenderer,charts.LineChart,components$1.ToolboxComponent,components$1.TitleComponent,components$1.LegendComponent,components$1.MarkLineComponent]);const _sfc_main$y=vue.defineComponent({name:"EcanLine",props:{...lineComponentProps},components:{Spin,Echarts,EcanModal},setup(c,{expose:u}){const d=vue.ref(!1),{pageMode:f,fontFamily:h}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal",fontFamily:""}),v=vue.inject("showIndDetail",er=>{}),p=vue.inject("usedComponentList",[]),m=vue.ref(),g=vue.ref(!1),y=usePickComponentStyle(c),b=vue.ref([]),re=vue.ref([]),x=vue.ref(),vn=vue.computed(()=>g.value?ZOOM_FONT_SIZE:12),j=vue.ref({});let Pn;const qn=vue.ref([]),Bn=vue.computed(()=>{const er=c.xAxisLabelFormatter,Kn=c.yAxisLabelFormatter;return{textStyle:{fontFamily:vue.unref(h)},toolbox:{show:c.toolboxShow,left:c.toolboxLeft,top:c.toolboxTop,itemSize:c.toolboxItemSize,itemGap:c.toolboxItemGap,orient:c.toolboxOrient,feature:{myDownload:{show:c.toolboxDownloadShow,title:"数据下载",icon:"path://M502.010485 765.939573c3.773953 3.719718 8.686846 5.573949 13.596669 5.573949 0.075725 0 0.151449-0.010233 0.227174-0.011256 0.329505 0.016373 0.654916 0.050142 0.988514 0.050142 0.706081 0 1.400906-0.042979 2.087545-0.116657 4.352121-0.366344 8.607028-2.190899 11.961426-5.496178l335.053985-330.166675c7.619538-7.509021 7.709589-19.773346 0.200568-27.393907s-19.774369-7.711636-27.39493-0.201591L536.193005 706.304358 536.193005 50.019207c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 657.032164-306.881342-302.44838c-7.618515-7.509021-19.883863-7.419993-27.393907 0.199545-7.509021 7.619538-7.419993 19.884886 0.199545 27.393907L502.010485 765.939573z, M867.170139 711.020776c-10.698666 0-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 13.054317-10.620895 23.675212-23.676236 23.675212L205.182103 919.486668c-13.054317 0-23.676236-10.620895-23.676236-23.675212L181.505867 730.391962c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 34.416857 28.000728 62.416562 62.417585 62.416562l618.941638 0c34.417881 0 62.417585-27.999704 62.417585-62.416562L886.540302 730.391962C886.541325 719.693296 877.868805 711.020776 867.170139 711.020776z",onclick(){useDownloadFile(c.toolboxDownloadUrl)}},myDataZoom:{show:g.value?!1:c.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){var ir;g.value=!0,(ir=x.value)==null||ir.showModal()}},myInfo:{show:c.toolboxInfoShow,title:"详情",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){v(c)}}}},title:{text:c.titleText,subText:c.titleSubtext,textStyle:{fontSize:c.titleFontSize,fontWeight:c.fontWeight,color:c.titleColor},left:c.textAlign},grid:{top:c.gridTop,bottom:c.gridBottom,left:c.gridLeft,right:c.gridRight,containLabel:c.gridContainLabel},color:c.colors,tooltip:{trigger:"axis",textStyle:{fontSize:vn.value,color:c.tooltipTextStyleColor},show:c.tooltipShow,formatter:ir=>{var dr;const ur=ir.length;let or="",sr=c.tooltipFormatter;Pn=(dr=ir[0])==null?void 0:dr.data,sr===""&&(sr="{marker} {a} {c}");for(let Xn=0;Xn<ur;Xn++){const{marker:lr,seriesName:hr,name:vr,value:yr,data:br}=ir[Xn]||{};if(Xn===0){let pr=vr;typeof vr=="string"&&vr[0]==="0"&&!isNaN(+vr)&&(pr=(+vr).toString()),or+=`${Fn(er,pr)}<br/>`}or+=hn(sr,{textData:{marker:lr,name:vr,value:yr,a:hr,b:vr,c:yr||0,...br}},{useNewline:!0,useSpace:!0}),or+="<br/>"}return or},position:c.tooltipPosition||void 0},xAxis:{type:"category",boundaryGap:c.isBoundaryGap,data:vue.unref(re).map(ir=>{let ur={};return ir&&typeof ir=="object"?ur={...ir}:ur={value:ir},ur}),minInterval:c.xAxisMinInterval,splitLine:{show:c.xAxisSplitLineShow,lineStyle:{color:c.xAxisSplitLineStyleColor},interval:c.xAxisSplitLineInterval},splitArea:{show:c.xAxisSplitAreaShow},axisLabel:{show:c.xAxisLabelShow,color:c.xAxisLabelColor,interval:c.xAxisLabelInterval||0,rotate:c.xAxisLabelRotate,width:c.xAxisLabelWidth,overflow:c.xAxisLabelOverflow,fontSize:c.xAxisLabelFontSize,formatter(ir){return typeof ir=="string"&&ir[0]==="0"&&!isNaN(+ir)&&(ir=(+ir).toString()),Fn(er,ir)}},axisLine:{show:c.xAxisLineShow,lineStyle:{color:c.xAxisLineStyleColor}},axisTick:{show:c.xAxisTickShow},name:c.xAxisName,nameTextStyle:{fontSize:c.xAxisLabelFontSize,color:c.xAxisLabelColor,align:"left"},max:c.xAxisMaxValue||null},yAxis:{type:"value",minInterval:c.yAxisMinInterval,splitLine:{show:c.yAxisSplitLineShow,lineStyle:{color:c.yAxisSplitLineStyleColor,type:c.yAxisSplitLineType}},splitArea:{show:c.yAxisSplitAreaShow},axisLabel:{show:c.yAxisLabelShow,fontSize:c.yAxisLabelFontSize,color:c.yAxisLabelColor,formatter(ir){return Fn(Kn,ir)}},axisLine:{show:c.yAxisLineAlwaysDisplay,lineStyle:{color:c.yAxisLineStyleColor}},name:c.yAxisName,nameTextStyle:{fontSize:c.yAxisLabelFontSize,color:c.yAxisLabelColor,align:"right"},max:c.yAxisMaxValue||null},legend:{type:c.legendScroll?"scroll":"plain",width:c.legendWidth,height:c.legendHeight,show:c.legendShow,orient:c.legendOrient,top:c.legendTop,left:c.legendLeft,textStyle:{lineHeight:(g.value?ZOOM_FONT_SIZE:parseFloat(c.legendFontSize))+8,rich:{text:{width:c.legendTextWidth,color:c.legendTextStyleColor,fontSize:g.value?ZOOM_FONT_SIZE:c.legendFontSize}}},itemHeight:c.legendItemHeight,itemWidth:c.legendItemWidth,itemGap:c.legendItemGap,data:vue.unref(qn).map(ir=>({name:ir.name,icon:c.legendType})),formatter:ir=>getLegendFormat(c.legendFormatter,{name:ir})},series:vue.unref(b)}}),w=()=>{g.value=!1},{getGlobalModel:J,setGlobalModel:gn}=vue.inject(GLOBAL_MODEL,{getGlobalModel:er=>{},setGlobalModel:(er,Kn)=>{}}),Rn=vue.computed(()=>c.isShowMarkLine?{markLine:{data:[{type:c.markLineType}]}}:{}),zn=(er=[],Kn=!1)=>{var dr;let ir;if(c.dataFieldConfigType==="key"){const Xn=Kn?c.keyTypeDataFieldNames:null;ir=In(er,Xn)}else if(c.dataFieldConfigType==="value"){const Xn=Kn?c.valueTypeDataFieldNames:null;ir=Vn(er,Xn)}re.value=ir.dimensions,qn.value=ir.dataset;const ur=ir.dataset,or=[],sr=ur.length;for(let Xn=0;Xn<sr;Xn++){const lr={};c.shadowColor&&(lr.shadowColor=c.shadowColor,lr.shadowBlur=c.shadowBlur,lr.shadowOffsetY=c.shadowOffsetY,lr.shadowOffsetX=c.shadowOffsetX);let hr=c.colors[Xn];if(!hr&&c.colors.length){const vr=(Xn+1)%c.colors.length-1;hr=vr>0?c.colors[vr]:c.colors[0]}hr||(hr="#5470C6"),or.push({type:"line",...ur[Xn],symbolSize:c.symbolSize,smooth:c.smooth,areaStyle:{color:c.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:hr},{offset:1,color:c.areaGradientColor||"transparent"}],global:!1}:hr,opacity:c.areaStyleOpacity},lineStyle:{width:c.lineStyleWidth,...lr},...vue.unref(Rn)})}b.value=or,(dr=ir.dataset)!=null&&dr.length?d.value=!1:d.value=!0},Wn=(er=[],Kn,ir=!1)=>{var lr,hr,vr;const or=In(er,ir?Kn:null,!0);if(c.defaultRangeValue&&setDefaultRangeVal({props:c,componentList:vue.unref(p),getGlobalModel:J},or),(lr=or.dataset)!=null&&lr.length){for(const yr of or.dataset)if((hr=yr.data)!=null&&hr.length)for(const br of yr.data)(br.value===null||br.value===void 0)&&(br.value=0)}re.value=or.dimensions,qn.value=or.dataset;const sr=or.dataset,dr=[],Xn=sr.length;for(let yr=0;yr<Xn;yr++){const br={};c.shadowColor&&(br.shadowColor=c.shadowColor,br.shadowBlur=c.shadowBlur,br.shadowOffsetY=c.shadowOffsetY,br.shadowOffsetX=c.shadowOffsetX);let pr=c.colors[yr];if(!pr&&c.colors.length){const mr=(yr+1)%c.colors.length-1;pr=mr>0?c.colors[mr]:c.colors[0]}pr||(pr="#5470C6"),dr.push({type:"line",...sr[yr],symbolSize:c.symbolSize,smooth:c.smooth,areaStyle:{color:c.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:pr||yr%(c.colors.length||1)},{offset:1,color:c.areaGradientColor||"transparent"}],global:!1}:pr,opacity:c.areaStyleOpacity},lineStyle:{width:c.lineStyleWidth,...br},...vue.unref(Rn)})}b.value=dr,(vr=or.dataset)!=null&&vr.length?d.value=!1:d.value=!0};vue.watch(()=>[c.data,c.symbolSize,c.smooth,c.lineStyleWidth,c.areaStyleOpacity,c.areaGradientShow,c.areaGradientColor,c.shadowColor,c.shadowBlur,c.shadowOffsetY,c.shadowOffsetX,c.legendFontSize,c.isShowMarkLine,c.markLineType,c.legendFormatter,c.legendWidth,c.legendHeight,c.legendTextWidth,c.legendScroll],([er])=>{(c.dataType==="static"||vue.unref(f)==="design")&&zn(er)},{immediate:!0,deep:!0});const Yn=vue.ref(!1),Jn=useRequestData(c),tr=async()=>{var er,Kn;if(c.dataType==="request")try{Yn.value=!0;const ir=await Jn();zn((Kn=(er=ir==null?void 0:ir.data)==null?void 0:er.data)==null?void 0:Kn.rows,!0)}catch(ir){console.error(ir)}finally{Yn.value=!1}},nr=useEmitEvent(c);gn(c.id,{type:c.type,RECORD:""});const Qn=nr("click",er=>{const Kn=J(c.id);gn(c.id,{...Kn,type:c.type,RECORD:c.tooltipShow?Pn:er.data})}),ar=er=>{m.value.chart.containPixel("grid",[er.offsetX,er.offsetY])&&Qn()};c.isForbidClick||(c.tooltipShow?j.value["zr:click"]=ar:j.value.click=Qn);const cr=er=>{var dr;const{columns:Kn=[],rows:ir=[]}=((dr=er==null?void 0:er.data)==null?void 0:dr.data)??{};let ur;Kn.length>0&&(ur={name:Kn[0],types:Kn.slice(1).map(Xn=>({label:Xn,value:Xn}))});const{leftAxisList:or=[]}=c.graphicConfig,sr=or.filter(Xn=>Xn.show).map(Xn=>Xn.label);for(const Xn of ir)if(Xn)for(const lr in Xn)typeof Xn[lr]=="string"&&sr.includes(lr)&&!isNaN(parseFloat(Xn[lr]))&&(Xn[lr]=parseFloat(Xn[lr]));Wn(ir,ur,!0)},fr=useIndicatorData(c,er=>{c.isViewRedrawing&&m.value.clear(),cr(er)}),Gn=async()=>{try{Yn.value=!0;const er=await fr();cr(er)}catch(er){console.error(er)}finally{Yn.value=!1}},Zn=async()=>{switch(c.dataType){case"indicator":await Gn();break;case"request":await tr();break}};useOnEvent(c,{refreshData:Zn,resetRecord:()=>{const er=c.id,Kn=J(er);gn(er,{...Kn,RECORD:""})},click:Qn});const{setRequest:Un}=vue.inject(REQUEST_MODEL,{setRequest:er=>{}});return typeof Un=="function"&&Un({id:c.id,requestFn:Zn,sortNum:c.requestSort}),u({refreshData:Zn}),{option:Bn,style:y,click:Qn,loading:Yn,onClose:w,ecanModal:x,eventObj:j,echartRef:m,emptyData:d}}}),Line_vue_vue_type_style_index_0_lang="",Line_vue_vue_type_style_index_1_scoped_fadf491b_lang="";function _sfc_render$D(c,u,d,f,h,v){const p=vue.resolveComponent("echarts"),m=vue.resolveComponent("spin"),g=vue.resolveComponent("ecan-modal");return vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(c.style)},[vue.createVNode(m,{spinning:c.loading},{default:vue.withCtx(()=>[c.noDataTip&&c.emptyData?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"empty-wrap",style:vue.normalizeStyle({color:c.tipTextColor,fontSize:c.tipTextFontSize})},[vue.createElementVNode("span",null,vue.toDisplayString(c.tipText),1)],4)):(vue.openBlock(),vue.createBlock(p,vue.mergeProps({key:1,ref:"echartRef",option:c.option,autoresize:""},vue.toHandlers(c.eventObj)),null,16,["option"]))]),_:1},8,["spinning"]),vue.createVNode(g,{width:"1920px",height:"1080px",ref:"ecanModal",onClose:c.onClose},{default:vue.withCtx(()=>[vue.createVNode(m,{class:"spin-wrap",spinning:c.loading},{default:vue.withCtx(()=>[vue.createVNode(p,{option:c.option,"update-options":{notMerge:!0},autoresize:""},null,8,["option"])]),_:1},8,["spinning"])]),_:1},8,["onClose"])],4)}const Line=_export_sfc$1(_sfc_main$y,[["render",_sfc_render$D],["__scopeId","data-v-fadf491b"]]),EcanLine=withInstall$1(Line);let random=c=>crypto.getRandomValues(new Uint8Array(c)),customRandom=(c,u,d)=>{let f=(2<<Math.log(c.length-1)/Math.LN2)-1,h=-~(1.6*f*u/c.length);return(v=u)=>{let p="";for(;;){let m=d(h),g=h;for(;g--;)if(p+=c[m[g]&f]||"",p.length===v)return p}}},customAlphabet=(c,u=21)=>customRandom(c,u,random),nanoid=(c=21)=>crypto.getRandomValues(new Uint8Array(c)).reduce((u,d)=>(d&=63,d<36?u+=d.toString(36):d<62?u+=(d-26).toString(36).toUpperCase():d>62?u+="-":u+="_",u),"");const _sfc_main$x=vue.defineComponent({name:"TrendModal",components:{EcanLine,CloseOutlined:CloseOutlined$1,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1},props:{theme:{type:String,default:"light"}},setup(c,{expose:u}){const d=vue.ref(!1),f=vue.ref(),h=vue.ref(),v=vue.ref(!0),p=vue.ref({}),m=vue.ref(!0),g=vue.inject("isMobile",!1),y=async({data:Bn,pageConfig:w,unitText:J})=>{if(Bn){v.value=!0,p.value=w;const{graphicConfig:gn}=Bn,Rn=nanoid(6),zn={source:"INDICATOR_LIB",dataSourceId:"",idxLibMode:"",classificationList:[{id:"3f5bda70a08a442085857adb7fc547de",indexCode:null,indexCodeNum:null,title:"日期",name:"the_date",label:"日期",typeGuid:"the_date",genericType:"DATE",hrpIndexComplexid:"the_date",scope:"BUILT_IN_DIM",fromTable:"hrp_index_complex",parentId:"3f5bda70a08a442085857adb7fc547de",show:!0,edit:!1,dataTo:"0",dateFormat:"YYYY-MM",dataSetParams:{}}],leftAxisList:(gn==null?void 0:gn.indicators)||[],controlList:(gn==null?void 0:gn.controlList)||[],variableList:(gn==null?void 0:gn.variableList)||[],variableConditions:(gn==null?void 0:gn.variableConditions)||[]};f.value={...lodashEs.cloneDeep(lineProps),id:Rn,keyName:`折线图_${Rn}`,position:"relative",top:0,left:0,width:vue.unref(g)||vue.unref(v)?"100%":parseFloat(w.width)*.57+"px",height:vue.unref(g)||vue.unref(v)?"100%":parseFloat(w.height)*.4+"px",dataType:"indicator",tooltipFormatter:"{marker} {a} {c}"+J,xAxisLabelRotate:45,yAxisLabelFormatter:J?`{value}${J}`:"{value}",isForbidClick:!0,graphicConfig:zn},d.value=!0,vue.nextTick(()=>{x(!0),vn(!0),vue.unref(h).refreshData()})}},b=()=>document.querySelector("#modalContainer")||document.body,re=vue.computed(()=>{let Bn="trend-modal";return vue.unref(g)?Bn+=" mobile":v.value&&(Bn+=" full"),c.theme==="darkBlue"&&(Bn+=" darkBlue"),Bn});vue.watch(d,Bn=>{Bn?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"}),vue.watch(v,Bn=>{m.value=!1,vue.unref(f).width=Bn?"100%":parseFloat(vue.unref(p).width)*.57+"px",vue.unref(f).height=Bn?"100%":parseFloat(vue.unref(p).height)*.4+"px",vue.nextTick(()=>{m.value=!0,vue.nextTick(()=>{vue.unref(h).refreshData()})})});const x=Bn=>{const w=document.querySelector(".trend-modal .ant-modal-header");w&&(Bn?w.addEventListener("dblclick",Pn):w.removeEventListener("dblclick",Pn))},vn=Bn=>{const w=document.querySelector(".trend-modal .ant-modal-header");if(w)if(Bn)w.addEventListener("mousedown",j);else{const J=w.parentElement;J&&(J.style.left="",J.style.top=""),w.removeEventListener("mousedown",j)}};function j(Bn){dragModalAction(Bn,".trend-modal .ant-modal-header")}const Pn=()=>{v.value=!v.value,vue.nextTick(()=>{v.value?vn(!1):vn(!0)})},qn=()=>{x(!1),vn(!1)};return vue.onMounted(()=>{var Bn,w;if(vue.unref(g)){const J=document.querySelector("#modalContainer");v.value=!0,(Bn=J==null?void 0:J.style)==null||Bn.setProperty("--window-screen-width",document.body.clientWidth+"px"),(w=J==null?void 0:J.style)==null||w.setProperty("--window-screen-height",document.body.clientHeight+"px")}}),u({showModal:y}),{visible:d,componentConfig:f,lineRef:h,wrapClassName:re,isMobile:g,isIndFullScreen:v,isRender:m,getContainer:b,toggleFullScreen:Pn,onDetailCancel:qn}}}),TrendModal_vue_vue_type_style_index_0_scoped_a24645dd_lang="",TrendModal_vue_vue_type_style_index_1_lang="",_withScopeId$8=c=>(vue.pushScopeId("data-v-a24645dd"),c=c(),vue.popScopeId(),c),_hoisted_1$o=_withScopeId$8(()=>vue.createElementVNode("div",{class:"modal-title"},"趋势图",-1)),_hoisted_2$e={class:"zoom-btn"};function _sfc_render$C(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("ecan-line"),b=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(b,{visible:c.visible,"onUpdate:visible":u[0]||(u[0]=re=>c.visible=re),width:"60%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,bodyStyle:{maxHeight:c.isMobile||c.isIndFullScreen?"":"70vh",height:c.isMobile||c.isIndFullScreen?"100vh":"",overflow:"auto",padding:"20px 24px 24px"},"wrap-class-name":c.wrapClassName,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[_hoisted_1$o]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["close-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$e,[!c.isMobile&&c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme]),title:"取消全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"])):c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme]),title:"全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"]))]),c.componentConfig&&c.isRender?(vue.openBlock(),vue.createBlock(y,vue.mergeProps({key:0},c.componentConfig,{ref:"lineRef"}),null,16)):vue.createCommentVNode("",!0)]),_:1},8,["visible","getContainer","bodyStyle","wrap-class-name","onCancel"])}const TrendModal=_export_sfc$1(_sfc_main$x,[["render",_sfc_render$C],["__scopeId","data-v-a24645dd"]]),pivotTableProps={...props$1,name:"透视表",keyName:"透视表",width:"800px",height:"400px",type:"ecanPivotTable",graphicConfig:{},dataType:"indicator",data:[],dimensionList:[],indicatorList:[],styleConfig:{borderColor:"#E3E3E3",headerBgColor:"#ECF1F5",headerColor:"#000000",bodyBgColor:"#FFFFFF",bodyColor:"#000000",indicatorsHeaderBgColor:"#ECF1F5",indicatorsHeaderColor:"#000000",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#000000",aggregateBgColor:"#ECF1F5",aggregateColor:"#000000",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"},configMode:"halfMode"},pivotTableComponentProps=transformToComponentProps(pivotTableProps),pivotTableEvents=["refreshData"];var zhCn={exports:{}};(function(c,u){(function(d,f){c.exports=f(dayjs)})(commonjsGlobal,function(d){function f(p){return p&&typeof p=="object"&&"default"in p?p:{default:p}}var h=f(d),v={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(p,m){return m==="W"?p+"周":p+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(p,m){var g=100*p+m;return g<600?"凌晨":g<900?"早上":g<1100?"上午":g<1300?"中午":g<1800?"下午":"晚上"}};return h.default.locale(v,null,!0),v})})(zhCn);const _imports_0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAABE1JREFUaEPdWk1sTUEUdtmxEREWVMtay0LSxoqIhaBsRBC8IIQgCI1/9S+StuI3EWmIIGLTVtiI6IaQWEhqZeHfgpVI2Mnzfc+ZZzrv3ndn5s57rzXJl/vevffMnG/OOTNnZm40IkDJ5/NjUc0SoAGYD9QDk42qP+P/B+AR8B7ojaLoe9bmI98KROm1kN8gir/C9RPwGvgKfDPqnoD/E4HpQB0wU4hcw/WGLxlnAlCcvbwTyAHPgZdy9emLFgjNAni9DnSBCK1jXZwIQPkjqHkj8ERg9rJ1wzHWmYt7xFWQOGpbkRUBKE5z3wR+AN1AKMVNPelm24CRQKuNNVIJQHm6ykngHvDYtmcyvjcP8suAAyBB10osZQmI8hcgfRB4m1EpV/FpEDhBi5QjkUhAlN+HCi7XQHlFliS2AKeTSMQSqHHPm5ZSllgNEj3mwxICErAP8OLZGvZ8HIljuDnDDOw4AgMSrNUKWNvYaMWLzSDQpAsMIoDeb8fDpcAh21qr/N5xtNcDEtSzUIoEZIZ9inuHgUqN81n5cp7o1F1JJ3AeD8YBd7O2UmH55YxNWIEd/dcCkpgxU9wE/HRUYKq8/65KcsoK9UwAFYEdaHwBcNFDiVMisx9XWxIk7SOn1NuKH3c4NygCHHn6AGaXtkUpMUYEaDkbEr5yul7MXpkrNUbiPszjV9pqLu+ZivB2Gok4GVqNxF1d9zZk6kgghx/rAU5crsWFREjlqWcb0EECHH3G06dctXewRGjl2fQK4A0JcOxn6sA48C3lLME6GbAqVvjf1210/RrxZyEJ0P/bgayTVxIJNhpaedbJJG83CeTxg3lGiBJHQq83RM/r9fWFJsDKk0iEVp5tVZVA2hDr4wHBCaS5UGgSBQLcMeN2SSWCmG7D3EUP4lAkGMR7KjmMKp8nAXMYDUGiOIyek14KOZGZAesyY9vGQnEiy0EiZCqRNNqEJlFMJbiz/BFYZUtd3vNJD0KSuAU9pmRJpxmY9G19QWOTVZokfOaHf+k0exMjke+CRpFgNTbKKyMrEhz5XOSUfMmCRrkRt81dh1N9QePihSTBtlzXARzVugruo5aUYoXhsqhfB30HBi3qhUADrsNhW4W936R26P6fjS3lvAjooby12MKFvB5ocXujPI0Zipu73FYsuo4iUUJA4iGHK4Oae6TVPtgwRzImbVR+jdX2uuZKJLEXuFJDElR+M3DG6YDDIFErS6ie3+51xKSR4Hb7JeAhwN27ahSu0bmJG+s2ZYM4TjvZer+PZ78BHvq5zta2pNUx6ygILA5yzKq3LAcgu3CvF+gPSISKLwJ4vNqpH2CkMY8dhcoJiTVIIgc8A/ipwYu0hhKeN+M+PzWYDXBh1W3T684ulOBWTABJgoshfp3Cjz24vuZE+Aswh18G5WiAExG/ZOF8wzOJDoDHRl5frjhboAyZOaKU+txmkvHuF1GYn9uQbL+v0nq9fwCcDKEjLNL6QQAAAABJRU5ErkJggg==",CustomModal_vue_vue_type_style_index_0_scoped_3a641475_lang="",CustomModal_vue_vue_type_style_index_1_lang="";dayjs.locale("zh-cn");const _sfc_main$w=vue.defineComponent({name:"LastDetail",components:{BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1},props:{theme:{type:String,default:"light"}},setup(c,{emit:u,expose:d}){const f=window.screen.height*.6,h=`cutmodal_${nanoid(6)}`,v=vue.ref(!0),p=vue.ref(!1),m=vue.ref(""),g=vue.ref(""),y=vue.ref(""),b=vue.inject("isMobile",!1);vue.computed(()=>INDICATOR_URL);const re=()=>document.querySelector("#modalContainer")||document.body,x=Rn=>{const zn=document.querySelector(`.${h} .ant-modal-header`);if(zn)if(Rn)zn.addEventListener("mousedown",j);else{const Wn=zn.parentElement;Wn&&(Wn.style.left="",Wn.style.top=""),zn.removeEventListener("mousedown",j)}},vn=Rn=>{const zn=document.querySelector(`.${h} .ant-modal-header`);zn&&(Rn?zn.addEventListener("dblclick",Pn):zn.removeEventListener("dblclick",Pn))},j=Rn=>{dragModalAction(Rn,`.${h} .ant-modal-header`)},Pn=()=>{v.value=!v.value,vue.nextTick(()=>{v.value?x(!1):x(!0)})},qn=()=>{vn(!1),x(!1),u("close")};async function Bn(Rn){var Jn;p.value=!0,(Jn=window==null?void 0:window.config)!=null&&Jn.indicatorToken;const{record:zn,linkUrl:Wn,title:Yn}=Rn;if(y.value=Yn,Wn){v.value=!0,m.value=Wn;const tr=[],nr=["orgCode","visitId","mpiId"];for(const Qn in zn)nr.includes(Qn)&&tr.push(`${Qn}=${zn[Qn]}`);g.value=tr.join("&")}vue.nextTick(()=>{vn(!0)})}const w=vue.computed(()=>{let Rn=`custom-content-modal ${h}`;return(vue.unref(b)||v.value)&&(Rn+=" full"),c.theme==="darkBlue"&&(Rn+=" darkBlue"),Rn}),J=vue.computed(()=>vue.unref(b)?{padding:"10px 0"}:{height:vue.unref(v)?"":f+48+"px",overflow:"hidden"}),gn=()=>{p.value=!1,qn()};return d({showModal:Bn,visible:p}),{visible:p,wrapClassName:w,detailBodyStyle:J,isMobile:b,urlJsonStr:g,linkUrl:m,isIndFullScreen:v,modalTitle:y,handleClose:gn,getContainer:re,onCancel:qn,toggleFullScreen:Pn}}}),_withScopeId$7=c=>(vue.pushScopeId("data-v-3a641475"),c=c(),vue.popScopeId(),c),_hoisted_1$n=_withScopeId$7(()=>vue.createElementVNode("img",{src:_imports_0,alt:"",width:"100%",height:"100%"},null,-1)),_hoisted_2$d=[_hoisted_1$n],_hoisted_3$7=["src"];function _sfc_render$B(c,u,d,f,h,v){const p=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(p,{wrapClassName:c.wrapClassName,visible:c.visible,"onUpdate:visible":u[1]||(u[1]=m=>c.visible=m),width:"60%",destroyOnClose:!0,footer:null,bodyStyle:c.detailBodyStyle,getContainer:c.getContainer,closable:!1,onCancel:c.onCancel},{default:vue.withCtx(()=>[vue.createElementVNode("div",{class:"custom-close-icon",onClick:u[0]||(u[0]=(...m)=>c.handleClose&&c.handleClose(...m))},_hoisted_2$d),c.linkUrl&&c.urlJsonStr?(vue.openBlock(),vue.createElementBlock("iframe",{key:0,src:`${c.linkUrl}${c.linkUrl.includes("?")?"&":"?"}${c.urlJsonStr}`,frameborder:"0",width:"100%",height:"100%"},`\r
|
|
103
|
-
`,8,_hoisted_3$7)):vue.createCommentVNode("",!0)]),_:1},8,["wrapClassName","visible","bodyStyle","getContainer","onCancel"])}const CustomModal=_export_sfc$1(_sfc_main$w,[["render",_sfc_render$B],["__scopeId","data-v-
|
|
102
|
+
`;let v=c;if(d!=null&&d.length){for(const m of d){const g=hn(m,{textData:u},{useNewline:!1,useSpace:!1});g&&(v=v.replace(m,g))}return`${h}{text|${v}}`}else return c},setDefaultRangeVal=(c,u)=>{const{props:d,componentList:f,getGlobalModel:h}=c,{graphicConfig:v={},startValue:p,endValue:m}=d,g=getdefCompleteData({graphicConfig:v,startValue:p,endValue:m,componentList:f,getGlobalModel:h}),{dimensions:y,dataset:b}=u,{classificationList:re=[]}=v,vn=re.find(j=>j.show).label||"";for(const j of g)!y.find(Pn=>+Pn==+j)&&!isNaN(+j)&&y.push(+j);y.sort((j,Pn)=>dayjs(j).isBefore(dayjs(Pn))?-1:1);for(const j of b){const{data:Pn}=j;if(Pn!=null&&Pn.length){const qn=[];for(const Bn of g)if(!Pn.find(w=>+w[vn]==+Bn)&&!isNaN(+Bn)){const w=lodashEs.cloneDeep(Pn[0]);for(const J in w)J===vn?w[J]=+Bn:w[J]=0;qn.push(w)}j.data.push(...qn),j.data.sort((Bn,w)=>dayjs(Bn[vn]).isBefore(dayjs(w[vn]))?-1:1)}}};function getdefCompleteData(c){const{startValue:u,endValue:d,componentList:f,graphicConfig:h,getGlobalModel:v}=c,p=getVariableAndField(u),m=getVariableAndField(d),g=[];if(p&&m){const y=f.find(re=>re.keyName===p.keyName),b=f.find(re=>re.keyName===m.keyName);if(y&&b){const re=v(y.id),x=v(b.id),{classificationList:vn=[]}=h,j=vn.find(Pn=>Pn.show);if(j){let Pn="YYYY-MM";switch(j.name){case"the_year":Pn="YYYY";break;case"the_month":Pn="MM";break;case"the_day":Pn="DD";break;case"the_date":Pn=(j==null?void 0:j.dateFormat)||Pn;break}const qn=getFormatStep(Pn);if(Pn){const Bn=vue.unref(re[p.field]),w=vue.unref(x[m.field]);let J=dayjs(Bn);const gn=dayjs(w);for(g.push(gn.format(Pn));J.isBefore(gn);)g.push(J.format(Pn)),J=J.add(1,qn)}}}}return g}function getVariableAndField(c){let u=null;if(c){const d=c.match(/\{(.+?)\}/g);if(d!=null&&d.length){let f=d[0].slice(1,-1).trim();const h=f.match(/\[(.+?)\]/g);let v="";h!=null&&h.length&&(f=f.replace(h[0],""),v=h[0].slice(1,-1).trim()),u={keyName:f,field:v}}}return u}function getFormatStep(c){const u=c.split("-");let d="";if(u!=null&&u.length)switch(u[u.length-1]){case"YYYY":d="year";break;case"MM":d="month";break;case"DD":d="day";break}return d}function handleJumpLink(c,u){var re;const{pageMode:d,targetTemplate:f,getRecordValueByKeyName:h,setTemplateData:v}=u,p=c.linkPage||"",m=usePageUrl(d,p),g=c.href;let y=g||m;y=hn(y);const b=c.target;if(b)if(b==="event")window.parent.postMessage({type:"openPage",url:g},"*");else{const x={pageId:p,componentId:f};if((re=c.transParams)!=null&&re.length){y.includes("?")?y+="&":y+="?";const vn=[];for(const j of c.transParams){const Pn=h(String(j.fieldName));vn.push(`${j.keyName}=${Pn}`),x[j.keyName]=Pn}y+=vn.join("&")}b==="template"?(Object.prototype.hasOwnProperty.call(window,"oldPageId")||(window.oldPageId=""),window.oldPageId&&(window.controller.abort(),window.controller=new AbortController),window.oldPageId=p,v(x)):(b==="blank"&&(y+=`${y.includes("?")?"&":"?"}drillFlag=1`),window.open(y,"_"+b))}}function getPageUrlParams(c){var d,f;let u={};if(c){const h=(((d=window.config)==null?void 0:d.urlParams)||{})[c]||{};for(const v in h)v.includes("{")||(u[v]=h[v])}else u=((f=window.config)==null?void 0:f.requestParams)||{};return u}function getNewValueFromUrlParams(c,u,d){let f="";const{urlParams:h}=window.config;if(c&&h[c])for(const v in h[c]){const p=h[c][v];if(v===`{${u}[${d}]}`&&p){f=p;break}}return f}function getFormatWh(c,u){return typeof c=="number"?c:typeof c=="string"?parseFloat(c):c.suffix==="px"?+c.value:c.suffix==="%"?parseFloat(u)*(c.value/100):0}const hasChinese=c=>/[\u4e00-\u9fa5]/.test(c),dragModalAction=(c,u)=>{const d=document.querySelector(u);if(!d)return;d.style.cursor="move",d.style.userSelect="none";const f=d.parentElement,h=200,v=f.getBoundingClientRect(),{width:p,left:m,top:g}=v,y=window.innerWidth,b=window.innerHeight,re=c.clientX,x=c.clientY,vn=parseFloat(f.style.left)||0,j=parseFloat(f.style.top)||0,Pn=-(m+p-h-vn),qn=y-m+vn-h,Bn=-(g-j),w=b-g+j-h,J=Rn=>{Rn.preventDefault();const zn=Rn.clientX-re,Wn=Rn.clientY-x;let Yn=vn+zn,Jn=j+Wn;Yn=Math.max(Pn,Math.min(Yn,qn)),Jn=Math.max(Bn,Math.min(Jn,w)),f.style.left=`${Yn}px`,f.style.top=`${Jn}px`},gn=()=>{d.style.cursor="",d.style.userSelect="",document.removeEventListener("mousemove",J),document.removeEventListener("mouseup",gn)};document.addEventListener("mousemove",J),document.addEventListener("mouseup",gn)},getPageId=()=>{var u;let c=((u=window==null?void 0:window.config)==null?void 0:u.pageId)||"";if(!c){const{pathname:d}=window==null?void 0:window.location;if(d){const f=d.split("/");f!=null&&f.length&&(c=f[f.length-1])}}return c};function loopConditions(c,u,d){const f=[];for(const h of c)h[u]?f.push(...loopConditions(h[u],u,d)):h.filter?f.push({...h.filter,label:h.label}):(!d||h.dataType!=="component"&&!(h.fieldValue.startsWith("${")&&h.fieldValue.endsWith("}")))&&f.push(h);return f}function isThousandWithUnit(c){if(typeof c!="string")return!1;const u=c.trim();return/^(\d{1,3}(,\d{3})*)(\.\d+)?([^\d].*)?$/.test(u)}function isValidDateStr(c){if(!c)return!1;const u=new Date(c);return u instanceof Date&&!isNaN(u.getTime())}function swapArrItem(c,u,d){return u<0||d<0||u>=c.length||d>=c.length||([c[u],c[d]]=[c[d],c[u]]),c}const useRequestData=(c,u,d=()=>{})=>{var ar;const{requestUrl:f,requestMethod:h,requestHeaders:v,requestParams:p,requestInterval:m,isOpenRequestTimer:g,openCustomRequestData:y,projectRequestUrl:b="",getModel:re,requestParamsMode:x,customRequestParams:vn,dataSetParam:j,requestType:Pn,dataType:qn,dataSetchecked:Bn}=c,{pageMode:w}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"})||{},{pageId:J}=vue.inject("templateOperate",{pageId:""})||{},{contextRequestUrl:gn,touchEventId:Rn}=vue.inject(GLOBAL_CONFIG,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:zn}=vue.inject(GLOBAL_MODEL,{getGlobalModel:cr=>{}})||{},Wn=vue.inject(COMMON_OPERATE,{operateAction:(cr,fr)=>{}}),Yn=re||zn;let Jn=hn(f),tr=vue.unref(gn)||b||"";(qn==="request"&&Bn||Pn===1)&&(tr="",Jn=((ar=window.config)==null?void 0:ar.dataSetUrl)||"/api/datav/dataset/data2");const nr=async(cr={},fr={})=>{var or;if(vue.unref(w)==="design")return;if(qn!=="request"&&Qn){clearInterval(Qn);return}if(!Jn||!h||!v)return;let Gn={};for(const sr of p){const{key:dr,value:Xn}=sr;if((Xn==null?void 0:Xn.id)==="PARENT"&&(Xn!=null&&Xn.prop)){const hr=(((or=window.config)==null?void 0:or.record)||{})[Xn.prop];if(hr){const vr=hr[Xn.propKey||"value"];vr&&(["date","range"].some(br=>yn(hr==null?void 0:hr.type,br))?Gn[dr]=vue.unref(vr).format(hr.format||"YYYY-MM-DD"):Gn[dr]=vue.unref(vr))}continue}if(typeof Xn=="object"&&Xn!=null&&Xn.id){let lr={};const{id:hr,prop:vr,propKey:yr,operate:br}=Xn;let pr=!1;try{JSON.parse(hr),pr=!0}catch{pr=!1}hr==="THIS"?lr=Yn(vue.unref(Rn))||{}:lr=Yn(hr)||{};const mr=vue.unref(lr[vr]);let Er=null;if(["date","range"].some(Cr=>yn(lr==null?void 0:lr.type,Cr))){const{value:Cr,type:xr,mode:Ar}=br||{};if(Cr&&xr&&Ar)switch(xr){case"add":Er=vue.unref(mr).add(Cr,Ar);break;case"minus":Er=vue.unref(mr).subtract(Cr,Ar);break}Er==null&&(Er=vue.unref(mr)),Er=Er&&(Er==null?void 0:Er.format((yr==null?void 0:yr.trim())||lr.format))||""}else if(Object.prototype.toString.call(mr)==="[object Object]")yr?Er=mr[yr]:Er=vr?mr[vr]:mr;else if(yn(lr==null?void 0:lr.type,"select")&&vue.unref(mr)&&vr&&Array.isArray(vue.unref(mr)))Er=vue.unref(mr).map(Cr=>Object.prototype.hasOwnProperty.call(Cr,vr)?Cr[vr]:Cr);else if(pr){const Cr=JSON.parse(hr);console.log(Cr,"urlvalue"),Er=Cr.value}else Er=mr;Gn[dr]=Er}else typeof Xn=="object"&&!Xn.id&&Pn===1?(console.log(Xn.propKey,"value.propKey"),Gn[dr]=Xn.propKey):typeof Xn=="string"&&(Gn[dr]=hn(Xn))}if(Pn===1){console.log(Gn,"_params");const sr=Object.entries(Gn);let dr=j;if(!j.param&&Array.isArray(j)){const Xn={};for(const lr of j)Xn[lr.key]=lr.value;dr=Xn}dr.param=dr.param.map((Xn,lr)=>({...Xn,paramKey:sr[lr][0],defaultValue:sr[lr][1]||""})),Gn=dr}if(x==="2"&&vn!=="{}"){const sr=JSON.parse(vn);Zn(sr),sr&&(Gn=sr)}function Zn(sr){const dr={...Gn,...getPageUrlParams(J)};if(Array.isArray(sr))sr.forEach((Xn,lr)=>{if(typeof Xn=="string"){const hr=Xn.match(/\${(.+?)\}/g);if(hr!=null&&hr.length){const vr=hr[0].slice(2,-1);vr&&dr[vr]?sr[lr]=dr[vr]:sr[lr]=""}}else Zn(Xn)});else if(Object.prototype.toString.call(sr)==="[object Object]")for(const Xn in sr)if(typeof sr[Xn]=="string"){const lr=sr[Xn].match(/\${(.+?)\}/g);if(lr!=null&&lr.length){const hr=lr[0].slice(2,-1);hr&&dr[hr]?sr[Xn]=dr[hr]:sr[Xn]=""}}else Zn(sr[Xn])}const Hn=getPageUrlParams(J);for(const sr in Hn)Hn[sr]&&(Hn[sr]=decodeURIComponent(Hn[sr]));if(Gn={...Hn,...cr,...Gn},fr){const{callback:sr,pageParams:dr}=fr;dr&&(Gn={...Gn,...dr}),sr&&sr(Gn)}let Un="";const er=Object.keys(Gn),Kn=er.length-1,ir=er.length;er.forEach((sr,dr)=>{let Xn=Gn[sr];Object.prototype.toString.call(Xn)==="[object Object]"&&(Xn=JSON.stringify(Xn)),dr===0?ir!==1?Un+=`?${sr}=${Xn}&`:Un+=`?${sr}=${Xn}`:dr===Kn?Un+=`${sr}=${Xn}`:Un+=`${sr}=${Xn}&`}),Jn.includes("?")&&(Un=Un.replace("?","&"));function ur(sr){var dr;if(Pn===1)return{Authentication:(dr=window==null?void 0:window.config)==null?void 0:dr.indicatorToken};if(typeof sr=="string"){const Xn=JSON.parse(sr),lr=getPageUrlParams(J);if(Object.prototype.toString.call(Xn)==="[object Object]"){for(const hr in Xn)if(typeof Xn[hr]=="string"){const vr=Xn[hr].match(/\${(.+?)\}/g);if(vr!=null&&vr.length){const yr=vr[0].slice(2,-1);yr&&lr[yr]?Xn[hr]=lr[yr]:Xn[hr]=""}}}return Xn}else return sr}try{const sr=["get","head"].includes(h),dr={};let Xn=sr?Jn+Un:Jn;Gn.dataSqlId&&!Xn.includes("dataSqlId")&&(Xn+=`${Xn.includes("?")?"&":"?"}dataSqlId=${Gn.dataSqlId}`),Object.prototype.hasOwnProperty.call(Gn,"signal")?dr.signal=Gn.signal:window.controller&&(dr.signal=window.controller.signal);const lr=await request({baseURL:tr,url:Xn,method:h,headers:v?ur(v):{},data:sr?{}:Gn,...dr});return d(lr),Wn==null||Wn.operateAction("SAVE_COMPONENT_RES_DATA",{id:c.id,data:(lr==null?void 0:lr.data)||{}}),lr}catch(sr){console.error(sr)}},Qn=vue.unref(w)!=="design"&&g&&(y||y===void 0)&&setInterval(nr,m*1e3);return vue.onUnmounted(()=>{clearInterval(Qn)}),nr},useImagePath=(c,u=!1)=>{var f;if(!c)return c;let d="";return c!=null&&c.includes("://")?d=c:d=((f=window==null?void 0:window.config)==null?void 0:f.uploadPath)+c,u&&(d=`url(${d})`),d},usePageUrl=(c,u)=>{const d=`${BASE_URL}/preview?pageId=${u}`,f=`${BASE_URL}/${u}`;return c==="preview"?d:f},useIndicatorData=(c={},u=()=>{})=>{var re;const{pageMode:d}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:f}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:h}=vue.inject(LOADED_DATA,{setLoadedData:(x,vn)=>{}}),{getAllGlobalModel:v}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),{pageId:p}=vue.inject("templateOperate",{pageId:""})||{},m=vue.inject(COMMON_OPERATE,{operateAction:(x,vn)=>{}}),g=vue.inject("componentList",[]);c.dataType==="indicator"&&f();const y=async(x={})=>{var gn,Rn,zn,Wn,Yn;if(vue.unref(d)==="design")return;const vn=v();h(c.id,!1);const j=En({...c,globalModel:vn,allComponentList:vue.unref(g)},x),{url:Pn,...qn}=j||{},{pathname:Bn,search:w}=window==null?void 0:window.location;let J=p||((gn=window==null?void 0:window.config)==null?void 0:gn.pageId);if(!J&&Bn){const Jn=Bn.split("/");Jn!=null&&Jn.length&&(J=Jn[Jn.length-1])}if(Pn&&qn){let Jn,tr;if(c.type==="ecanIndexPanel"&&(Jn=c.theFlag),["/diagram/formData","/diagram"].includes(Pn)){tr={};const Qn=w.slice(1,w.length).split("&");for(const ar of Qn)if(ar){const cr=ar.split("=");if(cr[0])if(cr[0]==="userInfo")try{tr.token=(zn=(Rn=JSON.parse(decodeURIComponent(cr[1])))==null?void 0:Rn.baseInfo)==null?void 0:zn.hrpToken}catch(fr){console.log(fr)}else tr[cr[0]]=cr[1]}}try{const nr=await request({url:`${INDICATOR_URL}${Pn}`,method:"post",headers:{Authentication:(Wn=window==null?void 0:window.config)==null?void 0:Wn.indicatorToken,operateContext:CONTEXT},data:{...qn,pageId:J,theFlag:Jn,extParam:tr},signal:((Yn=window.controller)==null?void 0:Yn.signal)||""});return x!=null&&x.isTimer&&u(nr),m==null||m.operateAction("SAVE_COMPONENT_RES_DATA",{id:c.id,data:(nr==null?void 0:nr.data)||{}}),c.type==="ecanIndexPanel"&&(m==null||m.operateAction("SAVE_INDEX_PANEL_REQ_PARAMS",qn)),nr}catch(nr){console.error(nr)}}},b=vue.unref(d)!=="design"&&((re=c==null?void 0:c.graphicConfig)==null?void 0:re.pageMode)!=="design"&&c.isOpenRequestTimer&&c.requestInterval&&setInterval(()=>{y({isTimer:!0})},c.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(b)}),y},useHrefParamsToGlobalVariables=()=>{const u=window.location.search.slice(1).split("&"),d=u.length,f={};for(let h=0;h<d;h++){const v=u[h];if(v==null||v==="")continue;const p=v.split("=");if(Array.isArray(p)){const m=p[0];m.includes("{")||(f[m]=p[1])}}window.config.requestParams={...window.config.requestParams,...f},window.config={...window.config,...f}},_sfc_main$C=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps,pageId:{type:String,default:""},customId:{type:String,default:"container"},portId:{type:String,default:"norPageConfig"}},setup(c){const{width:u,height:d,isCompatible:f}=vue.inject(GLOBAL_CONFIG,{width:null,height:null,isCompatible:null}),h=vue.inject("setPageHeight",zn=>{}),v=vue.inject("isMobile",!1),p=vue.computed(()=>{const zn={};return(!f.value||!v)&&(zn.width=u.value,zn.height=d.value),{...zn,backgroundColor:c.pageId?"transparent":c.backgroundColor,backgroundImage:useImagePath(c.backgroundImage,!0),backgroundSize:c.backgroundSize}}),m=vue.ref(0),g=vue.ref(0),y=vue.ref(0),b=vue.ref(0),re=vue.ref(!1),x=vue.ref();let vn;const j=()=>new Promise(zn=>{vue.nextTick(()=>{u.value&&d.value?(m.value=parseFloat(u.value),g.value=parseFloat(d.value)):(m.value=x.value.clientWidth,g.value=x.value.clientHeight),(!y.value||!b.value)&&(y.value=window.screen.width,b.value=window.screen.height),zn()})}),Pn=()=>{m.value&&g.value?(x.value.style.width=`${m.value}px`,x.value.style.height=`${g.value}px`):(x.value.style.width=`${y.value}px`,x.value.style.height=`${b.value}px`)};vue.watch([u,d],async()=>{c.pageId||(await j(),Pn(),Bn(),window.addEventListener("resize",J),gn()),re.value=!0},{immediate:!0});const qn=vue.ref({});vue.provide("scaleValue",qn);const Bn=()=>{if(f.value&&v){x.value.style.width="100%",x.value.style.height="auto",h("auto");return}const zn=document.body.clientWidth,Wn=document.body.clientHeight,Yn=m.value||y.value,Jn=g.value||b.value,tr=zn/Yn;let nr=Wn/Jn;(m.value!==1920||g.value!==1080)&&(nr=g.value/m.value*zn/Jn),qn.value={widthScale:tr,heightScale:nr},x.value&&(x.value.style.transform=`scale(${tr}, ${nr})`),h(qn.value)},w=vue.computed(()=>{var Wn;let zn={};return c.customId==="modalContainer"&&((Wn=vue.unref(qn))!=null&&Wn.heightScale)&&(zn.height=100/vue.unref(qn).heightScale+"vh"),zn}),J=lodashEs.debounce(async()=>{await j(),Bn()},100),gn=()=>{const zn=window.MutationObserver;vn=new zn(J),vn.observe(x.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},Rn=()=>{vn&&(vn.disconnect(),vn.takeRecords(),vn=null)};return vue.onMounted(()=>{re.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",J),Rn()}),{style:p,container:x,ready:re,scaleValue:qn,containerStyle:w}}}),PageConfig_vue_vue_type_style_index_0_scoped_eced44d2_lang="",_hoisted_1$q=["id"],_hoisted_2$g=["id"];function _sfc_render$H(c,u,d,f,h,v){return vue.openBlock(),vue.createElementBlock("div",{class:"page-config-container",id:c.customId,style:vue.normalizeStyle(c.containerStyle),ref:"container"},[c.customId!=="modalContainer"&&(c.ready||c.pageId)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",id:c.portId,style:vue.normalizeStyle(c.style)},[vue.renderSlot(c.$slots,"default",{},void 0,!0)],12,_hoisted_2$g)):vue.createCommentVNode("",!0)],12,_hoisted_1$q)}const PageConfig=_export_sfc$1(_sfc_main$C,[["render",_sfc_render$H],["__scopeId","data-v-eced44d2"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",textColor:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[],events:[],isCompatible:!0,variableList:[],drillingMode:"pivotTable",pivotTableFontSize:"16px",drillDetailUrl:""},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$B=vue.defineComponent({name:"IndicatorDetailModal",components:{BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,ZoomInOutlined:ZoomInOutlined$1,ZoomOutOutlined:ZoomOutOutlined$1,RedoOutlined:RedoOutlined$1},props:{theme:{type:String,default:"light"}},setup(c,{expose:u}){const d=vue.ref(!1),f=vue.ref([]),h=vue.ref(!1),v=vue.ref(),p=vue.ref(!0),m=vue.ref(1),g=vue.inject("isMobile",!1),y=vue.computed(()=>c.theme),b=vue.computed(()=>m.value!==1?{transform:`scale(${m.value})`,transformOrigin:"left top"}:{}),re=async({data:zn,indicatorUrl:Wn,indicatorToken:Yn,context:Jn,pageId:tr})=>{var cr,fr;p.value=!0,h.value=!0,d.value=!0;let nr=[];const{graphicConfig:Qn,theFlag:ar}=vue.unref(zn)||{};if(Qn){const{leftAxisList:Gn=[],rightAxisList:Zn=[],indicators:Hn=[]}=Qn,Un=Gn.concat(Zn).concat(Hn);Un!=null&&Un.length&&(nr=Un.map(er=>({calcType:er.calcType||"COLUMN",columnName:er.name,hrpIndexCode:er.indexCode,hrpIndexCodeNum:er.indexCodeNum,label:er.label,show:er.show,formula:er.formula})))}if(nr!=null&&nr.length)try{const Gn=await request({url:`${vue.unref(Wn)}/diagram/obtainIndicatorInfo`,method:"post",headers:{Authentication:Yn,operateContext:Jn},data:{source:"INDICATOR_LIB",pageId:tr,indicatorList:nr,theFlag:ar}}),Zn=((cr=Gn==null?void 0:Gn.data)==null?void 0:cr.data)||[];(fr=Zn[0])!=null&&fr.remark?(v.value=Zn[0].remark,f.value=[]):(v.value=null,f.value=Zn)}catch{}finally{h.value=!1}vue.nextTick(()=>{j(!0),Pn(!0)})},x=()=>document.querySelector("#modalContainer")||document.body,vn=vue.computed(()=>{let zn="ind-detail-modal";return(p.value||vue.unref(g))&&(zn+=" full",vue.unref(g)&&(zn+=" mobile")),vue.unref(y)==="darkBlue"&&(zn+=" darkBlue"),zn}),j=zn=>{const Wn=document.querySelector(".ind-detail-modal .ant-modal-header");Wn&&(zn?Wn.addEventListener("dblclick",Bn):Wn.removeEventListener("dblclick",Bn))},Pn=zn=>{const Wn=document.querySelector(".ind-detail-modal .ant-modal-header");if(Wn)if(zn)Wn.addEventListener("mousedown",qn);else{const Yn=Wn.parentElement;Yn&&(Yn.style.left="",Yn.style.top=""),Wn.removeEventListener("mousedown",qn)}};function qn(zn){dragModalAction(zn,".ind-detail-modal .ant-modal-header")}const Bn=()=>{p.value=!p.value,vue.nextTick(()=>{p.value?Pn(!1):Pn(!0)})},w=()=>{j(!1),Pn(!1)},J=()=>{m.value+=.5},gn=()=>{vue.unref(m)>1&&(m.value-=.5)},Rn=()=>{m.value=1};return vue.watch(m,zn=>{localStorage.setItem("indDetailZoom",String(zn))}),vue.watch(d,zn=>{zn?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"}),vue.onMounted(()=>{var Wn,Yn;const zn=localStorage.getItem("indDetailZoom");if(zn&&(m.value=+zn),vue.unref(g)){const Jn=document.querySelector("#modalContainer");p.value=!0,(Wn=Jn==null?void 0:Jn.style)==null||Wn.setProperty("--window-screen-width",document.body.clientWidth+"px"),(Yn=Jn==null?void 0:Jn.style)==null||Yn.setProperty("--window-screen-height",document.body.clientHeight+"px")}}),u({showModal:re}),{visible:d,dataList:f,isLoading:h,hasOwn:mn,remarkData:v,wrapClassName:vn,isIndFullScreen:p,infoStyle:b,indDetailZoom:m,isMobile:g,getContainer:x,toggleFullScreen:Bn,onDetailCancel:w,handleZoomIn:J,handleZoomOut:gn,handleResetZoom:Rn}}}),IndicatorDetailModal_vue_vue_type_style_index_0_scoped_3af47b3e_lang="",IndicatorDetailModal_vue_vue_type_style_index_1_lang="",_withScopeId$9=c=>(vue.pushScopeId("data-v-3af47b3e"),c=c(),vue.popScopeId(),c),_hoisted_1$p=_withScopeId$9(()=>vue.createElementVNode("div",{class:"modal-title"},"指标详情",-1)),_hoisted_2$f={class:"zoom-btn"},_hoisted_3$8={key:0,class:"spin-container"},_hoisted_4$6=["innerHTML"],_hoisted_5$5={class:"index-name"},_hoisted_6$4={key:0,class:"card-row"},_hoisted_7$4=_withScopeId$9(()=>vue.createElementVNode("div",{class:"label"},"计量单位:",-1)),_hoisted_8$4={class:"content"},_hoisted_9$3={key:1,class:"card-row"},_hoisted_10$3=_withScopeId$9(()=>vue.createElementVNode("div",{class:"label"},"指标定义:",-1)),_hoisted_11$3={class:"content"},_hoisted_12$3={key:2,class:"card-row"},_hoisted_13$3=_withScopeId$9(()=>vue.createElementVNode("div",{class:"label"},"计算方法:",-1)),_hoisted_14$3={class:"content"},_hoisted_15$2={key:3,class:"card-row"},_hoisted_16$1=_withScopeId$9(()=>vue.createElementVNode("div",{class:"label"},"指标说明:",-1)),_hoisted_17$1={class:"content"};function _sfc_render$G(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("redo-outlined"),g=vue.resolveComponent("zoom-out-outlined"),y=vue.resolveComponent("zoom-in-outlined"),b=vue.resolveComponent("switcher-outlined"),re=vue.resolveComponent("border-outlined"),x=vue.resolveComponent("a-spin"),vn=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(vn,{visible:c.visible,"onUpdate:visible":u[0]||(u[0]=j=>c.visible=j),width:"55%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,bodyStyle:{maxHeight:c.isIndFullScreen?"":"70vh",height:c.isIndFullScreen?"100vh":"",overflow:"auto",padding:"20px 24px 24px"},"wrap-class-name":c.wrapClassName,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[_hoisted_1$p]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["close-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$f,[c.indDetailZoom>1?(vue.openBlock(),vue.createBlock(m,{key:0,class:"modal-icon",title:"还原",onClick:c.handleResetZoom},null,8,["onClick"])):vue.createCommentVNode("",!0),c.indDetailZoom>1?(vue.openBlock(),vue.createBlock(g,{key:1,class:"modal-icon",title:"缩小内容",onClick:c.handleZoomOut},null,8,["onClick"])):vue.createCommentVNode("",!0),vue.createVNode(y,{class:"modal-icon",title:"放大内容",onClick:vue.withModifiers(c.handleZoomIn,["stop","prevent"])},null,8,["onClick"]),!c.isMobile&&c.isIndFullScreen?(vue.openBlock(),vue.createBlock(b,{key:2,class:vue.normalizeClass(["modal-icon",c.theme]),title:"取消全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"])):c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(re,{key:3,class:vue.normalizeClass(["modal-icon",c.theme]),title:"全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"]))]),c.isLoading?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$8,[vue.createVNode(x,{size:"large"})])):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"info-container",style:vue.normalizeStyle(c.infoStyle)},[c.remarkData?(vue.openBlock(),vue.createElementBlock("div",{key:0,innerHTML:c.remarkData},null,8,_hoisted_4$6)):c.dataList.length?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(c.dataList,(j,Pn)=>(vue.openBlock(),vue.createElementBlock("div",{class:"detail-wrap",key:Pn},[vue.createElementVNode("div",_hoisted_5$5,vue.toDisplayString(j.indexName||"--"),1),c.hasOwn(j,"theUnit")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$4,[_hoisted_7$4,vue.createElementVNode("div",_hoisted_8$4,vue.toDisplayString(j.theUnit||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(j,"meaning")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$3,[_hoisted_10$3,vue.createElementVNode("div",_hoisted_11$3,vue.toDisplayString(j.meaning||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(j,"theFormula")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_12$3,[_hoisted_13$3,vue.createElementVNode("div",_hoisted_14$3,vue.toDisplayString(j.theFormula||"--"),1)])):vue.createCommentVNode("",!0),c.hasOwn(j,"theExplain")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$2,[_hoisted_16$1,vue.createElementVNode("div",_hoisted_17$1,vue.toDisplayString(j.theExplain||"--"),1)])):vue.createCommentVNode("",!0)]))),128)):vue.createCommentVNode("",!0)],4))]),_:1},8,["visible","getContainer","bodyStyle","wrap-class-name","onCancel"])}const IndicatorDetailModal=_export_sfc$1(_sfc_main$B,[["render",_sfc_render$G],["__scopeId","data-v-3af47b3e"]]),lineProps={...props$1,id:"",name:"折线图",keyName:"折线图",type:"ecanLine",width:"400px",height:"400px",top:"",left:"",rotate:"",data:[{name:"名称一",value:235,type:"类型一"},{name:"名称二",value:280,type:"类型一"},{name:"名称三",value:230,type:"类型一"},{name:"名称四",value:335,type:"类型一"}],titleText:"",titleFontSize:"12px",titleColor:"#333",fontWeight:400,textAlign:"left",titleSubtext:"",titleLeft:"",legendShow:!0,legendOrient:"horizontal",legendTextStyleColor:"#333",legendTop:"top",legendLeft:"center",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitAreaShow:!1,xAxisSplitLineInterval:0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineShow:!0,xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitAreaShow:!1,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",valueTypeDataFieldNames:{name:"name",value:"value",type:"type"},keyTypeDataFieldNames:{name:"name",types:[]},dataFieldConfigType:"value",graphicConfig:{},tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,areaGradientShow:!1,areaGradientColor:"",isBoundaryGap:!0,yAxisLabelShow:!0,yAxisSplitLineType:"solid",legendItemGap:10,legendItemWidth:25,legendItemHeight:14,legendType:"",shadowColor:"",shadowBlur:0,shadowOffsetY:0,shadowOffsetX:0,legendFontSize:"12px",xAxisLabelFontSize:"12px",yAxisLabelFontSize:"12px",graphicType:"ecanLine",tooltipPosition:"",isShowMarkLine:!1,markLineType:"average",legendFormatter:"{name}",legendWidth:null,legendHeight:null,legendTextWidth:null,legendScroll:!1,yAxisName:"",xAxisName:"",xAxisMaxValue:null,yAxisMaxValue:null,xAxisLabelShow:!0,tooltipTextStyleColor:"",noDataTip:!1,tipText:"暂无数据",tipTextColor:"#000000",tipTextFontSize:"18px",defaultRangeValue:!1,startValue:"",endValue:"",isForbidClick:!1,backgroundColor:""},lineComponentProps=transformToComponentProps(lineProps),lineEvents=["click","refreshData","resetRecord"],useDownloadFile=async c=>{var g;const u=await request.post(c,{},{responseType:"blob"}),{data:d,headers:f}=u,h=f["content-disposition"].replace(/\w+;filename=(.*)/,"$1"),v=new Blob([d]),p=document.createElement("a"),m=window.URL.createObjectURL(v);p.href=m,p.download=decodeURI(h),p.style.display="none",document.body.appendChild(p),p.click(),(g=p.parentNode)==null||g.removeChild(p),window.URL.revokeObjectURL(m)},modalProps={id:"",type:"ecanModal",title:"",titleFontSize:"14px",titleColor:"",width:"1000px",height:"800px",originalWidth:"1920px",originalHeight:"1080px",backgroundColor:"#fff",backgroundImage:"",backgroundSize:"100% 100%",keyName:"弹窗",componentList:[],fullModal:!1,destroyOnClose:!0,position:"default",closeBtnColor:"#333",isShowCloseBtn:!0,events:[],borderRadius:"0",borderWidth:"0px",borderColor:"",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",allComponentList:[],requestList:[],parentIframeId:"",banScale:!1},modalComponentProps=transformToComponentProps(modalProps),modalEvents=["showModal","hideModal"],containerType=["ecanBorder","ecanTabs","ecanCirculate"];function handleScrollCombinations(c){const{containerMap:u={},sourceList:d=[],pageConfig:f={}}=c,h=lodashEs.cloneDeep(c.componentList),v=h.filter(p=>p.type==="ecanTabs"&&p.isAutoScroll);if(v!=null&&v.length)for(const p of v){const m=u[p.id],g=[];if((!mn(p,"componentList")||!(p!=null&&p.componentList))&&(p.componentList=[]),m){let y=0;for(const b in m){const re=m[b],x=[];if(re!=null&&re.length)for(const vn of re){let j=h.find(Pn=>Pn.id===vn);j||(j=d.find(Pn=>Pn.id===vn)),j&&(x.push(j),containerType.includes(j.type)&&x.push(...getComponentByContainer(j.id,u,d)))}for(const vn of x)mn(vn,"scale")?parseFloat(b)>0&&(vn.left=parseFloat(vn.left)+y+"px"):(vn.left=parseFloat(vn.sourceLeft||vn.left)-parseFloat(p.sourceLeft||p.left)+y+"px",vn.top=parseFloat(vn.sourceTop||vn.top)-parseFloat(p.sourceTop||p.top)+"px"),g.includes(vn.id)||g.push(vn.id);p.componentList.push(...x),y=getMaxLeftInComponents(x,f)}}for(const y of g){const b=h.findIndex(re=>re.id===y);b!==-1&&h.splice(b,1)}}return h}function compatibleMobileList(c){var g,y,b,re,x;const u=["ecanPie","ecanLine","ecanBar","ecanScatter","ecanComboGraph","ecanCustomGraph","ecanRadar","ecanMap","ecanTable"],d=document.body.clientWidth,{combinationMap:f={},sourceList:h=[],pageConfig:v={}}=c,p=c.containerMap,m=lodashEs.cloneDeep([...c.componentList,...getTabsSomeComponentList(p,h)]);if(handleContainerMap(p,m),(g=Object.keys(p))!=null&&g.length||(y=Object.keys(f))!=null&&y.length){for(const Bn in p){const w=m.find(J=>J.id===Bn);if(w){if(w!=null&&w.isFlowGrid){w.sourceLeft=w.left,w.sourceTop=w.top;continue}mn(w,"parentId")||(w.parentId="",w.sourceLeft=w.left,w.sourceTop=w.top);let J;if(w.type==="ecanBorder"&&((b=p[Bn][0])==null?void 0:b.length)===1&&(J=m.find(gn=>gn.id===p[Bn][0][0]),u.includes(J==null?void 0:J.type)||(J=null)),J){if(w.width=d,w.height=getFormatWh(J.height,v==null?void 0:v.height),J.parentId=Bn,J.width=d-20+"px",J.sourceLeft=J.left,J.sourceTop=J.top,J.left="10px",J.top="0px",J.type==="ecanTable"){const{columns:gn=[]}=J;J.scrollX="max-content";for(const Rn of gn)(re=Rn==null?void 0:Rn.width)!=null&&re.includes("%")&&(Rn.width=parseFloat(Rn.width)/100*d+"px")}}else for(const gn in p[Bn])if(p[Bn][gn])for(const Rn of p[Bn][gn]){const zn=m.find(Wn=>Wn.id===Rn);if(zn&&(zn.parentId=Bn,zn.sourceLeft=zn.left,zn.sourceTop=zn.top,zn.left=parseFloat(zn.left)-parseFloat(w.sourceLeft||w.left)+"px",zn.top=parseFloat(zn.top)-parseFloat(w.sourceTop||w.top)+"px",zn.type==="ecanIndexPanel")){const{componentIds:Wn}=zn;for(const Yn of Wn){const Jn=m.find(tr=>tr.id===Yn);Jn&&(Jn.left=parseFloat(Jn.left)-parseFloat(zn.sourceLeft)+"px",Jn.top=parseFloat(Jn.top)-parseFloat(zn.sourceTop)+"px")}}}}}const vn=Array.from(new Set(m.filter(Bn=>(!mn(Bn,"parentId")||Bn.parentId==="")&&Bn.combinationId).map(Bn=>Bn.combinationId))),j=getCombinationList(vn,{...c,componentList:m,pageConfig:v});j!=null&&j.length&&m.unshift(...j);const Pn=m.filter(Bn=>u.includes(Bn.type)&&!mn(Bn,"parentId")),qn=[];for(const Bn of Pn)if(Bn){const w=Bn.id+"_vir";if(qn.push({id:w,keyName:Bn.keyName+"_vir",parentId:"",type:"ecanBorder",borderRadius:"",borderWidth:null,width:d,height:getFormatWh(Bn.height,v==null?void 0:v.height),left:Bn.left,top:Bn.top,sourceLeft:Bn.left,sourceTop:Bn.top}),Bn.parentId=w,Bn.sourceLeft=Bn.left,Bn.sourceTop=Bn.top,Bn.left=10,Bn.top=0,Bn.width=d-20+"px",Bn.type==="ecanTable"){const{columns:J=[]}=Bn;Bn.scrollX="max-content";for(const gn of J)(x=gn==null?void 0:gn.width)!=null&&x.includes("%")&&(gn.width=parseFloat(gn.width)/100*d+"px")}}qn!=null&&qn.length&&m.unshift(...qn);for(const Bn of m){if(Bn.parentId===""&&containerType.includes(Bn.type))Bn.sourceWidth=getFormatWh(Bn.width,v==null?void 0:v.width),Bn.height=(d/(Bn.sourceWidth/getFormatWh(Bn.height,v==null?void 0:v.height))).toFixed(2)+"px",Bn.width="100%",Bn.position="relative",Bn.top="auto",Bn.left="auto";else{const w=m.find(J=>J.id===Bn.parentId);if((w==null?void 0:w.parentId)===""){const J=w.sourceWidth||getFormatWh(w.width,v==null?void 0:v.width),gn=d/J;Bn.scale=gn,Bn.top=parseFloat(Bn.top)*gn-getFormatWh(Bn.height,v==null?void 0:v.height)*(1-gn)/2+"px",Bn.left=parseFloat(Bn.left)*gn-getFormatWh(Bn.width,v==null?void 0:v.width)*(1-gn)/2+"px"}}Bn.type==="ecanModal"&&(Bn.parentId="",Bn.fullModal=!0)}return sortList(m)}return m}function handleContainerMap(c,u){const d=lodashEs.cloneDeep(c),f=u.filter(h=>h.type==="ecanTabs"&&h.isAutoScroll);if(f!=null&&f.length)for(const h of f){const v=d[h.id];for(const p in v)for(const m of v[p]){const g=u.find(y=>y.id===m);if(g&&containerType.includes(g.type)){const y=getComponentByContainer(g.id,d,u);for(const b of y)c[h.id][p].push(b.id),containerType.includes(b.type)&&delete c[b.id];delete c[g.id]}}}}function getTabsSomeComponentList(c,u){const d=[],f=u.filter(h=>h.type==="ecanTabs"&&h.isAutoScroll);if(f!=null&&f.length)for(const h of f){const v=c[h.id];for(const p in v)if(parseFloat(p)>0)for(const m of v[p]){const g=u.find(y=>y.id===m);g&&(d.push(g),containerType.includes(g.type)&&d.push(...getComponentByContainer(g.id,c,u)))}}return d}function getComponentByContainer(c,u,d){const f=[],h=u[c];for(const v in h)for(const p of h[v]){const m=d.find(g=>g.id===p);m&&(f.push(m),containerType.includes(m.type)&&f.push(...getComponentByContainer(m.id,u,d)))}return f}function getCombinationList(c,u,d){const{combinationMap:f={},componentList:h=[],pageConfig:v={}}=u,p=[];for(const m of c){const g=f[m];if(g!=null&&g.length){const y=h.filter(b=>g.includes(b.id));if(y!=null&&y.length){const b=getCombinateRect(y,v);if(b){p.push({...b,id:m,keyName:m,parentId:d||"",type:"ecanBorder",borderRadius:"",borderWidth:null,sourceLeft:b.left,sourceTop:b.top});for(const re of y)re&&(re.parentId=m,re.sourceLeft=re.left,re.sourceTop=re.top,re.left=parseFloat(re.left)-parseFloat(b.left)+"px",re.top=parseFloat(re.top)-parseFloat(b.top)+"px")}}}}return p}function sortList(c){const d=c.filter(f=>f.parentId===""||(f==null?void 0:f.isFlowGrid)).sort((f,h)=>{const v=f.sourceTop?typeof f.sourceTop=="object"?parseFloat(f.sourceTop.value):parseFloat(f.sourceTop):0,p=h.sourceTop?typeof h.sourceTop=="object"?parseFloat(h.sourceTop.value):parseFloat(h.sourceTop):0;return isNaN(v)||isNaN(p)?0:v-p});if(d!=null&&d.length){const f=lodashEs.cloneDeep(d).map(h=>({...h,sourceTop:parseFloat(h.sourceTop),sourceLeft:parseFloat(h.sourceLeft)}));for(let h=0;h<f.length-1;h++)for(let v=0;v<f.length-h-1;v++){let p=!1;if((f[v].sourceTop-f[v+1].sourceTop>40||Math.abs(f[v+1].sourceTop-f[v].sourceTop)<=40&&f[v].sourceLeft>f[v+1].sourceLeft)&&(p=!0),p){const m=f[v];f[v]=f[v+1],f[v+1]=m}}for(const h of f){const v=c.findIndex(p=>p.id===h.id);v!==-1&&c.splice(v,1)}return[...f,...c]}return c}function getCombinateRect(c,u){const d=c.sort((p,m)=>parseFloat(p.top)-parseFloat(m.top))[0],f=c.sort((p,m)=>parseFloat(p.left)-parseFloat(m.left))[0],h=c.map(p=>({...p,computedTop:parseFloat(p.top)+getFormatWh(p.height,u==null?void 0:u.height)})).sort((p,m)=>m.computedTop-p.computedTop)[0],v=c.map(p=>({...p,computedLeft:parseFloat(p.left)+getFormatWh(p.width,u==null?void 0:u.width)})).sort((p,m)=>m.computedLeft-p.computedLeft)[0];return d&&f&&h&&v?{left:f.left,top:d.top,width:v.computedLeft-parseFloat(f.left)+"px",height:h.computedTop-parseFloat(d.top)+"px"}:null}function getMaxLeftInComponents(c,u){const d=c.map(f=>parseFloat(f.left)+getFormatWh(f.width,u==null?void 0:u.width)).sort((f,h)=>h-f)[0];return d||0}function moveToComponentList(c,u,d){const f=c[d],h=[];if(f)for(const v in f){const p=f[v];for(const m of p){const g=u.find(y=>y.id===m);g&&(h.push(g),containerType.includes(g.type)&&h.push(...getComponentByContainer(g.id,c,u)))}}return h}const _sfc_main$A=vue.defineComponent({name:"Render",props:{component:{type:Object,default:()=>{}}},setup(c,{emit:u}){u("ready",c.component.id)}});function _sfc_render$F(c,u,d,f,h,v){return c.component.parentId?(vue.openBlock(),vue.createBlock(vue.Teleport,{key:0,to:"#container_"+c.component.parentId},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(c.component.type),vue.mergeProps({style:{scale:c.component.scale}},c.component),null,16,["style"]))],8,["to"])):(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(c.component.type),vue.normalizeProps(vue.mergeProps({key:1},c.component)),null,16))}const Render=_export_sfc$1(_sfc_main$A,[["render",_sfc_render$F]]),EcanRender=withInstall$1(Render),_sfc_main$z=vue.defineComponent({name:"EcanModal",components:{AModal:antDesignVue.Modal,CloseOutlined:CloseOutlined$1,Render:EcanRender},props:{...modalComponentProps},setup(c,{emit:u}){const d=vue.ref([]),f=vue.inject("isMobile",!1),{width:h,height:v}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),p=vue.computed(()=>c.fullModal),m=vue.inject("getContainerMap",()=>{}),g=vue.inject("getCombinationMap",()=>{}),{clearInteractiveData:y,interactiveData:b,setRequestData:re}=vue.inject(GLOBAL_MODEL,{setRequestData:(_r,Cr)=>{},clearInteractiveData:()=>{},interactiveData:null}),x=()=>document.getElementById("ProviderConfig")||document.body,vn=vue.computed(()=>{const _r=c.position;return{verticalAlign:{default:"",top:"top",center:"middle",bottom:"bottom"}[_r]}}),j=c.fullModal?"1920px":c.width,Pn=c.fullModal?"1080px":c.height,qn=c.originalWidth,Bn=c.originalHeight,w=vue.ref("80%"),J=vue.ref(0),gn=vue.ref(),Rn=vue.ref(0),zn=vue.ref({}),Wn=usePickComponentStyle(c),Yn=vue.ref({}),Jn=vue.ref(!1),tr=vue.ref();let nr;const Qn=()=>{gn.value=parseFloat(j)/parseFloat(qn);const _r=parseFloat(Pn)/parseFloat(Bn),Cr=document.body.offsetWidth,xr=document.body.offsetHeight;if(J.value=Cr*vue.unref(gn),Rn.value=xr*_r,w.value=`${vue.unref(gn)*100}%`,zn.value={width:`${vue.unref(J)}px`,height:`${vue.unref(Rn)}px`,border:`${c.borderWidth} solid ${c.borderColor}`,borderRadius:c.borderRadius+"px",boxShadow:c.boxShadow},Yn.value={...vue.unref(Wn),backgroundImage:useImagePath(c.backgroundImage,!0)},f)Yn.value={...Yn.value,width:"100%",height:"100%"};else{const Ar={...Yn.value,width:j,height:Pn};c.banScale&&vue.unref(p)?(Ar.width="100%",Ar.height="100%"):Ar.transform=`scale(${vue.unref(J)/parseFloat(j)},${vue.unref(Rn)/parseFloat(Pn)})`,Yn.value=Ar}},ar=lodashEs.debounce(()=>{Qn()},100),cr=()=>{const _r=window.MutationObserver;nr=new _r(ar),nr.observe(document.body,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},fr=()=>{nr&&(nr.disconnect(),nr.takeRecords(),nr=null)},Gn=vue.ref(!1),{touchRequest:Zn}=vue.inject(REQUEST_MODEL,{touchRequest:()=>{}}),Hn=vue.ref(""),Un=()=>{var xr;const{title:_r}=c,Cr=(xr=vue.unref(b))==null?void 0:xr.RECORD;return Cr?hn(_r,{textData:Cr},{useNewline:!1,useSpace:!1}):_r},er=useEmitEvent(c),Kn=_r=>{const{changeIframeStyle:Cr}=window.parent;Cr&&typeof Cr=="function"&&Cr({iframeId:c.parentIframeId||"",action:_r})},ir=()=>{vue.unref(p)&&Kn("open"),f&&(document.documentElement.style.overflow="hidden"),Hn.value=Un(),Gn.value=!0},ur=er("hideModal",()=>{vue.unref(p)&&Kn("close"),u("close"),f&&(document.documentElement.style.overflow="hidden auto",d.value=[]),Gn.value=!1}),or=()=>{ur()},sr=()=>{ur(),y()},{setModalModel:dr,pushUseModalIds:Xn,popUseModalIds:lr}=vue.inject(MODAL_MODEL,{pushUseModalIds:_r=>{},popUseModalIds:()=>{},setModalModel:(_r,Cr)=>{}}),hr=vue.computed(()=>{let _r=c.componentList;const Cr=lodashEs.cloneDeep(c.componentList),xr=m(),Ar=g(),gr={containerMap:xr,combinationMap:Ar};f&&(_r=compatibleMobileList({...gr,componentList:Cr,sourceList:c.allComponentList,pageConfig:{width:vue.unref(h),height:vue.unref(v)}})),_r=handleScrollCombinations({...gr,componentList:_r,sourceList:c.allComponentList,pageConfig:{width:vue.unref(h),height:vue.unref(v)}});const wr=[];for(const Tr of _r)if(Tr.type==="ecanCirculate"){const Pr=moveToComponentList(xr,vue.unref(Cr),Tr.id);Tr.componentList=Pr,wr.push(...Pr.map(Dr=>Dr.id))}else if(Tr.type==="ecanTable"){const{headerFontSize:Pr,fontSize:Dr,size:Kr,bodyRowHeight:Vr,headRowHeight:Hr}=Tr;if(!Vr||!Hr)if(Tr.size){let Xr=0;switch(Kr){case"default":Xr=16;break;case"middle":Xr=12;break;case"small":Xr=8;break}Vr||(Tr.bodyRowHeight=(Xr*2+parseFloat(Dr)*1.5715).toFixed(0)+"px"),Hr||(Tr.headRowHeight=(Xr*2+parseFloat(Pr)*1.5715).toFixed(0)+"px")}else Vr||(Tr.bodyRowHeight="54px"),Hr||(Tr.headRowHeight="54px")}if(wr!=null&&wr.length)for(const Tr of wr){const Pr=_r.findIndex(Dr=>Dr.id===Tr);Pr!==-1&&_r.splice(Pr,1)}return _r}),vr=()=>{const _r=c.id;let Cr=[];const xr=c.componentList;Array.isArray(xr)&&(Cr=xr.map(Ar=>Ar.id),dr(_r,[...new Set(Cr)]))},yr=vue.ref(!1),br={};for(const _r of c.requestList)br[_r.requestName]=useRequestData(_r);vue.watch(()=>Gn.value,async _r=>{if(_r)Jn.value=!1,Xn(c.id),vr(),await vue.nextTick(()=>{Qn(),window.addEventListener("resize",ar),cr(),Jn.value=!0}),Zn();else{if(re)for(const Cr in br)re(Cr,{});lr(),window.removeEventListener("resize",ar),fr()}});const pr=vue.computed(()=>vue.unref(gn)>=1),mr=vue.computed(()=>{let _r="ecan-modal";return vue.unref(pr)&&(_r+=" ecan-full-width-modal"),vue.unref(p)&&(_r+=" ecan-full-modal"),_r});return useOnEvent(c,{showModal:ir,hideModal:ur}),{modalRef:tr,containStyle:zn,contentStyle:Yn,getContainer:x,modalStyle:vn,modalWith:w,isFullModal:p,style:Wn,visible:Gn,showModal:ir,onOk:or,onCancel:sr,isFullWidth:pr,wrapClassName:mr,ready:Jn,usedComponentList:hr,isMobile:f,readyIds:d,hasOwn:mn,onComponentReady:_r=>{d.value.push(_r)},formatTitle:Hn,requestLoaded:yr}}}),Modal_vue_vue_type_style_index_0_scoped_e8d3acb6_lang="",Modal_vue_vue_type_style_index_1_lang="";function _sfc_render$E(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("render"),g=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(g,{getContainer:c.getContainer,wrapClassName:c.wrapClassName,centered:"",visible:c.visible,footer:null,width:c.isFullModal||c.isFullWidth?"100%":c.modalWith,destroyOnClose:c.destroyOnClose,style:vue.normalizeStyle(c.modalStyle),closable:!1,onOk:c.onOk,onCancel:c.onCancel,ref:"modalRef",id:"container_"+c.id},{default:vue.withCtx(()=>[vue.createElementVNode("div",{class:"contain",ref:"containRef",style:vue.normalizeStyle(c.containStyle)},[c.ready?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"content",style:vue.normalizeStyle(c.contentStyle)},[vue.createElementVNode("div",{class:"header-bar",style:vue.normalizeStyle({backgroundColor:c.backgroundColor,padding:"20px 30px",height:c.isMobile?"62px":""})},[c.formatTitle?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"ant-modal-title",style:vue.normalizeStyle({fontSize:c.titleFontSize,color:c.titleColor})},vue.toDisplayString(c.formatTitle),5)):vue.createCommentVNode("",!0),c.isShowCloseBtn?(vue.openBlock(),vue.createBlock(p,{key:1,class:"close-icon",style:vue.normalizeStyle({color:c.closeBtnColor}),onClick:c.onCancel},null,8,["style","onClick"])):vue.createCommentVNode("",!0)],4),c.usedComponentList.length?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(c.isMobile?"mobile-wrap":"")},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.usedComponentList,(y,b)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:y.id+b},[c.isMobile?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[c.hasOwn(y,"parentId")&&(c.readyIds.includes(y.parentId)||y.parentId==="")?(vue.openBlock(),vue.createBlock(m,{key:0,component:y,onReady:c.onComponentReady},null,8,["component","onReady"])):vue.createCommentVNode("",!0)],64)):(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.type),vue.mergeProps({key:1},y,{cpntid:y.id}),null,16,["cpntid"]))],64))),128))],2)):vue.renderSlot(c.$slots,"default",{key:1},void 0,!0)],4)):vue.createCommentVNode("",!0)],4)]),_:3},8,["getContainer","wrapClassName","visible","width","destroyOnClose","style","onOk","onCancel","id"])}const Modal=_export_sfc$1(_sfc_main$z,[["render",_sfc_render$E],["__scopeId","data-v-e8d3acb6"]]),EcanModal=withInstall$1(Modal);core$1.use([renderers.CanvasRenderer,charts.LineChart,components$1.ToolboxComponent,components$1.TitleComponent,components$1.LegendComponent,components$1.MarkLineComponent]);const _sfc_main$y=vue.defineComponent({name:"EcanLine",props:{...lineComponentProps},components:{Spin,Echarts,EcanModal},setup(c,{expose:u}){const d=vue.ref(!1),{pageMode:f,fontFamily:h}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal",fontFamily:""}),v=vue.inject("showIndDetail",er=>{}),p=vue.inject("usedComponentList",[]),m=vue.ref(),g=vue.ref(!1),y=usePickComponentStyle(c),b=vue.ref([]),re=vue.ref([]),x=vue.ref(),vn=vue.computed(()=>g.value?ZOOM_FONT_SIZE:12),j=vue.ref({});let Pn;const qn=vue.ref([]),Bn=vue.computed(()=>{const er=c.xAxisLabelFormatter,Kn=c.yAxisLabelFormatter;return{textStyle:{fontFamily:vue.unref(h)},toolbox:{show:c.toolboxShow,left:c.toolboxLeft,top:c.toolboxTop,itemSize:c.toolboxItemSize,itemGap:c.toolboxItemGap,orient:c.toolboxOrient,feature:{myDownload:{show:c.toolboxDownloadShow,title:"数据下载",icon:"path://M502.010485 765.939573c3.773953 3.719718 8.686846 5.573949 13.596669 5.573949 0.075725 0 0.151449-0.010233 0.227174-0.011256 0.329505 0.016373 0.654916 0.050142 0.988514 0.050142 0.706081 0 1.400906-0.042979 2.087545-0.116657 4.352121-0.366344 8.607028-2.190899 11.961426-5.496178l335.053985-330.166675c7.619538-7.509021 7.709589-19.773346 0.200568-27.393907s-19.774369-7.711636-27.39493-0.201591L536.193005 706.304358 536.193005 50.019207c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 657.032164-306.881342-302.44838c-7.618515-7.509021-19.883863-7.419993-27.393907 0.199545-7.509021 7.619538-7.419993 19.884886 0.199545 27.393907L502.010485 765.939573z, M867.170139 711.020776c-10.698666 0-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 13.054317-10.620895 23.675212-23.676236 23.675212L205.182103 919.486668c-13.054317 0-23.676236-10.620895-23.676236-23.675212L181.505867 730.391962c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 34.416857 28.000728 62.416562 62.417585 62.416562l618.941638 0c34.417881 0 62.417585-27.999704 62.417585-62.416562L886.540302 730.391962C886.541325 719.693296 877.868805 711.020776 867.170139 711.020776z",onclick(){useDownloadFile(c.toolboxDownloadUrl)}},myDataZoom:{show:g.value?!1:c.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){var ir;g.value=!0,(ir=x.value)==null||ir.showModal()}},myInfo:{show:c.toolboxInfoShow,title:"详情",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){v(c)}}}},title:{text:c.titleText,subText:c.titleSubtext,textStyle:{fontSize:c.titleFontSize,fontWeight:c.fontWeight,color:c.titleColor},left:c.textAlign},grid:{top:c.gridTop,bottom:c.gridBottom,left:c.gridLeft,right:c.gridRight,containLabel:c.gridContainLabel},color:c.colors,tooltip:{trigger:"axis",textStyle:{fontSize:vn.value,color:c.tooltipTextStyleColor},show:c.tooltipShow,formatter:ir=>{var dr;const ur=ir.length;let or="",sr=c.tooltipFormatter;Pn=(dr=ir[0])==null?void 0:dr.data,sr===""&&(sr="{marker} {a} {c}");for(let Xn=0;Xn<ur;Xn++){const{marker:lr,seriesName:hr,name:vr,value:yr,data:br}=ir[Xn]||{};if(Xn===0){let pr=vr;typeof vr=="string"&&vr[0]==="0"&&!isNaN(+vr)&&(pr=(+vr).toString()),or+=`${Fn(er,pr)}<br/>`}or+=hn(sr,{textData:{marker:lr,name:vr,value:yr,a:hr,b:vr,c:yr||0,...br}},{useNewline:!0,useSpace:!0}),or+="<br/>"}return or},position:c.tooltipPosition||void 0},xAxis:{type:"category",boundaryGap:c.isBoundaryGap,data:vue.unref(re).map(ir=>{let ur={};return ir&&typeof ir=="object"?ur={...ir}:ur={value:ir},ur}),minInterval:c.xAxisMinInterval,splitLine:{show:c.xAxisSplitLineShow,lineStyle:{color:c.xAxisSplitLineStyleColor},interval:c.xAxisSplitLineInterval},splitArea:{show:c.xAxisSplitAreaShow},axisLabel:{show:c.xAxisLabelShow,color:c.xAxisLabelColor,interval:c.xAxisLabelInterval||0,rotate:c.xAxisLabelRotate,width:c.xAxisLabelWidth,overflow:c.xAxisLabelOverflow,fontSize:c.xAxisLabelFontSize,formatter(ir){return typeof ir=="string"&&ir[0]==="0"&&!isNaN(+ir)&&(ir=(+ir).toString()),Fn(er,ir)}},axisLine:{show:c.xAxisLineShow,lineStyle:{color:c.xAxisLineStyleColor}},axisTick:{show:c.xAxisTickShow},name:c.xAxisName,nameTextStyle:{fontSize:c.xAxisLabelFontSize,color:c.xAxisLabelColor,align:"left"},max:c.xAxisMaxValue||null},yAxis:{type:"value",minInterval:c.yAxisMinInterval,splitLine:{show:c.yAxisSplitLineShow,lineStyle:{color:c.yAxisSplitLineStyleColor,type:c.yAxisSplitLineType}},splitArea:{show:c.yAxisSplitAreaShow},axisLabel:{show:c.yAxisLabelShow,fontSize:c.yAxisLabelFontSize,color:c.yAxisLabelColor,formatter(ir){return Fn(Kn,ir)}},axisLine:{show:c.yAxisLineAlwaysDisplay,lineStyle:{color:c.yAxisLineStyleColor}},name:c.yAxisName,nameTextStyle:{fontSize:c.yAxisLabelFontSize,color:c.yAxisLabelColor,align:"right"},max:c.yAxisMaxValue||null},legend:{type:c.legendScroll?"scroll":"plain",width:c.legendWidth,height:c.legendHeight,show:c.legendShow,orient:c.legendOrient,top:c.legendTop,left:c.legendLeft,textStyle:{lineHeight:(g.value?ZOOM_FONT_SIZE:parseFloat(c.legendFontSize))+8,rich:{text:{width:c.legendTextWidth,color:c.legendTextStyleColor,fontSize:g.value?ZOOM_FONT_SIZE:c.legendFontSize}}},itemHeight:c.legendItemHeight,itemWidth:c.legendItemWidth,itemGap:c.legendItemGap,data:vue.unref(qn).map(ir=>({name:ir.name,icon:c.legendType})),formatter:ir=>getLegendFormat(c.legendFormatter,{name:ir})},series:vue.unref(b)}}),w=()=>{g.value=!1},{getGlobalModel:J,setGlobalModel:gn}=vue.inject(GLOBAL_MODEL,{getGlobalModel:er=>{},setGlobalModel:(er,Kn)=>{}}),Rn=vue.computed(()=>c.isShowMarkLine?{markLine:{data:[{type:c.markLineType}]}}:{}),zn=(er=[],Kn=!1)=>{var dr;let ir;if(c.dataFieldConfigType==="key"){const Xn=Kn?c.keyTypeDataFieldNames:null;ir=In(er,Xn)}else if(c.dataFieldConfigType==="value"){const Xn=Kn?c.valueTypeDataFieldNames:null;ir=Vn(er,Xn)}re.value=ir.dimensions,qn.value=ir.dataset;const ur=ir.dataset,or=[],sr=ur.length;for(let Xn=0;Xn<sr;Xn++){const lr={};c.shadowColor&&(lr.shadowColor=c.shadowColor,lr.shadowBlur=c.shadowBlur,lr.shadowOffsetY=c.shadowOffsetY,lr.shadowOffsetX=c.shadowOffsetX);let hr=c.colors[Xn];if(!hr&&c.colors.length){const vr=(Xn+1)%c.colors.length-1;hr=vr>0?c.colors[vr]:c.colors[0]}hr||(hr="#5470C6"),or.push({type:"line",...ur[Xn],symbolSize:c.symbolSize,smooth:c.smooth,areaStyle:{color:c.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:hr},{offset:1,color:c.areaGradientColor||"transparent"}],global:!1}:hr,opacity:c.areaStyleOpacity},lineStyle:{width:c.lineStyleWidth,...lr},...vue.unref(Rn)})}b.value=or,(dr=ir.dataset)!=null&&dr.length?d.value=!1:d.value=!0},Wn=(er=[],Kn,ir=!1)=>{var lr,hr,vr;const or=In(er,ir?Kn:null,!0);if(c.defaultRangeValue&&setDefaultRangeVal({props:c,componentList:vue.unref(p),getGlobalModel:J},or),(lr=or.dataset)!=null&&lr.length){for(const yr of or.dataset)if((hr=yr.data)!=null&&hr.length)for(const br of yr.data)(br.value===null||br.value===void 0)&&(br.value=0)}re.value=or.dimensions,qn.value=or.dataset;const sr=or.dataset,dr=[],Xn=sr.length;for(let yr=0;yr<Xn;yr++){const br={};c.shadowColor&&(br.shadowColor=c.shadowColor,br.shadowBlur=c.shadowBlur,br.shadowOffsetY=c.shadowOffsetY,br.shadowOffsetX=c.shadowOffsetX);let pr=c.colors[yr];if(!pr&&c.colors.length){const mr=(yr+1)%c.colors.length-1;pr=mr>0?c.colors[mr]:c.colors[0]}pr||(pr="#5470C6"),dr.push({type:"line",...sr[yr],symbolSize:c.symbolSize,smooth:c.smooth,areaStyle:{color:c.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:pr||yr%(c.colors.length||1)},{offset:1,color:c.areaGradientColor||"transparent"}],global:!1}:pr,opacity:c.areaStyleOpacity},lineStyle:{width:c.lineStyleWidth,...br},...vue.unref(Rn)})}b.value=dr,(vr=or.dataset)!=null&&vr.length?d.value=!1:d.value=!0};vue.watch(()=>[c.data,c.symbolSize,c.smooth,c.lineStyleWidth,c.areaStyleOpacity,c.areaGradientShow,c.areaGradientColor,c.shadowColor,c.shadowBlur,c.shadowOffsetY,c.shadowOffsetX,c.legendFontSize,c.isShowMarkLine,c.markLineType,c.legendFormatter,c.legendWidth,c.legendHeight,c.legendTextWidth,c.legendScroll],([er])=>{(c.dataType==="static"||vue.unref(f)==="design")&&zn(er)},{immediate:!0,deep:!0});const Yn=vue.ref(!1),Jn=useRequestData(c),tr=async()=>{var er,Kn;if(c.dataType==="request")try{Yn.value=!0;const ir=await Jn();zn((Kn=(er=ir==null?void 0:ir.data)==null?void 0:er.data)==null?void 0:Kn.rows,!0)}catch(ir){console.error(ir)}finally{Yn.value=!1}},nr=useEmitEvent(c);gn(c.id,{type:c.type,RECORD:""});const Qn=nr("click",er=>{const Kn=J(c.id);gn(c.id,{...Kn,type:c.type,RECORD:c.tooltipShow?Pn:er.data})}),ar=er=>{m.value.chart.containPixel("grid",[er.offsetX,er.offsetY])&&Qn()};c.isForbidClick||(c.tooltipShow?j.value["zr:click"]=ar:j.value.click=Qn);const cr=er=>{var dr;const{columns:Kn=[],rows:ir=[]}=((dr=er==null?void 0:er.data)==null?void 0:dr.data)??{};let ur;Kn.length>0&&(ur={name:Kn[0],types:Kn.slice(1).map(Xn=>({label:Xn,value:Xn}))});const{leftAxisList:or=[]}=c.graphicConfig,sr=or.filter(Xn=>Xn.show).map(Xn=>Xn.label);for(const Xn of ir)if(Xn)for(const lr in Xn)typeof Xn[lr]=="string"&&sr.includes(lr)&&!isNaN(parseFloat(Xn[lr]))&&(Xn[lr]=parseFloat(Xn[lr]));Wn(ir,ur,!0)},fr=useIndicatorData(c,er=>{c.isViewRedrawing&&m.value.clear(),cr(er)}),Gn=async()=>{try{Yn.value=!0;const er=await fr();cr(er)}catch(er){console.error(er)}finally{Yn.value=!1}},Zn=async()=>{switch(c.dataType){case"indicator":await Gn();break;case"request":await tr();break}};useOnEvent(c,{refreshData:Zn,resetRecord:()=>{const er=c.id,Kn=J(er);gn(er,{...Kn,RECORD:""})},click:Qn});const{setRequest:Un}=vue.inject(REQUEST_MODEL,{setRequest:er=>{}});return typeof Un=="function"&&Un({id:c.id,requestFn:Zn,sortNum:c.requestSort}),u({refreshData:Zn}),{option:Bn,style:y,click:Qn,loading:Yn,onClose:w,ecanModal:x,eventObj:j,echartRef:m,emptyData:d}}}),Line_vue_vue_type_style_index_0_lang="",Line_vue_vue_type_style_index_1_scoped_fadf491b_lang="";function _sfc_render$D(c,u,d,f,h,v){const p=vue.resolveComponent("echarts"),m=vue.resolveComponent("spin"),g=vue.resolveComponent("ecan-modal");return vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(c.style)},[vue.createVNode(m,{spinning:c.loading},{default:vue.withCtx(()=>[c.noDataTip&&c.emptyData?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"empty-wrap",style:vue.normalizeStyle({color:c.tipTextColor,fontSize:c.tipTextFontSize})},[vue.createElementVNode("span",null,vue.toDisplayString(c.tipText),1)],4)):(vue.openBlock(),vue.createBlock(p,vue.mergeProps({key:1,ref:"echartRef",option:c.option,autoresize:""},vue.toHandlers(c.eventObj)),null,16,["option"]))]),_:1},8,["spinning"]),vue.createVNode(g,{width:"1920px",height:"1080px",ref:"ecanModal",onClose:c.onClose},{default:vue.withCtx(()=>[vue.createVNode(m,{class:"spin-wrap",spinning:c.loading},{default:vue.withCtx(()=>[vue.createVNode(p,{option:c.option,"update-options":{notMerge:!0},autoresize:""},null,8,["option"])]),_:1},8,["spinning"])]),_:1},8,["onClose"])],4)}const Line=_export_sfc$1(_sfc_main$y,[["render",_sfc_render$D],["__scopeId","data-v-fadf491b"]]),EcanLine=withInstall$1(Line);let random=c=>crypto.getRandomValues(new Uint8Array(c)),customRandom=(c,u,d)=>{let f=(2<<Math.log(c.length-1)/Math.LN2)-1,h=-~(1.6*f*u/c.length);return(v=u)=>{let p="";for(;;){let m=d(h),g=h;for(;g--;)if(p+=c[m[g]&f]||"",p.length===v)return p}}},customAlphabet=(c,u=21)=>customRandom(c,u,random),nanoid=(c=21)=>crypto.getRandomValues(new Uint8Array(c)).reduce((u,d)=>(d&=63,d<36?u+=d.toString(36):d<62?u+=(d-26).toString(36).toUpperCase():d>62?u+="-":u+="_",u),"");const _sfc_main$x=vue.defineComponent({name:"TrendModal",components:{EcanLine,CloseOutlined:CloseOutlined$1,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1},props:{theme:{type:String,default:"light"}},setup(c,{expose:u}){const d=vue.ref(!1),f=vue.ref(),h=vue.ref(),v=vue.ref(!0),p=vue.ref({}),m=vue.ref(!0),g=vue.inject("isMobile",!1),y=async({data:Bn,pageConfig:w,unitText:J})=>{if(Bn){v.value=!0,p.value=w;const{graphicConfig:gn}=Bn,Rn=nanoid(6),zn={source:"INDICATOR_LIB",dataSourceId:"",idxLibMode:"",classificationList:[{id:"3f5bda70a08a442085857adb7fc547de",indexCode:null,indexCodeNum:null,title:"日期",name:"the_date",label:"日期",typeGuid:"the_date",genericType:"DATE",hrpIndexComplexid:"the_date",scope:"BUILT_IN_DIM",fromTable:"hrp_index_complex",parentId:"3f5bda70a08a442085857adb7fc547de",show:!0,edit:!1,dataTo:"0",dateFormat:"YYYY-MM",dataSetParams:{}}],leftAxisList:(gn==null?void 0:gn.indicators)||[],controlList:(gn==null?void 0:gn.controlList)||[],variableList:(gn==null?void 0:gn.variableList)||[],variableConditions:(gn==null?void 0:gn.variableConditions)||[]};f.value={...lodashEs.cloneDeep(lineProps),id:Rn,keyName:`折线图_${Rn}`,position:"relative",top:0,left:0,width:vue.unref(g)||vue.unref(v)?"100%":parseFloat(w.width)*.57+"px",height:vue.unref(g)||vue.unref(v)?"100%":parseFloat(w.height)*.4+"px",dataType:"indicator",tooltipFormatter:"{marker} {a} {c}"+J,xAxisLabelRotate:45,yAxisLabelFormatter:J?`{value}${J}`:"{value}",isForbidClick:!0,graphicConfig:zn},d.value=!0,vue.nextTick(()=>{x(!0),vn(!0),vue.unref(h).refreshData()})}},b=()=>document.querySelector("#modalContainer")||document.body,re=vue.computed(()=>{let Bn="trend-modal";return vue.unref(g)?Bn+=" mobile":v.value&&(Bn+=" full"),c.theme==="darkBlue"&&(Bn+=" darkBlue"),Bn});vue.watch(d,Bn=>{Bn?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"}),vue.watch(v,Bn=>{m.value=!1,vue.unref(f).width=Bn?"100%":parseFloat(vue.unref(p).width)*.57+"px",vue.unref(f).height=Bn?"100%":parseFloat(vue.unref(p).height)*.4+"px",vue.nextTick(()=>{m.value=!0,vue.nextTick(()=>{vue.unref(h).refreshData()})})});const x=Bn=>{const w=document.querySelector(".trend-modal .ant-modal-header");w&&(Bn?w.addEventListener("dblclick",Pn):w.removeEventListener("dblclick",Pn))},vn=Bn=>{const w=document.querySelector(".trend-modal .ant-modal-header");if(w)if(Bn)w.addEventListener("mousedown",j);else{const J=w.parentElement;J&&(J.style.left="",J.style.top=""),w.removeEventListener("mousedown",j)}};function j(Bn){dragModalAction(Bn,".trend-modal .ant-modal-header")}const Pn=()=>{v.value=!v.value,vue.nextTick(()=>{v.value?vn(!1):vn(!0)})},qn=()=>{x(!1),vn(!1)};return vue.onMounted(()=>{var Bn,w;if(vue.unref(g)){const J=document.querySelector("#modalContainer");v.value=!0,(Bn=J==null?void 0:J.style)==null||Bn.setProperty("--window-screen-width",document.body.clientWidth+"px"),(w=J==null?void 0:J.style)==null||w.setProperty("--window-screen-height",document.body.clientHeight+"px")}}),u({showModal:y}),{visible:d,componentConfig:f,lineRef:h,wrapClassName:re,isMobile:g,isIndFullScreen:v,isRender:m,getContainer:b,toggleFullScreen:Pn,onDetailCancel:qn}}}),TrendModal_vue_vue_type_style_index_0_scoped_a24645dd_lang="",TrendModal_vue_vue_type_style_index_1_lang="",_withScopeId$8=c=>(vue.pushScopeId("data-v-a24645dd"),c=c(),vue.popScopeId(),c),_hoisted_1$o=_withScopeId$8(()=>vue.createElementVNode("div",{class:"modal-title"},"趋势图",-1)),_hoisted_2$e={class:"zoom-btn"};function _sfc_render$C(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("ecan-line"),b=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(b,{visible:c.visible,"onUpdate:visible":u[0]||(u[0]=re=>c.visible=re),width:"60%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,bodyStyle:{maxHeight:c.isMobile||c.isIndFullScreen?"":"70vh",height:c.isMobile||c.isIndFullScreen?"100vh":"",overflow:"auto",padding:"20px 24px 24px"},"wrap-class-name":c.wrapClassName,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[_hoisted_1$o]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["close-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$e,[!c.isMobile&&c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme]),title:"取消全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"])):c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme]),title:"全屏",onClick:c.toggleFullScreen},null,8,["class","onClick"]))]),c.componentConfig&&c.isRender?(vue.openBlock(),vue.createBlock(y,vue.mergeProps({key:0},c.componentConfig,{ref:"lineRef"}),null,16)):vue.createCommentVNode("",!0)]),_:1},8,["visible","getContainer","bodyStyle","wrap-class-name","onCancel"])}const TrendModal=_export_sfc$1(_sfc_main$x,[["render",_sfc_render$C],["__scopeId","data-v-a24645dd"]]),pivotTableProps={...props$1,name:"透视表",keyName:"透视表",width:"800px",height:"400px",type:"ecanPivotTable",graphicConfig:{},dataType:"indicator",data:[],dimensionList:[],indicatorList:[],styleConfig:{borderColor:"#E3E3E3",headerBgColor:"#ECF1F5",headerColor:"#000000",bodyBgColor:"#FFFFFF",bodyColor:"#000000",indicatorsHeaderBgColor:"#ECF1F5",indicatorsHeaderColor:"#000000",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#000000",aggregateBgColor:"#ECF1F5",aggregateColor:"#000000",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"},configMode:"halfMode"},pivotTableComponentProps=transformToComponentProps(pivotTableProps),pivotTableEvents=["refreshData"];var zhCn={exports:{}};(function(c,u){(function(d,f){c.exports=f(dayjs)})(commonjsGlobal,function(d){function f(p){return p&&typeof p=="object"&&"default"in p?p:{default:p}}var h=f(d),v={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(p,m){return m==="W"?p+"周":p+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(p,m){var g=100*p+m;return g<600?"凌晨":g<900?"早上":g<1100?"上午":g<1300?"中午":g<1800?"下午":"晚上"}};return h.default.locale(v,null,!0),v})})(zhCn);const _imports_0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAABE1JREFUaEPdWk1sTUEUdtmxEREWVMtay0LSxoqIhaBsRBC8IIQgCI1/9S+StuI3EWmIIGLTVtiI6IaQWEhqZeHfgpVI2Mnzfc+ZZzrv3ndn5s57rzXJl/vevffMnG/OOTNnZm40IkDJ5/NjUc0SoAGYD9QDk42qP+P/B+AR8B7ojaLoe9bmI98KROm1kN8gir/C9RPwGvgKfDPqnoD/E4HpQB0wU4hcw/WGLxlnAlCcvbwTyAHPgZdy9emLFgjNAni9DnSBCK1jXZwIQPkjqHkj8ERg9rJ1wzHWmYt7xFWQOGpbkRUBKE5z3wR+AN1AKMVNPelm24CRQKuNNVIJQHm6ykngHvDYtmcyvjcP8suAAyBB10osZQmI8hcgfRB4m1EpV/FpEDhBi5QjkUhAlN+HCi7XQHlFliS2AKeTSMQSqHHPm5ZSllgNEj3mwxICErAP8OLZGvZ8HIljuDnDDOw4AgMSrNUKWNvYaMWLzSDQpAsMIoDeb8fDpcAh21qr/N5xtNcDEtSzUIoEZIZ9inuHgUqN81n5cp7o1F1JJ3AeD8YBd7O2UmH55YxNWIEd/dcCkpgxU9wE/HRUYKq8/65KcsoK9UwAFYEdaHwBcNFDiVMisx9XWxIk7SOn1NuKH3c4NygCHHn6AGaXtkUpMUYEaDkbEr5yul7MXpkrNUbiPszjV9pqLu+ZivB2Gok4GVqNxF1d9zZk6kgghx/rAU5crsWFREjlqWcb0EECHH3G06dctXewRGjl2fQK4A0JcOxn6sA48C3lLME6GbAqVvjf1210/RrxZyEJ0P/bgayTVxIJNhpaedbJJG83CeTxg3lGiBJHQq83RM/r9fWFJsDKk0iEVp5tVZVA2hDr4wHBCaS5UGgSBQLcMeN2SSWCmG7D3EUP4lAkGMR7KjmMKp8nAXMYDUGiOIyek14KOZGZAesyY9vGQnEiy0EiZCqRNNqEJlFMJbiz/BFYZUtd3vNJD0KSuAU9pmRJpxmY9G19QWOTVZokfOaHf+k0exMjke+CRpFgNTbKKyMrEhz5XOSUfMmCRrkRt81dh1N9QePihSTBtlzXARzVugruo5aUYoXhsqhfB30HBi3qhUADrsNhW4W936R26P6fjS3lvAjooby12MKFvB5ocXujPI0Zipu73FYsuo4iUUJA4iGHK4Oae6TVPtgwRzImbVR+jdX2uuZKJLEXuFJDElR+M3DG6YDDIFErS6ie3+51xKSR4Hb7JeAhwN27ahSu0bmJG+s2ZYM4TjvZer+PZ78BHvq5zta2pNUx6ygILA5yzKq3LAcgu3CvF+gPSISKLwJ4vNqpH2CkMY8dhcoJiTVIIgc8A/ipwYu0hhKeN+M+PzWYDXBh1W3T684ulOBWTABJgoshfp3Cjz24vuZE+Aswh18G5WiAExG/ZOF8wzOJDoDHRl5frjhboAyZOaKU+txmkvHuF1GYn9uQbL+v0nq9fwCcDKEjLNL6QQAAAABJRU5ErkJggg==",CustomModal_vue_vue_type_style_index_0_scoped_f23e75be_lang="",CustomModal_vue_vue_type_style_index_1_lang="";dayjs.locale("zh-cn");const _sfc_main$w=vue.defineComponent({name:"LastDetail",components:{BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1},props:{theme:{type:String,default:"light"}},setup(c,{emit:u,expose:d}){const f=window.screen.height*.6,h=`cutmodal_${nanoid(6)}`,v=vue.ref(!0),p=vue.ref(!1),m=vue.ref(""),g=vue.ref(""),y=vue.ref(""),b=vue.inject("isMobile",!1);vue.computed(()=>INDICATOR_URL);const re=()=>document.querySelector("#modalContainer")||document.body,x=Rn=>{const zn=document.querySelector(`.${h} .ant-modal-header`);if(zn)if(Rn)zn.addEventListener("mousedown",j);else{const Wn=zn.parentElement;Wn&&(Wn.style.left="",Wn.style.top=""),zn.removeEventListener("mousedown",j)}},vn=Rn=>{const zn=document.querySelector(`.${h} .ant-modal-header`);zn&&(Rn?zn.addEventListener("dblclick",Pn):zn.removeEventListener("dblclick",Pn))},j=Rn=>{dragModalAction(Rn,`.${h} .ant-modal-header`)},Pn=()=>{v.value=!v.value,vue.nextTick(()=>{v.value?x(!1):x(!0)})},qn=()=>{vn(!1),x(!1),u("close")};async function Bn(Rn){var Jn;p.value=!0,(Jn=window==null?void 0:window.config)!=null&&Jn.indicatorToken;const{record:zn,linkUrl:Wn,title:Yn}=Rn;if(y.value=Yn,Wn){v.value=!0,m.value=Wn;const tr=[],nr=["orgCode","visitId","mpiId"];for(const Qn in zn)nr.includes(Qn)&&tr.push(`${Qn}=${zn[Qn]}`);g.value=tr.join("&")}vue.nextTick(()=>{vn(!0)})}const w=vue.computed(()=>{let Rn=`custom-content-modal ${h}`;return(vue.unref(b)||v.value)&&(Rn+=" full"),c.theme==="darkBlue"&&(Rn+=" darkBlue"),Rn}),J=vue.computed(()=>vue.unref(b)?{padding:"10px 0"}:{height:vue.unref(v)?"":f+48+"px",overflow:"hidden"}),gn=()=>{p.value=!1,qn()};return d({showModal:Bn,visible:p}),{visible:p,wrapClassName:w,detailBodyStyle:J,isMobile:b,urlJsonStr:g,linkUrl:m,isIndFullScreen:v,modalTitle:y,handleClose:gn,getContainer:re,onCancel:qn,toggleFullScreen:Pn}}}),_withScopeId$7=c=>(vue.pushScopeId("data-v-f23e75be"),c=c(),vue.popScopeId(),c),_hoisted_1$n=_withScopeId$7(()=>vue.createElementVNode("img",{src:_imports_0,alt:"",width:"48",height:"48"},null,-1)),_hoisted_2$d=[_hoisted_1$n],_hoisted_3$7=["src"];function _sfc_render$B(c,u,d,f,h,v){const p=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(p,{wrapClassName:c.wrapClassName,visible:c.visible,"onUpdate:visible":u[1]||(u[1]=m=>c.visible=m),width:"60%",destroyOnClose:!0,footer:null,bodyStyle:c.detailBodyStyle,getContainer:c.getContainer,closable:!1,onCancel:c.onCancel},{default:vue.withCtx(()=>[vue.createElementVNode("div",{class:"custom-close-icon",onClick:u[0]||(u[0]=(...m)=>c.handleClose&&c.handleClose(...m))},_hoisted_2$d),c.linkUrl&&c.urlJsonStr?(vue.openBlock(),vue.createElementBlock("iframe",{key:0,src:`${c.linkUrl}${c.linkUrl.includes("?")?"&":"?"}${c.urlJsonStr}`,frameborder:"0",width:"100%",height:"100%"},`\r
|
|
103
|
+
`,8,_hoisted_3$7)):vue.createCommentVNode("",!0)]),_:1},8,["wrapClassName","visible","bodyStyle","getContainer","onCancel"])}const CustomModal=_export_sfc$1(_sfc_main$w,[["render",_sfc_render$B],["__scopeId","data-v-f23e75be"]]);/**!
|
|
104
104
|
* Sortable 1.10.2
|
|
105
105
|
* @author RubaXa <trash@rubaxa.org>
|
|
106
106
|
* @author owenm <owen23355@gmail.com>
|
|
107
107
|
* @license MIT
|
|
108
|
-
*/function _typeof$2(c){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(u){return typeof u}:_typeof$2=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},_typeof$2(c)}function _defineProperty$1(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function _extends(){return _extends=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])}return c},_extends.apply(this,arguments)}function _objectSpread(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{},f=Object.keys(d);typeof Object.getOwnPropertySymbols=="function"&&(f=f.concat(Object.getOwnPropertySymbols(d).filter(function(h){return Object.getOwnPropertyDescriptor(d,h).enumerable}))),f.forEach(function(h){_defineProperty$1(c,h,d[h])})}return c}function _objectWithoutPropertiesLoose(c,u){if(c==null)return{};var d={},f=Object.keys(c),h,v;for(v=0;v<f.length;v++)h=f[v],!(u.indexOf(h)>=0)&&(d[h]=c[h]);return d}function _objectWithoutProperties(c,u){if(c==null)return{};var d=_objectWithoutPropertiesLoose(c,u),f,h;if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(c);for(h=0;h<v.length;h++)f=v[h],!(u.indexOf(f)>=0)&&Object.prototype.propertyIsEnumerable.call(c,f)&&(d[f]=c[f])}return d}var version="1.10.2";function userAgent(c){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(c)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(c,u,d){c.addEventListener(u,d,!IE11OrLess&&captureMode)}function off(c,u,d){c.removeEventListener(u,d,!IE11OrLess&&captureMode)}function matches(c,u){if(u){if(u[0]===">"&&(u=u.substring(1)),c)try{if(c.matches)return c.matches(u);if(c.msMatchesSelector)return c.msMatchesSelector(u);if(c.webkitMatchesSelector)return c.webkitMatchesSelector(u)}catch{return!1}return!1}}function getParentOrHost(c){return c.host&&c!==document&&c.host.nodeType?c.host:c.parentNode}function closest(c,u,d,f){if(c){d=d||document;do{if(u!=null&&(u[0]===">"?c.parentNode===d&&matches(c,u):matches(c,u))||f&&c===d)return c;if(c===d)break}while(c=getParentOrHost(c))}return null}var R_SPACE=/\s+/g;function toggleClass(c,u,d){if(c&&u)if(c.classList)c.classList[d?"add":"remove"](u);else{var f=(" "+c.className+" ").replace(R_SPACE," ").replace(" "+u+" "," ");c.className=(f+(d?" "+u:"")).replace(R_SPACE," ")}}function css(c,u,d){var f=c&&c.style;if(f){if(d===void 0)return document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(c,""):c.currentStyle&&(d=c.currentStyle),u===void 0?d:d[u];!(u in f)&&u.indexOf("webkit")===-1&&(u="-webkit-"+u),f[u]=d+(typeof d=="string"?"":"px")}}function matrix(c,u){var d="";if(typeof c=="string")d=c;else do{var f=css(c,"transform");f&&f!=="none"&&(d=f+" "+d)}while(!u&&(c=c.parentNode));var h=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return h&&new h(d)}function find(c,u,d){if(c){var f=c.getElementsByTagName(u),h=0,v=f.length;if(d)for(;h<v;h++)d(f[h],h);return f}return[]}function getWindowScrollingElement(){var c=document.scrollingElement;return c||document.documentElement}function getRect(c,u,d,f,h){if(!(!c.getBoundingClientRect&&c!==window)){var v,p,m,g,y,b,re;if(c!==window&&c!==getWindowScrollingElement()?(v=c.getBoundingClientRect(),p=v.top,m=v.left,g=v.bottom,y=v.right,b=v.height,re=v.width):(p=0,m=0,g=window.innerHeight,y=window.innerWidth,b=window.innerHeight,re=window.innerWidth),(u||d)&&c!==window&&(h=h||c.parentNode,!IE11OrLess))do if(h&&h.getBoundingClientRect&&(css(h,"transform")!=="none"||d&&css(h,"position")!=="static")){var x=h.getBoundingClientRect();p-=x.top+parseInt(css(h,"border-top-width")),m-=x.left+parseInt(css(h,"border-left-width")),g=p+v.height,y=m+v.width;break}while(h=h.parentNode);if(f&&c!==window){var vn=matrix(h||c),j=vn&&vn.a,Pn=vn&&vn.d;vn&&(p/=Pn,m/=j,re/=j,b/=Pn,g=p+b,y=m+re)}return{top:p,left:m,bottom:g,right:y,width:re,height:b}}}function isScrolledPast(c,u,d){for(var f=getParentAutoScrollElement(c,!0),h=getRect(c)[u];f;){var v=getRect(f)[d],p=void 0;if(d==="top"||d==="left"?p=h>=v:p=h<=v,!p)return f;if(f===getWindowScrollingElement())break;f=getParentAutoScrollElement(f,!1)}return!1}function getChild(c,u,d){for(var f=0,h=0,v=c.children;h<v.length;){if(v[h].style.display!=="none"&&v[h]!==Sortable.ghost&&v[h]!==Sortable.dragged&&closest(v[h],d.draggable,c,!1)){if(f===u)return v[h];f++}h++}return null}function lastChild(c,u){for(var d=c.lastElementChild;d&&(d===Sortable.ghost||css(d,"display")==="none"||u&&!matches(d,u));)d=d.previousElementSibling;return d||null}function index$2(c,u){var d=0;if(!c||!c.parentNode)return-1;for(;c=c.previousElementSibling;)c.nodeName.toUpperCase()!=="TEMPLATE"&&c!==Sortable.clone&&(!u||matches(c,u))&&d++;return d}function getRelativeScrollOffset(c){var u=0,d=0,f=getWindowScrollingElement();if(c)do{var h=matrix(c),v=h.a,p=h.d;u+=c.scrollLeft*v,d+=c.scrollTop*p}while(c!==f&&(c=c.parentNode));return[u,d]}function indexOfObject(c,u){for(var d in c)if(c.hasOwnProperty(d)){for(var f in u)if(u.hasOwnProperty(f)&&u[f]===c[d][f])return Number(d)}return-1}function getParentAutoScrollElement(c,u){if(!c||!c.getBoundingClientRect)return getWindowScrollingElement();var d=c,f=!1;do if(d.clientWidth<d.scrollWidth||d.clientHeight<d.scrollHeight){var h=css(d);if(d.clientWidth<d.scrollWidth&&(h.overflowX=="auto"||h.overflowX=="scroll")||d.clientHeight<d.scrollHeight&&(h.overflowY=="auto"||h.overflowY=="scroll")){if(!d.getBoundingClientRect||d===document.body)return getWindowScrollingElement();if(f||u)return d;f=!0}}while(d=d.parentNode);return getWindowScrollingElement()}function extend$1(c,u){if(c&&u)for(var d in u)u.hasOwnProperty(d)&&(c[d]=u[d]);return c}function isRectEqual(c,u){return Math.round(c.top)===Math.round(u.top)&&Math.round(c.left)===Math.round(u.left)&&Math.round(c.height)===Math.round(u.height)&&Math.round(c.width)===Math.round(u.width)}var _throttleTimeout;function throttle$1(c,u){return function(){if(!_throttleTimeout){var d=arguments,f=this;d.length===1?c.call(f,d[0]):c.apply(f,d),_throttleTimeout=setTimeout(function(){_throttleTimeout=void 0},u)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(c,u,d){c.scrollLeft+=u,c.scrollTop+=d}function clone(c){var u=window.Polymer,d=window.jQuery||window.Zepto;return u&&u.dom?u.dom(c).cloneNode(!0):d?d(c).clone(!0)[0]:c.cloneNode(!0)}var expando="Sortable"+new Date().getTime();function AnimationStateManager(){var c=[],u;return{captureAnimationState:function(){if(c=[],!!this.options.animation){var f=[].slice.call(this.el.children);f.forEach(function(h){if(!(css(h,"display")==="none"||h===Sortable.ghost)){c.push({target:h,rect:getRect(h)});var v=_objectSpread({},c[c.length-1].rect);if(h.thisAnimationDuration){var p=matrix(h,!0);p&&(v.top-=p.f,v.left-=p.e)}h.fromRect=v}})}},addAnimationState:function(f){c.push(f)},removeAnimationState:function(f){c.splice(indexOfObject(c,{target:f}),1)},animateAll:function(f){var h=this;if(!this.options.animation){clearTimeout(u),typeof f=="function"&&f();return}var v=!1,p=0;c.forEach(function(m){var g=0,y=m.target,b=y.fromRect,re=getRect(y),x=y.prevFromRect,vn=y.prevToRect,j=m.rect,Pn=matrix(y,!0);Pn&&(re.top-=Pn.f,re.left-=Pn.e),y.toRect=re,y.thisAnimationDuration&&isRectEqual(x,re)&&!isRectEqual(b,re)&&(j.top-re.top)/(j.left-re.left)===(b.top-re.top)/(b.left-re.left)&&(g=calculateRealTime(j,x,vn,h.options)),isRectEqual(re,b)||(y.prevFromRect=b,y.prevToRect=re,g||(g=h.options.animation),h.animate(y,j,re,g)),g&&(v=!0,p=Math.max(p,g),clearTimeout(y.animationResetTimer),y.animationResetTimer=setTimeout(function(){y.animationTime=0,y.prevFromRect=null,y.fromRect=null,y.prevToRect=null,y.thisAnimationDuration=null},g),y.thisAnimationDuration=g)}),clearTimeout(u),v?u=setTimeout(function(){typeof f=="function"&&f()},p):typeof f=="function"&&f(),c=[]},animate:function(f,h,v,p){if(p){css(f,"transition",""),css(f,"transform","");var m=matrix(this.el),g=m&&m.a,y=m&&m.d,b=(h.left-v.left)/(g||1),re=(h.top-v.top)/(y||1);f.animatingX=!!b,f.animatingY=!!re,css(f,"transform","translate3d("+b+"px,"+re+"px,0)"),repaint(f),css(f,"transition","transform "+p+"ms"+(this.options.easing?" "+this.options.easing:"")),css(f,"transform","translate3d(0,0,0)"),typeof f.animated=="number"&&clearTimeout(f.animated),f.animated=setTimeout(function(){css(f,"transition",""),css(f,"transform",""),f.animated=!1,f.animatingX=!1,f.animatingY=!1},p)}}}}function repaint(c){return c.offsetWidth}function calculateRealTime(c,u,d,f){return Math.sqrt(Math.pow(u.top-c.top,2)+Math.pow(u.left-c.left,2))/Math.sqrt(Math.pow(u.top-d.top,2)+Math.pow(u.left-d.left,2))*f.animation}var plugins=[],defaults$6={initializeByDefault:!0},PluginManager={mount:function(u){for(var d in defaults$6)defaults$6.hasOwnProperty(d)&&!(d in u)&&(u[d]=defaults$6[d]);plugins.push(u)},pluginEvent:function(u,d,f){var h=this;this.eventCanceled=!1,f.cancel=function(){h.eventCanceled=!0};var v=u+"Global";plugins.forEach(function(p){d[p.pluginName]&&(d[p.pluginName][v]&&d[p.pluginName][v](_objectSpread({sortable:d},f)),d.options[p.pluginName]&&d[p.pluginName][u]&&d[p.pluginName][u](_objectSpread({sortable:d},f)))})},initializePlugins:function(u,d,f,h){plugins.forEach(function(m){var g=m.pluginName;if(!(!u.options[g]&&!m.initializeByDefault)){var y=new m(u,d,u.options);y.sortable=u,y.options=u.options,u[g]=y,_extends(f,y.defaults)}});for(var v in u.options)if(u.options.hasOwnProperty(v)){var p=this.modifyOption(u,v,u.options[v]);typeof p<"u"&&(u.options[v]=p)}},getEventProperties:function(u,d){var f={};return plugins.forEach(function(h){typeof h.eventProperties=="function"&&_extends(f,h.eventProperties.call(d[h.pluginName],u))}),f},modifyOption:function(u,d,f){var h;return plugins.forEach(function(v){u[v.pluginName]&&v.optionListeners&&typeof v.optionListeners[d]=="function"&&(h=v.optionListeners[d].call(u[v.pluginName],f))}),h}};function dispatchEvent(c){var u=c.sortable,d=c.rootEl,f=c.name,h=c.targetEl,v=c.cloneEl,p=c.toEl,m=c.fromEl,g=c.oldIndex,y=c.newIndex,b=c.oldDraggableIndex,re=c.newDraggableIndex,x=c.originalEvent,vn=c.putSortable,j=c.extraEventProperties;if(u=u||d&&d[expando],!!u){var Pn,qn=u.options,Bn="on"+f.charAt(0).toUpperCase()+f.substr(1);window.CustomEvent&&!IE11OrLess&&!Edge?Pn=new CustomEvent(f,{bubbles:!0,cancelable:!0}):(Pn=document.createEvent("Event"),Pn.initEvent(f,!0,!0)),Pn.to=p||d,Pn.from=m||d,Pn.item=h||d,Pn.clone=v,Pn.oldIndex=g,Pn.newIndex=y,Pn.oldDraggableIndex=b,Pn.newDraggableIndex=re,Pn.originalEvent=x,Pn.pullMode=vn?vn.lastPutMode:void 0;var w=_objectSpread({},j,PluginManager.getEventProperties(f,u));for(var J in w)Pn[J]=w[J];d&&d.dispatchEvent(Pn),qn[Bn]&&qn[Bn].call(u,Pn)}}var pluginEvent=function(u,d){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=f.evt,v=_objectWithoutProperties(f,["evt"]);PluginManager.pluginEvent.bind(Sortable)(u,d,_objectSpread({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:h,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(m){_dispatchEvent({sortable:d,name:m,originalEvent:h})}},v))};function _dispatchEvent(c){dispatchEvent(_objectSpread({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},c))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var c=document.createElement("x");return c.style.cssText="pointer-events:auto",c.style.pointerEvents==="auto"}}(),_detectDirection=function(u,d){var f=css(u),h=parseInt(f.width)-parseInt(f.paddingLeft)-parseInt(f.paddingRight)-parseInt(f.borderLeftWidth)-parseInt(f.borderRightWidth),v=getChild(u,0,d),p=getChild(u,1,d),m=v&&css(v),g=p&&css(p),y=m&&parseInt(m.marginLeft)+parseInt(m.marginRight)+getRect(v).width,b=g&&parseInt(g.marginLeft)+parseInt(g.marginRight)+getRect(p).width;if(f.display==="flex")return f.flexDirection==="column"||f.flexDirection==="column-reverse"?"vertical":"horizontal";if(f.display==="grid")return f.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(v&&m.float&&m.float!=="none"){var re=m.float==="left"?"left":"right";return p&&(g.clear==="both"||g.clear===re)?"vertical":"horizontal"}return v&&(m.display==="block"||m.display==="flex"||m.display==="table"||m.display==="grid"||y>=h&&f[CSSFloatProperty]==="none"||p&&f[CSSFloatProperty]==="none"&&y+b>h)?"vertical":"horizontal"},_dragElInRowColumn=function(u,d,f){var h=f?u.left:u.top,v=f?u.right:u.bottom,p=f?u.width:u.height,m=f?d.left:d.top,g=f?d.right:d.bottom,y=f?d.width:d.height;return h===m||v===g||h+p/2===m+y/2},_detectNearestEmptySortable=function(u,d){var f;return sortables.some(function(h){if(!lastChild(h)){var v=getRect(h),p=h[expando].options.emptyInsertThreshold,m=u>=v.left-p&&u<=v.right+p,g=d>=v.top-p&&d<=v.bottom+p;if(p&&m&&g)return f=h}}),f},_prepareGroup=function(u){function d(v,p){return function(m,g,y,b){var re=m.options.group.name&&g.options.group.name&&m.options.group.name===g.options.group.name;if(v==null&&(p||re))return!0;if(v==null||v===!1)return!1;if(p&&v==="clone")return v;if(typeof v=="function")return d(v(m,g,y,b),p)(m,g,y,b);var x=(p?m:g).options.group.name;return v===!0||typeof v=="string"&&v===x||v.join&&v.indexOf(x)>-1}}var f={},h=u.group;(!h||_typeof$2(h)!="object")&&(h={name:h}),f.name=h.name,f.checkPull=d(h.pull,!0),f.checkPut=d(h.put),f.revertClone=h.revertClone,u.group=f},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&document.addEventListener("click",function(c){if(ignoreNextClick)return c.preventDefault(),c.stopPropagation&&c.stopPropagation(),c.stopImmediatePropagation&&c.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function(u){if(dragEl){u=u.touches?u.touches[0]:u;var d=_detectNearestEmptySortable(u.clientX,u.clientY);if(d){var f={};for(var h in u)u.hasOwnProperty(h)&&(f[h]=u[h]);f.target=f.rootEl=d,f.preventDefault=void 0,f.stopPropagation=void 0,d[expando]._onDragOver(f)}}},_checkOutsideTargetEl=function(u){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(u.target)};function Sortable(c,u){if(!(c&&c.nodeType&&c.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(c));this.el=c,this.options=u=_extends({},u),c[expando]=this;var d={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(c.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(c,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(p,m){p.setData("Text",m.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};PluginManager.initializePlugins(this,c,d);for(var f in d)!(f in u)&&(u[f]=d[f]);_prepareGroup(u);for(var h in this)h.charAt(0)==="_"&&typeof this[h]=="function"&&(this[h]=this[h].bind(this));this.nativeDraggable=u.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),u.supportPointer?on(c,"pointerdown",this._onTapStart):(on(c,"mousedown",this._onTapStart),on(c,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(c,"dragover",this),on(c,"dragenter",this)),sortables.push(this.el),u.store&&u.store.get&&this.sort(u.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(u){!this.el.contains(u)&&u!==this.el&&(lastTarget=null)},_getDirection:function(u,d){return typeof this.options.direction=="function"?this.options.direction.call(this,u,d,dragEl):this.options.direction},_onTapStart:function(u){if(u.cancelable){var d=this,f=this.el,h=this.options,v=h.preventOnFilter,p=u.type,m=u.touches&&u.touches[0]||u.pointerType&&u.pointerType==="touch"&&u,g=(m||u).target,y=u.target.shadowRoot&&(u.path&&u.path[0]||u.composedPath&&u.composedPath()[0])||g,b=h.filter;if(_saveInputCheckedState(f),!dragEl&&!(/mousedown|pointerdown/.test(p)&&u.button!==0||h.disabled)&&!y.isContentEditable&&(g=closest(g,h.draggable,f,!1),!(g&&g.animated)&&lastDownEl!==g)){if(oldIndex=index$2(g),oldDraggableIndex=index$2(g,h.draggable),typeof b=="function"){if(b.call(this,u,g,this)){_dispatchEvent({sortable:d,rootEl:y,name:"filter",targetEl:g,toEl:f,fromEl:f}),pluginEvent("filter",d,{evt:u}),v&&u.cancelable&&u.preventDefault();return}}else if(b&&(b=b.split(",").some(function(re){if(re=closest(y,re.trim(),f,!1),re)return _dispatchEvent({sortable:d,rootEl:re,name:"filter",targetEl:g,fromEl:f,toEl:f}),pluginEvent("filter",d,{evt:u}),!0}),b)){v&&u.cancelable&&u.preventDefault();return}h.handle&&!closest(y,h.handle,f,!1)||this._prepareDragStart(u,m,g)}}},_prepareDragStart:function(u,d,f){var h=this,v=h.el,p=h.options,m=v.ownerDocument,g;if(f&&!dragEl&&f.parentNode===v){var y=getRect(f);if(rootEl=v,dragEl=f,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=f,activeGroup=p.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(d||u).clientX,clientY:(d||u).clientY},tapDistanceLeft=tapEvt.clientX-y.left,tapDistanceTop=tapEvt.clientY-y.top,this._lastX=(d||u).clientX,this._lastY=(d||u).clientY,dragEl.style["will-change"]="all",g=function(){if(pluginEvent("delayEnded",h,{evt:u}),Sortable.eventCanceled){h._onDrop();return}h._disableDelayedDragEvents(),!FireFox&&h.nativeDraggable&&(dragEl.draggable=!0),h._triggerDragStart(u,d),_dispatchEvent({sortable:h,name:"choose",originalEvent:u}),toggleClass(dragEl,p.chosenClass,!0)},p.ignore.split(",").forEach(function(b){find(dragEl,b.trim(),_disableDraggable)}),on(m,"dragover",nearestEmptyInsertDetectEvent),on(m,"mousemove",nearestEmptyInsertDetectEvent),on(m,"touchmove",nearestEmptyInsertDetectEvent),on(m,"mouseup",h._onDrop),on(m,"touchend",h._onDrop),on(m,"touchcancel",h._onDrop),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:u}),p.delay&&(!p.delayOnTouchOnly||d)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}on(m,"mouseup",h._disableDelayedDrag),on(m,"touchend",h._disableDelayedDrag),on(m,"touchcancel",h._disableDelayedDrag),on(m,"mousemove",h._delayedDragTouchMoveHandler),on(m,"touchmove",h._delayedDragTouchMoveHandler),p.supportPointer&&on(m,"pointermove",h._delayedDragTouchMoveHandler),h._dragStartTimer=setTimeout(g,p.delay)}else g()}},_delayedDragTouchMoveHandler:function(u){var d=u.touches?u.touches[0]:u;Math.max(Math.abs(d.clientX-this._lastX),Math.abs(d.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var u=this.el.ownerDocument;off(u,"mouseup",this._disableDelayedDrag),off(u,"touchend",this._disableDelayedDrag),off(u,"touchcancel",this._disableDelayedDrag),off(u,"mousemove",this._delayedDragTouchMoveHandler),off(u,"touchmove",this._delayedDragTouchMoveHandler),off(u,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(u,d){d=d||u.pointerType=="touch"&&u,!this.nativeDraggable||d?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):d?on(document,"touchmove",this._onTouchMove):on(document,"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(u,d){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:d}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var f=this.options;!u&&toggleClass(dragEl,f.dragClass,!1),toggleClass(dragEl,f.ghostClass,!0),Sortable.active=this,u&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:d})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var u=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),d=u;u&&u.shadowRoot&&(u=u.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),u!==d);)d=u;if(dragEl.parentNode[expando]._isOutsideThisEl(u),d)do{if(d[expando]){var f=void 0;if(f=d[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:u,rootEl:d}),f&&!this.options.dragoverBubble)break}u=d}while(d=d.parentNode);_unhideGhostForTarget()}},_onTouchMove:function(u){if(tapEvt){var d=this.options,f=d.fallbackTolerance,h=d.fallbackOffset,v=u.touches?u.touches[0]:u,p=ghostEl&&matrix(ghostEl,!0),m=ghostEl&&p&&p.a,g=ghostEl&&p&&p.d,y=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),b=(v.clientX-tapEvt.clientX+h.x)/(m||1)+(y?y[0]-ghostRelativeParentInitialScroll[0]:0)/(m||1),re=(v.clientY-tapEvt.clientY+h.y)/(g||1)+(y?y[1]-ghostRelativeParentInitialScroll[1]:0)/(g||1);if(!Sortable.active&&!awaitingDragStarted){if(f&&Math.max(Math.abs(v.clientX-this._lastX),Math.abs(v.clientY-this._lastY))<f)return;this._onDragStart(u,!0)}if(ghostEl){p?(p.e+=b-(lastDx||0),p.f+=re-(lastDy||0)):p={a:1,b:0,c:0,d:1,e:b,f:re};var x="matrix(".concat(p.a,",").concat(p.b,",").concat(p.c,",").concat(p.d,",").concat(p.e,",").concat(p.f,")");css(ghostEl,"webkitTransform",x),css(ghostEl,"mozTransform",x),css(ghostEl,"msTransform",x),css(ghostEl,"transform",x),lastDx=b,lastDy=re,touchEvt=v}u.cancelable&&u.preventDefault()}},_appendGhost:function(){if(!ghostEl){var u=this.options.fallbackOnBody?document.body:rootEl,d=getRect(dragEl,!0,PositionGhostAbsolutely,!0,u),f=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=u;css(ghostRelativeParent,"position")==="static"&&css(ghostRelativeParent,"transform")==="none"&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),d.top+=ghostRelativeParent.scrollTop,d.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(!0),toggleClass(ghostEl,f.ghostClass,!1),toggleClass(ghostEl,f.fallbackClass,!0),toggleClass(ghostEl,f.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",d.top),css(ghostEl,"left",d.left),css(ghostEl,"width",d.width),css(ghostEl,"height",d.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,u.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function(u,d){var f=this,h=u.dataTransfer,v=f.options;if(pluginEvent("dragStart",this,{evt:u}),Sortable.eventCanceled){this._onDrop();return}pluginEvent("setupClone",this),Sortable.eventCanceled||(cloneEl=clone(dragEl),cloneEl.draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),f.cloneId=_nextTick(function(){pluginEvent("clone",f),!Sortable.eventCanceled&&(f.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),f._hideClone(),_dispatchEvent({sortable:f,name:"clone"}))}),!d&&toggleClass(dragEl,v.dragClass,!0),d?(ignoreNextClick=!0,f._loopId=setInterval(f._emulateDragOver,50)):(off(document,"mouseup",f._onDrop),off(document,"touchend",f._onDrop),off(document,"touchcancel",f._onDrop),h&&(h.effectAllowed="move",v.setData&&v.setData.call(f,h,dragEl)),on(document,"drop",f),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,f._dragStartId=_nextTick(f._dragStarted.bind(f,d,u)),on(document,"selectstart",f),moved=!0,Safari&&css(document.body,"user-select","none")},_onDragOver:function(u){var d=this.el,f=u.target,h,v,p,m=this.options,g=m.group,y=Sortable.active,b=activeGroup===g,re=m.sort,x=putSortable||y,vn,j=this,Pn=!1;if(_silent)return;function qn(Zn,Hn){pluginEvent(Zn,j,_objectSpread({evt:u,isOwner:b,axis:vn?"vertical":"horizontal",revert:p,dragRect:h,targetRect:v,canSort:re,fromSortable:x,target:f,completed:w,onMove:function(er,Kn){return _onMove(rootEl,d,dragEl,h,er,getRect(er),u,Kn)},changed:J},Hn))}function Bn(){qn("dragOverAnimationCapture"),j.captureAnimationState(),j!==x&&x.captureAnimationState()}function w(Zn){return qn("dragOverCompleted",{insertion:Zn}),Zn&&(b?y._hideClone():y._showClone(j),j!==x&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:y.options.ghostClass,!1),toggleClass(dragEl,m.ghostClass,!0)),putSortable!==j&&j!==Sortable.active?putSortable=j:j===Sortable.active&&putSortable&&(putSortable=null),x===j&&(j._ignoreWhileAnimating=f),j.animateAll(function(){qn("dragOverAnimationComplete"),j._ignoreWhileAnimating=null}),j!==x&&(x.animateAll(),x._ignoreWhileAnimating=null)),(f===dragEl&&!dragEl.animated||f===d&&!f.animated)&&(lastTarget=null),!m.dragoverBubble&&!u.rootEl&&f!==document&&(dragEl.parentNode[expando]._isOutsideThisEl(u.target),!Zn&&nearestEmptyInsertDetectEvent(u)),!m.dragoverBubble&&u.stopPropagation&&u.stopPropagation(),Pn=!0}function J(){newIndex=index$2(dragEl),newDraggableIndex=index$2(dragEl,m.draggable),_dispatchEvent({sortable:j,name:"change",toEl:d,newIndex,newDraggableIndex,originalEvent:u})}if(u.preventDefault!==void 0&&u.cancelable&&u.preventDefault(),f=closest(f,m.draggable,d,!0),qn("dragOver"),Sortable.eventCanceled)return Pn;if(dragEl.contains(u.target)||f.animated&&f.animatingX&&f.animatingY||j._ignoreWhileAnimating===f)return w(!1);if(ignoreNextClick=!1,y&&!m.disabled&&(b?re||(p=!rootEl.contains(dragEl)):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,y,dragEl,u))&&g.checkPut(this,y,dragEl,u))){if(vn=this._getDirection(u,f)==="vertical",h=getRect(dragEl),qn("dragOverValid"),Sortable.eventCanceled)return Pn;if(p)return parentEl=rootEl,Bn(),this._hideClone(),qn("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),w(!0);var gn=lastChild(d,m.draggable);if(!gn||_ghostIsLast(u,vn,this)&&!gn.animated){if(gn===dragEl)return w(!1);if(gn&&d===u.target&&(f=gn),f&&(v=getRect(f)),_onMove(rootEl,d,dragEl,h,f,v,u,!!f)!==!1)return Bn(),d.appendChild(dragEl),parentEl=d,J(),w(!0)}else if(f.parentNode===d){v=getRect(f);var Rn=0,zn,Wn=dragEl.parentNode!==d,Yn=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||h,f.animated&&f.toRect||v,vn),Jn=vn?"top":"left",tr=isScrolledPast(f,"top","top")||isScrolledPast(dragEl,"top","top"),nr=tr?tr.scrollTop:void 0;lastTarget!==f&&(zn=v[Jn],pastFirstInvertThresh=!1,isCircumstantialInvert=!Yn&&m.invertSwap||Wn),Rn=_getSwapDirection(u,f,v,vn,Yn?1:m.swapThreshold,m.invertedSwapThreshold==null?m.swapThreshold:m.invertedSwapThreshold,isCircumstantialInvert,lastTarget===f);var Qn;if(Rn!==0){var ar=index$2(dragEl);do ar-=Rn,Qn=parentEl.children[ar];while(Qn&&(css(Qn,"display")==="none"||Qn===ghostEl))}if(Rn===0||Qn===f)return w(!1);lastTarget=f,lastDirection=Rn;var cr=f.nextElementSibling,fr=!1;fr=Rn===1;var Gn=_onMove(rootEl,d,dragEl,h,f,v,u,fr);if(Gn!==!1)return(Gn===1||Gn===-1)&&(fr=Gn===1),_silent=!0,setTimeout(_unsilent,30),Bn(),fr&&!cr?d.appendChild(dragEl):f.parentNode.insertBefore(dragEl,fr?cr:f),tr&&scrollBy(tr,0,nr-tr.scrollTop),parentEl=dragEl.parentNode,zn!==void 0&&!isCircumstantialInvert&&(targetMoveDistance=Math.abs(zn-getRect(f)[Jn])),J(),w(!0)}if(d.contains(dragEl))return w(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function(){var u=this.el.ownerDocument;off(u,"mouseup",this._onDrop),off(u,"touchend",this._onDrop),off(u,"pointerup",this._onDrop),off(u,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function(u){var d=this.el,f=this.options;if(newIndex=index$2(dragEl),newDraggableIndex=index$2(dragEl,f.draggable),pluginEvent("drop",this,{evt:u}),parentEl=dragEl&&dragEl.parentNode,newIndex=index$2(dragEl),newDraggableIndex=index$2(dragEl,f.draggable),Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(d,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),u&&(moved&&(u.cancelable&&u.preventDefault(),!f.dropBubble&&u.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&putSortable.lastPutMode!=="clone")&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:u}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:u}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:u}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:u}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:u})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:u}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:u})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:u}),this.save()))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(u){u.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(u){switch(u.type){case"drop":case"dragend":this._onDrop(u);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(u),_globalDragOver(u));break;case"selectstart":u.preventDefault();break}},toArray:function(){for(var u=[],d,f=this.el.children,h=0,v=f.length,p=this.options;h<v;h++)d=f[h],closest(d,p.draggable,this.el,!1)&&u.push(d.getAttribute(p.dataIdAttr)||_generateId(d));return u},sort:function(u){var d={},f=this.el;this.toArray().forEach(function(h,v){var p=f.children[v];closest(p,this.options.draggable,f,!1)&&(d[h]=p)},this),u.forEach(function(h){d[h]&&(f.removeChild(d[h]),f.appendChild(d[h]))})},save:function(){var u=this.options.store;u&&u.set&&u.set(this)},closest:function(u,d){return closest(u,d||this.options.draggable,this.el,!1)},option:function(u,d){var f=this.options;if(d===void 0)return f[u];var h=PluginManager.modifyOption(this,u,d);typeof h<"u"?f[u]=h:f[u]=d,u==="group"&&_prepareGroup(f)},destroy:function(){pluginEvent("destroy",this);var u=this.el;u[expando]=null,off(u,"mousedown",this._onTapStart),off(u,"touchstart",this._onTapStart),off(u,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(u,"dragover",this),off(u,"dragenter",this)),Array.prototype.forEach.call(u.querySelectorAll("[draggable]"),function(d){d.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=u=null},_hideClone:function(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function(u){if(u.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;rootEl.contains(dragEl)&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}};function _globalDragOver(c){c.dataTransfer&&(c.dataTransfer.dropEffect="move"),c.cancelable&&c.preventDefault()}function _onMove(c,u,d,f,h,v,p,m){var g,y=c[expando],b=y.options.onMove,re;return window.CustomEvent&&!IE11OrLess&&!Edge?g=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent("move",!0,!0)),g.to=u,g.from=c,g.dragged=d,g.draggedRect=f,g.related=h||u,g.relatedRect=v||getRect(u),g.willInsertAfter=m,g.originalEvent=p,c.dispatchEvent(g),b&&(re=b.call(y,g,p)),re}function _disableDraggable(c){c.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsLast(c,u,d){var f=getRect(lastChild(d.el,d.options.draggable)),h=10;return u?c.clientX>f.right+h||c.clientX<=f.right&&c.clientY>f.bottom&&c.clientX>=f.left:c.clientX>f.right&&c.clientY>f.top||c.clientX<=f.right&&c.clientY>f.bottom+h}function _getSwapDirection(c,u,d,f,h,v,p,m){var g=f?c.clientY:c.clientX,y=f?d.height:d.width,b=f?d.top:d.left,re=f?d.bottom:d.right,x=!1;if(!p){if(m&&targetMoveDistance<y*h){if(!pastFirstInvertThresh&&(lastDirection===1?g>b+y*v/2:g<re-y*v/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)x=!0;else if(lastDirection===1?g<b+targetMoveDistance:g>re-targetMoveDistance)return-lastDirection}else if(g>b+y*(1-h)/2&&g<re-y*(1-h)/2)return _getInsertDirection(u)}return x=x||p,x&&(g<b+y*v/2||g>re-y*v/2)?g>b+y/2?1:-1:0}function _getInsertDirection(c){return index$2(dragEl)<index$2(c)?1:-1}function _generateId(c){for(var u=c.tagName+c.className+c.src+c.href+c.textContent,d=u.length,f=0;d--;)f+=u.charCodeAt(d);return f.toString(36)}function _saveInputCheckedState(c){savedInputChecked.length=0;for(var u=c.getElementsByTagName("input"),d=u.length;d--;){var f=u[d];f.checked&&savedInputChecked.push(f)}}function _nextTick(c){return setTimeout(c,0)}function _cancelNextTick(c){return clearTimeout(c)}documentExists&&on(document,"touchmove",function(c){(Sortable.active||awaitingDragStarted)&&c.cancelable&&c.preventDefault()}),Sortable.utils={on,off,css,find,is:function(u,d){return!!closest(u,d,u,!1)},extend:extend$1,throttle:throttle$1,closest,toggleClass,clone,index:index$2,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild},Sortable.get=function(c){return c[expando]},Sortable.mount=function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];u[0].constructor===Array&&(u=u[0]),u.forEach(function(f){if(!f.prototype||!f.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(f));f.utils&&(Sortable.utils=_objectSpread({},Sortable.utils,f.utils)),PluginManager.mount(f)})},Sortable.create=function(c,u){return new Sortable(c,u)},Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function c(){this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var u in this)u.charAt(0)==="_"&&typeof this[u]=="function"&&(this[u]=this[u].bind(this))}return c.prototype={dragStarted:function(d){var f=d.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):f.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(d){var f=d.originalEvent;!this.options.dragOverBubble&&!f.rootEl&&this._handleAutoScroll(f)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(d){this._handleAutoScroll(d,!0)},_handleAutoScroll:function(d,f){var h=this,v=(d.touches?d.touches[0]:d).clientX,p=(d.touches?d.touches[0]:d).clientY,m=document.elementFromPoint(v,p);if(touchEvt$1=d,f||Edge||IE11OrLess||Safari){autoScroll(d,this.options,m,f);var g=getParentAutoScrollElement(m,!0);scrolling&&(!pointerElemChangedInterval||v!==lastAutoScrollX||p!==lastAutoScrollY)&&(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval(function(){var y=getParentAutoScrollElement(document.elementFromPoint(v,p),!0);y!==g&&(g=y,clearAutoScrolls()),autoScroll(d,h.options,y,f)},10),lastAutoScrollX=v,lastAutoScrollY=p)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(m,!0)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(d,this.options,getParentAutoScrollElement(m,!1),!1)}}},_extends(c,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach(function(c){clearInterval(c.pid)}),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle$1(function(c,u,d,f){if(u.scroll){var h=(c.touches?c.touches[0]:c).clientX,v=(c.touches?c.touches[0]:c).clientY,p=u.scrollSensitivity,m=u.scrollSpeed,g=getWindowScrollingElement(),y=!1,b;scrollRootEl!==d&&(scrollRootEl=d,clearAutoScrolls(),scrollEl=u.scroll,b=u.scrollFn,scrollEl===!0&&(scrollEl=getParentAutoScrollElement(d,!0)));var re=0,x=scrollEl;do{var vn=x,j=getRect(vn),Pn=j.top,qn=j.bottom,Bn=j.left,w=j.right,J=j.width,gn=j.height,Rn=void 0,zn=void 0,Wn=vn.scrollWidth,Yn=vn.scrollHeight,Jn=css(vn),tr=vn.scrollLeft,nr=vn.scrollTop;vn===g?(Rn=J<Wn&&(Jn.overflowX==="auto"||Jn.overflowX==="scroll"||Jn.overflowX==="visible"),zn=gn<Yn&&(Jn.overflowY==="auto"||Jn.overflowY==="scroll"||Jn.overflowY==="visible")):(Rn=J<Wn&&(Jn.overflowX==="auto"||Jn.overflowX==="scroll"),zn=gn<Yn&&(Jn.overflowY==="auto"||Jn.overflowY==="scroll"));var Qn=Rn&&(Math.abs(w-h)<=p&&tr+J<Wn)-(Math.abs(Bn-h)<=p&&!!tr),ar=zn&&(Math.abs(qn-v)<=p&&nr+gn<Yn)-(Math.abs(Pn-v)<=p&&!!nr);if(!autoScrolls[re])for(var cr=0;cr<=re;cr++)autoScrolls[cr]||(autoScrolls[cr]={});(autoScrolls[re].vx!=Qn||autoScrolls[re].vy!=ar||autoScrolls[re].el!==vn)&&(autoScrolls[re].el=vn,autoScrolls[re].vx=Qn,autoScrolls[re].vy=ar,clearInterval(autoScrolls[re].pid),(Qn!=0||ar!=0)&&(y=!0,autoScrolls[re].pid=setInterval((function(){f&&this.layer===0&&Sortable.active._onTouchMove(touchEvt$1);var fr=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*m:0,Gn=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*m:0;typeof b=="function"&&b.call(Sortable.dragged.parentNode[expando],Gn,fr,c,touchEvt$1,autoScrolls[this.layer].el)!=="continue"||scrollBy(autoScrolls[this.layer].el,Gn,fr)}).bind({layer:re}),24))),re++}while(u.bubbleScroll&&x!==g&&(x=getParentAutoScrollElement(x,!1)));scrolling=y}},30),drop=function(u){var d=u.originalEvent,f=u.putSortable,h=u.dragEl,v=u.activeSortable,p=u.dispatchSortableEvent,m=u.hideGhostForTarget,g=u.unhideGhostForTarget;if(d){var y=f||v;m();var b=d.changedTouches&&d.changedTouches.length?d.changedTouches[0]:d,re=document.elementFromPoint(b.clientX,b.clientY);g(),y&&!y.el.contains(re)&&(p("spill"),this.onSpill({dragEl:h,putSortable:f}))}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function(u){var d=u.oldDraggableIndex;this.startIndex=d},onSpill:function(u){var d=u.dragEl,f=u.putSortable;this.sortable.captureAnimationState(),f&&f.captureAnimationState();var h=getChild(this.sortable.el,this.startIndex,this.options);h?this.sortable.el.insertBefore(d,h):this.sortable.el.appendChild(d),this.sortable.animateAll(),f&&f.animateAll()},drop},_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function(u){var d=u.dragEl,f=u.putSortable,h=f||this.sortable;h.captureAnimationState(),d.parentNode&&d.parentNode.removeChild(d),h.animateAll()},drop},_extends(Remove,{pluginName:"removeOnSpill"}),Sortable.mount(new AutoScrollPlugin),Sortable.mount(Remove,Revert);const LastDetail_vue_vue_type_style_index_0_scoped_c6884ec5_lang="",LastDetail_vue_vue_type_style_index_1_lang="";dayjs.locale("zh-cn");const _sfc_main$v=vue.defineComponent({name:"LastDetail",components:{ATable:antDesignVue.Table,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,CustomModal},props:{theme:{type:String,default:"light"},theDateInfo:{type:Object,default:()=>({})},scaleValue:{type:Object,default:()=>({})},fontSize:{type:Number,default:16},allDimensions:{type:Array,default:()=>[]}},setup(c,{emit:u,expose:d}){const f="-",h=window.screen.height*.6,v=`dtmodal_${nanoid(6)}`,p=vue.ref(!1),m=vue.ref(!0),g=vue.ref(!1),y=vue.ref(!1),b=vue.ref(!1),re=vue.ref([]),x=vue.ref([]),vn=vue.ref<any>{x:"max-content"},j=vue.ref(),Pn=vue.ref(),qn=vue.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showLessItems:!0,showTotal:er=>`共 ${er} 条数据`}),Bn=vue.ref(""),w=vue.ref(""),J=vue.ref(),gn=vue.inject("isMobile",!1),Rn=vue.computed(()=>INDICATOR_URL),zn=vue.computed(()=>vue.unref(gn)?"16px":c.fontSize+"px"),Wn=()=>document.querySelector("#modalContainer")||document.body,Yn=er=>{const Kn=document.querySelector(`.${v} .ant-modal-header`);if(Kn)if(er)Kn.addEventListener("mousedown",tr);else{const ir=Kn.parentElement;ir&&(ir.style.left="",ir.style.top=""),Kn.removeEventListener("mousedown",tr)}},Jn=er=>{const Kn=document.querySelector(`.${v} .ant-modal-header`);Kn&&(er?Kn.addEventListener("dblclick",nr):Kn.removeEventListener("dblclick",nr))},tr=er=>{dragModalAction(er,`.${v} .ant-modal-header`)},nr=()=>{m.value=!m.value,vue.nextTick(()=>{m.value?Yn(!1):Yn(!0),ar()})},Qn=()=>{Jn(!1),Yn(!1),u("close")},ar=()=>{var er;(er=vue.unref(x))!=null&&er.length?setTimeout(()=>{var ir,ur,or;const Kn=(ur=(ir=vue.unref(j))==null?void 0:ir.querySelector(".last-detail-table .ant-table-thead"))==null?void 0:ur.clientHeight;if(Kn){let sr=h;if(vue.unref(m)){const dr=document.querySelector(`.${v} .ant-modal-content`);dr&&(sr=dr.clientHeight-((or=dr.querySelector(".ant-modal-header"))==null?void 0:or.clientHeight)-48)}isNaN(sr)||(vue.unref(vn).y=sr-Kn+"px")}b.value=!0},200):(vn.value={},b.value=!0)},cr=()=>{setTimeout(()=>{var er;Sortable.create((er=vue.unref(j))==null?void 0:er.querySelector(".last-detail-table .ant-table-thead > tr"),{handle:"th.ant-table-cell",onEnd:({newIndex:Kn,oldIndex:ir})=>{Kn!==ir&&swapArrItem(vue.unref(re),Kn,ir)}})},200)};async function fr(er){var Er,_r;y.value=!0,g.value=!0;const Kn=((Er=window==null?void 0:window.config)==null?void 0:Er.indicatorToken)||"",{record:ir,dimOpts:ur,column:or,formatParams:sr,cpntProps:dr={},drillDetailUrl:Xn,drillConditions:lr}=er,{indicatorList:hr=[]}=sr,vr=hr.find(Cr=>Cr.label===or.dataIndex),yr={};for(const Cr in ir){const xr=ur.find(Ar=>Ar.name===Cr);xr&&(yr[xr.typeGuid]=ir[Cr])}const{startTime:br,endTime:pr,rangeFormat:mr}=c.theDateInfo;if(br&&pr&&(yr.startTime=dayjs(br).format(mr),yr.endTime=dayjs(pr).format(mr)),J.value=yr,Xn)m.value=!0,Bn.value=Xn,w.value=encodeURIComponent(JSON.stringify({indexCode:(vr==null?void 0:vr.hrpIndexCode)||"",indexName:vr.label,theFlag:dr.theFlag,param:yr,conditions:lr})),y.value=!1;else{const Cr=await request.post(`${vue.unref(Rn)}/diagram/obtainDataSetData`,{pageId:getPageId(),indexCode:(vr==null?void 0:vr.hrpIndexCode)||"",indexName:vr.label,theFlag:dr.theFlag,param:yr},{headers:{Authentication:Kn,operateContext:CONTEXT}}),{columns:xr=[],data:Ar=[]}=((_r=Cr==null?void 0:Cr.data)==null?void 0:_r.data)||{};re.value=xr.filter(gr=>gr).map(gr=>({title:gr,dataIndex:gr,width:"120px",customHeaderCell:()=>({class:{"left-align":!0}}),customCell:(wr,Tr,Pr)=>({[vue.unref(gn)?"onClick":"onDblclick"]:()=>{var Vr,Hr;const Dr=((Vr=window==null?void 0:window.config)==null?void 0:Vr.detailDrillUrl)||"",Kr=((Hr=window==null?void 0:window.config)==null?void 0:Hr.detailDrillTitle)||"";Dr&&mn(wr,"orgCode")&&mn(wr,"visitId")&&mn(wr,"mpiId")&&(p.value=!0,vue.nextTick(()=>{vue.unref(Pn).showModal({record:wr,linkUrl:Dr,title:Kr})}))}}),sorter:(wr,Tr)=>{let Pr=wr[gr],Dr=Tr[gr];return isNaN(parseFloat(Pr))&&(Pr!=null&&Pr.localeCompare)?Pr.localeCompare(Dr,"zh-CN"):isThousandWithUnit(Pr)||isThousandWithUnit(Dr)?parseFloat(Pr.replace(/,/g,""))-parseFloat(Dr.replace(/,/g,"")):isValidDateStr(Pr)&&isValidDateStr(Dr)?new Date(Pr)-new Date(Dr):parseFloat(Pr)-parseFloat(Dr)}})),x.value=Ar.map(gr=>({...gr,uid:nanoid(6)})),y.value=!1,ar(),cr()}vue.nextTick(()=>{Jn(!0)})}const Gn=er=>{vue.unref(qn).current=er.current},Zn=vue.computed(()=>{let er=`last-detail-modal ${v}`;return(vue.unref(gn)||m.value)&&(er+=" full"),c.theme==="darkBlue"&&(er+=" darkBlue"),vue.unref(Bn)||(er+=" table"),er}),Hn=vue.computed(()=>vue.unref(gn)?{padding:"10px 0"}:{height:vue.unref(m)?"":h+48+"px",overflow:"hidden"});return d({getRecordData:()=>{const er=vue.unref(J).the_date,{startTime:Kn,endTime:ir}=vue.unref(J),ur={};er?ur.时间范围=er:ur.时间范围=`${Kn}至${ir}`;for(const or in vue.unref(J))if(!["startTime","endTime","the_date"].includes(or)){const sr=c.allDimensions.find(dr=>dr.typeGuid===or);sr&&(ur[sr.title||sr.label]=vue.unref(J)[or])}return{drillContext:ur,data:vue.toRaw(vue.unref(x)),type:"detailTable"}},showModal:fr,visible:g}),{visible:g,requestLoading:y,pagination:qn,columns:re,dataSource:x,wrapClassName:Zn,detailBodyStyle:Hn,isMobile:gn,urlJsonStr:w,drillDetailUrl:Bn,isIndFullScreen:m,tableFontSize:zn,tableScroll:vn,tableRef:j,customModalRef:Pn,isLoadedTable:b,isShowCustomModal:p,defaultValue:f,handleTableChange:Gn,getContainer:Wn,onDetailCancel:Qn,toggleFullScreen:nr}}}),_withScopeId$6=c=>(vue.pushScopeId("data-v-c6884ec5"),c=c(),vue.popScopeId(),c),_hoisted_1$m=_withScopeId$6(()=>vue.createElementVNode("div",{style:{"font-size":"18px"}},"指标明细",-1)),_hoisted_2$c=["src"],_hoisted_3$6={key:0,class:"spin-container"},_hoisted_4$5=["title"],_hoisted_5$4=["title"];function _sfc_render$A(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("a-spin"),b=vue.resolveComponent("a-table"),re=vue.resolveComponent("a-modal"),x=vue.resolveComponent("custom-modal");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(re,{wrapClassName:c.wrapClassName,visible:c.visible,"onUpdate:visible":u[1]||(u[1]=vn=>c.visible=vn),width:"60%",destroyOnClose:!0,footer:null,bodyStyle:c.detailBodyStyle,getContainer:c.getContainer,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[_hoisted_1$m]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>{var vn;return[vue.createElementVNode("div",{class:"zoom-btn",onClick:u[0]||(u[0]=(...j)=>c.toggleFullScreen&&c.toggleFullScreen(...j))},[c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"]))]),c.drillDetailUrl&&c.urlJsonStr?(vue.openBlock(),vue.createElementBlock("iframe",{key:0,src:`${c.drillDetailUrl}${c.drillDetailUrl.includes("?")?"&":"?"}params=${c.urlJsonStr}`,frameborder:"0",width:"100%",height:"100%"},`\r
|
|
109
|
-
`,8,_hoisted_2$c)):c.drillDetailUrl?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[c.isLoadedTable?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$6,[vue.createVNode(y,{size:"large"})])),c.requestLoading?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:1,ref:"tableRef",style:vue.normalizeStyle({visibility:c.isLoadedTable?"visible":"hidden"})},[vue.createVNode(b,{class:"last-detail-table",size:"small","row-key":j=>j.uid,columns:c.columns,"data-source":c.dataSource,pagination:!1,"row-class-name":(j,Pn)=>Pn%2===1?"table-striped":null,scroll:c.isMobile?{x:"max-content",y:"70vh"}:c.tableScroll,showHeader:!!((vn=c.dataSource)!=null&&vn.length),onChange:c.handleTableChange},{headerCell:vue.withCtx(({title:j})=>[vue.createElementVNode("div",{title:j,style:vue.normalizeStyle({fontSize:c.tableFontSize,fontWeight:600})},vue.toDisplayString(j),13,_hoisted_4$5)]),bodyCell:vue.withCtx(({text:j})=>[vue.createElementVNode("div",{title:j,style:vue.normalizeStyle({fontSize:c.tableFontSize})},vue.toDisplayString(j||c.defaultValue),13,_hoisted_5$4)]),_:1},8,["row-key","columns","data-source","row-class-name","scroll","showHeader","onChange"])],4))],64))]}),_:1},8,["wrapClassName","visible","bodyStyle","getContainer","onCancel"]),c.isShowCustomModal?(vue.openBlock(),vue.createBlock(x,{key:0,ref:"customModalRef",theme:c.theme,onClose:c.onCloseCustomModal},null,8,["theme","onClose"])):vue.createCommentVNode("",!0)],64)}const LastDetail=_export_sfc$1(_sfc_main$v,[["render",_sfc_render$A],["__scopeId","data-v-c6884ec5"]]),_sfc_main$u=vue.defineComponent({name:"DrillModal",components:{ATable:antDesignVue.Table,ATableSummary:antDesignVue.TableSummary,ATableSummaryRow:antDesignVue.TableSummaryRow,ATableSummaryCell:antDesignVue.TableSummaryCell,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,LastDetail},props:{theme:{type:String,default:"light"},drillingMode:{type:String,default:"default"},pageMode:{type:String,default:"normal"},scaleValue:{type:Object,default:()=>({})},pivotTableFontSize:{type:Number,default:16},width:{type:String,default:""},drillDetailUrl:{type:String,default:""},isShowMask:{type:Boolean,default:!0}},setup(c,{expose:u,emit:d}){const f="-",h="c-"+nanoid(6),v=.57,p=.6,m=.97,g=.9,y=window.screen.height*p,b=["%"],re=vue.ref(50),x={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},vn={borderColor:"#666E8D",headerBgColor:"#06347C",headerColor:"#DEE5EF",bodyBgColor:"#112861",bodyColor:"#B2CCE7",indicatorsHeaderBgColor:"#184273",indicatorsHeaderColor:"#FFFFFF",indicatorsBodyBgColor:"#184273",indicatorsBodyColor:"#FFFFFF",aggregateBgColor:"#0F4F9B",aggregateColor:"#FFFCFC",sortNotActiveColor:"#B0B0B0",sortActiveColor:"#00CCFF",dropDownMenuBgColor:"#08154F",dropDownMenuColor:"#B2C3DD",dropDownMenuHightLightColor:"#2E68CF"},j=vue.ref(!1),Pn=vue.ref(!1),qn=vue.ref(),Bn=vue.ref(),w=vue.ref(),J=vue.ref(!0),gn=vue.ref({}),Rn=vue.ref([]),zn=vue.ref([]),Wn=vue.ref([]),Yn=vue.ref(!1),Jn=vue.ref(!1),tr=vue.ref({x:"max-content"}),nr=vue.ref(),Qn=vue.ref([]),ar=vue.ref({dateFormat:"YYYY-MM-DD"}),cr=vue.reactive({keyName:"",visible:!1,dataSource:[],columns:[],title:"",pagination:{current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showLessItems:!0,showTotal:Rr=>`共 ${Rr} 条数据`}}),fr=vue.ref({}),Gn=vue.ref({}),Zn=vue.inject("isMobile",!1),Hn=vue.inject("usedComponentList",[]),Un=vue.inject("componentList",[]),{getAllGlobalModel:er}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),Kn=vue.computed(()=>INDICATOR_URL);vue.watch(()=>cr.visible,Rr=>{Rr?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"});const ir=vue.computed(()=>vue.unref(Zn)?"16px":c.pivotTableFontSize+"px"),ur=vue.computed(()=>({width:vue.unref(gn).width,height:vue.unref(gn).height})),or=vue.computed(()=>vue.unref(Zn)?{padding:"10px 0"}:c.drillingMode==="normalTable"&&!J.value?{height:y+48+"px",overflow:"hidden"}:{}),sr=vue.computed(()=>{let Rr=`datav-drill-modal ${h}`;return(J.value||vue.unref(Zn))&&(Rr+=" full"),c.theme==="darkBlue"&&(Rr+=" darkBlue"),Rr}),dr=(Rr,Ir)=>{const Gr=Xn(Ir.graphicConfig).filter(ii=>ii.conditions),Qr=loopConditions(Gr,"conditions",!0),Ur=loopConditions(Rr.sqlConditions,"sqlConditions",!1);zn.value=Qr.concat(Ur).filter(ii=>ii.label)||[]};function Xn(Rr){const{leftAxisList:Ir=[],rightAxisList:zr=[],indicators:Gr=[],classificationList:Qr=[],rowHeaderList:Ur=[],dimensionList:ii=[],seriesList:yi=[],queryColumns:xi=[],indexLibColumns:Si=[]}=Rr;return Ir.concat(zr).concat(Gr).concat(Qr).concat(Ur).concat(ii).concat(yi).concat(xi).concat(Si)}const lr=()=>document.querySelector("#modalContainer")||document.body,hr=async Rr=>{var yi,xi,Si;const{cpntProps:Ir,pageId:zr,formatParams:Gr,classifications:Qr,indicatorToken:Ur,drillingMode:ii}=Rr;return await request({url:`${vue.unref(Kn)}/diagram/obtainDrillAbleDimensionOptions`,method:"post",headers:{Authentication:Ur,operateContext:CONTEXT},data:{source:((yi=Ir==null?void 0:Ir.graphicConfig)==null?void 0:yi.source)||"INDICATOR_LIB",pageId:zr,indicatorList:(Gr==null?void 0:Gr.indicatorList)||[],classifications:Qr,dataSourceId:((xi=Ir==null?void 0:Ir.graphicConfig)==null?void 0:xi.dataSourceId)||"",drillingMode:ii},signal:((Si=window.controller)==null?void 0:Si.signal)||""})},vr=async({indicatorList:Rr,indicatorToken:Ir})=>{var zr;return await request({url:`${vue.unref(Kn)}/diagram/obtainIndexDrillDetail`,method:"post",headers:{Authentication:Ir,operateContext:CONTEXT},data:{indicatorList:Rr},signal:((zr=window.controller)==null?void 0:zr.signal)||""})},yr=async({indicatorList:Rr,indicatorToken:Ir,pageId:zr,theFlag:Gr})=>{var Qr;return await request({url:`${vue.unref(Kn)}/diagram/obtainIndicatorInfo`,method:"post",headers:{Authentication:Ir,operateContext:CONTEXT},data:{source:"INDICATOR_LIB",pageId:zr,indicatorList:Rr,theFlag:Gr},signal:((Qr=window.controller)==null?void 0:Qr.signal)||""})},br=Rr=>{let Ir="",zr="";const{componentConfig:Gr}=Rr;for(const Ur in Gr)if(Gr[Ur].key==="currentValue"){zr=Ur;break}const Qr=vue.unref(Un).find(Ur=>Ur.id===zr);return Qr!=null&&Qr.unitText&&(Ir=Qr.unitText),Ir};function pr(Rr){const Ir=[];for(const zr of Rr)zr.sqlConditions?Ir.push(...pr(zr.sqlConditions)):zr.fieldName==="the_date"&&Ir.push(zr);return Ir}const mr=Rr=>{var Ur;const{sqlConditions:Ir=[],queryColumns:zr=[]}=Rr||{},Gr=pr(Ir),Qr=zr.find(ii=>ii.typeGuid==="the_date");if(Qr&&(ar.value={dateFormat:Qr.dateFormat||"YYYY-MM-DD"}),Gr!=null&&Gr.length)for(const ii of Gr)["startTime","endTime"].includes(ii.prop)&&(vue.unref(ar)[ii.prop]=ii.fieldValue||"",(Ur=vue.unref(ar))!=null&&Ur.rangeFormat||(vue.unref(ar).rangeFormat=ii.dateFormat||"YYYY-MM-DD"))},Er=()=>{var Rr;(Rr=cr.dataSource)!=null&&Rr.length?setTimeout(()=>{var Ir,zr,Gr;if(c.drillingMode==="normalTable"){const Qr=(zr=(Ir=vue.unref(nr))==null?void 0:Ir.querySelector(".normal-table .ant-table-thead"))==null?void 0:zr.clientHeight;if(Qr){let Ur=y;if(vue.unref(J)){const ii=document.querySelector(`.${h} .ant-modal-content`);ii&&(Ur=ii.clientHeight-((Gr=ii.querySelector(".ant-modal-header"))==null?void 0:Gr.clientHeight)-48)}isNaN(Ur)||(vue.unref(tr).y=Ur-Qr+"px",setTimeout(()=>{const ii=document.querySelector(`.${h} .ant-table-summary`);ii&&(re.value=ii.clientHeight),vue.unref(tr).y=parseFloat(vue.unref(tr).y)-vue.unref(re)+"px"},0))}}Jn.value=!0},200):(tr.value={},Jn.value=!0)},_r=()=>{setTimeout(()=>{var Rr;Sortable.create((Rr=vue.unref(nr))==null?void 0:Rr.querySelector(".normal-table .ant-table-thead > tr"),{handle:"th.ant-table-cell",onEnd:({newIndex:Ir,oldIndex:zr})=>{Ir!==zr&&(swapArrItem(cr.columns,Ir,zr),swapArrItem(vue.unref(Qn),Ir,zr))}})},200)},Cr=async Rr=>{var Ai,Br,Nr,jr,Zr,Wr,Yr,ni;if(c.drillingMode==="default"||c.pageMode==="design")return;let Ir=lodashEs.cloneDeep(Rr).props;if(Ir.parentId){const Jr=vue.unref(Hn).find(ri=>ri.id===Ir.parentId);if((Jr==null?void 0:Jr.dataType)==="indicator")Ir=lodashEs.cloneDeep(Jr);else return}const zr=yn(Ir.type,"indexPanel");cr.keyName=Ir==null?void 0:Ir.keyName;const Gr=((Ai=window==null?void 0:window.config)==null?void 0:Ai.indicatorToken)||"",Qr=getPageId(),Ur=(Ir==null?void 0:Ir.graphicConfig)||{},{leftAxisList:ii=[],rightAxisList:yi=[],indicators:xi=[]}=Ur,Si=ii.concat(yi).concat(xi);if(!(Si!=null&&Si.length))return;const Ti=Si.filter(Jr=>Jr.show).map(Jr=>Jr.label);Ti!=null&&Ti.length&&(cr.title=`下钻:${Ti.join("、")}`);const hi=En({...Ir,allComponentList:vue.unref(Un),globalModel:er()});if(c.drillingMode==="normalTable"||vue.unref(Zn)){const ri=Xn(Ur).filter(Mr=>Mr.showInDrillTable==="hide").map(Mr=>Mr.label);cr.pagination.current=1;let ai=(hi==null?void 0:hi.classification)||(hi==null?void 0:hi.classifications)||[];const{indicatorList:oi=[]}=hi,si=await vr({indicatorList:oi,indicatorToken:Gr}),ti=((Br=si==null?void 0:si.data)==null?void 0:Br.data)||[];if(ti!=null&&ti.length)for(const Mr of ti)(Nr=Mr.detailList)!=null&&Nr.length&&Mr.detailList.forEach(($r,Lr)=>{if(Lr>0){const Fr=oi.find(qr=>qr.label===$r);Fr&&!ri.includes(Fr.label)&&(Fr.show=!0)}});const ui=await yr({indicatorList:oi,indicatorToken:Gr,pageId:Qr,theFlag:(Ir==null?void 0:Ir.theFlag)||""}),pi=((jr=ui==null?void 0:ui.data)==null?void 0:jr.data)||[],Pi={};for(const Mr of pi){const $r=oi.find(Lr=>Lr.columnName===Mr.indexName);$r&&(Pi[$r.label]=Mr.theUnit||"")}const Sr=oi.filter(Mr=>Mr.show),kr=[],Or=["YOY_DATA","MOM_DATA"];for(const Mr of Sr)for(const $r of Or)kr.push({builtInFormula:$r,builtInValueSource:Mr.label,calcType:"BUILT_IN",columnName:`${Mr.label}@${$r}`,label:`${Mr.label}@${$r}`,location:"LEFT",show:!0});if(kr!=null&&kr.length)for(const Mr of kr){const $r=oi.findIndex(Lr=>Lr.label===Mr.builtInValueSource);$r!==-1&&oi.splice($r+1,0,Mr)}Array.isArray(ai)||(ai=[ai]);try{Yn.value=!0,cr.visible=!0;const Mr=await hr({cpntProps:Ir,pageId:Qr,formatParams:hi,classifications:ai,indicatorToken:Gr,drillingMode:c.drillingMode}),$r=((Zr=Mr==null?void 0:Mr.data)==null?void 0:Zr.data)||[];Wn.value=$r;let Lr=[],Fr=[];const{usedDimensions:qr=[],params:li={},record:ci={}}=Rr;if(qr!=null&&qr.length){for(const gi of $r)if(!qr.find(Ei=>Ei.label===gi.name)){Fr.push(gi);break}hi.sqlConditions=lodashEs.cloneDeep(li.sqlConditions);const{sqlConditions:ei=[]}=hi,{record:mi={}}=Rr;qr.forEach((gi,Ei)=>{if(mn(mi,gi.label)){const Ii=$r.find(_i=>_i.name===gi.label),bi={fieldName:gi.label,fieldValue:mi[gi.label],globalCondition:!0,hrpIndexCode:null,hrpIndexCodeNum:null,label:gi.label,rule:"EQUAL",typeGuid:gi.typeGuid,valueType:(Ii==null?void 0:Ii.genericType)||"TEXT"};Ei!==qr.length-1&&(bi.join="&&"),Ei===0&&(ei!=null&&ei.length)&&(ei[ei.length-1].join="&&"),ei.push(bi)}})}else Lr=ai.map(ei=>({...ei,calcType:"COLUMN"})),Fr=$r.slice(0,2).sort((ei,mi)=>ei.typeGuid-mi.typeGuid);dr(hi,lodashEs.cloneDeep(Rr.props));for(const ei of Fr)Lr.push({calcType:"COLUMN",columnName:ei.name,label:ei.name,show:!0,typeGuid:ei.typeGuid});hi.queryColumns=Lr,hi.layer="1",hi.plugin="5",delete hi.classification,delete hi.classifications;const{url:fi,...di}=hi||{};di.chartType="pivot-table-list",di.rowHeaders=di.queryColumns,Gn.value=di,mr(hi);const vi=await request({url:`${vue.unref(Kn)}${fi}`,method:"post",headers:{Authentication:Gr,operateContext:CONTEXT},data:{...di,pageId:Qr}}),ki=Lr.map(ei=>ei.label).concat(...hi.indicatorList.filter(ei=>ei.show).map(ei=>ei.label)).filter(ei=>!ri.includes(ei.label)),{rows:Ci=[]}=((Wr=vi==null?void 0:vi.data)==null?void 0:Wr.data)||{};if(zr){const ei=Ur.indicators.find(gi=>gi.show),mi=br(Ir);mi&&ei&&(fr.value={[ei.label]:mi})}cr.columns=ki.filter(ei=>!!ei).map(ei=>{let mi=ei;const gi=$r.find(Ei=>Ei.name===ei);return gi&&(mi=gi.title||gi.label),mi.includes("@MOM_DATA")?mi=mi.replace("@MOM_DATA","环比(%)"):mi.includes("@YOY_DATA")&&(mi=mi.replace("@YOY_DATA","同比(%)")),{title:mi,dataIndex:ei,width:"120px",align:gi?"left":"right",sorter:(Ei,Ii)=>{let bi=Ei[ei],_i=Ii[ei];return isNaN(parseFloat(bi))&&(bi!=null&&bi.localeCompare)?bi.localeCompare(_i,"zh-CN"):isThousandWithUnit(bi)||isThousandWithUnit(_i)?parseFloat(bi.replace(/,/g,""))-parseFloat(_i.replace(/,/g,"")):isValidDateStr(bi)&&isValidDateStr(_i)?new Date(bi)-new Date(_i):parseFloat(bi)-parseFloat(_i)},customHeaderCell:()=>({class:{"left-align":!!gi,"right-align":!gi}}),customCell:(Ei,Ii,bi)=>({[vue.unref(Zn)?"onClick":"onDblclick"]:()=>{const _i=qr.concat(Lr),Ri=Object.assign(ci,Ei),Li=$r.find($i=>bi.dataIndex===$i.name);$r.length>_i.length?(j.value=!0,vue.nextTick(()=>{vue.unref(qn).showModal({...Rr,record:Ri,usedDimensions:_i,params:hi})})):!Li&&!bi.dataIndex.includes("@YOY_DATA")&&!bi.dataIndex.includes("@MOM_DATA")&&(Pn.value=!0,vue.nextTick(()=>{vue.unref(Bn).showModal({record:Ri,dimOpts:$r,column:bi,formatParams:hi,cpntProps:Ir,drillDetailUrl:c.drillDetailUrl,drillConditions:vue.unref(Kr)})}))}})}}),cr.dataSource=(Array.isArray(Ci)?Ci:[Ci]).map(ei=>({...ei,uuid:nanoid(6)})),cr.pagination.total=(Ci==null?void 0:Ci.length)||0,cr.columns.forEach(ei=>{const mi=ei.dataIndex;let gi=f;if(mn(Pi,mi)&&!b.includes(Pi[mi])){let Ei=0;for(const Ii of cr.dataSource){const bi=Ii[mi];if(typeof bi=="number")Ei+=bi;else if(bi){const _i=parseFloat(bi.replace(/,/g,""));isNaN(_i)||(Ei+=_i)}}gi=Ei.toFixed(2)}vue.unref(Qn).push({value:gi,align:ei.align,title:ei.title})}),Yn.value=!1,Er(),_r()}catch(Mr){console.error(Mr)}}else if(c.drillingMode==="pivotTable"){const Jr=await hr({cpntProps:Ir,pageId:Qr,formatParams:hi,classifications:[],indicatorToken:Gr});Wn.value=((Yr=Jr==null?void 0:Jr.data)==null?void 0:Yr.data)||[];const ri=nanoid(6);Ur.queryColumnList||(Ur.queryColumnList=[]),Ur!=null&&Ur.classificationList&&(Ur.queryColumnList=Ur.classificationList,delete Ur.classificationList),Ur!=null&&Ur.seriesList&&(Ur.queryColumnList=Ur.queryColumnList.concat(Ur.seriesList),delete Ur.seriesList),Ur.indicators=lodashEs.cloneDeep(Si||[]),delete Ur.leftAxisList,delete Ur.rightAxisList;const ai={},oi=Ur.indicators.find(ti=>ti.show);if(zr){const ti=vue.unref(Wn).slice(0,2).sort((pi,Pi)=>pi.typeGuid-Pi.typeGuid).map(pi=>({...pi,show:!0,edit:!1,dataTo:"0",width:pi.name==="the_date"?15:0,dataSetParams:{}}));ti!=null&&ti.length&&(Ur.queryColumnList=ti);const ui=br(Ir);if(ui&&oi){const{label:pi}=oi;ai.defaultConfig={indexFormatConfig:{[pi]:{fieldName:pi,indicatorKey:pi,position:"right",unit:ui}}}}}Ir!=null&&Ir.theFlag&&(ai.theFlag=Ir.theFlag),(ni=Ur.queryColumnList)!=null&&ni.length||(Ur.queryColumnList=[{id:"3f5bda70a08a442085857adb7fc547de",indexCode:null,indexCodeNum:null,title:"日期(内置)",name:"the_date",label:"日期(内置)",typeGuid:"the_date",genericType:"DATE",hrpIndexComplexid:"the_date",scope:"BUILT_IN_DIM",fromTable:"hrp_index_complex",parentId:"3f5bda70a08a442085857adb7fc547de",show:!0,edit:!1,dataTo:"0",dataSetParams:{}}]);const si={...lodashEs.cloneDeep(pivotTableProps),id:ri,keyName:`透视表_${ri}`,position:"relative",top:0,left:0,width:parseFloat(c.width)*v+"px",height:window.screen.height*p+"px",pageId:Qr,indicatorToken:Gr,context:CONTEXT,globalModel:er(),graphicConfig:Ur,pageConfig:c,...ai};c.theme==="darkBlue"&&(si.styleConfig=vn),zr&&(si.defalutCalcList=["MOM_DATA","YOY_DATA"]),gn.value=si,cr.visible=!0,vue.nextTick(()=>{vue.unref(w).refreshData()})}vue.nextTick(()=>{Ar(!0)})},xr=()=>{},Ar=Rr=>{const Ir=document.querySelector(`.datav-drill-modal.${h} .ant-modal-header`);Ir&&(Rr?Ir.addEventListener("dblclick",Tr):Ir.removeEventListener("dblclick",Tr))},gr=Rr=>{const Ir=document.querySelector(`.datav-drill-modal.${h} .ant-modal-header`);if(Ir)if(Rr)Ir.addEventListener("mousedown",wr);else{const zr=Ir.parentElement;zr&&(zr.style.left="",zr.style.top=""),Ir.removeEventListener("mousedown",wr)}};function wr(Rr){dragModalAction(Rr,`.datav-drill-modal.${h} .ant-modal-header`)}const Tr=()=>{J.value=!J.value,vue.nextTick(()=>{J.value?(vue.unref(gn).width=parseFloat(c.width)*m+"px",vue.unref(gn).height=window.screen.height*g+"px",gr(!1)):(vue.unref(gn).width=parseFloat(c.width)*v+"px",vue.unref(gn).height=window.screen.height*p+"px",gr(!0)),Er()})},Pr=()=>{document.documentElement.style.overflow="hidden auto",Ar(!1),gr(!1),d("close")},Dr=({type:Rr,data:Ir})=>{if(Rr==="11"&&Ir){const{indicatorList:zr=[],queryColumns:Gr=[]}=Ir,Ur=zr.concat(Gr).filter(xi=>xi.conditions||xi.filter),ii=loopConditions(Ur,"conditions",!0),yi=loopConditions(Ir.sqlConditions,"sqlConditions",!1);zn.value=ii.concat(yi).filter(xi=>xi.label)||[]}};vue.watch(zn,(Rr=[])=>{Rn.value=Rr.map(Ir=>{let zr=Ir.fieldValue;if(zr&&typeof zr=="string"){const Gr=zr.split(",");(Gr==null?void 0:Gr.length)>3&&(zr=Gr.slice(0,3).join(",")+"等")}else zr||(zr='""');if(c.drillingMode==="normalTable")return`${Ir.label} ${x[Ir.rule]} ${zr}`;{const Gr=vue.unref(Wn).find(Qr=>Qr.label===Ir.label);return`${(Gr==null?void 0:Gr.title)||Ir.label} ${x[Ir.rule]} ${zr}`}})||[]},{deep:!0});const Kr=vue.computed(()=>vue.unref(zn).map(Rr=>({label:Rr.title||Rr.label,typeGuid:Rr.typeGuid,rule:Rr.rule,value:Rr.fieldValue}))),Vr=()=>{Pn.value=!1},Hr=()=>{j.value=!1};return u({indDetailInfo:cr,showModal:Cr,getPivotRecordData:()=>{var Rr,Ir,zr,Gr,Qr,Ur,ii,yi,xi,Si;if(c.drillingMode==="normalTable"){if((Rr=vue.unref(Bn))!=null&&Rr.visible)return(Ir=vue.unref(Bn))==null?void 0:Ir.getRecordData();if((Gr=(zr=vue.unref(qn))==null?void 0:zr.indDetailInfo)!=null&&Gr.visible)return(Qr=vue.unref(qn))==null?void 0:Qr.getPivotRecordData();{const{sqlConditions:Ti,...hi}=vue.unref(Gn);for(const Ai of Ti){const Br=vue.unref(Wn).find(Nr=>Nr.typeGuid===Ai.typeGuid);Br!=null&&Br.title&&(Ai.title=Br.title)}return{data:vue.toRaw(cr.dataSource),columns:[],rows:((ii=(Ur=vue.unref(Gn))==null?void 0:Ur.queryColumns)==null?void 0:ii.map(Ai=>({title:Ai.label})))||[],indicators:((xi=(yi=vue.unref(Gn))==null?void 0:yi.indicatorList)==null?void 0:xi.map(Ai=>({title:Ai.label})))||[],requestParams:{...hi,sqlConditions:Ti},type:"pivotTable"}}}else if(c.drillingMode==="pivotTable")return(Si=vue.unref(w))==null?void 0:Si.getPivotRecordData()}}),{indDetailInfo:cr,pivotTableConfig:gn,pivotTableStyle:ur,detailBodyStyle:or,wrapClassName:sr,isIndFullScreen:J,isMobile:Zn,conditionInfo:Rn,indicatorUrl:Kn,allDimensions:Wn,requestLoading:Yn,isLoadedTable:Jn,pivotTableRef:w,lastDetailRef:Bn,subDrillModalRef:qn,theDateInfo:ar,isShowSubDrillModal:j,normalTableUnits:fr,drillConditions:Kr,allComponentList:Un,tableFontSize:ir,tableScroll:tr,tableRef:nr,summaryList:Qn,summaryHeight:re,isShowDetailMpdal:Pn,defaultValue:f,getContainer:lr,toggleFullScreen:Tr,onDetailCancel:Pr,onPivotTableChange:Dr,handleTableChange:xr,onCloseDetailModal:Vr,onCloseModal:Hr}}}),DrillModal_vue_vue_type_style_index_0_scoped_83d65d19_lang="",DrillModal_vue_vue_type_style_index_1_lang="",_hoisted_1$l=["title"],_hoisted_2$b={key:0,class:"spin-container"},_hoisted_3$5=["title"],_hoisted_4$4=["title"];function _sfc_render$z(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("a-spin"),b=vue.resolveComponent("a-table-summary-cell"),re=vue.resolveComponent("a-table-summary-row"),x=vue.resolveComponent("a-table-summary"),vn=vue.resolveComponent("a-table"),j=vue.resolveComponent("pivot-table"),Pn=vue.resolveComponent("a-modal"),qn=vue.resolveComponent("last-detail"),Bn=vue.resolveComponent("drill-modal",!0);return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(Pn,{visible:c.indDetailInfo.visible,"onUpdate:visible":u[1]||(u[1]=w=>c.indDetailInfo.visible=w),width:"60%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,"wrap-class-name":c.wrapClassName,bodyStyle:c.detailBodyStyle,mask:c.isShowMask,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[vue.createElementVNode("div",{class:"detail-modal-title",title:c.conditionInfo.join("、")},vue.toDisplayString(c.indDetailInfo.title)+" "+vue.toDisplayString(c.conditionInfo.join("、")),9,_hoisted_1$l)]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>{var w;return[c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"zoom-btn",onClick:u[0]||(u[0]=(...J)=>c.toggleFullScreen&&c.toggleFullScreen(...J))},[c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"]))])),c.drillingMode==="normalTable"||c.isMobile?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[c.isLoadedTable?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$b,[vue.createVNode(y,{size:"large"})])),c.requestLoading?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:1,ref:"tableRef",style:vue.normalizeStyle({visibility:c.isLoadedTable?"visible":"hidden"})},[vue.createVNode(vn,{class:"normal-table",size:"small",scroll:c.isMobile?{x:"max-content",y:"70vh"}:c.tableScroll,"row-key":J=>J.uuid,columns:c.indDetailInfo.columns,"data-source":c.indDetailInfo.dataSource,pagination:!1,"row-class-name":(J,gn)=>gn%2===1?"table-striped":null,showHeader:!!((w=c.indDetailInfo.dataSource)!=null&&w.length),onChange:c.handleTableChange},{headerCell:vue.withCtx(({title:J})=>[vue.createElementVNode("div",{class:"detail-table-header-cell",title:J,style:vue.normalizeStyle({fontSize:c.tableFontSize})},vue.toDisplayString(J),13,_hoisted_3$5)]),bodyCell:vue.withCtx(({text:J,column:gn})=>[vue.createElementVNode("div",{title:J,style:vue.normalizeStyle({fontSize:c.tableFontSize})},vue.toDisplayString(J||(gn.align==="left"?c.defaultValue:"0"))+vue.toDisplayString(typeof J=="string"&&J.includes(c.normalTableUnits[gn.title])?"":c.normalTableUnits[gn.title]),13,_hoisted_4$4)]),summary:vue.withCtx(()=>[vue.createVNode(x,{fixed:""},{default:vue.withCtx(()=>[vue.createVNode(re,null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.summaryList,(J,gn)=>(vue.openBlock(),vue.createBlock(b,{key:gn,index:gn,style:vue.normalizeStyle({textAlign:J.align||"left",height:c.summaryHeight+"px",fontSize:c.tableFontSize,fontWeight:600,color:"rgba(0, 0, 0, 0.85)",padding:"8px 16px"})},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(gn?J.value:"合计")+vue.toDisplayString(gn&&typeof J.value=="string"&&J.value.includes(c.normalTableUnits[J.title])||J.value===c.defaultValue?"":c.normalTableUnits[J.title]),1)]),_:2},1032,["index","style"]))),128))]),_:1})]),_:1})]),_:1},8,["scroll","row-key","columns","data-source","row-class-name","showHeader","onChange"])],4))],64)):c.drillingMode==="pivotTable"?(vue.openBlock(),vue.createElementBlock("div",{key:2,style:vue.normalizeStyle({position:"relative",...c.pivotTableStyle})},[vue.createVNode(j,vue.mergeProps({ref:"pivotTableRef"},c.pivotTableConfig,{pageMode:c.pageMode,theme:c.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,indicatorUrl:c.indicatorUrl,relateKeyName:c.indDetailInfo.keyName,allDimensions:c.allDimensions,scaleValue:c.scaleValue,defaultFontSize:c.pivotTableFontSize,drillDetailUrl:c.drillDetailUrl,drillConditions:c.drillConditions,isMobile:c.isMobile,isNeedEmptyRow:!1,componentList:c.allComponentList,enlargeContainer:"#norPageConfig",onTableChange:c.onPivotTableChange}),null,16,["pageMode","theme","indicatorUrl","relateKeyName","allDimensions","scaleValue","defaultFontSize","drillDetailUrl","drillConditions","isMobile","componentList","onTableChange"])],4)):vue.createCommentVNode("",!0)]}),_:1},8,["visible","getContainer","wrap-class-name","bodyStyle","mask","onCancel"]),c.isShowDetailMpdal?(vue.openBlock(),vue.createBlock(qn,{key:0,ref:"lastDetailRef",theme:c.theme,theDateInfo:c.theDateInfo,scaleValue:c.scaleValue,fontSize:c.pivotTableFontSize,allDimensions:c.allDimensions,onClose:c.onCloseDetailModal},null,8,["theme","theDateInfo","scaleValue","fontSize","allDimensions","onClose"])):vue.createCommentVNode("",!0),c.isShowSubDrillModal?(vue.openBlock(),vue.createBlock(Bn,{key:1,ref:"subDrillModalRef",width:c.width,theme:c.theme,drillingMode:c.drillingMode,pageMode:c.pageMode,scaleValue:c.scaleValue,pivotTableFontSize:c.pivotTableFontSize,drillDetailUrl:c.drillDetailUrl,isShowMask:c.isIndFullScreen,onClose:c.onCloseModal},null,8,["width","theme","drillingMode","pageMode","scaleValue","pivotTableFontSize","drillDetailUrl","isShowMask","onClose"])):vue.createCommentVNode("",!0)],64)}const DrillModal=_export_sfc$1(_sfc_main$u,[["render",_sfc_render$z],["__scopeId","data-v-83d65d19"]]),_sfc_main$t=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,components:{IndicatorDetailModal,TrendModal,DrillModal},props:{...providerConfigComponentProps,pageId:{type:String,default:""},customId:{type:String,default:"ProviderConfig"},customStyle:{type:Object,default:()=>({})},fixedHeight:{type:String,default:"0px"}},setup(c,{expose:u,emit:d}){c.pageId||useHrefParamsToGlobalVariables();const f=vue.ref(!1),h=vue.ref(),v=vue.ref(),p=vue.ref(),m=vue.computed(()=>INDICATOR_URL),g=vue.computed(()=>hn(c.contextRequestUrl)),y=vue.computed(()=>c.pageMode),b=vue.computed(()=>c.theme),re=vue.computed(()=>c.width),x=vue.computed(()=>c.height),vn=vue.computed(()=>c.pageFontFamily),j=vue.computed(()=>c.textColor),Pn=vue.computed(()=>c.fixedHeight?parseFloat(c.fixedHeight):0),qn=vue.computed(()=>c.isCompatible),Bn=vue.computed(()=>c.variableList),w=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)),J=vue.computed(()=>parseFloat(c.pivotTableFontSize)),gn=vue.ref(),Rn=vue.ref({}),zn=vue.ref(!0),Wn=()=>{gn.value.setAttribute("datav-theme",c.theme)},Yn=vue.ref({currentYmd:dayjs().format("YYYY-MM-DD"),currentYear:dayjs().format("YYYY"),currentMonth:dayjs().format("MM"),currentDay:dayjs().format("DD")}),Jn=vue.computed(()=>{const Br={};if(vue.unref(Bn))for(const jr of vue.unref(Bn))Br[jr.label]=jr.value;return{$page:{...vue.unref(Yn),...Br}}});vue.provide(GLOBAL_VARIABLE,{globalVariable:Jn});const tr=vue.inject("usedComponentList",[]),nr=vue.inject("componentList",[]);vue.watch(Jn,()=>{d("setGlobalVar",vue.unref(Yn))},{deep:!0,immediate:!0});const Qn=vue.computed(()=>{const Br=[];for(const Nr of vue.unref(tr))Nr.type==="ecanModal"?Br.push(...Nr.componentList):Br.push(Nr);return Br});vue.watch(()=>c.theme,()=>{Wn()}),vue.onMounted(()=>{Wn()});const ar=vue.computed(()=>{const Br=[],Nr=vue.unref(nr).filter(jr=>jr.type==="ecanModal");for(const jr of Nr)jr!=null&&jr.requestList&&Br.push(...jr.requestList);return[...Br,...c.requestList]}),cr=Br=>Object.prototype.toString.call(Br)==="[object Object]",fr=Br=>{const Nr=Br.split(".");let jr=vue.unref(Jn);for(const Zr of Nr)if(jr&&cr(jr))jr=jr[Zr];else{jr="";break}return jr},Gn=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:g,pageMode:y,theme:b,touchEventId:Gn,width:re,height:x,fontFamily:vn,textColor:j,requestList:ar,isCompatible:qn,fixedHeight:Pn,getGlobalVar:fr});const Zn=vue.ref({height:"100%",overflow:c.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",Br=>{let Nr=0;Br==="auto"?(Nr=Br,Rn.value={widthScale:1,heightScale:1}):(Nr=Br.heightScale,Rn.value=Br),(!qn.value||!w.value)&&(Nr=parseFloat(x.value)*Nr+"px"),Zn.value.height=Nr}),vue.provide("isMobile",w.value),vue.provide("getContainerMap",()=>c.containerMap),vue.provide("getCombinationMap",()=>c.combinationMap),vue.provide("templateOperate",{pageId:c.pageId,templateEmit:d,setTemplateData:Br=>{var Nr;if(Br!=null&&Br.pageId){const{componentId:jr,...Zr}=Br;(Nr=window.config)!=null&&Nr.urlParams||(window.config.urlParams={}),window.config.urlParams[Br.pageId]=Zr,d("templateChange",Br)}}});const Hn=vue.ref(),Un=new Map,er=()=>Un,Kn=Br=>{let Nr=Un.get(Br);if(!Nr){const jr=vue.unref(nr).find(Zr=>Zr.keyName===Br);jr&&(Nr=Un.get(jr.id))}return Nr},ir=(Br,Nr)=>{var jr;if(Hn.value=Nr,Un.set(Br,Nr),!c.pageId){const Zr=vue.unref(tr).find(Wr=>Wr.id===Br);Zr&&((jr=window.config)!=null&&jr.record||(window.config.record={}),window.config.record[Zr.keyName]=Nr)}},ur=()=>{Hn.value=null},or=Br=>{let Nr=Br;if(Nr){const jr=Br.match(/\{(.+?)\}/g);if(jr!=null&&jr.length){let Zr=jr[0].slice(1,-1).trim();const Wr=Zr.match(/\[(.+?)\]/g);let Yr="";Wr!=null&&Wr.length&&(Zr=Zr.replace(Wr[0],""),Yr=Wr[0].slice(1,-1).trim());const ni=vue.unref(Qn).find(Jr=>Jr.keyName===Zr);if(ni){const Jr=Kn(ni.id),{type:ri,value:ai,RECORD:oi,recordData:si}=Jr||{};yn(ri,MODEL_KEY_LIST)?Nr=oi[Yr]:yn(ri,"select")?si[Yr]?Nr=si[Yr]:Nr=vue.unref(ai):yn(ri,["rangePicker","date"])?dayjs.isDayjs(vue.unref(Jr[Yr]))?Nr=vue.unref(Jr[Yr]).format(Jr.format):Nr=vue.unref(Jr[Yr]):Nr=ai}else{const Jr=window.config.requestParams||{},ri=window.location.search.slice(1).split("&"),ai={};for(const si of ri)if(si!=null&&si.includes("=")){const ti=si.split("=");ai[ti[0]]=ti[1]||""}Nr={...ai,...Jr}[Zr]||""}}}return Nr},sr=new Map,dr={},Xn=async(Br,Nr)=>{var ni;const{requestName:jr}=Br,Zr=await useRequestData({...Br,projectRequestUrl:vue.unref(g),getModel:Kn})(),Wr=((ni=Zr==null?void 0:Zr.data)==null?void 0:ni.data)||{};Br.requestKeyName&&(Yn.value[Br.requestKeyName]=Wr);const Yr=sr.get(jr);if(Yr!=null&&Yr.length&&(!Nr||dr[jr])){for(const Jr of Yr)Jr(Wr);Nr||sr.delete(jr)}},lr=(Br,Nr)=>{dr[Br]&&(clearInterval(dr[Br]),delete dr[Br],sr.delete(Br));const jr=vue.unref(Qn).filter(Wr=>Wr.dataType==="request"&&!Wr.openCustomRequestData&&Wr.customRequestName===Br),Zr=sr.get(Br)||[];if((jr==null?void 0:jr.length)>Zr.length&&(Zr.push(Nr),sr.set(Br,Zr),(jr==null?void 0:jr.length)===Zr.length)){const Wr=vue.unref(ar).find(Yr=>Yr.requestName===Br);Wr&&(Wr!=null&&Wr.isOpenRequestTimer&&(Wr!=null&&Wr.requestInterval)?(Xn(Wr,!0),dr[Br]=setInterval(()=>{Xn(Wr,!0)},Wr.requestInterval*1e3)):Xn(Wr))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:Kn,setGlobalModel:ir,getAllGlobalModel:er,clearInteractiveData:ur,getRecordValueByKeyName:or,hanldePageRequestData:lr,interactiveData:Hn});const hr=vue.ref({}),vr=(Br,Nr)=>{hr.value[Br]=Nr};vue.provide(LOADED_DATA,{loadedData:hr,setLoadedData:vr});const yr=[],br=()=>{yr.pop()},pr=Br=>{yr.push(Br)},mr=new Map,Er=Br=>mr.get(Br),_r=(Br,Nr)=>{mr.set(Br,Nr)};vue.provide(MODAL_MODEL,{popUseModalIds:br,pushUseModalIds:pr,getModalModel:Er,setModalModel:_r});const Cr=mitt(),xr=new Set,Ar=new Map,gr=(Br,Nr,jr)=>{xr.add(Br),Ar.set(Br,{sort:jr,events:Nr}),vue.onBeforeUnmount(()=>{Ar.delete(Br)})},wr=async(Br=[],Nr,jr)=>{const Zr=new Map,{type:Wr}=jr||{};if(Wr==="refreshTemplate")for(const Jr of Br){const ri=Ar.get(Jr.target),{updateByUrlParams:ai}=(ri==null?void 0:ri.events)||{};typeof ai=="function"&&ai()}function Yr({key:Jr,eventName:ri,params:ai}){if(!Jr||!ri)return;const oi=Ar.get(Jr);if(typeof(oi==null?void 0:oi.events[ri])=="function"){const{sort:si}=oi,ti={fn:oi.events[ri],params:ai};if(Zr.has(si)){const ui=Zr.get(si);ui==null||ui.push(ti)}else Zr.set(si,[ti])}}for(const Jr of Br){const{target:ri,emit:ai}=Jr;if(ri==="PAGE"){const oi=yr.length;let si=[];if(oi===0)si=[...xr];else{const ti=yr[oi-1];si=[...Er(ti)]}si.forEach(ti=>{Yr({key:ti,eventName:ai,params:Nr})})}else(!vue.unref(zn)||ai!=="refreshData")&&Yr({key:ri,eventName:ai,params:Nr})}const ni=Array.from(Zr);ni.sort((Jr,ri)=>ri[0]-Jr[0]);try{for(let Jr=0;Jr<ni.length;Jr++){const ri=ni[Jr][1];await Hr(ri)}}catch(Jr){console.error(Jr)}};vue.provide(EVENT_BUS,{onEvent:gr,emitEvent:wr});const Tr=vue.ref(0),Pr=()=>{Tr.value=vue.unref(Tr)+1};vue.provide(GLOBAL_TOKEN,{requestToken:Pr});const Dr=new Map,Kr=new Map,Vr=({requestFn:Br=()=>{},sortNum:Nr=0,id:jr=""})=>{if(Dr.has(Nr)){const Zr=Dr.get(Nr);Zr==null||Zr.push(Br)}else Dr.set(Nr,[Br]);Kr.set(jr,Br)};function Hr(Br){return new Promise((Nr,jr)=>{const Zr=[];for(const Wr of Br)Zr.push(new Promise(async Yr=>{if(typeof Wr=="function")await Wr();else{const{fn:ni,params:Jr}=Wr;typeof ni=="function"&&(Jr?await ni(Jr):await ni())}Yr()}));Promise.all(Zr).then(Wr=>{Nr(Wr)}).catch(Wr=>{jr(Wr)})})}const Xr=Br=>new Promise(async(Nr,jr)=>{if(Br){if(typeof Br=="string"){const Zr=Kr.get(Br);if(typeof Zr=="function"){const Wr=request.interceptors.response.use(Yr=>(Nr(Yr),Yr),Yr=>(jr(Yr),Promise.reject(Yr)));Zr(),request.interceptors.response.eject(Wr)}}}else{const Zr=Array.from(Dr);Zr.sort((Yr,ni)=>ni[0]-Yr[0]);const Wr=Zr.length;try{c.pageMode!=="design"&&vue.unref(Tr)>0;for(let Yr=0;Yr<Wr;Yr++){const ni=Zr[Yr][1];await Hr(ni)}}catch(Yr){console.error(Yr)}finally{Dr.clear(),Nr(null),zn.value=!1}}});vue.provide(REQUEST_MODEL,{setRequest:Vr,touchRequest:Xr});const Rr=()=>{Cr.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:Rr});const Ir=Br=>{Cr.on(REFRESH_PAGE,()=>Br()),vue.onMounted(()=>{Cr.off(REFRESH_PAGE)})},zr=vue.ref({}),Gr=vue.ref();vue.provide(All_COMPONENT_RES_DATA,{allComponentResData:zr});const Qr=Br=>{const{id:Nr,data:jr}=Br;jr.success&&(zr.value[Nr]=(jr==null?void 0:jr.data)||{})},Ur=Br=>{Gr.value=Br},ii=(Br,Nr)=>{switch(Br){case"SHOW_INDICATOR_DETAIL_MODAL":f.value=!0,vue.nextTick(()=>{vue.unref(h).showModal(Nr)});break;case"SAVE_COMPONENT_RES_DATA":Qr(Nr);break;case"SAVE_INDEX_PANEL_REQ_PARAMS":Ur(Nr);break}};vue.provide(COMMON_OPERATE,{operateAction:(Br,Nr)=>{ii(Br,Nr)}}),vue.watchEffect(()=>{var Br;if((Br=vue.unref(tr))!=null&&Br.length&&vue.unref(y)!=="design"){const{jumpType:Nr,jumpTime:jr,jumpPage:Zr,jumpLink:Wr}=c;if(jr!=null&&jr.value){let Yr=0;switch(jr==null?void 0:jr.suffix){case"hours":Yr=jr.value*60*60*1e3;break;case"minute":Yr=jr.value*60*1e3;break;case"seconds":Yr=jr.value*1e3;break}setTimeout(()=>{let ni="";Nr==="page"&&Zr?ni=usePageUrl(vue.unref(y),Zr):Nr==="link"&&Wr&&(ni=Wr),ni=hn(ni),window.open(ni,"_self")},Yr)}}});const yi=Br=>{var Nr;vue.unref(v).showModal({data:Br,indicatorUrl:vue.unref(m),indicatorToken:((Nr=window==null?void 0:window.config)==null?void 0:Nr.indicatorToken)||"",context:CONTEXT,pageId:getPageId()})},xi=Br=>{vue.unref(p).showModal({data:Br,pageConfig:c,unitText:Si(Br)})},Si=Br=>{let Nr="",jr="";const{componentConfig:Zr}=Br;for(const Yr in Zr)if(Zr[Yr].key==="currentValue"){jr=Yr;break}const Wr=vue.unref(nr).find(Yr=>Yr.id===jr);return Wr!=null&&Wr.unitText&&(Nr=Wr.unitText),Nr};vue.provide("showIndDetail",yi);const Ti={indexName:"指标名",currentValue:"当前值",refValue:"目标值",lastValueRate:"同比",lastCycleValueRate:"环比",systemSource:"指标标记"};window.addEventListener("message",async Br=>{var Nr,jr;if(Br.source!==window&&c.customId==="ProviderConfig"){const Zr=Br.data||{};let Wr={data:{}};try{const Yr=(Nr=vue.unref(tr))==null?void 0:Nr.filter(ni=>ni.type==="ecanIndexPanel");if(Zr.type==="checkData")Wr={type:"checkDataRes",hasData:!!(Yr!=null&&Yr.length),data:{}};else if(Zr.type==="getData"){const ni={};let Jr="";if(Yr!=null&&Yr.length)if((jr=vue.unref(h).indDetailInfo)!=null&&jr.visible){const ri=vue.unref(h).getPivotRecordData(),{columns:ai,rows:oi,indicators:si,requestParams:ti,data:ui,type:pi,drillContext:Pi}=ri;pi==="pivotTable"?(ti&&(ni.全局筛选条件=hi({params:ti,onlySql:!1})),ni.当前表结构声明={分析维度:oi.concat(ai).map(Sr=>Sr.title),绝对值指标:si.filter(Sr=>!Sr.calculateType).map(Sr=>Sr.title),"趋势/比率指标":si.filter(Sr=>Sr.calculateType).map(Sr=>Sr.title)},ni.明细数据=ui):(ni.钻取上下文=Pi,ni.流水日志=ui),Jr=pi}else{ni.运营数据=[];for(const ri of Yr){const ai={};for(const oi in ri.componentConfig){const si=ri.componentConfig[oi];if(si.show){const ui=(oi?document.querySelector(`div[cpntid="${oi}"]`).textContent:"").split(/:|:/);ui!=null&&ui.length&&(ai[Ti[si.key]]=ui[ui.length-1])}}ni.运营数据.push(ai)}vue.unref(Gr)&&(ni.分析背景=hi({params:vue.unref(Gr),onlySql:!0}))}Wr={type:"getDataRes",data:ni},Jr&&(Wr.dataType=Jr)}}catch(Yr){Wr={error:Yr.message,data:{}}}Br.source.postMessage(Wr,Br.origin)}});function hi({params:Br,onlySql:Nr}){var si;const{sqlConditions:jr,queryColumns:Zr,indicatorList:Wr}=Br,Yr=Zr.concat(Wr).filter(ti=>ti.conditions),ni=loopConditions(Yr,"conditions",!0),Jr=loopConditions(jr,"sqlConditions",!1);let ri=[];const ai={};if(Nr)ri=Jr;else{ri=lodashEs.cloneDeep(ni);for(const ti of Jr)if(!ni.find(ui=>ui.typeGuid===ti.typeGuid)){const ui=ri.findIndex(pi=>ti.typeGuid!=="the_date"&&(pi.typeGuid===ti.typeGuid||pi.typeGuid+"_code"===ti.typeGuid)||pi.typeGuid===ti.typeGuid+"_code");ui!==-1&&ri.splice(ui,1),ri.push(ti)}}if(!ri.find(ti=>ti.typeGuid==="the_date"&&!ti.alias)){const ti=ri.find(pi=>pi.alias.includes("-startTime")),ui=ri.find(pi=>pi.alias.includes("-endTime"));if(ti&&ui){const pi=ti.alias.replace("-startTime","");pi&&(ai[pi]=`${ti.fieldValue}至${ui.fieldValue}`)}}for(const ti of ri){const{alias:ui,label:pi,title:Pi,fieldValue:Sr,variateName:kr}=ti;if(ui){if(!ui.includes("-startTime")&&!ui.includes("-endTime")&&!kr){const Or=vue.unref(tr).find(Mr=>Mr.keyName===ui);if(["ecanSelect"].includes(Or==null?void 0:Or.type)){const Mr=((si=vue.unref(zr)[Or.id])==null?void 0:si.rows)||[];if(Or.mode==="multiple"){const $r=Sr.split(",");($r==null?void 0:$r.length)===(Mr==null?void 0:Mr.length)?ai[ui]="全院":ai[ui]=Mr.filter(Lr=>$r.includes(Lr.value)).map(Lr=>Lr.label).join(",")}else{const $r=Mr.find(Lr=>Lr.value===Sr);$r&&(ai[ui]=$r.label)}}else ai[ui]=Sr}}else ai[Pi||pi]=Sr}return ai}const Ai=()=>{f.value=!1};return vue.onBeforeUnmount(()=>{Dr==null||Dr.clear(),Kr==null||Kr.clear()}),u({touchRequest:Xr,getGlobalModel:Kn,onRefreshPage:Ir,emitEvent:wr,getRecordValueByKeyName:or,showIndDetail:yi,showTrend:xi,props:c,systemVariable:Yn}),{providerConfig:gn,configStyle:Zn,indicatorUrl:m,theme:b,drillModalRef:h,indDetailModalRef:v,trendModalRef:p,scaleValue:Rn,defaultPivotTableFontSize:J,isMobile:w,isShowDrillModal:f,onCloseModal:Ai}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_3997ad94_lang="",ProviderConfig_vue_vue_type_style_index_1_lang="",_hoisted_1$k=["id"];function _sfc_render$y(c,u,d,f,h,v){const p=vue.resolveComponent("drill-modal"),m=vue.resolveComponent("indicator-detail-modal"),g=vue.resolveComponent("trend-modal");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",{class:"provider-config-container",id:c.customId,ref:"providerConfig",style:vue.normalizeStyle({...c.configStyle,fontFamily:c.pageFontFamily,...c.customStyle})},[vue.renderSlot(c.$slots,"default",{},void 0,!0)],12,_hoisted_1$k),c.isShowDrillModal?(vue.openBlock(),vue.createBlock(p,{key:0,ref:"drillModalRef",width:c.width,theme:c.theme,drillingMode:c.drillingMode,pageMode:c.pageMode,scaleValue:c.scaleValue,pivotTableFontSize:c.defaultPivotTableFontSize,drillDetailUrl:c.drillDetailUrl,onClose:c.onCloseModal},null,8,["width","theme","drillingMode","pageMode","scaleValue","pivotTableFontSize","drillDetailUrl","onClose"])):vue.createCommentVNode("",!0),vue.createVNode(m,{ref:"indDetailModalRef",theme:c.theme},null,8,["theme"]),vue.createVNode(g,{ref:"trendModalRef",theme:c.theme},null,8,["theme"])],64)}const ProviderConfig=_export_sfc$1(_sfc_main$t,[["render",_sfc_render$y],["__scopeId","data-v-3997ad94"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props$1,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:"18px",color:"",variableColor:"",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:"",dataSetchecked:!1,titleContent:"",titleBackgroundColor:"#ffffff",titleFontColor:"#000000",isMarkDown:!1,isContentMarkDown:!1,parentId:""},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==";var esmEntry$1={exports:{}},defaults$5={exports:{}};function getDefaults$1(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function changeDefaults$1(c){defaults$5.exports.defaults=c}defaults$5.exports={defaults:getDefaults$1(),getDefaults:getDefaults$1,changeDefaults:changeDefaults$1};const escapeTest=/[&<>"']/,escapeReplace=/[&<>"']/g,escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g,escapeReplacements={"&":"&","<":"<",">":">",'"':""","'":"'"},getEscapeReplacement=c=>escapeReplacements[c];function escape$3(c,u){if(u){if(escapeTest.test(c))return c.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(c))return c.replace(escapeReplaceNoEncode,getEscapeReplacement);return c}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape$1(c){return c.replace(unescapeTest,(u,d)=>(d=d.toLowerCase(),d==="colon"?":":d.charAt(0)==="#"?d.charAt(1)==="x"?String.fromCharCode(parseInt(d.substring(2),16)):String.fromCharCode(+d.substring(1)):""))}const caret=/(^|[^\[])\^/g;function edit$1(c,u){c=c.source||c,u=u||"";const d={replace:(f,h)=>(h=h.source||h,h=h.replace(caret,"$1"),c=c.replace(f,h),d),getRegex:()=>new RegExp(c,u)};return d}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl$1(c,u,d){if(c){let f;try{f=decodeURIComponent(unescape$1(d)).replace(nonWordAndColonTest,"").toLowerCase()}catch{return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}u&&!originIndependentUrl.test(d)&&(d=resolveUrl(u,d));try{d=encodeURI(d).replace(/%25/g,"%")}catch{return null}return d}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(c,u){baseUrls[" "+c]||(justDomain.test(c)?baseUrls[" "+c]=c+"/":baseUrls[" "+c]=rtrim$1(c,"/",!0)),c=baseUrls[" "+c];const d=c.indexOf(":")===-1;return u.substring(0,2)==="//"?d?u:c.replace(protocol,"$1")+u:u.charAt(0)==="/"?d?u:c.replace(domain,"$1")+u:c+u}const noopTest$1={exec:function(){}};function merge$2(c){let u=1,d,f;for(;u<arguments.length;u++){d=arguments[u];for(f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])}return c}function splitCells$1(c,u){const d=c.replace(/\|/g,(v,p,m)=>{let g=!1,y=p;for(;--y>=0&&m[y]==="\\";)g=!g;return g?"|":" |"}),f=d.split(/ \|/);let h=0;if(f[0].trim()||f.shift(),f[f.length-1].trim()||f.pop(),f.length>u)f.splice(u);else for(;f.length<u;)f.push("");for(;h<f.length;h++)f[h]=f[h].trim().replace(/\\\|/g,"|");return f}function rtrim$1(c,u,d){const f=c.length;if(f===0)return"";let h=0;for(;h<f;){const v=c.charAt(f-h-1);if(v===u&&!d)h++;else if(v!==u&&d)h++;else break}return c.substr(0,f-h)}function findClosingBracket$1(c,u){if(c.indexOf(u[1])===-1)return-1;const d=c.length;let f=0,h=0;for(;h<d;h++)if(c[h]==="\\")h++;else if(c[h]===u[0])f++;else if(c[h]===u[1]&&(f--,f<0))return h;return-1}function checkSanitizeDeprecation$1(c){c&&c.sanitize&&!c.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function repeatString$1(c,u){if(u<1)return"";let d="";for(;u>1;)u&1&&(d+=c),u>>=1,c+=c;return d+c}var helpers={escape:escape$3,unescape:unescape$1,edit:edit$1,cleanUrl:cleanUrl$1,resolveUrl,noopTest:noopTest$1,merge:merge$2,splitCells:splitCells$1,rtrim:rtrim$1,findClosingBracket:findClosingBracket$1,checkSanitizeDeprecation:checkSanitizeDeprecation$1,repeatString:repeatString$1};const{defaults:defaults$4}=defaults$5.exports,{rtrim,splitCells,escape:escape$2,findClosingBracket}=helpers;function outputLink(c,u,d,f){const h=u.href,v=u.title?escape$2(u.title):null,p=c[1].replace(/\\([\[\]])/g,"$1");if(c[0].charAt(0)!=="!"){f.state.inLink=!0;const m={type:"link",raw:d,href:h,title:v,text:p,tokens:f.inlineTokens(p,[])};return f.state.inLink=!1,m}else return{type:"image",raw:d,href:h,title:v,text:escape$2(p)}}function indentCodeCompensation(c,u){const d=c.match(/^(\s+)(?:```)/);if(d===null)return u;const f=d[1];return u.split(`
|
|
108
|
+
*/function _typeof$2(c){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(u){return typeof u}:_typeof$2=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},_typeof$2(c)}function _defineProperty$1(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function _extends(){return _extends=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])}return c},_extends.apply(this,arguments)}function _objectSpread(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{},f=Object.keys(d);typeof Object.getOwnPropertySymbols=="function"&&(f=f.concat(Object.getOwnPropertySymbols(d).filter(function(h){return Object.getOwnPropertyDescriptor(d,h).enumerable}))),f.forEach(function(h){_defineProperty$1(c,h,d[h])})}return c}function _objectWithoutPropertiesLoose(c,u){if(c==null)return{};var d={},f=Object.keys(c),h,v;for(v=0;v<f.length;v++)h=f[v],!(u.indexOf(h)>=0)&&(d[h]=c[h]);return d}function _objectWithoutProperties(c,u){if(c==null)return{};var d=_objectWithoutPropertiesLoose(c,u),f,h;if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(c);for(h=0;h<v.length;h++)f=v[h],!(u.indexOf(f)>=0)&&Object.prototype.propertyIsEnumerable.call(c,f)&&(d[f]=c[f])}return d}var version="1.10.2";function userAgent(c){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(c)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(c,u,d){c.addEventListener(u,d,!IE11OrLess&&captureMode)}function off(c,u,d){c.removeEventListener(u,d,!IE11OrLess&&captureMode)}function matches(c,u){if(u){if(u[0]===">"&&(u=u.substring(1)),c)try{if(c.matches)return c.matches(u);if(c.msMatchesSelector)return c.msMatchesSelector(u);if(c.webkitMatchesSelector)return c.webkitMatchesSelector(u)}catch{return!1}return!1}}function getParentOrHost(c){return c.host&&c!==document&&c.host.nodeType?c.host:c.parentNode}function closest(c,u,d,f){if(c){d=d||document;do{if(u!=null&&(u[0]===">"?c.parentNode===d&&matches(c,u):matches(c,u))||f&&c===d)return c;if(c===d)break}while(c=getParentOrHost(c))}return null}var R_SPACE=/\s+/g;function toggleClass(c,u,d){if(c&&u)if(c.classList)c.classList[d?"add":"remove"](u);else{var f=(" "+c.className+" ").replace(R_SPACE," ").replace(" "+u+" "," ");c.className=(f+(d?" "+u:"")).replace(R_SPACE," ")}}function css(c,u,d){var f=c&&c.style;if(f){if(d===void 0)return document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(c,""):c.currentStyle&&(d=c.currentStyle),u===void 0?d:d[u];!(u in f)&&u.indexOf("webkit")===-1&&(u="-webkit-"+u),f[u]=d+(typeof d=="string"?"":"px")}}function matrix(c,u){var d="";if(typeof c=="string")d=c;else do{var f=css(c,"transform");f&&f!=="none"&&(d=f+" "+d)}while(!u&&(c=c.parentNode));var h=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return h&&new h(d)}function find(c,u,d){if(c){var f=c.getElementsByTagName(u),h=0,v=f.length;if(d)for(;h<v;h++)d(f[h],h);return f}return[]}function getWindowScrollingElement(){var c=document.scrollingElement;return c||document.documentElement}function getRect(c,u,d,f,h){if(!(!c.getBoundingClientRect&&c!==window)){var v,p,m,g,y,b,re;if(c!==window&&c!==getWindowScrollingElement()?(v=c.getBoundingClientRect(),p=v.top,m=v.left,g=v.bottom,y=v.right,b=v.height,re=v.width):(p=0,m=0,g=window.innerHeight,y=window.innerWidth,b=window.innerHeight,re=window.innerWidth),(u||d)&&c!==window&&(h=h||c.parentNode,!IE11OrLess))do if(h&&h.getBoundingClientRect&&(css(h,"transform")!=="none"||d&&css(h,"position")!=="static")){var x=h.getBoundingClientRect();p-=x.top+parseInt(css(h,"border-top-width")),m-=x.left+parseInt(css(h,"border-left-width")),g=p+v.height,y=m+v.width;break}while(h=h.parentNode);if(f&&c!==window){var vn=matrix(h||c),j=vn&&vn.a,Pn=vn&&vn.d;vn&&(p/=Pn,m/=j,re/=j,b/=Pn,g=p+b,y=m+re)}return{top:p,left:m,bottom:g,right:y,width:re,height:b}}}function isScrolledPast(c,u,d){for(var f=getParentAutoScrollElement(c,!0),h=getRect(c)[u];f;){var v=getRect(f)[d],p=void 0;if(d==="top"||d==="left"?p=h>=v:p=h<=v,!p)return f;if(f===getWindowScrollingElement())break;f=getParentAutoScrollElement(f,!1)}return!1}function getChild(c,u,d){for(var f=0,h=0,v=c.children;h<v.length;){if(v[h].style.display!=="none"&&v[h]!==Sortable.ghost&&v[h]!==Sortable.dragged&&closest(v[h],d.draggable,c,!1)){if(f===u)return v[h];f++}h++}return null}function lastChild(c,u){for(var d=c.lastElementChild;d&&(d===Sortable.ghost||css(d,"display")==="none"||u&&!matches(d,u));)d=d.previousElementSibling;return d||null}function index$2(c,u){var d=0;if(!c||!c.parentNode)return-1;for(;c=c.previousElementSibling;)c.nodeName.toUpperCase()!=="TEMPLATE"&&c!==Sortable.clone&&(!u||matches(c,u))&&d++;return d}function getRelativeScrollOffset(c){var u=0,d=0,f=getWindowScrollingElement();if(c)do{var h=matrix(c),v=h.a,p=h.d;u+=c.scrollLeft*v,d+=c.scrollTop*p}while(c!==f&&(c=c.parentNode));return[u,d]}function indexOfObject(c,u){for(var d in c)if(c.hasOwnProperty(d)){for(var f in u)if(u.hasOwnProperty(f)&&u[f]===c[d][f])return Number(d)}return-1}function getParentAutoScrollElement(c,u){if(!c||!c.getBoundingClientRect)return getWindowScrollingElement();var d=c,f=!1;do if(d.clientWidth<d.scrollWidth||d.clientHeight<d.scrollHeight){var h=css(d);if(d.clientWidth<d.scrollWidth&&(h.overflowX=="auto"||h.overflowX=="scroll")||d.clientHeight<d.scrollHeight&&(h.overflowY=="auto"||h.overflowY=="scroll")){if(!d.getBoundingClientRect||d===document.body)return getWindowScrollingElement();if(f||u)return d;f=!0}}while(d=d.parentNode);return getWindowScrollingElement()}function extend$1(c,u){if(c&&u)for(var d in u)u.hasOwnProperty(d)&&(c[d]=u[d]);return c}function isRectEqual(c,u){return Math.round(c.top)===Math.round(u.top)&&Math.round(c.left)===Math.round(u.left)&&Math.round(c.height)===Math.round(u.height)&&Math.round(c.width)===Math.round(u.width)}var _throttleTimeout;function throttle$1(c,u){return function(){if(!_throttleTimeout){var d=arguments,f=this;d.length===1?c.call(f,d[0]):c.apply(f,d),_throttleTimeout=setTimeout(function(){_throttleTimeout=void 0},u)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(c,u,d){c.scrollLeft+=u,c.scrollTop+=d}function clone(c){var u=window.Polymer,d=window.jQuery||window.Zepto;return u&&u.dom?u.dom(c).cloneNode(!0):d?d(c).clone(!0)[0]:c.cloneNode(!0)}var expando="Sortable"+new Date().getTime();function AnimationStateManager(){var c=[],u;return{captureAnimationState:function(){if(c=[],!!this.options.animation){var f=[].slice.call(this.el.children);f.forEach(function(h){if(!(css(h,"display")==="none"||h===Sortable.ghost)){c.push({target:h,rect:getRect(h)});var v=_objectSpread({},c[c.length-1].rect);if(h.thisAnimationDuration){var p=matrix(h,!0);p&&(v.top-=p.f,v.left-=p.e)}h.fromRect=v}})}},addAnimationState:function(f){c.push(f)},removeAnimationState:function(f){c.splice(indexOfObject(c,{target:f}),1)},animateAll:function(f){var h=this;if(!this.options.animation){clearTimeout(u),typeof f=="function"&&f();return}var v=!1,p=0;c.forEach(function(m){var g=0,y=m.target,b=y.fromRect,re=getRect(y),x=y.prevFromRect,vn=y.prevToRect,j=m.rect,Pn=matrix(y,!0);Pn&&(re.top-=Pn.f,re.left-=Pn.e),y.toRect=re,y.thisAnimationDuration&&isRectEqual(x,re)&&!isRectEqual(b,re)&&(j.top-re.top)/(j.left-re.left)===(b.top-re.top)/(b.left-re.left)&&(g=calculateRealTime(j,x,vn,h.options)),isRectEqual(re,b)||(y.prevFromRect=b,y.prevToRect=re,g||(g=h.options.animation),h.animate(y,j,re,g)),g&&(v=!0,p=Math.max(p,g),clearTimeout(y.animationResetTimer),y.animationResetTimer=setTimeout(function(){y.animationTime=0,y.prevFromRect=null,y.fromRect=null,y.prevToRect=null,y.thisAnimationDuration=null},g),y.thisAnimationDuration=g)}),clearTimeout(u),v?u=setTimeout(function(){typeof f=="function"&&f()},p):typeof f=="function"&&f(),c=[]},animate:function(f,h,v,p){if(p){css(f,"transition",""),css(f,"transform","");var m=matrix(this.el),g=m&&m.a,y=m&&m.d,b=(h.left-v.left)/(g||1),re=(h.top-v.top)/(y||1);f.animatingX=!!b,f.animatingY=!!re,css(f,"transform","translate3d("+b+"px,"+re+"px,0)"),repaint(f),css(f,"transition","transform "+p+"ms"+(this.options.easing?" "+this.options.easing:"")),css(f,"transform","translate3d(0,0,0)"),typeof f.animated=="number"&&clearTimeout(f.animated),f.animated=setTimeout(function(){css(f,"transition",""),css(f,"transform",""),f.animated=!1,f.animatingX=!1,f.animatingY=!1},p)}}}}function repaint(c){return c.offsetWidth}function calculateRealTime(c,u,d,f){return Math.sqrt(Math.pow(u.top-c.top,2)+Math.pow(u.left-c.left,2))/Math.sqrt(Math.pow(u.top-d.top,2)+Math.pow(u.left-d.left,2))*f.animation}var plugins=[],defaults$6={initializeByDefault:!0},PluginManager={mount:function(u){for(var d in defaults$6)defaults$6.hasOwnProperty(d)&&!(d in u)&&(u[d]=defaults$6[d]);plugins.push(u)},pluginEvent:function(u,d,f){var h=this;this.eventCanceled=!1,f.cancel=function(){h.eventCanceled=!0};var v=u+"Global";plugins.forEach(function(p){d[p.pluginName]&&(d[p.pluginName][v]&&d[p.pluginName][v](_objectSpread({sortable:d},f)),d.options[p.pluginName]&&d[p.pluginName][u]&&d[p.pluginName][u](_objectSpread({sortable:d},f)))})},initializePlugins:function(u,d,f,h){plugins.forEach(function(m){var g=m.pluginName;if(!(!u.options[g]&&!m.initializeByDefault)){var y=new m(u,d,u.options);y.sortable=u,y.options=u.options,u[g]=y,_extends(f,y.defaults)}});for(var v in u.options)if(u.options.hasOwnProperty(v)){var p=this.modifyOption(u,v,u.options[v]);typeof p<"u"&&(u.options[v]=p)}},getEventProperties:function(u,d){var f={};return plugins.forEach(function(h){typeof h.eventProperties=="function"&&_extends(f,h.eventProperties.call(d[h.pluginName],u))}),f},modifyOption:function(u,d,f){var h;return plugins.forEach(function(v){u[v.pluginName]&&v.optionListeners&&typeof v.optionListeners[d]=="function"&&(h=v.optionListeners[d].call(u[v.pluginName],f))}),h}};function dispatchEvent(c){var u=c.sortable,d=c.rootEl,f=c.name,h=c.targetEl,v=c.cloneEl,p=c.toEl,m=c.fromEl,g=c.oldIndex,y=c.newIndex,b=c.oldDraggableIndex,re=c.newDraggableIndex,x=c.originalEvent,vn=c.putSortable,j=c.extraEventProperties;if(u=u||d&&d[expando],!!u){var Pn,qn=u.options,Bn="on"+f.charAt(0).toUpperCase()+f.substr(1);window.CustomEvent&&!IE11OrLess&&!Edge?Pn=new CustomEvent(f,{bubbles:!0,cancelable:!0}):(Pn=document.createEvent("Event"),Pn.initEvent(f,!0,!0)),Pn.to=p||d,Pn.from=m||d,Pn.item=h||d,Pn.clone=v,Pn.oldIndex=g,Pn.newIndex=y,Pn.oldDraggableIndex=b,Pn.newDraggableIndex=re,Pn.originalEvent=x,Pn.pullMode=vn?vn.lastPutMode:void 0;var w=_objectSpread({},j,PluginManager.getEventProperties(f,u));for(var J in w)Pn[J]=w[J];d&&d.dispatchEvent(Pn),qn[Bn]&&qn[Bn].call(u,Pn)}}var pluginEvent=function(u,d){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=f.evt,v=_objectWithoutProperties(f,["evt"]);PluginManager.pluginEvent.bind(Sortable)(u,d,_objectSpread({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:h,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(m){_dispatchEvent({sortable:d,name:m,originalEvent:h})}},v))};function _dispatchEvent(c){dispatchEvent(_objectSpread({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},c))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var c=document.createElement("x");return c.style.cssText="pointer-events:auto",c.style.pointerEvents==="auto"}}(),_detectDirection=function(u,d){var f=css(u),h=parseInt(f.width)-parseInt(f.paddingLeft)-parseInt(f.paddingRight)-parseInt(f.borderLeftWidth)-parseInt(f.borderRightWidth),v=getChild(u,0,d),p=getChild(u,1,d),m=v&&css(v),g=p&&css(p),y=m&&parseInt(m.marginLeft)+parseInt(m.marginRight)+getRect(v).width,b=g&&parseInt(g.marginLeft)+parseInt(g.marginRight)+getRect(p).width;if(f.display==="flex")return f.flexDirection==="column"||f.flexDirection==="column-reverse"?"vertical":"horizontal";if(f.display==="grid")return f.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(v&&m.float&&m.float!=="none"){var re=m.float==="left"?"left":"right";return p&&(g.clear==="both"||g.clear===re)?"vertical":"horizontal"}return v&&(m.display==="block"||m.display==="flex"||m.display==="table"||m.display==="grid"||y>=h&&f[CSSFloatProperty]==="none"||p&&f[CSSFloatProperty]==="none"&&y+b>h)?"vertical":"horizontal"},_dragElInRowColumn=function(u,d,f){var h=f?u.left:u.top,v=f?u.right:u.bottom,p=f?u.width:u.height,m=f?d.left:d.top,g=f?d.right:d.bottom,y=f?d.width:d.height;return h===m||v===g||h+p/2===m+y/2},_detectNearestEmptySortable=function(u,d){var f;return sortables.some(function(h){if(!lastChild(h)){var v=getRect(h),p=h[expando].options.emptyInsertThreshold,m=u>=v.left-p&&u<=v.right+p,g=d>=v.top-p&&d<=v.bottom+p;if(p&&m&&g)return f=h}}),f},_prepareGroup=function(u){function d(v,p){return function(m,g,y,b){var re=m.options.group.name&&g.options.group.name&&m.options.group.name===g.options.group.name;if(v==null&&(p||re))return!0;if(v==null||v===!1)return!1;if(p&&v==="clone")return v;if(typeof v=="function")return d(v(m,g,y,b),p)(m,g,y,b);var x=(p?m:g).options.group.name;return v===!0||typeof v=="string"&&v===x||v.join&&v.indexOf(x)>-1}}var f={},h=u.group;(!h||_typeof$2(h)!="object")&&(h={name:h}),f.name=h.name,f.checkPull=d(h.pull,!0),f.checkPut=d(h.put),f.revertClone=h.revertClone,u.group=f},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&document.addEventListener("click",function(c){if(ignoreNextClick)return c.preventDefault(),c.stopPropagation&&c.stopPropagation(),c.stopImmediatePropagation&&c.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function(u){if(dragEl){u=u.touches?u.touches[0]:u;var d=_detectNearestEmptySortable(u.clientX,u.clientY);if(d){var f={};for(var h in u)u.hasOwnProperty(h)&&(f[h]=u[h]);f.target=f.rootEl=d,f.preventDefault=void 0,f.stopPropagation=void 0,d[expando]._onDragOver(f)}}},_checkOutsideTargetEl=function(u){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(u.target)};function Sortable(c,u){if(!(c&&c.nodeType&&c.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(c));this.el=c,this.options=u=_extends({},u),c[expando]=this;var d={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(c.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(c,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(p,m){p.setData("Text",m.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};PluginManager.initializePlugins(this,c,d);for(var f in d)!(f in u)&&(u[f]=d[f]);_prepareGroup(u);for(var h in this)h.charAt(0)==="_"&&typeof this[h]=="function"&&(this[h]=this[h].bind(this));this.nativeDraggable=u.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),u.supportPointer?on(c,"pointerdown",this._onTapStart):(on(c,"mousedown",this._onTapStart),on(c,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(c,"dragover",this),on(c,"dragenter",this)),sortables.push(this.el),u.store&&u.store.get&&this.sort(u.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(u){!this.el.contains(u)&&u!==this.el&&(lastTarget=null)},_getDirection:function(u,d){return typeof this.options.direction=="function"?this.options.direction.call(this,u,d,dragEl):this.options.direction},_onTapStart:function(u){if(u.cancelable){var d=this,f=this.el,h=this.options,v=h.preventOnFilter,p=u.type,m=u.touches&&u.touches[0]||u.pointerType&&u.pointerType==="touch"&&u,g=(m||u).target,y=u.target.shadowRoot&&(u.path&&u.path[0]||u.composedPath&&u.composedPath()[0])||g,b=h.filter;if(_saveInputCheckedState(f),!dragEl&&!(/mousedown|pointerdown/.test(p)&&u.button!==0||h.disabled)&&!y.isContentEditable&&(g=closest(g,h.draggable,f,!1),!(g&&g.animated)&&lastDownEl!==g)){if(oldIndex=index$2(g),oldDraggableIndex=index$2(g,h.draggable),typeof b=="function"){if(b.call(this,u,g,this)){_dispatchEvent({sortable:d,rootEl:y,name:"filter",targetEl:g,toEl:f,fromEl:f}),pluginEvent("filter",d,{evt:u}),v&&u.cancelable&&u.preventDefault();return}}else if(b&&(b=b.split(",").some(function(re){if(re=closest(y,re.trim(),f,!1),re)return _dispatchEvent({sortable:d,rootEl:re,name:"filter",targetEl:g,fromEl:f,toEl:f}),pluginEvent("filter",d,{evt:u}),!0}),b)){v&&u.cancelable&&u.preventDefault();return}h.handle&&!closest(y,h.handle,f,!1)||this._prepareDragStart(u,m,g)}}},_prepareDragStart:function(u,d,f){var h=this,v=h.el,p=h.options,m=v.ownerDocument,g;if(f&&!dragEl&&f.parentNode===v){var y=getRect(f);if(rootEl=v,dragEl=f,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=f,activeGroup=p.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(d||u).clientX,clientY:(d||u).clientY},tapDistanceLeft=tapEvt.clientX-y.left,tapDistanceTop=tapEvt.clientY-y.top,this._lastX=(d||u).clientX,this._lastY=(d||u).clientY,dragEl.style["will-change"]="all",g=function(){if(pluginEvent("delayEnded",h,{evt:u}),Sortable.eventCanceled){h._onDrop();return}h._disableDelayedDragEvents(),!FireFox&&h.nativeDraggable&&(dragEl.draggable=!0),h._triggerDragStart(u,d),_dispatchEvent({sortable:h,name:"choose",originalEvent:u}),toggleClass(dragEl,p.chosenClass,!0)},p.ignore.split(",").forEach(function(b){find(dragEl,b.trim(),_disableDraggable)}),on(m,"dragover",nearestEmptyInsertDetectEvent),on(m,"mousemove",nearestEmptyInsertDetectEvent),on(m,"touchmove",nearestEmptyInsertDetectEvent),on(m,"mouseup",h._onDrop),on(m,"touchend",h._onDrop),on(m,"touchcancel",h._onDrop),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:u}),p.delay&&(!p.delayOnTouchOnly||d)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}on(m,"mouseup",h._disableDelayedDrag),on(m,"touchend",h._disableDelayedDrag),on(m,"touchcancel",h._disableDelayedDrag),on(m,"mousemove",h._delayedDragTouchMoveHandler),on(m,"touchmove",h._delayedDragTouchMoveHandler),p.supportPointer&&on(m,"pointermove",h._delayedDragTouchMoveHandler),h._dragStartTimer=setTimeout(g,p.delay)}else g()}},_delayedDragTouchMoveHandler:function(u){var d=u.touches?u.touches[0]:u;Math.max(Math.abs(d.clientX-this._lastX),Math.abs(d.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var u=this.el.ownerDocument;off(u,"mouseup",this._disableDelayedDrag),off(u,"touchend",this._disableDelayedDrag),off(u,"touchcancel",this._disableDelayedDrag),off(u,"mousemove",this._delayedDragTouchMoveHandler),off(u,"touchmove",this._delayedDragTouchMoveHandler),off(u,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(u,d){d=d||u.pointerType=="touch"&&u,!this.nativeDraggable||d?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):d?on(document,"touchmove",this._onTouchMove):on(document,"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(u,d){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:d}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var f=this.options;!u&&toggleClass(dragEl,f.dragClass,!1),toggleClass(dragEl,f.ghostClass,!0),Sortable.active=this,u&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:d})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var u=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),d=u;u&&u.shadowRoot&&(u=u.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),u!==d);)d=u;if(dragEl.parentNode[expando]._isOutsideThisEl(u),d)do{if(d[expando]){var f=void 0;if(f=d[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:u,rootEl:d}),f&&!this.options.dragoverBubble)break}u=d}while(d=d.parentNode);_unhideGhostForTarget()}},_onTouchMove:function(u){if(tapEvt){var d=this.options,f=d.fallbackTolerance,h=d.fallbackOffset,v=u.touches?u.touches[0]:u,p=ghostEl&&matrix(ghostEl,!0),m=ghostEl&&p&&p.a,g=ghostEl&&p&&p.d,y=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),b=(v.clientX-tapEvt.clientX+h.x)/(m||1)+(y?y[0]-ghostRelativeParentInitialScroll[0]:0)/(m||1),re=(v.clientY-tapEvt.clientY+h.y)/(g||1)+(y?y[1]-ghostRelativeParentInitialScroll[1]:0)/(g||1);if(!Sortable.active&&!awaitingDragStarted){if(f&&Math.max(Math.abs(v.clientX-this._lastX),Math.abs(v.clientY-this._lastY))<f)return;this._onDragStart(u,!0)}if(ghostEl){p?(p.e+=b-(lastDx||0),p.f+=re-(lastDy||0)):p={a:1,b:0,c:0,d:1,e:b,f:re};var x="matrix(".concat(p.a,",").concat(p.b,",").concat(p.c,",").concat(p.d,",").concat(p.e,",").concat(p.f,")");css(ghostEl,"webkitTransform",x),css(ghostEl,"mozTransform",x),css(ghostEl,"msTransform",x),css(ghostEl,"transform",x),lastDx=b,lastDy=re,touchEvt=v}u.cancelable&&u.preventDefault()}},_appendGhost:function(){if(!ghostEl){var u=this.options.fallbackOnBody?document.body:rootEl,d=getRect(dragEl,!0,PositionGhostAbsolutely,!0,u),f=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=u;css(ghostRelativeParent,"position")==="static"&&css(ghostRelativeParent,"transform")==="none"&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),d.top+=ghostRelativeParent.scrollTop,d.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(!0),toggleClass(ghostEl,f.ghostClass,!1),toggleClass(ghostEl,f.fallbackClass,!0),toggleClass(ghostEl,f.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",d.top),css(ghostEl,"left",d.left),css(ghostEl,"width",d.width),css(ghostEl,"height",d.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,u.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function(u,d){var f=this,h=u.dataTransfer,v=f.options;if(pluginEvent("dragStart",this,{evt:u}),Sortable.eventCanceled){this._onDrop();return}pluginEvent("setupClone",this),Sortable.eventCanceled||(cloneEl=clone(dragEl),cloneEl.draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),f.cloneId=_nextTick(function(){pluginEvent("clone",f),!Sortable.eventCanceled&&(f.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),f._hideClone(),_dispatchEvent({sortable:f,name:"clone"}))}),!d&&toggleClass(dragEl,v.dragClass,!0),d?(ignoreNextClick=!0,f._loopId=setInterval(f._emulateDragOver,50)):(off(document,"mouseup",f._onDrop),off(document,"touchend",f._onDrop),off(document,"touchcancel",f._onDrop),h&&(h.effectAllowed="move",v.setData&&v.setData.call(f,h,dragEl)),on(document,"drop",f),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,f._dragStartId=_nextTick(f._dragStarted.bind(f,d,u)),on(document,"selectstart",f),moved=!0,Safari&&css(document.body,"user-select","none")},_onDragOver:function(u){var d=this.el,f=u.target,h,v,p,m=this.options,g=m.group,y=Sortable.active,b=activeGroup===g,re=m.sort,x=putSortable||y,vn,j=this,Pn=!1;if(_silent)return;function qn(Zn,Hn){pluginEvent(Zn,j,_objectSpread({evt:u,isOwner:b,axis:vn?"vertical":"horizontal",revert:p,dragRect:h,targetRect:v,canSort:re,fromSortable:x,target:f,completed:w,onMove:function(er,Kn){return _onMove(rootEl,d,dragEl,h,er,getRect(er),u,Kn)},changed:J},Hn))}function Bn(){qn("dragOverAnimationCapture"),j.captureAnimationState(),j!==x&&x.captureAnimationState()}function w(Zn){return qn("dragOverCompleted",{insertion:Zn}),Zn&&(b?y._hideClone():y._showClone(j),j!==x&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:y.options.ghostClass,!1),toggleClass(dragEl,m.ghostClass,!0)),putSortable!==j&&j!==Sortable.active?putSortable=j:j===Sortable.active&&putSortable&&(putSortable=null),x===j&&(j._ignoreWhileAnimating=f),j.animateAll(function(){qn("dragOverAnimationComplete"),j._ignoreWhileAnimating=null}),j!==x&&(x.animateAll(),x._ignoreWhileAnimating=null)),(f===dragEl&&!dragEl.animated||f===d&&!f.animated)&&(lastTarget=null),!m.dragoverBubble&&!u.rootEl&&f!==document&&(dragEl.parentNode[expando]._isOutsideThisEl(u.target),!Zn&&nearestEmptyInsertDetectEvent(u)),!m.dragoverBubble&&u.stopPropagation&&u.stopPropagation(),Pn=!0}function J(){newIndex=index$2(dragEl),newDraggableIndex=index$2(dragEl,m.draggable),_dispatchEvent({sortable:j,name:"change",toEl:d,newIndex,newDraggableIndex,originalEvent:u})}if(u.preventDefault!==void 0&&u.cancelable&&u.preventDefault(),f=closest(f,m.draggable,d,!0),qn("dragOver"),Sortable.eventCanceled)return Pn;if(dragEl.contains(u.target)||f.animated&&f.animatingX&&f.animatingY||j._ignoreWhileAnimating===f)return w(!1);if(ignoreNextClick=!1,y&&!m.disabled&&(b?re||(p=!rootEl.contains(dragEl)):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,y,dragEl,u))&&g.checkPut(this,y,dragEl,u))){if(vn=this._getDirection(u,f)==="vertical",h=getRect(dragEl),qn("dragOverValid"),Sortable.eventCanceled)return Pn;if(p)return parentEl=rootEl,Bn(),this._hideClone(),qn("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),w(!0);var gn=lastChild(d,m.draggable);if(!gn||_ghostIsLast(u,vn,this)&&!gn.animated){if(gn===dragEl)return w(!1);if(gn&&d===u.target&&(f=gn),f&&(v=getRect(f)),_onMove(rootEl,d,dragEl,h,f,v,u,!!f)!==!1)return Bn(),d.appendChild(dragEl),parentEl=d,J(),w(!0)}else if(f.parentNode===d){v=getRect(f);var Rn=0,zn,Wn=dragEl.parentNode!==d,Yn=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||h,f.animated&&f.toRect||v,vn),Jn=vn?"top":"left",tr=isScrolledPast(f,"top","top")||isScrolledPast(dragEl,"top","top"),nr=tr?tr.scrollTop:void 0;lastTarget!==f&&(zn=v[Jn],pastFirstInvertThresh=!1,isCircumstantialInvert=!Yn&&m.invertSwap||Wn),Rn=_getSwapDirection(u,f,v,vn,Yn?1:m.swapThreshold,m.invertedSwapThreshold==null?m.swapThreshold:m.invertedSwapThreshold,isCircumstantialInvert,lastTarget===f);var Qn;if(Rn!==0){var ar=index$2(dragEl);do ar-=Rn,Qn=parentEl.children[ar];while(Qn&&(css(Qn,"display")==="none"||Qn===ghostEl))}if(Rn===0||Qn===f)return w(!1);lastTarget=f,lastDirection=Rn;var cr=f.nextElementSibling,fr=!1;fr=Rn===1;var Gn=_onMove(rootEl,d,dragEl,h,f,v,u,fr);if(Gn!==!1)return(Gn===1||Gn===-1)&&(fr=Gn===1),_silent=!0,setTimeout(_unsilent,30),Bn(),fr&&!cr?d.appendChild(dragEl):f.parentNode.insertBefore(dragEl,fr?cr:f),tr&&scrollBy(tr,0,nr-tr.scrollTop),parentEl=dragEl.parentNode,zn!==void 0&&!isCircumstantialInvert&&(targetMoveDistance=Math.abs(zn-getRect(f)[Jn])),J(),w(!0)}if(d.contains(dragEl))return w(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function(){var u=this.el.ownerDocument;off(u,"mouseup",this._onDrop),off(u,"touchend",this._onDrop),off(u,"pointerup",this._onDrop),off(u,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function(u){var d=this.el,f=this.options;if(newIndex=index$2(dragEl),newDraggableIndex=index$2(dragEl,f.draggable),pluginEvent("drop",this,{evt:u}),parentEl=dragEl&&dragEl.parentNode,newIndex=index$2(dragEl),newDraggableIndex=index$2(dragEl,f.draggable),Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(d,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),u&&(moved&&(u.cancelable&&u.preventDefault(),!f.dropBubble&&u.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&putSortable.lastPutMode!=="clone")&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:u}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:u}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:u}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:u}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:u})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:u}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:u})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:u}),this.save()))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(u){u.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(u){switch(u.type){case"drop":case"dragend":this._onDrop(u);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(u),_globalDragOver(u));break;case"selectstart":u.preventDefault();break}},toArray:function(){for(var u=[],d,f=this.el.children,h=0,v=f.length,p=this.options;h<v;h++)d=f[h],closest(d,p.draggable,this.el,!1)&&u.push(d.getAttribute(p.dataIdAttr)||_generateId(d));return u},sort:function(u){var d={},f=this.el;this.toArray().forEach(function(h,v){var p=f.children[v];closest(p,this.options.draggable,f,!1)&&(d[h]=p)},this),u.forEach(function(h){d[h]&&(f.removeChild(d[h]),f.appendChild(d[h]))})},save:function(){var u=this.options.store;u&&u.set&&u.set(this)},closest:function(u,d){return closest(u,d||this.options.draggable,this.el,!1)},option:function(u,d){var f=this.options;if(d===void 0)return f[u];var h=PluginManager.modifyOption(this,u,d);typeof h<"u"?f[u]=h:f[u]=d,u==="group"&&_prepareGroup(f)},destroy:function(){pluginEvent("destroy",this);var u=this.el;u[expando]=null,off(u,"mousedown",this._onTapStart),off(u,"touchstart",this._onTapStart),off(u,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(u,"dragover",this),off(u,"dragenter",this)),Array.prototype.forEach.call(u.querySelectorAll("[draggable]"),function(d){d.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=u=null},_hideClone:function(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function(u){if(u.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;rootEl.contains(dragEl)&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}};function _globalDragOver(c){c.dataTransfer&&(c.dataTransfer.dropEffect="move"),c.cancelable&&c.preventDefault()}function _onMove(c,u,d,f,h,v,p,m){var g,y=c[expando],b=y.options.onMove,re;return window.CustomEvent&&!IE11OrLess&&!Edge?g=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent("move",!0,!0)),g.to=u,g.from=c,g.dragged=d,g.draggedRect=f,g.related=h||u,g.relatedRect=v||getRect(u),g.willInsertAfter=m,g.originalEvent=p,c.dispatchEvent(g),b&&(re=b.call(y,g,p)),re}function _disableDraggable(c){c.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsLast(c,u,d){var f=getRect(lastChild(d.el,d.options.draggable)),h=10;return u?c.clientX>f.right+h||c.clientX<=f.right&&c.clientY>f.bottom&&c.clientX>=f.left:c.clientX>f.right&&c.clientY>f.top||c.clientX<=f.right&&c.clientY>f.bottom+h}function _getSwapDirection(c,u,d,f,h,v,p,m){var g=f?c.clientY:c.clientX,y=f?d.height:d.width,b=f?d.top:d.left,re=f?d.bottom:d.right,x=!1;if(!p){if(m&&targetMoveDistance<y*h){if(!pastFirstInvertThresh&&(lastDirection===1?g>b+y*v/2:g<re-y*v/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)x=!0;else if(lastDirection===1?g<b+targetMoveDistance:g>re-targetMoveDistance)return-lastDirection}else if(g>b+y*(1-h)/2&&g<re-y*(1-h)/2)return _getInsertDirection(u)}return x=x||p,x&&(g<b+y*v/2||g>re-y*v/2)?g>b+y/2?1:-1:0}function _getInsertDirection(c){return index$2(dragEl)<index$2(c)?1:-1}function _generateId(c){for(var u=c.tagName+c.className+c.src+c.href+c.textContent,d=u.length,f=0;d--;)f+=u.charCodeAt(d);return f.toString(36)}function _saveInputCheckedState(c){savedInputChecked.length=0;for(var u=c.getElementsByTagName("input"),d=u.length;d--;){var f=u[d];f.checked&&savedInputChecked.push(f)}}function _nextTick(c){return setTimeout(c,0)}function _cancelNextTick(c){return clearTimeout(c)}documentExists&&on(document,"touchmove",function(c){(Sortable.active||awaitingDragStarted)&&c.cancelable&&c.preventDefault()}),Sortable.utils={on,off,css,find,is:function(u,d){return!!closest(u,d,u,!1)},extend:extend$1,throttle:throttle$1,closest,toggleClass,clone,index:index$2,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild},Sortable.get=function(c){return c[expando]},Sortable.mount=function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];u[0].constructor===Array&&(u=u[0]),u.forEach(function(f){if(!f.prototype||!f.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(f));f.utils&&(Sortable.utils=_objectSpread({},Sortable.utils,f.utils)),PluginManager.mount(f)})},Sortable.create=function(c,u){return new Sortable(c,u)},Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function c(){this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var u in this)u.charAt(0)==="_"&&typeof this[u]=="function"&&(this[u]=this[u].bind(this))}return c.prototype={dragStarted:function(d){var f=d.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):f.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(d){var f=d.originalEvent;!this.options.dragOverBubble&&!f.rootEl&&this._handleAutoScroll(f)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(d){this._handleAutoScroll(d,!0)},_handleAutoScroll:function(d,f){var h=this,v=(d.touches?d.touches[0]:d).clientX,p=(d.touches?d.touches[0]:d).clientY,m=document.elementFromPoint(v,p);if(touchEvt$1=d,f||Edge||IE11OrLess||Safari){autoScroll(d,this.options,m,f);var g=getParentAutoScrollElement(m,!0);scrolling&&(!pointerElemChangedInterval||v!==lastAutoScrollX||p!==lastAutoScrollY)&&(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval(function(){var y=getParentAutoScrollElement(document.elementFromPoint(v,p),!0);y!==g&&(g=y,clearAutoScrolls()),autoScroll(d,h.options,y,f)},10),lastAutoScrollX=v,lastAutoScrollY=p)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(m,!0)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(d,this.options,getParentAutoScrollElement(m,!1),!1)}}},_extends(c,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach(function(c){clearInterval(c.pid)}),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle$1(function(c,u,d,f){if(u.scroll){var h=(c.touches?c.touches[0]:c).clientX,v=(c.touches?c.touches[0]:c).clientY,p=u.scrollSensitivity,m=u.scrollSpeed,g=getWindowScrollingElement(),y=!1,b;scrollRootEl!==d&&(scrollRootEl=d,clearAutoScrolls(),scrollEl=u.scroll,b=u.scrollFn,scrollEl===!0&&(scrollEl=getParentAutoScrollElement(d,!0)));var re=0,x=scrollEl;do{var vn=x,j=getRect(vn),Pn=j.top,qn=j.bottom,Bn=j.left,w=j.right,J=j.width,gn=j.height,Rn=void 0,zn=void 0,Wn=vn.scrollWidth,Yn=vn.scrollHeight,Jn=css(vn),tr=vn.scrollLeft,nr=vn.scrollTop;vn===g?(Rn=J<Wn&&(Jn.overflowX==="auto"||Jn.overflowX==="scroll"||Jn.overflowX==="visible"),zn=gn<Yn&&(Jn.overflowY==="auto"||Jn.overflowY==="scroll"||Jn.overflowY==="visible")):(Rn=J<Wn&&(Jn.overflowX==="auto"||Jn.overflowX==="scroll"),zn=gn<Yn&&(Jn.overflowY==="auto"||Jn.overflowY==="scroll"));var Qn=Rn&&(Math.abs(w-h)<=p&&tr+J<Wn)-(Math.abs(Bn-h)<=p&&!!tr),ar=zn&&(Math.abs(qn-v)<=p&&nr+gn<Yn)-(Math.abs(Pn-v)<=p&&!!nr);if(!autoScrolls[re])for(var cr=0;cr<=re;cr++)autoScrolls[cr]||(autoScrolls[cr]={});(autoScrolls[re].vx!=Qn||autoScrolls[re].vy!=ar||autoScrolls[re].el!==vn)&&(autoScrolls[re].el=vn,autoScrolls[re].vx=Qn,autoScrolls[re].vy=ar,clearInterval(autoScrolls[re].pid),(Qn!=0||ar!=0)&&(y=!0,autoScrolls[re].pid=setInterval((function(){f&&this.layer===0&&Sortable.active._onTouchMove(touchEvt$1);var fr=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*m:0,Gn=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*m:0;typeof b=="function"&&b.call(Sortable.dragged.parentNode[expando],Gn,fr,c,touchEvt$1,autoScrolls[this.layer].el)!=="continue"||scrollBy(autoScrolls[this.layer].el,Gn,fr)}).bind({layer:re}),24))),re++}while(u.bubbleScroll&&x!==g&&(x=getParentAutoScrollElement(x,!1)));scrolling=y}},30),drop=function(u){var d=u.originalEvent,f=u.putSortable,h=u.dragEl,v=u.activeSortable,p=u.dispatchSortableEvent,m=u.hideGhostForTarget,g=u.unhideGhostForTarget;if(d){var y=f||v;m();var b=d.changedTouches&&d.changedTouches.length?d.changedTouches[0]:d,re=document.elementFromPoint(b.clientX,b.clientY);g(),y&&!y.el.contains(re)&&(p("spill"),this.onSpill({dragEl:h,putSortable:f}))}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function(u){var d=u.oldDraggableIndex;this.startIndex=d},onSpill:function(u){var d=u.dragEl,f=u.putSortable;this.sortable.captureAnimationState(),f&&f.captureAnimationState();var h=getChild(this.sortable.el,this.startIndex,this.options);h?this.sortable.el.insertBefore(d,h):this.sortable.el.appendChild(d),this.sortable.animateAll(),f&&f.animateAll()},drop},_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function(u){var d=u.dragEl,f=u.putSortable,h=f||this.sortable;h.captureAnimationState(),d.parentNode&&d.parentNode.removeChild(d),h.animateAll()},drop},_extends(Remove,{pluginName:"removeOnSpill"}),Sortable.mount(new AutoScrollPlugin),Sortable.mount(Remove,Revert);const LastDetail_vue_vue_type_style_index_0_scoped_dc7714ba_lang="",LastDetail_vue_vue_type_style_index_1_lang="";dayjs.locale("zh-cn");const _sfc_main$v=vue.defineComponent({name:"LastDetail",components:{ATable:antDesignVue.Table,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,CustomModal},props:{theme:{type:String,default:"light"},theDateInfo:{type:Object,default:()=>({})},scaleValue:{type:Object,default:()=>({})},fontSize:{type:Number,default:16},allDimensions:{type:Array,default:()=>[]}},setup(c,{emit:u,expose:d}){const f="-",h=window.screen.height*.6,v=`dtmodal_${nanoid(6)}`,p=vue.ref(!1),m=vue.ref(!0),g=vue.ref(!1),y=vue.ref(!1),b=vue.ref(!1),re=vue.ref([]),x=vue.ref([]),vn=vue.ref({x:"max-content"}),j=vue.ref(),Pn=vue.ref(),qn=vue.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showLessItems:!0,showTotal:er=>`共 ${er} 条数据`}),Bn=vue.ref(""),w=vue.ref(""),J=vue.ref(),gn=vue.inject("isMobile",!1),Rn=vue.computed(()=>INDICATOR_URL),zn=vue.computed(()=>vue.unref(gn)?"16px":c.fontSize+"px"),Wn=()=>document.querySelector("#modalContainer")||document.body,Yn=er=>{const Kn=document.querySelector(`.${v} .ant-modal-header`);if(Kn)if(er)Kn.addEventListener("mousedown",tr);else{const ir=Kn.parentElement;ir&&(ir.style.left="",ir.style.top=""),Kn.removeEventListener("mousedown",tr)}},Jn=er=>{const Kn=document.querySelector(`.${v} .ant-modal-header`);Kn&&(er?Kn.addEventListener("dblclick",nr):Kn.removeEventListener("dblclick",nr))},tr=er=>{dragModalAction(er,`.${v} .ant-modal-header`)},nr=()=>{m.value=!m.value,vue.nextTick(()=>{m.value?Yn(!1):Yn(!0),ar()})},Qn=()=>{Jn(!1),Yn(!1),u("close")},ar=()=>{var er;(er=vue.unref(x))!=null&&er.length?setTimeout(()=>{var ir,ur,or;const Kn=(ur=(ir=vue.unref(j))==null?void 0:ir.querySelector(".last-detail-table .ant-table-thead"))==null?void 0:ur.clientHeight;if(Kn){let sr=h;if(vue.unref(m)){const dr=document.querySelector(`.${v} .ant-modal-content`);dr&&(sr=dr.clientHeight-((or=dr.querySelector(".ant-modal-header"))==null?void 0:or.clientHeight)-48)}isNaN(sr)||(vue.unref(vn).y=sr-Kn+"px")}b.value=!0},200):(vn.value={},b.value=!0)},cr=()=>{setTimeout(()=>{var er;Sortable.create((er=vue.unref(j))==null?void 0:er.querySelector(".last-detail-table .ant-table-thead > tr"),{handle:"th.ant-table-cell",onEnd:({newIndex:Kn,oldIndex:ir})=>{Kn!==ir&&swapArrItem(vue.unref(re),Kn,ir)}})},200)};async function fr(er){var Er,_r;y.value=!0,g.value=!0;const Kn=((Er=window==null?void 0:window.config)==null?void 0:Er.indicatorToken)||"",{record:ir,dimOpts:ur,column:or,formatParams:sr,cpntProps:dr={},drillDetailUrl:Xn,drillConditions:lr}=er,{indicatorList:hr=[]}=sr,vr=hr.find(Cr=>Cr.label===or.dataIndex),yr={};for(const Cr in ir){const xr=ur.find(Ar=>Ar.name===Cr);xr&&(yr[xr.typeGuid]=ir[Cr])}const{startTime:br,endTime:pr,rangeFormat:mr}=c.theDateInfo;if(br&&pr&&(yr.startTime=dayjs(br).format(mr),yr.endTime=dayjs(pr).format(mr)),J.value=yr,Xn)m.value=!0,Bn.value=Xn,w.value=encodeURIComponent(JSON.stringify({indexCode:(vr==null?void 0:vr.hrpIndexCode)||"",indexName:vr.label,theFlag:dr.theFlag,param:yr,conditions:lr})),y.value=!1;else{const Cr=await request.post(`${vue.unref(Rn)}/diagram/obtainDataSetData`,{pageId:getPageId(),indexCode:(vr==null?void 0:vr.hrpIndexCode)||"",indexName:vr.label,theFlag:dr.theFlag,param:yr},{headers:{Authentication:Kn,operateContext:CONTEXT}}),{columns:xr=[],data:Ar=[]}=((_r=Cr==null?void 0:Cr.data)==null?void 0:_r.data)||{};re.value=xr.filter(gr=>gr).map(gr=>({title:gr,dataIndex:gr,width:"120px",customHeaderCell:()=>({class:{"left-align":!0}}),customCell:(wr,Tr,Pr)=>({[vue.unref(gn)?"onClick":"onDblclick"]:()=>{var Vr,Hr;const Dr=((Vr=window==null?void 0:window.config)==null?void 0:Vr.detailDrillUrl)||"",Kr=((Hr=window==null?void 0:window.config)==null?void 0:Hr.detailDrillTitle)||"";Dr&&mn(wr,"orgCode")&&mn(wr,"visitId")&&mn(wr,"mpiId")&&(p.value=!0,vue.nextTick(()=>{vue.unref(Pn).showModal({record:wr,linkUrl:Dr,title:Kr})}))}}),sorter:(wr,Tr)=>{let Pr=wr[gr],Dr=Tr[gr];return isNaN(parseFloat(Pr))&&(Pr!=null&&Pr.localeCompare)?Pr.localeCompare(Dr,"zh-CN"):isThousandWithUnit(Pr)||isThousandWithUnit(Dr)?parseFloat(Pr.replace(/,/g,""))-parseFloat(Dr.replace(/,/g,"")):isValidDateStr(Pr)&&isValidDateStr(Dr)?new Date(Pr)-new Date(Dr):parseFloat(Pr)-parseFloat(Dr)}})),x.value=Ar.map(gr=>({...gr,uid:nanoid(6)})),y.value=!1,ar(),cr()}vue.nextTick(()=>{Jn(!0)})}const Gn=er=>{vue.unref(qn).current=er.current},Zn=vue.computed(()=>{let er=`last-detail-modal ${v}`;return(vue.unref(gn)||m.value)&&(er+=" full"),c.theme==="darkBlue"&&(er+=" darkBlue"),vue.unref(Bn)||(er+=" table"),er}),Hn=vue.computed(()=>vue.unref(gn)?{padding:"10px 0"}:{height:vue.unref(m)?"":h+48+"px",overflow:"hidden"});return d({getRecordData:()=>{const er=vue.unref(J).the_date,{startTime:Kn,endTime:ir}=vue.unref(J),ur={};er?ur.时间范围=er:ur.时间范围=`${Kn}至${ir}`;for(const or in vue.unref(J))if(!["startTime","endTime","the_date"].includes(or)){const sr=c.allDimensions.find(dr=>dr.typeGuid===or);sr&&(ur[sr.title||sr.label]=vue.unref(J)[or])}return{drillContext:ur,data:vue.toRaw(vue.unref(x)),type:"detailTable"}},showModal:fr,visible:g}),{visible:g,requestLoading:y,pagination:qn,columns:re,dataSource:x,wrapClassName:Zn,detailBodyStyle:Hn,isMobile:gn,urlJsonStr:w,drillDetailUrl:Bn,isIndFullScreen:m,tableFontSize:zn,tableScroll:vn,tableRef:j,customModalRef:Pn,isLoadedTable:b,isShowCustomModal:p,defaultValue:f,handleTableChange:Gn,getContainer:Wn,onDetailCancel:Qn,toggleFullScreen:nr}}}),_withScopeId$6=c=>(vue.pushScopeId("data-v-dc7714ba"),c=c(),vue.popScopeId(),c),_hoisted_1$m=_withScopeId$6(()=>vue.createElementVNode("div",{style:{"font-size":"18px"}},"指标明细",-1)),_hoisted_2$c=["src"],_hoisted_3$6={key:0,class:"spin-container"},_hoisted_4$5=["title"],_hoisted_5$4=["title"];function _sfc_render$A(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("a-spin"),b=vue.resolveComponent("a-table"),re=vue.resolveComponent("a-modal"),x=vue.resolveComponent("custom-modal");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(re,{wrapClassName:c.wrapClassName,visible:c.visible,"onUpdate:visible":u[1]||(u[1]=vn=>c.visible=vn),width:"60%",destroyOnClose:!0,footer:null,bodyStyle:c.detailBodyStyle,getContainer:c.getContainer,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[_hoisted_1$m]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>{var vn;return[vue.createElementVNode("div",{class:"zoom-btn",onClick:u[0]||(u[0]=(...j)=>c.toggleFullScreen&&c.toggleFullScreen(...j))},[c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"]))]),c.drillDetailUrl&&c.urlJsonStr?(vue.openBlock(),vue.createElementBlock("iframe",{key:0,src:`${c.drillDetailUrl}${c.drillDetailUrl.includes("?")?"&":"?"}params=${c.urlJsonStr}`,frameborder:"0",width:"100%",height:"100%"},`\r
|
|
109
|
+
`,8,_hoisted_2$c)):c.drillDetailUrl?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[c.isLoadedTable?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$6,[vue.createVNode(y,{size:"large"})])),c.requestLoading?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:1,ref:"tableRef",style:vue.normalizeStyle({visibility:c.isLoadedTable?"visible":"hidden"})},[vue.createVNode(b,{class:"last-detail-table",size:"small","row-key":j=>j.uid,columns:c.columns,"data-source":c.dataSource,pagination:!1,"row-class-name":(j,Pn)=>Pn%2===1?"table-striped":null,scroll:c.isMobile?{x:"max-content",y:"70vh"}:c.tableScroll,showHeader:!!((vn=c.dataSource)!=null&&vn.length),onChange:c.handleTableChange},{headerCell:vue.withCtx(({title:j})=>[vue.createElementVNode("div",{title:j,style:vue.normalizeStyle({fontSize:c.tableFontSize,fontWeight:600})},vue.toDisplayString(j),13,_hoisted_4$5)]),bodyCell:vue.withCtx(({text:j})=>[vue.createElementVNode("div",{title:j,style:vue.normalizeStyle({fontSize:c.tableFontSize})},vue.toDisplayString(j||c.defaultValue),13,_hoisted_5$4)]),_:1},8,["row-key","columns","data-source","row-class-name","scroll","showHeader","onChange"])],4))],64))]}),_:1},8,["wrapClassName","visible","bodyStyle","getContainer","onCancel"]),c.isShowCustomModal?(vue.openBlock(),vue.createBlock(x,{key:0,ref:"customModalRef",theme:c.theme,onClose:c.onCloseCustomModal},null,8,["theme","onClose"])):vue.createCommentVNode("",!0)],64)}const LastDetail=_export_sfc$1(_sfc_main$v,[["render",_sfc_render$A],["__scopeId","data-v-dc7714ba"]]),_sfc_main$u=vue.defineComponent({name:"DrillModal",components:{ATable:antDesignVue.Table,ATableSummary:antDesignVue.TableSummary,ATableSummaryRow:antDesignVue.TableSummaryRow,ATableSummaryCell:antDesignVue.TableSummaryCell,BorderOutlined:BorderOutlined$1,SwitcherOutlined:SwitcherOutlined$1,CloseOutlined:CloseOutlined$1,LastDetail},props:{theme:{type:String,default:"light"},drillingMode:{type:String,default:"default"},pageMode:{type:String,default:"normal"},scaleValue:{type:Object,default:()=>({})},pivotTableFontSize:{type:Number,default:16},width:{type:String,default:""},drillDetailUrl:{type:String,default:""},isShowMask:{type:Boolean,default:!0}},setup(c,{expose:u,emit:d}){const f="-",h="c-"+nanoid(6),v=.57,p=.6,m=.97,g=.9,y=window.screen.height*p,b=["%"],re=vue.ref(50),x={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},vn={borderColor:"#666E8D",headerBgColor:"#06347C",headerColor:"#DEE5EF",bodyBgColor:"#112861",bodyColor:"#B2CCE7",indicatorsHeaderBgColor:"#184273",indicatorsHeaderColor:"#FFFFFF",indicatorsBodyBgColor:"#184273",indicatorsBodyColor:"#FFFFFF",aggregateBgColor:"#0F4F9B",aggregateColor:"#FFFCFC",sortNotActiveColor:"#B0B0B0",sortActiveColor:"#00CCFF",dropDownMenuBgColor:"#08154F",dropDownMenuColor:"#B2C3DD",dropDownMenuHightLightColor:"#2E68CF"},j=vue.ref(!1),Pn=vue.ref(!1),qn=vue.ref(),Bn=vue.ref(),w=vue.ref(),J=vue.ref(!0),gn=vue.ref({}),Rn=vue.ref([]),zn=vue.ref([]),Wn=vue.ref([]),Yn=vue.ref(!1),Jn=vue.ref(!1),tr=vue.ref({x:"max-content"}),nr=vue.ref(),Qn=vue.ref([]),ar=vue.ref({dateFormat:"YYYY-MM-DD"}),cr=vue.reactive({keyName:"",visible:!1,dataSource:[],columns:[],title:"",pagination:{current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showLessItems:!0,showTotal:Rr=>`共 ${Rr} 条数据`}}),fr=vue.ref({}),Gn=vue.ref({}),Zn=vue.inject("isMobile",!1),Hn=vue.inject("usedComponentList",[]),Un=vue.inject("componentList",[]),{getAllGlobalModel:er}=vue.inject(GLOBAL_MODEL,{getAllGlobalModel:()=>{}}),Kn=vue.computed(()=>INDICATOR_URL);vue.watch(()=>cr.visible,Rr=>{Rr?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow="hidden auto"});const ir=vue.computed(()=>vue.unref(Zn)?"16px":c.pivotTableFontSize+"px"),ur=vue.computed(()=>({width:vue.unref(gn).width,height:vue.unref(gn).height})),or=vue.computed(()=>vue.unref(Zn)?{padding:"10px 0"}:c.drillingMode==="normalTable"&&!J.value?{height:y+48+"px",overflow:"hidden"}:{}),sr=vue.computed(()=>{let Rr=`datav-drill-modal ${h}`;return(J.value||vue.unref(Zn))&&(Rr+=" full"),c.theme==="darkBlue"&&(Rr+=" darkBlue"),Rr}),dr=(Rr,Ir)=>{const Gr=Xn(Ir.graphicConfig).filter(ii=>ii.conditions),Qr=loopConditions(Gr,"conditions",!0),Ur=loopConditions(Rr.sqlConditions,"sqlConditions",!1);zn.value=Qr.concat(Ur).filter(ii=>ii.label)||[]};function Xn(Rr){const{leftAxisList:Ir=[],rightAxisList:zr=[],indicators:Gr=[],classificationList:Qr=[],rowHeaderList:Ur=[],dimensionList:ii=[],seriesList:yi=[],queryColumns:xi=[],indexLibColumns:Si=[]}=Rr;return Ir.concat(zr).concat(Gr).concat(Qr).concat(Ur).concat(ii).concat(yi).concat(xi).concat(Si)}const lr=()=>document.querySelector("#modalContainer")||document.body,hr=async Rr=>{var yi,xi,Si;const{cpntProps:Ir,pageId:zr,formatParams:Gr,classifications:Qr,indicatorToken:Ur,drillingMode:ii}=Rr;return await request({url:`${vue.unref(Kn)}/diagram/obtainDrillAbleDimensionOptions`,method:"post",headers:{Authentication:Ur,operateContext:CONTEXT},data:{source:((yi=Ir==null?void 0:Ir.graphicConfig)==null?void 0:yi.source)||"INDICATOR_LIB",pageId:zr,indicatorList:(Gr==null?void 0:Gr.indicatorList)||[],classifications:Qr,dataSourceId:((xi=Ir==null?void 0:Ir.graphicConfig)==null?void 0:xi.dataSourceId)||"",drillingMode:ii},signal:((Si=window.controller)==null?void 0:Si.signal)||""})},vr=async({indicatorList:Rr,indicatorToken:Ir})=>{var zr;return await request({url:`${vue.unref(Kn)}/diagram/obtainIndexDrillDetail`,method:"post",headers:{Authentication:Ir,operateContext:CONTEXT},data:{indicatorList:Rr},signal:((zr=window.controller)==null?void 0:zr.signal)||""})},yr=async({indicatorList:Rr,indicatorToken:Ir,pageId:zr,theFlag:Gr})=>{var Qr;return await request({url:`${vue.unref(Kn)}/diagram/obtainIndicatorInfo`,method:"post",headers:{Authentication:Ir,operateContext:CONTEXT},data:{source:"INDICATOR_LIB",pageId:zr,indicatorList:Rr,theFlag:Gr},signal:((Qr=window.controller)==null?void 0:Qr.signal)||""})},br=Rr=>{let Ir="",zr="";const{componentConfig:Gr}=Rr;for(const Ur in Gr)if(Gr[Ur].key==="currentValue"){zr=Ur;break}const Qr=vue.unref(Un).find(Ur=>Ur.id===zr);return Qr!=null&&Qr.unitText&&(Ir=Qr.unitText),Ir};function pr(Rr){const Ir=[];for(const zr of Rr)zr.sqlConditions?Ir.push(...pr(zr.sqlConditions)):zr.fieldName==="the_date"&&Ir.push(zr);return Ir}const mr=Rr=>{var Ur;const{sqlConditions:Ir=[],queryColumns:zr=[]}=Rr||{},Gr=pr(Ir),Qr=zr.find(ii=>ii.typeGuid==="the_date");if(Qr&&(ar.value={dateFormat:Qr.dateFormat||"YYYY-MM-DD"}),Gr!=null&&Gr.length)for(const ii of Gr)["startTime","endTime"].includes(ii.prop)&&(vue.unref(ar)[ii.prop]=ii.fieldValue||"",(Ur=vue.unref(ar))!=null&&Ur.rangeFormat||(vue.unref(ar).rangeFormat=ii.dateFormat||"YYYY-MM-DD"))},Er=()=>{var Rr;(Rr=cr.dataSource)!=null&&Rr.length?setTimeout(()=>{var Ir,zr,Gr;if(c.drillingMode==="normalTable"){const Qr=(zr=(Ir=vue.unref(nr))==null?void 0:Ir.querySelector(".normal-table .ant-table-thead"))==null?void 0:zr.clientHeight;if(Qr){let Ur=y;if(vue.unref(J)){const ii=document.querySelector(`.${h} .ant-modal-content`);ii&&(Ur=ii.clientHeight-((Gr=ii.querySelector(".ant-modal-header"))==null?void 0:Gr.clientHeight)-48)}isNaN(Ur)||(vue.unref(tr).y=Ur-Qr+"px",setTimeout(()=>{const ii=document.querySelector(`.${h} .ant-table-summary`);ii&&(re.value=ii.clientHeight),vue.unref(tr).y=parseFloat(vue.unref(tr).y)-vue.unref(re)+"px"},0))}}Jn.value=!0},200):(tr.value={},Jn.value=!0)},_r=()=>{setTimeout(()=>{var Rr;Sortable.create((Rr=vue.unref(nr))==null?void 0:Rr.querySelector(".normal-table .ant-table-thead > tr"),{handle:"th.ant-table-cell",onEnd:({newIndex:Ir,oldIndex:zr})=>{Ir!==zr&&(swapArrItem(cr.columns,Ir,zr),swapArrItem(vue.unref(Qn),Ir,zr))}})},200)},Cr=async Rr=>{var Ai,Br,Nr,jr,Zr,Wr,Yr,ni;if(c.drillingMode==="default"||c.pageMode==="design")return;let Ir=lodashEs.cloneDeep(Rr).props;if(Ir.parentId){const Jr=vue.unref(Hn).find(ri=>ri.id===Ir.parentId);if((Jr==null?void 0:Jr.dataType)==="indicator")Ir=lodashEs.cloneDeep(Jr);else return}const zr=yn(Ir.type,"indexPanel");cr.keyName=Ir==null?void 0:Ir.keyName;const Gr=((Ai=window==null?void 0:window.config)==null?void 0:Ai.indicatorToken)||"",Qr=getPageId(),Ur=(Ir==null?void 0:Ir.graphicConfig)||{},{leftAxisList:ii=[],rightAxisList:yi=[],indicators:xi=[]}=Ur,Si=ii.concat(yi).concat(xi);if(!(Si!=null&&Si.length))return;const Ti=Si.filter(Jr=>Jr.show).map(Jr=>Jr.label);Ti!=null&&Ti.length&&(cr.title=`下钻:${Ti.join("、")}`);const hi=En({...Ir,allComponentList:vue.unref(Un),globalModel:er()});if(c.drillingMode==="normalTable"||vue.unref(Zn)){const ri=Xn(Ur).filter(Mr=>Mr.showInDrillTable==="hide").map(Mr=>Mr.label);cr.pagination.current=1;let ai=(hi==null?void 0:hi.classification)||(hi==null?void 0:hi.classifications)||[];const{indicatorList:oi=[]}=hi,si=await vr({indicatorList:oi,indicatorToken:Gr}),ti=((Br=si==null?void 0:si.data)==null?void 0:Br.data)||[];if(ti!=null&&ti.length)for(const Mr of ti)(Nr=Mr.detailList)!=null&&Nr.length&&Mr.detailList.forEach(($r,Lr)=>{if(Lr>0){const Fr=oi.find(qr=>qr.label===$r);Fr&&!ri.includes(Fr.label)&&(Fr.show=!0)}});const ui=await yr({indicatorList:oi,indicatorToken:Gr,pageId:Qr,theFlag:(Ir==null?void 0:Ir.theFlag)||""}),pi=((jr=ui==null?void 0:ui.data)==null?void 0:jr.data)||[],Pi={};for(const Mr of pi){const $r=oi.find(Lr=>Lr.columnName===Mr.indexName);$r&&(Pi[$r.label]=Mr.theUnit||"")}const Sr=oi.filter(Mr=>Mr.show),kr=[],Or=["YOY_DATA","MOM_DATA"];for(const Mr of Sr)for(const $r of Or)kr.push({builtInFormula:$r,builtInValueSource:Mr.label,calcType:"BUILT_IN",columnName:`${Mr.label}@${$r}`,label:`${Mr.label}@${$r}`,location:"LEFT",show:!0});if(kr!=null&&kr.length)for(const Mr of kr){const $r=oi.findIndex(Lr=>Lr.label===Mr.builtInValueSource);$r!==-1&&oi.splice($r+1,0,Mr)}Array.isArray(ai)||(ai=[ai]);try{Yn.value=!0,cr.visible=!0;const Mr=await hr({cpntProps:Ir,pageId:Qr,formatParams:hi,classifications:ai,indicatorToken:Gr,drillingMode:c.drillingMode}),$r=((Zr=Mr==null?void 0:Mr.data)==null?void 0:Zr.data)||[];Wn.value=$r;let Lr=[],Fr=[];const{usedDimensions:qr=[],params:li={},record:ci={}}=Rr;if(qr!=null&&qr.length){for(const gi of $r)if(!qr.find(Ei=>Ei.label===gi.name)){Fr.push(gi);break}hi.sqlConditions=lodashEs.cloneDeep(li.sqlConditions);const{sqlConditions:ei=[]}=hi,{record:mi={}}=Rr;qr.forEach((gi,Ei)=>{if(mn(mi,gi.label)){const Ii=$r.find(_i=>_i.name===gi.label),bi={fieldName:gi.label,fieldValue:mi[gi.label],globalCondition:!0,hrpIndexCode:null,hrpIndexCodeNum:null,label:gi.label,rule:"EQUAL",typeGuid:gi.typeGuid,valueType:(Ii==null?void 0:Ii.genericType)||"TEXT"};Ei!==qr.length-1&&(bi.join="&&"),Ei===0&&(ei!=null&&ei.length)&&(ei[ei.length-1].join="&&"),ei.push(bi)}})}else Lr=ai.map(ei=>({...ei,calcType:"COLUMN"})),Fr=$r.slice(0,2).sort((ei,mi)=>ei.typeGuid-mi.typeGuid);dr(hi,lodashEs.cloneDeep(Rr.props));for(const ei of Fr)Lr.push({calcType:"COLUMN",columnName:ei.name,label:ei.name,show:!0,typeGuid:ei.typeGuid});hi.queryColumns=Lr,hi.layer="1",hi.plugin="5",delete hi.classification,delete hi.classifications;const{url:fi,...di}=hi||{};di.chartType="pivot-table-list",di.rowHeaders=di.queryColumns,Gn.value=di,mr(hi);const vi=await request({url:`${vue.unref(Kn)}${fi}`,method:"post",headers:{Authentication:Gr,operateContext:CONTEXT},data:{...di,pageId:Qr}}),ki=Lr.map(ei=>ei.label).concat(...hi.indicatorList.filter(ei=>ei.show).map(ei=>ei.label)).filter(ei=>!ri.includes(ei.label)),{rows:Ci=[]}=((Wr=vi==null?void 0:vi.data)==null?void 0:Wr.data)||{};if(zr){const ei=Ur.indicators.find(gi=>gi.show),mi=br(Ir);mi&&ei&&(fr.value={[ei.label]:mi})}cr.columns=ki.filter(ei=>!!ei).map(ei=>{let mi=ei;const gi=$r.find(Ei=>Ei.name===ei);return gi&&(mi=gi.title||gi.label),mi.includes("@MOM_DATA")?mi=mi.replace("@MOM_DATA","环比(%)"):mi.includes("@YOY_DATA")&&(mi=mi.replace("@YOY_DATA","同比(%)")),{title:mi,dataIndex:ei,width:"120px",align:gi?"left":"right",sorter:(Ei,Ii)=>{let bi=Ei[ei],_i=Ii[ei];return isNaN(parseFloat(bi))&&(bi!=null&&bi.localeCompare)?bi.localeCompare(_i,"zh-CN"):isThousandWithUnit(bi)||isThousandWithUnit(_i)?parseFloat(bi.replace(/,/g,""))-parseFloat(_i.replace(/,/g,"")):isValidDateStr(bi)&&isValidDateStr(_i)?new Date(bi)-new Date(_i):parseFloat(bi)-parseFloat(_i)},customHeaderCell:()=>({class:{"left-align":!!gi,"right-align":!gi}}),customCell:(Ei,Ii,bi)=>({[vue.unref(Zn)?"onClick":"onDblclick"]:()=>{const _i=qr.concat(Lr),Ri=Object.assign(ci,Ei),Li=$r.find($i=>bi.dataIndex===$i.name);$r.length>_i.length?(j.value=!0,vue.nextTick(()=>{vue.unref(qn).showModal({...Rr,record:Ri,usedDimensions:_i,params:hi})})):!Li&&!bi.dataIndex.includes("@YOY_DATA")&&!bi.dataIndex.includes("@MOM_DATA")&&(Pn.value=!0,vue.nextTick(()=>{vue.unref(Bn).showModal({record:Ri,dimOpts:$r,column:bi,formatParams:hi,cpntProps:Ir,drillDetailUrl:c.drillDetailUrl,drillConditions:vue.unref(Kr)})}))}})}}),cr.dataSource=(Array.isArray(Ci)?Ci:[Ci]).map(ei=>({...ei,uuid:nanoid(6)})),cr.pagination.total=(Ci==null?void 0:Ci.length)||0,cr.columns.forEach(ei=>{const mi=ei.dataIndex;let gi=f;if(mn(Pi,mi)&&!b.includes(Pi[mi])){let Ei=0;for(const Ii of cr.dataSource){const bi=Ii[mi];if(typeof bi=="number")Ei+=bi;else if(bi){const _i=parseFloat(bi.replace(/,/g,""));isNaN(_i)||(Ei+=_i)}}gi=Ei.toFixed(2)}vue.unref(Qn).push({value:gi,align:ei.align,title:ei.title})}),Yn.value=!1,Er(),_r()}catch(Mr){console.error(Mr)}}else if(c.drillingMode==="pivotTable"){const Jr=await hr({cpntProps:Ir,pageId:Qr,formatParams:hi,classifications:[],indicatorToken:Gr});Wn.value=((Yr=Jr==null?void 0:Jr.data)==null?void 0:Yr.data)||[];const ri=nanoid(6);Ur.queryColumnList||(Ur.queryColumnList=[]),Ur!=null&&Ur.classificationList&&(Ur.queryColumnList=Ur.classificationList,delete Ur.classificationList),Ur!=null&&Ur.seriesList&&(Ur.queryColumnList=Ur.queryColumnList.concat(Ur.seriesList),delete Ur.seriesList),Ur.indicators=lodashEs.cloneDeep(Si||[]),delete Ur.leftAxisList,delete Ur.rightAxisList;const ai={},oi=Ur.indicators.find(ti=>ti.show);if(zr){const ti=vue.unref(Wn).slice(0,2).sort((pi,Pi)=>pi.typeGuid-Pi.typeGuid).map(pi=>({...pi,show:!0,edit:!1,dataTo:"0",width:pi.name==="the_date"?15:0,dataSetParams:{}}));ti!=null&&ti.length&&(Ur.queryColumnList=ti);const ui=br(Ir);if(ui&&oi){const{label:pi}=oi;ai.defaultConfig={indexFormatConfig:{[pi]:{fieldName:pi,indicatorKey:pi,position:"right",unit:ui}}}}}Ir!=null&&Ir.theFlag&&(ai.theFlag=Ir.theFlag),(ni=Ur.queryColumnList)!=null&&ni.length||(Ur.queryColumnList=[{id:"3f5bda70a08a442085857adb7fc547de",indexCode:null,indexCodeNum:null,title:"日期(内置)",name:"the_date",label:"日期(内置)",typeGuid:"the_date",genericType:"DATE",hrpIndexComplexid:"the_date",scope:"BUILT_IN_DIM",fromTable:"hrp_index_complex",parentId:"3f5bda70a08a442085857adb7fc547de",show:!0,edit:!1,dataTo:"0",dataSetParams:{}}]);const si={...lodashEs.cloneDeep(pivotTableProps),id:ri,keyName:`透视表_${ri}`,position:"relative",top:0,left:0,width:parseFloat(c.width)*v+"px",height:window.screen.height*p+"px",pageId:Qr,indicatorToken:Gr,context:CONTEXT,globalModel:er(),graphicConfig:Ur,pageConfig:c,...ai};c.theme==="darkBlue"&&(si.styleConfig=vn),zr&&(si.defalutCalcList=["MOM_DATA","YOY_DATA"]),gn.value=si,cr.visible=!0,vue.nextTick(()=>{vue.unref(w).refreshData()})}vue.nextTick(()=>{Ar(!0)})},xr=()=>{},Ar=Rr=>{const Ir=document.querySelector(`.datav-drill-modal.${h} .ant-modal-header`);Ir&&(Rr?Ir.addEventListener("dblclick",Tr):Ir.removeEventListener("dblclick",Tr))},gr=Rr=>{const Ir=document.querySelector(`.datav-drill-modal.${h} .ant-modal-header`);if(Ir)if(Rr)Ir.addEventListener("mousedown",wr);else{const zr=Ir.parentElement;zr&&(zr.style.left="",zr.style.top=""),Ir.removeEventListener("mousedown",wr)}};function wr(Rr){dragModalAction(Rr,`.datav-drill-modal.${h} .ant-modal-header`)}const Tr=()=>{J.value=!J.value,vue.nextTick(()=>{J.value?(vue.unref(gn).width=parseFloat(c.width)*m+"px",vue.unref(gn).height=window.screen.height*g+"px",gr(!1)):(vue.unref(gn).width=parseFloat(c.width)*v+"px",vue.unref(gn).height=window.screen.height*p+"px",gr(!0)),Er()})},Pr=()=>{document.documentElement.style.overflow="hidden auto",Ar(!1),gr(!1),d("close")},Dr=({type:Rr,data:Ir})=>{if(Rr==="11"&&Ir){const{indicatorList:zr=[],queryColumns:Gr=[]}=Ir,Ur=zr.concat(Gr).filter(xi=>xi.conditions||xi.filter),ii=loopConditions(Ur,"conditions",!0),yi=loopConditions(Ir.sqlConditions,"sqlConditions",!1);zn.value=ii.concat(yi).filter(xi=>xi.label)||[]}};vue.watch(zn,(Rr=[])=>{Rn.value=Rr.map(Ir=>{let zr=Ir.fieldValue;if(zr&&typeof zr=="string"){const Gr=zr.split(",");(Gr==null?void 0:Gr.length)>3&&(zr=Gr.slice(0,3).join(",")+"等")}else zr||(zr='""');if(c.drillingMode==="normalTable")return`${Ir.label} ${x[Ir.rule]} ${zr}`;{const Gr=vue.unref(Wn).find(Qr=>Qr.label===Ir.label);return`${(Gr==null?void 0:Gr.title)||Ir.label} ${x[Ir.rule]} ${zr}`}})||[]},{deep:!0});const Kr=vue.computed(()=>vue.unref(zn).map(Rr=>({label:Rr.title||Rr.label,typeGuid:Rr.typeGuid,rule:Rr.rule,value:Rr.fieldValue}))),Vr=()=>{Pn.value=!1},Hr=()=>{j.value=!1};return u({indDetailInfo:cr,showModal:Cr,getPivotRecordData:()=>{var Rr,Ir,zr,Gr,Qr,Ur,ii,yi,xi,Si;if(c.drillingMode==="normalTable"){if((Rr=vue.unref(Bn))!=null&&Rr.visible)return(Ir=vue.unref(Bn))==null?void 0:Ir.getRecordData();if((Gr=(zr=vue.unref(qn))==null?void 0:zr.indDetailInfo)!=null&&Gr.visible)return(Qr=vue.unref(qn))==null?void 0:Qr.getPivotRecordData();{const{sqlConditions:Ti,...hi}=vue.unref(Gn);for(const Ai of Ti){const Br=vue.unref(Wn).find(Nr=>Nr.typeGuid===Ai.typeGuid);Br!=null&&Br.title&&(Ai.title=Br.title)}return{data:vue.toRaw(cr.dataSource),columns:[],rows:((ii=(Ur=vue.unref(Gn))==null?void 0:Ur.queryColumns)==null?void 0:ii.map(Ai=>({title:Ai.label})))||[],indicators:((xi=(yi=vue.unref(Gn))==null?void 0:yi.indicatorList)==null?void 0:xi.map(Ai=>({title:Ai.label})))||[],requestParams:{...hi,sqlConditions:Ti},type:"pivotTable"}}}else if(c.drillingMode==="pivotTable")return(Si=vue.unref(w))==null?void 0:Si.getPivotRecordData()}}),{indDetailInfo:cr,pivotTableConfig:gn,pivotTableStyle:ur,detailBodyStyle:or,wrapClassName:sr,isIndFullScreen:J,isMobile:Zn,conditionInfo:Rn,indicatorUrl:Kn,allDimensions:Wn,requestLoading:Yn,isLoadedTable:Jn,pivotTableRef:w,lastDetailRef:Bn,subDrillModalRef:qn,theDateInfo:ar,isShowSubDrillModal:j,normalTableUnits:fr,drillConditions:Kr,allComponentList:Un,tableFontSize:ir,tableScroll:tr,tableRef:nr,summaryList:Qn,summaryHeight:re,isShowDetailMpdal:Pn,defaultValue:f,getContainer:lr,toggleFullScreen:Tr,onDetailCancel:Pr,onPivotTableChange:Dr,handleTableChange:xr,onCloseDetailModal:Vr,onCloseModal:Hr}}}),DrillModal_vue_vue_type_style_index_0_scoped_107b0a3f_lang="",DrillModal_vue_vue_type_style_index_1_lang="",_hoisted_1$l=["title"],_hoisted_2$b={key:0,class:"spin-container"},_hoisted_3$5=["title"],_hoisted_4$4=["title"];function _sfc_render$z(c,u,d,f,h,v){const p=vue.resolveComponent("close-outlined"),m=vue.resolveComponent("switcher-outlined"),g=vue.resolveComponent("border-outlined"),y=vue.resolveComponent("a-spin"),b=vue.resolveComponent("a-table-summary-cell"),re=vue.resolveComponent("a-table-summary-row"),x=vue.resolveComponent("a-table-summary"),vn=vue.resolveComponent("a-table"),j=vue.resolveComponent("pivot-table"),Pn=vue.resolveComponent("a-modal"),qn=vue.resolveComponent("last-detail"),Bn=vue.resolveComponent("drill-modal",!0);return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(Pn,{visible:c.indDetailInfo.visible,"onUpdate:visible":u[1]||(u[1]=w=>c.indDetailInfo.visible=w),width:"60%",getContainer:c.getContainer,footer:null,destroyOnClose:!0,"wrap-class-name":c.wrapClassName,bodyStyle:c.detailBodyStyle,mask:c.isShowMask,onCancel:c.onDetailCancel},{title:vue.withCtx(()=>[vue.createElementVNode("div",{class:"detail-modal-title",title:c.conditionInfo.join("、")},vue.toDisplayString(c.indDetailInfo.title)+" "+vue.toDisplayString(c.conditionInfo.join("、")),9,_hoisted_1$l)]),closeIcon:vue.withCtx(()=>[vue.createVNode(p,{class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])]),default:vue.withCtx(()=>{var w;return[c.isMobile?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"zoom-btn",onClick:u[0]||(u[0]=(...J)=>c.toggleFullScreen&&c.toggleFullScreen(...J))},[c.isIndFullScreen?(vue.openBlock(),vue.createBlock(m,{key:0,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"])):(vue.openBlock(),vue.createBlock(g,{key:1,class:vue.normalizeClass(["modal-icon",c.theme])},null,8,["class"]))])),c.drillingMode==="normalTable"||c.isMobile?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[c.isLoadedTable?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$b,[vue.createVNode(y,{size:"large"})])),c.requestLoading?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:1,ref:"tableRef",style:vue.normalizeStyle({visibility:c.isLoadedTable?"visible":"hidden"})},[vue.createVNode(vn,{class:"normal-table",size:"small",scroll:c.isMobile?{x:"max-content",y:"70vh"}:c.tableScroll,"row-key":J=>J.uuid,columns:c.indDetailInfo.columns,"data-source":c.indDetailInfo.dataSource,pagination:!1,"row-class-name":(J,gn)=>gn%2===1?"table-striped":null,showHeader:!!((w=c.indDetailInfo.dataSource)!=null&&w.length),onChange:c.handleTableChange},{headerCell:vue.withCtx(({title:J})=>[vue.createElementVNode("div",{class:"detail-table-header-cell",title:J,style:vue.normalizeStyle({fontSize:c.tableFontSize})},vue.toDisplayString(J&&J.includes("(主指标)")?J.replace("(主指标)",""):J),13,_hoisted_3$5)]),bodyCell:vue.withCtx(({text:J,column:gn})=>[vue.createElementVNode("div",{title:J,style:vue.normalizeStyle({fontSize:c.tableFontSize})},vue.toDisplayString(J||(gn.align==="left"?c.defaultValue:"0"))+vue.toDisplayString(typeof J=="string"&&J.includes(c.normalTableUnits[gn.title])?"":c.normalTableUnits[gn.title]),13,_hoisted_4$4)]),summary:vue.withCtx(()=>[vue.createVNode(x,{fixed:""},{default:vue.withCtx(()=>[vue.createVNode(re,null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.summaryList,(J,gn)=>(vue.openBlock(),vue.createBlock(b,{key:gn,index:gn,style:vue.normalizeStyle({textAlign:J.align||"left",height:c.summaryHeight+"px",fontSize:c.tableFontSize,fontWeight:600,color:"rgba(0, 0, 0, 0.85)",padding:"8px 16px"})},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(gn?J.value:"合计")+vue.toDisplayString(gn&&typeof J.value=="string"&&J.value.includes(c.normalTableUnits[J.title])||J.value===c.defaultValue?"":c.normalTableUnits[J.title]),1)]),_:2},1032,["index","style"]))),128))]),_:1})]),_:1})]),_:1},8,["scroll","row-key","columns","data-source","row-class-name","showHeader","onChange"])],4))],64)):c.drillingMode==="pivotTable"?(vue.openBlock(),vue.createElementBlock("div",{key:2,style:vue.normalizeStyle({position:"relative",...c.pivotTableStyle})},[vue.createVNode(j,vue.mergeProps({ref:"pivotTableRef"},c.pivotTableConfig,{pageMode:c.pageMode,theme:c.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,indicatorUrl:c.indicatorUrl,relateKeyName:c.indDetailInfo.keyName,allDimensions:c.allDimensions,scaleValue:c.scaleValue,defaultFontSize:c.pivotTableFontSize,drillDetailUrl:c.drillDetailUrl,drillConditions:c.drillConditions,isMobile:c.isMobile,isNeedEmptyRow:!1,componentList:c.allComponentList,enlargeContainer:"#norPageConfig",onTableChange:c.onPivotTableChange}),null,16,["pageMode","theme","indicatorUrl","relateKeyName","allDimensions","scaleValue","defaultFontSize","drillDetailUrl","drillConditions","isMobile","componentList","onTableChange"])],4)):vue.createCommentVNode("",!0)]}),_:1},8,["visible","getContainer","wrap-class-name","bodyStyle","mask","onCancel"]),c.isShowDetailMpdal?(vue.openBlock(),vue.createBlock(qn,{key:0,ref:"lastDetailRef",theme:c.theme,theDateInfo:c.theDateInfo,scaleValue:c.scaleValue,fontSize:c.pivotTableFontSize,allDimensions:c.allDimensions,onClose:c.onCloseDetailModal},null,8,["theme","theDateInfo","scaleValue","fontSize","allDimensions","onClose"])):vue.createCommentVNode("",!0),c.isShowSubDrillModal?(vue.openBlock(),vue.createBlock(Bn,{key:1,ref:"subDrillModalRef",width:c.width,theme:c.theme,drillingMode:c.drillingMode,pageMode:c.pageMode,scaleValue:c.scaleValue,pivotTableFontSize:c.pivotTableFontSize,drillDetailUrl:c.drillDetailUrl,isShowMask:c.isIndFullScreen,onClose:c.onCloseModal},null,8,["width","theme","drillingMode","pageMode","scaleValue","pivotTableFontSize","drillDetailUrl","isShowMask","onClose"])):vue.createCommentVNode("",!0)],64)}const DrillModal=_export_sfc$1(_sfc_main$u,[["render",_sfc_render$z],["__scopeId","data-v-107b0a3f"]]),_sfc_main$t=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,components:{IndicatorDetailModal,TrendModal,DrillModal},props:{...providerConfigComponentProps,pageId:{type:String,default:""},customId:{type:String,default:"ProviderConfig"},customStyle:{type:Object,default:()=>({})},fixedHeight:{type:String,default:"0px"}},setup(c,{expose:u,emit:d}){c.pageId||useHrefParamsToGlobalVariables();const f=vue.ref(!1),h=vue.ref(),v=vue.ref(),p=vue.ref(),m=vue.computed(()=>INDICATOR_URL),g=vue.computed(()=>hn(c.contextRequestUrl)),y=vue.computed(()=>c.pageMode),b=vue.computed(()=>c.theme),re=vue.computed(()=>c.width),x=vue.computed(()=>c.height),vn=vue.computed(()=>c.pageFontFamily),j=vue.computed(()=>c.textColor),Pn=vue.computed(()=>c.fixedHeight?parseFloat(c.fixedHeight):0),qn=vue.computed(()=>c.isCompatible),Bn=vue.computed(()=>c.variableList),w=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)),J=vue.computed(()=>parseFloat(c.pivotTableFontSize)),gn=vue.ref(),Rn=vue.ref({}),zn=vue.ref(!0),Wn=()=>{gn.value.setAttribute("datav-theme",c.theme)},Yn=vue.ref({currentYmd:dayjs().format("YYYY-MM-DD"),currentYear:dayjs().format("YYYY"),currentMonth:dayjs().format("MM"),currentDay:dayjs().format("DD")}),Jn=vue.computed(()=>{const Br={};if(vue.unref(Bn))for(const jr of vue.unref(Bn))Br[jr.label]=jr.value;return{$page:{...vue.unref(Yn),...Br}}});vue.provide(GLOBAL_VARIABLE,{globalVariable:Jn});const tr=vue.inject("usedComponentList",[]),nr=vue.inject("componentList",[]);vue.watch(Jn,()=>{d("setGlobalVar",vue.unref(Yn))},{deep:!0,immediate:!0});const Qn=vue.computed(()=>{const Br=[];for(const Nr of vue.unref(tr))Nr.type==="ecanModal"?Br.push(...Nr.componentList):Br.push(Nr);return Br});vue.watch(()=>c.theme,()=>{Wn()}),vue.onMounted(()=>{Wn()});const ar=vue.computed(()=>{const Br=[],Nr=vue.unref(nr).filter(jr=>jr.type==="ecanModal");for(const jr of Nr)jr!=null&&jr.requestList&&Br.push(...jr.requestList);return[...Br,...c.requestList]}),cr=Br=>Object.prototype.toString.call(Br)==="[object Object]",fr=Br=>{const Nr=Br.split(".");let jr=vue.unref(Jn);for(const Zr of Nr)if(jr&&cr(jr))jr=jr[Zr];else{jr="";break}return jr},Gn=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:g,pageMode:y,theme:b,touchEventId:Gn,width:re,height:x,fontFamily:vn,textColor:j,requestList:ar,isCompatible:qn,fixedHeight:Pn,getGlobalVar:fr});const Zn=vue.ref({height:"100%",overflow:c.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",Br=>{let Nr=0;Br==="auto"?(Nr=Br,Rn.value={widthScale:1,heightScale:1}):(Nr=Br.heightScale,Rn.value=Br),(!qn.value||!w.value)&&(Nr=parseFloat(x.value)*Nr+"px"),Zn.value.height=Nr}),vue.provide("isMobile",w.value),vue.provide("getContainerMap",()=>c.containerMap),vue.provide("getCombinationMap",()=>c.combinationMap),vue.provide("templateOperate",{pageId:c.pageId,templateEmit:d,setTemplateData:Br=>{var Nr;if(Br!=null&&Br.pageId){const{componentId:jr,...Zr}=Br;(Nr=window.config)!=null&&Nr.urlParams||(window.config.urlParams={}),window.config.urlParams[Br.pageId]=Zr,d("templateChange",Br)}}});const Hn=vue.ref(),Un=new Map,er=()=>Un,Kn=Br=>{let Nr=Un.get(Br);if(!Nr){const jr=vue.unref(nr).find(Zr=>Zr.keyName===Br);jr&&(Nr=Un.get(jr.id))}return Nr},ir=(Br,Nr)=>{var jr;if(Hn.value=Nr,Un.set(Br,Nr),!c.pageId){const Zr=vue.unref(tr).find(Wr=>Wr.id===Br);Zr&&((jr=window.config)!=null&&jr.record||(window.config.record={}),window.config.record[Zr.keyName]=Nr)}},ur=()=>{Hn.value=null},or=Br=>{let Nr=Br;if(Nr){const jr=Br.match(/\{(.+?)\}/g);if(jr!=null&&jr.length){let Zr=jr[0].slice(1,-1).trim();const Wr=Zr.match(/\[(.+?)\]/g);let Yr="";Wr!=null&&Wr.length&&(Zr=Zr.replace(Wr[0],""),Yr=Wr[0].slice(1,-1).trim());const ni=vue.unref(Qn).find(Jr=>Jr.keyName===Zr);if(ni){const Jr=Kn(ni.id),{type:ri,value:ai,RECORD:oi,recordData:si}=Jr||{};yn(ri,MODEL_KEY_LIST)?Nr=oi[Yr]:yn(ri,"select")?si[Yr]?Nr=si[Yr]:Nr=vue.unref(ai):yn(ri,["rangePicker","date"])?dayjs.isDayjs(vue.unref(Jr[Yr]))?Nr=vue.unref(Jr[Yr]).format(Jr.format):Nr=vue.unref(Jr[Yr]):Nr=ai}else{const Jr=window.config.requestParams||{},ri=window.location.search.slice(1).split("&"),ai={};for(const si of ri)if(si!=null&&si.includes("=")){const ti=si.split("=");ai[ti[0]]=ti[1]||""}Nr={...ai,...Jr}[Zr]||""}}}return Nr},sr=new Map,dr={},Xn=async(Br,Nr)=>{var ni;const{requestName:jr}=Br,Zr=await useRequestData({...Br,projectRequestUrl:vue.unref(g),getModel:Kn})(),Wr=((ni=Zr==null?void 0:Zr.data)==null?void 0:ni.data)||{};Br.requestKeyName&&(Yn.value[Br.requestKeyName]=Wr);const Yr=sr.get(jr);if(Yr!=null&&Yr.length&&(!Nr||dr[jr])){for(const Jr of Yr)Jr(Wr);Nr||sr.delete(jr)}},lr=(Br,Nr)=>{dr[Br]&&(clearInterval(dr[Br]),delete dr[Br],sr.delete(Br));const jr=vue.unref(Qn).filter(Wr=>Wr.dataType==="request"&&!Wr.openCustomRequestData&&Wr.customRequestName===Br),Zr=sr.get(Br)||[];if((jr==null?void 0:jr.length)>Zr.length&&(Zr.push(Nr),sr.set(Br,Zr),(jr==null?void 0:jr.length)===Zr.length)){const Wr=vue.unref(ar).find(Yr=>Yr.requestName===Br);Wr&&(Wr!=null&&Wr.isOpenRequestTimer&&(Wr!=null&&Wr.requestInterval)?(Xn(Wr,!0),dr[Br]=setInterval(()=>{Xn(Wr,!0)},Wr.requestInterval*1e3)):Xn(Wr))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:Kn,setGlobalModel:ir,getAllGlobalModel:er,clearInteractiveData:ur,getRecordValueByKeyName:or,hanldePageRequestData:lr,interactiveData:Hn});const hr=vue.ref({}),vr=(Br,Nr)=>{hr.value[Br]=Nr};vue.provide(LOADED_DATA,{loadedData:hr,setLoadedData:vr});const yr=[],br=()=>{yr.pop()},pr=Br=>{yr.push(Br)},mr=new Map,Er=Br=>mr.get(Br),_r=(Br,Nr)=>{mr.set(Br,Nr)};vue.provide(MODAL_MODEL,{popUseModalIds:br,pushUseModalIds:pr,getModalModel:Er,setModalModel:_r});const Cr=mitt(),xr=new Set,Ar=new Map,gr=(Br,Nr,jr)=>{xr.add(Br),Ar.set(Br,{sort:jr,events:Nr}),vue.onBeforeUnmount(()=>{Ar.delete(Br)})},wr=async(Br=[],Nr,jr)=>{const Zr=new Map,{type:Wr}=jr||{};if(Wr==="refreshTemplate")for(const Jr of Br){const ri=Ar.get(Jr.target),{updateByUrlParams:ai}=(ri==null?void 0:ri.events)||{};typeof ai=="function"&&ai()}function Yr({key:Jr,eventName:ri,params:ai}){if(!Jr||!ri)return;const oi=Ar.get(Jr);if(typeof(oi==null?void 0:oi.events[ri])=="function"){const{sort:si}=oi,ti={fn:oi.events[ri],params:ai};if(Zr.has(si)){const ui=Zr.get(si);ui==null||ui.push(ti)}else Zr.set(si,[ti])}}for(const Jr of Br){const{target:ri,emit:ai}=Jr;if(ri==="PAGE"){const oi=yr.length;let si=[];if(oi===0)si=[...xr];else{const ti=yr[oi-1];si=[...Er(ti)]}si.forEach(ti=>{Yr({key:ti,eventName:ai,params:Nr})})}else(!vue.unref(zn)||ai!=="refreshData")&&Yr({key:ri,eventName:ai,params:Nr})}const ni=Array.from(Zr);ni.sort((Jr,ri)=>ri[0]-Jr[0]);try{for(let Jr=0;Jr<ni.length;Jr++){const ri=ni[Jr][1];await Hr(ri)}}catch(Jr){console.error(Jr)}};vue.provide(EVENT_BUS,{onEvent:gr,emitEvent:wr});const Tr=vue.ref(0),Pr=()=>{Tr.value=vue.unref(Tr)+1};vue.provide(GLOBAL_TOKEN,{requestToken:Pr});const Dr=new Map,Kr=new Map,Vr=({requestFn:Br=()=>{},sortNum:Nr=0,id:jr=""})=>{if(Dr.has(Nr)){const Zr=Dr.get(Nr);Zr==null||Zr.push(Br)}else Dr.set(Nr,[Br]);Kr.set(jr,Br)};function Hr(Br){return new Promise((Nr,jr)=>{const Zr=[];for(const Wr of Br)Zr.push(new Promise(async Yr=>{if(typeof Wr=="function")await Wr();else{const{fn:ni,params:Jr}=Wr;typeof ni=="function"&&(Jr?await ni(Jr):await ni())}Yr()}));Promise.all(Zr).then(Wr=>{Nr(Wr)}).catch(Wr=>{jr(Wr)})})}const Xr=Br=>new Promise(async(Nr,jr)=>{if(Br){if(typeof Br=="string"){const Zr=Kr.get(Br);if(typeof Zr=="function"){const Wr=request.interceptors.response.use(Yr=>(Nr(Yr),Yr),Yr=>(jr(Yr),Promise.reject(Yr)));Zr(),request.interceptors.response.eject(Wr)}}}else{const Zr=Array.from(Dr);Zr.sort((Yr,ni)=>ni[0]-Yr[0]);const Wr=Zr.length;try{c.pageMode!=="design"&&vue.unref(Tr)>0;for(let Yr=0;Yr<Wr;Yr++){const ni=Zr[Yr][1];await Hr(ni)}}catch(Yr){console.error(Yr)}finally{Dr.clear(),Nr(null),zn.value=!1}}});vue.provide(REQUEST_MODEL,{setRequest:Vr,touchRequest:Xr});const Rr=()=>{Cr.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:Rr});const Ir=Br=>{Cr.on(REFRESH_PAGE,()=>Br()),vue.onMounted(()=>{Cr.off(REFRESH_PAGE)})},zr=vue.ref({}),Gr=vue.ref();vue.provide(All_COMPONENT_RES_DATA,{allComponentResData:zr});const Qr=Br=>{const{id:Nr,data:jr}=Br;jr.success&&(zr.value[Nr]=(jr==null?void 0:jr.data)||{})},Ur=Br=>{Gr.value=Br},ii=(Br,Nr)=>{switch(Br){case"SHOW_INDICATOR_DETAIL_MODAL":f.value=!0,vue.nextTick(()=>{vue.unref(h).showModal(Nr)});break;case"SAVE_COMPONENT_RES_DATA":Qr(Nr);break;case"SAVE_INDEX_PANEL_REQ_PARAMS":Ur(Nr);break}};vue.provide(COMMON_OPERATE,{operateAction:(Br,Nr)=>{ii(Br,Nr)}}),vue.watchEffect(()=>{var Br;if((Br=vue.unref(tr))!=null&&Br.length&&vue.unref(y)!=="design"){const{jumpType:Nr,jumpTime:jr,jumpPage:Zr,jumpLink:Wr}=c;if(jr!=null&&jr.value){let Yr=0;switch(jr==null?void 0:jr.suffix){case"hours":Yr=jr.value*60*60*1e3;break;case"minute":Yr=jr.value*60*1e3;break;case"seconds":Yr=jr.value*1e3;break}setTimeout(()=>{let ni="";Nr==="page"&&Zr?ni=usePageUrl(vue.unref(y),Zr):Nr==="link"&&Wr&&(ni=Wr),ni=hn(ni),window.open(ni,"_self")},Yr)}}});const yi=Br=>{var Nr;vue.unref(v).showModal({data:Br,indicatorUrl:vue.unref(m),indicatorToken:((Nr=window==null?void 0:window.config)==null?void 0:Nr.indicatorToken)||"",context:CONTEXT,pageId:getPageId()})},xi=Br=>{vue.unref(p).showModal({data:Br,pageConfig:c,unitText:Si(Br)})},Si=Br=>{let Nr="",jr="";const{componentConfig:Zr}=Br;for(const Yr in Zr)if(Zr[Yr].key==="currentValue"){jr=Yr;break}const Wr=vue.unref(nr).find(Yr=>Yr.id===jr);return Wr!=null&&Wr.unitText&&(Nr=Wr.unitText),Nr};vue.provide("showIndDetail",yi);const Ti={indexName:"指标名",currentValue:"当前值",refValue:"目标值",lastValueRate:"同比",lastCycleValueRate:"环比",systemSource:"指标标记"};window.addEventListener("message",async Br=>{var Nr,jr;if(Br.source!==window&&c.customId==="ProviderConfig"){const Zr=Br.data||{};let Wr={data:{}};try{const Yr=(Nr=vue.unref(tr))==null?void 0:Nr.filter(ni=>ni.type==="ecanIndexPanel");if(Zr.type==="checkData")Wr={type:"checkDataRes",hasData:!!(Yr!=null&&Yr.length),data:{}};else if(Zr.type==="getData"){const ni={};let Jr="";if(Yr!=null&&Yr.length)if((jr=vue.unref(h).indDetailInfo)!=null&&jr.visible){const ri=vue.unref(h).getPivotRecordData(),{columns:ai,rows:oi,indicators:si,requestParams:ti,data:ui,type:pi,drillContext:Pi}=ri;pi==="pivotTable"?(ti&&(ni.全局筛选条件=hi({params:ti,onlySql:!1})),ni.当前表结构声明={分析维度:oi.concat(ai).map(Sr=>Sr.title),绝对值指标:si.filter(Sr=>!Sr.calculateType).map(Sr=>Sr.title),"趋势/比率指标":si.filter(Sr=>Sr.calculateType).map(Sr=>Sr.title)},ni.明细数据=ui):(ni.钻取上下文=Pi,ni.流水日志=ui),Jr=pi}else{ni.运营数据=[];for(const ri of Yr){const ai={};for(const oi in ri.componentConfig){const si=ri.componentConfig[oi];if(si.show){const ui=(oi?document.querySelector(`div[cpntid="${oi}"]`).textContent:"").split(/:|:/);ui!=null&&ui.length&&(ai[Ti[si.key]]=ui[ui.length-1])}}ni.运营数据.push(ai)}vue.unref(Gr)&&(ni.分析背景=hi({params:vue.unref(Gr),onlySql:!0}))}Wr={type:"getDataRes",data:ni},Jr&&(Wr.dataType=Jr)}}catch(Yr){Wr={error:Yr.message,data:{}}}Br.source.postMessage(Wr,Br.origin)}});function hi({params:Br,onlySql:Nr}){var si;const{sqlConditions:jr,queryColumns:Zr,indicatorList:Wr}=Br,Yr=Zr.concat(Wr).filter(ti=>ti.conditions),ni=loopConditions(Yr,"conditions",!0),Jr=loopConditions(jr,"sqlConditions",!1);let ri=[];const ai={};if(Nr)ri=Jr;else{ri=lodashEs.cloneDeep(ni);for(const ti of Jr)if(!ni.find(ui=>ui.typeGuid===ti.typeGuid)){const ui=ri.findIndex(pi=>ti.typeGuid!=="the_date"&&(pi.typeGuid===ti.typeGuid||pi.typeGuid+"_code"===ti.typeGuid)||pi.typeGuid===ti.typeGuid+"_code");ui!==-1&&ri.splice(ui,1),ri.push(ti)}}if(!ri.find(ti=>ti.typeGuid==="the_date"&&!ti.alias)){const ti=ri.find(pi=>pi.alias.includes("-startTime")),ui=ri.find(pi=>pi.alias.includes("-endTime"));if(ti&&ui){const pi=ti.alias.replace("-startTime","");pi&&(ai[pi]=`${ti.fieldValue}至${ui.fieldValue}`)}}for(const ti of ri){const{alias:ui,label:pi,title:Pi,fieldValue:Sr,variateName:kr}=ti;if(ui){if(!ui.includes("-startTime")&&!ui.includes("-endTime")&&!kr){const Or=vue.unref(tr).find(Mr=>Mr.keyName===ui);if(["ecanSelect"].includes(Or==null?void 0:Or.type)){const Mr=((si=vue.unref(zr)[Or.id])==null?void 0:si.rows)||[];if(Or.mode==="multiple"){const $r=Sr.split(",");($r==null?void 0:$r.length)===(Mr==null?void 0:Mr.length)?ai[ui]="全院":ai[ui]=Mr.filter(Lr=>$r.includes(Lr.value)).map(Lr=>Lr.label).join(",")}else{const $r=Mr.find(Lr=>Lr.value===Sr);$r&&(ai[ui]=$r.label)}}else ai[ui]=Sr}}else ai[Pi||pi]=Sr}return ai}const Ai=()=>{f.value=!1};return vue.onBeforeUnmount(()=>{Dr==null||Dr.clear(),Kr==null||Kr.clear()}),u({touchRequest:Xr,getGlobalModel:Kn,onRefreshPage:Ir,emitEvent:wr,getRecordValueByKeyName:or,showIndDetail:yi,showTrend:xi,props:c,systemVariable:Yn}),{providerConfig:gn,configStyle:Zn,indicatorUrl:m,theme:b,drillModalRef:h,indDetailModalRef:v,trendModalRef:p,scaleValue:Rn,defaultPivotTableFontSize:J,isMobile:w,isShowDrillModal:f,onCloseModal:Ai}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_3997ad94_lang="",ProviderConfig_vue_vue_type_style_index_1_lang="",_hoisted_1$k=["id"];function _sfc_render$y(c,u,d,f,h,v){const p=vue.resolveComponent("drill-modal"),m=vue.resolveComponent("indicator-detail-modal"),g=vue.resolveComponent("trend-modal");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",{class:"provider-config-container",id:c.customId,ref:"providerConfig",style:vue.normalizeStyle({...c.configStyle,fontFamily:c.pageFontFamily,...c.customStyle})},[vue.renderSlot(c.$slots,"default",{},void 0,!0)],12,_hoisted_1$k),c.isShowDrillModal?(vue.openBlock(),vue.createBlock(p,{key:0,ref:"drillModalRef",width:c.width,theme:c.theme,drillingMode:c.drillingMode,pageMode:c.pageMode,scaleValue:c.scaleValue,pivotTableFontSize:c.defaultPivotTableFontSize,drillDetailUrl:c.drillDetailUrl,onClose:c.onCloseModal},null,8,["width","theme","drillingMode","pageMode","scaleValue","pivotTableFontSize","drillDetailUrl","onClose"])):vue.createCommentVNode("",!0),vue.createVNode(m,{ref:"indDetailModalRef",theme:c.theme},null,8,["theme"]),vue.createVNode(g,{ref:"trendModalRef",theme:c.theme},null,8,["theme"])],64)}const ProviderConfig=_export_sfc$1(_sfc_main$t,[["render",_sfc_render$y],["__scopeId","data-v-3997ad94"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props$1,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:"18px",color:"",variableColor:"",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:"",dataSetchecked:!1,titleContent:"",titleBackgroundColor:"#ffffff",titleFontColor:"#000000",isMarkDown:!1,isContentMarkDown:!1,parentId:""},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==";var esmEntry$1={exports:{}},defaults$5={exports:{}};function getDefaults$1(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function changeDefaults$1(c){defaults$5.exports.defaults=c}defaults$5.exports={defaults:getDefaults$1(),getDefaults:getDefaults$1,changeDefaults:changeDefaults$1};const escapeTest=/[&<>"']/,escapeReplace=/[&<>"']/g,escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g,escapeReplacements={"&":"&","<":"<",">":">",'"':""","'":"'"},getEscapeReplacement=c=>escapeReplacements[c];function escape$3(c,u){if(u){if(escapeTest.test(c))return c.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(c))return c.replace(escapeReplaceNoEncode,getEscapeReplacement);return c}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape$1(c){return c.replace(unescapeTest,(u,d)=>(d=d.toLowerCase(),d==="colon"?":":d.charAt(0)==="#"?d.charAt(1)==="x"?String.fromCharCode(parseInt(d.substring(2),16)):String.fromCharCode(+d.substring(1)):""))}const caret=/(^|[^\[])\^/g;function edit$1(c,u){c=c.source||c,u=u||"";const d={replace:(f,h)=>(h=h.source||h,h=h.replace(caret,"$1"),c=c.replace(f,h),d),getRegex:()=>new RegExp(c,u)};return d}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl$1(c,u,d){if(c){let f;try{f=decodeURIComponent(unescape$1(d)).replace(nonWordAndColonTest,"").toLowerCase()}catch{return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}u&&!originIndependentUrl.test(d)&&(d=resolveUrl(u,d));try{d=encodeURI(d).replace(/%25/g,"%")}catch{return null}return d}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(c,u){baseUrls[" "+c]||(justDomain.test(c)?baseUrls[" "+c]=c+"/":baseUrls[" "+c]=rtrim$1(c,"/",!0)),c=baseUrls[" "+c];const d=c.indexOf(":")===-1;return u.substring(0,2)==="//"?d?u:c.replace(protocol,"$1")+u:u.charAt(0)==="/"?d?u:c.replace(domain,"$1")+u:c+u}const noopTest$1={exec:function(){}};function merge$2(c){let u=1,d,f;for(;u<arguments.length;u++){d=arguments[u];for(f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])}return c}function splitCells$1(c,u){const d=c.replace(/\|/g,(v,p,m)=>{let g=!1,y=p;for(;--y>=0&&m[y]==="\\";)g=!g;return g?"|":" |"}),f=d.split(/ \|/);let h=0;if(f[0].trim()||f.shift(),f[f.length-1].trim()||f.pop(),f.length>u)f.splice(u);else for(;f.length<u;)f.push("");for(;h<f.length;h++)f[h]=f[h].trim().replace(/\\\|/g,"|");return f}function rtrim$1(c,u,d){const f=c.length;if(f===0)return"";let h=0;for(;h<f;){const v=c.charAt(f-h-1);if(v===u&&!d)h++;else if(v!==u&&d)h++;else break}return c.substr(0,f-h)}function findClosingBracket$1(c,u){if(c.indexOf(u[1])===-1)return-1;const d=c.length;let f=0,h=0;for(;h<d;h++)if(c[h]==="\\")h++;else if(c[h]===u[0])f++;else if(c[h]===u[1]&&(f--,f<0))return h;return-1}function checkSanitizeDeprecation$1(c){c&&c.sanitize&&!c.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function repeatString$1(c,u){if(u<1)return"";let d="";for(;u>1;)u&1&&(d+=c),u>>=1,c+=c;return d+c}var helpers={escape:escape$3,unescape:unescape$1,edit:edit$1,cleanUrl:cleanUrl$1,resolveUrl,noopTest:noopTest$1,merge:merge$2,splitCells:splitCells$1,rtrim:rtrim$1,findClosingBracket:findClosingBracket$1,checkSanitizeDeprecation:checkSanitizeDeprecation$1,repeatString:repeatString$1};const{defaults:defaults$4}=defaults$5.exports,{rtrim,splitCells,escape:escape$2,findClosingBracket}=helpers;function outputLink(c,u,d,f){const h=u.href,v=u.title?escape$2(u.title):null,p=c[1].replace(/\\([\[\]])/g,"$1");if(c[0].charAt(0)!=="!"){f.state.inLink=!0;const m={type:"link",raw:d,href:h,title:v,text:p,tokens:f.inlineTokens(p,[])};return f.state.inLink=!1,m}else return{type:"image",raw:d,href:h,title:v,text:escape$2(p)}}function indentCodeCompensation(c,u){const d=c.match(/^(\s+)(?:```)/);if(d===null)return u;const f=d[1];return u.split(`
|
|
110
110
|
`).map(h=>{const v=h.match(/^\s+/);if(v===null)return h;const[p]=v;return p.length>=f.length?h.slice(f.length):h}).join(`
|
|
111
111
|
`)}var Tokenizer_1$1=class{constructor(u){this.options=u||defaults$4}space(u){const d=this.rules.block.newline.exec(u);if(d)return d[0].length>1?{type:"space",raw:d[0]}:{raw:`
|
|
112
112
|
`}}code(u){const d=this.rules.block.code.exec(u);if(d){const f=d[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:d[0],codeBlockStyle:"indented",text:this.options.pedantic?f:rtrim(f,`
|