@hpcc-js/react
Version:
hpcc-js - Viz React
43 lines (42 loc) • 37.6 kB
JavaScript
var t=Object.defineProperty,e=(e,n)=>t(e,"name",{value:n,configurable:!0});import{Utility as n,Palette as i,HTMLWidget as o,SVGWidget as r}from"@hpcc-js/common";const l="@hpcc-js/react",_="3.4.14",a="3.21.4";var s,c,u,h,f,d,p,g,m,x,y,v,k,F,b={},C=[],w=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function $(t,e){for(var n in e)t[n]=e[n];return t}function R(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function W(t,e,n){var i,o,r,l={};for(r in e)"key"==r?i=e[r]:"ref"==r?o=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===l[r]&&(l[r]=t.defaultProps[r]);return P(t,l,i,o,null)}function P(t,e,n,i,o){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=c.vnode&&c.vnode(r),r}function H(t){return t.children}function O(t,e){this.props=t,this.context=e}function A(t,e){if(null==e)return t.__?A(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?A(t):null}function T(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,i=[],o=[],r=$({},e);r.__v=e.__v+1,c.vnode&&c.vnode(r),q(t.__P,r,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,i,null==n?A(e):n,!!(32&e.__u),o),r.__v=e.__v,r.__.__k[r.__i]=r,X(i,r,o),e.__e=e.__=null,r.__e!=n&&D(r)}}function D(t){if(null!=(t=t.__)&&null!=t.__c)return t.__e=t.__c.base=null,t.__k.some(function(e){if(null!=e&&null!=e.__e)return t.__e=t.__c.base=e.__e}),D(t)}function N(t){(!t.__d&&(t.__d=!0)&&h.push(t)&&!U.__r++||f!=c.debounceRendering)&&((f=c.debounceRendering)||d)(U)}function U(){try{for(var t,e=1;h.length;)h.length>e&&h.sort(p),t=h.shift(),e=h.length,T(t)}finally{h.length=U.__r=0}}function z(t,e,n,i,o,r,l,_,a,s,c){var u,h,f,d,p,g,m,x=i&&i.__k||C,y=e.length;for(a=E(n,e,x,a,y),u=0;u<y;u++)null!=(f=n.__k[u])&&(h=-1!=f.__i&&x[f.__i]||b,f.__i=u,g=q(t,f,h,o,r,l,_,a,s,c),d=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Z(h.ref,null,f),c.push(f.ref,f.__c||d,f)),null==p&&null!=d&&(p=d),(m=!!(4&f.__u))||h.__k===f.__k?(a=L(f,a,t,m),m&&h.__e&&(h.__e=null)):"function"==typeof f.type&&void 0!==g?a=g:d&&(a=d.nextSibling),f.__u&=-7);return n.__e=p,a}function E(t,e,n,i,o){var r,l,_,a,s,c=n.length,u=c,h=0;for(t.__k=new Array(o),r=0;r<o;r++)null!=(l=e[r])&&"boolean"!=typeof l&&"function"!=typeof l?("string"==typeof l||"number"==typeof l||"bigint"==typeof l||l.constructor==String?l=t.__k[r]=P(null,l,null,null,null):S(l)?l=t.__k[r]=P(H,{children:l},null,null,null):void 0===l.constructor&&l.__b>0?l=t.__k[r]=P(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):t.__k[r]=l,a=r+h,l.__=t,l.__b=t.__b+1,_=null,-1!=(s=l.__i=V(l,n,a,u))&&(u--,(_=n[s])&&(_.__u|=2)),null==_||null==_.__v?(-1==s&&(o>c?h--:o<c&&h++),"function"!=typeof l.type&&(l.__u|=4)):s!=a&&(s==a-1?h--:s==a+1?h++:(s>a?h--:h++,l.__u|=4))):t.__k[r]=null;if(u)for(r=0;r<c;r++)null!=(_=n[r])&&!(2&_.__u)&&(_.__e==i&&(i=A(_)),K(_,_));return i}function L(t,e,n,i){var o,r;if("function"==typeof t.type){for(o=t.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=t,e=L(o[r],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=A(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function I(t,e){return e=e||[],null==t||"boolean"==typeof t||(S(t)?t.some(function(t){I(t,e)}):e.push(t)),e}function V(t,e,n,i){var o,r,l,_=t.key,a=t.type,s=e[n],c=null!=s&&!(2&s.__u);if(null===s&&null==_||c&&_==s.key&&a==s.type)return n;if(i>(c?1:0))for(o=n-1,r=n+1;o>=0||r<e.length;)if(null!=(s=e[l=o>=0?o--:r++])&&!(2&s.__u)&&_==s.key&&a==s.type)return l;return-1}function M(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||w.test(e)?n:n+"px"}function B(t,e,n,i,o){var r,l;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||M(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||M(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])r=e!=(e=e.replace(y,"$1")),l=e.toLowerCase(),e=l in t||"onFocusOut"==e||"onFocusIn"==e?l.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n[x]=i[x]:(n[x]=v,t.addEventListener(e,r?F:k,r)):t.removeEventListener(e,r?F:k,r);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(_){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function j(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e[m])e[m]=v++;else if(e[m]<n[x])return;return n(c.event?c.event(e):e)}}}function q(t,e,n,i,o,r,l,_,a,s){var u,h,f,d,p,g,m,x,y,v,k,F,b,w,W,P=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(a=!!(32&n.__u),r=[_=e.__e=n.__e]),(u=c.__b)&&u(e);t:if("function"==typeof P)try{if(x=e.props,y=P.prototype&&P.prototype.render,v=(u=P.contextType)&&i[u.__c],k=u?v?v.props.value:u.__:i,n.__c?m=(h=e.__c=n.__c).__=h.__E:(y?e.__c=h=new P(x,k):(e.__c=h=new O(x,k),h.constructor=P,h.render=Q),v&&v.sub(h),h.state||(h.state={}),h.__n=i,f=h.__d=!0,h.__h=[],h._sb=[]),y&&null==h.__s&&(h.__s=h.state),y&&null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=$({},h.__s)),$(h.__s,P.getDerivedStateFromProps(x,h.__s))),d=h.props,p=h.state,h.__v=e,f)y&&null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),y&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(y&&null==P.getDerivedStateFromProps&&x!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(x,k),e.__v==n.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(x,h.__s,k)){e.__v!=n.__v&&(h.props=x,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(t){t&&(t.__=e)}),C.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&l.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(x,h.__s,k),y&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(d,p,g)})}if(h.context=k,h.props=x,h.__P=t,h.__e=!1,F=c.__r,b=0,y)h.state=h.__s,h.__d=!1,F&&F(e),u=h.render(h.props,h.state,h.context),C.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,F&&F(e),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++b<25);h.state=h.__s,null!=h.getChildContext&&(i=$($({},i),h.getChildContext())),y&&!f&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(d,p)),w=null!=u&&u.type===H&&null==u.key?Y(u.props.children):u,_=z(t,S(w)?w:[w],e,n,i,o,r,l,_,a,s),h.base=e.__e,e.__u&=-161,h.__h.length&&l.push(h),m&&(h.__E=h.__=null)}catch(A){if(e.__v=null,a||null!=r)if(A.then){for(e.__u|=a?160:128;_&&8==_.nodeType&&_.nextSibling;)_=_.nextSibling;r[r.indexOf(_)]=null,e.__e=_}else{for(W=r.length;W--;)R(r[W]);G(e)}else e.__e=n.__e,e.__k=n.__k,A.then||G(e);c.__e(A,e,n)}else null==r&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):_=e.__e=J(n.__e,e,n,i,o,r,l,a,s);return(u=c.diffed)&&u(e),128&e.__u?void 0:_}function G(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(G))}function X(t,e,n){for(var i=0;i<n.length;i++)Z(n[i],n[++i],n[++i]);c.__c&&c.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(n){c.__e(n,e.__v)}})}function Y(t){return"object"!=typeof t||null==t||t.__b>0?t:S(t)?t.map(Y):$({},t)}function J(t,e,n,i,o,r,l,_,a){var u,h,f,d,p,g,m,x=n.props||b,y=e.props,v=e.type;if("svg"==v?o="http://www.w3.org/2000/svg":"math"==v?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=r)for(u=0;u<r.length;u++)if((p=r[u])&&"setAttribute"in p==!!v&&(v?p.localName==v:3==p.nodeType)){t=p,r[u]=null;break}if(null==t){if(null==v)return document.createTextNode(y);t=document.createElementNS(o,v,y.is&&y),_&&(c.__m&&c.__m(e,r),_=!1),r=null}if(null==v)x===y||_&&t.data==y||(t.data=y);else{if(r=r&&s.call(t.childNodes),!_&&null!=r)for(x={},u=0;u<t.attributes.length;u++)x[(p=t.attributes[u]).name]=p.value;for(u in x)p=x[u],"dangerouslySetInnerHTML"==u?f=p:"children"==u||u in y||"value"==u&&"defaultValue"in y||"checked"==u&&"defaultChecked"in y||B(t,u,null,p,o);for(u in y)p=y[u],"children"==u?d=p:"dangerouslySetInnerHTML"==u?h=p:"value"==u?g=p:"checked"==u?m=p:_&&"function"!=typeof p||x[u]===p||B(t,u,p,x[u],o);if(h)_||f&&(h.__html==f.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(f&&(t.innerHTML=""),z("template"==e.type?t.content:t,S(d)?d:[d],e,n,i,"foreignObject"==v?"http://www.w3.org/1999/xhtml":o,r,l,r?r[0]:n.__k&&A(n,0),_,a),null!=r)for(u=r.length;u--;)R(r[u]);_||(u="value","progress"==v&&null==g?t.removeAttribute("value"):null!=g&&(g!==t[u]||"progress"==v&&!g||"option"==v&&g!=x[u])&&B(t,u,g,x[u],o),u="checked",null!=m&&m!=t[u]&&B(t,u,m,x[u],o))}return t}function Z(t,e,n){try{if("function"==typeof t){var i="function"==typeof t.__u;i&&t.__u(),i&&null==e||(t.__u=t(e))}else t.current=e}catch(o){c.__e(o,n)}}function K(t,e,n){var i,o;if(c.unmount&&c.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||Z(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(r){c.__e(r,e)}i.base=i.__P=null}if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&K(i[o],e,n||"function"!=typeof t.type);n||R(t.__e),t.__c=t.__=t.__e=void 0}function Q(t,e,n){return this.constructor(t,n)}function tt(t,e,n){var i,o,r,l;e==document&&(e=document.documentElement),c.__&&c.__(t,e),o=(i="function"==typeof n)?null:n&&n.__k||e.__k,r=[],l=[],q(e,t=(!i&&n||e).__k=W(H,null,[t]),o||b,b,e.namespaceURI,!i&&n?[n]:o?null:e.firstChild?s.call(e.childNodes):null,r,!i&&n?n:o?o.__e:e.firstChild,i,l),X(r,t,l)}e($,"m$1"),e(R,"b"),e(W,"k$1"),e(P,"x"),e(H,"S"),e(O,"C$1"),e(A,"$"),e(T,"I"),e(D,"P$1"),e(N,"A"),e(U,"H$1"),e(z,"L"),e(E,"T$2"),e(L,"j$2"),e(I,"F"),e(V,"O$1"),e(M,"z$1"),e(B,"N"),e(j,"V$1"),e(q,"q$2"),e(G,"B$2"),e(X,"D$1"),e(Y,"E$1"),e(J,"G$1"),e(Z,"J$1"),e(K,"K$1"),e(Q,"Q$1"),e(tt,"R"),s=C.slice,c={__e:/* @__PURE__ */e(function(t,e,n,i){for(var o,r,l;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),l=o.__d),l)return o.__E=o}catch(_){t=_}throw t},"__e")},u=0,O.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=$({},this.state),"function"==typeof t&&(t=t($({},n),this.props)),t&&$(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),N(this))},O.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),N(this))},O.prototype.render=H,h=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p=/* @__PURE__ */e(function(t,e){return t.__v.__b-e.__v.__b},"e$1"),U.__r=0,g=Math.random().toString(8),m="__d"+g,x="__a"+g,y=/(PointerCapture)$|Capture$/i,v=0,k=j(!1),F=j(!0);var et=0;function nt(t,e,n,i,o,r){e||(e={});var l,_,a=e;if("ref"in a)for(_ in a={},e)"ref"==_?l=e[_]:a[_]=e[_];var s={type:t,props:a,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--et,__i:-1,__u:0,__source:o,__self:r};if("function"==typeof t&&(l=t.defaultProps))for(_ in l)void 0===a[_]&&(a[_]=l[_]);return c.vnode&&c.vnode(s),s}e(nt,"u$1");var it,ot,rt,lt,_t=0,at=[],st=c,ct=st.__b,ut=st.__r,ht=st.diffed,ft=st.__c,dt=st.unmount,pt=st.__;function gt(t,e){st.__h&&st.__h(ot,t,_t||e),_t=0;var n=ot.__H||(ot.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function mt(t){return _t=1,xt(Wt,t)}function xt(t,n,i){var o=gt(it++,2);if(o.t=t,!o.__c&&(o.__=[i?i(n):Wt(void 0,n),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=ot,!ot.__f)){var r=/* @__PURE__ */e(function(t,e,n){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter(function(t){return t.__c});if(i.every(function(t){return!t.__N}))return!l||l.call(this,t,e,n);var r=o.__c.props!==t;return i.some(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(r=!0)}}),l&&l.call(this,t,e,n)||r},"f");ot.__f=!0;var l=ot.shouldComponentUpdate,_=ot.componentWillUpdate;ot.componentWillUpdate=function(t,e,n){if(this.__e){var i=l;l=void 0,r(t,e,n),l=i}_&&_.call(this,t,e,n)},ot.shouldComponentUpdate=r}return o.__N||o.__}function yt(t,e){var n=gt(it++,3);!st.__s&&Rt(n.__H,e)&&(n.__=t,n.u=e,ot.__H.__h.push(n))}function vt(t,e){var n=gt(it++,4);!st.__s&&Rt(n.__H,e)&&(n.__=t,n.u=e,ot.__h.push(n))}function kt(t,e){var n=gt(it++,7);return Rt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ft(t,e){return _t=8,kt(function(){return t},e)}function bt(){for(var t;t=at.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(St),e.__h.some($t),e.__h=[]}catch(n){e.__h=[],st.__e(n,t.__v)}}}e(gt,"p"),e(mt,"d"),e(xt,"h"),e(yt,"y"),e(vt,"_"),e(kt,"T$1"),e(Ft,"q$1"),e(bt,"j$1"),st.__b=function(t){ot=null,ct&&ct(t)},st.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),pt&&pt(t,e)},st.__r=function(t){ut&&ut(t),it=0;var e=(ot=t.__c).__H;e&&(rt===ot?(e.__h=[],ot.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(St),e.__h.some($t),e.__h=[],it=0)),rt=ot},st.diffed=function(t){ht&&ht(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==at.push(e)&<===st.requestAnimationFrame||((lt=st.requestAnimationFrame)||wt)(bt)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),rt=ot=null},st.__c=function(t,e){e.some(function(t){try{t.__h.some(St),t.__h=t.__h.filter(function(t){return!t.__||$t(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],st.__e(n,t.__v)}}),ft&&ft(t,e)},st.unmount=function(t){dt&&dt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(t){try{St(t)}catch(n){e=n}}),n.__H=void 0,e&&st.__e(e,n.__v))};var Ct="function"==typeof requestAnimationFrame;function wt(t){var n,i=/* @__PURE__ */e(function(){clearTimeout(o),Ct&&cancelAnimationFrame(n),setTimeout(t)},"r"),o=setTimeout(i,35);Ct&&(n=requestAnimationFrame(i))}function St(t){var e=ot,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),ot=e}function $t(t){var e=ot;t.__c=t.__(),ot=e}function Rt(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function Wt(t,e){return"function"==typeof e?e(t):e}function Pt(t,e){for(var n in e)t[n]=e[n];return t}function Ht(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function Ot(t,e){this.props=t,this.context=e}e(wt,"w"),e(St,"z"),e($t,"B$1"),e(Rt,"C"),e(Wt,"D"),e(Pt,"g"),e(Ht,"E"),e(Ot,"M"),(Ot.prototype=new O).isPureReactComponent=!0,Ot.prototype.shouldComponentUpdate=function(t,e){return Ht(this.props,t)||Ht(this.state,e)};var At=c.__b;c.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),At&&At(t)};var Tt=c.__e;c.__e=function(t,e,n,i){if(t.then)for(var o,r=e;r=r.__;)if((o=r.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);Tt(t,e,n,i)};var Dt=c.unmount;function Nt(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=Pt({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return Nt(t,e,n)})),t}function Ut(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return Ut(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function zt(){this.__u=0,this.o=null,this.__b=null}function Et(t){var e=t.__&&t.__.__c;return e&&e.__a&&e.__a(t)}function Lt(){this.i=null,this.l=null}e(Nt,"V"),e(Ut,"W"),e(zt,"P"),e(Et,"j"),e(Lt,"B"),c.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Dt&&Dt(t)},(zt.prototype=new O).__c=function(t,n){var i=n.__c,o=this;null==o.o&&(o.o=[]),o.o.push(i);var r=Et(o.__v),l=!1,_=/* @__PURE__ */e(function(){l||o.__z||(l=!0,i.__R=null,r?r(s):s())},"i");i.__R=_;var a=i.__P;i.__P=null;var s=/* @__PURE__ */e(function(){if(! --o.__u){if(o.state.__a){var t=o.state.__a;o.__v.__k[0]=Ut(t,t.__c.__P,t.__c.__O)}var e;for(o.setState({__a:o.__b=null});e=o.o.pop();)e.__P=a,e.forceUpdate()}},"c");o.__u++||32&n.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(_,_)},zt.prototype.componentWillUnmount=function(){this.o=[]},zt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Nt(this.__b,n,i.__O=i.__P)}this.__b=null}var o=e.__a&&W(H,null,t.fallback);return o&&(o.__u&=-33),[W(H,null,e.__a?null:t.children),o]};var It=/* @__PURE__ */e(function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}},"H");(Lt.prototype=new O).__a=function(t){var n=this,i=Et(n.__v),o=n.l.get(t);return o[0]++,function(r){var l=/* @__PURE__ */e(function(){n.props.revealOrder?(o.push(r),It(n,t,o)):r()},"o");i?i(l):l()}},Lt.prototype.render=function(t){this.i=null,this.l=/* @__PURE__ */new Map;var e=I(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Lt.prototype.componentDidUpdate=Lt.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){It(t,n,e)})};var Vt="undefined"!=typeof Symbol&&Symbol.for&&/* @__PURE__ */Symbol.for("react.element")||60103,Mt=/^(?: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]/,Bt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,jt=/[A-Z0-9]/g,qt="undefined"!=typeof document,Gt=/* @__PURE__ */e(function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof/* @__PURE__ */Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)},"X");O.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(O.prototype,t,{configurable:!0,get:/* @__PURE__ */e(function(){return this["UNSAFE_"+t]},"get"),set:/* @__PURE__ */e(function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})},"set")})});var Xt=c.event;c.event=function(t){return Xt&&(t=Xt(t)),t.persist=function(){},t.isPropagationStopped=function(){return this.cancelBubble},t.isDefaultPrevented=function(){return this.defaultPrevented},t.nativeEvent=t};var Yt={configurable:!0,get:/* @__PURE__ */e(function(){return this.class},"get")},Jt=c.vnode;c.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={},o=-1==n.indexOf("-");for(var r in e){var l=e[r];if(!("value"===r&&"defaultValue"in e&&null==l||qt&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var _=r.toLowerCase();"defaultValue"===r&&"value"in e&&null==e.value?r="value":"download"===r&&!0===l?l="":"translate"===_&&"no"===l?l=!1:"o"===_[0]&&"n"===_[1]?"ondoubleclick"===_?r="ondblclick":"onchange"!==_||"input"!==n&&"textarea"!==n||Gt(e.type)?"onfocus"===_?r="onfocusin":"onblur"===_?r="onfocusout":Bt.test(r)&&(r=_):_=r="oninput":o&&Mt.test(r)?r=r.replace(jt,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===_&&i[r=_]&&(r="oninputCapture"),i[r]=l}}"select"==n&&(i.multiple&&Array.isArray(i.value)&&(i.value=I(e.children).forEach(function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)})),null!=i.defaultValue&&(i.value=I(e.children).forEach(function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value}))),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",Yt)):e.className&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=Vt,Jt&&Jt(t)};var Zt=c.__r;c.__r=function(t){Zt&&Zt(t),t.__c};var Kt=c.diffed;function Qt(t){return!!t.__k&&(tt(null,t),!0)}c.diffed=function(t){Kt&&Kt(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)},e(Qt,"pn");const te=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,Component:O,Fragment:H,createElement:W,h:W,render:tt,unmountComponentAtNode:Qt,useCallback:Ft,useEffect:yt,useLayoutEffect:vt,useMemo:kt,useReducer:xt,useState:mt},Symbol.toStringTag,{value:"Module"})),ee=/* @__PURE__ */e(({href:t,x:e,y:n=0,height:i=12})=>/* @__PURE__ */nt("image",{xlinkHref:t,x:e-i/2,y:n-i/2,width:i,height:i}),"Image"),ne=/* @__PURE__ */e(({x:t,y:e=0,height:i=12,fill:o,stroke:r,fontFamily:l="FontAwesome",char:_="",fontWeight:a})=>{const s=kt(()=>"FontAwesome"===l?n.faChar(_):_,[_,l]);/* @__PURE__ */
return nt("text",{x:t,y:e,fill:o,stroke:r,fontFamily:l,fontSize:`${i}px`,fontWeight:a,dominantBaseline:"middle",style:{textAnchor:"middle",alignmentBaseline:"middle"},children:s})},"ImageChar"),ie=/* @__PURE__ */e(({radius:t=32,fill:e="navy",stroke:n=e,strokeWidth:i=1,shapeRendering:o})=>/* @__PURE__ */nt("circle",{r:t,fill:e,stroke:n,strokeWidth:i,shapeRendering:o}),"Circle"),oe=/* @__PURE__ */e(({radius:t=30,cornerRadius:e=0,fill:n="white",stroke:i,strokeWidth:o=1,shapeRendering:r})=>/* @__PURE__ */nt("rect",{x:-t,y:-t,rx:e,ry:e,width:2*t,height:2*t,fill:n,stroke:i||n,strokeWidth:o,shapeRendering:r}),"Square"),re=/* @__PURE__ */e(({width:t=30,height:e=30,cornerRadius:n=0,fill:i="white",stroke:o="black",strokeWidth:r=1,shapeRendering:l})=>/* @__PURE__ */nt("rect",{x:-t/2,y:-e/2,rx:n,ry:n,width:t,height:e,fill:i,stroke:o||i,strokeWidth:r,shapeRendering:l}),"Rectangle"),le=/* @__PURE__ */e(({shape:t="circle",height:e=128,width:n,fill:i,stroke:o,strokeWidth:r=1,shapeRendering:l,cornerRadius:_})=>{switch(t){case"square":/* @__PURE__ */
return nt(oe,{radius:e/2,fill:i,stroke:o,strokeWidth:r,shapeRendering:l,cornerRadius:_});case"rectangle":/* @__PURE__ */
return nt(re,{width:n??e,height:e,fill:i,stroke:o,strokeWidth:r,shapeRendering:l,cornerRadius:_});default:/* @__PURE__ */
return nt(ie,{radius:e/2,fill:i,stroke:o,strokeWidth:r,shapeRendering:l})}},"Shape"),_e=/* @__PURE__ */e(({shape:t="circle",width:e,height:n=32,fill:o,stroke:r,strokeWidth:l=0,imageUrl:_="",imageFontFamily:a="FontAwesome",imageChar:s="",imageCharFill:c=i.textColor(o),padding:u=n/5,xOffset:h=0,yOffset:f=0,cornerRadius:d,shapeRendering:p})=>/* @__PURE__ */nt(H,{children:[
/* @__PURE__ */nt(le,{shape:t,width:e,height:n,fill:o,stroke:r,strokeWidth:l,shapeRendering:p,cornerRadius:d}),_?/* @__PURE__ */nt(ee,{href:_,x:h,y:f,height:n-u}):/* @__PURE__ */nt(ne,{x:h,y:f,height:n-u,fontFamily:a,char:s,fill:c,fontWeight:400})]}),"Icon"),ae=/* @__PURE__ */e(({icons:t=[]})=>/* @__PURE__ */nt(H,{children:t.map(t=>/* @__PURE__ */nt("g",{id:t.id,children:/* @__PURE__ */nt(_e,{...t})},t.id))}),"Icons"),se=/* @__PURE__ */e(({text:t,height:e=12,anchor:n="middle",baseline:i="middle",fontFamily:o="Verdana",fill:r="black"})=>/* @__PURE__ */nt("text",{"font-family":o,"font-size":`${e}px`,"text-anchor":n,"dominant-baseline":i,fill:r,children:t}),"TextLine"),ce=/* @__PURE__ */e(({text:t,height:e=12,fontFamily:i="Verdana",fill:o="black",onSizeUpdate:r})=>{const[l,_]=mt(0),[a,s]=mt(0);yt(()=>{r&&r({width:l,height:a})},[l,a,r]);const c=kt(()=>t.split("\n"),[t]);vt(()=>{const t=n.textSize(c,i,e);_(t.width),s(t.height)},[i,e,c]);/* @__PURE__ */
return nt("g",{children:kt(()=>{const t=-a/2+e/2;return c.map((n,r)=>/* @__PURE__ */nt("g",{transform:`translate(0 ${t+r*(e+2)})`,children:/* @__PURE__ */nt(se,{text:n,height:e,fontFamily:i,fill:o})},`key-${r}`))},[c,a,e,i,o])})},"Text"),ue=/* @__PURE__ */e(({text:t,height:e=12,fontFamily:n="Verdana",padding:i=4,fill:o="whitesmoke",stroke:r="lightgray",textFill:l="black",strokeWidth:_=1,cornerRadius:a=0,onSizeUpdate:s})=>{const[c,u]=mt(0),[h,f]=mt(0);yt(()=>{s&&s({width:c,height:h})},[c,h,s]);const d=Ft(t=>{u(t.width),f(t.height)},[]),p=c+2*i+_,g=h+2*i+_,m=Math.floor(e/10);/* @__PURE__ */
return nt(H,{children:[
/* @__PURE__ */nt(re,{width:p,height:g,fill:o,stroke:r,strokeWidth:_,cornerRadius:a}),
/* @__PURE__ */nt("g",{transform:`translate(0 ${m})`,children:/* @__PURE__ */nt(ce,{text:t,fontFamily:n,height:e,fill:l,onSizeUpdate:d})})]})},"TextBox"),he=/* @__PURE__ */e(({text:t,height:e=12,width:i=12,fontFamily:o="Verdana",fontSize:r=10,padding:l=3,fill:_="whitesmoke",stroke:a="lightgray",textFill:s="black",strokeWidth:c=1,cornerRadius:u=0,onSizeUpdate:h})=>{const[f,d]=mt(i),[p,g]=mt(e);return vt(()=>{const e=n.textSize(t,o,r);d(e.width+2*l),g(e.height+2*l)},[t,o,r,l]),vt(()=>{h&&h({width:f,height:p})},[f,p,l,h]),/* @__PURE__ */nt(H,{children:[
/* @__PURE__ */nt(re,{width:i,height:e,fill:_,stroke:a,strokeWidth:c,cornerRadius:u}),
/* @__PURE__ */nt("g",{transform:`translate(${-i/2+l} ${-e/2+l})`,children:/* @__PURE__ */nt(se,{text:t,fontFamily:o,height:r,fill:s,anchor:"start",baseline:"hanging"})})]})},"LabelledRect"),fe=/* @__PURE__ */e(({icon:t,iconFontFamily:e,text:n,height:i=12,width:o=12,fontFamily:r="Verdana",fontSize:l=10,padding:_=3,fill:a="whitesmoke",stroke:s="lightgray",textFill:c="black",strokeWidth:u=1,cornerRadius:h=0})=>/* @__PURE__ */nt(H,{children:[
/* @__PURE__ */nt(re,{width:o,height:i,fill:a,stroke:s,strokeWidth:u,cornerRadius:h}),
/* @__PURE__ */nt("g",{transform:`translate(${-o/2+_} ${-i/2+_})`,children:/* @__PURE__ */nt(_e,{shape:"square",imageFontFamily:e,imageChar:t,height:i,fill:a,imageCharFill:c})}),
/* @__PURE__ */nt("g",{transform:`translate(${-o/2+2*_+i} ${-i/2+_})`,children:/* @__PURE__ */nt(se,{text:n,fontFamily:r,height:l,fill:c,anchor:"start",baseline:"hanging"})})]}),"IconLabelledRect"),de=/* @__PURE__ */e(({label:t,labelPos:e,labelFill:n="black",labelHeight:i=12,path:o,stroke:r,strokeWidth:l,strokeDasharray:_})=>/* @__PURE__ */nt(H,{children:[
/* @__PURE__ */nt("path",{d:o,stroke:r,style:{strokeWidth:l,strokeDasharray:_}}),t&&e&&2===e.length?/* @__PURE__ */nt("g",{transform:`translate(${e[0]} ${e[1]})`,children:/* @__PURE__ */nt(ce,{text:t,fill:n,height:i})}):void 0]}),"Edge");function pe(t,e,n,i){tt(W(t,e),n,i)}function ge(t,e,n,i){tt(W("svg",null,W(t,e)),n,i)}e(pe,"render"),e(ge,"svgRender");const me=class _HTMLAdapter extends o{constructor(t){super(),this._component=t}_component;props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)}update(t,e){super.update(t,e),pe(this._component,this._props,t)}};e(me,"HTMLAdapter");let xe=me;xe.prototype._class+=" react_HTMLAdapter",xe.prototype.publish("props",{},"object","Properties");const ye=class _SVGAdapter extends r{constructor(t){super(),this._component=t}_component;props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)}update(t,e){super.update(t,e),pe(this._component,this._props,t)}};e(ye,"SVGAdapter");let ve=ye;ve.prototype._class+=" react_SVGAdapter",ve.prototype.publish("props",{},"object","Properties");const ke=/* @__PURE__ */e(({text:t})=>/* @__PURE__ */nt("span",{children:t}),"Span"),Fe=/* @__PURE__ */e(({x:t,y:e,annotationIDs:n=[],stepSize:i=-16})=>/* @__PURE__ */nt(H,{children:n.map((n,o)=>/* @__PURE__ */nt("g",{transform:`translate(${t+o*i} ${e})`,children:/* @__PURE__ */nt("use",{xlinkHref:"#"+n})},n))}),"Annotations"),be=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:n=12,textPadding:i=4,icon:o={},annotationsHeight:r=12,annotationIDs:l=[],textFill:_,textboxFill:a,textboxStroke:s,textFontFamily:c,onSizeUpdate:u,showLabel:h=!0,scale:f=1})=>{o={imageChar:"fa-question",height:32,fill:"transparent",...o};const[d,p]=mt(0),[g,m]=mt(0);yt(()=>{u&&u({width:0,height:0})},[d,g,u]);let x=d;x+=4;let y=-(2*o.height/6+n+8)/2;const v=o.height/3+g/2+i;let k=o.height/3+g+i+r/3;h||(y+=(n+8)/2,k-=g+i);const F=Ft(t=>{p(t.width),m(t.height)},[]),b=h?/* @__PURE__ */nt("g",{transform:`translate(0 ${v})`,children:/* @__PURE__ */nt(ue,{text:e,height:n,padding:i,onSizeUpdate:F,textFill:_,fill:a,stroke:s,fontFamily:c})}):void 0;/* @__PURE__ */
return nt("g",t?{transform:`translate(0 ${y}) scale(${f})`,children:[
/* @__PURE__ */nt("use",{xlinkHref:"#"+t}),b,
/* @__PURE__ */nt(Fe,{x:x/2,y:k,annotationIDs:l})]}:{transform:`translate(0 ${y}) scale(${f})`,children:[
/* @__PURE__ */nt(_e,{...o}),b]})},"Vertex"),Ce=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:i=12,textPadding:o=4,icon:r={},textFill:l="black",textboxFill:_="white",textboxStroke:a="black",textFontFamily:s,annotationsHeight:c=12,annotationIDs:u=[]})=>{r={imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square",...r};const h=i+2*o,{width:f}=kt(()=>n.textSize(e,s,i,!1),[e,s,i]),d=c,p=h/2,g=-(2*r.height/6+i+8)/2,m=-r.height/2,x=Math.ceil(f/2+o),y=p-r.height/2,v=d/2,k=p;return t?/* @__PURE__ */nt("g",{transform:`translate(0 ${g})`,children:[
/* @__PURE__ */nt("g",{transform:`translate(${m} 0)`,children:/* @__PURE__ */nt("use",{xlinkHref:"#"+t})}),
/* @__PURE__ */nt("g",{transform:`translate(${x} ${y})`,children:/* @__PURE__ */nt(ue,{text:e,height:i,padding:o,strokeWidth:1,stroke:a,fill:_,textFill:l,fontFamily:s})}),
/* @__PURE__ */nt(Fe,{x:v,y:k,annotationIDs:u,stepSize:d})]}):/* @__PURE__ */nt(H,{children:[
/* @__PURE__ */nt("g",{transform:`translate(${m} 0)scale(1.0002)`,children:/* @__PURE__ */nt(_e,{...r,shape:"square"})}),
/* @__PURE__ */nt("g",{transform:`translate(${x} ${y})scale(1.0002)`,children:/* @__PURE__ */nt(ue,{text:e,height:i,padding:o,stroke:a,fill:_})})]})},"Vertex2"),we=/* @__PURE__ */e(({text:t="",textHeight:e=10,textPadding:i=4,textFill:o="#287EC4",textboxFill:r="white",textboxStroke:l="#CCCCCC",textboxStrokeWidth:_=1,textFontFamily:a="Verdana",annotationGutter:s=2,annotations:c=[],cornerRadius:u=3,icon:h={},subText:f={text:""},showLabel:d=!0,noLabelRadius:p=5,expansionIcon:g,scale:m=1})=>{h={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...h},f={text:"",fill:"white",textFill:"#555555",...f},g=g?{height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0,...g}:void 0;let x=0;const y=kt(()=>n.textSize(t,a,e,!1).width,[t,a,e]);let v=0;""!==t&&(v=y+2*i+2*_),x+=v+s;const k=x-v/2,F=e+2*i+2*_,b=[];c.forEach((t,e)=>{const n=t.imageChar;x+=F+s;const i=x-F/2;b.push(
/* @__PURE__ */nt("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:`translate(${i} 0)`,children:/* @__PURE__ */nt(_e,{...t,shape:"square",height:F,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:u,strokeWidth:0})},e))}),c.length>0&&(x+=s*(c.length-1));const C=/* @__PURE__ */nt("g",{"data-click":"text",transform:`translate(${k} 0)`,children:d&&""!==t?/* @__PURE__ */nt(ue,{text:t,height:e,padding:i,strokeWidth:_,stroke:l,fill:r,textFill:o,fontFamily:a,cornerRadius:u}):/* @__PURE__ */nt("circle",{r:p,stroke:l,fill:o})}),w=h.height||20,S=h.strokeWidth||0;let $=0;let R=F+2*s;""!==t||b.length>0?$=-w/2-S-F/2-2*s:""!==f.text&&(R=w/2+S+2*s);const W=""===f.text?null:/* @__PURE__ */nt("g",{"data-click":"subtext",transform:`translate(0 ${R})`,children:/* @__PURE__ */nt(ue,{fill:f.fill||"#FFFFFF",textFill:f.textFill||o,...f,height:e,padding:i,strokeWidth:0,stroke:l,fontFamily:a,cornerRadius:u})});/* @__PURE__ */
return nt("g",{transform:`scale(${m})`,children:[
/* @__PURE__ */nt("g",{"data-click":"icon",transform:`translate(0 ${$})`,children:[
/* @__PURE__ */nt(_e,{...h}),g&&/* @__PURE__ */nt("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(g),transform:`translate(${(h.height+S)/2-g.height/2} ${-(h.height+S)/2+g.height/2})`,children:/* @__PURE__ */nt(_e,{...g})})]}),
/* @__PURE__ */nt("g",{transform:`translate(${-x/2} 0)`,children:[C,b]}),W]})},"Vertex3"),Se=/* @__PURE__ */e(function({id:t,categoryID:e="",text:n="",textHeight:i=12,textPadding:o=10,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],cornerRadius:h,icon:f={},subText:d={},expansionIcon:p,scale:g=1}){f={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...f},d={text:"",fill:"transparent",textFill:"#555555",...d};/* @__PURE__ */
return nt(we,{...{id:t,categoryID:e,text:n,textHeight:i,textPadding:o,textFill:r,textboxFill:l,textboxStroke:_,textboxStrokeWidth:a,textFontFamily:s,annotationGutter:c,annotations:u,cornerRadius:h,icon:f,subText:d,expansionIcon:p,scale:g},icon:f,subText:d})},"CentroidVertex3"),$e=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:i=10,textPadding:o=4,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],iconAnnotations:h=[],cornerRadius:f=3,icon:d={},subText:p={},showLabel:g=!0,noLabelRadius:m=5,iconBorderWidth:x=1,iconBorderColor:y="#333",iconBackgroundColor:v="#fff",iconFontColor:k="#000",iconFontSize:F=20,iconFontFamily:b="FontAwesome",shapeOffsetX:C=0,shapeOffsetY:w=0,iconOffsetX:S=0,iconOffsetY:$=0,iconPadding:R=4,iconText:W="?",shapeRendering:P="auto"})=>{d={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...d},p={text:"",fill:"white",textFill:"#555555",...p};const H=kt(()=>n.textSize(e,s,i,!1).width,[e,s,i]);let O=0;""!==e&&(O=H+2*o+2*a);let A=O+c;const T=A-O/2,D=i+2*c+2*a,N=u.map(t=>n.textSize(t.imageChar,t.imageFontFamily,t.height,!1).width),U=[];let z=A;u.forEach((t,e)=>{const n=t.imageChar,i=t.height??D;z+=N[e]+c;const o=z-N[e]/2;U.push(
/* @__PURE__ */nt("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:`translate(${o} 0)`,children:/* @__PURE__ */nt(_e,{...t,shape:"rectangle",width:N[e],height:i,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:f,strokeWidth:0})},e))}),u.length>0&&(A+=c*(u.length-1));const E=[];h.forEach((t,e)=>{const n=t.shapeOffsetX,i=t.shapeOffsetY;E.push(
/* @__PURE__ */nt("g",{className:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(t),transform:`translate(${n} ${i})`,children:/* @__PURE__ */nt(_e,{...t,shape:t.shape??"square",imageChar:t.imageChar,imageFontFamily:t.imageFontFamily,cornerRadius:f,stroke:t.stroke,strokeWidth:t.strokeWidth})},e))});const L=/* @__PURE__ */nt("g",{"data-click":"text",transform:`translate(${T} 0)`,children:g&&""!==e?/* @__PURE__ */nt(ue,{text:e,height:i,padding:o,strokeWidth:a,stroke:_,fill:l,textFill:r,fontFamily:s,cornerRadius:f}):/* @__PURE__ */nt("circle",{r:m,stroke:_,fill:r})}),I=D+2*c,V=""===p.text?null:/* @__PURE__ */nt("g",{"data-click":"subtext",transform:`translate(0 ${I})`,children:/* @__PURE__ */nt(ue,{fill:p.fill||"#FFFFFF",textFill:p.textFill||r,...p,height:i,padding:o,strokeWidth:0,stroke:_,fontFamily:s,cornerRadius:f})});/* @__PURE__ */
return nt("g",{children:[
/* @__PURE__ */nt("g",{"data-click":"icon",transform:`translate(${C} ${w})`,children:[
/* @__PURE__ */nt(_e,{...d,strokeWidth:x,shape:"circle",height:F,fill:v,stroke:y,imageFontFamily:b,imageChar:W,imageCharFill:k,padding:R,xOffset:S,yOffset:$,cornerRadius:f,shapeRendering:P}),E]}),
/* @__PURE__ */nt("g",{transform:`translate(${-A/2} 0)`,children:[L,U]}),V]})},"Vertex4"),Re=/* @__PURE__ */e(function({id:t,categoryID:e="",text:n="",textHeight:i=12,textPadding:o=10,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],iconAnnotations:h=[],cornerRadius:f,icon:d={},subText:p={},showLabel:g=!0,noLabelRadius:m=5,iconBorderWidth:x=1,iconBorderColor:y="#333",iconBackgroundColor:v="#fff",iconFontColor:k="#000",iconFontSize:F=20,iconFontFamily:b="FontAwesome",shapeOffsetX:C=0,shapeOffsetY:w=0,iconOffsetX:S=0,iconOffsetY:$=0,iconPadding:R=4,iconText:W="?",shapeRendering:P="auto"}){d={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...d},p={text:"",fill:"transparent",textFill:"#555555",...p};/* @__PURE__ */
return nt($e,{...{id:t,categoryID:e,text:n,textHeight:i,textPadding:o,textFill:r,textboxFill:l,textboxStroke:_,textboxStrokeWidth:a,textFontFamily:s,annotationGutter:c,annotations:u,iconAnnotations:h,cornerRadius:f,icon:d,subText:p,showLabel:g,noLabelRadius:m,iconBorderWidth:x,iconBorderColor:y,iconBackgroundColor:v,iconFontColor:k,iconFontSize:F,iconFontFamily:b,shapeOffsetX:C,shapeOffsetY:w,iconOffsetX:S,iconOffsetY:$,iconPadding:R,iconText:W,shapeRendering:P},icon:d,subText:p})},"CentroidVertex4"),We=/* @__PURE__ */e(({text:t,width:e=100,height:i=100,fill:o="transparent",stroke:r="black",fontHeight:l=12,fontFamily:_})=>{const a=n.textSize(t,_,l,!1);/* @__PURE__ */
return nt(H,{children:[
/* @__PURE__ */nt(re,{width:e,height:i,fill:o,stroke:r}),
/* @__PURE__ */nt("g",{transform:`translate(${(-e+a.width)/2+4} ${(-i+a.height)/2+4})`,children:/* @__PURE__ */nt(ce,{height:l,text:t,fontFamily:_})})]})},"Subgraph");export{Fe as Annotations,a as BUILD_VERSION,Se as CentroidVertex3,Re as CentroidVertex4,ie as Circle,de as Edge,xe as HTMLAdapter,_e as Icon,fe as IconLabelledRect,ae as Icons,ee as Image,ne as ImageChar,he as LabelledRect,l as PKG_NAME,_ as PKG_VERSION,te as React,re as Rectangle,ve as SVGAdapter,le as Shape,ke as Span,oe as Square,We as Subgraph,ce as Text,ue as TextBox,se as TextLine,be as Vertex,Ce as Vertex2,we as Vertex3,$e as Vertex4,pe as render,ge as svgRender};
//# sourceMappingURL=index.js.map