@daoyi/nmtl-ui 1.1.43-beta.32 → 1.1.43-beta.33

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.
@@ -13,4 +13,4 @@ object-assign
13
13
  (c) Sindre Sorhus
14
14
  @license MIT
15
15
  */
16
- var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,u=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))o.call(n,c)&&(u[c]=n[c]);if(r){a=r(n);for(var s=0;s<a.length;s++)i.call(n,a[s])&&(u[a[s]]=n[a[s]])}}return u}},function(t,e,n){(t.exports=n(5)(!1)).push([t.i,".font-size-changer {\n display: inline-block; }\n .font-size-changer .font-size-changer-buttons > div {\n float: left;\n border: 1px solid;\n text-align: center;\n line-height: 40px;\n -webkit-box-sizing: border-box;\n /* Safari/Chrome, other WebKit */\n -moz-box-sizing: border-box;\n /* Firefox, other Gecko */\n box-sizing: border-box;\n -webkit-touch-callout: none;\n /* iOS Safari */\n -webkit-user-select: none;\n /* Safari */\n -khtml-user-select: none;\n /* Konqueror HTML */\n -moz-user-select: none;\n /* Firefox */\n -ms-user-select: none;\n /* Internet Explorer/Edge */\n user-select: none;\n /* Non-prefixed version, currently\r\n supported by Chrome and Opera */ }\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),i=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){var r={},o=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}((function(){return window&&document&&document.all&&!window.atob})),i=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var r=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),a=null,u=0,l=[],c=n(7);function s(t,e){for(var n=0;n<t.length;n++){var o=t[n],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(v(o.parts[a],e))}else{var u=[];for(a=0;a<o.parts.length;a++)u.push(v(o.parts[a],e));r[o.id]={id:o.id,refs:1,parts:u}}}}function f(t,e){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],u={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(u):n.push(r[a]={id:a,parts:[u]})}return n}function h(t,e){var n=i(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(t.insertAt.before,n);n.insertBefore(e,o)}}function p(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function d(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=n.nc;r&&(t.attrs.nonce=r)}return y(e,t.attrs),h(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function v(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var l=u++;n=a||(a=d(e)),r=m.bind(null,n,l,!1),o=m.bind(null,n,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=c(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(a),u&&URL.revokeObjectURL(u)}.bind(null,n,e),o=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=d(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){p(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return s(n,e),function(t){for(var o=[],i=0;i<n.length;i++){var a=n[i];(u=r[a.id]).refs--,o.push(u)}for(t&&s(f(t,e),e),i=0;i<o.length;i++){var u;if(0===(u=o[i]).refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete r[u.id]}}}};var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=g(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(t,e,n){n.r(e);var r=n(0),o=n.n(r),i="up",a="down";function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var h=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?f(t):e}(this,c(e).call(this))).onClick=t.onClick.bind(f(f(t))),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,r.Component),function(t,e,n){e&&l(t.prototype,e),n&&l(t,n)}(e,[{key:"onClick",value:function(){(0,this.props.onClick)()}},{key:"getDefaultButtonContent",value:function(){var t=this.props.direction===i?"36px":"20px";return o.a.createElement("span",{style:{fontSize:t}},"A")}},{key:"render",value:function(){var t=this.props.direction,e=this.props,n=e.style,r=void 0===n?{}:n,i=e.customButton,a=void 0===i?this.getDefaultButtonContent():i;return o.a.createElement("div",{className:"font-size-".concat(t),style:r,onClick:this.onClick},a)}}]),e}();function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n(1);var m=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?g(t):e}(this,y(e).call(this))).handleChange.bind(g(g(t))),t.setChangeDirection.bind(g(g(t))),t.state={options:{stepSize:2,range:3},changeCount:0,changeDirection:null},t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(e,r.Component),function(t,e,n){e&&d(t.prototype,e),n&&d(t,n)}(e,[{key:"handleChange",value:function(t,e,n){this.props.onChange&&(0,this.props.onChange)(t,e,n)}},{key:"componentDidMount",value:function(){var t=this.props.options;this.setState({options:Object.assign({},this.state.options,t)})}},{key:"getFontSizeDetails",value:function(t){var e=parseFloat(t);return{value:e,unit:t.toString().replace(e.toString(),"")}}},{key:"applyFontSize",value:function(t){var e=this.state.options.stepSize,n=this.state.changeDirection===i?e:-1*e,r=window.getComputedStyle(t,null).getPropertyValue("font-size"),o=this.getFontSizeDetails(r).value,a=o+n;t.style.fontSize=a+"px",a!==o&&this.handleChange(t,a,o)}},{key:"iterateChildren",value:function(t){if(this.applyFontSize(t),t.children&&0!==t.children.length){var e=!0,n=!1,r=void 0;try{for(var o,i=t.children[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;this.iterateChildren(a)}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}}},{key:"updateChangeCount",value:function(){var t=this.state,e=t.changeCount,n=t.changeDirection===i?1:-1;this.setState({changeCount:e+n})}},{key:"iterateElementsAndApplyFontSizeChange",value:function(){var t=this.props.targets,e=!0,n=!1,r=void 0;try{for(var o,i=t[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value,u=document.querySelectorAll(a),l=!0,c=!1,s=void 0;try{for(var f,h=u[Symbol.iterator]();!(l=(f=h.next()).done);l=!0){var p=f.value;this.iterateChildren(p)}}catch(t){c=!0,s=t}finally{try{l||null==h.return||h.return()}finally{if(c)throw s}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}this.updateChangeCount()}},{key:"validateChangePerRange",value:function(){var t=this.state,e=t.changeCount,n=t.changeDirection,r=this.state.options.range,o=!0;return n===i&&e>=r&&(o=!1),n===a&&e<=-1*r&&(o=!1),o}},{key:"initFontSizeChange",value:function(){this.validateChangePerRange()&&this.iterateElementsAndApplyFontSizeChange()}},{key:"setChangeDirection",value:function(t,e){var n=t?i:a;this.setState({changeDirection:n},e)}},{key:"onFontSizeUp",value:function(){this.setChangeDirection(!0,this.initFontSizeChange)}},{key:"onFontSizeDown",value:function(){this.setChangeDirection(!1,this.initFontSizeChange)}},{key:"getFontSizeChangerStyle",value:function(t){var e=t.style,n=void 0===e?{}:e,r=t.verticalAlignment,o=void 0!==r&&r,i=t.buttonsMargin,a=void 0===i?4:i,u=this.getFontSizeDetails(n.width||"40px"),l=this.getFontSizeDetails(n.height||"40px");return{width:(!1===o?2*u.value+a:u.value)+u.unit,height:(!1===o?l.value:2*l.value+a)+l.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(t,e){var n=e.style,r=void 0===n?{}:n,o=e.verticalAlignment,u=void 0!==o&&o,l=e.reverseOrder,c=void 0!==l&&l,s=e.buttonsMargin,f=void 0===s?4:s,h=this.getFontSizeDetails(r.width||"40px"),p=this.getFontSizeDetails(r.height||"40px"),d={width:h.value+h.unit,height:p.value+p.unit},y=f+(!1===u?h.unit:p.unit);return(t===i&&!1===c||t===a&&!0===c)&&(!1===u?d.marginRight=y:d.marginBottom=y),Object.assign({},r,d)}},{key:"render",value:function(){var t=this.props.customButtons,e=void 0===t?{}:t,n=e.up,r=e.down,u=this.getFontSizeChangerStyle(e),l=this.getFontSizeChangerButtonStyle(i,e),c=this.getFontSizeChangerButtonStyle(a,e);return o.a.createElement("div",{className:"font-size-changer",style:u},o.a.createElement("div",{className:"font-size-changer-buttons",style:u},o.a.createElement(h,{direction:i,customButton:n,onClick:this.onFontSizeUp.bind(this),style:l}),o.a.createElement(h,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:c})))}}]),e}();e.default=m}])})),rt=h(nt);function ot(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}1===(J=ot).length&&(K=J,J=function(t,e){return ot(K(t),e)});var it={value:function(){}};function at(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ut(r)}function ut(t){this._=t}function lt(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ct(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function st(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=it,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ut.prototype=at.prototype={constructor:ut,on:function(t,e){var n,r=this._,o=lt(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<a;)if(n=(t=o[i]).type)r[n]=st(r[n],t.name,e);else if(null==e)for(n in r)r[n]=st(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=ct(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ut(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};var ft="http://www.w3.org/1999/xhtml",ht={svg:"http://www.w3.org/2000/svg",xhtml:ft,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pt(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ht.hasOwnProperty(e)?{space:ht[e],local:t}:t}function dt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ft&&e.documentElement.namespaceURI===ft?e.createElement(t):e.createElementNS(n,t)}}function yt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function vt(t){var e=pt(t);return(e.local?yt:dt)(e)}function gt(){}function mt(t){return null==t?gt:function(){return this.querySelector(t)}}function wt(){return[]}function bt(t){return null==t?wt:function(){return this.querySelectorAll(t)}}function _t(t){return function(){return this.matches(t)}}function xt(t){return new Array(t.length)}function kt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}kt.prototype={constructor:kt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Et(t,e,n,r,o,i){for(var a,u=0,l=e.length,c=i.length;u<c;++u)(a=e[u])?(a.__data__=i[u],r[u]=a):n[u]=new kt(t,i[u]);for(;u<l;++u)(a=e[u])&&(o[u]=a)}function St(t,e,n,r,o,i,a){var u,l,c,s={},f=e.length,h=i.length,p=new Array(f);for(u=0;u<f;++u)(l=e[u])&&(p[u]=c="$"+a.call(l,l.__data__,u,e),c in s?o[u]=l:s[c]=l);for(u=0;u<h;++u)(l=s[c="$"+a.call(t,i[u],u,i)])?(r[u]=l,l.__data__=i[u],s[c]=null):n[u]=new kt(t,i[u]);for(u=0;u<f;++u)(l=e[u])&&s[p[u]]===l&&(o[u]=l)}function Nt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function At(t){return function(){this.removeAttribute(t)}}function Pt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ct(t,e){return function(){this.setAttribute(t,e)}}function Ot(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function jt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function zt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Tt(t){return function(){this.style.removeProperty(t)}}function Rt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ft(t,e){return t.style.getPropertyValue(e)||zt(t).getComputedStyle(t,null).getPropertyValue(e)}function Lt(t){return function(){delete this[t]}}function It(t,e){return function(){this[t]=e}}function qt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Bt(t){return t.trim().split(/^|\s+/)}function $t(t){return t.classList||new Ut(t)}function Ut(t){this._node=t,this._names=Bt(t.getAttribute("class")||"")}function Ht(t,e){for(var n=$t(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function Gt(t,e){for(var n=$t(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function Vt(t){return function(){Ht(this,t)}}function Wt(t){return function(){Gt(this,t)}}function Xt(t,e){return function(){(e.apply(this,arguments)?Ht:Gt)(this,t)}}function Yt(){this.textContent=""}function Jt(t){return function(){this.textContent=t}}function Kt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qt(){this.innerHTML=""}function Zt(t){return function(){this.innerHTML=t}}function te(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ee(){this.nextSibling&&this.parentNode.appendChild(this)}function ne(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function re(){return null}function oe(){var t=this.parentNode;t&&t.removeChild(this)}function ie(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ae(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Ut.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ue={},le=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ue={mouseenter:"mouseover",mouseleave:"mouseout"}));function ce(t,e,n){return t=se(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function se(t,e,n){return function(r){var o=le;le=r;try{t.call(this,this.__data__,e,n)}finally{le=o}}}function fe(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function he(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function pe(t,e,n){var r=ue.hasOwnProperty(t.type)?ce:se;return function(o,i,a){var u,l=this.__on,c=r(e,i,a);if(l)for(var s=0,f=l.length;s<f;++s)if((u=l[s]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=e);this.addEventListener(t.type,c,n),u={type:t.type,name:t.name,value:e,listener:c,capture:n},l?l.push(u):this.__on=[u]}}function de(t,e,n,r){var o=le;t.sourceEvent=le,le=t;try{return e.apply(n,r)}finally{le=o}}function ye(t,e,n){var r=zt(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function ve(t,e){return function(){return ye(this,t,e)}}function ge(t,e){return function(){return ye(this,t,e.apply(this,arguments))}}var me=[null];function we(t,e){this._groups=t,this._parents=e}function be(){return new we([[document.documentElement]],me)}function _e(t){return"string"==typeof t?new we([[document.querySelector(t)]],[document.documentElement]):new we([[t]],me)}function xe(){for(var t,e=le;t=e.sourceEvent;)e=t;return e}function ke(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function Ee(t){var e=xe();return e.changedTouches&&(e=e.changedTouches[0]),ke(t,e)}function Se(t,e,n){arguments.length<3&&(n=e,e=xe().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return ke(t,r);return null}function Ne(){le.stopImmediatePropagation()}function Ae(){le.preventDefault(),le.stopImmediatePropagation()}function Pe(t){var e=t.document.documentElement,n=_e(t).on("dragstart.drag",Ae,!0);"onselectstart"in e?n.on("selectstart.drag",Ae,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ce(t){return function(){return t}}function Oe(t,e,n,r,o,i,a,u,l,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=u,this.dy=l,this._=c}function Me(){return!le.ctrlKey&&!le.button}function je(){return this.parentNode}function ze(t){return null==t?{x:le.x,y:le.y}:t}function Te(){return navigator.maxTouchPoints||"ontouchstart"in this}function Re(){var t,e,n,r,o=Me,i=je,a=ze,u=Te,l={},c=at("start","drag","end"),s=0,f=0;function h(t){t.on("mousedown.drag",p).filter(u).on("touchstart.drag",v).on("touchmove.drag",g).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&o.apply(this,arguments)){var a=w("mouse",i.apply(this,arguments),Ee,this,arguments);a&&(_e(le.view).on("mousemove.drag",d,!0).on("mouseup.drag",y,!0),Pe(le.view),Ne(),n=!1,t=le.clientX,e=le.clientY,a("start"))}}function d(){if(Ae(),!n){var r=le.clientX-t,o=le.clientY-e;n=r*r+o*o>f}l.mouse("drag")}function y(){_e(le.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=_e(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ae,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(le.view,n),Ae(),l.mouse("end")}function v(){if(o.apply(this,arguments)){var t,e,n=le.changedTouches,r=i.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=w(n[t].identifier,r,Se,this,arguments))&&(Ne(),e("start"))}}function g(){var t,e,n=le.changedTouches,r=n.length;for(t=0;t<r;++t)(e=l[n[t].identifier])&&(Ae(),e("drag"))}function m(){var t,e,n=le.changedTouches,o=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(e=l[n[t].identifier])&&(Ne(),e("end"))}function w(t,e,n,r,o){var i,u,f,p=n(e,t),d=c.copy();if(de(new Oe(h,"beforestart",i,t,s,p[0],p[1],0,0,d),(function(){return null!=(le.subject=i=a.apply(r,o))&&(u=i.x-p[0]||0,f=i.y-p[1]||0,!0)})))return function a(c){var y,v=p;switch(c){case"start":l[t]=a,y=s++;break;case"end":delete l[t],--s;case"drag":p=n(e,t),y=s}de(new Oe(h,c,i,t,y,p[0]+u,p[1]+f,p[0]-v[0],p[1]-v[1],d),d.apply,d,[c,r,o])}}return h.filter=function(t){return arguments.length?(o="function"==typeof t?t:Ce(!!t),h):o},h.container=function(t){return arguments.length?(i="function"==typeof t?t:Ce(t),h):i},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:Ce(t),h):a},h.touchable=function(t){return arguments.length?(u="function"==typeof t?t:Ce(!!t),h):u},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h}function De(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Fe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Le(){}we.prototype=be.prototype={constructor:we,select:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a,u=e[o],l=u.length,c=r[o]=new Array(l),s=0;s<l;++s)(i=u[s])&&(a=t.call(i,i.__data__,s,u))&&("__data__"in i&&(a.__data__=i.__data__),c[s]=a);return new we(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=bt(t));for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,u=e[i],l=u.length,c=0;c<l;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),o.push(a));return new we(r,o)},filter:function(t){"function"!=typeof t&&(t=_t(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],u=a.length,l=r[o]=[],c=0;c<u;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&l.push(i);return new we(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var n=e?St:Et,r=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var i=o.length,a=new Array(i),u=new Array(i),l=new Array(i),c=0;c<i;++c){var s=r[c],f=o[c],h=f.length,p=t.call(s,s&&s.__data__,c,r),d=p.length,y=u[c]=new Array(d),v=a[c]=new Array(d);n(s,f,y,v,l[c]=new Array(h),p,e);for(var g,m,w=0,b=0;w<d;++w)if(g=y[w]){for(w>=b&&(b=w+1);!(m=v[b])&&++b<d;);g._next=m||null}}return(a=new we(a,r))._enter=u,a._exit=l,a},enter:function(){return new we(this._enter||this._groups.map(xt),this._parents)},exit:function(){return new we(this._exit||this._groups.map(xt),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(o=e(o)),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),u=0;u<i;++u)for(var l,c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new we(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Nt);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,u=n[i],l=u.length,c=o[i]=new Array(l),s=0;s<l;++s)(a=u[s])&&(c[s]=a);c.sort(e)}return new we(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,i=e[n],a=0,u=i.length;a<u;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=pt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Pt:At:"function"==typeof e?n.local?jt:Mt:n.local?Ot:Ct)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Tt:"function"==typeof e?Dt:Rt)(t,e,null==n?"":n)):Ft(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Lt:"function"==typeof e?qt:It)(t,e)):this.node()[t]},classed:function(t,e){var n=Bt(t+"");if(arguments.length<2){for(var r=$t(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?Xt:e?Vt:Wt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Yt:("function"==typeof t?Kt:Jt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qt:("function"==typeof t?te:Zt)(t)):this.node().innerHTML},raise:function(){return this.each(ee)},lower:function(){return this.each(ne)},append:function(t){var e="function"==typeof t?t:vt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:vt(t),r=null==e?re:"function"==typeof e?e:mt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(oe)},clone:function(t){return this.select(t?ae:ie)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=fe(t+""),a=i.length;if(!(arguments.length<2)){for(u=e?pe:he,null==n&&(n=!1),r=0;r<a;++r)this.each(u(i[r],e,n));return this}var u=this.node().__on;if(u)for(var l,c=0,s=u.length;c<s;++c)for(r=0,l=u[c];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?ge:ve)(t,e))}},Oe.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ie=1/.7,qe="\\s*([+-]?\\d+)\\s*",Be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ue=/^#([0-9a-f]{3,8})$/,He=new RegExp("^rgb\\("+[qe,qe,qe]+"\\)$"),Ge=new RegExp("^rgb\\("+[$e,$e,$e]+"\\)$"),Ve=new RegExp("^rgba\\("+[qe,qe,qe,Be]+"\\)$"),We=new RegExp("^rgba\\("+[$e,$e,$e,Be]+"\\)$"),Xe=new RegExp("^hsl\\("+[Be,$e,$e]+"\\)$"),Ye=new RegExp("^hsla\\("+[Be,$e,$e,Be]+"\\)$"),Je={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ke(){return this.rgb().formatHex()}function Qe(){return this.rgb().formatRgb()}function Ze(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ue.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tn(e):3===n?new on(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?en(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?en(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=He.exec(t))?new on(e[1],e[2],e[3],1):(e=Ge.exec(t))?new on(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ve.exec(t))?en(e[1],e[2],e[3],e[4]):(e=We.exec(t))?en(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xe.exec(t))?cn(e[1],e[2]/100,e[3]/100,1):(e=Ye.exec(t))?cn(e[1],e[2]/100,e[3]/100,e[4]):Je.hasOwnProperty(t)?tn(Je[t]):"transparent"===t?new on(NaN,NaN,NaN,0):null}function tn(t){return new on(t>>16&255,t>>8&255,255&t,1)}function en(t,e,n,r){return r<=0&&(t=e=n=NaN),new on(t,e,n,r)}function nn(t){return t instanceof Le||(t=Ze(t)),t?new on((t=t.rgb()).r,t.g,t.b,t.opacity):new on}function rn(t,e,n,r){return 1===arguments.length?nn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function an(){return"#"+ln(this.r)+ln(this.g)+ln(this.b)}function un(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ln(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function cn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fn(t,e,n,r)}function sn(t){if(t instanceof fn)return new fn(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ze(t)),!t)return new fn;if(t instanceof fn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,u=i-o,l=(i+o)/2;return u?(a=e===i?(n-r)/u+6*(n<r):n===i?(r-e)/u+2:(e-n)/u+4,u/=l<.5?i+o:2-i-o,a*=60):u=l>0&&l<1?0:a,new fn(a,u,l,t.opacity)}function fn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function hn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function pn(t){return function(){return t}}function dn(t){return 1==(t=+t)?yn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):pn(isNaN(e)?n:e)}}function yn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):pn(isNaN(t)?e:t)}De(Le,Ze,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ke,formatHex:Ke,formatHsl:function(){return sn(this).formatHsl()},formatRgb:Qe,toString:Qe}),De(on,rn,Fe(Le,{brighter:function(t){return t=null==t?Ie:Math.pow(Ie,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:an,formatHex:an,formatRgb:un,toString:un})),De(fn,(function(t,e,n,r){return 1===arguments.length?sn(t):new fn(t,e,n,null==r?1:r)}),Fe(Le,{brighter:function(t){return t=null==t?Ie:Math.pow(Ie,t),new fn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new on(hn(t>=240?t-240:t+120,o,r),hn(t,o,r),hn(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var vn=function t(e){var n=dn(e);function r(t,e){var r=n((t=rn(t)).r,(e=rn(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=yn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function gn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var mn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wn=new RegExp(mn.source,"g");function bn(t,e){var n,r,o,i=mn.lastIndex=wn.lastIndex=0,a=-1,u=[],l=[];for(t+="",e+="";(n=mn.exec(t))&&(r=wn.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:gn(n,r)})),i=wn.lastIndex;return i<e.length&&(o=e.slice(i),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)u[(n=l[r]).i]=n.x(t);return u.join("")})}var _n,xn,kn,En,Sn=180/Math.PI,Nn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function An(t,e,n,r,o,i){var a,u,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,l/=u),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Sn,skewX:Math.atan(l)*Sn,scaleX:a,scaleY:u}}function Pn(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var u=[],l=[];return i=t(i),a=t(a),function(t,r,o,i,a,u){if(t!==o||r!==i){var l=a.push("translate(",null,e,null,n);u.push({i:l-4,x:gn(t,o)},{i:l-2,x:gn(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,u,l),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:gn(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,u,l),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:gn(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,u,l),function(t,e,n,r,i,a){if(t!==n||e!==r){var u=i.push(o(i)+"scale(",null,",",null,")");a.push({i:u-4,x:gn(t,n)},{i:u-2,x:gn(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,u,l),i=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)u[(e=l[n]).i]=e.x(t);return u.join("")}}}var Cn,On,Mn=Pn((function(t){return"none"===t?Nn:(_n||(_n=document.createElement("DIV"),xn=document.documentElement,kn=document.defaultView),_n.style.transform=t,t=kn.getComputedStyle(xn.appendChild(_n),null).getPropertyValue("transform"),xn.removeChild(_n),An(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),jn=Pn((function(t){return null==t?Nn:(En||(En=document.createElementNS("http://www.w3.org/2000/svg","g")),En.setAttribute("transform",t),(t=En.transform.baseVal.consolidate())?An((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Nn)}),", ",")",")"),zn=0,Tn=0,Rn=0,Dn=0,Fn=0,Ln=0,In="object"==typeof performance&&performance.now?performance:Date,qn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bn(){return Fn||(qn($n),Fn=In.now()+Ln)}function $n(){Fn=0}function Un(){this._call=this._time=this._next=null}function Hn(t,e,n){var r=new Un;return r.restart(t,e,n),r}function Gn(){Fn=(Dn=In.now())+Ln,zn=Tn=0;try{!function(){Bn(),++zn;for(var t,e=Cn;e;)(t=Fn-e._time)>=0&&e._call.call(null,t),e=e._next;--zn}()}finally{zn=0,function(){var t,e,n=Cn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Cn=e);On=t,Wn(r)}(),Fn=0}}function Vn(){var t=In.now(),e=t-Dn;e>1e3&&(Ln-=e,Dn=t)}function Wn(t){zn||(Tn&&(Tn=clearTimeout(Tn)),t-Fn>24?(t<1/0&&(Tn=setTimeout(Gn,t-In.now()-Ln)),Rn&&(Rn=clearInterval(Rn))):(Rn||(Dn=In.now(),Rn=setInterval(Vn,1e3)),zn=1,qn(Gn)))}function Xn(t,e,n){var r=new Un;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Un.prototype=Hn.prototype={constructor:Un,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Bn():+n)+(null==e?0:+e),this._next||On===this||(On?On._next=this:Cn=this,On=this),this._call=t,this._time=n,Wn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wn())}};var Yn=at("start","end","cancel","interrupt"),Jn=[];function Kn(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(i){var c,s,f,h;if(1!==n.state)return l();for(c in o)if((h=o[c]).name===n.name){if(3===h.state)return Xn(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete o[c])}if(Xn((function(){3===n.state&&(n.state=4,n.timer.restart(u,n.delay,n.time),u(i))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),c=0,s=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++s]=h);r.length=s+1}}function u(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=Hn(i,0,n.time)}(t,n,{name:e,index:r,group:o,on:Yn,tween:Jn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function Qn(t,e){var n=tr(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Zn(t,e){var n=tr(t,e);if(n.state>3)throw new Error("too late; already running");return n}function tr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function er(t,e){var n,r;return function(){var o=Zn(this,t),i=o.tween;if(i!==n)for(var a=0,u=(r=n=i).length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function nr(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=Zn(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var u={name:e,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===e){o[l]=u;break}l===c&&o.push(u)}i.tween=o}}function rr(t,e,n){var r=t._id;return t.each((function(){var t=Zn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return tr(t,r).value[e]}}function or(t,e){var n;return("number"==typeof e?gn:e instanceof Ze?vn:(n=Ze(e))?(e=n,vn):bn)(t,e)}function ir(t){return function(){this.removeAttribute(t)}}function ar(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ur(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function lr(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function cr(t,e,n){var r,o,i;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(u=l+"")?null:a===r&&u===o?i:(o=u,i=e(r=a,l));this.removeAttribute(t)}}function sr(t,e,n){var r,o,i;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(u=l+"")?null:a===r&&u===o?i:(o=u,i=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function fr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function hr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function pr(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&hr(t,o)),n}return o._value=e,o}function dr(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&fr(t,o)),n}return o._value=e,o}function yr(t,e){return function(){Qn(this,t).delay=+e.apply(this,arguments)}}function vr(t,e){return e=+e,function(){Qn(this,t).delay=e}}function gr(t,e){return function(){Zn(this,t).duration=+e.apply(this,arguments)}}function mr(t,e){return e=+e,function(){Zn(this,t).duration=e}}function wr(t,e){if("function"!=typeof e)throw new Error;return function(){Zn(this,t).ease=e}}function br(t,e,n){var r,o,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Qn:Zn;return function(){var a=i(this,t),u=a.on;u!==r&&(o=(r=u).copy()).on(e,n),a.on=o}}var _r=be.prototype.constructor;function xr(t){return function(){this.style.removeProperty(t)}}function kr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Er(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&kr(t,i,n)),r}return i._value=e,i}function Sr(t){return function(e){this.textContent=t.call(this,e)}}function Nr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Sr(r)),e}return r._value=t,r}var Ar=0;function Pr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Cr(){return++Ar}var Or=be.prototype;Pr.prototype={constructor:Pr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=mt(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var u,l,c=r[a],s=c.length,f=i[a]=new Array(s),h=0;h<s;++h)(u=c[h])&&(l=t.call(u,u.__data__,h,c))&&("__data__"in u&&(l.__data__=u.__data__),f[h]=l,Kn(f[h],e,n,h,f,tr(u,n)));return new Pr(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=bt(t));for(var r=this._groups,o=r.length,i=[],a=[],u=0;u<o;++u)for(var l,c=r[u],s=c.length,f=0;f<s;++f)if(l=c[f]){for(var h,p=t.call(l,l.__data__,f,c),d=tr(l,n),y=0,v=p.length;y<v;++y)(h=p[y])&&Kn(h,e,n,y,p,d);i.push(p),a.push(l)}return new Pr(i,a,e,n)},filter:function(t){"function"!=typeof t&&(t=_t(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],u=a.length,l=r[o]=[],c=0;c<u;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&l.push(i);return new Pr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),u=0;u<i;++u)for(var l,c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new Pr(a,this._parents,this._name,this._id)},selection:function(){return new _r(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Cr(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],l=u.length,c=0;c<l;++c)if(a=u[c]){var s=tr(a,e);Kn(a,t,n,c,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Pr(r,this._parents,t,n)},call:Or.call,nodes:Or.nodes,node:Or.node,size:Or.size,empty:Or.empty,each:Or.each,on:function(t,e){var n=this._id;return arguments.length<2?tr(this.node(),n).on.on(t):this.each(br(n,t,e))},attr:function(t,e){var n=pt(t),r="transform"===n?jn:or;return this.attrTween(t,"function"==typeof e?(n.local?sr:cr)(n,r,rr(this,"attr."+t,e)):null==e?(n.local?ar:ir)(n):(n.local?lr:ur)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=pt(t);return this.tween(n,(r.local?pr:dr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Mn:or;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=Ft(this,t),a=(this.style.removeProperty(t),Ft(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,xr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=Ft(this,t),u=n(this),l=u+"";return null==u&&(this.style.removeProperty(t),l=u=Ft(this,t)),a===l?null:a===r&&l===o?i:(o=l,i=e(r=a,u))}}(t,r,rr(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,u="end."+a;return function(){var l=Zn(this,t),c=l.on,s=null==l.value[a]?i||(i=xr(e)):void 0;c===n&&o===s||(r=(n=c).copy()).on(u,o=s),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=Ft(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Er(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(rr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Nr(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=tr(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===t)return r.value;return null}return this.each((null==e?er:nr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?yr:vr)(e,t)):tr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?gr:mr)(e,t)):tr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(wr(e,t)):tr(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var u={value:a},l={value:function(){0==--o&&i()}};n.each((function(){var n=Zn(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(l)),n.on=e}))}))}};var Mr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function jr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Mr.time=Bn(),Mr;return n}be.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete t.__transition}}(this,t)}))},be.prototype.transition=function(t){var e,n;t instanceof Pr?(e=t._id,t=t._name):(e=Cr(),(n=Mr).time=Bn(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],l=u.length,c=0;c<l;++c)(a=u[c])&&Kn(a,t,e,c,u,n||jr(a,e));return new Pr(r,this._parents,t,e)};function zr(){}function Tr(t,e){var n=new zr;if(t instanceof zr)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==e)for(;++o<i;)n.set(o,t[o]);else for(;++o<i;)n.set(e(r=t[o],o,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function Rr(){}zr.prototype=Tr.prototype={constructor:zr,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Dr=Tr.prototype;function Fr(t){return function(){return t}}function Lr(){return 1e-6*(Math.random()-.5)}function Ir(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,u,l,c,s,f,h,p=t._root,d={data:r},y=t._x0,v=t._y0,g=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(i=(y+g)/2))?y=i:g=i,(s=n>=(a=(v+m)/2))?v=a:m=a,o=p,!(p=p[f=s<<1|c]))return o[f]=d,t;if(u=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===u&&n===l)return d.next=p,o?o[f]=d:t._root=d,t;do{o=o?o[f]=new Array(4):t._root=new Array(4),(c=e>=(i=(y+g)/2))?y=i:g=i,(s=n>=(a=(v+m)/2))?v=a:m=a}while((f=s<<1|c)==(h=(l>=a)<<1|u>=i));return o[h]=p,o[f]=d,t}function qr(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}function Br(t){return t[0]}function $r(t){return t[1]}function Ur(t,e,n){var r=new Hr(null==e?Br:e,null==n?$r:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Hr(t,e,n,r,o,i){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function Gr(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Rr.prototype={constructor:Rr,has:Dr.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Dr.remove,clear:Dr.clear,values:Dr.keys,size:Dr.size,empty:Dr.empty,each:Dr.each};var Vr=Ur.prototype=Hr.prototype;function Wr(t){return t.x+t.vx}function Xr(t){return t.y+t.vy}function Yr(t){return t.index}function Jr(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Kr(t){return t.x}function Qr(t){return t.y}Vr.copy=function(){var t,e,n=new Hr(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Gr(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(e=r.source[o])&&(e.length?t.push({source:e,target:r.target[o]=new Array(4)}):r.target[o]=Gr(e));return n},Vr.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Ir(this.cover(e,n),e,n,t)},Vr.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),u=new Array(i),l=1/0,c=1/0,s=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=r,u[n]=o,r<l&&(l=r),r>s&&(s=r),o<c&&(c=o),o>f&&(f=o));if(l>s||c>f)return this;for(this.cover(l,c).cover(s,f),n=0;n<i;++n)Ir(this,a[n],u[n],t[n]);return this},Vr.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,i=(r=Math.floor(e))+1;else{for(var a,u,l=o-n,c=this._root;n>t||t>=o||r>e||e>=i;)switch(u=(e<r)<<1|t<n,(a=new Array(4))[u]=c,c=a,l*=2,u){case 0:o=n+l,i=r+l;break;case 1:n=o-l,i=r+l;break;case 2:o=n+l,r=i-l;break;case 3:n=o-l,r=i-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},Vr.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Vr.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Vr.find=function(t,e,n){var r,o,i,a,u,l,c,s=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],y=this._root;for(y&&d.push(new qr(y,s,f,h,p)),null==n?n=1/0:(s=t-n,f=e-n,h=t+n,p=e+n,n*=n);l=d.pop();)if(!(!(y=l.node)||(o=l.x0)>h||(i=l.y0)>p||(a=l.x1)<s||(u=l.y1)<f))if(y.length){var v=(o+a)/2,g=(i+u)/2;d.push(new qr(y[3],v,g,a,u),new qr(y[2],o,g,v,u),new qr(y[1],v,i,a,g),new qr(y[0],o,i,v,g)),(c=(e>=g)<<1|t>=v)&&(l=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=l)}else{var m=t-+this._x.call(null,y.data),w=e-+this._y.call(null,y.data),b=m*m+w*w;if(b<n){var _=Math.sqrt(n=b);s=t-_,f=e-_,h=t+_,p=e+_,r=y.data}}return r},Vr.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,o,i,a,u,l,c,s,f,h,p=this._root,d=this._x0,y=this._y0,v=this._x1,g=this._y1;if(!p)return this;if(p.length)for(;;){if((c=i>=(u=(d+v)/2))?d=u:v=u,(s=a>=(l=(y+g)/2))?y=l:g=l,e=p,!(p=p[f=s<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(o=p.next)&&delete p.next,r?(o?r.next=o:delete r.next,this):e?(o?e[f]=o:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=o,this)},Vr.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Vr.root=function(){return this._root},Vr.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Vr.visit=function(t){var e,n,r,o,i,a,u=[],l=this._root;for(l&&u.push(new qr(l,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(l=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&l.length){var c=(r+i)/2,s=(o+a)/2;(n=l[3])&&u.push(new qr(n,c,s,i,a)),(n=l[2])&&u.push(new qr(n,r,s,c,a)),(n=l[1])&&u.push(new qr(n,c,o,i,s)),(n=l[0])&&u.push(new qr(n,r,o,c,s))}return this},Vr.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new qr(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var i,a=e.x0,u=e.y0,l=e.x1,c=e.y1,s=(a+l)/2,f=(u+c)/2;(i=o[0])&&n.push(new qr(i,a,u,s,f)),(i=o[1])&&n.push(new qr(i,s,u,l,f)),(i=o[2])&&n.push(new qr(i,a,f,s,c)),(i=o[3])&&n.push(new qr(i,s,f,l,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Vr.x=function(t){return arguments.length?(this._x=t,this):this._x},Vr.y=function(t){return arguments.length?(this._y=t,this):this._y};var Zr=Math.PI*(3-Math.sqrt(5));function to(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var eo=Array.prototype.slice,no={name:"implicit"};function ro(){var t=Tr(),e=[],n=[],r=no;function o(o){var i=o+"",a=t.get(i);if(!a){if(r!==no)return r;t.set(i,a=e.push(o))}return n[(a-1)%n.length]}return o.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Tr();for(var r,i,a=-1,u=n.length;++a<u;)t.has(i=(r=n[a])+"")||t.set(i,e.push(r));return o},o.range=function(t){return arguments.length?(n=eo.call(t),o):n.slice()},o.unknown=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return ro(e,n).unknown(r)},to.apply(o,arguments),o}var oo=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),io=p((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",o="image/jpeg",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:o,jpeg:o,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r,o},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);e(new Blob([o],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var o=n.createElement("a");return n.body.appendChild(o),r.href=e,o.href=t,o.href},getAndEncode:function(t){var e=3e4;u.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,o=new XMLHttpRequest;if(o.onreadystatechange=a,o.ontimeout=l,o.responseType="blob",o.timeout=e,o.open("GET",t,!0),o.send(),u.impl.options.imagePlaceholder){var i=u.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(r=i[1])}function a(){if(4===o.readyState)if(200===o.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];n(t)},e.readAsDataURL(o.response)}else r?n(r):c("cannot fetch resource: "+t+", status: "+o.status)}function l(){r?n(r):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(t){console.error(t),n("")}}))},uid:function(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,i){return a()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return o(e,t,n,i)}))})),r}));function a(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:o}};function e(e){return-1!==e.search(t)}function r(e){for(var r,o=[];null!==(r=t.exec(e));)o.push(r[1]);return o.filter((function(t){return!n.isDataUrl(t)}))}function o(t,e,r,o){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(o||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),o=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),i=function(){return{inlineAll:function e(o){return o instanceof Element?i(o).then((function(){return o instanceof HTMLImageElement?t(o).inline():Promise.all(n.asArray(o.childNodes).map((function(t){return e(t)})))})):Promise.resolve(o);function i(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},u={toSvg:l,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return c(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return c(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:o,images:i,util:n,inliner:r,options:{}}};function l(t,e){return function(t){void 0===t.imagePlaceholder?u.impl.options.imagePlaceholder=a.imagePlaceholder:u.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?u.impl.options.cacheBust=a.cacheBust:u.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return s(t,e.filter,!0)})).then(f).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function c(t,e){return l(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var o=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var o=r.getContext("2d");o.fillStyle=e.bgcolor,o.fillRect(0,0,r.width,r.height)}return r}(t);return o.getContext("2d").drawImage(r,0,0),o}))}function s(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(r){return function(t,e,r){var o=t.childNodes;return 0===o.length?Promise.resolve(e):i(e,n.asArray(o),r).then((function(){return e}));function i(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return s(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}}(t,r,e)})).then((function(e){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(o).then(i).then(a).then((function(){return e})):e;function r(){function r(t,e){function r(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:r(t,e)}r(window.getComputedStyle(t),e.style)}function o(){function r(r){var o=window.getComputedStyle(t,r),i=o.getPropertyValue("content");if(""!==i&&"none"!==i){var a=n.uid();e.className=e.className+" "+a;var u=document.createElement("style");u.appendChild(l(a,r,o)),e.appendChild(u)}function l(t,e,r){var o="."+t+":"+e,i=r.cssText?a(r):u(r);return document.createTextNode(o+"{"+i+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function u(t){return n.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){r(t)}))}function i(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(t,e)})):Promise.resolve()}function f(t){return o.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return i.inlineAll(t).then((function(){return t}))}t.exports=u}()}));const ao=require("jszip"),uo=require("react-file-download"),lo=t=>{const{nodes:e,links:n}=t,r=n.map((t=>{let{source:n,target:r}=t;return{source:e[n].name,target:e[r].name,sourceType:e[n].type,targetType:e[r].type}})),{nodeMap:o,nodesTsv:i}=(t=>{let e=1e7;const n={};let r=!1;t.forEach((t=>{let{source:o,target:i,sourceType:a,targetType:u}=t;""!==i&&""!==o&&(Object.keys(n).indexOf(o)<0?(""!==a?(r=!0,n[o]={ID:e,WEIGHT:1,NODE_TYPE:a}):n[o]={ID:e,WEIGHT:1},e+=1):n[o].WEIGHT+=1,Object.keys(n).indexOf(i)<0?(""!==u?(r=!0,n[i]={ID:e,WEIGHT:1,NODE_TYPE:u}):n[i]={ID:e,WEIGHT:1},e+=1):n[i].WEIGHT+=1)}));let o=r?"ID\tLABEL\tWEIGHT\tNODE_TYPE\r\n":"ID\tLABEL\tWEIGHT\r\n";return Object.keys(n).forEach((t=>{const e=n[t].ID,i=n[t].WEIGHT,a=r?n[t].NODE_TYPE:"";o+=r?`${e}\t${t}\t${i}\t${a}\r\n`:`${e}\t${t}\t${i}\r\n`})),{nodeMap:n,nodesTsv:o}})(r),a=((t,e)=>{let n="SOURCE\tTARGET\tWEIGHT\tTYPE\r\n";return t.forEach((t=>{let{source:r,target:o}=t;if(""===o||""===r)return;const i=e[r].ID,a=e[o].ID;n+=`${i}\t${a}\t1\tUndirected\r\n`})),n})(r,o),u=new ao;u.file("Node_Table.tsv",i),u.file("Edge_Table.tsv",a),u.generateAsync({type:"blob"}).then((t=>{uo(t,"Gephi_generated_by_NMTL.zip")}))},co=t=>{let{fill:e="#825c0d"}=t;return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},n.createElement("defs",null,n.createElement("clipPath",{id:"a"},n.createElement("path",{"data-name":"Rectangle 125",style:{fill:"#fff"},d:"M0 0h32v32H0z"}))),n.createElement("g",{style:{clipPath:"url(#a)"}},n.createElement("path",{d:"M-960 600h-20v-10h4v2h-2v6h16v-6h-2v-2h4zm-5.06-12.608-1.348-1.454-2.592 2.427V580h-2v8.365l-2.544-2.427-1.362 1.454 4.948 4.671z",transform:"translate(986 -574)",style:{fill:e},"data-name":"Mask Group 42"})))},so=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_128","data-name":"Rectangle 128",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_47","data-name":"Mask Group 47",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3633","data-name":"Group 3633",transform:"translate(6 6)"},e.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z",transform:"translate(-495 -369)"}),e.createElement("g",{id:"Group_3632","data-name":"Group 3632",transform:"translate(0 2)"},e.createElement("path",{id:"Path_182","data-name":"Path 182",className:"cls-3",d:"M502.276 371h3.447L512 389h-3.164l-1.595-5.129h-6.586L499.036 389H496zm-.926 10.649h5.17l-.746-2.419c-.643-1.953-1.209-3.956-1.776-5.983h-.128a126.193 126.193 0 0 1-1.748 5.983z",transform:"translate(-496 -371)"})))))},fo=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_129","data-name":"Rectangle 129",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_48","data-name":"Mask Group 48",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3635","data-name":"Group 3635",transform:"translate(6 8)"},e.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M510 371v2h6v-2z",transform:"translate(-495 -371)"}),e.createElement("g",{id:"Group_3632","data-name":"Group 3632"},e.createElement("path",{id:"Path_182","data-name":"Path 182",className:"cls-3",d:"M502.276 371h3.447L512 389h-3.164l-1.595-5.129h-6.586L499.036 389H496zm-.926 10.649h5.17l-.746-2.419c-.643-1.953-1.209-3.956-1.776-5.983h-.128a126.193 126.193 0 0 1-1.748 5.983z",transform:"translate(-496 -371)"})))))},ho=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_124","data-name":"Rectangle 124",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_46","data-name":"Mask Group 46",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3629","data-name":"Group 3629",transform:"translate(6 6.001)"},e.createElement("path",{id:"Path_176","data-name":"Path 176",className:"cls-3",d:"M-721 1949.376h2.5v-3.755h3.755v-2.5H-721z",transform:"translate(721.003 -1943.118)"}),e.createElement("path",{id:"Path_177","data-name":"Path 177",className:"cls-3",d:"M-721 1960.376h6.258v-2.5h-3.758v-3.755h-2.5z",transform:"translate(721.003 -1940.376)"}),e.createElement("path",{id:"Path_178","data-name":"Path 178",className:"cls-3",d:"M-703.744 1943.118H-710v2.5h3.755v3.755h2.5z",transform:"translate(723.744 -1943.118)"}),e.createElement("path",{id:"Path_179","data-name":"Path 179",className:"cls-3",d:"M-703.744 1960.376v-6.259h-2.5v3.755H-710v2.5z",transform:"translate(723.744 -1940.376)"}))))};b('.SNA {\n overflow: hidden;\n object-fit: contain;\n position: relative;\n font-size: 0.75rem;\n width: 100%; }\n .SNA--smallSize .node {\n padding-top: 8px;\n font-size: 0.75rem;\n width: 3rem;\n height: 3rem;\n overflow: hidden;\n white-space: pre-wrap;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical; }\n .SNA .node {\n background-color: #4a4e69;\n border-radius: 50%;\n color: #fff;\n font-size: 20px;\n font-weight: 500;\n height: 54px;\n width: 54px;\n padding-top: 15px;\n position: absolute;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: grab; }\n .SNA .links line {\n stroke: #c7bfb4;\n stroke-width: 2; }\n .SNA .mainNode {\n fill: #4e3a16 !important; }\n .SNA .person {\n fill: #867b3a !important; }\n .SNA .publication {\n fill: #825c0d !important; }\n .SNA .article {\n fill: #afafaf !important; }\n .SNA .keyword {\n fill: #fcfae8 !important; }\n .SNA .org {\n fill: #000000 !important; }\n .SNA__tool {\n display: flex;\n justify-content: flex-end;\n padding-right: 20px;\n padding-top: 12px; }\n .SNA__share {\n margin-right: 16px; }\n .SNA__download {\n cursor: pointer;\n margin-right: 16px; }\n .SNA__fullscreenBtn {\n cursor: pointer;\n margin-right: 16px;\n padding-top: 0; }\n .SNA .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .SNA .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .SNA .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n\n#download-menu .MuiMenuItem-root {\n color: #4e3a16;\n width: auto;\n overflow: hidden;\n font-size: 1rem;\n box-sizing: border-box;\n min-height: 48px;\n font-family: "Roboto", "Helvetica", "Arial", sans-serif;\n font-weight: 400;\n line-height: 1;\n padding-top: 1rem;\n white-space: initial;\n border-bottom: 0;\n letter-spacing: 0.00938em;\n padding-bottom: 1rem; }\n\n@media only screen and (max-width: 484px) {\n .SNA {\n margin-left: 0px; }\n .SNA .node {\n background-color: #4a4e69;\n border-radius: 50%;\n color: #fff;\n font-size: 1px;\n font-weight: 500;\n height: 44px;\n width: 44px;\n padding-top: 12px;\n position: absolute;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: grab; } }\n\n@media only screen and (max-width: 484px) {\n .SNA {\n margin-left: 0px; } }\n');var po=function(e){var l=e.className,c=e.intl,s=e.width,h=e.height,p=e.distance,d=e.SNAData,y=e.fontColor,v=e.backgroundColor,b=e.iconColor,_=e.handleClickNodeGoto;if(!d||0===d.nodes.length)return n.createElement("div",{className:"noData"},c?c.formatMessage({id:"common.noData"}):"暫無資料");var x=function(){var t=o(!1),e=t[0],n=t[1],l=i(null);a((function(){var t=function(){n(P.fullscreenElement===l.current)};return P.addEventListener("fullscreenchange",t),function(){return P.removeEventListener("fullscreenchange",t)}}),[]);var c=u((function(){return P.fullscreenElement?P.exitFullscreen().then((function(){return P.requestFullscreen(l.current)})):l.current?P.requestFullscreen(l.current):void 0}),[]),s=u((function(){return P.fullscreenElement===l.current?P.exitFullscreen():Promise.resolve()}),[]);return r((function(){return{active:e,enter:c,exit:s,node:l}}),[e,c,s])}(),k=o(null),E=t(k,2),S=E[0],N=E[1],A=function(t){switch(t){case"img":(t=>{let{id:e,fileName:n="image",quality:r=.95}=t;const o=document.getElementById(e);io.toPng(o,{quality:r}).then((t=>{const e=document.createElement("a");e.download=`${n}.png`,e.href=t,e.click()})).catch((t=>{console.error("oops, something went wrong!",t)}))})({id:"network-graph"});break;case"gephi":lo(d)}},O=r((function(){return x.active?screen.width:screen.width>1050?s:screen.width-80}),[x.active,screen.width]),M=r((function(){return x.active?screen.height:screen.width>1050?h:screen.height-300}),[x.active,screen.width]),j=function(t,e,n){var r=function(t,e,n){var r=.5*(e.x+t.x),o=.5*(e.y+t.y),i=e.x-t.x,a=e.y-t.y,u=Math.pow(Math.pow(i,2)+Math.pow(a,2),.5);return{qx:r-a*n/u,qy:o+i*n/u}}(t,e,n),o=r.qx,i=r.qy;return isNaN(o)?"M".concat(t.x,", ").concat(t.y," Q0 0 ").concat(e.x," ").concat(e.y):"M".concat(t.x,", ").concat(t.y," Q").concat(o," ").concat(i," ").concat(e.x," ").concat(e.y)},z=function(t){var e=8.5,n="-0 -".concat(e," ").concat(17," ").concat(17),r="M 0,-".concat(6.800000000000001," L ").concat(13.600000000000001," ,0 L 0,").concat(6.800000000000001),o=ro(oo),i=t.links.map((function(t){return Object.create(t)})),a=t.nodes.map((function(t){return Object.create(t)})),u=function(t){var e,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,a=.6,u=Tr(),l=Hn(s),c=at("tick","end");function s(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(r){var l,c,s=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(i-n)*o,u.each((function(t){t(n)})),l=0;l<s;++l)null==(c=t[l]).fx?c.x+=c.vx*=a:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=a:(c.y=c.fy,c.vy=0);return e}function h(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var o=10*Math.sqrt(n),i=n*Zr;e.x=o*Math.cos(i),e.y=o*Math.sin(i)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),h(),e={tick:f,restart:function(){return l.restart(s),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),u.each(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(o=+t,e):+o},alphaTarget:function(t){return arguments.length?(i=+t,e):i},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?u.remove(t):u.set(t,p(n)),e):u.get(t)},find:function(e,n,r){var o,i,a,u,l,c=0,s=t.length;for(null==r?r=1/0:r*=r,c=0;c<s;++c)(a=(o=e-(u=t[c]).x)*o+(i=n-u.y)*i)<r&&(l=u,r=a);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}(a).force("link",function(t){var e,n,r,o,i,a=Yr,u=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},l=Fr(30),c=1;function s(r){for(var o=0,a=t.length;o<c;++o)for(var u,l,s,f,h,p,d,y=0;y<a;++y)l=(u=t[y]).source,f=(s=u.target).x+s.vx-l.x-l.vx||Lr(),h=s.y+s.vy-l.y-l.vy||Lr(),f*=p=((p=Math.sqrt(f*f+h*h))-n[y])/p*r*e[y],h*=p,s.vx-=f*(d=i[y]),s.vy-=h*d,l.vx+=f*(d=1-d),l.vy+=h*d}function f(){if(r){var u,l,c=r.length,s=t.length,f=Tr(r,a);for(u=0,o=new Array(c);u<s;++u)(l=t[u]).index=u,"object"!=typeof l.source&&(l.source=Jr(f,l.source)),"object"!=typeof l.target&&(l.target=Jr(f,l.target)),o[l.source.index]=(o[l.source.index]||0)+1,o[l.target.index]=(o[l.target.index]||0)+1;for(u=0,i=new Array(s);u<s;++u)l=t[u],i[u]=o[l.source.index]/(o[l.source.index]+o[l.target.index]);e=new Array(s),h(),n=new Array(s),p()}}function h(){if(r)for(var n=0,o=t.length;n<o;++n)e[n]=+u(t[n],n,t)}function p(){if(r)for(var e=0,o=t.length;e<o;++e)n[e]=+l(t[e],e,t)}return null==t&&(t=[]),s.initialize=function(t){r=t,f()},s.links=function(e){return arguments.length?(t=e,f(),s):t},s.id=function(t){return arguments.length?(a=t,s):a},s.iterations=function(t){return arguments.length?(c=+t,s):c},s.strength=function(t){return arguments.length?(u="function"==typeof t?t:Fr(+t),h(),s):u},s.distance=function(t){return arguments.length?(l="function"==typeof t?t:Fr(+t),p(),s):l},s}(i).id((function(t){return t.index})).distance(50)).force("charge",function(){var t,e,n,r,o=Fr(-30),i=1,a=1/0,u=.81;function l(r){var o,i=t.length,a=Ur(t,Kr,Qr).visitAfter(s);for(n=r,o=0;o<i;++o)e=t[o],a.visit(f)}function c(){if(t){var e,n,i=t.length;for(r=new Array(i),e=0;e<i;++e)n=t[e],r[n.index]=+o(n,e,t)}}function s(t){var e,n,o,i,a,u=0,l=0;if(t.length){for(o=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(u+=e.value,l+=n,o+=n*e.x,i+=n*e.y);t.x=o/l,t.y=i/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{u+=r[e.data.index]}while(e=e.next)}t.value=u}function f(t,o,l,c){if(!t.value)return!0;var s=t.x-e.x,f=t.y-e.y,h=c-o,p=s*s+f*f;if(h*h/u<p)return p<a&&(0===s&&(p+=(s=Lr())*s),0===f&&(p+=(f=Lr())*f),p<i&&(p=Math.sqrt(i*p)),e.vx+=s*t.value*n/p,e.vy+=f*t.value*n/p),!0;if(!(t.length||p>=a)){(t.data!==e||t.next)&&(0===s&&(p+=(s=Lr())*s),0===f&&(p+=(f=Lr())*f),p<i&&(p=Math.sqrt(i*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=s*h,e.vy+=f*h)}while(t=t.next)}}return l.initialize=function(e){t=e,c()},l.strength=function(t){return arguments.length?(o="function"==typeof t?t:Fr(+t),c(),l):o},l.distanceMin=function(t){return arguments.length?(i=t*t,l):Math.sqrt(i)},l.distanceMax=function(t){return arguments.length?(a=t*t,l):Math.sqrt(a)},l.theta=function(t){return arguments.length?(u=t*t,l):Math.sqrt(u)},l}().strength(-160)).force("center",function(t,e){var n;function r(){var r,o,i=n.length,a=0,u=0;for(r=0;r<i;++r)a+=(o=n[r]).x,u+=o.y;for(a=a/i-t,u=u/i-e,r=0;r<i;++r)(o=n[r]).x-=a,o.y-=u}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r}(O/2,M/2)).force("collide",function(t){var e,n,r=1,o=1;function i(){for(var t,i,u,l,c,s,f,h=e.length,p=0;p<o;++p)for(i=Ur(e,Wr,Xr).visitAfter(a),t=0;t<h;++t)u=e[t],s=n[u.index],f=s*s,l=u.x+u.vx,c=u.y+u.vy,i.visit(d);function d(t,e,n,o,i){var a=t.data,h=t.r,p=s+h;if(!a)return e>l+p||o<l-p||n>c+p||i<c-p;if(a.index>u.index){var d=l-a.x-a.vx,y=c-a.y-a.vy,v=d*d+y*y;v<p*p&&(0===d&&(v+=(d=Lr())*d),0===y&&(v+=(y=Lr())*y),v=(p-(v=Math.sqrt(v)))/v*r,u.vx+=(d*=v)*(p=(h*=h)/(f+h)),u.vy+=(y*=v)*p,a.vx-=d*(p=1-p),a.vy-=y*p)}}}function a(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function u(){if(e){var r,o,i=e.length;for(n=new Array(i),r=0;r<i;++r)o=e[r],n[o.index]=+t(o,r,e)}}return"function"!=typeof t&&(t=Fr(null==t?1:+t)),i.initialize=function(t){e=t,u()},i.iterations=function(t){return arguments.length?(o=+t,i):o},i.strength=function(t){return arguments.length?(r=+t,i):r},i.radius=function(e){return arguments.length?(t="function"==typeof e?e:Fr(+e),u(),i):t},i}().radius((function(){return 13.5})).iterations(5)).force("x",function(t){var e,n,r,o=Fr(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vx+=(r[i]-o.x)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=Fr(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:Fr(+t),a(),i):o},i.x=function(e){return arguments.length?(t="function"==typeof e?e:Fr(+e),a(),i):t},i}(O/2)).force("y",function(t){var e,n,r,o=Fr(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vy+=(r[i]-o.y)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=Fr(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:Fr(+t),a(),i):o},i.y=function(e){return arguments.length?(t="function"==typeof e?e:Fr(+e),a(),i):t},i}(M/2)).force("radial",function(t,e,n){var r,o,i,a=Fr(.1);function u(t){for(var a=0,u=r.length;a<u;++a){var l=r[a],c=l.x-e||1e-6,s=l.y-n||1e-6,f=Math.sqrt(c*c+s*s),h=(i[a]-f)*o[a]*t/f;l.vx+=c*h,l.vy+=s*h}}function l(){if(r){var e,n=r.length;for(o=new Array(n),i=new Array(n),e=0;e<n;++e)i[e]=+t(r[e],e,r),o[e]=isNaN(i[e])?0:+a(r[e],e,r)}}return"function"!=typeof t&&(t=Fr(+t)),null==e&&(e=0),null==n&&(n=0),u.initialize=function(t){r=t,l()},u.strength=function(t){return arguments.length?(a="function"==typeof t?t:Fr(+t),l(),u):a},u.radius=function(e){return arguments.length?(t="function"==typeof e?e:Fr(+e),l(),u):t},u.x=function(t){return arguments.length?(e=+t,u):e},u.y=function(t){return arguments.length?(n=+t,u):n},u}(100,O/2,M/2)),l=_e(".chart").append("svg").attr("viewBox",[0,0,O,M]).style("background-color",v);l.append("defs").append("marker").attr("id","arrowhead").attr("viewBox",n).attr("refX",23.8).attr("refY",0).attr("orient","auto").attr("markerWidth",15.3).attr("markerHeight",15.3).attr("xoverflow","visible").append("svg:path").attr("d",r).attr("fill","#999").style("stroke","none");var s=l.append("g").attr("stroke","#999").attr("stroke-opacity",.6).selectAll("line").data(i).join("path").attr("fill","none").attr("stroke-dasharray",(function(t){return"protege"===t.ontology?"2,5,3":""})).attr("key",(function(t){return t.type})).attr("marker-end","url(#arrowhead)"),f=l.append("g").attr("stroke","#fff").attr("stroke-width",1.5).selectAll("circle").data(a).join("circle").attr("r",(function(t){return"mainNode"===t.type?13.5:e})).attr("fill",(function(t){return o(t.type)})).attr("key",(function(t){return t.type})).attr("class",(function(t){return"node node-".concat(t.id," ").concat(t.type&&"organization"===t.type?"org":"person"===t.type?"person":"publication"===t.type?"publication":"mainNode"===t.type?"mainNode":"article"===t.type?"article":"keyword"===t.type?"keyword":"event"===t.type?"event":"")})).on("click",(function(t){return t.hasClick?_({name:t.name,id:t.id,type:t.type}):null})).call(function(t){return Re().on("start",(function(e){le.active||t.alphaTarget(.3).restart(),e.fx=e.x,e.fy=e.y})).on("drag",(function(t){t.fx=le.x>O||le.x<0?t.x:le.x,t.fy=le.y>M||le.y<0?t.y:le.y}))}(u));f.append("title").text((function(t){return"".concat(t.name,"-").concat(function(t){switch(t){case"mainNode":return c?c.formatMessage({id:"SNA.search.center"}):"主要搜尋中心";case"organization":return c?c.formatMessage({id:"SNA.organization"}):"組織";case"person":return c?c.formatMessage({id:"SNA.author"}):"作家";case"publication":return c?c.formatMessage({id:"SNA.publication"}):"作家";case"article":return c?c.formatMessage({id:"SNA.article"}):"單篇作品";case"keyword":return c?c.formatMessage({id:"SNA.keyword"}):"關鍵字";default:return""}}(t.type))}));var h=l.append("g").selectAll("text").data(a).join("text").attr("fill",y).attr("text-anchor","middle").attr("key",(function(t){return t.type})).style("color","#fff").style("font-size","14px").text((function(t){return t.name})),p=l.selectAll(".edgepath").data(i).enter().append("path").attr("class","edgepath").attr("fill-opacity",0).attr("stroke-opacity",0).attr("id",(function(t,e){return"edgepath".concat(e)})).style("pointer-events","none");l.selectAll(".edgelabel").data(i).enter().append("text").style("pointer-events","none").attr("class","edgelabel").attr("font-size","10px").attr("fill","#aaa").attr("visibility","visible").attr("key",(function(t){return t.type})).attr("id",(function(t,e){return"edgelabel".concat(e)})).append("textPath").attr("xlink:href",(function(t,e){return"#edgepath".concat(e)})).style("text-anchor","middle").style("pointer-events","none").attr("startOffset","50%").text((function(t){return t.property})),u.on("tick",(function(){s.attr("d",(function(t){return j(t.source,t.target,30)})),f.attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})),h.attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y-e})),p.attr("d",(function(t){return j(t.source,t.target,30)}))}))};return a((function(){if(d&&d.nodes&&d.nodes.length>0){var t=document.getElementById("network-graph");t&&t.childNodes[0]&&t.removeChild(t.childNodes[0]),z(d)}}),[d,x.active]),n.createElement("div",{className:f("SNA",{"SNA--smallSize":p<200},l),style:{contentWidth:O,contentHeight:M,backgroundColor:v}},n.createElement("div",{className:"SNA__tool"},n.createElement("div",{className:"SNA__share"},n.createElement(Z,{url:document.location.href},n.createElement(W,{size:32,round:!0}))),n.createElement("div",{className:"SNA__download"},n.createElement(w,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},n.createElement("span",{onClick:function(t){N(t.currentTarget)}},n.createElement(co,{fill:b}))),n.createElement(g,{id:"download-menu",anchorEl:S,keepMounted:!0,open:Boolean(S),onClose:function(){N(null)}},n.createElement(m,{onClick:function(){return A("img")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.img"}):"下載圖片"),n.createElement(m,{onClick:function(){return A("gephi")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.gephi"}):"下載Gephi"))),n.createElement("div",{className:"SNA__fullscreenBtn"},n.createElement(w,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},n.createElement("span",{onClick:x.enter},n.createElement(ho,{fill:b})))),n.createElement(rt,{targets:["#network-graph svg g text"],options:{stepSize:2,range:1},customButtons:{up:n.createElement(w,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},n.createElement(so,{fill:b})),down:n.createElement(w,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},n.createElement(fo,{fill:b})),style:{border:"none"},buttonsMargin:10}})),n.createElement(C,{handle:x},n.createElement("div",{className:"chart",id:"network-graph"},x.active&&n.createElement("div",{className:"fullscreenExit",style:{backgroundColor:v}},n.createElement(et,{fontSize:"large",onClick:x.exit,title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreenExit"}):"離開全螢幕"})))))};po.defaultProps={className:void 0,intl:void 0,width:1050,height:600,distance:400,SNAData:null,fontColor:"#000000",backgroundColor:"#FFFFFF",iconColor:"#825c0d",handleClickNodeGoto:null},po.propTypes={className:s.string,intl:s.objectOf(s.any),width:s.number,height:s.number,distance:s.number,SNAData:s.objectOf(s.any),fontColor:s.string,backgroundColor:s.string,iconColor:s.string,handleClickNodeGoto:s.func};export{po as default};
16
+ var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,u=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))o.call(n,c)&&(u[c]=n[c]);if(r){a=r(n);for(var s=0;s<a.length;s++)i.call(n,a[s])&&(u[a[s]]=n[a[s]])}}return u}},function(t,e,n){(t.exports=n(5)(!1)).push([t.i,".font-size-changer {\n display: inline-block; }\n .font-size-changer .font-size-changer-buttons > div {\n float: left;\n border: 1px solid;\n text-align: center;\n line-height: 40px;\n -webkit-box-sizing: border-box;\n /* Safari/Chrome, other WebKit */\n -moz-box-sizing: border-box;\n /* Firefox, other Gecko */\n box-sizing: border-box;\n -webkit-touch-callout: none;\n /* iOS Safari */\n -webkit-user-select: none;\n /* Safari */\n -khtml-user-select: none;\n /* Konqueror HTML */\n -moz-user-select: none;\n /* Firefox */\n -ms-user-select: none;\n /* Internet Explorer/Edge */\n user-select: none;\n /* Non-prefixed version, currently\r\n supported by Chrome and Opera */ }\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),i=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){var r={},o=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}((function(){return window&&document&&document.all&&!window.atob})),i=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var r=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),a=null,u=0,l=[],c=n(7);function s(t,e){for(var n=0;n<t.length;n++){var o=t[n],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(v(o.parts[a],e))}else{var u=[];for(a=0;a<o.parts.length;a++)u.push(v(o.parts[a],e));r[o.id]={id:o.id,refs:1,parts:u}}}}function f(t,e){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],u={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(u):n.push(r[a]={id:a,parts:[u]})}return n}function h(t,e){var n=i(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(t.insertAt.before,n);n.insertBefore(e,o)}}function p(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function d(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=n.nc;r&&(t.attrs.nonce=r)}return y(e,t.attrs),h(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function v(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var l=u++;n=a||(a=d(e)),r=m.bind(null,n,l,!1),o=m.bind(null,n,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=c(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(a),u&&URL.revokeObjectURL(u)}.bind(null,n,e),o=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=d(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){p(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return s(n,e),function(t){for(var o=[],i=0;i<n.length;i++){var a=n[i];(u=r[a.id]).refs--,o.push(u)}for(t&&s(f(t,e),e),i=0;i<o.length;i++){var u;if(0===(u=o[i]).refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete r[u.id]}}}};var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=g(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(t,e,n){n.r(e);var r=n(0),o=n.n(r),i="up",a="down";function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var h=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?f(t):e}(this,c(e).call(this))).onClick=t.onClick.bind(f(f(t))),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,r.Component),function(t,e,n){e&&l(t.prototype,e),n&&l(t,n)}(e,[{key:"onClick",value:function(){(0,this.props.onClick)()}},{key:"getDefaultButtonContent",value:function(){var t=this.props.direction===i?"36px":"20px";return o.a.createElement("span",{style:{fontSize:t}},"A")}},{key:"render",value:function(){var t=this.props.direction,e=this.props,n=e.style,r=void 0===n?{}:n,i=e.customButton,a=void 0===i?this.getDefaultButtonContent():i;return o.a.createElement("div",{className:"font-size-".concat(t),style:r,onClick:this.onClick},a)}}]),e}();function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n(1);var m=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?g(t):e}(this,y(e).call(this))).handleChange.bind(g(g(t))),t.setChangeDirection.bind(g(g(t))),t.state={options:{stepSize:2,range:3},changeCount:0,changeDirection:null},t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(e,r.Component),function(t,e,n){e&&d(t.prototype,e),n&&d(t,n)}(e,[{key:"handleChange",value:function(t,e,n){this.props.onChange&&(0,this.props.onChange)(t,e,n)}},{key:"componentDidMount",value:function(){var t=this.props.options;this.setState({options:Object.assign({},this.state.options,t)})}},{key:"getFontSizeDetails",value:function(t){var e=parseFloat(t);return{value:e,unit:t.toString().replace(e.toString(),"")}}},{key:"applyFontSize",value:function(t){var e=this.state.options.stepSize,n=this.state.changeDirection===i?e:-1*e,r=window.getComputedStyle(t,null).getPropertyValue("font-size"),o=this.getFontSizeDetails(r).value,a=o+n;t.style.fontSize=a+"px",a!==o&&this.handleChange(t,a,o)}},{key:"iterateChildren",value:function(t){if(this.applyFontSize(t),t.children&&0!==t.children.length){var e=!0,n=!1,r=void 0;try{for(var o,i=t.children[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;this.iterateChildren(a)}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}}},{key:"updateChangeCount",value:function(){var t=this.state,e=t.changeCount,n=t.changeDirection===i?1:-1;this.setState({changeCount:e+n})}},{key:"iterateElementsAndApplyFontSizeChange",value:function(){var t=this.props.targets,e=!0,n=!1,r=void 0;try{for(var o,i=t[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value,u=document.querySelectorAll(a),l=!0,c=!1,s=void 0;try{for(var f,h=u[Symbol.iterator]();!(l=(f=h.next()).done);l=!0){var p=f.value;this.iterateChildren(p)}}catch(t){c=!0,s=t}finally{try{l||null==h.return||h.return()}finally{if(c)throw s}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}this.updateChangeCount()}},{key:"validateChangePerRange",value:function(){var t=this.state,e=t.changeCount,n=t.changeDirection,r=this.state.options.range,o=!0;return n===i&&e>=r&&(o=!1),n===a&&e<=-1*r&&(o=!1),o}},{key:"initFontSizeChange",value:function(){this.validateChangePerRange()&&this.iterateElementsAndApplyFontSizeChange()}},{key:"setChangeDirection",value:function(t,e){var n=t?i:a;this.setState({changeDirection:n},e)}},{key:"onFontSizeUp",value:function(){this.setChangeDirection(!0,this.initFontSizeChange)}},{key:"onFontSizeDown",value:function(){this.setChangeDirection(!1,this.initFontSizeChange)}},{key:"getFontSizeChangerStyle",value:function(t){var e=t.style,n=void 0===e?{}:e,r=t.verticalAlignment,o=void 0!==r&&r,i=t.buttonsMargin,a=void 0===i?4:i,u=this.getFontSizeDetails(n.width||"40px"),l=this.getFontSizeDetails(n.height||"40px");return{width:(!1===o?2*u.value+a:u.value)+u.unit,height:(!1===o?l.value:2*l.value+a)+l.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(t,e){var n=e.style,r=void 0===n?{}:n,o=e.verticalAlignment,u=void 0!==o&&o,l=e.reverseOrder,c=void 0!==l&&l,s=e.buttonsMargin,f=void 0===s?4:s,h=this.getFontSizeDetails(r.width||"40px"),p=this.getFontSizeDetails(r.height||"40px"),d={width:h.value+h.unit,height:p.value+p.unit},y=f+(!1===u?h.unit:p.unit);return(t===i&&!1===c||t===a&&!0===c)&&(!1===u?d.marginRight=y:d.marginBottom=y),Object.assign({},r,d)}},{key:"render",value:function(){var t=this.props.customButtons,e=void 0===t?{}:t,n=e.up,r=e.down,u=this.getFontSizeChangerStyle(e),l=this.getFontSizeChangerButtonStyle(i,e),c=this.getFontSizeChangerButtonStyle(a,e);return o.a.createElement("div",{className:"font-size-changer",style:u},o.a.createElement("div",{className:"font-size-changer-buttons",style:u},o.a.createElement(h,{direction:i,customButton:n,onClick:this.onFontSizeUp.bind(this),style:l}),o.a.createElement(h,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:c})))}}]),e}();e.default=m}])})),rt=h(nt);function ot(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}1===(J=ot).length&&(K=J,J=function(t,e){return ot(K(t),e)});var it={value:function(){}};function at(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ut(r)}function ut(t){this._=t}function lt(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ct(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function st(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=it,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ut.prototype=at.prototype={constructor:ut,on:function(t,e){var n,r=this._,o=lt(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<a;)if(n=(t=o[i]).type)r[n]=st(r[n],t.name,e);else if(null==e)for(n in r)r[n]=st(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=ct(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ut(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};var ft="http://www.w3.org/1999/xhtml",ht={svg:"http://www.w3.org/2000/svg",xhtml:ft,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pt(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ht.hasOwnProperty(e)?{space:ht[e],local:t}:t}function dt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ft&&e.documentElement.namespaceURI===ft?e.createElement(t):e.createElementNS(n,t)}}function yt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function vt(t){var e=pt(t);return(e.local?yt:dt)(e)}function gt(){}function mt(t){return null==t?gt:function(){return this.querySelector(t)}}function wt(){return[]}function bt(t){return null==t?wt:function(){return this.querySelectorAll(t)}}function _t(t){return function(){return this.matches(t)}}function xt(t){return new Array(t.length)}function kt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}kt.prototype={constructor:kt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Et(t,e,n,r,o,i){for(var a,u=0,l=e.length,c=i.length;u<c;++u)(a=e[u])?(a.__data__=i[u],r[u]=a):n[u]=new kt(t,i[u]);for(;u<l;++u)(a=e[u])&&(o[u]=a)}function St(t,e,n,r,o,i,a){var u,l,c,s={},f=e.length,h=i.length,p=new Array(f);for(u=0;u<f;++u)(l=e[u])&&(p[u]=c="$"+a.call(l,l.__data__,u,e),c in s?o[u]=l:s[c]=l);for(u=0;u<h;++u)(l=s[c="$"+a.call(t,i[u],u,i)])?(r[u]=l,l.__data__=i[u],s[c]=null):n[u]=new kt(t,i[u]);for(u=0;u<f;++u)(l=e[u])&&s[p[u]]===l&&(o[u]=l)}function Nt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function At(t){return function(){this.removeAttribute(t)}}function Pt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ct(t,e){return function(){this.setAttribute(t,e)}}function Ot(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function jt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function zt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Tt(t){return function(){this.style.removeProperty(t)}}function Rt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ft(t,e){return t.style.getPropertyValue(e)||zt(t).getComputedStyle(t,null).getPropertyValue(e)}function Lt(t){return function(){delete this[t]}}function It(t,e){return function(){this[t]=e}}function qt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Bt(t){return t.trim().split(/^|\s+/)}function $t(t){return t.classList||new Ut(t)}function Ut(t){this._node=t,this._names=Bt(t.getAttribute("class")||"")}function Ht(t,e){for(var n=$t(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function Gt(t,e){for(var n=$t(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function Vt(t){return function(){Ht(this,t)}}function Wt(t){return function(){Gt(this,t)}}function Xt(t,e){return function(){(e.apply(this,arguments)?Ht:Gt)(this,t)}}function Yt(){this.textContent=""}function Jt(t){return function(){this.textContent=t}}function Kt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qt(){this.innerHTML=""}function Zt(t){return function(){this.innerHTML=t}}function te(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ee(){this.nextSibling&&this.parentNode.appendChild(this)}function ne(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function re(){return null}function oe(){var t=this.parentNode;t&&t.removeChild(this)}function ie(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ae(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Ut.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ue={},le=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ue={mouseenter:"mouseover",mouseleave:"mouseout"}));function ce(t,e,n){return t=se(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function se(t,e,n){return function(r){var o=le;le=r;try{t.call(this,this.__data__,e,n)}finally{le=o}}}function fe(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function he(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function pe(t,e,n){var r=ue.hasOwnProperty(t.type)?ce:se;return function(o,i,a){var u,l=this.__on,c=r(e,i,a);if(l)for(var s=0,f=l.length;s<f;++s)if((u=l[s]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=e);this.addEventListener(t.type,c,n),u={type:t.type,name:t.name,value:e,listener:c,capture:n},l?l.push(u):this.__on=[u]}}function de(t,e,n,r){var o=le;t.sourceEvent=le,le=t;try{return e.apply(n,r)}finally{le=o}}function ye(t,e,n){var r=zt(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function ve(t,e){return function(){return ye(this,t,e)}}function ge(t,e){return function(){return ye(this,t,e.apply(this,arguments))}}var me=[null];function we(t,e){this._groups=t,this._parents=e}function be(){return new we([[document.documentElement]],me)}function _e(t){return"string"==typeof t?new we([[document.querySelector(t)]],[document.documentElement]):new we([[t]],me)}function xe(){for(var t,e=le;t=e.sourceEvent;)e=t;return e}function ke(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function Ee(t){var e=xe();return e.changedTouches&&(e=e.changedTouches[0]),ke(t,e)}function Se(t,e,n){arguments.length<3&&(n=e,e=xe().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return ke(t,r);return null}function Ne(){le.stopImmediatePropagation()}function Ae(){le.preventDefault(),le.stopImmediatePropagation()}function Pe(t){var e=t.document.documentElement,n=_e(t).on("dragstart.drag",Ae,!0);"onselectstart"in e?n.on("selectstart.drag",Ae,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ce(t){return function(){return t}}function Oe(t,e,n,r,o,i,a,u,l,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=u,this.dy=l,this._=c}function Me(){return!le.ctrlKey&&!le.button}function je(){return this.parentNode}function ze(t){return null==t?{x:le.x,y:le.y}:t}function Te(){return navigator.maxTouchPoints||"ontouchstart"in this}function Re(){var t,e,n,r,o=Me,i=je,a=ze,u=Te,l={},c=at("start","drag","end"),s=0,f=0;function h(t){t.on("mousedown.drag",p).filter(u).on("touchstart.drag",v).on("touchmove.drag",g).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&o.apply(this,arguments)){var a=w("mouse",i.apply(this,arguments),Ee,this,arguments);a&&(_e(le.view).on("mousemove.drag",d,!0).on("mouseup.drag",y,!0),Pe(le.view),Ne(),n=!1,t=le.clientX,e=le.clientY,a("start"))}}function d(){if(Ae(),!n){var r=le.clientX-t,o=le.clientY-e;n=r*r+o*o>f}l.mouse("drag")}function y(){_e(le.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=_e(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ae,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(le.view,n),Ae(),l.mouse("end")}function v(){if(o.apply(this,arguments)){var t,e,n=le.changedTouches,r=i.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=w(n[t].identifier,r,Se,this,arguments))&&(Ne(),e("start"))}}function g(){var t,e,n=le.changedTouches,r=n.length;for(t=0;t<r;++t)(e=l[n[t].identifier])&&(Ae(),e("drag"))}function m(){var t,e,n=le.changedTouches,o=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(e=l[n[t].identifier])&&(Ne(),e("end"))}function w(t,e,n,r,o){var i,u,f,p=n(e,t),d=c.copy();if(de(new Oe(h,"beforestart",i,t,s,p[0],p[1],0,0,d),(function(){return null!=(le.subject=i=a.apply(r,o))&&(u=i.x-p[0]||0,f=i.y-p[1]||0,!0)})))return function a(c){var y,v=p;switch(c){case"start":l[t]=a,y=s++;break;case"end":delete l[t],--s;case"drag":p=n(e,t),y=s}de(new Oe(h,c,i,t,y,p[0]+u,p[1]+f,p[0]-v[0],p[1]-v[1],d),d.apply,d,[c,r,o])}}return h.filter=function(t){return arguments.length?(o="function"==typeof t?t:Ce(!!t),h):o},h.container=function(t){return arguments.length?(i="function"==typeof t?t:Ce(t),h):i},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:Ce(t),h):a},h.touchable=function(t){return arguments.length?(u="function"==typeof t?t:Ce(!!t),h):u},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h}function De(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Fe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Le(){}we.prototype=be.prototype={constructor:we,select:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a,u=e[o],l=u.length,c=r[o]=new Array(l),s=0;s<l;++s)(i=u[s])&&(a=t.call(i,i.__data__,s,u))&&("__data__"in i&&(a.__data__=i.__data__),c[s]=a);return new we(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=bt(t));for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,u=e[i],l=u.length,c=0;c<l;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),o.push(a));return new we(r,o)},filter:function(t){"function"!=typeof t&&(t=_t(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],u=a.length,l=r[o]=[],c=0;c<u;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&l.push(i);return new we(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var n=e?St:Et,r=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var i=o.length,a=new Array(i),u=new Array(i),l=new Array(i),c=0;c<i;++c){var s=r[c],f=o[c],h=f.length,p=t.call(s,s&&s.__data__,c,r),d=p.length,y=u[c]=new Array(d),v=a[c]=new Array(d);n(s,f,y,v,l[c]=new Array(h),p,e);for(var g,m,w=0,b=0;w<d;++w)if(g=y[w]){for(w>=b&&(b=w+1);!(m=v[b])&&++b<d;);g._next=m||null}}return(a=new we(a,r))._enter=u,a._exit=l,a},enter:function(){return new we(this._enter||this._groups.map(xt),this._parents)},exit:function(){return new we(this._exit||this._groups.map(xt),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(o=e(o)),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),u=0;u<i;++u)for(var l,c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new we(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Nt);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,u=n[i],l=u.length,c=o[i]=new Array(l),s=0;s<l;++s)(a=u[s])&&(c[s]=a);c.sort(e)}return new we(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,i=e[n],a=0,u=i.length;a<u;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=pt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Pt:At:"function"==typeof e?n.local?jt:Mt:n.local?Ot:Ct)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Tt:"function"==typeof e?Dt:Rt)(t,e,null==n?"":n)):Ft(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Lt:"function"==typeof e?qt:It)(t,e)):this.node()[t]},classed:function(t,e){var n=Bt(t+"");if(arguments.length<2){for(var r=$t(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?Xt:e?Vt:Wt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Yt:("function"==typeof t?Kt:Jt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qt:("function"==typeof t?te:Zt)(t)):this.node().innerHTML},raise:function(){return this.each(ee)},lower:function(){return this.each(ne)},append:function(t){var e="function"==typeof t?t:vt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:vt(t),r=null==e?re:"function"==typeof e?e:mt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(oe)},clone:function(t){return this.select(t?ae:ie)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=fe(t+""),a=i.length;if(!(arguments.length<2)){for(u=e?pe:he,null==n&&(n=!1),r=0;r<a;++r)this.each(u(i[r],e,n));return this}var u=this.node().__on;if(u)for(var l,c=0,s=u.length;c<s;++c)for(r=0,l=u[c];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?ge:ve)(t,e))}},Oe.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ie=1/.7,qe="\\s*([+-]?\\d+)\\s*",Be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ue=/^#([0-9a-f]{3,8})$/,He=new RegExp("^rgb\\("+[qe,qe,qe]+"\\)$"),Ge=new RegExp("^rgb\\("+[$e,$e,$e]+"\\)$"),Ve=new RegExp("^rgba\\("+[qe,qe,qe,Be]+"\\)$"),We=new RegExp("^rgba\\("+[$e,$e,$e,Be]+"\\)$"),Xe=new RegExp("^hsl\\("+[Be,$e,$e]+"\\)$"),Ye=new RegExp("^hsla\\("+[Be,$e,$e,Be]+"\\)$"),Je={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ke(){return this.rgb().formatHex()}function Qe(){return this.rgb().formatRgb()}function Ze(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ue.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tn(e):3===n?new on(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?en(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?en(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=He.exec(t))?new on(e[1],e[2],e[3],1):(e=Ge.exec(t))?new on(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ve.exec(t))?en(e[1],e[2],e[3],e[4]):(e=We.exec(t))?en(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xe.exec(t))?cn(e[1],e[2]/100,e[3]/100,1):(e=Ye.exec(t))?cn(e[1],e[2]/100,e[3]/100,e[4]):Je.hasOwnProperty(t)?tn(Je[t]):"transparent"===t?new on(NaN,NaN,NaN,0):null}function tn(t){return new on(t>>16&255,t>>8&255,255&t,1)}function en(t,e,n,r){return r<=0&&(t=e=n=NaN),new on(t,e,n,r)}function nn(t){return t instanceof Le||(t=Ze(t)),t?new on((t=t.rgb()).r,t.g,t.b,t.opacity):new on}function rn(t,e,n,r){return 1===arguments.length?nn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function an(){return"#"+ln(this.r)+ln(this.g)+ln(this.b)}function un(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ln(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function cn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fn(t,e,n,r)}function sn(t){if(t instanceof fn)return new fn(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ze(t)),!t)return new fn;if(t instanceof fn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,u=i-o,l=(i+o)/2;return u?(a=e===i?(n-r)/u+6*(n<r):n===i?(r-e)/u+2:(e-n)/u+4,u/=l<.5?i+o:2-i-o,a*=60):u=l>0&&l<1?0:a,new fn(a,u,l,t.opacity)}function fn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function hn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function pn(t){return function(){return t}}function dn(t){return 1==(t=+t)?yn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):pn(isNaN(e)?n:e)}}function yn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):pn(isNaN(t)?e:t)}De(Le,Ze,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ke,formatHex:Ke,formatHsl:function(){return sn(this).formatHsl()},formatRgb:Qe,toString:Qe}),De(on,rn,Fe(Le,{brighter:function(t){return t=null==t?Ie:Math.pow(Ie,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:an,formatHex:an,formatRgb:un,toString:un})),De(fn,(function(t,e,n,r){return 1===arguments.length?sn(t):new fn(t,e,n,null==r?1:r)}),Fe(Le,{brighter:function(t){return t=null==t?Ie:Math.pow(Ie,t),new fn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new on(hn(t>=240?t-240:t+120,o,r),hn(t,o,r),hn(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var vn=function t(e){var n=dn(e);function r(t,e){var r=n((t=rn(t)).r,(e=rn(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=yn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function gn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var mn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wn=new RegExp(mn.source,"g");function bn(t,e){var n,r,o,i=mn.lastIndex=wn.lastIndex=0,a=-1,u=[],l=[];for(t+="",e+="";(n=mn.exec(t))&&(r=wn.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:gn(n,r)})),i=wn.lastIndex;return i<e.length&&(o=e.slice(i),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)u[(n=l[r]).i]=n.x(t);return u.join("")})}var _n,xn,kn,En,Sn=180/Math.PI,Nn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function An(t,e,n,r,o,i){var a,u,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,l/=u),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Sn,skewX:Math.atan(l)*Sn,scaleX:a,scaleY:u}}function Pn(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var u=[],l=[];return i=t(i),a=t(a),function(t,r,o,i,a,u){if(t!==o||r!==i){var l=a.push("translate(",null,e,null,n);u.push({i:l-4,x:gn(t,o)},{i:l-2,x:gn(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,u,l),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:gn(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,u,l),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:gn(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,u,l),function(t,e,n,r,i,a){if(t!==n||e!==r){var u=i.push(o(i)+"scale(",null,",",null,")");a.push({i:u-4,x:gn(t,n)},{i:u-2,x:gn(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,u,l),i=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)u[(e=l[n]).i]=e.x(t);return u.join("")}}}var Cn,On,Mn=Pn((function(t){return"none"===t?Nn:(_n||(_n=document.createElement("DIV"),xn=document.documentElement,kn=document.defaultView),_n.style.transform=t,t=kn.getComputedStyle(xn.appendChild(_n),null).getPropertyValue("transform"),xn.removeChild(_n),An(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),jn=Pn((function(t){return null==t?Nn:(En||(En=document.createElementNS("http://www.w3.org/2000/svg","g")),En.setAttribute("transform",t),(t=En.transform.baseVal.consolidate())?An((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Nn)}),", ",")",")"),zn=0,Tn=0,Rn=0,Dn=0,Fn=0,Ln=0,In="object"==typeof performance&&performance.now?performance:Date,qn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bn(){return Fn||(qn($n),Fn=In.now()+Ln)}function $n(){Fn=0}function Un(){this._call=this._time=this._next=null}function Hn(t,e,n){var r=new Un;return r.restart(t,e,n),r}function Gn(){Fn=(Dn=In.now())+Ln,zn=Tn=0;try{!function(){Bn(),++zn;for(var t,e=Cn;e;)(t=Fn-e._time)>=0&&e._call.call(null,t),e=e._next;--zn}()}finally{zn=0,function(){var t,e,n=Cn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Cn=e);On=t,Wn(r)}(),Fn=0}}function Vn(){var t=In.now(),e=t-Dn;e>1e3&&(Ln-=e,Dn=t)}function Wn(t){zn||(Tn&&(Tn=clearTimeout(Tn)),t-Fn>24?(t<1/0&&(Tn=setTimeout(Gn,t-In.now()-Ln)),Rn&&(Rn=clearInterval(Rn))):(Rn||(Dn=In.now(),Rn=setInterval(Vn,1e3)),zn=1,qn(Gn)))}function Xn(t,e,n){var r=new Un;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Un.prototype=Hn.prototype={constructor:Un,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Bn():+n)+(null==e?0:+e),this._next||On===this||(On?On._next=this:Cn=this,On=this),this._call=t,this._time=n,Wn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wn())}};var Yn=at("start","end","cancel","interrupt"),Jn=[];function Kn(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(i){var c,s,f,h;if(1!==n.state)return l();for(c in o)if((h=o[c]).name===n.name){if(3===h.state)return Xn(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete o[c])}if(Xn((function(){3===n.state&&(n.state=4,n.timer.restart(u,n.delay,n.time),u(i))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),c=0,s=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++s]=h);r.length=s+1}}function u(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=Hn(i,0,n.time)}(t,n,{name:e,index:r,group:o,on:Yn,tween:Jn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function Qn(t,e){var n=tr(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Zn(t,e){var n=tr(t,e);if(n.state>3)throw new Error("too late; already running");return n}function tr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function er(t,e){var n,r;return function(){var o=Zn(this,t),i=o.tween;if(i!==n)for(var a=0,u=(r=n=i).length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function nr(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=Zn(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var u={name:e,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===e){o[l]=u;break}l===c&&o.push(u)}i.tween=o}}function rr(t,e,n){var r=t._id;return t.each((function(){var t=Zn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return tr(t,r).value[e]}}function or(t,e){var n;return("number"==typeof e?gn:e instanceof Ze?vn:(n=Ze(e))?(e=n,vn):bn)(t,e)}function ir(t){return function(){this.removeAttribute(t)}}function ar(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ur(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function lr(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function cr(t,e,n){var r,o,i;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(u=l+"")?null:a===r&&u===o?i:(o=u,i=e(r=a,l));this.removeAttribute(t)}}function sr(t,e,n){var r,o,i;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(u=l+"")?null:a===r&&u===o?i:(o=u,i=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function fr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function hr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function pr(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&hr(t,o)),n}return o._value=e,o}function dr(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&fr(t,o)),n}return o._value=e,o}function yr(t,e){return function(){Qn(this,t).delay=+e.apply(this,arguments)}}function vr(t,e){return e=+e,function(){Qn(this,t).delay=e}}function gr(t,e){return function(){Zn(this,t).duration=+e.apply(this,arguments)}}function mr(t,e){return e=+e,function(){Zn(this,t).duration=e}}function wr(t,e){if("function"!=typeof e)throw new Error;return function(){Zn(this,t).ease=e}}function br(t,e,n){var r,o,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Qn:Zn;return function(){var a=i(this,t),u=a.on;u!==r&&(o=(r=u).copy()).on(e,n),a.on=o}}var _r=be.prototype.constructor;function xr(t){return function(){this.style.removeProperty(t)}}function kr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Er(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&kr(t,i,n)),r}return i._value=e,i}function Sr(t){return function(e){this.textContent=t.call(this,e)}}function Nr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Sr(r)),e}return r._value=t,r}var Ar=0;function Pr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Cr(){return++Ar}var Or=be.prototype;Pr.prototype={constructor:Pr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=mt(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var u,l,c=r[a],s=c.length,f=i[a]=new Array(s),h=0;h<s;++h)(u=c[h])&&(l=t.call(u,u.__data__,h,c))&&("__data__"in u&&(l.__data__=u.__data__),f[h]=l,Kn(f[h],e,n,h,f,tr(u,n)));return new Pr(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=bt(t));for(var r=this._groups,o=r.length,i=[],a=[],u=0;u<o;++u)for(var l,c=r[u],s=c.length,f=0;f<s;++f)if(l=c[f]){for(var h,p=t.call(l,l.__data__,f,c),d=tr(l,n),y=0,v=p.length;y<v;++y)(h=p[y])&&Kn(h,e,n,y,p,d);i.push(p),a.push(l)}return new Pr(i,a,e,n)},filter:function(t){"function"!=typeof t&&(t=_t(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],u=a.length,l=r[o]=[],c=0;c<u;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&l.push(i);return new Pr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),u=0;u<i;++u)for(var l,c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new Pr(a,this._parents,this._name,this._id)},selection:function(){return new _r(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Cr(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],l=u.length,c=0;c<l;++c)if(a=u[c]){var s=tr(a,e);Kn(a,t,n,c,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Pr(r,this._parents,t,n)},call:Or.call,nodes:Or.nodes,node:Or.node,size:Or.size,empty:Or.empty,each:Or.each,on:function(t,e){var n=this._id;return arguments.length<2?tr(this.node(),n).on.on(t):this.each(br(n,t,e))},attr:function(t,e){var n=pt(t),r="transform"===n?jn:or;return this.attrTween(t,"function"==typeof e?(n.local?sr:cr)(n,r,rr(this,"attr."+t,e)):null==e?(n.local?ar:ir)(n):(n.local?lr:ur)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=pt(t);return this.tween(n,(r.local?pr:dr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Mn:or;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=Ft(this,t),a=(this.style.removeProperty(t),Ft(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,xr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=Ft(this,t),u=n(this),l=u+"";return null==u&&(this.style.removeProperty(t),l=u=Ft(this,t)),a===l?null:a===r&&l===o?i:(o=l,i=e(r=a,u))}}(t,r,rr(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,u="end."+a;return function(){var l=Zn(this,t),c=l.on,s=null==l.value[a]?i||(i=xr(e)):void 0;c===n&&o===s||(r=(n=c).copy()).on(u,o=s),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=Ft(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Er(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(rr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Nr(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=tr(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===t)return r.value;return null}return this.each((null==e?er:nr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?yr:vr)(e,t)):tr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?gr:mr)(e,t)):tr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(wr(e,t)):tr(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var u={value:a},l={value:function(){0==--o&&i()}};n.each((function(){var n=Zn(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(l)),n.on=e}))}))}};var Mr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function jr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Mr.time=Bn(),Mr;return n}be.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete t.__transition}}(this,t)}))},be.prototype.transition=function(t){var e,n;t instanceof Pr?(e=t._id,t=t._name):(e=Cr(),(n=Mr).time=Bn(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],l=u.length,c=0;c<l;++c)(a=u[c])&&Kn(a,t,e,c,u,n||jr(a,e));return new Pr(r,this._parents,t,e)};function zr(){}function Tr(t,e){var n=new zr;if(t instanceof zr)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==e)for(;++o<i;)n.set(o,t[o]);else for(;++o<i;)n.set(e(r=t[o],o,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function Rr(){}zr.prototype=Tr.prototype={constructor:zr,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Dr=Tr.prototype;function Fr(t){return function(){return t}}function Lr(){return 1e-6*(Math.random()-.5)}function Ir(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,u,l,c,s,f,h,p=t._root,d={data:r},y=t._x0,v=t._y0,g=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(i=(y+g)/2))?y=i:g=i,(s=n>=(a=(v+m)/2))?v=a:m=a,o=p,!(p=p[f=s<<1|c]))return o[f]=d,t;if(u=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===u&&n===l)return d.next=p,o?o[f]=d:t._root=d,t;do{o=o?o[f]=new Array(4):t._root=new Array(4),(c=e>=(i=(y+g)/2))?y=i:g=i,(s=n>=(a=(v+m)/2))?v=a:m=a}while((f=s<<1|c)==(h=(l>=a)<<1|u>=i));return o[h]=p,o[f]=d,t}function qr(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}function Br(t){return t[0]}function $r(t){return t[1]}function Ur(t,e,n){var r=new Hr(null==e?Br:e,null==n?$r:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Hr(t,e,n,r,o,i){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function Gr(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Rr.prototype={constructor:Rr,has:Dr.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Dr.remove,clear:Dr.clear,values:Dr.keys,size:Dr.size,empty:Dr.empty,each:Dr.each};var Vr=Ur.prototype=Hr.prototype;function Wr(t){return t.x+t.vx}function Xr(t){return t.y+t.vy}function Yr(t){return t.index}function Jr(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Kr(t){return t.x}function Qr(t){return t.y}Vr.copy=function(){var t,e,n=new Hr(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Gr(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(e=r.source[o])&&(e.length?t.push({source:e,target:r.target[o]=new Array(4)}):r.target[o]=Gr(e));return n},Vr.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Ir(this.cover(e,n),e,n,t)},Vr.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),u=new Array(i),l=1/0,c=1/0,s=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=r,u[n]=o,r<l&&(l=r),r>s&&(s=r),o<c&&(c=o),o>f&&(f=o));if(l>s||c>f)return this;for(this.cover(l,c).cover(s,f),n=0;n<i;++n)Ir(this,a[n],u[n],t[n]);return this},Vr.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,i=(r=Math.floor(e))+1;else{for(var a,u,l=o-n,c=this._root;n>t||t>=o||r>e||e>=i;)switch(u=(e<r)<<1|t<n,(a=new Array(4))[u]=c,c=a,l*=2,u){case 0:o=n+l,i=r+l;break;case 1:n=o-l,i=r+l;break;case 2:o=n+l,r=i-l;break;case 3:n=o-l,r=i-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},Vr.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Vr.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Vr.find=function(t,e,n){var r,o,i,a,u,l,c,s=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],y=this._root;for(y&&d.push(new qr(y,s,f,h,p)),null==n?n=1/0:(s=t-n,f=e-n,h=t+n,p=e+n,n*=n);l=d.pop();)if(!(!(y=l.node)||(o=l.x0)>h||(i=l.y0)>p||(a=l.x1)<s||(u=l.y1)<f))if(y.length){var v=(o+a)/2,g=(i+u)/2;d.push(new qr(y[3],v,g,a,u),new qr(y[2],o,g,v,u),new qr(y[1],v,i,a,g),new qr(y[0],o,i,v,g)),(c=(e>=g)<<1|t>=v)&&(l=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=l)}else{var m=t-+this._x.call(null,y.data),w=e-+this._y.call(null,y.data),b=m*m+w*w;if(b<n){var _=Math.sqrt(n=b);s=t-_,f=e-_,h=t+_,p=e+_,r=y.data}}return r},Vr.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,o,i,a,u,l,c,s,f,h,p=this._root,d=this._x0,y=this._y0,v=this._x1,g=this._y1;if(!p)return this;if(p.length)for(;;){if((c=i>=(u=(d+v)/2))?d=u:v=u,(s=a>=(l=(y+g)/2))?y=l:g=l,e=p,!(p=p[f=s<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(o=p.next)&&delete p.next,r?(o?r.next=o:delete r.next,this):e?(o?e[f]=o:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=o,this)},Vr.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Vr.root=function(){return this._root},Vr.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Vr.visit=function(t){var e,n,r,o,i,a,u=[],l=this._root;for(l&&u.push(new qr(l,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(l=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&l.length){var c=(r+i)/2,s=(o+a)/2;(n=l[3])&&u.push(new qr(n,c,s,i,a)),(n=l[2])&&u.push(new qr(n,r,s,c,a)),(n=l[1])&&u.push(new qr(n,c,o,i,s)),(n=l[0])&&u.push(new qr(n,r,o,c,s))}return this},Vr.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new qr(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var i,a=e.x0,u=e.y0,l=e.x1,c=e.y1,s=(a+l)/2,f=(u+c)/2;(i=o[0])&&n.push(new qr(i,a,u,s,f)),(i=o[1])&&n.push(new qr(i,s,u,l,f)),(i=o[2])&&n.push(new qr(i,a,f,s,c)),(i=o[3])&&n.push(new qr(i,s,f,l,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Vr.x=function(t){return arguments.length?(this._x=t,this):this._x},Vr.y=function(t){return arguments.length?(this._y=t,this):this._y};var Zr=Math.PI*(3-Math.sqrt(5));function to(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var eo=Array.prototype.slice,no={name:"implicit"};function ro(){var t=Tr(),e=[],n=[],r=no;function o(o){var i=o+"",a=t.get(i);if(!a){if(r!==no)return r;t.set(i,a=e.push(o))}return n[(a-1)%n.length]}return o.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Tr();for(var r,i,a=-1,u=n.length;++a<u;)t.has(i=(r=n[a])+"")||t.set(i,e.push(r));return o},o.range=function(t){return arguments.length?(n=eo.call(t),o):n.slice()},o.unknown=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return ro(e,n).unknown(r)},to.apply(o,arguments),o}var oo=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),io=p((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",o="image/jpeg",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:o,jpeg:o,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r,o},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);e(new Blob([o],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var o=n.createElement("a");return n.body.appendChild(o),r.href=e,o.href=t,o.href},getAndEncode:function(t){var e=3e4;u.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,o=new XMLHttpRequest;if(o.onreadystatechange=a,o.ontimeout=l,o.responseType="blob",o.timeout=e,o.open("GET",t,!0),o.send(),u.impl.options.imagePlaceholder){var i=u.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(r=i[1])}function a(){if(4===o.readyState)if(200===o.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];n(t)},e.readAsDataURL(o.response)}else r?n(r):c("cannot fetch resource: "+t+", status: "+o.status)}function l(){r?n(r):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(t){console.error(t),n("")}}))},uid:function(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,i){return a()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return o(e,t,n,i)}))})),r}));function a(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:o}};function e(e){return-1!==e.search(t)}function r(e){for(var r,o=[];null!==(r=t.exec(e));)o.push(r[1]);return o.filter((function(t){return!n.isDataUrl(t)}))}function o(t,e,r,o){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(o||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),o=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),i=function(){return{inlineAll:function e(o){return o instanceof Element?i(o).then((function(){return o instanceof HTMLImageElement?t(o).inline():Promise.all(n.asArray(o.childNodes).map((function(t){return e(t)})))})):Promise.resolve(o);function i(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},u={toSvg:l,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return c(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return c(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:o,images:i,util:n,inliner:r,options:{}}};function l(t,e){return function(t){void 0===t.imagePlaceholder?u.impl.options.imagePlaceholder=a.imagePlaceholder:u.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?u.impl.options.cacheBust=a.cacheBust:u.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return s(t,e.filter,!0)})).then(f).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function c(t,e){return l(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var o=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var o=r.getContext("2d");o.fillStyle=e.bgcolor,o.fillRect(0,0,r.width,r.height)}return r}(t);return o.getContext("2d").drawImage(r,0,0),o}))}function s(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(r){return function(t,e,r){var o=t.childNodes;return 0===o.length?Promise.resolve(e):i(e,n.asArray(o),r).then((function(){return e}));function i(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return s(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}}(t,r,e)})).then((function(e){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(o).then(i).then(a).then((function(){return e})):e;function r(){function r(t,e){function r(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:r(t,e)}r(window.getComputedStyle(t),e.style)}function o(){function r(r){var o=window.getComputedStyle(t,r),i=o.getPropertyValue("content");if(""!==i&&"none"!==i){var a=n.uid();e.className=e.className+" "+a;var u=document.createElement("style");u.appendChild(l(a,r,o)),e.appendChild(u)}function l(t,e,r){var o="."+t+":"+e,i=r.cssText?a(r):u(r);return document.createTextNode(o+"{"+i+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function u(t){return n.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){r(t)}))}function i(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(t,e)})):Promise.resolve()}function f(t){return o.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return i.inlineAll(t).then((function(){return t}))}t.exports=u}()}));const ao=require("jszip"),uo=require("react-file-download"),lo=t=>{const{nodes:e,links:n}=t,r=n.map((t=>{let{source:n,target:r}=t;return{source:e[n].name,target:e[r].name,sourceType:e[n].type,targetType:e[r].type}})),{nodeMap:o,nodesTsv:i}=(t=>{let e=1e7;const n={};let r=!1;t.forEach((t=>{let{source:o,target:i,sourceType:a,targetType:u}=t;""!==i&&""!==o&&(Object.keys(n).indexOf(o)<0?(""!==a?(r=!0,n[o]={ID:e,WEIGHT:1,NODE_TYPE:a}):n[o]={ID:e,WEIGHT:1},e+=1):n[o].WEIGHT+=1,Object.keys(n).indexOf(i)<0?(""!==u?(r=!0,n[i]={ID:e,WEIGHT:1,NODE_TYPE:u}):n[i]={ID:e,WEIGHT:1},e+=1):n[i].WEIGHT+=1)}));let o=r?"ID\tLABEL\tWEIGHT\tNODE_TYPE\r\n":"ID\tLABEL\tWEIGHT\r\n";return Object.keys(n).forEach((t=>{const e=n[t].ID,i=n[t].WEIGHT,a=r?n[t].NODE_TYPE:"";o+=r?`${e}\t${t}\t${i}\t${a}\r\n`:`${e}\t${t}\t${i}\r\n`})),{nodeMap:n,nodesTsv:o}})(r),a=((t,e)=>{let n="SOURCE\tTARGET\tWEIGHT\tTYPE\r\n";return t.forEach((t=>{let{source:r,target:o}=t;if(""===o||""===r)return;const i=e[r].ID,a=e[o].ID;n+=`${i}\t${a}\t1\tUndirected\r\n`})),n})(r,o),u=new ao;u.file("Node_Table.tsv",i),u.file("Edge_Table.tsv",a),u.generateAsync({type:"blob"}).then((t=>{uo(t,"Gephi_generated_by_NMTL.zip")}))},co=t=>{let{fill:e="#825c0d"}=t;return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},n.createElement("defs",null,n.createElement("clipPath",{id:"a"},n.createElement("path",{"data-name":"Rectangle 125",style:{fill:"#fff"},d:"M0 0h32v32H0z"}))),n.createElement("g",{style:{clipPath:"url(#a)"}},n.createElement("path",{d:"M-960 600h-20v-10h4v2h-2v6h16v-6h-2v-2h4zm-5.06-12.608-1.348-1.454-2.592 2.427V580h-2v8.365l-2.544-2.427-1.362 1.454 4.948 4.671z",transform:"translate(986 -574)",style:{fill:e},"data-name":"Mask Group 42"})))},so=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_128","data-name":"Rectangle 128",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_47","data-name":"Mask Group 47",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3633","data-name":"Group 3633",transform:"translate(6 6)"},e.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z",transform:"translate(-495 -369)"}),e.createElement("g",{id:"Group_3632","data-name":"Group 3632",transform:"translate(0 2)"},e.createElement("path",{id:"Path_182","data-name":"Path 182",className:"cls-3",d:"M502.276 371h3.447L512 389h-3.164l-1.595-5.129h-6.586L499.036 389H496zm-.926 10.649h5.17l-.746-2.419c-.643-1.953-1.209-3.956-1.776-5.983h-.128a126.193 126.193 0 0 1-1.748 5.983z",transform:"translate(-496 -371)"})))))},fo=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_129","data-name":"Rectangle 129",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_48","data-name":"Mask Group 48",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3635","data-name":"Group 3635",transform:"translate(6 8)"},e.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M510 371v2h6v-2z",transform:"translate(-495 -371)"}),e.createElement("g",{id:"Group_3632","data-name":"Group 3632"},e.createElement("path",{id:"Path_182","data-name":"Path 182",className:"cls-3",d:"M502.276 371h3.447L512 389h-3.164l-1.595-5.129h-6.586L499.036 389H496zm-.926 10.649h5.17l-.746-2.419c-.643-1.953-1.209-3.956-1.776-5.983h-.128a126.193 126.193 0 0 1-1.748 5.983z",transform:"translate(-496 -371)"})))))},ho=t=>{let{fill:n="#825c0d"}=t;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},e.createElement("defs",null,e.createElement("clipPath",{id:"clip-path"},e.createElement("path",{id:"Rectangle_124","data-name":"Rectangle 124",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),e.createElement("style",null,`\n .cls-3{fill:${n}}\n `)),e.createElement("g",{id:"Mask_Group_46","data-name":"Mask Group 46",style:{clipPath:"url(#clip-path)"}},e.createElement("g",{id:"Group_3629","data-name":"Group 3629",transform:"translate(6 6.001)"},e.createElement("path",{id:"Path_176","data-name":"Path 176",className:"cls-3",d:"M-721 1949.376h2.5v-3.755h3.755v-2.5H-721z",transform:"translate(721.003 -1943.118)"}),e.createElement("path",{id:"Path_177","data-name":"Path 177",className:"cls-3",d:"M-721 1960.376h6.258v-2.5h-3.758v-3.755h-2.5z",transform:"translate(721.003 -1940.376)"}),e.createElement("path",{id:"Path_178","data-name":"Path 178",className:"cls-3",d:"M-703.744 1943.118H-710v2.5h3.755v3.755h2.5z",transform:"translate(723.744 -1943.118)"}),e.createElement("path",{id:"Path_179","data-name":"Path 179",className:"cls-3",d:"M-703.744 1960.376v-6.259h-2.5v3.755H-710v2.5z",transform:"translate(723.744 -1940.376)"}))))};b('.SNA {\n overflow: hidden;\n object-fit: contain;\n position: relative;\n font-size: 0.75rem;\n width: 100%; }\n .SNA--smallSize .node {\n padding-top: 8px;\n font-size: 0.75rem;\n width: 3rem;\n height: 3rem;\n overflow: hidden;\n white-space: pre-wrap;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical; }\n .SNA .node {\n background-color: #4a4e69;\n border-radius: 50%;\n color: #fff;\n font-size: 20px;\n font-weight: 500;\n height: 54px;\n width: 54px;\n padding-top: 15px;\n position: absolute;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: grab; }\n .SNA .links line {\n stroke: #c7bfb4;\n stroke-width: 2; }\n .SNA .mainNode {\n fill: #4e3a16; }\n .SNA .person {\n fill: #867b3a; }\n .SNA .publication {\n fill: #825c0d; }\n .SNA .article {\n fill: #afafaf; }\n .SNA .keyword {\n fill: #fcfae8; }\n .SNA .org {\n fill: #000000; }\n .SNA__tool {\n display: flex;\n justify-content: flex-end;\n padding-right: 20px;\n padding-top: 12px; }\n .SNA__share {\n margin-right: 16px; }\n .SNA__download {\n cursor: pointer;\n margin-right: 16px; }\n .SNA__fullscreenBtn {\n cursor: pointer;\n margin-right: 16px;\n padding-top: 0; }\n .SNA .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .SNA .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .SNA .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n\n#download-menu .MuiMenuItem-root {\n color: #4e3a16;\n width: auto;\n overflow: hidden;\n font-size: 1rem;\n box-sizing: border-box;\n min-height: 48px;\n font-family: "Roboto", "Helvetica", "Arial", sans-serif;\n font-weight: 400;\n line-height: 1;\n padding-top: 1rem;\n white-space: initial;\n border-bottom: 0;\n letter-spacing: 0.00938em;\n padding-bottom: 1rem; }\n\n@media only screen and (max-width: 484px) {\n .SNA {\n margin-left: 0px; }\n .SNA .node {\n background-color: #4a4e69;\n border-radius: 50%;\n color: #fff;\n font-size: 1px;\n font-weight: 500;\n height: 44px;\n width: 44px;\n padding-top: 12px;\n position: absolute;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: grab; } }\n\n@media only screen and (max-width: 484px) {\n .SNA {\n margin-left: 0px; } }\n');var po=function(e){var l=e.className,c=e.intl,s=e.width,h=e.height,p=e.distance,d=e.SNAData,y=e.fontColor,v=e.backgroundColor,b=e.iconColor,_=e.handleClickNodeGoto;if(!d||0===d.nodes.length)return n.createElement("div",{className:"noData"},c?c.formatMessage({id:"common.noData"}):"暫無資料");var x=function(){var t=o(!1),e=t[0],n=t[1],l=i(null);a((function(){var t=function(){n(P.fullscreenElement===l.current)};return P.addEventListener("fullscreenchange",t),function(){return P.removeEventListener("fullscreenchange",t)}}),[]);var c=u((function(){return P.fullscreenElement?P.exitFullscreen().then((function(){return P.requestFullscreen(l.current)})):l.current?P.requestFullscreen(l.current):void 0}),[]),s=u((function(){return P.fullscreenElement===l.current?P.exitFullscreen():Promise.resolve()}),[]);return r((function(){return{active:e,enter:c,exit:s,node:l}}),[e,c,s])}(),k=o(null),E=t(k,2),S=E[0],N=E[1],A=function(t){switch(t){case"img":(t=>{let{id:e,fileName:n="image",quality:r=.95}=t;const o=document.getElementById(e);io.toPng(o,{quality:r}).then((t=>{const e=document.createElement("a");e.download=`${n}.png`,e.href=t,e.click()})).catch((t=>{console.error("oops, something went wrong!",t)}))})({id:"network-graph"});break;case"gephi":lo(d)}},O=r((function(){return x.active?screen.width:screen.width>1050?s:screen.width-80}),[x.active,screen.width]),M=r((function(){return x.active?screen.height:screen.width>1050?h:screen.height-300}),[x.active,screen.width]),j=function(t,e,n){var r=function(t,e,n){var r=.5*(e.x+t.x),o=.5*(e.y+t.y),i=e.x-t.x,a=e.y-t.y,u=Math.pow(Math.pow(i,2)+Math.pow(a,2),.5);return{qx:r-a*n/u,qy:o+i*n/u}}(t,e,n),o=r.qx,i=r.qy;return isNaN(o)?"M".concat(t.x,", ").concat(t.y," Q0 0 ").concat(e.x," ").concat(e.y):"M".concat(t.x,", ").concat(t.y," Q").concat(o," ").concat(i," ").concat(e.x," ").concat(e.y)},z=function(t){var e=8.5,n="-0 -".concat(e," ").concat(17," ").concat(17),r="M 0,-".concat(6.800000000000001," L ").concat(13.600000000000001," ,0 L 0,").concat(6.800000000000001),o=ro(oo),i=t.links.map((function(t){return Object.create(t)})),a=t.nodes.map((function(t){return Object.create(t)})),u=function(t){var e,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,a=.6,u=Tr(),l=Hn(s),c=at("tick","end");function s(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(r){var l,c,s=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(i-n)*o,u.each((function(t){t(n)})),l=0;l<s;++l)null==(c=t[l]).fx?c.x+=c.vx*=a:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=a:(c.y=c.fy,c.vy=0);return e}function h(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var o=10*Math.sqrt(n),i=n*Zr;e.x=o*Math.cos(i),e.y=o*Math.sin(i)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),h(),e={tick:f,restart:function(){return l.restart(s),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),u.each(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(o=+t,e):+o},alphaTarget:function(t){return arguments.length?(i=+t,e):i},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?u.remove(t):u.set(t,p(n)),e):u.get(t)},find:function(e,n,r){var o,i,a,u,l,c=0,s=t.length;for(null==r?r=1/0:r*=r,c=0;c<s;++c)(a=(o=e-(u=t[c]).x)*o+(i=n-u.y)*i)<r&&(l=u,r=a);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}(a).force("link",function(t){var e,n,r,o,i,a=Yr,u=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},l=Fr(30),c=1;function s(r){for(var o=0,a=t.length;o<c;++o)for(var u,l,s,f,h,p,d,y=0;y<a;++y)l=(u=t[y]).source,f=(s=u.target).x+s.vx-l.x-l.vx||Lr(),h=s.y+s.vy-l.y-l.vy||Lr(),f*=p=((p=Math.sqrt(f*f+h*h))-n[y])/p*r*e[y],h*=p,s.vx-=f*(d=i[y]),s.vy-=h*d,l.vx+=f*(d=1-d),l.vy+=h*d}function f(){if(r){var u,l,c=r.length,s=t.length,f=Tr(r,a);for(u=0,o=new Array(c);u<s;++u)(l=t[u]).index=u,"object"!=typeof l.source&&(l.source=Jr(f,l.source)),"object"!=typeof l.target&&(l.target=Jr(f,l.target)),o[l.source.index]=(o[l.source.index]||0)+1,o[l.target.index]=(o[l.target.index]||0)+1;for(u=0,i=new Array(s);u<s;++u)l=t[u],i[u]=o[l.source.index]/(o[l.source.index]+o[l.target.index]);e=new Array(s),h(),n=new Array(s),p()}}function h(){if(r)for(var n=0,o=t.length;n<o;++n)e[n]=+u(t[n],n,t)}function p(){if(r)for(var e=0,o=t.length;e<o;++e)n[e]=+l(t[e],e,t)}return null==t&&(t=[]),s.initialize=function(t){r=t,f()},s.links=function(e){return arguments.length?(t=e,f(),s):t},s.id=function(t){return arguments.length?(a=t,s):a},s.iterations=function(t){return arguments.length?(c=+t,s):c},s.strength=function(t){return arguments.length?(u="function"==typeof t?t:Fr(+t),h(),s):u},s.distance=function(t){return arguments.length?(l="function"==typeof t?t:Fr(+t),p(),s):l},s}(i).id((function(t){return t.index})).distance(50)).force("charge",function(){var t,e,n,r,o=Fr(-30),i=1,a=1/0,u=.81;function l(r){var o,i=t.length,a=Ur(t,Kr,Qr).visitAfter(s);for(n=r,o=0;o<i;++o)e=t[o],a.visit(f)}function c(){if(t){var e,n,i=t.length;for(r=new Array(i),e=0;e<i;++e)n=t[e],r[n.index]=+o(n,e,t)}}function s(t){var e,n,o,i,a,u=0,l=0;if(t.length){for(o=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(u+=e.value,l+=n,o+=n*e.x,i+=n*e.y);t.x=o/l,t.y=i/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{u+=r[e.data.index]}while(e=e.next)}t.value=u}function f(t,o,l,c){if(!t.value)return!0;var s=t.x-e.x,f=t.y-e.y,h=c-o,p=s*s+f*f;if(h*h/u<p)return p<a&&(0===s&&(p+=(s=Lr())*s),0===f&&(p+=(f=Lr())*f),p<i&&(p=Math.sqrt(i*p)),e.vx+=s*t.value*n/p,e.vy+=f*t.value*n/p),!0;if(!(t.length||p>=a)){(t.data!==e||t.next)&&(0===s&&(p+=(s=Lr())*s),0===f&&(p+=(f=Lr())*f),p<i&&(p=Math.sqrt(i*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=s*h,e.vy+=f*h)}while(t=t.next)}}return l.initialize=function(e){t=e,c()},l.strength=function(t){return arguments.length?(o="function"==typeof t?t:Fr(+t),c(),l):o},l.distanceMin=function(t){return arguments.length?(i=t*t,l):Math.sqrt(i)},l.distanceMax=function(t){return arguments.length?(a=t*t,l):Math.sqrt(a)},l.theta=function(t){return arguments.length?(u=t*t,l):Math.sqrt(u)},l}().strength(-160)).force("center",function(t,e){var n;function r(){var r,o,i=n.length,a=0,u=0;for(r=0;r<i;++r)a+=(o=n[r]).x,u+=o.y;for(a=a/i-t,u=u/i-e,r=0;r<i;++r)(o=n[r]).x-=a,o.y-=u}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r}(O/2,M/2)).force("collide",function(t){var e,n,r=1,o=1;function i(){for(var t,i,u,l,c,s,f,h=e.length,p=0;p<o;++p)for(i=Ur(e,Wr,Xr).visitAfter(a),t=0;t<h;++t)u=e[t],s=n[u.index],f=s*s,l=u.x+u.vx,c=u.y+u.vy,i.visit(d);function d(t,e,n,o,i){var a=t.data,h=t.r,p=s+h;if(!a)return e>l+p||o<l-p||n>c+p||i<c-p;if(a.index>u.index){var d=l-a.x-a.vx,y=c-a.y-a.vy,v=d*d+y*y;v<p*p&&(0===d&&(v+=(d=Lr())*d),0===y&&(v+=(y=Lr())*y),v=(p-(v=Math.sqrt(v)))/v*r,u.vx+=(d*=v)*(p=(h*=h)/(f+h)),u.vy+=(y*=v)*p,a.vx-=d*(p=1-p),a.vy-=y*p)}}}function a(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function u(){if(e){var r,o,i=e.length;for(n=new Array(i),r=0;r<i;++r)o=e[r],n[o.index]=+t(o,r,e)}}return"function"!=typeof t&&(t=Fr(null==t?1:+t)),i.initialize=function(t){e=t,u()},i.iterations=function(t){return arguments.length?(o=+t,i):o},i.strength=function(t){return arguments.length?(r=+t,i):r},i.radius=function(e){return arguments.length?(t="function"==typeof e?e:Fr(+e),u(),i):t},i}().radius((function(){return 13.5})).iterations(5)).force("x",function(t){var e,n,r,o=Fr(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vx+=(r[i]-o.x)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=Fr(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:Fr(+t),a(),i):o},i.x=function(e){return arguments.length?(t="function"==typeof e?e:Fr(+e),a(),i):t},i}(O/2)).force("y",function(t){var e,n,r,o=Fr(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vy+=(r[i]-o.y)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=Fr(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:Fr(+t),a(),i):o},i.y=function(e){return arguments.length?(t="function"==typeof e?e:Fr(+e),a(),i):t},i}(M/2)).force("radial",function(t,e,n){var r,o,i,a=Fr(.1);function u(t){for(var a=0,u=r.length;a<u;++a){var l=r[a],c=l.x-e||1e-6,s=l.y-n||1e-6,f=Math.sqrt(c*c+s*s),h=(i[a]-f)*o[a]*t/f;l.vx+=c*h,l.vy+=s*h}}function l(){if(r){var e,n=r.length;for(o=new Array(n),i=new Array(n),e=0;e<n;++e)i[e]=+t(r[e],e,r),o[e]=isNaN(i[e])?0:+a(r[e],e,r)}}return"function"!=typeof t&&(t=Fr(+t)),null==e&&(e=0),null==n&&(n=0),u.initialize=function(t){r=t,l()},u.strength=function(t){return arguments.length?(a="function"==typeof t?t:Fr(+t),l(),u):a},u.radius=function(e){return arguments.length?(t="function"==typeof e?e:Fr(+e),l(),u):t},u.x=function(t){return arguments.length?(e=+t,u):e},u.y=function(t){return arguments.length?(n=+t,u):n},u}(100,O/2,M/2)),l=_e(".chart").append("svg").attr("viewBox",[0,0,O,M]).style("background-color",v);l.append("defs").append("marker").attr("id","arrowhead").attr("viewBox",n).attr("refX",23.8).attr("refY",0).attr("orient","auto").attr("markerWidth",15.3).attr("markerHeight",15.3).attr("xoverflow","visible").append("svg:path").attr("d",r).attr("fill","#999").style("stroke","none");var s=l.append("g").attr("stroke","#999").attr("stroke-opacity",.6).selectAll("line").data(i).join("path").attr("fill","none").attr("stroke-dasharray",(function(t){return"protege"===t.ontology?"2,5,3":""})).attr("key",(function(t){return t.type})).attr("marker-end","url(#arrowhead)"),f=l.append("g").attr("stroke","#fff").attr("stroke-width",1.5).selectAll("circle").data(a).join("circle").attr("r",(function(t){return"mainNode"===t.type?13.5:e})).attr("fill",(function(t){return o(t.type)})).attr("key",(function(t){return t.type})).attr("class",(function(t){return"node node-".concat(t.id," ").concat(t.type&&"organization"===t.type?"org":"person"===t.type?"person":"publication"===t.type?"publication":"mainNode"===t.type?"mainNode":"article"===t.type?"article":"keyword"===t.type?"keyword":"event"===t.type?"event":"")})).on("click",(function(t){return t.hasClick?_({name:t.name,id:t.id,type:t.type}):null})).call(function(t){return Re().on("start",(function(e){le.active||t.alphaTarget(.3).restart(),e.fx=e.x,e.fy=e.y})).on("drag",(function(t){t.fx=le.x>O||le.x<0?t.x:le.x,t.fy=le.y>M||le.y<0?t.y:le.y}))}(u));f.append("title").text((function(t){return"".concat(t.name,"-").concat(function(t){switch(t){case"mainNode":return c?c.formatMessage({id:"SNA.search.center"}):"主要搜尋中心";case"organization":return c?c.formatMessage({id:"SNA.organization"}):"組織";case"person":return c?c.formatMessage({id:"SNA.author"}):"作家";case"publication":return c?c.formatMessage({id:"SNA.publication"}):"作家";case"article":return c?c.formatMessage({id:"SNA.article"}):"單篇作品";case"keyword":return c?c.formatMessage({id:"SNA.keyword"}):"關鍵字";default:return""}}(t.type))}));var h=l.append("g").selectAll("text").data(a).join("text").attr("fill",y).attr("text-anchor","middle").attr("key",(function(t){return t.type})).style("color","#fff").style("font-size","14px").text((function(t){return t.name})),p=l.selectAll(".edgepath").data(i).enter().append("path").attr("class","edgepath").attr("fill-opacity",0).attr("stroke-opacity",0).attr("id",(function(t,e){return"edgepath".concat(e)})).style("pointer-events","none");l.selectAll(".edgelabel").data(i).enter().append("text").style("pointer-events","none").attr("class","edgelabel").attr("font-size","10px").attr("fill","#aaa").attr("visibility","visible").attr("key",(function(t){return t.type})).attr("id",(function(t,e){return"edgelabel".concat(e)})).append("textPath").attr("xlink:href",(function(t,e){return"#edgepath".concat(e)})).style("text-anchor","middle").style("pointer-events","none").attr("startOffset","50%").text((function(t){return t.property})),u.on("tick",(function(){s.attr("d",(function(t){return j(t.source,t.target,30)})),f.attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})),h.attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y-e})),p.attr("d",(function(t){return j(t.source,t.target,30)}))}))};return a((function(){if(d&&d.nodes&&d.nodes.length>0){var t=document.getElementById("network-graph");t&&t.childNodes[0]&&t.removeChild(t.childNodes[0]),z(d)}}),[d,x.active]),n.createElement("div",{className:f("SNA",{"SNA--smallSize":p<200},l),style:{contentWidth:O,contentHeight:M,backgroundColor:v}},n.createElement("div",{className:"SNA__tool"},n.createElement("div",{className:"SNA__share"},n.createElement(Z,{url:document.location.href},n.createElement(W,{size:32,round:!0}))),n.createElement("div",{className:"SNA__download"},n.createElement(w,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},n.createElement("span",{onClick:function(t){N(t.currentTarget)}},n.createElement(co,{fill:b}))),n.createElement(g,{id:"download-menu",anchorEl:S,keepMounted:!0,open:Boolean(S),onClose:function(){N(null)}},n.createElement(m,{onClick:function(){return A("img")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.img"}):"下載圖片"),n.createElement(m,{onClick:function(){return A("gephi")}},c?c.formatMessage({id:"knowledge.writersAndWorksSNA.download.gephi"}):"下載Gephi"))),n.createElement("div",{className:"SNA__fullscreenBtn"},n.createElement(w,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},n.createElement("span",{onClick:x.enter},n.createElement(ho,{fill:b})))),n.createElement(rt,{targets:["#network-graph svg g text"],options:{stepSize:2,range:1},customButtons:{up:n.createElement(w,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},n.createElement(so,{fill:b})),down:n.createElement(w,{title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},n.createElement(fo,{fill:b})),style:{border:"none"},buttonsMargin:10}})),n.createElement(C,{handle:x},n.createElement("div",{className:"chart",id:"network-graph"},x.active&&n.createElement("div",{className:"fullscreenExit",style:{backgroundColor:v}},n.createElement(et,{fontSize:"large",onClick:x.exit,title:c?c.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreenExit"}):"離開全螢幕"})))))};po.defaultProps={className:void 0,intl:void 0,width:1050,height:600,distance:400,SNAData:null,fontColor:"#000000",backgroundColor:"#FFFFFF",iconColor:"#825c0d",handleClickNodeGoto:null},po.propTypes={className:s.string,intl:s.objectOf(s.any),width:s.number,height:s.number,distance:s.number,SNAData:s.objectOf(s.any),fontColor:s.string,backgroundColor:s.string,iconColor:s.string,handleClickNodeGoto:s.func};export{po as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daoyi/nmtl-ui",
3
- "version": "1.1.43-beta.32",
3
+ "version": "1.1.43-beta.33",
4
4
  "description": "This project is to be used as a starter kit for building React component using Storybook and Rollup",
5
5
  "author": "daoyi",
6
6
  "main": "lib/index.js",