@advt-gpt-chart/package 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -181551,7 +181551,7 @@ function FQe() {
181551
181551
  throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");
181552
181552
  return i;
181553
181553
  }
181554
- const Nxi = "3.0.3", _ce = /* @__PURE__ */ Qy({});
181554
+ const Nxi = "3.0.4", _ce = /* @__PURE__ */ Qy({});
181555
181555
  function NQe(i) {
181556
181556
  var e, t, n = "";
181557
181557
  if (typeof i == "string" || typeof i == "number") n += i;
@@ -202643,9 +202643,7 @@ function z8i(i, e, t) {
202643
202643
  };
202644
202644
  }
202645
202645
  function W8i(i, e) {
202646
- const { metrics: t } = e, n = cit(i);
202647
- console.log("metricInfo", e);
202648
- const r = [], o = {};
202646
+ const { metrics: t } = e, n = cit(i), r = [], o = {};
202649
202647
  return ((n == null ? void 0 : n.metrics) || []).forEach((s) => {
202650
202648
  var p;
202651
202649
  const l = (p = n == null ? void 0 : n.metricDefinitions) == null ? void 0 : p[s], u = l == null ? void 0 : l.refMetric, c = l == null ? void 0 : l.variables;
Binary file
package/dist/index.umd.js CHANGED
@@ -10585,7 +10585,7 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
10585
10585
  `,Lae=({loadingText:i})=>we.jsxs(L3i,{className:"gpt-vis-loading",children:[we.jsx("div",{className:"gpt-vis-loading-icon",children:we.jsxs("div",{className:"loading-svg-ele",children:[we.jsx("svg",{width:"0",height:"0",children:we.jsx("defs",{children:we.jsxs("linearGradient",{id:"loadingCircleStrokeGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[we.jsx("stop",{offset:"0%",stopColor:"#008CD6"}),we.jsx("stop",{offset:"100%",stopColor:"#00CC66"})]})})}),we.jsx("svg",{viewBox:"22 22 44 44",children:we.jsx("circle",{className:"loading-svg-circle",cx:"44",cy:"44",r:"20.2",fill:"none",strokeWidth:"3.6"})})]})}),we.jsx("p",{children:i})]}),B3i=Bs.div`
10586
10586
  height: 100%;
10587
10587
  width: 100%;
10588
- `,wGe=({visible:i,title:e,message:t})=>i?we.jsx(B3i,{className:"error-container",children:we.jsx(ZA,{status:"error",title:e,subTitle:t})}):null,EGe=ce.createContext(null);function AGe(){const i=ce.useContext(EGe);if(i===void 0||Object.keys(i).length===0)throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");return i}const TGe="3.0.3",Bae=ce.createContext({});function RGe(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var r=i.length;for(e=0;e<r;e++)i[e]&&(t=RGe(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function Fae(){for(var i,e,t=0,n="",r=arguments.length;t<r;t++)(i=arguments[t])&&(e=RGe(i))&&(n&&(n+=" "),n+=e);return n}const F3i={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},ou=Math.round;function Nae(i,e){const t=i.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=t.map(r=>parseFloat(r));for(let r=0;r<3;r+=1)n[r]=e(n[r]||0,t[r]||"",r);return t[3]?n[3]=t[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const MGe=(i,e,t)=>t===0?i:i/100;function NT(i,e){const t=e||255;return i>t?t:i<0?0:i}class bS{constructor(e){sc(this,"isValid",!0);sc(this,"r",0);sc(this,"g",0);sc(this,"b",0);sc(this,"a",1);sc(this,"_h");sc(this,"_s");sc(this,"_l");sc(this,"_v");sc(this,"_max");sc(this,"_min");sc(this,"_brightness");function t(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let r=function(o){return n.startsWith(o)};const n=e.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(r("rgb"))this.fromRgbString(n);else if(r("hsl"))this.fromHslString(n);else if(r("hsv")||r("hsb"))this.fromHsvString(n);else{const o=F3i[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(e instanceof bS)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=NT(e.r),this.g=NT(e.g),this.b=NT(e.b),this.a=typeof e.a=="number"?NT(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const t=e(this.r),n=e(this.g),r=e(this.b);return .2126*t+.7152*n+.0722*r}getHue(){if(typeof this._h=="undefined"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=ou(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s=="undefined"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l=="undefined"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v=="undefined"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness=="undefined"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){const n=this._c(e),r=t/100,o=s=>(n[s]-this[s])*r+this[s],a={r:ou(o("r")),g:ou(o("g")),b:ou(o("b")),a:ou(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=o=>ou((this[o]*this.a+t[o]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.b||0).toString(16);if(e+=r.length===2?r:"0"+r,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=ou(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=ou(this.getSaturation()*100),n=ou(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=NT(t,n),r}_c(e){return new this.constructor(e)}getMax(){return typeof this._max=="undefined"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min=="undefined"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(r,o){return parseInt(t[r]+t[o||r],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){if(this._h=e%360,this._s=t,this._l=n,this.a=typeof r=="number"?r:1,t<=0){const d=ou(n*255);this.r=d,this.g=d,this.b=d}let o=0,a=0,s=0;const l=e/60,u=(1-Math.abs(2*n-1))*t,c=u*(1-Math.abs(l%2-1));l>=0&&l<1?(o=u,a=c):l>=1&&l<2?(o=c,a=u):l>=2&&l<3?(a=u,s=c):l>=3&&l<4?(a=c,s=u):l>=4&&l<5?(o=c,s=u):l>=5&&l<6&&(o=u,s=c);const h=n-u/2;this.r=ou((o+h)*255),this.g=ou((a+h)*255),this.b=ou((s+h)*255)}fromHsv({h:e,s:t,v:n,a:r}){this._h=e%360,this._s=t,this._v=n,this.a=typeof r=="number"?r:1;const o=ou(n*255);if(this.r=o,this.g=o,this.b=o,t<=0)return;const a=e/60,s=Math.floor(a),l=a-s,u=ou(n*(1-t)*255),c=ou(n*(1-t*l)*255),h=ou(n*(1-t*(1-l))*255);switch(s){case 0:this.g=h,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=h;break;case 3:this.r=u,this.g=c;break;case 4:this.r=h,this.g=u;break;case 5:default:this.g=u,this.b=c;break}}fromHsvString(e){const t=Nae(e,MGe);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Nae(e,MGe);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Nae(e,(n,r)=>r.includes("%")?ou(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const BL=2,kGe=.16,N3i=.05,H3i=.05,$3i=.15,OGe=5,IGe=4,z3i=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function DGe(i,e,t){let n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=t?Math.round(i.h)-BL*e:Math.round(i.h)+BL*e:n=t?Math.round(i.h)+BL*e:Math.round(i.h)-BL*e,n<0?n+=360:n>=360&&(n-=360),n}function PGe(i,e,t){if(i.h===0&&i.s===0)return i.s;let n;return t?n=i.s-kGe*e:e===IGe?n=i.s+kGe:n=i.s+N3i*e,n>1&&(n=1),t&&e===OGe&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function LGe(i,e,t){let n;return t?n=i.v+H3i*e:n=i.v-$3i*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function W3i(i,e={}){const t=[],n=new bS(i),r=n.toHsv();for(let o=OGe;o>0;o-=1){const a=new bS({h:DGe(r,o,!0),s:PGe(r,o,!0),v:LGe(r,o,!0)});t.push(a)}t.push(n);for(let o=1;o<=IGe;o+=1){const a=new bS({h:DGe(r,o),s:PGe(r,o),v:LGe(r,o)});t.push(a)}return e.theme==="dark"?z3i.map(({index:o,amount:a})=>new bS(e.backgroundColor||"#141414").mix(t[o],a).toHexString()):t.map(o=>o.toHexString())}const Hae=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Hae.primary=Hae[5];function V3i(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function j3i(i,e){if(!i)return!1;if(i.contains)return i.contains(e);let t=e;for(;t;){if(t===i)return!0;t=t.parentNode}return!1}const BGe="data-rc-order",FGe="data-rc-priority",U3i="rc-util-key",$ae=new Map;function NGe({mark:i}={}){return i?i.startsWith("data-")?i:`data-${i}`:U3i}function zae(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function G3i(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function Wae(i){return Array.from(($ae.get(i)||i).children).filter(e=>e.tagName==="STYLE")}function HGe(i,e={}){if(!V3i())return null;const{csp:t,prepend:n,priority:r=0}=e,o=G3i(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(BGe,o),a&&r&&s.setAttribute(FGe,`${r}`),t!=null&&t.nonce&&(s.nonce=t==null?void 0:t.nonce),s.innerHTML=i;const l=zae(e),{firstChild:u}=l;if(n){if(a){const c=(e.styles||Wae(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(BGe)))return!1;const d=Number(h.getAttribute(FGe)||0);return r>=d});if(c.length)return l.insertBefore(s,c[c.length-1].nextSibling),s}l.insertBefore(s,u)}else l.appendChild(s);return s}function q3i(i,e={}){let{styles:t}=e;return t||(t=Wae(zae(e))),t.find(n=>n.getAttribute(NGe(e))===i)}function Y3i(i,e){const t=$ae.get(i);if(!t||!j3i(document,t)){const n=HGe("",e),{parentNode:r}=n;$ae.set(i,r),i.removeChild(n)}}function X3i(i,e,t={}){var l,u,c;const n=zae(t),r=Wae(n),o=Hi(ke({},t),{styles:r});Y3i(n,o);const a=q3i(e,o);if(a)return(l=o.csp)!=null&&l.nonce&&a.nonce!==((u=o.csp)==null?void 0:u.nonce)&&(a.nonce=(c=o.csp)==null?void 0:c.nonce),a.innerHTML!==i&&(a.innerHTML=i),a;const s=HGe(i,o);return s.setAttribute(NGe(o),e),s}function $Ge(i){var e;return(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i)}function K3i(i){return $Ge(i)instanceof ShadowRoot}function Z3i(i){return K3i(i)?$Ge(i):null}var zGe={};let Vae={};const jae=[],Q3i=i=>{jae.push(i)};function J3i(i,e){if(zGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=jae.reduce((n,r)=>r(n!=null?n:"","warning"),e);t&&console.error(`Warning: ${t}`)}}function exi(i,e){if(zGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=jae.reduce((n,r)=>r(n!=null?n:"","note"),e);t&&console.warn(`Note: ${t}`)}}function txi(){Vae={}}function WGe(i,e,t){!e&&!Vae[t]&&(i(!1,t),Vae[t]=!0)}function FL(i,e){WGe(J3i,i,e)}function ixi(i,e){WGe(exi,i,e)}FL.preMessage=Q3i,FL.resetWarned=txi,FL.noteOnce=ixi;function nxi(i){return i.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Uae(i,e){FL(i,`[@ant-design/icons] ${e}`)}function VGe(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function jGe(i={}){return Object.keys(i).reduce((e,t)=>{const n=i[t];switch(t){case"class":e.className=n,delete e.class;break;default:delete e[t],e[nxi(t)]=n}return e},{})}function Gae(i,e,t){return t?ce.createElement(i.tag,ke(ke({key:e},jGe(i.attrs)),t),(i.children||[]).map((n,r)=>Gae(n,`${e}-${i.tag}-${r}`))):ce.createElement(i.tag,ke({key:e},jGe(i.attrs)),(i.children||[]).map((n,r)=>Gae(n,`${e}-${i.tag}-${r}`)))}function UGe(i){return W3i(i)[0]}function GGe(i){return i?Array.isArray(i)?i:[i]:[]}const rxi={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},oxi=`
10588
+ `,wGe=({visible:i,title:e,message:t})=>i?we.jsx(B3i,{className:"error-container",children:we.jsx(ZA,{status:"error",title:e,subTitle:t})}):null,EGe=ce.createContext(null);function AGe(){const i=ce.useContext(EGe);if(i===void 0||Object.keys(i).length===0)throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");return i}const TGe="3.0.4",Bae=ce.createContext({});function RGe(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var r=i.length;for(e=0;e<r;e++)i[e]&&(t=RGe(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function Fae(){for(var i,e,t=0,n="",r=arguments.length;t<r;t++)(i=arguments[t])&&(e=RGe(i))&&(n&&(n+=" "),n+=e);return n}const F3i={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},ou=Math.round;function Nae(i,e){const t=i.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=t.map(r=>parseFloat(r));for(let r=0;r<3;r+=1)n[r]=e(n[r]||0,t[r]||"",r);return t[3]?n[3]=t[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const MGe=(i,e,t)=>t===0?i:i/100;function NT(i,e){const t=e||255;return i>t?t:i<0?0:i}class bS{constructor(e){sc(this,"isValid",!0);sc(this,"r",0);sc(this,"g",0);sc(this,"b",0);sc(this,"a",1);sc(this,"_h");sc(this,"_s");sc(this,"_l");sc(this,"_v");sc(this,"_max");sc(this,"_min");sc(this,"_brightness");function t(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let r=function(o){return n.startsWith(o)};const n=e.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(r("rgb"))this.fromRgbString(n);else if(r("hsl"))this.fromHslString(n);else if(r("hsv")||r("hsb"))this.fromHsvString(n);else{const o=F3i[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(e instanceof bS)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=NT(e.r),this.g=NT(e.g),this.b=NT(e.b),this.a=typeof e.a=="number"?NT(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const t=e(this.r),n=e(this.g),r=e(this.b);return .2126*t+.7152*n+.0722*r}getHue(){if(typeof this._h=="undefined"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=ou(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s=="undefined"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l=="undefined"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v=="undefined"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness=="undefined"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){const n=this._c(e),r=t/100,o=s=>(n[s]-this[s])*r+this[s],a={r:ou(o("r")),g:ou(o("g")),b:ou(o("b")),a:ou(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=o=>ou((this[o]*this.a+t[o]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.b||0).toString(16);if(e+=r.length===2?r:"0"+r,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=ou(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=ou(this.getSaturation()*100),n=ou(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=NT(t,n),r}_c(e){return new this.constructor(e)}getMax(){return typeof this._max=="undefined"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min=="undefined"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(r,o){return parseInt(t[r]+t[o||r],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){if(this._h=e%360,this._s=t,this._l=n,this.a=typeof r=="number"?r:1,t<=0){const d=ou(n*255);this.r=d,this.g=d,this.b=d}let o=0,a=0,s=0;const l=e/60,u=(1-Math.abs(2*n-1))*t,c=u*(1-Math.abs(l%2-1));l>=0&&l<1?(o=u,a=c):l>=1&&l<2?(o=c,a=u):l>=2&&l<3?(a=u,s=c):l>=3&&l<4?(a=c,s=u):l>=4&&l<5?(o=c,s=u):l>=5&&l<6&&(o=u,s=c);const h=n-u/2;this.r=ou((o+h)*255),this.g=ou((a+h)*255),this.b=ou((s+h)*255)}fromHsv({h:e,s:t,v:n,a:r}){this._h=e%360,this._s=t,this._v=n,this.a=typeof r=="number"?r:1;const o=ou(n*255);if(this.r=o,this.g=o,this.b=o,t<=0)return;const a=e/60,s=Math.floor(a),l=a-s,u=ou(n*(1-t)*255),c=ou(n*(1-t*l)*255),h=ou(n*(1-t*(1-l))*255);switch(s){case 0:this.g=h,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=h;break;case 3:this.r=u,this.g=c;break;case 4:this.r=h,this.g=u;break;case 5:default:this.g=u,this.b=c;break}}fromHsvString(e){const t=Nae(e,MGe);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Nae(e,MGe);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Nae(e,(n,r)=>r.includes("%")?ou(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const BL=2,kGe=.16,N3i=.05,H3i=.05,$3i=.15,OGe=5,IGe=4,z3i=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function DGe(i,e,t){let n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=t?Math.round(i.h)-BL*e:Math.round(i.h)+BL*e:n=t?Math.round(i.h)+BL*e:Math.round(i.h)-BL*e,n<0?n+=360:n>=360&&(n-=360),n}function PGe(i,e,t){if(i.h===0&&i.s===0)return i.s;let n;return t?n=i.s-kGe*e:e===IGe?n=i.s+kGe:n=i.s+N3i*e,n>1&&(n=1),t&&e===OGe&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function LGe(i,e,t){let n;return t?n=i.v+H3i*e:n=i.v-$3i*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function W3i(i,e={}){const t=[],n=new bS(i),r=n.toHsv();for(let o=OGe;o>0;o-=1){const a=new bS({h:DGe(r,o,!0),s:PGe(r,o,!0),v:LGe(r,o,!0)});t.push(a)}t.push(n);for(let o=1;o<=IGe;o+=1){const a=new bS({h:DGe(r,o),s:PGe(r,o),v:LGe(r,o)});t.push(a)}return e.theme==="dark"?z3i.map(({index:o,amount:a})=>new bS(e.backgroundColor||"#141414").mix(t[o],a).toHexString()):t.map(o=>o.toHexString())}const Hae=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Hae.primary=Hae[5];function V3i(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function j3i(i,e){if(!i)return!1;if(i.contains)return i.contains(e);let t=e;for(;t;){if(t===i)return!0;t=t.parentNode}return!1}const BGe="data-rc-order",FGe="data-rc-priority",U3i="rc-util-key",$ae=new Map;function NGe({mark:i}={}){return i?i.startsWith("data-")?i:`data-${i}`:U3i}function zae(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function G3i(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function Wae(i){return Array.from(($ae.get(i)||i).children).filter(e=>e.tagName==="STYLE")}function HGe(i,e={}){if(!V3i())return null;const{csp:t,prepend:n,priority:r=0}=e,o=G3i(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(BGe,o),a&&r&&s.setAttribute(FGe,`${r}`),t!=null&&t.nonce&&(s.nonce=t==null?void 0:t.nonce),s.innerHTML=i;const l=zae(e),{firstChild:u}=l;if(n){if(a){const c=(e.styles||Wae(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(BGe)))return!1;const d=Number(h.getAttribute(FGe)||0);return r>=d});if(c.length)return l.insertBefore(s,c[c.length-1].nextSibling),s}l.insertBefore(s,u)}else l.appendChild(s);return s}function q3i(i,e={}){let{styles:t}=e;return t||(t=Wae(zae(e))),t.find(n=>n.getAttribute(NGe(e))===i)}function Y3i(i,e){const t=$ae.get(i);if(!t||!j3i(document,t)){const n=HGe("",e),{parentNode:r}=n;$ae.set(i,r),i.removeChild(n)}}function X3i(i,e,t={}){var l,u,c;const n=zae(t),r=Wae(n),o=Hi(ke({},t),{styles:r});Y3i(n,o);const a=q3i(e,o);if(a)return(l=o.csp)!=null&&l.nonce&&a.nonce!==((u=o.csp)==null?void 0:u.nonce)&&(a.nonce=(c=o.csp)==null?void 0:c.nonce),a.innerHTML!==i&&(a.innerHTML=i),a;const s=HGe(i,o);return s.setAttribute(NGe(o),e),s}function $Ge(i){var e;return(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i)}function K3i(i){return $Ge(i)instanceof ShadowRoot}function Z3i(i){return K3i(i)?$Ge(i):null}var zGe={};let Vae={};const jae=[],Q3i=i=>{jae.push(i)};function J3i(i,e){if(zGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=jae.reduce((n,r)=>r(n!=null?n:"","warning"),e);t&&console.error(`Warning: ${t}`)}}function exi(i,e){if(zGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=jae.reduce((n,r)=>r(n!=null?n:"","note"),e);t&&console.warn(`Note: ${t}`)}}function txi(){Vae={}}function WGe(i,e,t){!e&&!Vae[t]&&(i(!1,t),Vae[t]=!0)}function FL(i,e){WGe(J3i,i,e)}function ixi(i,e){WGe(exi,i,e)}FL.preMessage=Q3i,FL.resetWarned=txi,FL.noteOnce=ixi;function nxi(i){return i.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Uae(i,e){FL(i,`[@ant-design/icons] ${e}`)}function VGe(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function jGe(i={}){return Object.keys(i).reduce((e,t)=>{const n=i[t];switch(t){case"class":e.className=n,delete e.class;break;default:delete e[t],e[nxi(t)]=n}return e},{})}function Gae(i,e,t){return t?ce.createElement(i.tag,ke(ke({key:e},jGe(i.attrs)),t),(i.children||[]).map((n,r)=>Gae(n,`${e}-${i.tag}-${r}`))):ce.createElement(i.tag,ke({key:e},jGe(i.attrs)),(i.children||[]).map((n,r)=>Gae(n,`${e}-${i.tag}-${r}`)))}function UGe(i){return W3i(i)[0]}function GGe(i){return i?Array.isArray(i)?i:[i]:[]}const rxi={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},oxi=`
10589
10589
  .anticon {
10590
10590
  display: inline-flex;
10591
10591
  align-items: center;
@@ -11159,7 +11159,7 @@ ${r}
11159
11159
  }
11160
11160
  }
11161
11161
  `}
11162
- `,k8i=i=>M.createElement("svg",ke({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),M.createElement("path",{d:"M10.2922 14.9805L6.53982 10.8977L16.6663 10.8977V9.10209L6.53982 9.10209L10.2922 5.01946L9.10769 3.75L3.33301 10L9.10769 16.25L10.2922 14.9805Z",fill:"#89898A"})),hQe=[{key:"none",label:"None",value:"none"},{key:"number",label:"Number",value:"number"},{key:"percentage_raw",label:"Percentage (raw)",value:"percentage_raw",desc:"1→1%"},{key:"percentage_scaled",label:"Percentage (scaled)",value:"percentage_scaled",desc:"1→100%"}],O8i={none:"",number:"",percentage_raw:"%",percentage_scaled:"%",celsius:"°C",fahrenheit:"°F",CNY:"¥",USD:"$",GBP:"£",EUR:"€"};function dQe(i,e){if(!i&&!e)return"";let t="",n="";return i&&i!=="none"&&(t=i),e&&e!=="none"&&(n=O8i[e]||e),t+(n?" "+n:"")}function I8i(i,e,t){if(!i)return null;const{dimensionDetailList:n,displayName:r,metricId:o,derivationMethod:a}=i,s={value:o,label:r},l=_ue(n,a,t),u=(e==null?void 0:e.dimensions)||[(e==null?void 0:e.xField)||(e==null?void 0:e.nameField)],c=l.filter(d=>u.some(f=>f===d.label||f===d.value)||d.defaultSelected),h=B8i(r,i);return{metrics:[s],dimensions:c,dissionOptions:l,dataFormat:h}}function D8i(i,e){const{metrics:t}=e,n=gQe(i);console.log("metricInfo",e);const r=[],o={};return((n==null?void 0:n.metrics)||[]).forEach(s=>{var p;const l=(p=n==null?void 0:n.metricDefinitions)==null?void 0:p[s],u=l==null?void 0:l.refMetric,c=l==null?void 0:l.variables;let h;!u&&c?h=Object.values(c).map(m=>m==null?void 0:m.refMetric):h=[u];let d=[],f=[],g=!1;t.forEach(m=>{var b;const v=m==null?void 0:m.metricUnit;(b=m==null?void 0:m.usedBy)!=null&&b.includes(s)&&(g=!0),o[s]={},g||(o[s]={formatType:(v==null?void 0:v.type)||"none",decimalPlaces:(v==null?void 0:v.decimal)||0,suffix:dQe(v==null?void 0:v.valueUnit,v==null?void 0:v.formatUnit)}),h!=null&&h.includes(m==null?void 0:m.englishName)&&!f.includes(m==null?void 0:m.metricId)&&(d.push(m),f.push(m==null?void 0:m.metricId))}),r.push({isDerived:g,displayName:s,label:s,value:"uuid-"+kV(6),metricDefinitions:l,atomicMetricIds:f,atomicMetricsInfo:d})}),{metricsOptions:r,dataFormat:o}}function P8i(i,e,t,n){const{metricsOptions:r,dataFormat:o}=e,{dimensions:a,timeDimension:s={},filters:l=[]}=i,u=Hi(ke({},n),{dataType:"TIMESTAMP"}),c=fQe(r),h=_ue(t,c,n),d=h.filter(f=>(a==null?void 0:a.some(g=>(g==null?void 0:g.displayName)===f.label||(g==null?void 0:g.dimensionId)===f.value))||f.defaultSelected);return(s==null?void 0:s.dimensionName)===(n==null?void 0:n.value)&&d.unshift(u),{metrics:r,dataFormat:o,dimensions:d,dissionOptions:h,timeDimension:s,filters:l,queryMetricOrgId:i==null?void 0:i.orgId}}function fQe(i){const e=[];return i==null||i.forEach(t=>{var n;t!=null&&t.atomicMetricsInfo&&((n=t==null?void 0:t.atomicMetricsInfo)==null||n.forEach(r=>{r!=null&&r.derivationMethod&&hl(r==null?void 0:r.derivationMethod)&&e.push(...r.derivationMethod)}))}),e}function L8i(i,e){var r,o,a,s,l;let t=!1,n=!1;if(!(e!=null&&e.enabled))return{defaultSelected:t,defaultDisabled:n};if((e==null?void 0:e.method)==="Ranking"&&(e!=null&&e.ranking)){const u=((r=e.ranking)==null?void 0:r.dimensions)||[],c=((o=e.ranking)==null?void 0:o.ranges)||[];return{defaultSelected:[...u,...c].includes(i),defaultDisabled:n}}if((e==null?void 0:e.method)==="Proportion"&&(e!=null&&e.proportion)){const u=((a=e.proportion)==null?void 0:a.dimensions)||[],c=((s=e.proportion)==null?void 0:s.ranges)||[];return{defaultSelected:[...u,...c].includes(i),defaultDisabled:n}}if((e==null?void 0:e.method)==="Custom"&&((l=e==null?void 0:e.custom)==null?void 0:l.length)>0){const u=e.custom,c=u.findIndex(h=>(h==null?void 0:h.dimension)===i);return c!==-1&&(c===u.length-1?t=!0:(t=!1,n=!0)),{defaultSelected:t,defaultDisabled:n}}return{defaultSelected:t,defaultDisabled:n}}const B8i=(i,e)=>{var t,n;if(i&&((t=e==null?void 0:e.computationalAttributes)!=null&&t.format)){const r=(n=e==null?void 0:e.computationalAttributes)==null?void 0:n.format;return{[i]:{formatType:(r==null?void 0:r.type)||"none",decimalPlaces:(r==null?void 0:r.decimal)||0,suffix:dQe(r==null?void 0:r.valueUnit,r==null?void 0:r.formatUnit)}}}return null};function gQe(i){let e={};if(typeof i=="object")e=i;else if(typeof i=="string")try{e=JSON.parse(i)}catch(t){console.error(t)}return e}function _ue(i,e,t){const n=(i==null?void 0:i.map(r=>{const{defaultSelected:o,defaultDisabled:a}=L8i(r.dimensionId,e);return{label:r.displayName,value:r.dimensionId,englishName:r.englishName,dataType:r.dimensionColumnType,datasetName:r.datasetName,dimensionColumn:r.dimensionColumn,defaultSelected:o,defaultDisabled:a,disabled:o||a}}))||[];return n.unshift(Hi(ke({},t),{dataType:"TIMESTAMP",englishName:t.label,datasetName:void 0,dimensionColumn:void 0,defaultSelected:!1,defaultDisabled:!1,disabled:!1})),n}const F8i=[{key:"custom",label:"Custom",value:"custom"},{key:"today",label:"Today",value:"today"},{key:"last7Days",label:"Last 7 days",value:"last7Days"},{key:"last30Days",label:"Last 30 days",value:"last30Days"},{key:"last1Year",label:"Last year",value:"last1Year"},{key:"thisWeek",label:"This week",value:"thisWeek"},{key:"thisMonth",label:"This month",value:"thisMonth"},{key:"thisQuarter",label:"This quarter",value:"thisQuarter"},{key:"thisYear",label:"This year",value:"thisYear"},{key:"weekToDate",label:"Week-to-date",value:"weekToDate"},{key:"monthToDate",label:"Month-to-date",value:"monthToDate"},{key:"quarterToDate",label:"Quarter-to-date",value:"quarterToDate"},{key:"yearToDate",label:"Year-to-date",value:"yearToDate"},{key:"advanced",label:"Advanced",value:"advanced"}],N8i=[{key:"lastPeriod",label:"Last N period",value:"lastPeriod"},{key:"periodAgo",label:"N periods ago",value:"periodAgo"},{key:"periodBoundary",label:"Current/previous period boundary",value:"periodBoundary"}],H8i=[{key:"current",label:"Current",value:"current"},{key:"previous",label:"Previous",value:"previous"}],US=[{key:"minute",label:"Minute",value:"minute"},{key:"hour",label:"Hour",value:"hour"},{key:"day",label:"Day",value:"day"},{key:"week",label:"Week",value:"week"},{key:"month",label:"Month",value:"month"},{key:"quarter",label:"Quarter",value:"quarter"},{key:"year",label:"Year",value:"year"}],pQe=[{key:"minute",label:"Minute",value:"minute"},{key:"hour",label:"Hour",value:"hour"},{key:"year",label:"Year",value:"year"},{key:"quarter",label:"Quarter",value:"quarter"},{key:"month",label:"Month",value:"month"},{key:"week",label:"Week",value:"week"},{key:"day",label:"Day",value:"day"}],$8i=[{key:"first",label:"First",value:"first"},{key:"last",label:"Last",value:"last"}],mQe={type:"lastPeriod",lastPeriod:{range:7,unit:"day"},periodAgo:{range:7,unit:"day"},periodBoundary:{periodType:"current",periodUnit:"month",periodRange:void 0,boundaryType:"first",boundaryUnit:"day"}},I5={second:0,minute:1,hour:2,day:3,week:4,month:5,quarter:6,year:7},z8i=i=>{if(i&&Object.prototype.hasOwnProperty.call(I5,i)){const e=I5[i];return US.filter(t=>I5[t.value]<e)}return US},W8i=i=>{const e=I5[i==null?void 0:i.toLowerCase()];return e!==void 0?pQe.filter(t=>I5[t.value]<e):pQe},V8i=(i,e,t)=>{var n,r,o,a,s,l;if((e==null?void 0:e.type)==="custom"&&(n=e==null?void 0:e.custom)!=null&&n.from&&(r=e==null?void 0:e.custom)!=null&&r.to){const u=Fr(e.custom.from).format(Ob),c=Fr(e.custom.to).format(Ob);return`${u}-${c}`}if((e==null?void 0:e.type)==="advanced"&&e.advanced){const u=e.advanced;let c="";if((u==null?void 0:u.type)==="lastPeriod")return t({id:"lastNUnits"},{range:(o=u==null?void 0:u.lastPeriod)==null?void 0:o.range,unit:t({id:"unit"+((a=u.lastPeriod)==null?void 0:a.unit)})});if((u==null?void 0:u.type)==="periodAgo")return t({id:"periodAgoNUnits"},{range:(s=u.periodAgo)==null?void 0:s.range,unit:t({id:"unit"+((l=u.periodAgo)==null?void 0:l.unit)})});if((u==null?void 0:u.type)==="periodBoundary"){const h=u.periodBoundary;if((h==null?void 0:h.periodType)==="current")return t({id:"currentNUnit"},{periodUnit:t({id:"unit"+h.periodUnit}),boundaryType:t({id:h.boundaryType}),boundaryUnit:t({id:"unit"+h.boundaryUnit})});if((h==null?void 0:h.periodType)==="previous")return t({id:"previousNUnits"},{periodRange:h.periodRange,periodUnit:t({id:"unit"+h.periodUnit}),boundaryType:t({id:h.boundaryType}),boundaryUnit:t({id:"unit"+h.boundaryUnit})})}return c}return i},j8i=i=>i==null?void 0:i.dimensionUnit,U8i=(i,e)=>{var t,n,r;if(!(i!=null&&i.type)){const o=e==null?void 0:e.mql;let a;if(a=(t=gQe(o))==null?void 0:t.timeConstraint,!a)return{};const s=Object.keys(a)[0],l=a[s];return l&&typeof l=="object"&&(l==null?void 0:l.type)==="advanced"&&((r=(n=l==null?void 0:l.advanced)==null?void 0:n.custom)!=null&&r.from)?{type:"custom",custom:{from:l.advanced.custom.from,to:l.advanced.custom.to||Fr().format("YYYY-MM-DD HH:mm:ss")}}:{}}return i},{Text:D5}=Nx,G8i=qx`
11162
+ `,k8i=i=>M.createElement("svg",ke({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),M.createElement("path",{d:"M10.2922 14.9805L6.53982 10.8977L16.6663 10.8977V9.10209L6.53982 9.10209L10.2922 5.01946L9.10769 3.75L3.33301 10L9.10769 16.25L10.2922 14.9805Z",fill:"#89898A"})),hQe=[{key:"none",label:"None",value:"none"},{key:"number",label:"Number",value:"number"},{key:"percentage_raw",label:"Percentage (raw)",value:"percentage_raw",desc:"1→1%"},{key:"percentage_scaled",label:"Percentage (scaled)",value:"percentage_scaled",desc:"1→100%"}],O8i={none:"",number:"",percentage_raw:"%",percentage_scaled:"%",celsius:"°C",fahrenheit:"°F",CNY:"¥",USD:"$",GBP:"£",EUR:"€"};function dQe(i,e){if(!i&&!e)return"";let t="",n="";return i&&i!=="none"&&(t=i),e&&e!=="none"&&(n=O8i[e]||e),t+(n?" "+n:"")}function I8i(i,e,t){if(!i)return null;const{dimensionDetailList:n,displayName:r,metricId:o,derivationMethod:a}=i,s={value:o,label:r},l=_ue(n,a,t),u=(e==null?void 0:e.dimensions)||[(e==null?void 0:e.xField)||(e==null?void 0:e.nameField)],c=l.filter(d=>u.some(f=>f===d.label||f===d.value)||d.defaultSelected),h=B8i(r,i);return{metrics:[s],dimensions:c,dissionOptions:l,dataFormat:h}}function D8i(i,e){const{metrics:t}=e,n=gQe(i),r=[],o={};return((n==null?void 0:n.metrics)||[]).forEach(s=>{var p;const l=(p=n==null?void 0:n.metricDefinitions)==null?void 0:p[s],u=l==null?void 0:l.refMetric,c=l==null?void 0:l.variables;let h;!u&&c?h=Object.values(c).map(m=>m==null?void 0:m.refMetric):h=[u];let d=[],f=[],g=!1;t.forEach(m=>{var b;const v=m==null?void 0:m.metricUnit;(b=m==null?void 0:m.usedBy)!=null&&b.includes(s)&&(g=!0),o[s]={},g||(o[s]={formatType:(v==null?void 0:v.type)||"none",decimalPlaces:(v==null?void 0:v.decimal)||0,suffix:dQe(v==null?void 0:v.valueUnit,v==null?void 0:v.formatUnit)}),h!=null&&h.includes(m==null?void 0:m.englishName)&&!f.includes(m==null?void 0:m.metricId)&&(d.push(m),f.push(m==null?void 0:m.metricId))}),r.push({isDerived:g,displayName:s,label:s,value:"uuid-"+kV(6),metricDefinitions:l,atomicMetricIds:f,atomicMetricsInfo:d})}),{metricsOptions:r,dataFormat:o}}function P8i(i,e,t,n){const{metricsOptions:r,dataFormat:o}=e,{dimensions:a,timeDimension:s={},filters:l=[]}=i,u=Hi(ke({},n),{dataType:"TIMESTAMP"}),c=fQe(r),h=_ue(t,c,n),d=h.filter(f=>(a==null?void 0:a.some(g=>(g==null?void 0:g.displayName)===f.label||(g==null?void 0:g.dimensionId)===f.value))||f.defaultSelected);return(s==null?void 0:s.dimensionName)===(n==null?void 0:n.value)&&d.unshift(u),{metrics:r,dataFormat:o,dimensions:d,dissionOptions:h,timeDimension:s,filters:l,queryMetricOrgId:i==null?void 0:i.orgId}}function fQe(i){const e=[];return i==null||i.forEach(t=>{var n;t!=null&&t.atomicMetricsInfo&&((n=t==null?void 0:t.atomicMetricsInfo)==null||n.forEach(r=>{r!=null&&r.derivationMethod&&hl(r==null?void 0:r.derivationMethod)&&e.push(...r.derivationMethod)}))}),e}function L8i(i,e){var r,o,a,s,l;let t=!1,n=!1;if(!(e!=null&&e.enabled))return{defaultSelected:t,defaultDisabled:n};if((e==null?void 0:e.method)==="Ranking"&&(e!=null&&e.ranking)){const u=((r=e.ranking)==null?void 0:r.dimensions)||[],c=((o=e.ranking)==null?void 0:o.ranges)||[];return{defaultSelected:[...u,...c].includes(i),defaultDisabled:n}}if((e==null?void 0:e.method)==="Proportion"&&(e!=null&&e.proportion)){const u=((a=e.proportion)==null?void 0:a.dimensions)||[],c=((s=e.proportion)==null?void 0:s.ranges)||[];return{defaultSelected:[...u,...c].includes(i),defaultDisabled:n}}if((e==null?void 0:e.method)==="Custom"&&((l=e==null?void 0:e.custom)==null?void 0:l.length)>0){const u=e.custom,c=u.findIndex(h=>(h==null?void 0:h.dimension)===i);return c!==-1&&(c===u.length-1?t=!0:(t=!1,n=!0)),{defaultSelected:t,defaultDisabled:n}}return{defaultSelected:t,defaultDisabled:n}}const B8i=(i,e)=>{var t,n;if(i&&((t=e==null?void 0:e.computationalAttributes)!=null&&t.format)){const r=(n=e==null?void 0:e.computationalAttributes)==null?void 0:n.format;return{[i]:{formatType:(r==null?void 0:r.type)||"none",decimalPlaces:(r==null?void 0:r.decimal)||0,suffix:dQe(r==null?void 0:r.valueUnit,r==null?void 0:r.formatUnit)}}}return null};function gQe(i){let e={};if(typeof i=="object")e=i;else if(typeof i=="string")try{e=JSON.parse(i)}catch(t){console.error(t)}return e}function _ue(i,e,t){const n=(i==null?void 0:i.map(r=>{const{defaultSelected:o,defaultDisabled:a}=L8i(r.dimensionId,e);return{label:r.displayName,value:r.dimensionId,englishName:r.englishName,dataType:r.dimensionColumnType,datasetName:r.datasetName,dimensionColumn:r.dimensionColumn,defaultSelected:o,defaultDisabled:a,disabled:o||a}}))||[];return n.unshift(Hi(ke({},t),{dataType:"TIMESTAMP",englishName:t.label,datasetName:void 0,dimensionColumn:void 0,defaultSelected:!1,defaultDisabled:!1,disabled:!1})),n}const F8i=[{key:"custom",label:"Custom",value:"custom"},{key:"today",label:"Today",value:"today"},{key:"last7Days",label:"Last 7 days",value:"last7Days"},{key:"last30Days",label:"Last 30 days",value:"last30Days"},{key:"last1Year",label:"Last year",value:"last1Year"},{key:"thisWeek",label:"This week",value:"thisWeek"},{key:"thisMonth",label:"This month",value:"thisMonth"},{key:"thisQuarter",label:"This quarter",value:"thisQuarter"},{key:"thisYear",label:"This year",value:"thisYear"},{key:"weekToDate",label:"Week-to-date",value:"weekToDate"},{key:"monthToDate",label:"Month-to-date",value:"monthToDate"},{key:"quarterToDate",label:"Quarter-to-date",value:"quarterToDate"},{key:"yearToDate",label:"Year-to-date",value:"yearToDate"},{key:"advanced",label:"Advanced",value:"advanced"}],N8i=[{key:"lastPeriod",label:"Last N period",value:"lastPeriod"},{key:"periodAgo",label:"N periods ago",value:"periodAgo"},{key:"periodBoundary",label:"Current/previous period boundary",value:"periodBoundary"}],H8i=[{key:"current",label:"Current",value:"current"},{key:"previous",label:"Previous",value:"previous"}],US=[{key:"minute",label:"Minute",value:"minute"},{key:"hour",label:"Hour",value:"hour"},{key:"day",label:"Day",value:"day"},{key:"week",label:"Week",value:"week"},{key:"month",label:"Month",value:"month"},{key:"quarter",label:"Quarter",value:"quarter"},{key:"year",label:"Year",value:"year"}],pQe=[{key:"minute",label:"Minute",value:"minute"},{key:"hour",label:"Hour",value:"hour"},{key:"year",label:"Year",value:"year"},{key:"quarter",label:"Quarter",value:"quarter"},{key:"month",label:"Month",value:"month"},{key:"week",label:"Week",value:"week"},{key:"day",label:"Day",value:"day"}],$8i=[{key:"first",label:"First",value:"first"},{key:"last",label:"Last",value:"last"}],mQe={type:"lastPeriod",lastPeriod:{range:7,unit:"day"},periodAgo:{range:7,unit:"day"},periodBoundary:{periodType:"current",periodUnit:"month",periodRange:void 0,boundaryType:"first",boundaryUnit:"day"}},I5={second:0,minute:1,hour:2,day:3,week:4,month:5,quarter:6,year:7},z8i=i=>{if(i&&Object.prototype.hasOwnProperty.call(I5,i)){const e=I5[i];return US.filter(t=>I5[t.value]<e)}return US},W8i=i=>{const e=I5[i==null?void 0:i.toLowerCase()];return e!==void 0?pQe.filter(t=>I5[t.value]<e):pQe},V8i=(i,e,t)=>{var n,r,o,a,s,l;if((e==null?void 0:e.type)==="custom"&&(n=e==null?void 0:e.custom)!=null&&n.from&&(r=e==null?void 0:e.custom)!=null&&r.to){const u=Fr(e.custom.from).format(Ob),c=Fr(e.custom.to).format(Ob);return`${u}-${c}`}if((e==null?void 0:e.type)==="advanced"&&e.advanced){const u=e.advanced;let c="";if((u==null?void 0:u.type)==="lastPeriod")return t({id:"lastNUnits"},{range:(o=u==null?void 0:u.lastPeriod)==null?void 0:o.range,unit:t({id:"unit"+((a=u.lastPeriod)==null?void 0:a.unit)})});if((u==null?void 0:u.type)==="periodAgo")return t({id:"periodAgoNUnits"},{range:(s=u.periodAgo)==null?void 0:s.range,unit:t({id:"unit"+((l=u.periodAgo)==null?void 0:l.unit)})});if((u==null?void 0:u.type)==="periodBoundary"){const h=u.periodBoundary;if((h==null?void 0:h.periodType)==="current")return t({id:"currentNUnit"},{periodUnit:t({id:"unit"+h.periodUnit}),boundaryType:t({id:h.boundaryType}),boundaryUnit:t({id:"unit"+h.boundaryUnit})});if((h==null?void 0:h.periodType)==="previous")return t({id:"previousNUnits"},{periodRange:h.periodRange,periodUnit:t({id:"unit"+h.periodUnit}),boundaryType:t({id:h.boundaryType}),boundaryUnit:t({id:"unit"+h.boundaryUnit})})}return c}return i},j8i=i=>i==null?void 0:i.dimensionUnit,U8i=(i,e)=>{var t,n,r;if(!(i!=null&&i.type)){const o=e==null?void 0:e.mql;let a;if(a=(t=gQe(o))==null?void 0:t.timeConstraint,!a)return{};const s=Object.keys(a)[0],l=a[s];return l&&typeof l=="object"&&(l==null?void 0:l.type)==="advanced"&&((r=(n=l==null?void 0:l.advanced)==null?void 0:n.custom)!=null&&r.from)?{type:"custom",custom:{from:l.advanced.custom.from,to:l.advanced.custom.to||Fr().format("YYYY-MM-DD HH:mm:ss")}}:{}}return i},{Text:D5}=Nx,G8i=qx`
11163
11163
  ${()=>vl`
11164
11164
  .advanced-select-dropdown {
11165
11165
  &.advt-vis-chart-antd-select-dropdown {
Binary file
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const version = "3.0.3";
1
+ declare const version = "3.0.4";
2
2
  export default version;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@advt-gpt-chart/package",
3
3
  "private": false,
4
- "version": "3.0.3",
4
+ "version": "3.0.4",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"