UNPKG

@antv/t8

Version:

T8 is a text visualization solution for unstructured data within the AntV technology stack, and it is a declarative JSON Schema syntax that can be used to describe the content of data interpretation reports.

1 lines 61.6 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).T8={})}(this,(function(e){"use strict";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)};var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function o(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var i,u,l,a,c,s,_,p,f,h,d,v,y={},m=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function E(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function S(e,t,n){var r,o,u,l={};for(u in t)"key"==u?r=t[u]:"ref"==u?o=t[u]:l[u]=t[u];if(arguments.length>2&&(l.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(u in e.defaultProps)null==l[u]&&(l[u]=e.defaultProps[u]);return k(e,l,r,o,null)}function k(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++l:o,__i:-1,__u:0};return null==o&&null!=u.vnode&&u.vnode(i),i}function N(e){return e.children}function x(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?C(e):null}function P(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return P(e)}}function T(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!A.__r++||c!=u.debounceRendering)&&((c=u.debounceRendering)||s)(A)}function A(){for(var e,t,n,r,o,i,l,c=1;a.length;)a.length>c&&a.sort(_),e=a.shift(),c=a.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],l=[],t.__P&&((n=E({},r)).__v=r.__v+1,u.vnode&&u.vnode(n),R(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,null==o?C(r):o,!!(32&r.__u),l),n.__v=r.__v,n.__.__k[n.__i]=n,D(i,n,l),n.__e!=o&&P(n)));A.__r=0}function L(e,t,n,r,o,i,u,l,a,c,s){var _,p,f,h,d,v,g=r&&r.__k||m,E=t.length;for(a=function(e,t,n,r,o){var i,u,l,a,c,s=n.length,_=s,p=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(u=t[i])&&"boolean"!=typeof u&&"function"!=typeof u?(a=i+p,(u=e.__k[i]="string"==typeof u||"number"==typeof u||"bigint"==typeof u||u.constructor==String?k(null,u,null,null,null):b(u)?k(N,{children:u},null,null,null):null==u.constructor&&u.__b>0?k(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):u).__=e,u.__b=e.__b+1,l=null,-1!=(c=u.__i=U(u,n,a,_))&&(_--,(l=n[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(o>s?p--:o<s&&p++),"function"!=typeof u.type&&(u.__u|=4)):c!=a&&(c==a-1?p--:c==a+1?p++:(c>a?p--:p++,u.__u|=4))):e.__k[i]=null;if(_)for(i=0;i<s;i++)null!=(l=n[i])&&!(2&l.__u)&&(l.__e==r&&(r=C(l)),z(l,l));return r}(n,t,g,a,E),_=0;_<E;_++)null!=(f=n.__k[_])&&(p=-1==f.__i?y:g[f.__i]||y,f.__i=_,v=R(e,f,p,o,i,u,l,a,c,s),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&V(p.ref,null,f),s.push(f.ref,f.__c||h,f)),null==d&&null!=h&&(d=h),4&f.__u||p.__k===f.__k?a=O(f,a,e):"function"==typeof f.type&&void 0!==v?a=v:h&&(a=h.nextSibling),f.__u&=-7);return n.__e=d,a}function O(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=O(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=C(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function M(e,t){return t=t||[],null==e||"boolean"==typeof e||(b(e)?e.some((function(e){M(e,t)})):t.push(e)),t}function U(e,t,n,r){var o,i,u=e.key,l=e.type,a=t[n];if(null===a&&null==e.key||a&&u==a.key&&l==a.type&&!(2&a.__u))return n;if(r>(null==a||2&a.__u?0:1))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((a=t[o])&&!(2&a.__u)&&u==a.key&&l==a.type)return o;o--}if(i<t.length){if((a=t[i])&&!(2&a.__u)&&u==a.key&&l==a.type)return i;i++}}return-1}function H(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||g.test(t)?n:n+"px"}function B(e,t,n,r,o){var i;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||H(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||H(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(p,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=f,e.addEventListener(t,i?d:h,i)):e.removeEventListener(t,i?d:h,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function F(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=f++;else if(t.t<n.u)return;return n(u.event?u.event(t):t)}}}function R(e,t,n,r,o,i,l,a,c,s){var _,p,f,h,d,v,y,m,g,S,k,C,P,T,A,O,M,U=t.type;if(null!=t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(_=u.__b)&&_(t);e:if("function"==typeof U)try{if(m=t.props,g="prototype"in U&&U.prototype.render,S=(_=U.contextType)&&r[_.__c],k=_?S?S.props.value:_.__:r,n.__c?y=(p=t.__c=n.__c).__=p.__E:(g?t.__c=p=new U(m,k):(t.__c=p=new x(m,k),p.constructor=U,p.render=W),S&&S.sub(p),p.props=m,p.state||(p.state={}),p.context=k,p.__n=r,f=p.__d=!0,p.__h=[],p._sb=[]),g&&null==p.__s&&(p.__s=p.state),g&&null!=U.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=E({},p.__s)),E(p.__s,U.getDerivedStateFromProps(m,p.__s))),h=p.props,d=p.state,p.__v=t,f)g&&null==U.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),g&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(g&&null==U.getDerivedStateFromProps&&m!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(m,k),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(m,p.__s,k)||t.__v==n.__v){for(t.__v!=n.__v&&(p.props=m,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),C=0;C<p._sb.length;C++)p.__h.push(p._sb[C]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(m,p.__s,k),g&&null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(h,d,v)}))}if(p.context=k,p.props=m,p.__P=e,p.__e=!1,P=u.__r,T=0,g){for(p.state=p.__s,p.__d=!1,P&&P(t),_=p.render(p.props,p.state,p.context),A=0;A<p._sb.length;A++)p.__h.push(p._sb[A]);p._sb=[]}else do{p.__d=!1,P&&P(t),_=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++T<25);p.state=p.__s,null!=p.getChildContext&&(r=E(E({},r),p.getChildContext())),g&&!f&&null!=p.getSnapshotBeforeUpdate&&(v=p.getSnapshotBeforeUpdate(h,d)),O=_,null!=_&&_.type===N&&null==_.key&&(O=I(_.props.children)),a=L(e,b(O)?O:[O],t,n,r,o,i,l,a,c,s),p.base=t.__e,t.__u&=-161,p.__h.length&&l.push(p),y&&(p.__E=p.__=null)}catch(e){if(t.__v=null,c||null!=i)if(e.then){for(t.__u|=c?160:128;a&&8==a.nodeType&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(M=i.length;M--;)w(i[M]);else t.__e=n.__e,t.__k=n.__k;u.__e(e,t,n)}else null==i&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=j(n.__e,t,n,r,o,i,l,c,s);return(_=u.diffed)&&_(t),128&t.__u?void 0:a}function D(e,t,n){for(var r=0;r<n.length;r++)V(n[r],n[++r],n[++r]);u.__c&&u.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){u.__e(e,t.__v)}}))}function I(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:b(e)?e.map(I):E({},e)}function j(e,t,n,r,o,l,a,c,s){var _,p,f,h,d,v,m,g=n.props,E=t.props,S=t.type;if("svg"==S?o="http://www.w3.org/2000/svg":"math"==S?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=l)for(_=0;_<l.length;_++)if((d=l[_])&&"setAttribute"in d==!!S&&(S?d.localName==S:3==d.nodeType)){e=d,l[_]=null;break}if(null==e){if(null==S)return document.createTextNode(E);e=document.createElementNS(o,S,E.is&&E),c&&(u.__m&&u.__m(t,l),c=!1),l=null}if(null==S)g===E||c&&e.data==E||(e.data=E);else{if(l=l&&i.call(e.childNodes),g=n.props||y,!c&&null!=l)for(g={},_=0;_<e.attributes.length;_++)g[(d=e.attributes[_]).name]=d.value;for(_ in g)if(d=g[_],"children"==_);else if("dangerouslySetInnerHTML"==_)f=d;else if(!(_ in E)){if("value"==_&&"defaultValue"in E||"checked"==_&&"defaultChecked"in E)continue;B(e,_,null,d,o)}for(_ in E)d=E[_],"children"==_?h=d:"dangerouslySetInnerHTML"==_?p=d:"value"==_?v=d:"checked"==_?m=d:c&&"function"!=typeof d||g[_]===d||B(e,_,d,g[_],o);if(p)c||f&&(p.__html==f.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(f&&(e.innerHTML=""),L("template"==t.type?e.content:e,b(h)?h:[h],t,n,r,"foreignObject"==S?"http://www.w3.org/1999/xhtml":o,l,a,l?l[0]:n.__k&&C(n,0),c,s),null!=l)for(_=l.length;_--;)w(l[_]);c||(_="value","progress"==S&&null==v?e.removeAttribute("value"):null!=v&&(v!==e[_]||"progress"==S&&!v||"option"==S&&v!=g[_])&&B(e,_,v,g[_],o),_="checked",null!=m&&m!=e[_]&&B(e,_,m,g[_],o))}return e}function V(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){u.__e(e,n)}}function z(e,t,n){var r,o;if(u.unmount&&u.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||V(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){u.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&z(r[o],t,n||"function"!=typeof e.type);n||w(e.__e),e.__c=e.__=e.__e=void 0}function W(e,t,n){return this.constructor(e,n)}function G(e,t,n){var r,o,l;t==document&&(t=document.documentElement),u.__&&u.__(e,t),r=!1?null:t.__k,o=[],l=[],R(t,e=t.__k=S(N,null,[e]),r||y,y,t.namespaceURI,r?null:t.firstChild?i.call(t.childNodes):null,o,r?r.__e:t.firstChild,false,l),D(o,e,l)}function Y(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach((function(e){e.__e=!0,T(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+v++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}i=m.slice,u={__e:function(e,t,n,r){for(var o,i,u;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),u=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),u=o.__d),u)return o.__E=o}catch(t){e=t}throw e}},l=0,x.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=E({},this.state),"function"==typeof e&&(e=e(E({},n),this.props)),e&&E(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},x.prototype.render=N,a=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,p=/(PointerCapture)$|Capture$/i,f=0,h=F(!1),d=F(!0),v=0;var q=0;function J(e,t,n,r,o,i){t||(t={});var l,a,c=t;if("ref"in c)for(a in c={},t)"ref"==a?l=t[a]:c[a]=t[a];var s={type:e,props:c,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--q,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(a in l)void 0===c[a]&&(c[a]=l[a]);return u.vnode&&u.vnode(s),s}const $=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));let X;const K=new Uint8Array(16);var Z,Q,ee={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function te(e,t,n){if(ee.randomUUID&&!e)return ee.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!X){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");X=crypto.getRandomValues.bind(crypto)}return X(K)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+"-"+$[e[t+4]]+$[e[t+5]]+"-"+$[e[t+6]]+$[e[t+7]]+"-"+$[e[t+8]]+$[e[t+9]]+"-"+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}(r)}e.ParagraphType=void 0,(Z=e.ParagraphType||(e.ParagraphType={})).HEADING1="heading1",Z.HEADING2="heading2",Z.HEADING3="heading3",Z.HEADING4="heading4",Z.HEADING5="heading5",Z.HEADING6="heading6",Z.NORMAL="normal",Z.BULLETS="bullets",e.PhraseType=void 0,(Q=e.PhraseType||(e.PhraseType={})).TEXT="text",Q.ENTITY="entity",Q.CUSTOM="custom";var ne=["metric_name","metric_value","other_metric_value","contribute_ratio","delta_value","ratio_value","trend_desc","dim_value","time_desc","proportion"];function re(e){return"object"==typeof e}function oe(e){return"function"==typeof e}function ie(e){return"number"==typeof e}function ue(e,t){return function(e){return"function"==typeof e}(e)?e:function(){return e||t}}var le=function(e){return"ntv-".concat(e)},ae=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return t?"".concat(e," ").concat(t):e}),"")};function ce(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e))return e.map((function(e){return ce(e)}));var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=ce(e[n]));return t}var se,_e,pe,fe,he={},de={exports:{}};function ve(){return se||(se=1,function(e){function t(e){if(e)return function(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}(e);this._callbacks=new Map}t.prototype.on=function(e,t){const n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){const n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(void 0===e&&void 0===t)return this._callbacks.clear(),this;if(void 0===t)return this._callbacks.delete(e),this;const n=this._callbacks.get(e);if(n){for(const[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}0===n.length?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){const n=this._callbacks.get(e);if(n){const e=[...n];for(const n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(const e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t}(de)),de.exports}var ye=(fe||(fe=1,function(e){!function(e){var t="object"==typeof process&&process.env?process.env:self;e.parser=function(e){return new F(e)},e.CParser=F,e.CStream=R,e.createStream=function(e){return new R(e)},e.MAX_BUFFER_LENGTH=65536,e.DEBUG="debug"===t.CDEBUG,e.INFO="debug"===t.CDEBUG||"info"===t.CDEBUG,e.EVENTS=["value","string","key","openobject","closeobject","openarray","closearray","error","end","ready"];var n,r={textNode:void 0,numberNode:""},o=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e})),i=0;for(var u in e.STATE={BEGIN:i++,VALUE:i++,OPEN_OBJECT:i++,CLOSE_OBJECT:i++,OPEN_ARRAY:i++,CLOSE_ARRAY:i++,TEXT_ESCAPE:i++,STRING:i++,BACKSLASH:i++,END:i++,OPEN_KEY:i++,CLOSE_KEY:i++,TRUE:i++,TRUE2:i++,TRUE3:i++,FALSE:i++,FALSE2:i++,FALSE3:i++,FALSE4:i++,NULL:i++,NULL2:i++,NULL3:i++,NUMBER_DECIMAL_POINT:i++,NUMBER_DIGIT:i++},e.STATE)e.STATE[e.STATE[u]]=u;i=e.STATE;const l=9,a=10,c=13,s=32,_=34,p=43,f=44,h=45,d=46,v=48,y=57,m=58,g=69,b=91,E=92,w=93,S=97,k=98,N=101,x=102,C=108,P=110,T=114,A=115,L=116,O=117,M=123,U=125;function H(e){for(var t in r)e[t]=r[t]}Object.create||(Object.create=function(e){function t(){this.__proto__=e}return t.prototype=e,new t}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t});var B=/[\\"\n]/g;function F(t){if(!(this instanceof F))return new F(t);var n=this;H(n),n.bufferCheckPosition=e.MAX_BUFFER_LENGTH,n.q=n.c=n.p="",n.opt=t||{},n.closed=n.closedRoot=n.sawRoot=!1,n.tag=n.error=null,n.state=i.BEGIN,n.stack=new Array,n.position=n.column=0,n.line=1,n.slashed=!1,n.unicodeI=0,n.unicodeS=null,n.depth=0,D(n,"onready")}F.prototype={end:function(){W(this)},write:function(t){var n=this;if(this.error)throw this.error;if(n.closed)return z(n,"Cannot write after close. Assign an onready handler.");if(null===t)return W(n);var o=0,u=t.charCodeAt(0),l=n.p,c=!1;for(e.DEBUG;u&&(l=u,n.c=u=t.charCodeAt(o++),l!==u?n.p=l:l=n.p,u);)switch(e.DEBUG,c?c=!1:(n.position++,u===a?(n.line++,n.column=0):n.column++),n.state){case i.BEGIN:u===M?n.state=i.OPEN_OBJECT:u===b?n.state=i.OPEN_ARRAY:G(u)||z(n,"Non-whitespace before {[.");continue;case i.OPEN_KEY:case i.OPEN_OBJECT:if(G(u))continue;if(n.state===i.OPEN_KEY)n.stack.push(i.CLOSE_KEY);else{if(u===U){D(n,"onopenobject"),this.depth++,D(n,"oncloseobject"),this.depth--,n.state=n.stack.pop()||i.VALUE;continue}n.stack.push(i.CLOSE_OBJECT)}u===_?n.state=i.STRING:z(n,'Malformed object key should start with "');continue;case i.CLOSE_KEY:case i.CLOSE_OBJECT:if(G(u))continue;n.state,i.CLOSE_KEY,u===m?(n.state===i.CLOSE_OBJECT?(n.stack.push(i.CLOSE_OBJECT),j(n,"onopenobject"),this.depth++):j(n,"onkey"),n.state=i.VALUE):u===U?(I(n,"oncloseobject"),this.depth--,n.state=n.stack.pop()||i.VALUE):u===f?(n.state===i.CLOSE_OBJECT&&n.stack.push(i.CLOSE_OBJECT),j(n),n.state=i.OPEN_KEY):z(n,"Bad object");continue;case i.OPEN_ARRAY:case i.VALUE:if(G(u))continue;if(n.state===i.OPEN_ARRAY){if(D(n,"onopenarray"),this.depth++,n.state=i.VALUE,u===w){D(n,"onclosearray"),this.depth--,n.state=n.stack.pop()||i.VALUE;continue}n.stack.push(i.CLOSE_ARRAY)}u===_?n.state=i.STRING:u===M?n.state=i.OPEN_OBJECT:u===b?n.state=i.OPEN_ARRAY:u===L?n.state=i.TRUE:u===x?n.state=i.FALSE:u===P?n.state=i.NULL:u===h?n.numberNode+="-":v<=u&&u<=y?(n.numberNode+=String.fromCharCode(u),n.state=i.NUMBER_DIGIT):z(n,"Bad value");continue;case i.CLOSE_ARRAY:if(u===f)n.stack.push(i.CLOSE_ARRAY),j(n,"onvalue"),n.state=i.VALUE;else if(u===w)I(n,"onclosearray"),this.depth--,n.state=n.stack.pop()||i.VALUE;else{if(G(u))continue;z(n,"Bad array")}continue;case i.STRING:void 0===n.textNode&&(n.textNode="");var s=o-1,H=n.slashed,F=n.unicodeI;e:for(;;){for(e.DEBUG;F>0;)if(n.unicodeS+=String.fromCharCode(u),u=t.charCodeAt(o++),n.position++,4===F?(n.textNode+=String.fromCharCode(parseInt(n.unicodeS,16)),F=0,s=o-1):F++,!u)break e;if(u===_&&!H){n.state=n.stack.pop()||i.VALUE,n.textNode+=t.substring(s,o-1),n.position+=o-1-s;break}if(u===E&&!H&&(H=!0,n.textNode+=t.substring(s,o-1),n.position+=o-1-s,u=t.charCodeAt(o++),n.position++,!u))break;if(H){if(H=!1,u===P?n.textNode+="\n":u===T?n.textNode+="\r":u===L?n.textNode+="\t":u===x?n.textNode+="\f":u===k?n.textNode+="\b":u===O?(F=1,n.unicodeS=""):n.textNode+=String.fromCharCode(u),u=t.charCodeAt(o++),n.position++,s=o-1,u)continue;break}B.lastIndex=o;var R=B.exec(t);if(null===R){o=t.length+1,n.textNode+=t.substring(s,o-1),n.position+=o-1-s;break}if(o=R.index+1,!(u=t.charCodeAt(R.index))){n.textNode+=t.substring(s,o-1),n.position+=o-1-s;break}}n.slashed=H,n.unicodeI=F;continue;case i.TRUE:u===T?n.state=i.TRUE2:z(n,"Invalid true started with t"+u);continue;case i.TRUE2:u===O?n.state=i.TRUE3:z(n,"Invalid true started with tr"+u);continue;case i.TRUE3:u===N?(D(n,"onvalue",!0),n.state=n.stack.pop()||i.VALUE):z(n,"Invalid true started with tru"+u);continue;case i.FALSE:u===S?n.state=i.FALSE2:z(n,"Invalid false started with f"+u);continue;case i.FALSE2:u===C?n.state=i.FALSE3:z(n,"Invalid false started with fa"+u);continue;case i.FALSE3:u===A?n.state=i.FALSE4:z(n,"Invalid false started with fal"+u);continue;case i.FALSE4:u===N?(D(n,"onvalue",!1),n.state=n.stack.pop()||i.VALUE):z(n,"Invalid false started with fals"+u);continue;case i.NULL:u===O?n.state=i.NULL2:z(n,"Invalid null started with n"+u);continue;case i.NULL2:u===C?n.state=i.NULL3:z(n,"Invalid null started with nu"+u);continue;case i.NULL3:u===C?(D(n,"onvalue",null),n.state=n.stack.pop()||i.VALUE):z(n,"Invalid null started with nul"+u);continue;case i.NUMBER_DECIMAL_POINT:u===d?(n.numberNode+=".",n.state=i.NUMBER_DIGIT):z(n,"Leading zero not followed by .");continue;case i.NUMBER_DIGIT:v<=u&&u<=y?n.numberNode+=String.fromCharCode(u):u===d?(-1!==n.numberNode.indexOf(".")&&z(n,"Invalid number has two dots"),n.numberNode+="."):u===N||u===g?(-1===n.numberNode.indexOf("e")&&-1===n.numberNode.indexOf("E")||z(n,"Invalid number has two exponential"),n.numberNode+="e"):u===p||u===h?(l!==N&&l!==g&&z(n,"Invalid symbol in number"),n.numberNode+=String.fromCharCode(u)):(V(n),o--,c=!0,n.state=n.stack.pop()||i.VALUE);continue;default:z(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){var n=Math.max(e.MAX_BUFFER_LENGTH,10),o=0;for(var i in r){var u=void 0===t[i]?0:t[i].length;u>n&&("text"===i?closeText(t):z(t,"Max buffer length exceeded: "+i)),o=Math.max(o,u)}t.bufferCheckPosition=e.MAX_BUFFER_LENGTH-o+t.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{n=function(){if(pe)return _e;pe=1;var e=ve();function t(){e.call(this)}return t.prototype=new e,_e=t,t.Stream=t,t.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",u),n.on("close",l));var i=!1;function u(){i||(i=!0,e.end())}function l(){i||(i=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(c(),!this.hasListeners("error"))throw e}function c(){n.off("data",r),e.off("drain",o),n.off("end",u),n.off("close",l),n.off("error",a),e.off("error",a),n.off("end",c),n.off("close",c),e.off("end",c),e.off("close",c)}return n.on("error",a),e.on("error",a),n.on("end",c),n.on("close",c),e.on("end",c),e.on("close",c),e.emit("pipe",n),e},_e}().Stream}catch(e){n=function(){}}function R(e){if(!(this instanceof R))return new R(e);this._parser=new F(e),this.writable=!0,this.readable=!0,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.string="";var t=this;n.apply(t),this._parser.onend=function(){t.emit("end")},this._parser.onerror=function(e){t.emit("error",e),t._parser.error=null},o.forEach((function(e){Object.defineProperty(t,"on"+e,{get:function(){return t._parser["on"+e]},set:function(n){if(!n)return t.removeAllListeners(e),t._parser["on"+e]=n,n;t.on(e,n)},enumerable:!0,configurable:!1})}))}function D(t,n,r){e.INFO,t[n]&&t[n](r)}function I(e,t,n){j(e),D(e,t,n)}function j(e,t){var n,r;e.textNode=(n=e.opt,void 0===(r=e.textNode)||(n.trim&&(r=r.trim()),n.normalize&&(r=r.replace(/\s+/g," "))),r),void 0!==e.textNode&&D(e,t||"onvalue",e.textNode),e.textNode=void 0}function V(e){e.numberNode&&D(e,"onvalue",parseFloat(e.numberNode)),e.numberNode=""}function z(e,t){return j(e),t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c,t=new Error(t),e.error=t,D(e,"onerror",t),e}function W(e){return e.state===i.VALUE&&0===e.depth||z(e,"Unexpected end"),j(e),e.c="",e.closed=!0,D(e,"onend"),F.call(e,e.opt),e}function G(e){return e===c||e===a||e===s||e===l}R.prototype=Object.create(n.prototype,{constructor:{value:R}}),R.prototype.write=function(e){e=new Buffer(e);for(var t=0;t<e.length;t++){var n=e[t];if(this.bytes_remaining>0){for(var r=0;r<this.bytes_remaining;r++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+r]=e[r];this.string=this.temp_buffs[this.bytes_in_sequence].toString(),this.bytes_in_sequence=this.bytes_remaining=0,t=t+r-1,this._parser.write(this.string),this.emit("data",this.string)}else if(0===this.bytes_remaining&&n>=128){if(n>=194&&n<=223&&(this.bytes_in_sequence=2),n>=224&&n<=239&&(this.bytes_in_sequence=3),n>=240&&n<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+t>e.length){for(var o=0;o<=e.length-1-t;o++)this.temp_buffs[this.bytes_in_sequence][o]=e[t+o];return this.bytes_remaining=t+this.bytes_in_sequence-e.length,!0}this.string=e.slice(t,t+this.bytes_in_sequence).toString(),t=t+this.bytes_in_sequence-1,this._parser.write(this.string),this.emit("data",this.string)}else{for(var i=t;i<e.length&&!(e[i]>=128);i++);this.string=e.slice(t,i).toString(),this._parser.write(this.string),this.emit("data",this.string),t=i-1}}},R.prototype.end=function(e){return e&&e.length&&this._parser.write(e.toString()),this._parser.end(),!0},R.prototype.on=function(e,t){var r=this;return r._parser["on"+e]||-1===o.indexOf(e)||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),n.prototype.on.call(r,e,t)},R.prototype.destroy=function(){H(this._parser),this.emit("close")}}(e)}(he)),he);function me(e,t,n){if(0===t.length)return Object.assign(e,n),!1;if(1===t.length){var r=t[0];return!(!e||"object"!=typeof e)&&(e[r]=n,!0)}var o=t[0],i=t.slice(1);return!(!e||"object"!=typeof e||!Object.prototype.hasOwnProperty.call(e,o))&&me(e[o],i,n)}function ge(){var e={parser:new ye.CParser,buffer:"",result:{},isComplete:!1,error:void 0,currentValue:null,currentPath:[],wrapperStructure:[]},t=function(){e.parser=new ye.CParser,n()},n=function(){r(),o(),i(),u()},r=function(){e.parser.onopenobject=function(e){l(e)},e.parser.oncloseobject=function(){a()},e.parser.onkey=function(t){e.currentPath.push(t)}},o=function(){e.parser.onopenarray=function(){c()},e.parser.onclosearray=function(){s()}},i=function(){e.parser.onvalue=function(e){_(e)},e.parser.onend=function(){e.isComplete=!0}},u=function(){e.parser.onerror=function(t){e.error=t.message}},l=function(t){var n;e.wrapperStructure.push("object"),me(e.result,e.currentPath,((n={})[t]=void 0,n)),e.currentPath.push(t)},a=function(){e.wrapperStructure.pop();var t=e.currentPath.pop();"array"===e.wrapperStructure[e.wrapperStructure.length-1]&&e.currentPath.push(Number(t)+1)},c=function(){e.wrapperStructure.push("array"),me(e.result,e.currentPath,[]),e.currentPath.push(0)},s=function(){e.wrapperStructure.pop(),e.currentPath.pop(),"array"!==e.wrapperStructure[e.wrapperStructure.length-1]&&e.currentPath.pop()},_=function(t){e.currentValue=t,me(e.result,e.currentPath,e.currentValue);var n=e.currentPath.pop();"array"===e.wrapperStructure[e.wrapperStructure.length-1]&&e.currentPath.push(Number(n)+1)};return t(),{append:function(t){e.buffer+=t;try{e.parser.write(t)}catch(t){e.error=t instanceof Error?t.message:"Unknown error"}},getResult:function(){return{document:e.result,isComplete:e.isComplete,error:e.error,currentPath:e.currentPath}},reset:function(){e={parser:new ye.CParser,buffer:"",result:{},isComplete:!1,error:void 0,currentValue:null,currentPath:[],wrapperStructure:[]},t()},getError:function(){return e.error}}}function be(e){return re(e)&&"customType"in e}function Ee(e){return re(e)&&"customType"in e}function we(e){return re(e)&&"paragraphs"in e&&Array.isArray(null==e?void 0:e.paragraphs)}function Se(t){return re(t)&&(null==t?void 0:t.type)===e.ParagraphType.NORMAL&&Array.isArray(null==t?void 0:t.phrases)}function ke(t){return re(t)&&(null==t?void 0:t.type)===e.ParagraphType.BULLETS&&Array.isArray(null==t?void 0:t.bullets)}function Ne(e){if(re(e)&&"type"in e&&"string"==typeof e.type){var t=Te(null==e?void 0:e.type);return e.type.startsWith("heading")&&!Number.isNaN(t)}return!1}function xe(t){var n;return t.type===e.PhraseType.CUSTOM&&!!(null===(n=null==t?void 0:t.metadata)||void 0===n?void 0:n.customType)}function Ce(t){var n,r;return t.type===e.PhraseType.ENTITY&&!!(null===(n=null==t?void 0:t.metadata)||void 0===n?void 0:n.entityType)&&ne.includes(null===(r=null==t?void 0:t.metadata)||void 0===r?void 0:r.entityType)}function Pe(t){return t.type===e.PhraseType.TEXT}function Te(e){if(null==e?void 0:e.startsWith("heading")){var t=Number(null==e?void 0:e.slice(-1));if(t>=1&&t<=6)return t}return NaN}var Ae={fontFamily:"PingFangSC, sans-serif",borderColor:"rgb(199, 199, 199)",fontSize:14,lineHeight:24,fontSizeMultiples:{h1:2,h2:1.72,h3:1.4,h4:1.15,h5:1.08,h6:1.08},lineHeightMultiples:{h1:1.5,h2:1.3,h3:1.15,h4:1,h5:1,h6:1}},Le={light:{colorBase:"rgba(0, 0, 0, 0.65)",colorEntityBase:"rgba(0, 0, 0, 0.65)",colorHeadingBase:"rgba(0, 0, 0, 0.85)",colorPositive:"#FA541C",colorNegative:"#13A8A8",colorConclusion:"#1F0352",colorDimensionValue:"rgba(0, 0, 0, 0.88)",colorMetricName:"rgba(0, 0, 0, 0.88)",colorMetricValue:"#1677FF",colorOtherValue:"rgba(0, 0, 0, 0.88)",colorProportionShadow:"#CDDDFD",colorProportionFill:"#3471F9",colorLineStroke:"#5B8FF9"},dark:{colorBase:"rgba(255, 255, 255, 0.65)",colorEntityBase:"rgba(255, 255, 255, 0.65)",colorHeadingBase:"rgba(255, 255, 255, 0.85)",colorPositive:"#FA541C",colorNegative:"#13A8A8",colorConclusion:"#D8C3F3",colorDimensionValue:"rgba(255, 255, 255, 0.88)",colorMetricName:"rgba(255, 255, 255, 0.88)",colorMetricValue:"#4B91FF",colorOtherValue:"rgba(255, 255, 255, 0.88)",colorProportionShadow:"#CDDDFD",colorProportionFill:"#3471F9",colorLineStroke:"#5B8FF9"}},Oe=n(n({},Ae),Le.light);function Me(e){var t=e.element,o=e.factoryStyles,i=void 0===o?{}:o;return function(e){var o=e.children,u=e.style,l=e.theme,a=void 0===l?Oe:l,c=e.forwardRef,s=r(e,["children","style","theme","forwardRef"]),_="function"==typeof i?i(a):i,p=n(n({},_),u),f=n(n({},s),{style:p,ref:c});return S(t,f,o)}}function Ue(e){return{fontFamily:e.fontFamily,color:e.colorBase,fontSize:e.fontSize}}var He,Be,Fe,Re,De=function(e){return n(n({},Ue(e)),{paddingLeft:"16px",marginBottom:"4px"})},Ie=Me({element:"div",factoryStyles:De}),je=Me({element:"li",factoryStyles:function(){return{listStyle:"inherit",lineHeight:"1.74"}}}),Ve=Me({element:"ol",factoryStyles:function(e){return n(n({},De(e)),{listStyleType:"decimal"})}}),ze=Me({element:"ul",factoryStyles:function(e){return n(n({},De(e)),{listStyleType:"disc"})}}),We=Me({element:"div",factoryStyles:function(e){return Ue(e)}}),Ge=Me({element:"span",factoryStyles:function(e){return{display:"inline-block",alignItems:"center",boxSizing:"border-box",fontSize:"".concat(e.fontSize,"px"),fontFamily:e.fontFamily,lineHeight:"1.5em",borderRadius:"2px",color:e.colorEntityBase,margin:"0 2px"}}}),Ye=function(e,t){var r={fontFamily:e.fontFamily,color:e.colorHeadingBase},o=e.fontSize,i=e.lineHeight;switch(t){case 1:return n(n({},r),{fontSize:"".concat(e.fontSizeMultiples.h1*o,"px"),lineHeight:"".concat(e.lineHeightMultiples.h1*i,"px"),margin:"26px 0 10px 0"});case 2:return n(n({},r),{fontSize:"".concat(e.fontSizeMultiples.h2*o,"px"),lineHeight:"".concat(e.lineHeightMultiples.h2*i,"px"),margin:"21px 0 5px 0"});case 3:return n(n({},r),{fontSize:"".concat(e.fontSizeMultiples.h3*o,"px"),lineHeight:"".concat(e.lineHeightMultiples.h3*i,"px"),margin:"16px 0 5px 0"});case 4:return n(n({},r),{fontSize:"".concat(e.fontSizeMultiples.h4*o,"px"),lineHeight:"".concat(e.lineHeightMultiples.h4*i,"px"),margin:"10px 0 5px 0"});case 5:return n(n({},r),{fontSize:"".concat(e.fontSizeMultiples.h5*o,"px"),lineHeight:"".concat(e.lineHeightMultiples.h5*i,"px"),margin:"8px 0 5px 0"});case 6:return n(n({},r),{fontSize:"".concat(e.fontSizeMultiples.h6*o,"px"),lineHeight:"".concat(e.lineHeightMultiples.h6*i,"px"),minHeight:"".concat(e.lineHeightMultiples.h6,"px"),letterSpacing:"0.008em",margin:"5px 0 5px 0"});default:return r}},qe=Me({element:"h1",factoryStyles:function(e){return n(n({},Ye(e,1)),{borderBottom:"1px solid ".concat(e.borderColor)})}}),Je=Object.fromEntries([1,2,3,4,5,6].map((function(e){return["H".concat(e),Me({element:"h"+e,factoryStyles:function(t){return Ye(t,e)}})]}))),$e=Je.H1,Xe=Je.H2,Ke=Je.H3,Ze=Je.H4,Qe=Je.H5,et=Je.H6,tt=Me({element:"strong"}),nt=Me({element:"em"}),rt=Me({element:"u"}),ot=Me({element:"p",factoryStyles:function(e){var t=e.lineHeight;return n(n({},Ue(e)),{minHeight:"".concat(t,"px"),lineHeight:"".concat(t,"px"),marginBottom:"4px"})}}),it=Object.freeze({__proto__:null,Bold:tt,Bullet:Ie,Container:We,Entity:Ge,H1:$e,H2:Xe,H3:Ke,H4:Ze,H5:Qe,H6:et,Headline:qe,Italic:nt,Li:je,Ol:Ve,P:ot,Ul:ze,Underline:rt}),ut=0,lt=[],at=u,ct=at.__b,st=at.__r,_t=at.diffed,pt=at.__c,ft=at.unmount,ht=at.__;function dt(e,t){at.__h&&at.__h(Be,e,ut||t),ut=0;var n=Be.__H||(Be.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function vt(e){return ut=1,function(e,t,n){var r=dt(He++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ct(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Be,!Be.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var u=r.__c.props!==e;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(u=!0)}})),i&&i.call(this,e,t,n)||u};Be.__f=!0;var i=Be.shouldComponentUpdate,u=Be.componentWillUpdate;Be.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}u&&u.call(this,e,t,n)},Be.shouldComponentUpdate=o}return r.__N||r.__}(Ct,e)}function yt(e,t){var n=dt(He++,3);!at.__s&&xt(n.__H,t)&&(n.__=e,n.u=t,Be.__H.__h.push(n))}function mt(e){return ut=5,gt((function(){return{current:e}}),[])}function gt(e,t){var n=dt(He++,7);return xt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function bt(e){var t=Be.context[e.__c],n=dt(He++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Be)),t.props.value):e.__}function Et(){for(var e;e=lt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(kt),e.__H.__h.forEach(Nt),e.__H.__h=[]}catch(t){e.__H.__h=[],at.__e(t,e.__v)}}at.__b=function(e){Be=null,ct&&ct(e)},at.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ht&&ht(e,t)},at.__r=function(e){st&&st(e),He=0;var t=(Be=e.__c).__H;t&&(Fe===Be?(t.__h=[],Be.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.forEach(kt),t.__h.forEach(Nt),t.__h=[],He=0)),Fe=Be},at.diffed=function(e){_t&&_t(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==lt.push(t)&&Re===at.requestAnimationFrame||((Re=at.requestAnimationFrame)||St)(Et)),t.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),Fe=Be=null},at.__c=function(e,t){t.some((function(e){try{e.__h.forEach(kt),e.__h=e.__h.filter((function(e){return!e.__||Nt(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],at.__e(n,e.__v)}})),pt&&pt(e,t)},at.unmount=function(e){ft&&ft(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{kt(e)}catch(e){t=e}})),n.__H=void 0,t&&at.__e(t,n.__v))};var wt="function"==typeof requestAnimationFrame;function St(e){var t,n=function(){clearTimeout(r),wt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);wt&&(t=requestAnimationFrame(n))}function kt(e){var t=Be,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Be=t}function Nt(e){var t=Be;e.__c=e.__(),Be=t}function xt(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ct(e,t){return"function"==typeof t?t(e):t}function Pt(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Tt(e,t){this.props=e,this.context=t}(Tt.prototype=new x).isPureReactComponent=!0,Tt.prototype.shouldComponentUpdate=function(e,t){return Pt(this.props,e)||Pt(this.state,t)};var At=u.__b;u.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),At&&At(e)};var Lt=u.__e;u.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Lt(e,t,n,r)};var Ot=u.unmount;function Mt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Mt(e,t,n)}))),e}function Ut(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ut(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ht(){this.__u=0,this.o=null,this.__b=null}function Bt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ft(){this.i=null,this.l=null}u.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ot&&Ot(e)},(Ht.prototype=new x).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=Bt(r.__v),i=!1,u=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=u;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ut(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(u,u)},Ht.prototype.componentWillUnmount=function(){this.o=[]},Ht.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Mt(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&S(N,null,e.fallback);return o&&(o.__u&=-33),[S(N,null,t.__a?null:e.children),o]};var Rt=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(Ft.prototype=new x).__a=function(e){var t=this,n=Bt(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Rt(t,e,r)):o()};n?n(i):i()}},Ft.prototype.render=function(e){this.i=null,this.l=new Map;var t=M(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ft.prototype.componentDidUpdate=Ft.prototype.componentDidMount=function(){var e=this;this.l.forEach((function(t,n){Rt(e,n,t)}))};var Dt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,It=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,jt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Vt=/[A-Z0-9]/g,zt="undefined"!=typeof document,Wt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};x.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(x.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Gt=u.event;function Yt(){}function qt(){return this.cancelBubble}function Jt(){return this.defaultPrevented}u.event=function(e){return Gt&&(e=Gt(e)),e.persist=Yt,e.isPropagationStopped=qt,e.isDefaultPrevented=Jt,e.nativeEvent=e};var $t={enumerable:!1,configurable:!0,get:function(){return this.class}},Xt=u.vnode;u.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var u=t[i];if(!("value"===i&&"defaultValue"in t&&null==u||zt&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===u?u="":"translate"===l&&"no"===u?u=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||Wt(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":jt.test(i)&&(i=l):l=i="oninput":o&&It.test(i)?i=i.replace(Vt,"-$&").toLowerCase():null===u&&(u=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=u}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=M(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=M(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",$t)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Dt,Xt&&Xt(e)};var Kt=u.__r;u.__r=function(e){Kt&&Kt(e),e.__c};var Zt=u.diffed;function Qt(e){var t=e.themeSeedToken,n=void 0===t?Oe:t,r=e.children;return J(en.Provider,{value:n,children:r})}u.diffed=function(e){Zt&&Zt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var en=Y(Oe);function tn(){return bt(en)}var nn=function(e,t,n){void 0===n&&(n="suffix");var r=document.createElement("span"),o=t;r.textContent=o;var i=void 0;return"string"==typeof e||"number"==typeof e?(i=document.createElement("span")).textContent=e.toString():i=e,i&&("suffix"===n?r.appendChild(i):r.insertBefore(i,r.firstChild)),r};var rn=function(){function e(e){this.entities={},this.customPhrases={},this.customBlocks={},e&&this.registerAll(e)}return e.prototype.register=function(e){(function(e){return"isBlock"in e&&e.isBlock})(e)&&(this.customBlocks[e.key]=e),function(e){return"isEntity"in e&&e.isEntity}(e)&&(this.entities[e.key]=e),function(e){return"isEntity"in e&&!e.isEntity}(e)&&(this.customPhrases[e.key]=e)},e.prototype.registerAll=function(e){var t=this;e.forEach((function(e){return t.register(e)}))},e.prototype.getEntityDescriptor=function(e){return this.entities[e]},e.prototype.getCustomPhraseDescriptor=function(e){return this.customPhrases[e]},e.prototype.getBlockDescriptor=function(e){return this.customBlocks[e]},e.prototype.getPhraseDescriptorBySpec=function(e){return xe(e)?this.getCustomPhraseDescriptor(e.metadata.customType):Ce(e)?this.getEntityDescriptor(e.metadata.entityType):null},e}(),on=function(e){return function(t){return n({isEntity:e,getText:function(e){return e}},t)}},un=function(e,t){return function(r,o){void 0===o&&(o="merge");var i=on(!0),u=ce(t);return r&&(u="overwrite"===o?r:function(e,t){var r=n(n({},e),t);return r.style=n(n({},(null==e?void 0:e.style)||{}),(null==t?void 0:t.style)||{}),r}(t,r)),i(n({key:e},u))}},ln=un("metric_name",{style:function(e,t,n){return{fontWeight:500,color:n.colorMetricName}},tooltip:!1}),an=un("metric_value",{style:function(e,t,n){return{color:n.colorMetricValue}},tooltip:{title:function(e,t){return ie(t.origin)?"".concat(t.origin):null}}}),cn=un("delta_value",{classNames:function(e,t){var n=t.assessment;return[le("value-".concat(n))]},getText:fn,render:function(e,t){var n=t.assessment;return nn(pn(n,["-","+"]),e,"prefix")},style:function(e,t,n){return{color:_n(t.assessment,n)}},tooltip:{title:function(e,t){return ie(t.origin)?"".concat(t.origin):null}}}),sn=un("ratio_value",{classNames:function(e,t){var n=t.assessment;return[le("value-".concat(n))]},getText:fn,render:function(e,t){var n=pn(t.assessment,[hn("up"),hn("down")]);return nn(n,e,"prefix")},style:function(e,t,n){return{color:_n(t.assessment,n)}},tooltip:{title:function(e,t){return ie(t.origin)?"".concat(t.origin):null}}});function _n(e,t){var n;return"positive"===e&&(n=t.colorPositive),"negative"===e&&(n=t.colorNegative),n}function pn(e,t){var n=t[0],r=t[1],o=null;return"negative"===e&&(o=n),"positive"===e&&(o=r),o}function fn(e,t){return"".concat("negative"===(null==t?void 0:t.assessment)?"-":"").concat(e)}function hn(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("width","8px"),t.setAttribute("height","9px"),t.setAttribute("viewBox","0 0 8 9"),t.style.marginRight="".concat(1,"px"),t.setAttribute("version","1.1");var n=document.createElementNS("http://www.w3.org/2000/svg","g");n.setAttribute("transform","translate(-2.000000, -2.000000)");var r=document.createElementNS("http://www.w3.org/2000/svg","polygon");r.setAttribute("fill","currentColor");var o="down"===e?"6 2 9.5 11 2.5 11":"6 11 9.5 2 2.5 2";return r.setAttribute("points",o),n.appendChild(r),t.appendChild(n),t}var dn=un("other_metric_value",{style:function(e,t,n){return{fontWeight:"bold",color:n.colorOtherValue}},tooltip:{title:function(e,t){return ie(t.origin)?"".concat(t.origin):null}}}),vn=un("contribute_ratio",{style:function(e,t,n){return{color:n.colorConclusion}},tooltip:{title:function(e,t){return ie(t.origin)?"".concat(t.origin):null}}}),yn=un("dim_value",{style:function(e,t,n){return{color:n.colorDimensionValue}},tooltip:!1});function mn(e,t){var n;return window.getComputedStyle?window.getComputedStyle(e,null)[t]:null===(n=null==e?void 0:e.currentStyle)||void 0===n?void 0:n[t]}function gn(e){return null==e?void 0:e.endsWith("px")}function bn(e){var t=e.replace(/px$/,""),n=Number(t);if(!Number.isNaN(n))return n}var En=function(){var e=mt(null),t=vt(14),o=t[0],i=t[1];!function(e,t){var n=dt(He++,4);!at.__s&&xt(n.__H,t)&&(n.__=e,n.u=t,Be.__h.push(n))}((function(){e.current&&i(function(e,t){var n="font-size",r=mn(e,n);if(r&&gn(r)&&(o=bn(r)))return o;var o,i=mn(window.document.body,n);return i&&gn(i)&&(o=bn(i))?o:t}(e.current,14))}),[]);return[function(t){var o=t.children,i=r(t,["children"]);return J("svg",n({style:{margin:"0px 4px",transform:"translate(0px, 0.125em)"},ref:e},i,{children:o}))},o]},wn=function(e,t){return function(n){var r=e[0],o=e[1],i=t[0],u=t[1];return i===u?(o-r)/2:n/(u-i)*(o-r)}},Sn=function(){function e(e,t){this.data=[],this.size=14,this.height=this.size,this.width=this.getWidth(),this.points=[],this.size=e,this.data=t,this.compute()}return e.prototype.getWidth=function(){var e;return Math.max(2*this.size,2*(null===(e=this.data)||void 0===e?void 0:e.length))},e.prototype.compute=function(){var e,t=this;if(this.data){this.height=this.size,this.width=this.getWidth(),this.xScale=wn([0,this.width],[0,(null===(e=this.data)||void 0===e?void 0:e.length)-1]);var n=[Math.min.apply(Math,this.data),Math.max.apply(Math,this.data)],r=n[0],o=n[1];this.yScale=wn([2,this.height-2],[r,o]),this.points=this.data.map((function(e,n){var r,o;return[null===(r=t.xScale)||void 0===r?void 0:r.call(t,n),t.height-(null===(o=t.yScale)||void 0===o?void 0:o.call(t,e))]}))}},e.prototype.getLinePath=function(){var e;if(!(null===(e=this.data)||void 0===e?void 0:e.length)||!this.xScale||!this.yScale)return null;var t=this.points.reduce((function(e,t,n){var r=t[0],o=t[1];return 0===n?"M".concat(r," ").concat(o):"".concat(e," L ").concat(r," ").concat(o)}),"");return t},e.prototype.getPolygonPath=function(){var e;if(!(null===(e=this.data)||void 0===e?void 0:e.length)||!this.xScale||!this.yScale)return null;var t=o([],this.points,!0),n=this.points[this.points.length-1];t.push([n[0],this.height]),t.push([0,this.height]);var r=this.points[0];t.push(r);var i=t.reduce((function(e,t){var n=t[0],r=t[1];return"".concat(e," ").concat(n,",").concat(r)}),"");return i},e.prototype.getContainer=function(){return[this.width,this.height]},e}(),kn="wsc-line-fill",Nn="#5B8FF9",xn=function(e){var t=e.data,n=En(),r=n[0],o=function(e,t){var n=vt(new Sn(e,t)),r=n[0],o=n[1];return yt((function(){o(new Sn(e,t))}),[e,t]),{width:r.getContainer()[0],height:r.getContainer()[1],linePath:r.getLinePath(),polygonPath:r.getPolygonPath()}}(n[1],t),i=o.width,u=o.height,l=o.linePath,a=o.polygonPath;return J(r,{height:u,width:i,children:[J("defs",{children:J("linearGradient",{id:kn,x1:"50%",x2:"50%",y1:"0%",y2:"122.389541%",children:[J("stop",{offset:"0%","stop-color":Nn}),J("stop",{offset:"100%","stop-color":"#FFFFFF",stopOpacity:"0"})]})}),l&&J("path",{d:l,stroke:Nn,fill:"transparent"}),a&&J("polygon",{points:a,fill:"url(#".concat(kn,")")})]})};function Cn(e,t){var n=e/2,r=e/2,o=e/2,i=2*function(e){return"number"!=typeof e?0:e>1?1:e<0?0:e}(t)*Math.PI,u=n+o*Math.sin(i),l=r-o*Math.cos(i);return"\n M".concat(n," ").concat(0,"\n A ").concat(n," ").concat(r," 0 ").concat(i>Math.PI?1:0," 1 ").concat(u," ").concat(l,"\n L ").concat(n," ").concat(r," Z\n ")}var Pn="#3471F9",Tn=function(e){var t=e.data,n=En(),r=n[0],o=n[1],i=o/2;return J(r,{width:o,height:o,children:[J("circle",{cx:i,cy:i,r:i,fill:"#CDDDFD"}),t>=1?J("circle",{cx:i,cy:i,r:i,fill:Pn}):J("path",{d:Cn(o,t),fill:Pn})]})},An=un("proportion",{render:function(e,t){var n=t.origin,r=document.createElement("span");return G(S(Tn,{data:On(e,n)}),r),nn(r,e,"suffix")},tooltip:{title:function(e,t){return ie(t.origin)?"".concat(t.origin):null}}}),Ln=function(e){return Number.isNaN(e)};function On(e,t){if(t&&!Ln(t))return t;if(null==e?void 0:e.endsWith("%")){var n=null==e?void 0:e.replace(/%$/,"");if(!Ln(Number(n)))return Number(n)/100}return NaN}var Mn=un("time_desc",{style:function(e,t,n){return{color:n.colorDimensionValue}},tooltip:!1}),Un=un("trend_desc",{render:function(e,t){var n=t.detail,r=document.createElement("span");return G(S(xn,{data:n}),r),nn(r,e,"suffix")},style:function(e,t,n){return{color:n.colorConclusion}},tooltip:!1}),Hn=[ln(),an(),cn(),s