@daoyi/nmtl-ui 1.1.43-beta.52 → 1.1.43-beta.53

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;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var s in n=Object(arguments[c]))o.call(n,s)&&(l[s]=n[s]);if(r){a=r(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(l[a[u]]=n[a[u]])}}return l}},function(e,t,n){(e.exports=n(5)(!1)).push([e.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(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r={},o=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}((function(){return window&&document&&document.all&&!window.atob})),i=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),a=null,l=0,c=[],s=n(7);function u(e,t){for(var n=0;n<e.length;n++){var o=e[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(y(o.parts[a],t))}else{var l=[];for(a=0;a<o.parts.length;a++)l.push(y(o.parts[a],t));r[o.id]={id:o.id,refs:1,parts:l}}}}function f(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],l={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}function p(e,t){var n=i(e.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=c[c.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),c.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.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(e.insertAt.before,n);n.insertBefore(t,o)}}function d(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=c.indexOf(e);t>=0&&c.splice(t,1)}function h(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=n.nc;r&&(e.attrs.nonce=r)}return m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function y(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var c=l++;n=a||(a=h(t)),r=v.bind(null,n,c,!1),o=v.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=s(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return u(n,t),function(e){for(var o=[],i=0;i<n.length;i++){var a=n[i];(l=r[a.id]).refs--,o.push(l)}for(e&&u(f(e,t),t),i=0;i<o.length;i++){var l;if(0===(l=o[i]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete r[l.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function v(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(e,t,n){n.r(t);var r=n(0),o=n.n(r),i="up",a="down";function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var p=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?f(e):t}(this,s(t).call(this))).onClick=e.onClick.bind(f(f(e))),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,r.Component),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"onClick",value:function(){(0,this.props.onClick)()}},{key:"getDefaultButtonContent",value:function(){var e=this.props.direction===i?"36px":"20px";return o.a.createElement("span",{style:{fontSize:e}},"A")}},{key:"render",value:function(){var e=this.props.direction,t=this.props,n=t.style,r=void 0===n?{}:n,i=t.customButton,a=void 0===i?this.getDefaultButtonContent():i;return o.a.createElement("div",{className:"font-size-".concat(e),style:r,onClick:this.onClick},a)}}]),t}();function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(1);var v=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?g(e):t}(this,m(t).call(this))).handleChange.bind(g(g(e))),e.setChangeDirection.bind(g(g(e))),e.state={options:{stepSize:2,range:3},changeCount:0,changeDirection:null},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,r.Component),function(e,t,n){t&&h(e.prototype,t),n&&h(e,n)}(t,[{key:"handleChange",value:function(e,t,n){this.props.onChange&&(0,this.props.onChange)(e,t,n)}},{key:"componentDidMount",value:function(){var e=this.props.options;this.setState({options:Object.assign({},this.state.options,e)})}},{key:"getFontSizeDetails",value:function(e){var t=parseFloat(e);return{value:t,unit:e.toString().replace(t.toString(),"")}}},{key:"applyFontSize",value:function(e){var t=this.state.options.stepSize,n=this.state.changeDirection===i?t:-1*t,r=window.getComputedStyle(e,null).getPropertyValue("font-size"),o=this.getFontSizeDetails(r).value,a=o+n;e.style.fontSize=a+"px",a!==o&&this.handleChange(e,a,o)}},{key:"iterateChildren",value:function(e){if(this.applyFontSize(e),e.children&&0!==e.children.length){var t=!0,n=!1,r=void 0;try{for(var o,i=e.children[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;this.iterateChildren(a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}}},{key:"updateChangeCount",value:function(){var e=this.state,t=e.changeCount,n=e.changeDirection===i?1:-1;this.setState({changeCount:t+n})}},{key:"iterateElementsAndApplyFontSizeChange",value:function(){var e=this.props.targets,t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value,l=document.querySelectorAll(a),c=!0,s=!1,u=void 0;try{for(var f,p=l[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;this.iterateChildren(d)}}catch(e){s=!0,u=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw u}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}this.updateChangeCount()}},{key:"validateChangePerRange",value:function(){var e=this.state,t=e.changeCount,n=e.changeDirection,r=this.state.options.range,o=!0;return n===i&&t>=r&&(o=!1),n===a&&t<=-1*r&&(o=!1),o}},{key:"initFontSizeChange",value:function(){this.validateChangePerRange()&&this.iterateElementsAndApplyFontSizeChange()}},{key:"setChangeDirection",value:function(e,t){var n=e?i:a;this.setState({changeDirection:n},t)}},{key:"onFontSizeUp",value:function(){this.setChangeDirection(!0,this.initFontSizeChange)}},{key:"onFontSizeDown",value:function(){this.setChangeDirection(!1,this.initFontSizeChange)}},{key:"getFontSizeChangerStyle",value:function(e){var t=e.style,n=void 0===t?{}:t,r=e.verticalAlignment,o=void 0!==r&&r,i=e.buttonsMargin,a=void 0===i?4:i,l=this.getFontSizeDetails(n.width||"40px"),c=this.getFontSizeDetails(n.height||"40px");return{width:(!1===o?2*l.value+a:l.value)+l.unit,height:(!1===o?c.value:2*c.value+a)+c.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(e,t){var n=t.style,r=void 0===n?{}:n,o=t.verticalAlignment,l=void 0!==o&&o,c=t.reverseOrder,s=void 0!==c&&c,u=t.buttonsMargin,f=void 0===u?4:u,p=this.getFontSizeDetails(r.width||"40px"),d=this.getFontSizeDetails(r.height||"40px"),h={width:p.value+p.unit,height:d.value+d.unit},m=f+(!1===l?p.unit:d.unit);return(e===i&&!1===s||e===a&&!0===s)&&(!1===l?h.marginRight=m:h.marginBottom=m),Object.assign({},r,h)}},{key:"render",value:function(){var e=this.props.customButtons,t=void 0===e?{}:e,n=t.up,r=t.down,l=this.getFontSizeChangerStyle(t),c=this.getFontSizeChangerButtonStyle(i,t),s=this.getFontSizeChangerButtonStyle(a,t);return o.a.createElement("div",{className:"font-size-changer",style:l},o.a.createElement("div",{className:"font-size-changer-buttons",style:l},o.a.createElement(p,{direction:i,customButton:n,onClick:this.onFontSizeUp.bind(this),style:c}),o.a.createElement(p,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:s})))}}]),t}();t.default=v}])})));const I=n.forwardRef(((t,r)=>n.createElement("div",e({},t,{className:a("tooltip",t.className),ref:r}),t.children)));I.defaultProps={children:void 0,className:void 0},I.propTypes={children:c.node,className:c.string};l(".tooltip {\n width: -moz-fit-content;\n width: fit-content; }\n");const D={top:"top",left:"left",right:"right",bottom:"bottom",topLeft:"top-start",topRight:"top-end",bottomLeft:"bottom-start",bottomRight:"bottom-end",leftTop:"left-start",leftBottom:"left-end",rightTop:"right-start",rightBottom:"right-end"},M=({title:e,className:t,placement:r,children:o})=>n.createElement(f,{arrow:!0,title:e||"",placement:D[r]||"top"},n.createElement(I,{className:t},o));M.defaultProps={className:void 0,title:void 0,children:"Tooltip",placement:void 0},M.propTypes={className:c.node,title:c.node,children:c.node,placement:c.oneOf(Object.keys(D))};var B=s((function(e){!function(t){var n=function(){return{escape:function(e){return e.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(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var n=window.atob(e.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);t(new Blob([o],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){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=t,o.href=e,o.href},getAndEncode:function(e){var t=3e4;l.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,o=new XMLHttpRequest;if(o.onreadystatechange=a,o.ontimeout=c,o.responseType="blob",o.timeout=t,o.open("GET",e,!0),o.send(),l.impl.options.imagePlaceholder){var i=l.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(r=i[1])}function a(){if(4===o.readyState)if(200===o.status){var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];n(e)},t.readAsDataURL(o.response)}else r?n(r):s("cannot fetch resource: "+e+", status: "+o.status)}function c(){r?n(r):s("timeout of "+t+"ms occured while fetching resource: "+e)}function s(e){console.error(e),n("")}}))},uid:(e=0,function(){return"u"+t()+e++;function t(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}),delay:function(e){return function(t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))}},asArray:function(e){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src=e}))},width:function(e){var t=n(e,"border-left-width"),r=n(e,"border-right-width");return e.scrollWidth+t+r},height:function(e){var t=n(e,"border-top-width"),r=n(e,"border-bottom-width");return e.scrollHeight+t+r}};var e;function t(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function n(e,t){var n=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(n.replace("px",""))}}(),r=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,n,i){return a()?Promise.resolve(e):Promise.resolve(e).then(r).then((function(t){var r=Promise.resolve(e);return t.forEach((function(e){r=r.then((function(t){return o(t,e,n,i)}))})),r}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:r,inline:o}};function t(t){return-1!==t.search(e)}function r(t){for(var r,o=[];null!==(r=e.exec(t));)o.push(r[1]);return o.filter((function(e){return!n.isDataUrl(e)}))}function o(e,t,r,o){return Promise.resolve(t).then((function(e){return r?n.resolveUrl(e,r):e})).then(o||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t))})).then((function(r){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+n.escape(e)+")(['\"]?\\))","g")}(t),"$1"+r+"$3")}))}}(),o=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{n.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return r.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return r.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),i=function(){return{inlineAll:function t(o){return o instanceof Element?i(o).then((function(){return o instanceof HTMLImageElement?e(o).inline():Promise.all(n.asArray(o.childNodes).map((function(e){return t(e)})))})):Promise.resolve(o);function i(e){var t=e.style.getPropertyValue("background");return t?r.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return n.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e.src))})).then((function(t){return new Promise((function(n,r){e.onload=n,e.onerror=r,e.src=t}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},l={toSvg:c,toPng:function(e,t){return s(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return s(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return s(e,t||{}).then(n.canvasToBlob)},toPixelData:function(e,t){return s(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,n.width(e),n.height(e)).data}))},impl:{fontFaces:o,images:i,util:n,inliner:r,options:{}}};function c(e,t){return function(e){void 0===e.imagePlaceholder?l.impl.options.imagePlaceholder=a.imagePlaceholder:l.impl.options.imagePlaceholder=e.imagePlaceholder;void 0===e.cacheBust?l.impl.options.cacheBust=a.cacheBust:l.impl.options.cacheBust=e.cacheBust}(t=t||{}),Promise.resolve(e).then((function(e){return u(e,t.filter,!0)})).then(f).then(p).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor);t.width&&(e.style.width=t.width+"px");t.height&&(e.style.height=t.height+"px");t.style&&Object.keys(t.style).forEach((function(n){e.style[n]=t.style[n]}));return e})).then((function(r){return function(e,t,r){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(n.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+r+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(r,t.width||n.width(e),t.height||n.height(e))}))}function s(e,t){return c(e,t).then(n.makeImage).then(n.delay(100)).then((function(r){var o=function(e){var r=document.createElement("canvas");if(r.width=t.width||n.width(e),r.height=t.height||n.height(e),t.bgcolor){var o=r.getContext("2d");o.fillStyle=t.bgcolor,o.fillRect(0,0,r.width,r.height)}return r}(e);return o.getContext("2d").drawImage(r,0,0),o}))}function u(e,t,r){return r||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?n.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(r){return function(e,t,r){var o=e.childNodes;return 0===o.length?Promise.resolve(t):i(t,n.asArray(o),r).then((function(){return t}));function i(e,t,n){var r=Promise.resolve();return t.forEach((function(t){r=r.then((function(){return u(t,n)})).then((function(t){t&&e.appendChild(t)}))})),r}}(e,r,t)})).then((function(t){return function(e,t){return t instanceof Element?Promise.resolve().then(r).then(o).then(i).then(a).then((function(){return t})):t;function r(){function r(e,t){function r(e,t){n.asArray(e).forEach((function(n){t.setProperty(n,e.getPropertyValue(n),e.getPropertyPriority(n))}))}e.cssText?t.cssText=e.cssText:r(e,t)}r(window.getComputedStyle(e),t.style)}function o(){function r(r){var o=window.getComputedStyle(e,r),i=o.getPropertyValue("content");if(""!==i&&"none"!==i){var a=n.uid();t.className=t.className+" "+a;var l=document.createElement("style");l.appendChild(c(a,r,o)),t.appendChild(l)}function c(e,t,r){var o="."+e+":"+t,i=r.cssText?a(r):l(r);return document.createTextNode(o+"{"+i+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function l(e){return n.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){r(e)}))}function i(){e instanceof HTMLTextAreaElement&&(t.innerHTML=e.value),e instanceof HTMLInputElement&&t.setAttribute("value",e.value)}function a(){t instanceof SVGElement&&(t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t instanceof SVGRectElement&&["width","height"].forEach((function(e){var n=t.getAttribute(e);n&&t.style.setProperty(e,n)})))}}(e,t)})):Promise.resolve()}function f(e){return o.resolveAll().then((function(t){var n=document.createElement("style");return e.appendChild(n),n.appendChild(document.createTextNode(t)),e}))}function p(e){return i.inlineAll(e).then((function(){return e}))}e.exports=l}()}));const L=require("jszip"),U=require("react-file-download"),F=e=>{const{nodes:t,links:n}=e,r=n.map((({source:e,target:n})=>({source:t[e].name,target:t[n].name,sourceType:t[e].type,targetType:t[n].type}))),{nodeMap:o,nodesTsv:i}=(e=>{let t=1e7;const n={};let r=!1;e.forEach((({source:e,target:o,sourceType:i,targetType:a})=>{""!==o&&""!==e&&(Object.keys(n).indexOf(e)<0?(""!==i?(r=!0,n[e]={ID:t,WEIGHT:1,NODE_TYPE:i}):n[e]={ID:t,WEIGHT:1},t+=1):n[e].WEIGHT+=1,Object.keys(n).indexOf(o)<0?(""!==a?(r=!0,n[o]={ID:t,WEIGHT:1,NODE_TYPE:a}):n[o]={ID:t,WEIGHT:1},t+=1):n[o].WEIGHT+=1)}));let o=r?"ID\tLABEL\tWEIGHT\tNODE_TYPE\r\n":"ID\tLABEL\tWEIGHT\r\n";return Object.keys(n).forEach((e=>{const t=n[e].ID,i=n[e].WEIGHT,a=r?n[e].NODE_TYPE:"";o+=r?`${t}\t${e}\t${i}\t${a}\r\n`:`${t}\t${e}\t${i}\r\n`})),{nodeMap:n,nodesTsv:o}})(r),a=((e,t)=>{let n="SOURCE\tTARGET\tWEIGHT\tTYPE\r\n";return e.forEach((({source:e,target:r})=>{if(""===r||""===e)return;const o=t[e].ID,i=t[r].ID;n+=`${o}\t${i}\t1\tUndirected\r\n`})),n})(r,o),l=new L;l.file("Node_Table.tsv",i),l.file("Edge_Table.tsv",a),l.generateAsync({type:"blob"}).then((e=>{U(e,"Gephi_generated_by_NMTL.zip")}))};const H=({data:e,dataType:t,extType:n="xlsx"})=>{let r;switch(t){case"sna":r=(e=>{const{links:t,nodes:n}=e||{};if(t&&t.length>0)return t.map((e=>({From:n[e.source].name,To:n[e.target].name})));return[]})(e);break;default:r=e}!function(e,t,n,r){var o=new Blob(void 0!==r?[r,e]:[e],{type:n||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(o,t);else{var i=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(o):window.webkitURL.createObjectURL(o),a=document.createElement("a");a.style.display="none",a.href=i,a.setAttribute("download",t),void 0===a.download&&a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),setTimeout((function(){document.body.removeChild(a),window.URL.revokeObjectURL(i)}),200)}}(`\ufeff${(e=>{let t="";if(Array.isArray(e)&&e.length>0){const n=Object.keys(e[0]);t+=`${n.toString()}\n`,e.forEach((e=>{n.forEach((n=>{t+=`${e[n]},`})),t+="\n"}))}else{const n=Object.keys(e);t+=`${n.toString()}\n`,n.forEach((n=>{t+=`${e[n]},`})),t+="\n"}return t})(r)}`,`output.${n}`)},$=({fill:e="#825c0d"})=>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"}))),G=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_128","data-name":"Rectangle 128",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_47","data-name":"Mask Group 47",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3633","data-name":"Group 3633",transform:"translate(6 6)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z",transform:"translate(-495 -369)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632",transform:"translate(0 2)"},t.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)"}))))),W=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_129","data-name":"Rectangle 129",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_48","data-name":"Mask Group 48",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3635","data-name":"Group 3635",transform:"translate(6 8)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M510 371v2h6v-2z",transform:"translate(-495 -371)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632"},t.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)"}))))),q=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_124","data-name":"Rectangle 124",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_46","data-name":"Mask Group 46",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3629","data-name":"Group 3629",transform:"translate(6 6.001)"},t.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)"}),t.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)"}),t.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)"}),t.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)"}))));l(".extraTools {\n width: 100%;\n display: inline-flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n padding: 0px 20px;\n padding-top: 12px; }\n .extraTools__share button {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__download {\n cursor: pointer; }\n .extraTools__download-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fullscreenBtn {\n cursor: pointer;\n padding-top: 0; }\n .extraTools__fullscreenBtn-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fontsize {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-changer,\n .extraTools .font-size-changer-buttons,\n .extraTools .font-size-up,\n .extraTools .font-size-down,\n .extraTools .tooltip {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .extraTools .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .extraTools .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n .extraTools #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");const V=({className:e})=>n.createElement("div",{className:a("extraTools__share",e)},n.createElement(N,{url:document.location.href},n.createElement(T,{size:32,round:!0})));V.defaultProps={className:void 0},V.propTypes={className:c.string};const X=({className:e,intl:t,exclude:r,iconColor:o,SNAData:l,domToImageId:c})=>{const[s,u]=i(null);console.log("DownloadMenu",r);const f=[{key:"downloadImage",onClick:()=>(({id:e,fileName:t="image",quality:n=.95})=>{const r=document.getElementById(e);B.toPng(r,{quality:n}).then((e=>{const n=document.createElement("a");n.download=`${t}.png`,n.href=e,n.click()})).catch((e=>{console.error("oops, something went wrong!",e)}))})({id:c}),label:t?"knowledge.writersAndWorksSNA.download.img":"下載圖片"},{key:"downloadTsv",onClick:()=>F(l),label:t?"knowledge.writersAndWorksSNA.download.gephi":"下載Gephi"},{key:"downloadXls",onClick:()=>H({data:l,dataType:"sna",extType:"xlsx"}),label:t?"knowledge.writersAndWorksSNA.download.xls":"下載Excel"}];return n.createElement("div",{className:a("extraTools__download",e)},n.createElement(M,{title:t?t.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},n.createElement("div",{className:"extraTools__download-icon",onClick:e=>u(e.currentTarget)},n.createElement($,{fill:o}))),n.createElement(p,{id:"download-menu",anchorEl:s,keepMounted:!0,open:Boolean(s),onClose:()=>u(null)},f.map((({key:e,onClick:o,label:i})=>{return a=e,!((r||[]).filter((e=>e===a)).length>0)&&n.createElement(d,{key:e,onClick:o},t?t.formatMessage({id:i}):i);var a}))))};X.defaultProps={className:void 0,intl:void 0,exclude:["downloadXls"],SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph"},X.propTypes={className:c.string,intl:c.objectOf(c.any),exclude:c.arrayOf(c.string),SNAData:c.objectOf(c.any),iconColor:c.string,domToImageId:c.string};const Y=({className:e,intl:t,iconColor:r,fullScreenHandle:o})=>{const{enter:i}=o||{enter:()=>{}};return n.createElement("div",{className:a("extraTools__fullscreenBtn",e)},n.createElement(M,{title:t?t.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},n.createElement("div",{className:"extraTools__fullscreenBtn-icon",onClick:i},n.createElement(q,{fill:r}))))};Y.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",fullScreenHandle:void 0},Y.propTypes={className:c.string,intl:c.objectOf(c.any),iconColor:c.string,fullScreenHandle:c.objectOf(c.any)};const J=({className:e,intl:t,iconColor:r,FontSizeTargets:o,FontSizeOptions:i})=>n.createElement("div",{className:a("extraTools__fontsize",e)},n.createElement(R,{targets:o,options:i,customButtons:{up:n.createElement(M,{title:t?t.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},n.createElement(G,{fill:r})),down:n.createElement(M,{title:t?t.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},n.createElement(W,{fill:r})),style:{border:"none"},buttonsMargin:10}}));J.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1}},J.propTypes={className:c.string,intl:c.objectOf(c.any),iconColor:c.string,FontSizeTargets:c.arrayOf(c.string),FontSizeOptions:c.objectOf(c.any)};const K=({className:t,intl:r,exclude:o,SNAData:i,iconColor:l,domToImageId:c,FontSizeTargets:s,FontSizeOptions:u,fullScreenHandle:f})=>{console.log("ExtraTools",o);const p={intl:r,exclude:o,SNAData:i,iconColor:l,domToImageId:c,FontSizeTargets:s,FontSizeOptions:u,fullScreenHandle:f},d=[{keys:["share"],Component:V},{keys:["downloadImage","downloadTsv","downloadXls"],Component:X},{keys:["fullscreen"],Component:Y},{keys:["fontSizeChanger"],Component:J}];return n.createElement("div",{className:a("extraTools",t)},d.map((({keys:t,Component:r})=>{return i=t,!((o||[]).filter((e=>e===i)).length>0)&&n.createElement(r,e({key:t[0]},p));var i})))};K.ShareButton=V,K.DownloadMenu=X,K.FullscreenBtn=Y,K.FontSizeChanger=J,K.defaultProps={className:void 0,intl:void 0,exclude:["downloadXls"],SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1},fullScreenHandle:void 0},K.propTypes={className:c.string,intl:c.objectOf(c.any),exclude:c.arrayOf(c.string),SNAData:c.objectOf(c.any),iconColor:c.string,domToImageId:c.string,FontSizeTargets:c.arrayOf(c.string),FontSizeOptions:c.objectOf(c.any),fullScreenHandle:c.objectOf(c.any)};export{K as default};
16
+ var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var s in n=Object(arguments[c]))o.call(n,s)&&(l[s]=n[s]);if(r){a=r(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(l[a[u]]=n[a[u]])}}return l}},function(e,t,n){(e.exports=n(5)(!1)).push([e.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(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r={},o=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}((function(){return window&&document&&document.all&&!window.atob})),i=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),a=null,l=0,c=[],s=n(7);function u(e,t){for(var n=0;n<e.length;n++){var o=e[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(y(o.parts[a],t))}else{var l=[];for(a=0;a<o.parts.length;a++)l.push(y(o.parts[a],t));r[o.id]={id:o.id,refs:1,parts:l}}}}function f(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],l={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}function p(e,t){var n=i(e.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=c[c.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),c.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.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(e.insertAt.before,n);n.insertBefore(t,o)}}function d(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=c.indexOf(e);t>=0&&c.splice(t,1)}function h(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=n.nc;r&&(e.attrs.nonce=r)}return m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function y(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var c=l++;n=a||(a=h(t)),r=v.bind(null,n,c,!1),o=v.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=s(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return u(n,t),function(e){for(var o=[],i=0;i<n.length;i++){var a=n[i];(l=r[a.id]).refs--,o.push(l)}for(e&&u(f(e,t),t),i=0;i<o.length;i++){var l;if(0===(l=o[i]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete r[l.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function v(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(e,t,n){n.r(t);var r=n(0),o=n.n(r),i="up",a="down";function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var p=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?f(e):t}(this,s(t).call(this))).onClick=e.onClick.bind(f(f(e))),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,r.Component),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"onClick",value:function(){(0,this.props.onClick)()}},{key:"getDefaultButtonContent",value:function(){var e=this.props.direction===i?"36px":"20px";return o.a.createElement("span",{style:{fontSize:e}},"A")}},{key:"render",value:function(){var e=this.props.direction,t=this.props,n=t.style,r=void 0===n?{}:n,i=t.customButton,a=void 0===i?this.getDefaultButtonContent():i;return o.a.createElement("div",{className:"font-size-".concat(e),style:r,onClick:this.onClick},a)}}]),t}();function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(1);var v=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?g(e):t}(this,m(t).call(this))).handleChange.bind(g(g(e))),e.setChangeDirection.bind(g(g(e))),e.state={options:{stepSize:2,range:3},changeCount:0,changeDirection:null},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,r.Component),function(e,t,n){t&&h(e.prototype,t),n&&h(e,n)}(t,[{key:"handleChange",value:function(e,t,n){this.props.onChange&&(0,this.props.onChange)(e,t,n)}},{key:"componentDidMount",value:function(){var e=this.props.options;this.setState({options:Object.assign({},this.state.options,e)})}},{key:"getFontSizeDetails",value:function(e){var t=parseFloat(e);return{value:t,unit:e.toString().replace(t.toString(),"")}}},{key:"applyFontSize",value:function(e){var t=this.state.options.stepSize,n=this.state.changeDirection===i?t:-1*t,r=window.getComputedStyle(e,null).getPropertyValue("font-size"),o=this.getFontSizeDetails(r).value,a=o+n;e.style.fontSize=a+"px",a!==o&&this.handleChange(e,a,o)}},{key:"iterateChildren",value:function(e){if(this.applyFontSize(e),e.children&&0!==e.children.length){var t=!0,n=!1,r=void 0;try{for(var o,i=e.children[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;this.iterateChildren(a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}}},{key:"updateChangeCount",value:function(){var e=this.state,t=e.changeCount,n=e.changeDirection===i?1:-1;this.setState({changeCount:t+n})}},{key:"iterateElementsAndApplyFontSizeChange",value:function(){var e=this.props.targets,t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value,l=document.querySelectorAll(a),c=!0,s=!1,u=void 0;try{for(var f,p=l[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;this.iterateChildren(d)}}catch(e){s=!0,u=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw u}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}this.updateChangeCount()}},{key:"validateChangePerRange",value:function(){var e=this.state,t=e.changeCount,n=e.changeDirection,r=this.state.options.range,o=!0;return n===i&&t>=r&&(o=!1),n===a&&t<=-1*r&&(o=!1),o}},{key:"initFontSizeChange",value:function(){this.validateChangePerRange()&&this.iterateElementsAndApplyFontSizeChange()}},{key:"setChangeDirection",value:function(e,t){var n=e?i:a;this.setState({changeDirection:n},t)}},{key:"onFontSizeUp",value:function(){this.setChangeDirection(!0,this.initFontSizeChange)}},{key:"onFontSizeDown",value:function(){this.setChangeDirection(!1,this.initFontSizeChange)}},{key:"getFontSizeChangerStyle",value:function(e){var t=e.style,n=void 0===t?{}:t,r=e.verticalAlignment,o=void 0!==r&&r,i=e.buttonsMargin,a=void 0===i?4:i,l=this.getFontSizeDetails(n.width||"40px"),c=this.getFontSizeDetails(n.height||"40px");return{width:(!1===o?2*l.value+a:l.value)+l.unit,height:(!1===o?c.value:2*c.value+a)+c.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(e,t){var n=t.style,r=void 0===n?{}:n,o=t.verticalAlignment,l=void 0!==o&&o,c=t.reverseOrder,s=void 0!==c&&c,u=t.buttonsMargin,f=void 0===u?4:u,p=this.getFontSizeDetails(r.width||"40px"),d=this.getFontSizeDetails(r.height||"40px"),h={width:p.value+p.unit,height:d.value+d.unit},m=f+(!1===l?p.unit:d.unit);return(e===i&&!1===s||e===a&&!0===s)&&(!1===l?h.marginRight=m:h.marginBottom=m),Object.assign({},r,h)}},{key:"render",value:function(){var e=this.props.customButtons,t=void 0===e?{}:e,n=t.up,r=t.down,l=this.getFontSizeChangerStyle(t),c=this.getFontSizeChangerButtonStyle(i,t),s=this.getFontSizeChangerButtonStyle(a,t);return o.a.createElement("div",{className:"font-size-changer",style:l},o.a.createElement("div",{className:"font-size-changer-buttons",style:l},o.a.createElement(p,{direction:i,customButton:n,onClick:this.onFontSizeUp.bind(this),style:c}),o.a.createElement(p,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:s})))}}]),t}();t.default=v}])})));const I=n.forwardRef(((t,r)=>n.createElement("div",e({},t,{className:a("tooltip",t.className),ref:r}),t.children)));I.defaultProps={children:void 0,className:void 0},I.propTypes={children:c.node,className:c.string};l(".tooltip {\n width: -moz-fit-content;\n width: fit-content; }\n");const D={top:"top",left:"left",right:"right",bottom:"bottom",topLeft:"top-start",topRight:"top-end",bottomLeft:"bottom-start",bottomRight:"bottom-end",leftTop:"left-start",leftBottom:"left-end",rightTop:"right-start",rightBottom:"right-end"},M=({title:e,className:t,placement:r,children:o})=>n.createElement(f,{arrow:!0,title:e||"",placement:D[r]||"top"},n.createElement(I,{className:t},o));M.defaultProps={className:void 0,title:void 0,children:"Tooltip",placement:void 0},M.propTypes={className:c.node,title:c.node,children:c.node,placement:c.oneOf(Object.keys(D))};var B=s((function(e){!function(t){var n=function(){return{escape:function(e){return e.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(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var n=window.atob(e.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);t(new Blob([o],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){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=t,o.href=e,o.href},getAndEncode:function(e){var t=3e4;l.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,o=new XMLHttpRequest;if(o.onreadystatechange=a,o.ontimeout=c,o.responseType="blob",o.timeout=t,o.open("GET",e,!0),o.send(),l.impl.options.imagePlaceholder){var i=l.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(r=i[1])}function a(){if(4===o.readyState)if(200===o.status){var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];n(e)},t.readAsDataURL(o.response)}else r?n(r):s("cannot fetch resource: "+e+", status: "+o.status)}function c(){r?n(r):s("timeout of "+t+"ms occured while fetching resource: "+e)}function s(e){console.error(e),n("")}}))},uid:(e=0,function(){return"u"+t()+e++;function t(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}),delay:function(e){return function(t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))}},asArray:function(e){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src=e}))},width:function(e){var t=n(e,"border-left-width"),r=n(e,"border-right-width");return e.scrollWidth+t+r},height:function(e){var t=n(e,"border-top-width"),r=n(e,"border-bottom-width");return e.scrollHeight+t+r}};var e;function t(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function n(e,t){var n=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(n.replace("px",""))}}(),r=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,n,i){return a()?Promise.resolve(e):Promise.resolve(e).then(r).then((function(t){var r=Promise.resolve(e);return t.forEach((function(e){r=r.then((function(t){return o(t,e,n,i)}))})),r}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:r,inline:o}};function t(t){return-1!==t.search(e)}function r(t){for(var r,o=[];null!==(r=e.exec(t));)o.push(r[1]);return o.filter((function(e){return!n.isDataUrl(e)}))}function o(e,t,r,o){return Promise.resolve(t).then((function(e){return r?n.resolveUrl(e,r):e})).then(o||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t))})).then((function(r){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+n.escape(e)+")(['\"]?\\))","g")}(t),"$1"+r+"$3")}))}}(),o=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{n.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return r.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return r.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),i=function(){return{inlineAll:function t(o){return o instanceof Element?i(o).then((function(){return o instanceof HTMLImageElement?e(o).inline():Promise.all(n.asArray(o.childNodes).map((function(e){return t(e)})))})):Promise.resolve(o);function i(e){var t=e.style.getPropertyValue("background");return t?r.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return n.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e.src))})).then((function(t){return new Promise((function(n,r){e.onload=n,e.onerror=r,e.src=t}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},l={toSvg:c,toPng:function(e,t){return s(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return s(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return s(e,t||{}).then(n.canvasToBlob)},toPixelData:function(e,t){return s(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,n.width(e),n.height(e)).data}))},impl:{fontFaces:o,images:i,util:n,inliner:r,options:{}}};function c(e,t){return function(e){void 0===e.imagePlaceholder?l.impl.options.imagePlaceholder=a.imagePlaceholder:l.impl.options.imagePlaceholder=e.imagePlaceholder;void 0===e.cacheBust?l.impl.options.cacheBust=a.cacheBust:l.impl.options.cacheBust=e.cacheBust}(t=t||{}),Promise.resolve(e).then((function(e){return u(e,t.filter,!0)})).then(f).then(p).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor);t.width&&(e.style.width=t.width+"px");t.height&&(e.style.height=t.height+"px");t.style&&Object.keys(t.style).forEach((function(n){e.style[n]=t.style[n]}));return e})).then((function(r){return function(e,t,r){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(n.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+r+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(r,t.width||n.width(e),t.height||n.height(e))}))}function s(e,t){return c(e,t).then(n.makeImage).then(n.delay(100)).then((function(r){var o=function(e){var r=document.createElement("canvas");if(r.width=t.width||n.width(e),r.height=t.height||n.height(e),t.bgcolor){var o=r.getContext("2d");o.fillStyle=t.bgcolor,o.fillRect(0,0,r.width,r.height)}return r}(e);return o.getContext("2d").drawImage(r,0,0),o}))}function u(e,t,r){return r||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?n.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(r){return function(e,t,r){var o=e.childNodes;return 0===o.length?Promise.resolve(t):i(t,n.asArray(o),r).then((function(){return t}));function i(e,t,n){var r=Promise.resolve();return t.forEach((function(t){r=r.then((function(){return u(t,n)})).then((function(t){t&&e.appendChild(t)}))})),r}}(e,r,t)})).then((function(t){return function(e,t){return t instanceof Element?Promise.resolve().then(r).then(o).then(i).then(a).then((function(){return t})):t;function r(){function r(e,t){function r(e,t){n.asArray(e).forEach((function(n){t.setProperty(n,e.getPropertyValue(n),e.getPropertyPriority(n))}))}e.cssText?t.cssText=e.cssText:r(e,t)}r(window.getComputedStyle(e),t.style)}function o(){function r(r){var o=window.getComputedStyle(e,r),i=o.getPropertyValue("content");if(""!==i&&"none"!==i){var a=n.uid();t.className=t.className+" "+a;var l=document.createElement("style");l.appendChild(c(a,r,o)),t.appendChild(l)}function c(e,t,r){var o="."+e+":"+t,i=r.cssText?a(r):l(r);return document.createTextNode(o+"{"+i+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function l(e){return n.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){r(e)}))}function i(){e instanceof HTMLTextAreaElement&&(t.innerHTML=e.value),e instanceof HTMLInputElement&&t.setAttribute("value",e.value)}function a(){t instanceof SVGElement&&(t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t instanceof SVGRectElement&&["width","height"].forEach((function(e){var n=t.getAttribute(e);n&&t.style.setProperty(e,n)})))}}(e,t)})):Promise.resolve()}function f(e){return o.resolveAll().then((function(t){var n=document.createElement("style");return e.appendChild(n),n.appendChild(document.createTextNode(t)),e}))}function p(e){return i.inlineAll(e).then((function(){return e}))}e.exports=l}()}));const L=require("jszip"),U=require("react-file-download"),F=e=>{const{nodes:t,links:n}=e,r=n.map((({source:e,target:n})=>({source:t[e].name,target:t[n].name,sourceType:t[e].type,targetType:t[n].type}))),{nodeMap:o,nodesTsv:i}=(e=>{let t=1e7;const n={};let r=!1;e.forEach((({source:e,target:o,sourceType:i,targetType:a})=>{""!==o&&""!==e&&(Object.keys(n).indexOf(e)<0?(""!==i?(r=!0,n[e]={ID:t,WEIGHT:1,NODE_TYPE:i}):n[e]={ID:t,WEIGHT:1},t+=1):n[e].WEIGHT+=1,Object.keys(n).indexOf(o)<0?(""!==a?(r=!0,n[o]={ID:t,WEIGHT:1,NODE_TYPE:a}):n[o]={ID:t,WEIGHT:1},t+=1):n[o].WEIGHT+=1)}));let o=r?"ID\tLABEL\tWEIGHT\tNODE_TYPE\r\n":"ID\tLABEL\tWEIGHT\r\n";return Object.keys(n).forEach((e=>{const t=n[e].ID,i=n[e].WEIGHT,a=r?n[e].NODE_TYPE:"";o+=r?`${t}\t${e}\t${i}\t${a}\r\n`:`${t}\t${e}\t${i}\r\n`})),{nodeMap:n,nodesTsv:o}})(r),a=((e,t)=>{let n="SOURCE\tTARGET\tWEIGHT\tTYPE\r\n";return e.forEach((({source:e,target:r})=>{if(""===r||""===e)return;const o=t[e].ID,i=t[r].ID;n+=`${o}\t${i}\t1\tUndirected\r\n`})),n})(r,o),l=new L;l.file("Node_Table.tsv",i),l.file("Edge_Table.tsv",a),l.generateAsync({type:"blob"}).then((e=>{U(e,"Gephi_generated_by_NMTL.zip")}))};const H=({data:e,dataType:t,extType:n="xlsx"})=>{let r;switch(t){case"sna":r=(e=>{const{links:t,nodes:n}=e||{};if(t&&t.length>0)return t.map((e=>({From:n[e.source].name,To:n[e.target].name})));return[]})(e);break;default:r=e}!function(e,t,n,r){var o=new Blob(void 0!==r?[r,e]:[e],{type:n||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(o,t);else{var i=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(o):window.webkitURL.createObjectURL(o),a=document.createElement("a");a.style.display="none",a.href=i,a.setAttribute("download",t),void 0===a.download&&a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),setTimeout((function(){document.body.removeChild(a),window.URL.revokeObjectURL(i)}),200)}}(`\ufeff${(e=>{let t="";if(Array.isArray(e)&&e.length>0){const n=Object.keys(e[0]);t+=`${n.toString()}\n`,e.forEach((e=>{n.forEach((n=>{t+=`${e[n]},`})),t+="\n"}))}else{const n=Object.keys(e);t+=`${n.toString()}\n`,n.forEach((n=>{t+=`${e[n]},`})),t+="\n"}return t})(r)}`,`output.${n}`)},$=({fill:e="#825c0d"})=>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"}))),G=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_128","data-name":"Rectangle 128",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_47","data-name":"Mask Group 47",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3633","data-name":"Group 3633",transform:"translate(6 6)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z",transform:"translate(-495 -369)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632",transform:"translate(0 2)"},t.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)"}))))),W=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_129","data-name":"Rectangle 129",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_48","data-name":"Mask Group 48",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3635","data-name":"Group 3635",transform:"translate(6 8)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M510 371v2h6v-2z",transform:"translate(-495 -371)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632"},t.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)"}))))),q=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_124","data-name":"Rectangle 124",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_46","data-name":"Mask Group 46",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3629","data-name":"Group 3629",transform:"translate(6 6.001)"},t.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)"}),t.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)"}),t.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)"}),t.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)"}))));l(".extraTools {\n width: 100%;\n display: inline-flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n padding: 0px 20px;\n padding-top: 12px; }\n .extraTools__share button {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__download {\n cursor: pointer; }\n .extraTools__download-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fullscreenBtn {\n cursor: pointer;\n padding-top: 0; }\n .extraTools__fullscreenBtn-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fontsize {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-changer,\n .extraTools .font-size-changer-buttons,\n .extraTools .font-size-up,\n .extraTools .font-size-down,\n .extraTools .tooltip {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .extraTools .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .extraTools .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n .extraTools #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");const V=({className:e})=>n.createElement("div",{className:a("extraTools__share",e)},n.createElement(N,{url:document.location.href},n.createElement(T,{size:32,round:!0})));V.defaultProps={className:void 0},V.propTypes={className:c.string};const X=({className:e,intl:t,exclude:r,iconColor:o,SNAData:l,domToImageId:c})=>{const[s,u]=i(null),f=[{key:"downloadImage",onClick:()=>(({id:e,fileName:t="image",quality:n=.95})=>{const r=document.getElementById(e);B.toPng(r,{quality:n}).then((e=>{const n=document.createElement("a");n.download=`${t}.png`,n.href=e,n.click()})).catch((e=>{console.error("oops, something went wrong!",e)}))})({id:c}),label:t?"knowledge.writersAndWorksSNA.download.img":"下載圖片"},{key:"downloadTsv",onClick:()=>F(l),label:t?"knowledge.writersAndWorksSNA.download.gephi":"下載Gephi"},{key:"downloadXls",onClick:()=>H({data:l,dataType:"sna",extType:"xlsx"}),label:t?"knowledge.writersAndWorksSNA.download.xls":"下載Excel"}];return n.createElement("div",{className:a("extraTools__download",e)},n.createElement(M,{title:t?t.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},n.createElement("div",{className:"extraTools__download-icon",onClick:e=>u(e.currentTarget)},n.createElement($,{fill:o}))),n.createElement(p,{id:"download-menu",anchorEl:s,keepMounted:!0,open:Boolean(s),onClose:()=>u(null)},f.map((({key:e,onClick:o,label:i})=>{return a=e,!((r||[]).filter((e=>e===a)).length>0)&&n.createElement(d,{key:e,onClick:o},t?t.formatMessage({id:i}):i);var a}))))};X.defaultProps={className:void 0,intl:void 0,exclude:void 0,SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph"},X.propTypes={className:c.string,intl:c.objectOf(c.any),exclude:c.arrayOf(c.string),SNAData:c.objectOf(c.any),iconColor:c.string,domToImageId:c.string};const Y=({className:e,intl:t,iconColor:r,fullScreenHandle:o})=>{const{enter:i}=o||{enter:()=>{}};return n.createElement("div",{className:a("extraTools__fullscreenBtn",e)},n.createElement(M,{title:t?t.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},n.createElement("div",{className:"extraTools__fullscreenBtn-icon",onClick:i},n.createElement(q,{fill:r}))))};Y.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",fullScreenHandle:void 0},Y.propTypes={className:c.string,intl:c.objectOf(c.any),iconColor:c.string,fullScreenHandle:c.objectOf(c.any)};const J=({className:e,intl:t,iconColor:r,FontSizeTargets:o,FontSizeOptions:i})=>n.createElement("div",{className:a("extraTools__fontsize",e)},n.createElement(R,{targets:o,options:i,customButtons:{up:n.createElement(M,{title:t?t.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},n.createElement(G,{fill:r})),down:n.createElement(M,{title:t?t.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},n.createElement(W,{fill:r})),style:{border:"none"},buttonsMargin:10}}));J.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1}},J.propTypes={className:c.string,intl:c.objectOf(c.any),iconColor:c.string,FontSizeTargets:c.arrayOf(c.string),FontSizeOptions:c.objectOf(c.any)};const K=({className:t,intl:r,exclude:o,SNAData:i,iconColor:l,domToImageId:c,FontSizeTargets:s,FontSizeOptions:u,fullScreenHandle:f})=>{const p={intl:r,exclude:o,SNAData:i,iconColor:l,domToImageId:c,FontSizeTargets:s,FontSizeOptions:u,fullScreenHandle:f},d=[{keys:["share"],Component:V},{keys:["downloadImage","downloadTsv","downloadXls"],Component:X},{keys:["fullscreen"],Component:Y},{keys:["fontSizeChanger"],Component:J}];return n.createElement("div",{className:a("extraTools",t)},d.map((({keys:t,Component:r})=>{return i=t,!((o||[]).filter((e=>e===i)).length>0)&&n.createElement(r,e({key:t[0]},p));var i})))};K.ShareButton=V,K.DownloadMenu=X,K.FullscreenBtn=Y,K.FontSizeChanger=J,K.defaultProps={className:void 0,intl:void 0,exclude:["downloadXls"],SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1},fullScreenHandle:void 0},K.propTypes={className:c.string,intl:c.objectOf(c.any),exclude:c.arrayOf(c.string),SNAData:c.objectOf(c.any),iconColor:c.string,domToImageId:c.string,FontSizeTargets:c.arrayOf(c.string),FontSizeOptions:c.objectOf(c.any),fullScreenHandle:c.objectOf(c.any)};export{K as default};
@@ -1,4 +1,4 @@
1
- import*as t from"react";import e,{useMemo as n,useState as r,useRef as o,useEffect as i,useCallback as a,Component as l,forwardRef as u}from"react";import c from"prop-types";import{u as s,b as f,c as h}from"./index-b2745105.js";import{i as p,a as d,r as y}from"./createSvgIcon-691efc4f.js";import{_ as g}from"./_rollupPluginBabelHelpers-b18bba19.js";import{Menu as v,MenuItem as m}from"@material-ui/core";import w from"./Tooltip.js";import{s as b,f as _,a as x}from"./dataExport-9fccd4f0.js";import{s as k}from"./style-inject.es-1f59c1d0.js";import"@material-ui/styles";import"react-dom";function E(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var S,N;1===(S=E).length&&(N=S,S=function(t,e){return E(N(t),e)});var A={value:function(){}};function C(){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 P(r)}function P(t){this._=t}function O(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 T(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function j(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=A,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}P.prototype=C.prototype={constructor:P,on:function(t,e){var n,r=this._,o=O(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]=j(r[n],t.name,e);else if(null==e)for(n in r)r[n]=j(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=T(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new P(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 M="http://www.w3.org/1999/xhtml",z={svg:"http://www.w3.org/2000/svg",xhtml:M,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function F(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),z.hasOwnProperty(e)?{space:z[e],local:t}:t}function D(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===M&&e.documentElement.namespaceURI===M?e.createElement(t):e.createElementNS(n,t)}}function I(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function R(t){var e=F(t);return(e.local?I:D)(e)}function L(){}function B(t){return null==t?L:function(){return this.querySelector(t)}}function q(){return[]}function $(t){return null==t?q:function(){return this.querySelectorAll(t)}}function H(t){return function(){return this.matches(t)}}function U(t){return new Array(t.length)}function G(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}G.prototype={constructor:G,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 V(t,e,n,r,o,i){for(var a,l=0,u=e.length,c=i.length;l<c;++l)(a=e[l])?(a.__data__=i[l],r[l]=a):n[l]=new G(t,i[l]);for(;l<u;++l)(a=e[l])&&(o[l]=a)}function W(t,e,n,r,o,i,a){var l,u,c,s={},f=e.length,h=i.length,p=new Array(f);for(l=0;l<f;++l)(u=e[l])&&(p[l]=c="$"+a.call(u,u.__data__,l,e),c in s?o[l]=u:s[c]=u);for(l=0;l<h;++l)(u=s[c="$"+a.call(t,i[l],l,i)])?(r[l]=u,u.__data__=i[l],s[c]=null):n[l]=new G(t,i[l]);for(l=0;l<f;++l)(u=e[l])&&s[p[l]]===u&&(o[l]=u)}function X(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Y(t){return function(){this.removeAttribute(t)}}function J(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K(t,e){return function(){this.setAttribute(t,e)}}function Q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function tt(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 et(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function nt(t){return function(){this.style.removeProperty(t)}}function rt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ot(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function it(t,e){return t.style.getPropertyValue(e)||et(t).getComputedStyle(t,null).getPropertyValue(e)}function at(t){return function(){delete this[t]}}function lt(t,e){return function(){this[t]=e}}function ut(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ct(t){return t.trim().split(/^|\s+/)}function st(t){return t.classList||new ft(t)}function ft(t){this._node=t,this._names=ct(t.getAttribute("class")||"")}function ht(t,e){for(var n=st(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function pt(t,e){for(var n=st(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function dt(t){return function(){ht(this,t)}}function yt(t){return function(){pt(this,t)}}function gt(t,e){return function(){(e.apply(this,arguments)?ht:pt)(this,t)}}function vt(){this.textContent=""}function mt(t){return function(){this.textContent=t}}function wt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function bt(){this.innerHTML=""}function _t(t){return function(){this.innerHTML=t}}function xt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function kt(){this.nextSibling&&this.parentNode.appendChild(this)}function Et(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function St(){return null}function Nt(){var t=this.parentNode;t&&t.removeChild(this)}function At(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ct(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}ft.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 Pt={},Ot=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Pt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Tt(t,e,n){return t=jt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function jt(t,e,n){return function(r){var o=Ot;Ot=r;try{t.call(this,this.__data__,e,n)}finally{Ot=o}}}function Mt(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 zt(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 Ft(t,e,n){var r=Pt.hasOwnProperty(t.type)?Tt:jt;return function(o,i,a){var l,u=this.__on,c=r(e,i,a);if(u)for(var s=0,f=u.length;s<f;++s)if((l=u[s]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=n),void(l.value=e);this.addEventListener(t.type,c,n),l={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(l):this.__on=[l]}}function Dt(t,e,n,r){var o=Ot;t.sourceEvent=Ot,Ot=t;try{return e.apply(n,r)}finally{Ot=o}}function It(t,e,n){var r=et(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 Rt(t,e){return function(){return It(this,t,e)}}function Lt(t,e){return function(){return It(this,t,e.apply(this,arguments))}}var Bt=[null];function qt(t,e){this._groups=t,this._parents=e}function $t(){return new qt([[document.documentElement]],Bt)}function Ht(t){return"string"==typeof t?new qt([[document.querySelector(t)]],[document.documentElement]):new qt([[t]],Bt)}function Ut(){for(var t,e=Ot;t=e.sourceEvent;)e=t;return e}function Gt(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 Vt(t){var e=Ut();return e.changedTouches&&(e=e.changedTouches[0]),Gt(t,e)}function Wt(t,e,n){arguments.length<3&&(n=e,e=Ut().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return Gt(t,r);return null}function Xt(){Ot.stopImmediatePropagation()}function Yt(){Ot.preventDefault(),Ot.stopImmediatePropagation()}function Jt(t){var e=t.document.documentElement,n=Ht(t).on("dragstart.drag",Yt,!0);"onselectstart"in e?n.on("selectstart.drag",Yt,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Kt(t){return function(){return t}}function Qt(t,e,n,r,o,i,a,l,u,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=l,this.dy=u,this._=c}function Zt(){return!Ot.ctrlKey&&!Ot.button}function te(){return this.parentNode}function ee(t){return null==t?{x:Ot.x,y:Ot.y}:t}function ne(){return navigator.maxTouchPoints||"ontouchstart"in this}function re(){var t,e,n,r,o=Zt,i=te,a=ee,l=ne,u={},c=C("start","drag","end"),s=0,f=0;function h(t){t.on("mousedown.drag",p).filter(l).on("touchstart.drag",g).on("touchmove.drag",v).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),Vt,this,arguments);a&&(Ht(Ot.view).on("mousemove.drag",d,!0).on("mouseup.drag",y,!0),Jt(Ot.view),Xt(),n=!1,t=Ot.clientX,e=Ot.clientY,a("start"))}}function d(){if(Yt(),!n){var r=Ot.clientX-t,o=Ot.clientY-e;n=r*r+o*o>f}u.mouse("drag")}function y(){Ht(Ot.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=Ht(t).on("dragstart.drag",null);e&&(r.on("click.drag",Yt,!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)}(Ot.view,n),Yt(),u.mouse("end")}function g(){if(o.apply(this,arguments)){var t,e,n=Ot.changedTouches,r=i.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=w(n[t].identifier,r,Wt,this,arguments))&&(Xt(),e("start"))}}function v(){var t,e,n=Ot.changedTouches,r=n.length;for(t=0;t<r;++t)(e=u[n[t].identifier])&&(Yt(),e("drag"))}function m(){var t,e,n=Ot.changedTouches,o=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(e=u[n[t].identifier])&&(Xt(),e("end"))}function w(t,e,n,r,o){var i,l,f,p=n(e,t),d=c.copy();if(Dt(new Qt(h,"beforestart",i,t,s,p[0],p[1],0,0,d),(function(){return null!=(Ot.subject=i=a.apply(r,o))&&(l=i.x-p[0]||0,f=i.y-p[1]||0,!0)})))return function a(c){var y,g=p;switch(c){case"start":u[t]=a,y=s++;break;case"end":delete u[t],--s;case"drag":p=n(e,t),y=s}Dt(new Qt(h,c,i,t,y,p[0]+l,p[1]+f,p[0]-g[0],p[1]-g[1],d),d.apply,d,[c,r,o])}}return h.filter=function(t){return arguments.length?(o="function"==typeof t?t:Kt(!!t),h):o},h.container=function(t){return arguments.length?(i="function"==typeof t?t:Kt(t),h):i},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:Kt(t),h):a},h.touchable=function(t){return arguments.length?(l="function"==typeof t?t:Kt(!!t),h):l},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 oe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ie(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ae(){}qt.prototype=$t.prototype={constructor:qt,select:function(t){"function"!=typeof t&&(t=B(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a,l=e[o],u=l.length,c=r[o]=new Array(u),s=0;s<u;++s)(i=l[s])&&(a=t.call(i,i.__data__,s,l))&&("__data__"in i&&(a.__data__=i.__data__),c[s]=a);return new qt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=$(t));for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,l=e[i],u=l.length,c=0;c<u;++c)(a=l[c])&&(r.push(t.call(a,a.__data__,c,l)),o.push(a));return new qt(r,o)},filter:function(t){"function"!=typeof t&&(t=H(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],l=a.length,u=r[o]=[],c=0;c<l;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&u.push(i);return new qt(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?W:V,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),l=new Array(i),u=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=l[c]=new Array(d),g=a[c]=new Array(d);n(s,f,y,g,u[c]=new Array(h),p,e);for(var v,m,w=0,b=0;w<d;++w)if(v=y[w]){for(w>=b&&(b=w+1);!(m=g[b])&&++b<d;);v._next=m||null}}return(a=new qt(a,r))._enter=l,a._exit=u,a},enter:function(){return new qt(this._enter||this._groups.map(U),this._parents)},exit:function(){return new qt(this._exit||this._groups.map(U),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),l=0;l<i;++l)for(var u,c=e[l],s=n[l],f=c.length,h=a[l]=new Array(f),p=0;p<f;++p)(u=c[p]||s[p])&&(h[p]=u);for(;l<r;++l)a[l]=e[l];return new qt(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=X);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,l=n[i],u=l.length,c=o[i]=new Array(u),s=0;s<u;++s)(a=l[s])&&(c[s]=a);c.sort(e)}return new qt(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,l=i.length;a<l;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=F(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?J:Y:"function"==typeof e?n.local?tt:Z:n.local?Q:K)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?nt:"function"==typeof e?ot:rt)(t,e,null==n?"":n)):it(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?at:"function"==typeof e?ut:lt)(t,e)):this.node()[t]},classed:function(t,e){var n=ct(t+"");if(arguments.length<2){for(var r=st(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?gt:e?dt:yt)(n,e))},text:function(t){return arguments.length?this.each(null==t?vt:("function"==typeof t?wt:mt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?bt:("function"==typeof t?xt:_t)(t)):this.node().innerHTML},raise:function(){return this.each(kt)},lower:function(){return this.each(Et)},append:function(t){var e="function"==typeof t?t:R(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:R(t),r=null==e?St:"function"==typeof e?e:B(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Nt)},clone:function(t){return this.select(t?Ct:At)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=Mt(t+""),a=i.length;if(!(arguments.length<2)){for(l=e?Ft:zt,null==n&&(n=!1),r=0;r<a;++r)this.each(l(i[r],e,n));return this}var l=this.node().__on;if(l)for(var u,c=0,s=l.length;c<s;++c)for(r=0,u=l[c];r<a;++r)if((o=i[r]).type===u.type&&o.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Lt:Rt)(t,e))}},Qt.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var le=1/.7,ue="\\s*([+-]?\\d+)\\s*",ce="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",se="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fe=/^#([0-9a-f]{3,8})$/,he=new RegExp("^rgb\\("+[ue,ue,ue]+"\\)$"),pe=new RegExp("^rgb\\("+[se,se,se]+"\\)$"),de=new RegExp("^rgba\\("+[ue,ue,ue,ce]+"\\)$"),ye=new RegExp("^rgba\\("+[se,se,se,ce]+"\\)$"),ge=new RegExp("^hsl\\("+[ce,se,se]+"\\)$"),ve=new RegExp("^hsla\\("+[ce,se,se,ce]+"\\)$"),me={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 we(){return this.rgb().formatHex()}function be(){return this.rgb().formatRgb()}function _e(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=fe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?xe(e):3===n?new Ne(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ke(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 Ne(e[1],e[2],e[3],1):(e=pe.exec(t))?new Ne(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=de.exec(t))?ke(e[1],e[2],e[3],e[4]):(e=ye.exec(t))?ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ge.exec(t))?Oe(e[1],e[2]/100,e[3]/100,1):(e=ve.exec(t))?Oe(e[1],e[2]/100,e[3]/100,e[4]):me.hasOwnProperty(t)?xe(me[t]):"transparent"===t?new Ne(NaN,NaN,NaN,0):null}function xe(t){return new Ne(t>>16&255,t>>8&255,255&t,1)}function ke(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ne(t,e,n,r)}function Ee(t){return t instanceof ae||(t=_e(t)),t?new Ne((t=t.rgb()).r,t.g,t.b,t.opacity):new Ne}function Se(t,e,n,r){return 1===arguments.length?Ee(t):new Ne(t,e,n,null==r?1:r)}function Ne(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ae(){return"#"+Pe(this.r)+Pe(this.g)+Pe(this.b)}function Ce(){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 Pe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Oe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new je(t,e,n,r)}function Te(t){if(t instanceof je)return new je(t.h,t.s,t.l,t.opacity);if(t instanceof ae||(t=_e(t)),!t)return new je;if(t instanceof je)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,l=i-o,u=(i+o)/2;return l?(a=e===i?(n-r)/l+6*(n<r):n===i?(r-e)/l+2:(e-n)/l+4,l/=u<.5?i+o:2-i-o,a*=60):l=u>0&&u<1?0:a,new je(a,l,u,t.opacity)}function je(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Me(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 ze(t){return function(){return t}}function Fe(t){return 1==(t=+t)?De: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):ze(isNaN(e)?n:e)}}function De(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ze(isNaN(t)?e:t)}oe(ae,_e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:we,formatHex:we,formatHsl:function(){return Te(this).formatHsl()},formatRgb:be,toString:be}),oe(Ne,Se,ie(ae,{brighter:function(t){return t=null==t?le:Math.pow(le,t),new Ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ne(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:Ae,formatHex:Ae,formatRgb:Ce,toString:Ce})),oe(je,(function(t,e,n,r){return 1===arguments.length?Te(t):new je(t,e,n,null==r?1:r)}),ie(ae,{brighter:function(t){return t=null==t?le:Math.pow(le,t),new je(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new je(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 Ne(Me(t>=240?t-240:t+120,o,r),Me(t,o,r),Me(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 Ie=function t(e){var n=Fe(e);function r(t,e){var r=n((t=Se(t)).r,(e=Se(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=De(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 Re(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Le=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Be=new RegExp(Le.source,"g");function qe(t,e){var n,r,o,i=Le.lastIndex=Be.lastIndex=0,a=-1,l=[],u=[];for(t+="",e+="";(n=Le.exec(t))&&(r=Be.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,u.push({i:a,x:Re(n,r)})),i=Be.lastIndex;return i<e.length&&(o=e.slice(i),l[a]?l[a]+=o:l[++a]=o),l.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)l[(n=u[r]).i]=n.x(t);return l.join("")})}var $e,He,Ue,Ge,Ve=180/Math.PI,We={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xe(t,e,n,r,o,i){var a,l,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Ve,skewX:Math.atan(u)*Ve,scaleX:a,scaleY:l}}function Ye(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var l=[],u=[];return i=t(i),a=t(a),function(t,r,o,i,a,l){if(t!==o||r!==i){var u=a.push("translate(",null,e,null,n);l.push({i:u-4,x:Re(t,o)},{i:u-2,x:Re(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,l,u),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:Re(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,l,u),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Re(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,l,u),function(t,e,n,r,i,a){if(t!==n||e!==r){var l=i.push(o(i)+"scale(",null,",",null,")");a.push({i:l-4,x:Re(t,n)},{i:l-2,x:Re(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,l,u),i=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)l[(e=u[n]).i]=e.x(t);return l.join("")}}}var Je,Ke,Qe=Ye((function(t){return"none"===t?We:($e||($e=document.createElement("DIV"),He=document.documentElement,Ue=document.defaultView),$e.style.transform=t,t=Ue.getComputedStyle(He.appendChild($e),null).getPropertyValue("transform"),He.removeChild($e),Xe(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ze=Ye((function(t){return null==t?We:(Ge||(Ge=document.createElementNS("http://www.w3.org/2000/svg","g")),Ge.setAttribute("transform",t),(t=Ge.transform.baseVal.consolidate())?Xe((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):We)}),", ",")",")"),tn=0,en=0,nn=0,rn=0,on=0,an=0,ln="object"==typeof performance&&performance.now?performance:Date,un="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function cn(){return on||(un(sn),on=ln.now()+an)}function sn(){on=0}function fn(){this._call=this._time=this._next=null}function hn(t,e,n){var r=new fn;return r.restart(t,e,n),r}function pn(){on=(rn=ln.now())+an,tn=en=0;try{!function(){cn(),++tn;for(var t,e=Je;e;)(t=on-e._time)>=0&&e._call.call(null,t),e=e._next;--tn}()}finally{tn=0,function(){var t,e,n=Je,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:Je=e);Ke=t,yn(r)}(),on=0}}function dn(){var t=ln.now(),e=t-rn;e>1e3&&(an-=e,rn=t)}function yn(t){tn||(en&&(en=clearTimeout(en)),t-on>24?(t<1/0&&(en=setTimeout(pn,t-ln.now()-an)),nn&&(nn=clearInterval(nn))):(nn||(rn=ln.now(),nn=setInterval(dn,1e3)),tn=1,un(pn)))}function gn(t,e,n){var r=new fn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}fn.prototype=hn.prototype={constructor:fn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?cn():+n)+(null==e?0:+e),this._next||Ke===this||(Ke?Ke._next=this:Je=this,Ke=this),this._call=t,this._time=n,yn()},stop:function(){this._call&&(this._call=null,this._time=1/0,yn())}};var vn=C("start","end","cancel","interrupt"),mn=[];function wn(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 u();for(c in o)if((h=o[c]).name===n.name){if(3===h.state)return gn(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(gn((function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(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 l(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),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),u())}function u(){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:vn,tween:mn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function bn(t,e){var n=xn(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function _n(t,e){var n=xn(t,e);if(n.state>3)throw new Error("too late; already running");return n}function xn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function kn(t,e){var n,r;return function(){var o=_n(this,t),i=o.tween;if(i!==n)for(var a=0,l=(r=n=i).length;a<l;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function En(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=_n(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var l={name:e,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===e){o[u]=l;break}u===c&&o.push(l)}i.tween=o}}function Sn(t,e,n){var r=t._id;return t.each((function(){var t=_n(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return xn(t,r).value[e]}}function Nn(t,e){var n;return("number"==typeof e?Re:e instanceof _e?Ie:(n=_e(e))?(e=n,Ie):qe)(t,e)}function An(t){return function(){this.removeAttribute(t)}}function Cn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pn(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 On(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 Tn(t,e,n){var r,o,i;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(l=u+"")?null:a===r&&l===o?i:(o=l,i=e(r=a,u));this.removeAttribute(t)}}function jn(t,e,n){var r,o,i;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(l=u+"")?null:a===r&&l===o?i:(o=l,i=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Mn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Fn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&zn(t,o)),n}return o._value=e,o}function Dn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Mn(t,o)),n}return o._value=e,o}function In(t,e){return function(){bn(this,t).delay=+e.apply(this,arguments)}}function Rn(t,e){return e=+e,function(){bn(this,t).delay=e}}function Ln(t,e){return function(){_n(this,t).duration=+e.apply(this,arguments)}}function Bn(t,e){return e=+e,function(){_n(this,t).duration=e}}function qn(t,e){if("function"!=typeof e)throw new Error;return function(){_n(this,t).ease=e}}function $n(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)?bn:_n;return function(){var a=i(this,t),l=a.on;l!==r&&(o=(r=l).copy()).on(e,n),a.on=o}}var Hn=$t.prototype.constructor;function Un(t){return function(){this.style.removeProperty(t)}}function Gn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Vn(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&Gn(t,i,n)),r}return i._value=e,i}function Wn(t){return function(e){this.textContent=t.call(this,e)}}function Xn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Wn(r)),e}return r._value=t,r}var Yn=0;function Jn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Kn(){return++Yn}var Qn=$t.prototype;Jn.prototype={constructor:Jn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=B(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var l,u,c=r[a],s=c.length,f=i[a]=new Array(s),h=0;h<s;++h)(l=c[h])&&(u=t.call(l,l.__data__,h,c))&&("__data__"in l&&(u.__data__=l.__data__),f[h]=u,wn(f[h],e,n,h,f,xn(l,n)));return new Jn(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=$(t));for(var r=this._groups,o=r.length,i=[],a=[],l=0;l<o;++l)for(var u,c=r[l],s=c.length,f=0;f<s;++f)if(u=c[f]){for(var h,p=t.call(u,u.__data__,f,c),d=xn(u,n),y=0,g=p.length;y<g;++y)(h=p[y])&&wn(h,e,n,y,p,d);i.push(p),a.push(u)}return new Jn(i,a,e,n)},filter:function(t){"function"!=typeof t&&(t=H(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],l=a.length,u=r[o]=[],c=0;c<l;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&u.push(i);return new Jn(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),l=0;l<i;++l)for(var u,c=e[l],s=n[l],f=c.length,h=a[l]=new Array(f),p=0;p<f;++p)(u=c[p]||s[p])&&(h[p]=u);for(;l<r;++l)a[l]=e[l];return new Jn(a,this._parents,this._name,this._id)},selection:function(){return new Hn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Kn(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],u=l.length,c=0;c<u;++c)if(a=l[c]){var s=xn(a,e);wn(a,t,n,c,l,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Jn(r,this._parents,t,n)},call:Qn.call,nodes:Qn.nodes,node:Qn.node,size:Qn.size,empty:Qn.empty,each:Qn.each,on:function(t,e){var n=this._id;return arguments.length<2?xn(this.node(),n).on.on(t):this.each($n(n,t,e))},attr:function(t,e){var n=F(t),r="transform"===n?Ze:Nn;return this.attrTween(t,"function"==typeof e?(n.local?jn:Tn)(n,r,Sn(this,"attr."+t,e)):null==e?(n.local?Cn:An)(n):(n.local?On:Pn)(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=F(t);return this.tween(n,(r.local?Fn:Dn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Qe:Nn;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=it(this,t),a=(this.style.removeProperty(t),it(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,Un(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=it(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=it(this,t)),a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,l))}}(t,r,Sn(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,l="end."+a;return function(){var u=_n(this,t),c=u.on,s=null==u.value[a]?i||(i=Un(e)):void 0;c===n&&o===s||(r=(n=c).copy()).on(l,o=s),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=it(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,Vn(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}}(Sn(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,Xn(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=xn(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?kn:En)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?In:Rn)(e,t)):xn(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ln:Bn)(e,t)):xn(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(qn(e,t)):xn(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var l={value:a},u={value:function(){0==--o&&i()}};n.each((function(){var n=_n(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),n.on=e}))}))}};var Zn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function tr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Zn.time=cn(),Zn;return n}$t.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)}))},$t.prototype.transition=function(t){var e,n;t instanceof Jn?(e=t._id,t=t._name):(e=Kn(),(n=Zn).time=cn(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],u=l.length,c=0;c<u;++c)(a=l[c])&&wn(a,t,e,c,l,n||tr(a,e));return new Jn(r,this._parents,t,e)};function er(){}function nr(t,e){var n=new er;if(t instanceof er)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(){}er.prototype=nr.prototype={constructor:er,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 or=nr.prototype;function ir(t){return function(){return t}}function ar(){return 1e-6*(Math.random()-.5)}function lr(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,l,u,c,s,f,h,p=t._root,d={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(i=(y+v)/2))?y=i:v=i,(s=n>=(a=(g+m)/2))?g=a:m=a,o=p,!(p=p[f=s<<1|c]))return o[f]=d,t;if(l=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===l&&n===u)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+v)/2))?y=i:v=i,(s=n>=(a=(g+m)/2))?g=a:m=a}while((f=s<<1|c)==(h=(u>=a)<<1|l>=i));return o[h]=p,o[f]=d,t}function ur(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}function cr(t){return t[0]}function sr(t){return t[1]}function fr(t,e,n){var r=new hr(null==e?cr:e,null==n?sr: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 pr(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:or.has,add:function(t){return this["$"+(t+="")]=t,this},remove:or.remove,clear:or.clear,values:or.keys,size:or.size,empty:or.empty,each:or.each};var dr=fr.prototype=hr.prototype;function yr(t){return t.x+t.vx}function gr(t){return t.y+t.vy}function vr(t){return t.index}function mr(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function wr(t){return t.x}function br(t){return t.y}dr.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=pr(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]=pr(e));return n},dr.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return lr(this.cover(e,n),e,n,t)},dr.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),l=new Array(i),u=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,l[n]=o,r<u&&(u=r),r>s&&(s=r),o<c&&(c=o),o>f&&(f=o));if(u>s||c>f)return this;for(this.cover(u,c).cover(s,f),n=0;n<i;++n)lr(this,a[n],l[n],t[n]);return this},dr.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,l,u=o-n,c=this._root;n>t||t>=o||r>e||e>=i;)switch(l=(e<r)<<1|t<n,(a=new Array(4))[l]=c,c=a,u*=2,l){case 0:o=n+u,i=r+u;break;case 1:n=o-u,i=r+u;break;case 2:o=n+u,r=i-u;break;case 3:n=o-u,r=i-u}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},dr.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},dr.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]]},dr.find=function(t,e,n){var r,o,i,a,l,u,c,s=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],y=this._root;for(y&&d.push(new ur(y,s,f,h,p)),null==n?n=1/0:(s=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(y=u.node)||(o=u.x0)>h||(i=u.y0)>p||(a=u.x1)<s||(l=u.y1)<f))if(y.length){var g=(o+a)/2,v=(i+l)/2;d.push(new ur(y[3],g,v,a,l),new ur(y[2],o,v,g,l),new ur(y[1],g,i,a,v),new ur(y[0],o,i,g,v)),(c=(e>=v)<<1|t>=g)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=u)}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},dr.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,l,u,c,s,f,h,p=this._root,d=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((c=i>=(l=(d+g)/2))?d=l:g=l,(s=a>=(u=(y+v)/2))?y=u:v=u,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)},dr.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},dr.root=function(){return this._root},dr.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},dr.visit=function(t){var e,n,r,o,i,a,l=[],u=this._root;for(u&&l.push(new ur(u,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(u=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&u.length){var c=(r+i)/2,s=(o+a)/2;(n=u[3])&&l.push(new ur(n,c,s,i,a)),(n=u[2])&&l.push(new ur(n,r,s,c,a)),(n=u[1])&&l.push(new ur(n,c,o,i,s)),(n=u[0])&&l.push(new ur(n,r,o,c,s))}return this},dr.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ur(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,l=e.y0,u=e.x1,c=e.y1,s=(a+u)/2,f=(l+c)/2;(i=o[0])&&n.push(new ur(i,a,l,s,f)),(i=o[1])&&n.push(new ur(i,s,l,u,f)),(i=o[2])&&n.push(new ur(i,a,f,s,c)),(i=o[3])&&n.push(new ur(i,s,f,u,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},dr.x=function(t){return arguments.length?(this._x=t,this):this._x},dr.y=function(t){return arguments.length?(this._y=t,this):this._y};var _r=Math.PI*(3-Math.sqrt(5));function xr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var kr=Array.prototype.slice,Er={name:"implicit"};function Sr(){var t=nr(),e=[],n=[],r=Er;function o(o){var i=o+"",a=t.get(i);if(!a){if(r!==Er)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=nr();for(var r,i,a=-1,l=n.length;++a<l;)t.has(i=(r=n[a])+"")||t.set(i,e.push(r));return o},o.range=function(t){return arguments.length?(n=kr.call(t),o):n.slice()},o.unknown=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return Sr(e,n).unknown(r)},xr.apply(o,arguments),o}var Nr=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"),Ar={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},Cr=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],Pr=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],Or=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],Tr="undefined"!=typeof window&&void 0!==window.document?window.document:{},jr="fullscreenEnabled"in Tr&&Object.keys(Ar)||Cr[0]in Tr&&Cr||Pr[0]in Tr&&Pr||Or[0]in Tr&&Or||[],Mr={requestFullscreen:function(t){return t[jr[Ar.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[jr[Ar.requestFullscreen]]},get exitFullscreen(){return Tr[jr[Ar.exitFullscreen]].bind(Tr)},get fullscreenPseudoClass(){return":"+jr[Ar.fullscreen]},addEventListener:function(t,e,n){return Tr.addEventListener(jr[Ar[t]],e,n)},removeEventListener:function(t,e,n){return Tr.removeEventListener(jr[Ar[t]],e,n)},get fullscreenEnabled(){return Boolean(Tr[jr[Ar.fullscreenEnabled]])},set fullscreenEnabled(t){},get fullscreenElement(){return Tr[jr[Ar.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return Tr[("on"+jr[Ar.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return Tr[("on"+jr[Ar.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return Tr[("on"+jr[Ar.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return Tr[("on"+jr[Ar.fullscreenerror]).toLowerCase()]=t}};var zr=function(t){var n=t.handle,r=t.onChange,o=t.children,a=t.className,l=[];return a&&l.push(a),l.push("fullscreen"),n.active&&l.push("fullscreen-enabled"),i((function(){r&&r(n.active,n)}),[n.active]),e.createElement("div",{className:l.join(" "),ref:n.node,style:n.active?{height:"100%",width:"100%"}:void 0},o)},Fr=s(f((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=p(e),o=(0,d(y).default)(r.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit");n.default=o}))),Dr=function(){return(Dr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ir=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};var Rr,Lr=(Rr=function(t,e){return(Rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}Rr(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Br=function(){return(Br=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qr=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function l(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}u((r=r.apply(t,e||[])).next())}))},$r=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Hr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},Ur=function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then},Gr=function(t,e){return{left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-t/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-e/2}},Vr=function(t,e){return{top:(window.screen.height-e)/2,left:(window.screen.width-t)/2}};function Wr(t,e,n){var r=e.height,o=e.width,i=Hr(e,["height","width"]),a=Br({height:r,width:o,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"},i),l=window.open(t,"",Object.keys(a).map((function(t){return t+"="+a[t]})).join(", "));if(n)var u=window.setInterval((function(){try{(null===l||l.closed)&&(window.clearInterval(u),n(l))}catch(t){console.error(t)}}),1e3);return l}var Xr=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.openShareDialog=function(t){var n=e.props,r=n.onShareWindowClose,o=n.windowHeight,i=void 0===o?400:o,a=n.windowPosition,l=void 0===a?"windowCenter":a,u=n.windowWidth,c=void 0===u?550:u;Wr(t,Br({height:i,width:c},"windowCenter"===l?Gr(c,i):Vr(c,i)),r)},e.handleClick=function(t){return qr(e,void 0,void 0,(function(){var e,n,r,o,i,a,l,u,c,s;return $r(this,(function(f){switch(f.label){case 0:return e=this.props,n=e.beforeOnClick,r=e.disabled,o=e.networkLink,i=e.onClick,a=e.url,l=e.openShareDialogOnClick,u=e.opts,c=o(a,u),r?[2]:(t.preventDefault(),n?(s=n(),Ur(s)?[4,s]:[3,2]):[3,2]);case 1:f.sent(),f.label=2;case 2:return l&&this.openShareDialog(c),i&&i(t,c),[2]}}))}))},e}return Lr(n,t),n.prototype.render=function(){var t=this.props;t.beforeOnClick;var n=t.children,r=t.className,o=t.disabled,i=t.disabledStyle,a=t.forwardedRef;t.networkLink;var l=t.networkName;t.onShareWindowClose,t.openShareDialogOnClick,t.opts;var u=t.resetButtonStyle,c=t.style;t.url,t.windowHeight,t.windowPosition,t.windowWidth;var s=Hr(t,["beforeOnClick","children","className","disabled","disabledStyle","forwardedRef","networkLink","networkName","onShareWindowClose","openShareDialogOnClick","opts","resetButtonStyle","style","url","windowHeight","windowPosition","windowWidth"]),f=h("react-share__ShareButton",{"react-share__ShareButton--disabled":!!o,disabled:!!o},r),p=Br(Br(u?{backgroundColor:"transparent",border:"none",padding:0,font:"inherit",color:"inherit",cursor:"pointer"}:{},c),o&&i);return e.createElement("button",Br({},s,{"aria-label":s["aria-label"]||l,className:f,onClick:this.handleClick,ref:a,style:p}),n)},n.defaultProps={disabledStyle:{opacity:.6},openShareDialogOnClick:!0,resetButtonStyle:!0},n}(l),Yr=function(){return(Yr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var Jr,Kr,Qr=(Jr={color:"#3b5998",networkName:"facebook",path:"M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z"},(Kr=function(t){var n=t.bgStyle,r=t.borderRadius,o=t.iconFillColor,i=t.round,a=t.size,l=Ir(t,["bgStyle","borderRadius","iconFillColor","round","size"]);return e.createElement("svg",Dr({viewBox:"0 0 64 64",width:a,height:a},l),i?e.createElement("circle",{cx:"32",cy:"32",r:"31",fill:Jr.color,style:n}):e.createElement("rect",{width:"64",height:"64",rx:r,ry:r,fill:Jr.color,style:n}),e.createElement("path",{d:Jr.path,fill:o}))}).defaultProps={bgStyle:{},borderRadius:0,iconFillColor:"white",size:64},Kr),Zr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),to=function(t){function e(e){var n=t.call(this,e)||this;return n.name="AssertionError",n}return Zr(e,t),e}(Error);var eo=function(t,n,r,o){function i(i,a){var l=r(i),u=Yr({},i);return Object.keys(l).forEach((function(t){delete u[t]})),e.createElement(Xr,Yr({},o,u,{forwardedRef:a,networkName:t,networkLink:n,opts:r(i)}))}return i.displayName="ShareButton-"+t,u(i)}("facebook",(function(t,e){var n,r,o=e.quote,i=e.hashtag;return function(t,e){if(!t)throw new to(e)}(t,"facebook.url"),"https://www.facebook.com/sharer/sharer.php"+(n={u:t,quote:o,hashtag:i},(r=Object.entries(n).filter((function(t){return null!=t[1]})).map((function(t){var e=t[0],n=t[1];return encodeURIComponent(e)+"="+encodeURIComponent(String(n))}))).length>0?"?"+r.join("&"):"")}),(function(t){return{quote:t.quote,hashtag:t.hashtag}}),{windowWidth:550,windowHeight:400}),no=s(f((function(t,e){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){t.exports=n(2)},function(t,e,n){var r=n(4);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(6)(r,o),r.locals&&(t.exports=r.locals)},function(t,e,n){
1
+ import*as t from"react";import e,{useMemo as n,useState as r,useRef as o,useEffect as i,useCallback as a,Component as l,forwardRef as u}from"react";import c from"prop-types";import{u as s,b as f,c as h}from"./index-b2745105.js";import{i as p,a as d,r as y}from"./createSvgIcon-691efc4f.js";import{_ as g}from"./_rollupPluginBabelHelpers-b18bba19.js";import{Menu as v,MenuItem as m}from"@material-ui/core";import w from"./Tooltip.js";import{s as b,f as _,a as x}from"./dataExport-9fccd4f0.js";import{s as k}from"./style-inject.es-1f59c1d0.js";import"@material-ui/styles";import"react-dom";function E(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var S,N;1===(S=E).length&&(N=S,S=function(t,e){return E(N(t),e)});var A={value:function(){}};function C(){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 P(r)}function P(t){this._=t}function O(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 T(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function j(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=A,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}P.prototype=C.prototype={constructor:P,on:function(t,e){var n,r=this._,o=O(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]=j(r[n],t.name,e);else if(null==e)for(n in r)r[n]=j(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=T(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new P(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 M="http://www.w3.org/1999/xhtml",z={svg:"http://www.w3.org/2000/svg",xhtml:M,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function F(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),z.hasOwnProperty(e)?{space:z[e],local:t}:t}function I(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===M&&e.documentElement.namespaceURI===M?e.createElement(t):e.createElementNS(n,t)}}function D(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function R(t){var e=F(t);return(e.local?D:I)(e)}function L(){}function B(t){return null==t?L:function(){return this.querySelector(t)}}function q(){return[]}function $(t){return null==t?q:function(){return this.querySelectorAll(t)}}function H(t){return function(){return this.matches(t)}}function U(t){return new Array(t.length)}function G(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}G.prototype={constructor:G,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 V(t,e,n,r,o,i){for(var a,l=0,u=e.length,c=i.length;l<c;++l)(a=e[l])?(a.__data__=i[l],r[l]=a):n[l]=new G(t,i[l]);for(;l<u;++l)(a=e[l])&&(o[l]=a)}function W(t,e,n,r,o,i,a){var l,u,c,s={},f=e.length,h=i.length,p=new Array(f);for(l=0;l<f;++l)(u=e[l])&&(p[l]=c="$"+a.call(u,u.__data__,l,e),c in s?o[l]=u:s[c]=u);for(l=0;l<h;++l)(u=s[c="$"+a.call(t,i[l],l,i)])?(r[l]=u,u.__data__=i[l],s[c]=null):n[l]=new G(t,i[l]);for(l=0;l<f;++l)(u=e[l])&&s[p[l]]===u&&(o[l]=u)}function X(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Y(t){return function(){this.removeAttribute(t)}}function J(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K(t,e){return function(){this.setAttribute(t,e)}}function Q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function tt(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 et(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function nt(t){return function(){this.style.removeProperty(t)}}function rt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ot(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function it(t,e){return t.style.getPropertyValue(e)||et(t).getComputedStyle(t,null).getPropertyValue(e)}function at(t){return function(){delete this[t]}}function lt(t,e){return function(){this[t]=e}}function ut(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ct(t){return t.trim().split(/^|\s+/)}function st(t){return t.classList||new ft(t)}function ft(t){this._node=t,this._names=ct(t.getAttribute("class")||"")}function ht(t,e){for(var n=st(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function pt(t,e){for(var n=st(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function dt(t){return function(){ht(this,t)}}function yt(t){return function(){pt(this,t)}}function gt(t,e){return function(){(e.apply(this,arguments)?ht:pt)(this,t)}}function vt(){this.textContent=""}function mt(t){return function(){this.textContent=t}}function wt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function bt(){this.innerHTML=""}function _t(t){return function(){this.innerHTML=t}}function xt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function kt(){this.nextSibling&&this.parentNode.appendChild(this)}function Et(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function St(){return null}function Nt(){var t=this.parentNode;t&&t.removeChild(this)}function At(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ct(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}ft.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 Pt={},Ot=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Pt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Tt(t,e,n){return t=jt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function jt(t,e,n){return function(r){var o=Ot;Ot=r;try{t.call(this,this.__data__,e,n)}finally{Ot=o}}}function Mt(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 zt(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 Ft(t,e,n){var r=Pt.hasOwnProperty(t.type)?Tt:jt;return function(o,i,a){var l,u=this.__on,c=r(e,i,a);if(u)for(var s=0,f=u.length;s<f;++s)if((l=u[s]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=n),void(l.value=e);this.addEventListener(t.type,c,n),l={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(l):this.__on=[l]}}function It(t,e,n,r){var o=Ot;t.sourceEvent=Ot,Ot=t;try{return e.apply(n,r)}finally{Ot=o}}function Dt(t,e,n){var r=et(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 Rt(t,e){return function(){return Dt(this,t,e)}}function Lt(t,e){return function(){return Dt(this,t,e.apply(this,arguments))}}var Bt=[null];function qt(t,e){this._groups=t,this._parents=e}function $t(){return new qt([[document.documentElement]],Bt)}function Ht(t){return"string"==typeof t?new qt([[document.querySelector(t)]],[document.documentElement]):new qt([[t]],Bt)}function Ut(){for(var t,e=Ot;t=e.sourceEvent;)e=t;return e}function Gt(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 Vt(t){var e=Ut();return e.changedTouches&&(e=e.changedTouches[0]),Gt(t,e)}function Wt(t,e,n){arguments.length<3&&(n=e,e=Ut().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return Gt(t,r);return null}function Xt(){Ot.stopImmediatePropagation()}function Yt(){Ot.preventDefault(),Ot.stopImmediatePropagation()}function Jt(t){var e=t.document.documentElement,n=Ht(t).on("dragstart.drag",Yt,!0);"onselectstart"in e?n.on("selectstart.drag",Yt,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Kt(t){return function(){return t}}function Qt(t,e,n,r,o,i,a,l,u,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=o,this.x=i,this.y=a,this.dx=l,this.dy=u,this._=c}function Zt(){return!Ot.ctrlKey&&!Ot.button}function te(){return this.parentNode}function ee(t){return null==t?{x:Ot.x,y:Ot.y}:t}function ne(){return navigator.maxTouchPoints||"ontouchstart"in this}function re(){var t,e,n,r,o=Zt,i=te,a=ee,l=ne,u={},c=C("start","drag","end"),s=0,f=0;function h(t){t.on("mousedown.drag",p).filter(l).on("touchstart.drag",g).on("touchmove.drag",v).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),Vt,this,arguments);a&&(Ht(Ot.view).on("mousemove.drag",d,!0).on("mouseup.drag",y,!0),Jt(Ot.view),Xt(),n=!1,t=Ot.clientX,e=Ot.clientY,a("start"))}}function d(){if(Yt(),!n){var r=Ot.clientX-t,o=Ot.clientY-e;n=r*r+o*o>f}u.mouse("drag")}function y(){Ht(Ot.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=Ht(t).on("dragstart.drag",null);e&&(r.on("click.drag",Yt,!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)}(Ot.view,n),Yt(),u.mouse("end")}function g(){if(o.apply(this,arguments)){var t,e,n=Ot.changedTouches,r=i.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=w(n[t].identifier,r,Wt,this,arguments))&&(Xt(),e("start"))}}function v(){var t,e,n=Ot.changedTouches,r=n.length;for(t=0;t<r;++t)(e=u[n[t].identifier])&&(Yt(),e("drag"))}function m(){var t,e,n=Ot.changedTouches,o=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(e=u[n[t].identifier])&&(Xt(),e("end"))}function w(t,e,n,r,o){var i,l,f,p=n(e,t),d=c.copy();if(It(new Qt(h,"beforestart",i,t,s,p[0],p[1],0,0,d),(function(){return null!=(Ot.subject=i=a.apply(r,o))&&(l=i.x-p[0]||0,f=i.y-p[1]||0,!0)})))return function a(c){var y,g=p;switch(c){case"start":u[t]=a,y=s++;break;case"end":delete u[t],--s;case"drag":p=n(e,t),y=s}It(new Qt(h,c,i,t,y,p[0]+l,p[1]+f,p[0]-g[0],p[1]-g[1],d),d.apply,d,[c,r,o])}}return h.filter=function(t){return arguments.length?(o="function"==typeof t?t:Kt(!!t),h):o},h.container=function(t){return arguments.length?(i="function"==typeof t?t:Kt(t),h):i},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:Kt(t),h):a},h.touchable=function(t){return arguments.length?(l="function"==typeof t?t:Kt(!!t),h):l},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 oe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ie(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ae(){}qt.prototype=$t.prototype={constructor:qt,select:function(t){"function"!=typeof t&&(t=B(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a,l=e[o],u=l.length,c=r[o]=new Array(u),s=0;s<u;++s)(i=l[s])&&(a=t.call(i,i.__data__,s,l))&&("__data__"in i&&(a.__data__=i.__data__),c[s]=a);return new qt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=$(t));for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,l=e[i],u=l.length,c=0;c<u;++c)(a=l[c])&&(r.push(t.call(a,a.__data__,c,l)),o.push(a));return new qt(r,o)},filter:function(t){"function"!=typeof t&&(t=H(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],l=a.length,u=r[o]=[],c=0;c<l;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&u.push(i);return new qt(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?W:V,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),l=new Array(i),u=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=l[c]=new Array(d),g=a[c]=new Array(d);n(s,f,y,g,u[c]=new Array(h),p,e);for(var v,m,w=0,b=0;w<d;++w)if(v=y[w]){for(w>=b&&(b=w+1);!(m=g[b])&&++b<d;);v._next=m||null}}return(a=new qt(a,r))._enter=l,a._exit=u,a},enter:function(){return new qt(this._enter||this._groups.map(U),this._parents)},exit:function(){return new qt(this._exit||this._groups.map(U),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),l=0;l<i;++l)for(var u,c=e[l],s=n[l],f=c.length,h=a[l]=new Array(f),p=0;p<f;++p)(u=c[p]||s[p])&&(h[p]=u);for(;l<r;++l)a[l]=e[l];return new qt(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=X);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,l=n[i],u=l.length,c=o[i]=new Array(u),s=0;s<u;++s)(a=l[s])&&(c[s]=a);c.sort(e)}return new qt(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,l=i.length;a<l;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=F(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?J:Y:"function"==typeof e?n.local?tt:Z:n.local?Q:K)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?nt:"function"==typeof e?ot:rt)(t,e,null==n?"":n)):it(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?at:"function"==typeof e?ut:lt)(t,e)):this.node()[t]},classed:function(t,e){var n=ct(t+"");if(arguments.length<2){for(var r=st(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?gt:e?dt:yt)(n,e))},text:function(t){return arguments.length?this.each(null==t?vt:("function"==typeof t?wt:mt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?bt:("function"==typeof t?xt:_t)(t)):this.node().innerHTML},raise:function(){return this.each(kt)},lower:function(){return this.each(Et)},append:function(t){var e="function"==typeof t?t:R(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:R(t),r=null==e?St:"function"==typeof e?e:B(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Nt)},clone:function(t){return this.select(t?Ct:At)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=Mt(t+""),a=i.length;if(!(arguments.length<2)){for(l=e?Ft:zt,null==n&&(n=!1),r=0;r<a;++r)this.each(l(i[r],e,n));return this}var l=this.node().__on;if(l)for(var u,c=0,s=l.length;c<s;++c)for(r=0,u=l[c];r<a;++r)if((o=i[r]).type===u.type&&o.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Lt:Rt)(t,e))}},Qt.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var le=1/.7,ue="\\s*([+-]?\\d+)\\s*",ce="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",se="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fe=/^#([0-9a-f]{3,8})$/,he=new RegExp("^rgb\\("+[ue,ue,ue]+"\\)$"),pe=new RegExp("^rgb\\("+[se,se,se]+"\\)$"),de=new RegExp("^rgba\\("+[ue,ue,ue,ce]+"\\)$"),ye=new RegExp("^rgba\\("+[se,se,se,ce]+"\\)$"),ge=new RegExp("^hsl\\("+[ce,se,se]+"\\)$"),ve=new RegExp("^hsla\\("+[ce,se,se,ce]+"\\)$"),me={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 we(){return this.rgb().formatHex()}function be(){return this.rgb().formatRgb()}function _e(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=fe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?xe(e):3===n?new Ne(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ke(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 Ne(e[1],e[2],e[3],1):(e=pe.exec(t))?new Ne(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=de.exec(t))?ke(e[1],e[2],e[3],e[4]):(e=ye.exec(t))?ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ge.exec(t))?Oe(e[1],e[2]/100,e[3]/100,1):(e=ve.exec(t))?Oe(e[1],e[2]/100,e[3]/100,e[4]):me.hasOwnProperty(t)?xe(me[t]):"transparent"===t?new Ne(NaN,NaN,NaN,0):null}function xe(t){return new Ne(t>>16&255,t>>8&255,255&t,1)}function ke(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ne(t,e,n,r)}function Ee(t){return t instanceof ae||(t=_e(t)),t?new Ne((t=t.rgb()).r,t.g,t.b,t.opacity):new Ne}function Se(t,e,n,r){return 1===arguments.length?Ee(t):new Ne(t,e,n,null==r?1:r)}function Ne(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ae(){return"#"+Pe(this.r)+Pe(this.g)+Pe(this.b)}function Ce(){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 Pe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Oe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new je(t,e,n,r)}function Te(t){if(t instanceof je)return new je(t.h,t.s,t.l,t.opacity);if(t instanceof ae||(t=_e(t)),!t)return new je;if(t instanceof je)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,l=i-o,u=(i+o)/2;return l?(a=e===i?(n-r)/l+6*(n<r):n===i?(r-e)/l+2:(e-n)/l+4,l/=u<.5?i+o:2-i-o,a*=60):l=u>0&&u<1?0:a,new je(a,l,u,t.opacity)}function je(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Me(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 ze(t){return function(){return t}}function Fe(t){return 1==(t=+t)?Ie: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):ze(isNaN(e)?n:e)}}function Ie(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ze(isNaN(t)?e:t)}oe(ae,_e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:we,formatHex:we,formatHsl:function(){return Te(this).formatHsl()},formatRgb:be,toString:be}),oe(Ne,Se,ie(ae,{brighter:function(t){return t=null==t?le:Math.pow(le,t),new Ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ne(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:Ae,formatHex:Ae,formatRgb:Ce,toString:Ce})),oe(je,(function(t,e,n,r){return 1===arguments.length?Te(t):new je(t,e,n,null==r?1:r)}),ie(ae,{brighter:function(t){return t=null==t?le:Math.pow(le,t),new je(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new je(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 Ne(Me(t>=240?t-240:t+120,o,r),Me(t,o,r),Me(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 De=function t(e){var n=Fe(e);function r(t,e){var r=n((t=Se(t)).r,(e=Se(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=Ie(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 Re(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Le=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Be=new RegExp(Le.source,"g");function qe(t,e){var n,r,o,i=Le.lastIndex=Be.lastIndex=0,a=-1,l=[],u=[];for(t+="",e+="";(n=Le.exec(t))&&(r=Be.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,u.push({i:a,x:Re(n,r)})),i=Be.lastIndex;return i<e.length&&(o=e.slice(i),l[a]?l[a]+=o:l[++a]=o),l.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)l[(n=u[r]).i]=n.x(t);return l.join("")})}var $e,He,Ue,Ge,Ve=180/Math.PI,We={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xe(t,e,n,r,o,i){var a,l,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Ve,skewX:Math.atan(u)*Ve,scaleX:a,scaleY:l}}function Ye(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var l=[],u=[];return i=t(i),a=t(a),function(t,r,o,i,a,l){if(t!==o||r!==i){var u=a.push("translate(",null,e,null,n);l.push({i:u-4,x:Re(t,o)},{i:u-2,x:Re(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,l,u),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:Re(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,l,u),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Re(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,l,u),function(t,e,n,r,i,a){if(t!==n||e!==r){var l=i.push(o(i)+"scale(",null,",",null,")");a.push({i:l-4,x:Re(t,n)},{i:l-2,x:Re(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,l,u),i=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)l[(e=u[n]).i]=e.x(t);return l.join("")}}}var Je,Ke,Qe=Ye((function(t){return"none"===t?We:($e||($e=document.createElement("DIV"),He=document.documentElement,Ue=document.defaultView),$e.style.transform=t,t=Ue.getComputedStyle(He.appendChild($e),null).getPropertyValue("transform"),He.removeChild($e),Xe(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ze=Ye((function(t){return null==t?We:(Ge||(Ge=document.createElementNS("http://www.w3.org/2000/svg","g")),Ge.setAttribute("transform",t),(t=Ge.transform.baseVal.consolidate())?Xe((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):We)}),", ",")",")"),tn=0,en=0,nn=0,rn=0,on=0,an=0,ln="object"==typeof performance&&performance.now?performance:Date,un="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function cn(){return on||(un(sn),on=ln.now()+an)}function sn(){on=0}function fn(){this._call=this._time=this._next=null}function hn(t,e,n){var r=new fn;return r.restart(t,e,n),r}function pn(){on=(rn=ln.now())+an,tn=en=0;try{!function(){cn(),++tn;for(var t,e=Je;e;)(t=on-e._time)>=0&&e._call.call(null,t),e=e._next;--tn}()}finally{tn=0,function(){var t,e,n=Je,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:Je=e);Ke=t,yn(r)}(),on=0}}function dn(){var t=ln.now(),e=t-rn;e>1e3&&(an-=e,rn=t)}function yn(t){tn||(en&&(en=clearTimeout(en)),t-on>24?(t<1/0&&(en=setTimeout(pn,t-ln.now()-an)),nn&&(nn=clearInterval(nn))):(nn||(rn=ln.now(),nn=setInterval(dn,1e3)),tn=1,un(pn)))}function gn(t,e,n){var r=new fn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}fn.prototype=hn.prototype={constructor:fn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?cn():+n)+(null==e?0:+e),this._next||Ke===this||(Ke?Ke._next=this:Je=this,Ke=this),this._call=t,this._time=n,yn()},stop:function(){this._call&&(this._call=null,this._time=1/0,yn())}};var vn=C("start","end","cancel","interrupt"),mn=[];function wn(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 u();for(c in o)if((h=o[c]).name===n.name){if(3===h.state)return gn(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(gn((function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(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 l(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),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),u())}function u(){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:vn,tween:mn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function bn(t,e){var n=xn(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function _n(t,e){var n=xn(t,e);if(n.state>3)throw new Error("too late; already running");return n}function xn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function kn(t,e){var n,r;return function(){var o=_n(this,t),i=o.tween;if(i!==n)for(var a=0,l=(r=n=i).length;a<l;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function En(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=_n(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var l={name:e,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===e){o[u]=l;break}u===c&&o.push(l)}i.tween=o}}function Sn(t,e,n){var r=t._id;return t.each((function(){var t=_n(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return xn(t,r).value[e]}}function Nn(t,e){var n;return("number"==typeof e?Re:e instanceof _e?De:(n=_e(e))?(e=n,De):qe)(t,e)}function An(t){return function(){this.removeAttribute(t)}}function Cn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pn(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 On(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 Tn(t,e,n){var r,o,i;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(l=u+"")?null:a===r&&l===o?i:(o=l,i=e(r=a,u));this.removeAttribute(t)}}function jn(t,e,n){var r,o,i;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(l=u+"")?null:a===r&&l===o?i:(o=l,i=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Mn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Fn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&zn(t,o)),n}return o._value=e,o}function In(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Mn(t,o)),n}return o._value=e,o}function Dn(t,e){return function(){bn(this,t).delay=+e.apply(this,arguments)}}function Rn(t,e){return e=+e,function(){bn(this,t).delay=e}}function Ln(t,e){return function(){_n(this,t).duration=+e.apply(this,arguments)}}function Bn(t,e){return e=+e,function(){_n(this,t).duration=e}}function qn(t,e){if("function"!=typeof e)throw new Error;return function(){_n(this,t).ease=e}}function $n(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)?bn:_n;return function(){var a=i(this,t),l=a.on;l!==r&&(o=(r=l).copy()).on(e,n),a.on=o}}var Hn=$t.prototype.constructor;function Un(t){return function(){this.style.removeProperty(t)}}function Gn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Vn(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&Gn(t,i,n)),r}return i._value=e,i}function Wn(t){return function(e){this.textContent=t.call(this,e)}}function Xn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Wn(r)),e}return r._value=t,r}var Yn=0;function Jn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Kn(){return++Yn}var Qn=$t.prototype;Jn.prototype={constructor:Jn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=B(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var l,u,c=r[a],s=c.length,f=i[a]=new Array(s),h=0;h<s;++h)(l=c[h])&&(u=t.call(l,l.__data__,h,c))&&("__data__"in l&&(u.__data__=l.__data__),f[h]=u,wn(f[h],e,n,h,f,xn(l,n)));return new Jn(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=$(t));for(var r=this._groups,o=r.length,i=[],a=[],l=0;l<o;++l)for(var u,c=r[l],s=c.length,f=0;f<s;++f)if(u=c[f]){for(var h,p=t.call(u,u.__data__,f,c),d=xn(u,n),y=0,g=p.length;y<g;++y)(h=p[y])&&wn(h,e,n,y,p,d);i.push(p),a.push(u)}return new Jn(i,a,e,n)},filter:function(t){"function"!=typeof t&&(t=H(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],l=a.length,u=r[o]=[],c=0;c<l;++c)(i=a[c])&&t.call(i,i.__data__,c,a)&&u.push(i);return new Jn(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),l=0;l<i;++l)for(var u,c=e[l],s=n[l],f=c.length,h=a[l]=new Array(f),p=0;p<f;++p)(u=c[p]||s[p])&&(h[p]=u);for(;l<r;++l)a[l]=e[l];return new Jn(a,this._parents,this._name,this._id)},selection:function(){return new Hn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Kn(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],u=l.length,c=0;c<u;++c)if(a=l[c]){var s=xn(a,e);wn(a,t,n,c,l,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Jn(r,this._parents,t,n)},call:Qn.call,nodes:Qn.nodes,node:Qn.node,size:Qn.size,empty:Qn.empty,each:Qn.each,on:function(t,e){var n=this._id;return arguments.length<2?xn(this.node(),n).on.on(t):this.each($n(n,t,e))},attr:function(t,e){var n=F(t),r="transform"===n?Ze:Nn;return this.attrTween(t,"function"==typeof e?(n.local?jn:Tn)(n,r,Sn(this,"attr."+t,e)):null==e?(n.local?Cn:An)(n):(n.local?On:Pn)(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=F(t);return this.tween(n,(r.local?Fn:In)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Qe:Nn;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=it(this,t),a=(this.style.removeProperty(t),it(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,Un(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=it(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=it(this,t)),a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,l))}}(t,r,Sn(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,l="end."+a;return function(){var u=_n(this,t),c=u.on,s=null==u.value[a]?i||(i=Un(e)):void 0;c===n&&o===s||(r=(n=c).copy()).on(l,o=s),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=it(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,Vn(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}}(Sn(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,Xn(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=xn(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?kn:En)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Dn:Rn)(e,t)):xn(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ln:Bn)(e,t)):xn(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(qn(e,t)):xn(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var l={value:a},u={value:function(){0==--o&&i()}};n.each((function(){var n=_n(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),n.on=e}))}))}};var Zn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function tr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Zn.time=cn(),Zn;return n}$t.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)}))},$t.prototype.transition=function(t){var e,n;t instanceof Jn?(e=t._id,t=t._name):(e=Kn(),(n=Zn).time=cn(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,l=r[i],u=l.length,c=0;c<u;++c)(a=l[c])&&wn(a,t,e,c,l,n||tr(a,e));return new Jn(r,this._parents,t,e)};function er(){}function nr(t,e){var n=new er;if(t instanceof er)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(){}er.prototype=nr.prototype={constructor:er,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 or=nr.prototype;function ir(t){return function(){return t}}function ar(){return 1e-6*(Math.random()-.5)}function lr(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,l,u,c,s,f,h,p=t._root,d={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(i=(y+v)/2))?y=i:v=i,(s=n>=(a=(g+m)/2))?g=a:m=a,o=p,!(p=p[f=s<<1|c]))return o[f]=d,t;if(l=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===l&&n===u)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+v)/2))?y=i:v=i,(s=n>=(a=(g+m)/2))?g=a:m=a}while((f=s<<1|c)==(h=(u>=a)<<1|l>=i));return o[h]=p,o[f]=d,t}function ur(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}function cr(t){return t[0]}function sr(t){return t[1]}function fr(t,e,n){var r=new hr(null==e?cr:e,null==n?sr: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 pr(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:or.has,add:function(t){return this["$"+(t+="")]=t,this},remove:or.remove,clear:or.clear,values:or.keys,size:or.size,empty:or.empty,each:or.each};var dr=fr.prototype=hr.prototype;function yr(t){return t.x+t.vx}function gr(t){return t.y+t.vy}function vr(t){return t.index}function mr(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function wr(t){return t.x}function br(t){return t.y}dr.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=pr(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]=pr(e));return n},dr.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return lr(this.cover(e,n),e,n,t)},dr.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),l=new Array(i),u=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,l[n]=o,r<u&&(u=r),r>s&&(s=r),o<c&&(c=o),o>f&&(f=o));if(u>s||c>f)return this;for(this.cover(u,c).cover(s,f),n=0;n<i;++n)lr(this,a[n],l[n],t[n]);return this},dr.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,l,u=o-n,c=this._root;n>t||t>=o||r>e||e>=i;)switch(l=(e<r)<<1|t<n,(a=new Array(4))[l]=c,c=a,u*=2,l){case 0:o=n+u,i=r+u;break;case 1:n=o-u,i=r+u;break;case 2:o=n+u,r=i-u;break;case 3:n=o-u,r=i-u}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},dr.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},dr.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]]},dr.find=function(t,e,n){var r,o,i,a,l,u,c,s=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],y=this._root;for(y&&d.push(new ur(y,s,f,h,p)),null==n?n=1/0:(s=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(y=u.node)||(o=u.x0)>h||(i=u.y0)>p||(a=u.x1)<s||(l=u.y1)<f))if(y.length){var g=(o+a)/2,v=(i+l)/2;d.push(new ur(y[3],g,v,a,l),new ur(y[2],o,v,g,l),new ur(y[1],g,i,a,v),new ur(y[0],o,i,g,v)),(c=(e>=v)<<1|t>=g)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=u)}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},dr.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,l,u,c,s,f,h,p=this._root,d=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((c=i>=(l=(d+g)/2))?d=l:g=l,(s=a>=(u=(y+v)/2))?y=u:v=u,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)},dr.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},dr.root=function(){return this._root},dr.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},dr.visit=function(t){var e,n,r,o,i,a,l=[],u=this._root;for(u&&l.push(new ur(u,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(u=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&u.length){var c=(r+i)/2,s=(o+a)/2;(n=u[3])&&l.push(new ur(n,c,s,i,a)),(n=u[2])&&l.push(new ur(n,r,s,c,a)),(n=u[1])&&l.push(new ur(n,c,o,i,s)),(n=u[0])&&l.push(new ur(n,r,o,c,s))}return this},dr.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ur(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,l=e.y0,u=e.x1,c=e.y1,s=(a+u)/2,f=(l+c)/2;(i=o[0])&&n.push(new ur(i,a,l,s,f)),(i=o[1])&&n.push(new ur(i,s,l,u,f)),(i=o[2])&&n.push(new ur(i,a,f,s,c)),(i=o[3])&&n.push(new ur(i,s,f,u,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},dr.x=function(t){return arguments.length?(this._x=t,this):this._x},dr.y=function(t){return arguments.length?(this._y=t,this):this._y};var _r=Math.PI*(3-Math.sqrt(5));function xr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var kr=Array.prototype.slice,Er={name:"implicit"};function Sr(){var t=nr(),e=[],n=[],r=Er;function o(o){var i=o+"",a=t.get(i);if(!a){if(r!==Er)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=nr();for(var r,i,a=-1,l=n.length;++a<l;)t.has(i=(r=n[a])+"")||t.set(i,e.push(r));return o},o.range=function(t){return arguments.length?(n=kr.call(t),o):n.slice()},o.unknown=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return Sr(e,n).unknown(r)},xr.apply(o,arguments),o}var Nr=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"),Ar={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},Cr=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],Pr=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],Or=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],Tr="undefined"!=typeof window&&void 0!==window.document?window.document:{},jr="fullscreenEnabled"in Tr&&Object.keys(Ar)||Cr[0]in Tr&&Cr||Pr[0]in Tr&&Pr||Or[0]in Tr&&Or||[],Mr={requestFullscreen:function(t){return t[jr[Ar.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[jr[Ar.requestFullscreen]]},get exitFullscreen(){return Tr[jr[Ar.exitFullscreen]].bind(Tr)},get fullscreenPseudoClass(){return":"+jr[Ar.fullscreen]},addEventListener:function(t,e,n){return Tr.addEventListener(jr[Ar[t]],e,n)},removeEventListener:function(t,e,n){return Tr.removeEventListener(jr[Ar[t]],e,n)},get fullscreenEnabled(){return Boolean(Tr[jr[Ar.fullscreenEnabled]])},set fullscreenEnabled(t){},get fullscreenElement(){return Tr[jr[Ar.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return Tr[("on"+jr[Ar.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return Tr[("on"+jr[Ar.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return Tr[("on"+jr[Ar.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return Tr[("on"+jr[Ar.fullscreenerror]).toLowerCase()]=t}};var zr=function(t){var n=t.handle,r=t.onChange,o=t.children,a=t.className,l=[];return a&&l.push(a),l.push("fullscreen"),n.active&&l.push("fullscreen-enabled"),i((function(){r&&r(n.active,n)}),[n.active]),e.createElement("div",{className:l.join(" "),ref:n.node,style:n.active?{height:"100%",width:"100%"}:void 0},o)},Fr=s(f((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=p(e),o=(0,d(y).default)(r.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit");n.default=o}))),Ir=function(){return(Ir=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Dr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};var Rr,Lr=(Rr=function(t,e){return(Rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}Rr(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Br=function(){return(Br=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qr=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function l(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}u((r=r.apply(t,e||[])).next())}))},$r=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Hr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},Ur=function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then},Gr=function(t,e){return{left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-t/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-e/2}},Vr=function(t,e){return{top:(window.screen.height-e)/2,left:(window.screen.width-t)/2}};function Wr(t,e,n){var r=e.height,o=e.width,i=Hr(e,["height","width"]),a=Br({height:r,width:o,location:"no",toolbar:"no",status:"no",directories:"no",menubar:"no",scrollbars:"yes",resizable:"no",centerscreen:"yes",chrome:"yes"},i),l=window.open(t,"",Object.keys(a).map((function(t){return t+"="+a[t]})).join(", "));if(n)var u=window.setInterval((function(){try{(null===l||l.closed)&&(window.clearInterval(u),n(l))}catch(t){console.error(t)}}),1e3);return l}var Xr=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.openShareDialog=function(t){var n=e.props,r=n.onShareWindowClose,o=n.windowHeight,i=void 0===o?400:o,a=n.windowPosition,l=void 0===a?"windowCenter":a,u=n.windowWidth,c=void 0===u?550:u;Wr(t,Br({height:i,width:c},"windowCenter"===l?Gr(c,i):Vr(c,i)),r)},e.handleClick=function(t){return qr(e,void 0,void 0,(function(){var e,n,r,o,i,a,l,u,c,s;return $r(this,(function(f){switch(f.label){case 0:return e=this.props,n=e.beforeOnClick,r=e.disabled,o=e.networkLink,i=e.onClick,a=e.url,l=e.openShareDialogOnClick,u=e.opts,c=o(a,u),r?[2]:(t.preventDefault(),n?(s=n(),Ur(s)?[4,s]:[3,2]):[3,2]);case 1:f.sent(),f.label=2;case 2:return l&&this.openShareDialog(c),i&&i(t,c),[2]}}))}))},e}return Lr(n,t),n.prototype.render=function(){var t=this.props;t.beforeOnClick;var n=t.children,r=t.className,o=t.disabled,i=t.disabledStyle,a=t.forwardedRef;t.networkLink;var l=t.networkName;t.onShareWindowClose,t.openShareDialogOnClick,t.opts;var u=t.resetButtonStyle,c=t.style;t.url,t.windowHeight,t.windowPosition,t.windowWidth;var s=Hr(t,["beforeOnClick","children","className","disabled","disabledStyle","forwardedRef","networkLink","networkName","onShareWindowClose","openShareDialogOnClick","opts","resetButtonStyle","style","url","windowHeight","windowPosition","windowWidth"]),f=h("react-share__ShareButton",{"react-share__ShareButton--disabled":!!o,disabled:!!o},r),p=Br(Br(u?{backgroundColor:"transparent",border:"none",padding:0,font:"inherit",color:"inherit",cursor:"pointer"}:{},c),o&&i);return e.createElement("button",Br({},s,{"aria-label":s["aria-label"]||l,className:f,onClick:this.handleClick,ref:a,style:p}),n)},n.defaultProps={disabledStyle:{opacity:.6},openShareDialogOnClick:!0,resetButtonStyle:!0},n}(l),Yr=function(){return(Yr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var Jr,Kr,Qr=(Jr={color:"#3b5998",networkName:"facebook",path:"M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z"},(Kr=function(t){var n=t.bgStyle,r=t.borderRadius,o=t.iconFillColor,i=t.round,a=t.size,l=Dr(t,["bgStyle","borderRadius","iconFillColor","round","size"]);return e.createElement("svg",Ir({viewBox:"0 0 64 64",width:a,height:a},l),i?e.createElement("circle",{cx:"32",cy:"32",r:"31",fill:Jr.color,style:n}):e.createElement("rect",{width:"64",height:"64",rx:r,ry:r,fill:Jr.color,style:n}),e.createElement("path",{d:Jr.path,fill:o}))}).defaultProps={bgStyle:{},borderRadius:0,iconFillColor:"white",size:64},Kr),Zr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),to=function(t){function e(e){var n=t.call(this,e)||this;return n.name="AssertionError",n}return Zr(e,t),e}(Error);var eo=function(t,n,r,o){function i(i,a){var l=r(i),u=Yr({},i);return Object.keys(l).forEach((function(t){delete u[t]})),e.createElement(Xr,Yr({},o,u,{forwardedRef:a,networkName:t,networkLink:n,opts:r(i)}))}return i.displayName="ShareButton-"+t,u(i)}("facebook",(function(t,e){var n,r,o=e.quote,i=e.hashtag;return function(t,e){if(!t)throw new to(e)}(t,"facebook.url"),"https://www.facebook.com/sharer/sharer.php"+(n={u:t,quote:o,hashtag:i},(r=Object.entries(n).filter((function(t){return null!=t[1]})).map((function(t){var e=t[0],n=t[1];return encodeURIComponent(e)+"="+encodeURIComponent(String(n))}))).length>0?"?"+r.join("&"):"")}),(function(t){return{quote:t.quote,hashtag:t.hashtag}}),{windowWidth:550,windowHeight:400}),no=s(f((function(t,e){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){t.exports=n(2)},function(t,e,n){var r=n(4);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(6)(r,o),r.locals&&(t.exports=r.locals)},function(t,e,n){
2
2
  /** @license React v16.5.2
3
3
  * react.production.min.js
4
4
  *
@@ -7,10 +7,10 @@ import*as t from"react";import e,{useMemo as n,useState as r,useRef as o,useEffe
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- var r=n(3),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,h=o?Symbol.for("react.async_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,d="function"==typeof Symbol&&Symbol.iterator;function y(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(t,e,n,r,o,i,a,l){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,a,l],c=0;(t=Error(e.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw t.framesToPop=1,t}}(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||g}function w(){}function b(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||g}m.prototype.isReactComponent={},m.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&y("85"),this.updater.enqueueSetState(this,t,e,"setState")},m.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=m.prototype;var _=b.prototype=new w;_.constructor=b,r(_,m.prototype),_.isPureReactComponent=!0;var x={current:null,currentDispatcher:null},k=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function S(t,e,n){var r=void 0,o={},a=null,l=null;if(null!=e)for(r in void 0!==e.ref&&(l=e.ref),void 0!==e.key&&(a=""+e.key),e)k.call(e,r)&&!E.hasOwnProperty(r)&&(o[r]=e[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),s=0;s<u;s++)c[s]=arguments[s+2];o.children=c}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:t,key:a,ref:l,props:o,_owner:x.current}}function N(t){return"object"==typeof t&&null!==t&&t.$$typeof===i}var A=/\/+/g,C=[];function P(t,e,n,r){if(C.length){var o=C.pop();return o.result=t,o.keyPrefix=e,o.func=n,o.context=r,o.count=0,o}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function O(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>C.length&&C.push(t)}function T(t,e,n){return null==t?0:function t(e,n,r,o){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var u=!1;if(null===e)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case a:u=!0}}if(u)return r(o,e,""===n?"."+j(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var s=n+j(l=e[c],c);u+=t(l,s,r,o)}else if("function"==typeof(s=null===e||"object"!=typeof e?null:"function"==typeof(s=d&&e[d]||e["@@iterator"])?s:null))for(e=s.call(e),c=0;!(l=e.next()).done;)u+=t(l=l.value,s=n+j(l,c++),r,o);else"object"===l&&y("31","[object Object]"==(r=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":r,"");return u}(t,"",e,n)}function j(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function M(t,e){t.func.call(t.context,e,t.count++)}function z(t,e,n){var r=t.result,o=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?F(t,r,n,(function(t){return t})):null!=t&&(N(t)&&(t=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,o+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n)),r.push(t))}function F(t,e,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),T(t,z,e=P(e,i,r,o)),O(e)}var D={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return F(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;T(t,M,e=P(null,null,e,n)),O(e)},count:function(t){return T(t,(function(){return null}),null)},toArray:function(t){var e=[];return F(t,e,null,(function(t){return t})),e},only:function(t){return N(t)||y("143"),t}},createRef:function(){return{current:null}},Component:m,PureComponent:b,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:f,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:s,_context:t},t.Consumer=t,t.unstable_read=function(t,e){var n=x.currentDispatcher;return null===n&&y("277"),n.readContext(t,e)}.bind(null,t),t},forwardRef:function(t){return{$$typeof:p,render:t}},Fragment:l,StrictMode:u,unstable_AsyncMode:h,unstable_Profiler:c,createElement:S,cloneElement:function(t,e,n){null==t&&y("267",t);var o=void 0,a=r({},t.props),l=t.key,u=t.ref,c=t._owner;if(null!=e){void 0!==e.ref&&(u=e.ref,c=x.current),void 0!==e.key&&(l=""+e.key);var s=void 0;for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)k.call(e,o)&&!E.hasOwnProperty(o)&&(a[o]=void 0===e[o]&&void 0!==s?s[o]:e[o])}if(1==(o=arguments.length-2))a.children=n;else if(1<o){s=Array(o);for(var f=0;f<o;f++)s[f]=arguments[f+2];a.children=s}return{$$typeof:i,type:t.type,key:l,ref:u,props:a,_owner:c}},createFactory:function(t){var e=S.bind(null,t);return e.type=t,e},isValidElement:N,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:x,assign:r}},I={default:D},R=I&&D||I;t.exports=R.default||R},function(t,e,n){
10
+ var r=n(3),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,h=o?Symbol.for("react.async_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,d="function"==typeof Symbol&&Symbol.iterator;function y(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(t,e,n,r,o,i,a,l){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,a,l],c=0;(t=Error(e.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw t.framesToPop=1,t}}(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||g}function w(){}function b(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||g}m.prototype.isReactComponent={},m.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&y("85"),this.updater.enqueueSetState(this,t,e,"setState")},m.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=m.prototype;var _=b.prototype=new w;_.constructor=b,r(_,m.prototype),_.isPureReactComponent=!0;var x={current:null,currentDispatcher:null},k=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function S(t,e,n){var r=void 0,o={},a=null,l=null;if(null!=e)for(r in void 0!==e.ref&&(l=e.ref),void 0!==e.key&&(a=""+e.key),e)k.call(e,r)&&!E.hasOwnProperty(r)&&(o[r]=e[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),s=0;s<u;s++)c[s]=arguments[s+2];o.children=c}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:t,key:a,ref:l,props:o,_owner:x.current}}function N(t){return"object"==typeof t&&null!==t&&t.$$typeof===i}var A=/\/+/g,C=[];function P(t,e,n,r){if(C.length){var o=C.pop();return o.result=t,o.keyPrefix=e,o.func=n,o.context=r,o.count=0,o}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function O(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>C.length&&C.push(t)}function T(t,e,n){return null==t?0:function t(e,n,r,o){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var u=!1;if(null===e)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case a:u=!0}}if(u)return r(o,e,""===n?"."+j(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var s=n+j(l=e[c],c);u+=t(l,s,r,o)}else if("function"==typeof(s=null===e||"object"!=typeof e?null:"function"==typeof(s=d&&e[d]||e["@@iterator"])?s:null))for(e=s.call(e),c=0;!(l=e.next()).done;)u+=t(l=l.value,s=n+j(l,c++),r,o);else"object"===l&&y("31","[object Object]"==(r=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":r,"");return u}(t,"",e,n)}function j(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function M(t,e){t.func.call(t.context,e,t.count++)}function z(t,e,n){var r=t.result,o=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?F(t,r,n,(function(t){return t})):null!=t&&(N(t)&&(t=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,o+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n)),r.push(t))}function F(t,e,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),T(t,z,e=P(e,i,r,o)),O(e)}var I={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return F(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;T(t,M,e=P(null,null,e,n)),O(e)},count:function(t){return T(t,(function(){return null}),null)},toArray:function(t){var e=[];return F(t,e,null,(function(t){return t})),e},only:function(t){return N(t)||y("143"),t}},createRef:function(){return{current:null}},Component:m,PureComponent:b,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:f,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:s,_context:t},t.Consumer=t,t.unstable_read=function(t,e){var n=x.currentDispatcher;return null===n&&y("277"),n.readContext(t,e)}.bind(null,t),t},forwardRef:function(t){return{$$typeof:p,render:t}},Fragment:l,StrictMode:u,unstable_AsyncMode:h,unstable_Profiler:c,createElement:S,cloneElement:function(t,e,n){null==t&&y("267",t);var o=void 0,a=r({},t.props),l=t.key,u=t.ref,c=t._owner;if(null!=e){void 0!==e.ref&&(u=e.ref,c=x.current),void 0!==e.key&&(l=""+e.key);var s=void 0;for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)k.call(e,o)&&!E.hasOwnProperty(o)&&(a[o]=void 0===e[o]&&void 0!==s?s[o]:e[o])}if(1==(o=arguments.length-2))a.children=n;else if(1<o){s=Array(o);for(var f=0;f<o;f++)s[f]=arguments[f+2];a.children=s}return{$$typeof:i,type:t.type,key:l,ref:u,props:a,_owner:c}},createFactory:function(t){var e=S.bind(null,t);return e.type=t,e},isValidElement:N,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:x,assign:r}},D={default:I},R=D&&I||D;t.exports=R.default||R},function(t,e,n){
11
11
  /*
12
12
  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,l=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))o.call(n,c)&&(l[c]=n[c]);if(r){a=r(n);for(var s=0;s<a.length;s++)i.call(n,a[s])&&(l[a[s]]=n[a[s]])}}return l}},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,l=0,u=[],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(g(o.parts[a],e))}else{var l=[];for(a=0;a<o.parts.length;a++)l.push(g(o.parts[a],e));r[o.id]={id:o.id,refs:1,parts:l}}}}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],l={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}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=u[u.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),u.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=u.indexOf(t);e>=0&&u.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 g(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 u=l++;n=a||(a=d(e)),r=m.bind(null,n,u,!1),o=m.bind(null,n,u,!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"}),l=t.href;t.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}.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];(l=r[a.id]).refs--,o.push(l)}for(t&&s(f(t,e),e),i=0;i<o.length;i++){var l;if(0===(l=o[i]).refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete r[l.id]}}}};var v=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=v(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 l(t){return(l="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 u(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"!==l(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&&u(t.prototype,e),n&&u(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 g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(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?v(t):e}(this,y(e).call(this))).handleChange.bind(v(v(t))),t.setChangeDirection.bind(v(v(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&&g(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,l=document.querySelectorAll(a),u=!0,c=!1,s=void 0;try{for(var f,h=l[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var p=f.value;this.iterateChildren(p)}}catch(t){c=!0,s=t}finally{try{u||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,l=this.getFontSizeDetails(n.width||"40px"),u=this.getFontSizeDetails(n.height||"40px");return{width:(!1===o?2*l.value+a:l.value)+l.unit,height:(!1===o?u.value:2*u.value+a)+u.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(t,e){var n=e.style,r=void 0===n?{}:n,o=e.verticalAlignment,l=void 0!==o&&o,u=e.reverseOrder,c=void 0!==u&&u,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===l?h.unit:p.unit);return(t===i&&!1===c||t===a&&!0===c)&&(!1===l?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,l=this.getFontSizeChangerStyle(e),u=this.getFontSizeChangerButtonStyle(i,e),c=this.getFontSizeChangerButtonStyle(a,e);return o.a.createElement("div",{className:"font-size-changer",style:l},o.a.createElement("div",{className:"font-size-changer-buttons",style:l},o.a.createElement(h,{direction:i,customButton:n,onClick:this.onFontSizeUp.bind(this),style:u}),o.a.createElement(h,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:c})))}}]),e}();e.default=m}])}))),ro=f((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;l.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=u,o.responseType="blob",o.timeout=e,o.open("GET",t,!0),o.send(),l.impl.options.imagePlaceholder){var i=l.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 u(){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},l={toSvg:u,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 u(t,e){return function(t){void 0===t.imagePlaceholder?l.impl.options.imagePlaceholder=a.imagePlaceholder:l.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?l.impl.options.cacheBust=a.cacheBust:l.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 u(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 l=document.createElement("style");l.appendChild(u(a,r,o)),e.appendChild(l)}function u(t,e,r){var o="."+t+":"+e,i=r.cssText?a(r):l(r);return document.createTextNode(o+"{"+i+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function l(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=l}()}));const oo=require("jszip"),io=require("react-file-download"),ao=t=>{const{nodes:e,links:n}=t,r=n.map((({source:t,target:n})=>({source:e[t].name,target:e[n].name,sourceType:e[t].type,targetType:e[n].type}))),{nodeMap:o,nodesTsv:i}=(t=>{let e=1e7;const n={};let r=!1;t.forEach((({source:t,target:o,sourceType:i,targetType:a})=>{""!==o&&""!==t&&(Object.keys(n).indexOf(t)<0?(""!==i?(r=!0,n[t]={ID:e,WEIGHT:1,NODE_TYPE:i}):n[t]={ID:e,WEIGHT:1},e+=1):n[t].WEIGHT+=1,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)}));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((({source:t,target:r})=>{if(""===r||""===t)return;const o=e[t].ID,i=e[r].ID;n+=`${o}\t${i}\t1\tUndirected\r\n`})),n})(r,o),l=new oo;l.file("Node_Table.tsv",i),l.file("Edge_Table.tsv",a),l.generateAsync({type:"blob"}).then((t=>{io(t,"Gephi_generated_by_NMTL.zip")}))},lo=({fill:t="#825c0d"})=>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:"a"},e.createElement("path",{"data-name":"Rectangle 125",style:{fill:"#fff"},d:"M0 0h32v32H0z"}))),e.createElement("g",{style:{clipPath:"url(#a)"}},e.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:t},"data-name":"Mask Group 42"}))),uo=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_128","data-name":"Rectangle 128",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_47","data-name":"Mask Group 47",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3633","data-name":"Group 3633",transform:"translate(6 6)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z",transform:"translate(-495 -369)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632",transform:"translate(0 2)"},t.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)"}))))),co=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_129","data-name":"Rectangle 129",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_48","data-name":"Mask Group 48",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3635","data-name":"Group 3635",transform:"translate(6 8)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M510 371v2h6v-2z",transform:"translate(-495 -371)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632"},t.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)"}))))),so=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_124","data-name":"Rectangle 124",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_46","data-name":"Mask Group 46",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3629","data-name":"Group 3629",transform:"translate(6 6.001)"},t.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)"}),t.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)"}),t.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)"}),t.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)"}))));k(".extraTools {\n width: 100%;\n display: inline-flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n padding: 0px 20px;\n padding-top: 12px; }\n .extraTools__share button {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__download {\n cursor: pointer; }\n .extraTools__download-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fullscreenBtn {\n cursor: pointer;\n padding-top: 0; }\n .extraTools__fullscreenBtn-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fontsize {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-changer,\n .extraTools .font-size-changer-buttons,\n .extraTools .font-size-up,\n .extraTools .font-size-down,\n .extraTools .tooltip {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .extraTools .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .extraTools .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n .extraTools #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");const fo=({className:t})=>e.createElement("div",{className:h("extraTools__share",t)},e.createElement(eo,{url:document.location.href},e.createElement(Qr,{size:32,round:!0})));fo.defaultProps={className:void 0},fo.propTypes={className:c.string};const ho=({className:t,intl:n,exclude:o,iconColor:i,SNAData:a,domToImageId:l})=>{const[u,c]=r(null);console.log("DownloadMenu",o);const s=[{key:"downloadImage",onClick:()=>(({id:t,fileName:e="image",quality:n=.95})=>{const r=document.getElementById(t);ro.toPng(r,{quality:n}).then((t=>{const n=document.createElement("a");n.download=`${e}.png`,n.href=t,n.click()})).catch((t=>{console.error("oops, something went wrong!",t)}))})({id:l}),label:n?"knowledge.writersAndWorksSNA.download.img":"下載圖片"},{key:"downloadTsv",onClick:()=>ao(a),label:n?"knowledge.writersAndWorksSNA.download.gephi":"下載Gephi"},{key:"downloadXls",onClick:()=>(({data:t,dataType:e,extType:n="xlsx"})=>{let r;switch(e){case"sna":r=b(t);break;default:r=t}_(`\ufeff${x(r)}`,`output.${n}`)})({data:a,dataType:"sna",extType:"xlsx"}),label:n?"knowledge.writersAndWorksSNA.download.xls":"下載Excel"}];return e.createElement("div",{className:h("extraTools__download",t)},e.createElement(w,{title:n?n.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},e.createElement("div",{className:"extraTools__download-icon",onClick:t=>c(t.currentTarget)},e.createElement(lo,{fill:i}))),e.createElement(v,{id:"download-menu",anchorEl:u,keepMounted:!0,open:Boolean(u),onClose:()=>c(null)},s.map((({key:t,onClick:r,label:i})=>{return a=t,!((o||[]).filter((t=>t===a)).length>0)&&e.createElement(m,{key:t,onClick:r},n?n.formatMessage({id:i}):i);var a}))))};ho.defaultProps={className:void 0,intl:void 0,exclude:["downloadXls"],SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph"},ho.propTypes={className:c.string,intl:c.objectOf(c.any),exclude:c.arrayOf(c.string),SNAData:c.objectOf(c.any),iconColor:c.string,domToImageId:c.string};const po=({className:t,intl:n,iconColor:r,fullScreenHandle:o})=>{const{enter:i}=o||{enter:()=>{}};return e.createElement("div",{className:h("extraTools__fullscreenBtn",t)},e.createElement(w,{title:n?n.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},e.createElement("div",{className:"extraTools__fullscreenBtn-icon",onClick:i},e.createElement(so,{fill:r}))))};po.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",fullScreenHandle:void 0},po.propTypes={className:c.string,intl:c.objectOf(c.any),iconColor:c.string,fullScreenHandle:c.objectOf(c.any)};const yo=({className:t,intl:n,iconColor:r,FontSizeTargets:o,FontSizeOptions:i})=>e.createElement("div",{className:h("extraTools__fontsize",t)},e.createElement(no,{targets:o,options:i,customButtons:{up:e.createElement(w,{title:n?n.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},e.createElement(uo,{fill:r})),down:e.createElement(w,{title:n?n.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},e.createElement(co,{fill:r})),style:{border:"none"},buttonsMargin:10}}));yo.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1}},yo.propTypes={className:c.string,intl:c.objectOf(c.any),iconColor:c.string,FontSizeTargets:c.arrayOf(c.string),FontSizeOptions:c.objectOf(c.any)};const go=({className:t,intl:n,exclude:r,SNAData:o,iconColor:i,domToImageId:a,FontSizeTargets:l,FontSizeOptions:u,fullScreenHandle:c})=>{console.log("ExtraTools",r);const s={intl:n,exclude:r,SNAData:o,iconColor:i,domToImageId:a,FontSizeTargets:l,FontSizeOptions:u,fullScreenHandle:c},f=[{keys:["share"],Component:fo},{keys:["downloadImage","downloadTsv","downloadXls"],Component:ho},{keys:["fullscreen"],Component:po},{keys:["fontSizeChanger"],Component:yo}];return e.createElement("div",{className:h("extraTools",t)},f.map((({keys:t,Component:n})=>{return o=t,!((r||[]).filter((t=>t===o)).length>0)&&e.createElement(n,g({key:t[0]},s));var o})))};go.ShareButton=fo,go.DownloadMenu=ho,go.FullscreenBtn=po,go.FontSizeChanger=yo,go.defaultProps={className:void 0,intl:void 0,exclude:["downloadXls"],SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1},fullScreenHandle:void 0},go.propTypes={className:c.string,intl:c.objectOf(c.any),exclude:c.arrayOf(c.string),SNAData:c.objectOf(c.any),iconColor:c.string,domToImageId:c.string,FontSizeTargets:c.arrayOf(c.string),FontSizeOptions:c.objectOf(c.any),fullScreenHandle:c.objectOf(c.any)};k(".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\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 vo=function(t){var l=t.className,u=t.intl,c=t.width,s=t.height,f=t.distance,p=t.SNAData,d=t.fontColor,y=t.backgroundColor,g=t.iconColor,v=t.handleClickNodeGoto;if(!p||0===p.nodes.length)return e.createElement("div",{className:"noData"},u?u.formatMessage({id:"common.noData"}):"暫無資料");var m=function(){var t=r(!1),e=t[0],l=t[1],u=o(null);i((function(){var t=function(){l(Mr.fullscreenElement===u.current)};return Mr.addEventListener("fullscreenchange",t),function(){return Mr.removeEventListener("fullscreenchange",t)}}),[]);var c=a((function(){return Mr.fullscreenElement?Mr.exitFullscreen().then((function(){return Mr.requestFullscreen(u.current)})):u.current?Mr.requestFullscreen(u.current):void 0}),[]),s=a((function(){return Mr.fullscreenElement===u.current?Mr.exitFullscreen():Promise.resolve()}),[]);return n((function(){return{active:e,enter:c,exit:s,node:u}}),[e,c,s])}(),w=n((function(){return m.active?screen.width:screen.width>1050?c:screen.width-80}),[m.active,screen.width]),b=n((function(){return m.active?screen.height:screen.width>1050?s:screen.height-300}),[m.active,screen.width]),_=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,l=Math.pow(Math.pow(i,2)+Math.pow(a,2),.5);return{qx:r-a*n/l,qy:o+i*n/l}}(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)},x=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=Sr(Nr),i=t.links.map((function(t){return Object.create(t)})),a=t.nodes.map((function(t){return Object.create(t)})),l=function(t){var e,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,a=.6,l=nr(),u=hn(s),c=C("tick","end");function s(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(r){var u,c,s=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(i-n)*o,l.each((function(t){t(n)})),u=0;u<s;++u)null==(c=t[u]).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*_r;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 u.restart(s),e},stop:function(){return u.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),l.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?l.remove(t):l.set(t,p(n)),e):l.get(t)},find:function(e,n,r){var o,i,a,l,u,c=0,s=t.length;for(null==r?r=1/0:r*=r,c=0;c<s;++c)(a=(o=e-(l=t[c]).x)*o+(i=n-l.y)*i)<r&&(u=l,r=a);return u},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=vr,l=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},u=ir(30),c=1;function s(r){for(var o=0,a=t.length;o<c;++o)for(var l,u,s,f,h,p,d,y=0;y<a;++y)u=(l=t[y]).source,f=(s=l.target).x+s.vx-u.x-u.vx||ar(),h=s.y+s.vy-u.y-u.vy||ar(),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,u.vx+=f*(d=1-d),u.vy+=h*d}function f(){if(r){var l,u,c=r.length,s=t.length,f=nr(r,a);for(l=0,o=new Array(c);l<s;++l)(u=t[l]).index=l,"object"!=typeof u.source&&(u.source=mr(f,u.source)),"object"!=typeof u.target&&(u.target=mr(f,u.target)),o[u.source.index]=(o[u.source.index]||0)+1,o[u.target.index]=(o[u.target.index]||0)+1;for(l=0,i=new Array(s);l<s;++l)u=t[l],i[l]=o[u.source.index]/(o[u.source.index]+o[u.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]=+l(t[n],n,t)}function p(){if(r)for(var e=0,o=t.length;e<o;++e)n[e]=+u(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?(l="function"==typeof t?t:ir(+t),h(),s):l},s.distance=function(t){return arguments.length?(u="function"==typeof t?t:ir(+t),p(),s):u},s}(i).id((function(t){return t.index})).distance(50)).force("charge",function(){var t,e,n,r,o=ir(-30),i=1,a=1/0,l=.81;function u(r){var o,i=t.length,a=fr(t,wr,br).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,l=0,u=0;if(t.length){for(o=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(l+=e.value,u+=n,o+=n*e.x,i+=n*e.y);t.x=o/u,t.y=i/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{l+=r[e.data.index]}while(e=e.next)}t.value=l}function f(t,o,u,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/l<p)return p<a&&(0===s&&(p+=(s=ar())*s),0===f&&(p+=(f=ar())*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=ar())*s),0===f&&(p+=(f=ar())*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 u.initialize=function(e){t=e,c()},u.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),c(),u):o},u.distanceMin=function(t){return arguments.length?(i=t*t,u):Math.sqrt(i)},u.distanceMax=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.theta=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)},u}().strength(-160)).force("center",function(t,e){var n;function r(){var r,o,i=n.length,a=0,l=0;for(r=0;r<i;++r)a+=(o=n[r]).x,l+=o.y;for(a=a/i-t,l=l/i-e,r=0;r<i;++r)(o=n[r]).x-=a,o.y-=l}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}(w/2,b/2)).force("collide",function(t){var e,n,r=1,o=1;function i(){for(var t,i,l,u,c,s,f,h=e.length,p=0;p<o;++p)for(i=fr(e,yr,gr).visitAfter(a),t=0;t<h;++t)l=e[t],s=n[l.index],f=s*s,u=l.x+l.vx,c=l.y+l.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>u+p||o<u-p||n>c+p||i<c-p;if(a.index>l.index){var d=u-a.x-a.vx,y=c-a.y-a.vy,g=d*d+y*y;g<p*p&&(0===d&&(g+=(d=ar())*d),0===y&&(g+=(y=ar())*y),g=(p-(g=Math.sqrt(g)))/g*r,l.vx+=(d*=g)*(p=(h*=h)/(f+h)),l.vy+=(y*=g)*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 l(){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=ir(null==t?1:+t)),i.initialize=function(t){e=t,l()},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:ir(+e),l(),i):t},i}().radius((function(){return 13.5})).iterations(5)).force("x",function(t){var e,n,r,o=ir(.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=ir(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),a(),i):o},i.x=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),a(),i):t},i}(w/2)).force("y",function(t){var e,n,r,o=ir(.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=ir(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),a(),i):o},i.y=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),a(),i):t},i}(b/2)).force("radial",function(t,e,n){var r,o,i,a=ir(.1);function l(t){for(var a=0,l=r.length;a<l;++a){var u=r[a],c=u.x-e||1e-6,s=u.y-n||1e-6,f=Math.sqrt(c*c+s*s),h=(i[a]-f)*o[a]*t/f;u.vx+=c*h,u.vy+=s*h}}function u(){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=ir(+t)),null==e&&(e=0),null==n&&(n=0),l.initialize=function(t){r=t,u()},l.strength=function(t){return arguments.length?(a="function"==typeof t?t:ir(+t),u(),l):a},l.radius=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),u(),l):t},l.x=function(t){return arguments.length?(e=+t,l):e},l.y=function(t){return arguments.length?(n=+t,l):n},l}(100,w/2,b/2)),c=Ht(".chart").append("svg").attr("viewBox",[0,0,w,b]).style("background-color",y);c.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=c.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=c.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?v({name:t.name,id:t.id,type:t.type}):null})).call(function(t){return re().on("start",(function(e){Ot.active||t.alphaTarget(.3).restart(),e.fx=e.x,e.fy=e.y})).on("drag",(function(t){t.fx=Ot.x>w||Ot.x<0?t.x:Ot.x,t.fy=Ot.y>b||Ot.y<0?t.y:Ot.y}))}(l));f.append("title").text((function(t){return"".concat(t.name,"-").concat(function(t){switch(t){case"mainNode":return u?u.formatMessage({id:"SNA.search.center"}):"主要搜尋中心";case"organization":return u?u.formatMessage({id:"SNA.organization"}):"組織";case"person":return u?u.formatMessage({id:"SNA.author"}):"作家";case"publication":return u?u.formatMessage({id:"SNA.publication"}):"作家";case"article":return u?u.formatMessage({id:"SNA.article"}):"單篇作品";case"keyword":return u?u.formatMessage({id:"SNA.keyword"}):"關鍵字";case"event":return u?u.formatMessage({id:"SNA.event"}):"事件";default:return""}}(t.type))}));var h=c.append("g").selectAll("text").data(a).join("text").attr("fill",d).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=c.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");c.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})),l.on("tick",(function(){s.attr("d",(function(t){return _(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 _(t.source,t.target,30)}))}))};return i((function(){if(p&&p.nodes&&p.nodes.length>0){var t=document.getElementById("network-graph");t&&t.childNodes[0]&&t.removeChild(t.childNodes[0]),x(p)}}),[p,m.active]),e.createElement("div",{className:h("SNA",{"SNA--smallSize":f<200},l),style:{contentWidth:w,contentHeight:b,backgroundColor:y}},e.createElement(go,{intl:u,SNAData:p,iconColor:g,domToImageId:"network-graph",fullScreenHandle:m}),e.createElement(zr,{handle:m},e.createElement("div",{className:"chart",id:"network-graph"},m.active&&e.createElement("div",{className:"fullscreenExit",style:{backgroundColor:y}},e.createElement(Fr,{fontSize:"large",style:{color:g},onClick:m.exit,title:u?u.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreenExit"}):"離開全螢幕"})))))};vo.defaultProps={className:void 0,intl:void 0,width:1050,height:600,distance:400,SNAData:null,fontColor:"#000000",backgroundColor:"#FFFFFF",iconColor:"#825c0d",handleClickNodeGoto:null},vo.propTypes={className:c.string,intl:c.objectOf(c.any),width:c.number,height:c.number,distance:c.number,SNAData:c.objectOf(c.any),fontColor:c.string,backgroundColor:c.string,iconColor:c.string,handleClickNodeGoto:c.func};export{vo 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,l=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))o.call(n,c)&&(l[c]=n[c]);if(r){a=r(n);for(var s=0;s<a.length;s++)i.call(n,a[s])&&(l[a[s]]=n[a[s]])}}return l}},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,l=0,u=[],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(g(o.parts[a],e))}else{var l=[];for(a=0;a<o.parts.length;a++)l.push(g(o.parts[a],e));r[o.id]={id:o.id,refs:1,parts:l}}}}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],l={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}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=u[u.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),u.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=u.indexOf(t);e>=0&&u.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 g(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 u=l++;n=a||(a=d(e)),r=m.bind(null,n,u,!1),o=m.bind(null,n,u,!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"}),l=t.href;t.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}.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];(l=r[a.id]).refs--,o.push(l)}for(t&&s(f(t,e),e),i=0;i<o.length;i++){var l;if(0===(l=o[i]).refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete r[l.id]}}}};var v=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=v(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 l(t){return(l="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 u(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"!==l(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&&u(t.prototype,e),n&&u(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 g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(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?v(t):e}(this,y(e).call(this))).handleChange.bind(v(v(t))),t.setChangeDirection.bind(v(v(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&&g(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,l=document.querySelectorAll(a),u=!0,c=!1,s=void 0;try{for(var f,h=l[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var p=f.value;this.iterateChildren(p)}}catch(t){c=!0,s=t}finally{try{u||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,l=this.getFontSizeDetails(n.width||"40px"),u=this.getFontSizeDetails(n.height||"40px");return{width:(!1===o?2*l.value+a:l.value)+l.unit,height:(!1===o?u.value:2*u.value+a)+u.unit}}},{key:"getFontSizeChangerButtonStyle",value:function(t,e){var n=e.style,r=void 0===n?{}:n,o=e.verticalAlignment,l=void 0!==o&&o,u=e.reverseOrder,c=void 0!==u&&u,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===l?h.unit:p.unit);return(t===i&&!1===c||t===a&&!0===c)&&(!1===l?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,l=this.getFontSizeChangerStyle(e),u=this.getFontSizeChangerButtonStyle(i,e),c=this.getFontSizeChangerButtonStyle(a,e);return o.a.createElement("div",{className:"font-size-changer",style:l},o.a.createElement("div",{className:"font-size-changer-buttons",style:l},o.a.createElement(h,{direction:i,customButton:n,onClick:this.onFontSizeUp.bind(this),style:u}),o.a.createElement(h,{direction:a,customButton:r,onClick:this.onFontSizeDown.bind(this),style:c})))}}]),e}();e.default=m}])}))),ro=f((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;l.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=u,o.responseType="blob",o.timeout=e,o.open("GET",t,!0),o.send(),l.impl.options.imagePlaceholder){var i=l.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 u(){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},l={toSvg:u,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 u(t,e){return function(t){void 0===t.imagePlaceholder?l.impl.options.imagePlaceholder=a.imagePlaceholder:l.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?l.impl.options.cacheBust=a.cacheBust:l.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 u(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 l=document.createElement("style");l.appendChild(u(a,r,o)),e.appendChild(l)}function u(t,e,r){var o="."+t+":"+e,i=r.cssText?a(r):l(r);return document.createTextNode(o+"{"+i+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function l(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=l}()}));const oo=require("jszip"),io=require("react-file-download"),ao=t=>{const{nodes:e,links:n}=t,r=n.map((({source:t,target:n})=>({source:e[t].name,target:e[n].name,sourceType:e[t].type,targetType:e[n].type}))),{nodeMap:o,nodesTsv:i}=(t=>{let e=1e7;const n={};let r=!1;t.forEach((({source:t,target:o,sourceType:i,targetType:a})=>{""!==o&&""!==t&&(Object.keys(n).indexOf(t)<0?(""!==i?(r=!0,n[t]={ID:e,WEIGHT:1,NODE_TYPE:i}):n[t]={ID:e,WEIGHT:1},e+=1):n[t].WEIGHT+=1,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)}));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((({source:t,target:r})=>{if(""===r||""===t)return;const o=e[t].ID,i=e[r].ID;n+=`${o}\t${i}\t1\tUndirected\r\n`})),n})(r,o),l=new oo;l.file("Node_Table.tsv",i),l.file("Edge_Table.tsv",a),l.generateAsync({type:"blob"}).then((t=>{io(t,"Gephi_generated_by_NMTL.zip")}))},lo=({fill:t="#825c0d"})=>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:"a"},e.createElement("path",{"data-name":"Rectangle 125",style:{fill:"#fff"},d:"M0 0h32v32H0z"}))),e.createElement("g",{style:{clipPath:"url(#a)"}},e.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:t},"data-name":"Mask Group 42"}))),uo=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_128","data-name":"Rectangle 128",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_47","data-name":"Mask Group 47",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3633","data-name":"Group 3633",transform:"translate(6 6)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M514 371v-2h-2v2h-2v2h2v2h2v-2h2v-2z",transform:"translate(-495 -369)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632",transform:"translate(0 2)"},t.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)"}))))),co=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_129","data-name":"Rectangle 129",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_48","data-name":"Mask Group 48",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3635","data-name":"Group 3635",transform:"translate(6 8)"},t.createElement("path",{id:"Path_181","data-name":"Path 181",className:"cls-3",d:"M510 371v2h6v-2z",transform:"translate(-495 -371)"}),t.createElement("g",{id:"Group_3632","data-name":"Group 3632"},t.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)"}))))),so=({fill:e="#825c0d"})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32"},t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path"},t.createElement("path",{id:"Rectangle_124","data-name":"Rectangle 124",style:{fill:"#fff"},d:"M0 0h32v32H0z"})),t.createElement("style",null,`\n .cls-3{fill:${e}}\n `)),t.createElement("g",{id:"Mask_Group_46","data-name":"Mask Group 46",style:{clipPath:"url(#clip-path)"}},t.createElement("g",{id:"Group_3629","data-name":"Group 3629",transform:"translate(6 6.001)"},t.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)"}),t.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)"}),t.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)"}),t.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)"}))));k(".extraTools {\n width: 100%;\n display: inline-flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n padding: 0px 20px;\n padding-top: 12px; }\n .extraTools__share button {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__download {\n cursor: pointer; }\n .extraTools__download-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fullscreenBtn {\n cursor: pointer;\n padding-top: 0; }\n .extraTools__fullscreenBtn-icon {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools__fontsize {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-changer,\n .extraTools .font-size-changer-buttons,\n .extraTools .font-size-up,\n .extraTools .font-size-down,\n .extraTools .tooltip {\n display: flex;\n justify-content: center;\n align-items: center; }\n .extraTools .font-size-up {\n width: 32px !important;\n cursor: pointer;\n margin-right: 16px !important; }\n .extraTools .font-size-down {\n cursor: pointer;\n width: 32px !important; }\n .extraTools .fullscreenExit {\n text-align: right;\n cursor: pointer;\n border: 0; }\n .extraTools #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");const fo=({className:t})=>e.createElement("div",{className:h("extraTools__share",t)},e.createElement(eo,{url:document.location.href},e.createElement(Qr,{size:32,round:!0})));fo.defaultProps={className:void 0},fo.propTypes={className:c.string};const ho=({className:t,intl:n,exclude:o,iconColor:i,SNAData:a,domToImageId:l})=>{const[u,c]=r(null),s=[{key:"downloadImage",onClick:()=>(({id:t,fileName:e="image",quality:n=.95})=>{const r=document.getElementById(t);ro.toPng(r,{quality:n}).then((t=>{const n=document.createElement("a");n.download=`${e}.png`,n.href=t,n.click()})).catch((t=>{console.error("oops, something went wrong!",t)}))})({id:l}),label:n?"knowledge.writersAndWorksSNA.download.img":"下載圖片"},{key:"downloadTsv",onClick:()=>ao(a),label:n?"knowledge.writersAndWorksSNA.download.gephi":"下載Gephi"},{key:"downloadXls",onClick:()=>(({data:t,dataType:e,extType:n="xlsx"})=>{let r;switch(e){case"sna":r=b(t);break;default:r=t}_(`\ufeff${x(r)}`,`output.${n}`)})({data:a,dataType:"sna",extType:"xlsx"}),label:n?"knowledge.writersAndWorksSNA.download.xls":"下載Excel"}];return e.createElement("div",{className:h("extraTools__download",t)},e.createElement(w,{title:n?n.formatMessage({id:"knowledge.writersAndWorksSNA.download"}):"下載",placement:"bottom"},e.createElement("div",{className:"extraTools__download-icon",onClick:t=>c(t.currentTarget)},e.createElement(lo,{fill:i}))),e.createElement(v,{id:"download-menu",anchorEl:u,keepMounted:!0,open:Boolean(u),onClose:()=>c(null)},s.map((({key:t,onClick:r,label:i})=>{return a=t,!((o||[]).filter((t=>t===a)).length>0)&&e.createElement(m,{key:t,onClick:r},n?n.formatMessage({id:i}):i);var a}))))};ho.defaultProps={className:void 0,intl:void 0,exclude:void 0,SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph"},ho.propTypes={className:c.string,intl:c.objectOf(c.any),exclude:c.arrayOf(c.string),SNAData:c.objectOf(c.any),iconColor:c.string,domToImageId:c.string};const po=({className:t,intl:n,iconColor:r,fullScreenHandle:o})=>{const{enter:i}=o||{enter:()=>{}};return e.createElement("div",{className:h("extraTools__fullscreenBtn",t)},e.createElement(w,{title:n?n.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreen"}):"全螢幕模式",placement:"bottom"},e.createElement("div",{className:"extraTools__fullscreenBtn-icon",onClick:i},e.createElement(so,{fill:r}))))};po.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",fullScreenHandle:void 0},po.propTypes={className:c.string,intl:c.objectOf(c.any),iconColor:c.string,fullScreenHandle:c.objectOf(c.any)};const yo=({className:t,intl:n,iconColor:r,FontSizeTargets:o,FontSizeOptions:i})=>e.createElement("div",{className:h("extraTools__fontsize",t)},e.createElement(no,{targets:o,options:i,customButtons:{up:e.createElement(w,{title:n?n.formatMessage({id:"knowledge.writersAndWorksSNA.big"}):"字級放大",placement:"bottom"},e.createElement(uo,{fill:r})),down:e.createElement(w,{title:n?n.formatMessage({id:"knowledge.writersAndWorksSNA.small"}):"字級縮小",placement:"bottom"},e.createElement(co,{fill:r})),style:{border:"none"},buttonsMargin:10}}));yo.defaultProps={className:void 0,intl:void 0,iconColor:"#825c0d",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1}},yo.propTypes={className:c.string,intl:c.objectOf(c.any),iconColor:c.string,FontSizeTargets:c.arrayOf(c.string),FontSizeOptions:c.objectOf(c.any)};const go=({className:t,intl:n,exclude:r,SNAData:o,iconColor:i,domToImageId:a,FontSizeTargets:l,FontSizeOptions:u,fullScreenHandle:c})=>{const s={intl:n,exclude:r,SNAData:o,iconColor:i,domToImageId:a,FontSizeTargets:l,FontSizeOptions:u,fullScreenHandle:c},f=[{keys:["share"],Component:fo},{keys:["downloadImage","downloadTsv","downloadXls"],Component:ho},{keys:["fullscreen"],Component:po},{keys:["fontSizeChanger"],Component:yo}];return e.createElement("div",{className:h("extraTools",t)},f.map((({keys:t,Component:n})=>{return o=t,!((r||[]).filter((t=>t===o)).length>0)&&e.createElement(n,g({key:t[0]},s));var o})))};go.ShareButton=fo,go.DownloadMenu=ho,go.FullscreenBtn=po,go.FontSizeChanger=yo,go.defaultProps={className:void 0,intl:void 0,exclude:["downloadXls"],SNAData:null,iconColor:"#825c0d",domToImageId:"network-graph",FontSizeTargets:["#network-graph svg g text"],FontSizeOptions:{stepSize:2,range:1},fullScreenHandle:void 0},go.propTypes={className:c.string,intl:c.objectOf(c.any),exclude:c.arrayOf(c.string),SNAData:c.objectOf(c.any),iconColor:c.string,domToImageId:c.string,FontSizeTargets:c.arrayOf(c.string),FontSizeOptions:c.objectOf(c.any),fullScreenHandle:c.objectOf(c.any)};k(".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\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 vo=function(t){var l=t.className,u=t.intl,c=t.exclude,s=t.distance,f=t.SNAData,p=t.handleClickNodeGoto,d=t.width,y=t.height,g=t.fontColor,v=t.backgroundColor,m=t.iconColor;if(!f||0===f.nodes.length)return e.createElement("div",{className:"noData"},u?u.formatMessage({id:"common.noData"}):"暫無資料");var w=function(){var t=r(!1),e=t[0],l=t[1],u=o(null);i((function(){var t=function(){l(Mr.fullscreenElement===u.current)};return Mr.addEventListener("fullscreenchange",t),function(){return Mr.removeEventListener("fullscreenchange",t)}}),[]);var c=a((function(){return Mr.fullscreenElement?Mr.exitFullscreen().then((function(){return Mr.requestFullscreen(u.current)})):u.current?Mr.requestFullscreen(u.current):void 0}),[]),s=a((function(){return Mr.fullscreenElement===u.current?Mr.exitFullscreen():Promise.resolve()}),[]);return n((function(){return{active:e,enter:c,exit:s,node:u}}),[e,c,s])}(),b=n((function(){return w.active?screen.width:screen.width>1050?d:screen.width-80}),[w.active,screen.width]),_=n((function(){return w.active?screen.height:screen.width>1050?y:screen.height-300}),[w.active,screen.width]),x=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,l=Math.pow(Math.pow(i,2)+Math.pow(a,2),.5);return{qx:r-a*n/l,qy:o+i*n/l}}(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)},k=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=Sr(Nr),i=t.links.map((function(t){return Object.create(t)})),a=t.nodes.map((function(t){return Object.create(t)})),l=function(t){var e,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,a=.6,l=nr(),u=hn(s),c=C("tick","end");function s(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(r){var u,c,s=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(i-n)*o,l.each((function(t){t(n)})),u=0;u<s;++u)null==(c=t[u]).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*_r;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 u.restart(s),e},stop:function(){return u.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),l.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?l.remove(t):l.set(t,p(n)),e):l.get(t)},find:function(e,n,r){var o,i,a,l,u,c=0,s=t.length;for(null==r?r=1/0:r*=r,c=0;c<s;++c)(a=(o=e-(l=t[c]).x)*o+(i=n-l.y)*i)<r&&(u=l,r=a);return u},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=vr,l=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},u=ir(30),c=1;function s(r){for(var o=0,a=t.length;o<c;++o)for(var l,u,s,f,h,p,d,y=0;y<a;++y)u=(l=t[y]).source,f=(s=l.target).x+s.vx-u.x-u.vx||ar(),h=s.y+s.vy-u.y-u.vy||ar(),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,u.vx+=f*(d=1-d),u.vy+=h*d}function f(){if(r){var l,u,c=r.length,s=t.length,f=nr(r,a);for(l=0,o=new Array(c);l<s;++l)(u=t[l]).index=l,"object"!=typeof u.source&&(u.source=mr(f,u.source)),"object"!=typeof u.target&&(u.target=mr(f,u.target)),o[u.source.index]=(o[u.source.index]||0)+1,o[u.target.index]=(o[u.target.index]||0)+1;for(l=0,i=new Array(s);l<s;++l)u=t[l],i[l]=o[u.source.index]/(o[u.source.index]+o[u.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]=+l(t[n],n,t)}function p(){if(r)for(var e=0,o=t.length;e<o;++e)n[e]=+u(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?(l="function"==typeof t?t:ir(+t),h(),s):l},s.distance=function(t){return arguments.length?(u="function"==typeof t?t:ir(+t),p(),s):u},s}(i).id((function(t){return t.index})).distance(50)).force("charge",function(){var t,e,n,r,o=ir(-30),i=1,a=1/0,l=.81;function u(r){var o,i=t.length,a=fr(t,wr,br).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,l=0,u=0;if(t.length){for(o=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(l+=e.value,u+=n,o+=n*e.x,i+=n*e.y);t.x=o/u,t.y=i/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{l+=r[e.data.index]}while(e=e.next)}t.value=l}function f(t,o,u,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/l<p)return p<a&&(0===s&&(p+=(s=ar())*s),0===f&&(p+=(f=ar())*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=ar())*s),0===f&&(p+=(f=ar())*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 u.initialize=function(e){t=e,c()},u.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),c(),u):o},u.distanceMin=function(t){return arguments.length?(i=t*t,u):Math.sqrt(i)},u.distanceMax=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.theta=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)},u}().strength(-160)).force("center",function(t,e){var n;function r(){var r,o,i=n.length,a=0,l=0;for(r=0;r<i;++r)a+=(o=n[r]).x,l+=o.y;for(a=a/i-t,l=l/i-e,r=0;r<i;++r)(o=n[r]).x-=a,o.y-=l}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}(b/2,_/2)).force("collide",function(t){var e,n,r=1,o=1;function i(){for(var t,i,l,u,c,s,f,h=e.length,p=0;p<o;++p)for(i=fr(e,yr,gr).visitAfter(a),t=0;t<h;++t)l=e[t],s=n[l.index],f=s*s,u=l.x+l.vx,c=l.y+l.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>u+p||o<u-p||n>c+p||i<c-p;if(a.index>l.index){var d=u-a.x-a.vx,y=c-a.y-a.vy,g=d*d+y*y;g<p*p&&(0===d&&(g+=(d=ar())*d),0===y&&(g+=(y=ar())*y),g=(p-(g=Math.sqrt(g)))/g*r,l.vx+=(d*=g)*(p=(h*=h)/(f+h)),l.vy+=(y*=g)*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 l(){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=ir(null==t?1:+t)),i.initialize=function(t){e=t,l()},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:ir(+e),l(),i):t},i}().radius((function(){return 13.5})).iterations(5)).force("x",function(t){var e,n,r,o=ir(.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=ir(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),a(),i):o},i.x=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),a(),i):t},i}(b/2)).force("y",function(t){var e,n,r,o=ir(.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=ir(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:ir(+t),a(),i):o},i.y=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),a(),i):t},i}(_/2)).force("radial",function(t,e,n){var r,o,i,a=ir(.1);function l(t){for(var a=0,l=r.length;a<l;++a){var u=r[a],c=u.x-e||1e-6,s=u.y-n||1e-6,f=Math.sqrt(c*c+s*s),h=(i[a]-f)*o[a]*t/f;u.vx+=c*h,u.vy+=s*h}}function u(){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=ir(+t)),null==e&&(e=0),null==n&&(n=0),l.initialize=function(t){r=t,u()},l.strength=function(t){return arguments.length?(a="function"==typeof t?t:ir(+t),u(),l):a},l.radius=function(e){return arguments.length?(t="function"==typeof e?e:ir(+e),u(),l):t},l.x=function(t){return arguments.length?(e=+t,l):e},l.y=function(t){return arguments.length?(n=+t,l):n},l}(100,b/2,_/2)),c=Ht(".chart").append("svg").attr("viewBox",[0,0,b,_]).style("background-color",v);c.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=c.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=c.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?p({name:t.name,id:t.id,type:t.type}):null})).call(function(t){return re().on("start",(function(e){Ot.active||t.alphaTarget(.3).restart(),e.fx=e.x,e.fy=e.y})).on("drag",(function(t){t.fx=Ot.x>b||Ot.x<0?t.x:Ot.x,t.fy=Ot.y>_||Ot.y<0?t.y:Ot.y}))}(l));f.append("title").text((function(t){return"".concat(t.name,"-").concat(function(t){switch(t){case"mainNode":return u?u.formatMessage({id:"SNA.search.center"}):"主要搜尋中心";case"organization":return u?u.formatMessage({id:"SNA.organization"}):"組織";case"person":return u?u.formatMessage({id:"SNA.author"}):"作家";case"publication":return u?u.formatMessage({id:"SNA.publication"}):"作家";case"article":return u?u.formatMessage({id:"SNA.article"}):"單篇作品";case"keyword":return u?u.formatMessage({id:"SNA.keyword"}):"關鍵字";case"event":return u?u.formatMessage({id:"SNA.event"}):"事件";default:return""}}(t.type))}));var h=c.append("g").selectAll("text").data(a).join("text").attr("fill",g).attr("text-anchor","middle").attr("key",(function(t){return t.type})).style("color","#fff").style("font-size","14px").text((function(t){return t.name})),d=c.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");c.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})),l.on("tick",(function(){s.attr("d",(function(t){return x(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})),d.attr("d",(function(t){return x(t.source,t.target,30)}))}))};return i((function(){if(f&&f.nodes&&f.nodes.length>0){var t=document.getElementById("network-graph");t&&t.childNodes[0]&&t.removeChild(t.childNodes[0]),k(f)}}),[f,w.active]),e.createElement("div",{className:h("SNA",{"SNA--smallSize":s<200},l),style:{contentWidth:b,contentHeight:_,backgroundColor:v}},e.createElement(go,{intl:u,SNAData:f,iconColor:m,domToImageId:"network-graph",fullScreenHandle:w,exclude:c}),e.createElement(zr,{handle:w},e.createElement("div",{className:"chart",id:"network-graph"},w.active&&e.createElement("div",{className:"fullscreenExit",style:{backgroundColor:v}},e.createElement(Fr,{fontSize:"large",style:{color:m},onClick:w.exit,title:u?u.formatMessage({id:"knowledge.writersAndWorksSNA.fullscreenExit"}):"離開全螢幕"})))))};vo.defaultProps={className:void 0,intl:void 0,width:1050,height:600,distance:400,SNAData:null,fontColor:"#000000",backgroundColor:"#FFFFFF",iconColor:"#825c0d",exclude:["downloadXls"],handleClickNodeGoto:null},vo.propTypes={className:c.string,intl:c.objectOf(c.any),width:c.number,height:c.number,distance:c.number,SNAData:c.objectOf(c.any),fontColor:c.string,backgroundColor:c.string,iconColor:c.string,exclude:c.arrayOf(c.string),handleClickNodeGoto:c.func};export{vo as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daoyi/nmtl-ui",
3
- "version": "1.1.43-beta.52",
3
+ "version": "1.1.43-beta.53",
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",