You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RELOG/0.6/casebuilder/static/js/main.61f89eef.js

3 lines
459 KiB

/*! For license information please see main.61f89eef.js.LICENSE.txt */
!function(){var e={7757:function(e,t,n){e.exports=n(9727)},9790:function(e,t,n){e.exports={graphlib:n(2990),layout:n(6456),debug:n(7920),util:{time:n(8392).time,notime:n(8392).notime},version:n(6206)}},2212:function(e,t,n){"use strict";var r=n(8899),o=n(3857);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?o(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},o={};function i(a){r.has(o,a)||(o[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):i(e.w)})),delete n[a])}return r.forEach(e.nodes(),i),t}(e);r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))},undo:function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},4093:function(e,t,n){var r=n(8899),o=n(8392);function i(e,t,n,r,i,a){var u={width:0,height:0,rank:a,borderType:t},l=i[t][a-1],c=o.addDummyNode(e,"border",u,n);i[t][a]=c,e.setParent(c,r),l&&e.setEdge(l,c,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var o=e.children(n),a=e.node(n);if(o.length&&r.forEach(o,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var u=a.minRank,l=a.maxRank+1;u<l;++u)i(e,"borderLeft","_bl",n,a,u),i(e,"borderRight","_br",n,a,u)}}))}},5384:function(e,t,n){"use strict";var r=n(8899);function o(e){r.forEach(e.nodes(),(function(t){i(e.node(t))})),r.forEach(e.edges(),(function(t){i(e.edge(t))}))}function i(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function u(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||o(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){a(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){r.forEach(e.nodes(),(function(t){u(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,u),r.has(n,"x")&&u(n)}))}(e),o(e))}}},5639:function(e){function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},7920:function(e,t,n){var r=n(8899),o=n(8392),i=n(2990).Graph;e.exports={debugOrdering:function(e){var t=o.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}}},2990:function(e,t,n){var r;try{r=n(6118)}catch(o){}r||(r=window.graphlib),e.exports=r},3857:function(e,t,n){var r=n(8899),o=n(2990).Graph,i=n(5639);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new o,a=0,u=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),u=Math.max(u,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)}));var c=r.range(u+a+3).map((function(){return new i})),s=a+1;return r.forEach(n.nodes(),(function(e){l(c,s,n.node(e))})),{graph:n,buckets:c,zeroIdx:s}}(e,t||a),c=function(e,t,n){var r,o=[],i=t[t.length-1],a=t[0];for(;e.nodeCount();){for(;r=a.dequeue();)u(e,t,n,r);for(;r=i.dequeue();)u(e,t,n,r);if(e.nodeCount())for(var l=t.length-2;l>0;--l)if(r=t[l].dequeue()){o=o.concat(u(e,t,n,r,!0));break}}return o}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(function(t){return e.outEdges(t.v,t.w)})),!0)};var a=r.constant(1);function u(e,t,n,o,i){var a=i?[]:void 0;return r.forEach(e.inEdges(o.v),(function(r){var o=e.edge(r),u=e.node(r.v);i&&a.push({v:r.v,w:r.w}),u.out-=o,l(t,n,u)})),r.forEach(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,l(t,n,a)})),e.removeNode(o.v),a}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},6456:function(e,t,n){"use strict";var r=n(8899),o=n(2212),i=n(1898),a=n(6744),u=n(8392).normalizeRanks,l=n(7652),c=n(8392).removeEmptyRanks,s=n(1652),f=n(4093),d=n(5384),p=n(7348),h=n(3090),v=n(8392),g=n(2990).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=O(e.graph());return t.setGraph(r.merge({},y,k(n,m),r.pick(n,b))),r.forEach(e.nodes(),(function(n){var o=O(e.node(n));t.setNode(n,r.defaults(k(o,w),_)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var o=O(e.edge(n));t.setEdge(n,r.merge({},E,k(o,x),r.pick(o,S)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){s.run(e)})),t(" rank",(function(){a(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){s.cleanup(e)})),t(" normalizeRanks",(function(){u(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){l(e)})),t(" addBorderSegments",(function(){f(e)})),t(" order",(function(){p(e)})),t(" insertSelfEdges",(function(){!function(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")})),delete i.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){d.adjust(e)})),t(" position",(function(){h(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,u=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),u=e.node(r.last(n.borderRight));n.width=Math.abs(u.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){d.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),u=a.marginx||0,l=a.marginy||0;function c(e){var r=e.x,a=e.y,u=e.width,l=e.height;t=Math.min(t,r-u/2),n=Math.max(n,r+u/2),o=Math.min(o,a-l/2),i=Math.max(i,a+l/2)}r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&c(n)})),t-=u,o-=l,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=o})),r.forEach(e.edges(),(function(n){var i=e.edge(n);r.forEach(i.points,(function(e){e.x-=t,e.y-=o})),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)})),a.width=n-t+u,a.height=i-o+l}(e)})),t(" assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(v.intersectRect(i,n)),o.points.push(v.intersectRect(a,r))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))})),r.forEach(e.edges(),(function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],w=["width","height"],_={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},S=["labelpos"];function k(e,t){return r.mapValues(r.pick(e,t),Number)}function O(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},8899:function(e,t,n){var r;try{r={cloneDeep:n(8121),constant:n(1547),defaults:n(6933),each:n(9430),filter:n(86),find:n(1211),flatten:n(5506),forEach:n(6514),forIn:n(9144),has:n(7805),isUndefined:n(2530),last:n(5727),map:n(2034),mapValues:n(7702),max:n(9627),merge:n(9286),min:n(6452),minBy:n(3638),now:n(72),pick:n(6460),range:n(6222),reduce:n(5080),sortBy:n(4286),uniqueId:n(804),values:n(2063),zipObject:n(4827)}}catch(o){}r||(r=window._),e.exports=r},1652:function(e,t,n){var r=n(8899),o=n(8392);function i(e,t,n,a,u,l,c){var s=e.children(c);if(s.length){var f=o.addBorderNode(e,"_bt"),d=o.addBorderNode(e,"_bb"),p=e.node(c);e.setParent(f,c),p.borderTop=f,e.setParent(d,c),p.borderBottom=d,r.forEach(s,(function(r){i(e,t,n,a,u,l,r);var o=e.node(r),s=o.borderTop?o.borderTop:r,p=o.borderBottom?o.borderBottom:r,h=o.borderTop?a:2*a,v=s!==p?1:u-l[c]+1;e.setEdge(f,s,{weight:h,minlen:v,nestingEdge:!0}),e.setEdge(p,d,{weight:h,minlen:v,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,f,{weight:0,minlen:u+l[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}e.exports={run:function(e){var t=o.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,(function(e){n(e,i+1)})),t[o]=i}return r.forEach(e.children(),(function(e){n(e,1)})),t}(e),a=r.max(r.values(n))-1,u=2*a+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=u}));var l=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(r){i(e,t,u,l,a,n,r)})),e.graph().nodeRankFactor=u},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},1898:function(e,t,n){"use strict";var r=n(8899),o=n(8392);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,i,a=t.v,u=e.node(a).rank,l=t.w,c=e.node(l).rank,s=t.name,f=e.edge(t),d=f.labelRank;if(c===u+1)return;for(e.removeEdge(t),i=0,++u;u<c;++i,++u)f.points=[],r={width:0,height:0,edgeLabel:f,edgeObj:t,rank:u},n=o.addDummyNode(e,"edge",r,"_d"),u===d&&(r.width=f.width,r.height=f.height,r.dummy="edge-label",r.labelpos=f.labelpos),e.setEdge(a,n,{weight:f.weight},s),0===i&&e.graph().dummyChains.push(n),a=n;e.setEdge(a,l,{weight:f.weight},s)}(e,t)}))},undo:function(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)}))}}},4388:function(e,t,n){var r=n(8899);e.exports=function(e,t,n){var o,i={};r.forEach(n,(function(n){for(var r,a,u=e.parent(n);u;){if((r=e.parent(u))?(a=i[r],i[r]=u):(a=o,o=u),a&&a!==u)return void t.setEdge(a,u);u=r}}))}},5213:function(e,t,n){var r=n(8899);e.exports=function(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,(function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}}))}},1386:function(e,t,n){var r=n(8899),o=n(2990).Graph;e.exports=function(e,t,n){var i=function(e){var t;for(;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(o){var u=e.node(o),l=e.parent(o);(u.rank===t||u.minRank<=t&&t<=u.maxRank)&&(a.setNode(o),a.setParent(o,l||i),r.forEach(e[n](o),(function(t){var n=t.v===o?t.w:t.v,i=a.edge(n,o),u=r.isUndefined(i)?0:i.weight;a.setEdge(n,o,{weight:e.edge(t).weight+u})})),r.has(u,"minRank")&&a.setNode(o,{borderLeft:u.borderLeft[t],borderRight:u.borderRight[t]}))})),a}},3862:function(e,t,n){"use strict";var r=n(8899);function o(e,t,n){for(var o=r.zipObject(n,r.map(n,(function(e,t){return t}))),i=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:o[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var u=2*a-1;a-=1;var l=r.map(new Array(u),(function(){return 0})),c=0;return r.forEach(i.forEach((function(e){var t=e.pos+a;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}e.exports=function(e,t){for(var n=0,r=1;r<t.length;++r)n+=o(e,t[r-1],t[r]);return n}},7348:function(e,t,n){"use strict";var r=n(8899),o=n(5586),i=n(3862),a=n(3616),u=n(1386),l=n(4388),c=n(2990).Graph,s=n(8392);function f(e,t,n){return r.map(t,(function(t){return u(e,t,n)}))}function d(e,t){var n=new c;r.forEach(e,(function(e){var o=e.graph().root,i=a(e,o,n,t);r.forEach(i.vs,(function(t,n){e.node(t).order=n})),l(e,n,i.vs)}))}function p(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}e.exports=function(e){var t=s.maxRank(e),n=f(e,r.range(1,t+1),"inEdges"),a=f(e,r.range(t-1,-1,-1),"outEdges"),u=o(e);p(e,u);for(var l,c=Number.POSITIVE_INFINITY,h=0,v=0;v<4;++h,++v){d(h%2?n:a,h%4>=2),u=s.buildLayerMatrix(e);var g=i(e,u);g<c&&(v=0,l=r.cloneDeep(u),c=g)}p(e,l)}},5586:function(e,t,n){"use strict";var r=n(8899);e.exports=function(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),o=r.max(r.map(n,(function(t){return e.node(t).rank}))),i=r.map(r.range(o+1),(function(){return[]}));var a=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(a,(function n(o){if(r.has(t,o))return;t[o]=!0;var a=e.node(o);i[a.rank].push(o),r.forEach(e.successors(o),n)})),i}},1982:function(e,t,n){"use strict";var r=n(8899);e.exports=function(e,t){var n={};return r.forEach(e,(function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))})),function(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function o(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},3616:function(e,t,n){var r=n(8899),o=n(5213),i=n(1982),a=n(4929);e.exports=function e(t,n,u,l){var c=t.children(n),s=t.node(n),f=s?s.borderLeft:void 0,d=s?s.borderRight:void 0,p={};f&&(c=r.filter(c,(function(e){return e!==f&&e!==d})));var h=o(t,c);r.forEach(h,(function(n){if(t.children(n.v).length){var o=e(t,n.v,u,l);p[n.v]=o,r.has(o,"barycenter")&&(i=n,a=o,r.isUndefined(i.barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}var i,a}));var v=i(h,u);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(v,p);var g=a(v,l);if(f&&(g.vs=r.flatten([f,g.vs,d],!0),t.predecessors(f).length)){var m=t.node(t.predecessors(f)[0]),y=t.node(t.predecessors(d)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+m.order+y.order)/(g.weight+2),g.weight+=2}return g}},4929:function(e,t,n){var r=n(8899),o=n(8392);function i(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}e.exports=function(e,t){var n=o.partition(e,(function(e){return r.has(e,"barycenter")})),a=n.lhs,u=r.sortBy(n.rhs,(function(e){return-e.i})),l=[],c=0,s=0,f=0;a.sort((d=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:d?t.i-e.i:e.i-t.i})),f=i(l,u,f),r.forEach(a,(function(e){f+=e.vs.length,l.push(e.vs),c+=e.barycenter*e.weight,s+=e.weight,f=i(l,u,f)}));var d;var p={vs:r.flatten(l,!0)};s&&(p.barycenter=c/s,p.weight=s);return p}},7652:function(e,t,n){var r=n(8899);e.exports=function(e){var t=function(e){var t={},n=0;function o(i){var a=n;r.forEach(e.children(i),o),t[i]={low:a,lim:n++}}return r.forEach(e.children(),o),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),o=r.edgeObj,i=function(e,t,n,r){var o,i,a=[],u=[],l=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>l||c>t[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,u=i.lca,l=0,c=a[l],s=!0;n!==o.w;){if(r=e.node(n),s){for(;(c=a[l])!==u&&e.node(c).maxRank<r.rank;)l++;c===u&&(s=!1)}if(!s){for(;l<a.length-1&&e.node(c=a[l+1]).minRank<=r.rank;)l++;c=a[l]}e.setParent(n,c),n=e.successors(n)[0]}}))}},6137:function(e,t,n){"use strict";var r=n(8899),o=n(2990).Graph,i=n(8392);function a(e,t){var n={};return r.reduce(t,(function(t,o){var i=0,a=0,u=t.length,c=r.last(o);return r.forEach(o,(function(t,s){var f=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),d=f?e.node(f).order:u;(f||t===c)&&(r.forEach(o.slice(a,s+1),(function(t){r.forEach(e.predecessors(t),(function(r){var o=e.node(r),a=o.order;!(a<i||d<a)||o.dummy&&e.node(t).dummy||l(n,r,t)}))})),a=s+1,i=d)})),o})),n}function u(e,t){var n={};function o(t,o,i,a,u){var c;r.forEach(r.range(o,i),(function(o){c=t[o],e.node(c).dummy&&r.forEach(e.predecessors(c),(function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>u)&&l(n,t,c)}))}))}return r.reduce(t,(function(t,n){var i,a=-1,u=0;return r.forEach(n,(function(r,l){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(i=e.node(c[0]).order,o(n,u,l,a,i),u=l,a=i)}o(n,u,n.length,i,t.length)})),n})),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function c(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function s(e,t,n,o){var i={},a={},u={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,a[e]=e,u[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var l=o(e);if(l.length){l=r.sortBy(l,(function(e){return u[e]}));for(var s=(l.length-1)/2,f=Math.floor(s),d=Math.ceil(s);f<=d;++f){var p=l[f];a[e]===e&&t<u[p]&&!c(n,e,p)&&(a[p]=e,a[e]=i[e]=i[p],t=u[p])}}}))})),{root:i,align:a}}function f(e,t,n,i,a){var u={},l=function(e,t,n,i){var a=new o,u=e.graph(),l=function(e,t,n){return function(o,i,a){var u,l=o.node(i),c=o.node(a),s=0;if(s+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":u=-l.width/2;break;case"r":u=l.width/2}if(u&&(s+=n?u:-u),u=0,s+=(l.dummy?t:e)/2,s+=(c.dummy?t:e)/2,s+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=c.width/2;break;case"r":u=-c.width/2}return u&&(s+=n?u:-u),u=0,s}}(u.nodesep,u.edgesep,i);return r.forEach(t,(function(t){var o;r.forEach(t,(function(t){var r=n[t];if(a.setNode(r),o){var i=n[o],u=a.edge(i,r);a.setEdge(i,r,Math.max(l(e,t,o),u||0))}o=t}))})),a}(e,t,n,a),c=a?"borderLeft":"borderRight";function s(e,t){for(var n=l.nodes(),r=n.pop(),o={};r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return s((function(e){u[e]=l.inEdges(e).reduce((function(e,t){return Math.max(e,u[t.v]+l.edge(t))}),0)}),l.predecessors.bind(l)),s((function(t){var n=l.outEdges(t).reduce((function(e,t){return Math.min(e,u[t.w]-l.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==c&&(u[t]=Math.max(u[t],n))}),l.successors.bind(l)),r.forEach(i,(function(e){u[e]=u[n[e]]})),u}function d(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var i=function(e,t){return e.node(t).width}(e,r)/2;n=Math.max(t+i,n),o=Math.min(t-i,o)})),n-o}))}function p(e,t){var n=r.values(t),o=r.min(n),i=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var u,l=n+a,c=e[l];if(c!==t){var s=r.values(c);(u="l"===a?o-r.min(s):i-r.max(s))&&(e[l]=r.mapValues(c,(function(e){return e+u})))}}))}))}function h(e,t){return r.mapValues(e.ul,(function(n,o){if(t)return e[t.toLowerCase()][o];var i=r.sortBy(r.map(e,o));return(i[1]+i[2])/2}))}e.exports={positionX:function(e){var t,n=i.buildLayerMatrix(e),o=r.merge(a(e,n),u(e,n)),l={};r.forEach(["u","d"],(function(i){t="u"===i?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),u=s(e,t,o,a),c=f(e,t,u.root,u.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(e){return-e}))),l[i+n]=c}))}));var c=d(e,l);return p(l,c),h(l,e.graph().align)},findType1Conflicts:a,findType2Conflicts:u,addConflict:l,hasConflict:c,verticalAlignment:s,horizontalCompaction:f,alignCoordinates:p,findSmallestWidthAlignment:d,balance:h}},3090:function(e,t,n){"use strict";var r=n(8899),o=n(8392),i=n(6137).positionX;e.exports=function(e){(function(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,(function(t){var o=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=i+o/2})),i+=o+n}))})(e=o.asNonCompoundGraph(e)),r.forEach(i(e),(function(t,n){e.node(n).x=t}))}},5378:function(e,t,n){"use strict";var r=n(8899),o=n(2990).Graph,i=n(4441).slack;function a(e,t){return r.forEach(e.nodes(),(function n(o){r.forEach(t.nodeEdges(o),(function(r){var a=r.v,u=o===a?r.w:a;e.hasNode(u)||i(t,r)||(e.setNode(u,{}),e.setEdge(o,u,{}),n(u))}))})),e.nodeCount()}function u(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)}))}function l(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new o({directed:!1}),c=e.nodes()[0],s=e.nodeCount();r.setNode(c,{});for(;a(r,e)<s;)t=u(r,e),n=r.hasNode(t.v)?i(e,t):-i(e,t),l(r,e,n);return r}},6744:function(e,t,n){"use strict";var r=n(4441).longestPath,o=n(5378),i=n(7986);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:u(e);break;case"tight-tree":!function(e){r(e),o(e)}(e);break;case"longest-path":a(e)}};var a=r;function u(e){i(e)}},7986:function(e,t,n){"use strict";var r=n(8899),o=n(5378),i=n(4441).slack,a=n(4441).longestPath,u=n(2990).alg.preorder,l=n(2990).alg.postorder,c=n(8392).simplify;function s(e){e=c(e),a(e);var t,n=o(e);for(p(n),f(n,e);t=v(n);)m(n,e,t,g(n,e,t))}function f(e,t){var n=l(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}(e,t,n)}))}function d(e,t,n){var o=e.node(n).parent,i=!0,a=t.edge(n,o),u=0;return a||(i=!1,a=t.edge(o,n)),u=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a,l,c=r.v===n,s=c?r.w:r.v;if(s!==o){var f=c===i,d=t.edge(r).weight;if(u+=f?d:-d,a=n,l=s,e.hasEdge(a,l)){var p=e.edge(n,s).cutvalue;u+=f?-p:p}}})),u}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),h(e,{},1,t)}function h(e,t,n,o,i){var a=n,u=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),(function(i){r.has(t,i)||(n=h(e,t,n,i,o))})),u.low=a,u.lim=n++,i?u.parent=i:delete u.parent,n}function v(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function g(e,t,n){var o=n.v,a=n.w;t.hasEdge(o,a)||(o=n.w,a=n.v);var u=e.node(o),l=e.node(a),c=u,s=!1;u.lim>l.lim&&(c=l,s=!0);var f=r.filter(t.edges(),(function(t){return s===y(e,e.node(t.v),c)&&s!==y(e,e.node(t.w),c)}));return r.minBy(f,(function(e){return i(t,e)}))}function m(e,t,n,o){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),p(e),f(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),o=u(e,n);o=o.slice(1),r.forEach(o,(function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=s,s.initLowLimValues=p,s.initCutValues=f,s.calcCutValue=d,s.leaveEdge=v,s.enterEdge=g,s.exchangeEdges=m},4441:function(e,t,n){"use strict";var r=n(8899);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var a=r.min(r.map(e.outEdges(o),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&void 0!==a&&null!==a||(a=0),i.rank=a}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},8392:function(e,t,n){"use strict";var r=n(8899),o=n(2990).Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:i,simplify:function(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),t},asNonCompoundGraph:function(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,u=t.y-i,l=e.width/2,c=e.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(u)*l>Math.abs(a)*c?(u<0&&(c=-c),n=c*a/u,r=c):(a<0&&(l=-l),n=l,r=l*u/a);return{x:o+n,y:i+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%i!==0?--o:o&&r.forEach(t,(function(t){e.node(t).rank+=o}))}))},addBorderNode:function(e,t,n,r){var o={width:0,height:0};arguments.length>=4&&(o.rank=n,o.order=r);return i(e,"border",o,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},6206:function(e){e.exports="0.8.5"},6118:function(e,t,n){var r=n(5828);e.exports={Graph:r.Graph,json:n(5710),alg:n(5280),version:r.version}},6666:function(e,t,n){var r=n(980);e.exports=function(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}},672:function(e,t,n){var r=n(980);function o(e,t,n,i,a,u){r.has(i,t)||(i[t]=!0,n||u.push(t),r.each(a(t),(function(t){o(e,t,n,i,a,u)})),n&&u.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],u={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);o(e,t,"post"===n,u,i,a)})),a}},9919:function(e,t,n){var r=n(4871),o=n(980);e.exports=function(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}},4871:function(e,t,n){var r=n(980),o=n(6071);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,u={},l=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=u[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,l.decrease(t,c))};e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;u[e]={distance:n},l.add(e,n)}));for(;l.size()>0&&(i=l.removeMin(),(a=u[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return u}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},6050:function(e,t,n){var r=n(980),o=n(8172);e.exports=function(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},5053:function(e,t,n){var r=n(980);e.exports=function(e,t,n){return function(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],u=r.distance+o.distance;u<a.distance&&(a.distance=u,a.predecessor=o.predecessor)}))}))})),r}(e,t||o,n||function(t){return e.outEdges(t)})};var o=r.constant(1)},5280:function(e,t,n){e.exports={components:n(6666),dijkstra:n(4871),dijkstraAll:n(9919),findCycles:n(6050),floydWarshall:n(5053),isAcyclic:n(810),postorder:n(1189),preorder:n(6743),prim:n(9863),tarjan:n(8172),topsort:n(1731)}},810:function(e,t,n){var r=n(1731);e.exports=function(e){try{r(e)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},1189:function(e,t,n){var r=n(672);e.exports=function(e,t){return r(e,t,"post")}},6743:function(e,t,n){var r=n(672);e.exports=function(e,t){return r(e,t,"pre")}},9863:function(e,t,n){var r=n(980),o=n(1311),i=n(6071);e.exports=function(e,t){var n,a=new o,u={},l=new i;function c(e){var r=e.v===n?e.w:e.v,o=l.priority(r);if(void 0!==o){var i=t(e);i<o&&(u[r]=n,l.decrease(r,i))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){l.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),l.decrease(e.nodes()[0],0);var s=!1;for(;l.size()>0;){if(n=l.removeMin(),r.has(u,n))a.setEdge(n,u[n]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(n).forEach(c)}return a}},8172:function(e,t,n){var r=n(980);e.exports=function(e){var t=0,n=[],o={},i=[];function a(u){var l=o[u]={onStack:!0,lowlink:t,index:t++};if(n.push(u),e.successors(u).forEach((function(e){r.has(o,e)?o[e].onStack&&(l.lowlink=Math.min(l.lowlink,o[e].index)):(a(e),l.lowlink=Math.min(l.lowlink,o[e].lowlink))})),l.lowlink===l.index){var c,s=[];do{c=n.pop(),o[c].onStack=!1,s.push(c)}while(u!==c);i.push(s)}}return e.nodes().forEach((function(e){r.has(o,e)||a(e)})),i}},1731:function(e,t,n){var r=n(980);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),(function a(u){if(r.has(n,u))throw new i;r.has(t,u)||(n[u]=!0,t[u]=!0,r.each(e.predecessors(u),a),delete n[u],o.push(u))})),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},6071:function(e,t,n){var r=n(980);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},1311:function(e,t,n){"use strict";var r=n(980);e.exports=i;var o="\0";function i(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function u(e,t){--e[t]||delete e[t]}function l(e,t,n,o){var i=""+t,a=""+n;if(!e&&i>a){var u=i;i=a,a=u}return i+"\x01"+a+"\x01"+(r.isUndefined(o)?"\0":o)}function c(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var u={v:o,w:i};return r&&(u.name=r),u}function s(e,t){return l(e,t.v,t.w,t.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},i.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},i.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},i.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return r.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=o;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==o)return t}},i.prototype.children=function(e){if(r.isUndefined(e)&&(e=o),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,i(e))})),t},i.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,(function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},i.prototype.setEdge=function(){var e,t,n,o,i=!1,u=arguments[0];"object"===typeof u&&null!==u&&"v"in u?(e=u.v,t=u.w,n=u.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=u,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var s=l(this._isDirected,e,t,n);if(r.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?o:this._defaultEdgeLabelFn(e,t,n);var f=c(this._isDirected,e,t,n);return e=f.v,t=f.w,Object.freeze(f),this._edgeObjs[s]=f,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][s]=f,this._out[e][s]=f,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?s(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],u(this._preds[t],e),u(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.v===t})):o}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.w===t})):o}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},5828:function(e,t,n){e.exports={Graph:n(1311),version:n(4161)}},5710:function(e,t,n){var r=n(980),o=n(1311);function i(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};r.isUndefined(e.graph())||(t.value=r.clone(e.graph()));return t},read:function(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},980:function(e,t,n){var r;try{r={clone:n(8787),constant:n(1547),each:n(9430),filter:n(86),has:n(7805),isArray:n(3629),isEmpty:n(6364),isFunction:n(4786),isUndefined:n(2530),keys:n(2742),map:n(2034),reduce:n(5080),size:n(9467),transform:n(5653),union:n(6310),values:n(2063)}}catch(o){}r||(r=window._),e.exports=r},4161:function(e){e.exports="2.1.8"},908:function(e,t,n){var r=n(8136)(n(7009),"DataView");e.exports=r},9676:function(e,t,n){var r=n(5403),o=n(2747),i=n(6037),a=n(4154),u=n(7728);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=u,e.exports=l},8384:function(e,t,n){var r=n(3894),o=n(8699),i=n(4957),a=n(7184),u=n(7109);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=u,e.exports=l},5797:function(e,t,n){var r=n(8136)(n(7009),"Map");e.exports=r},8059:function(e,t,n){var r=n(4086),o=n(9255),i=n(9186),a=n(3423),u=n(3739);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=u,e.exports=l},8319:function(e,t,n){var r=n(8136)(n(7009),"Promise");e.exports=r},3924:function(e,t,n){var r=n(8136)(n(7009),"Set");e.exports=r},692:function(e,t,n){var r=n(8059),o=n(5774),i=n(1596);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},2854:function(e,t,n){var r=n(8384),o=n(511),i=n(835),a=n(707),u=n(8832),l=n(5077);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=u,c.prototype.set=l,e.exports=c},7197:function(e,t,n){var r=n(7009).Symbol;e.exports=r},6219:function(e,t,n){var r=n(7009).Uint8Array;e.exports=r},7091:function(e,t,n){var r=n(8136)(n(7009),"WeakMap");e.exports=r},3665:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},4550:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},4903:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},9055:function(e,t,n){var r=n(4842);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},2683:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},7538:function(e,t,n){var r=n(6478),o=n(4963),i=n(3629),a=n(5174),u=n(6800),l=n(9102),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),s=!n&&o(e),f=!n&&!s&&a(e),d=!n&&!s&&!f&&l(e),p=n||s||f||d,h=p?r(e.length,String):[],v=h.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||f&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,v))||h.push(g);return h}},8950:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},1705:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},2095:function(e){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},7897:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},405:function(e,t,n){var r=n(9586)("length");e.exports=r},8002:function(e,t,n){var r=n(2526),o=n(9231);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},8463:function(e,t,n){var r=n(2526),o=n(9231),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},7112:function(e,t,n){var r=n(9231);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},1855:function(e,t,n){var r=n(4503),o=n(2742);e.exports=function(e,t){return e&&r(t,o(t),e)}},5076:function(e,t,n){var r=n(4503),o=n(3961);e.exports=function(e,t){return e&&r(t,o(t),e)}},2526:function(e,t,n){var r=n(8528);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},1905:function(e,t,n){var r=n(2854),o=n(4550),i=n(8463),a=n(1855),u=n(5076),l=n(4523),c=n(291),s=n(2455),f=n(7636),d=n(8248),p=n(5341),h=n(8383),v=n(9243),g=n(9759),m=n(548),y=n(3629),b=n(5174),w=n(103),_=n(8092),x=n(6995),E=n(2742),S=n(3961),k="[object Arguments]",O="[object Function]",C="[object Object]",N={};N[k]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[C]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[O]=N["[object WeakMap]"]=!1,e.exports=function e(t,n,j,P,M,T){var D,L=1&n,A=2&n,I=4&n;if(j&&(D=M?j(t,P,M,T):j(t)),void 0!==D)return D;if(!_(t))return t;var z=y(t);if(z){if(D=v(t),!L)return c(t,D)}else{var R=h(t),B=R==O||"[object GeneratorFunction]"==R;if(b(t))return l(t,L);if(R==C||R==k||B&&!M){if(D=A||B?{}:m(t),!L)return A?f(t,u(D,t)):s(t,a(D,t))}else{if(!N[R])return M?t:{};D=g(t,R,L)}}T||(T=new r);var F=T.get(t);if(F)return F;T.set(t,D),x(t)?t.forEach((function(r){D.add(e(r,n,j,r,t,T))})):w(t)&&t.forEach((function(r,o){D.set(o,e(r,n,j,o,t,T))}));var U=z?void 0:(I?A?p:d:A?S:E)(t);return o(U||t,(function(r,o){U&&(r=t[o=r]),i(D,o,e(r,n,j,o,t,T))})),D}},5763:function(e,t,n){var r=n(8092),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},7927:function(e,t,n){var r=n(5358),o=n(7056)(r);e.exports=o},3079:function(e,t,n){var r=n(152);e.exports=function(e,t,n){for(var o=-1,i=e.length;++o<i;){var a=e[o],u=t(a);if(null!=u&&(void 0===l?u===u&&!r(u):n(u,l)))var l=u,c=a}return c}},7523:function(e,t,n){var r=n(7927);e.exports=function(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}},2045:function(e){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},5182:function(e,t,n){var r=n(1705),o=n(3529);e.exports=function e(t,n,i,a,u){var l=-1,c=t.length;for(i||(i=o),u||(u=[]);++l<c;){var s=t[l];n>0&&i(s)?n>1?e(s,n-1,i,a,u):r(u,s):a||(u[u.length]=s)}return u}},5099:function(e,t,n){var r=n(372)();e.exports=r},5358:function(e,t,n){var r=n(5099),o=n(2742);e.exports=function(e,t){return e&&r(e,t,o)}},8667:function(e,t,n){var r=n(3082),o=n(9793);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},1986:function(e,t,n){var r=n(1705),o=n(3629);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},9066:function(e,t,n){var r=n(7197),o=n(1587),i=n(3581),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},1954:function(e){e.exports=function(e,t){return e>t}},7852:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},529:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},4842:function(e,t,n){var r=n(2045),o=n(505),i=n(7167);e.exports=function(e,t,n){return t===t?i(e,t,n):r(e,o,n)}},4906:function(e,t,n){var r=n(9066),o=n(3141);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},1848:function(e,t,n){var r=n(3355),o=n(3141);e.exports=function e(t,n,i,a,u){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!==t&&n!==n:r(t,n,i,a,e,u))}},3355:function(e,t,n){var r=n(2854),o=n(5305),i=n(2206),a=n(8078),u=n(8383),l=n(3629),c=n(5174),s=n(9102),f="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,g,m){var y=l(e),b=l(t),w=y?d:u(e),_=b?d:u(t),x=(w=w==f?p:w)==p,E=(_=_==f?p:_)==p,S=w==_;if(S&&c(e)){if(!c(t))return!1;y=!0,x=!1}if(S&&!x)return m||(m=new r),y||s(e)?o(e,t,n,v,g,m):i(e,t,w,n,v,g,m);if(!(1&n)){var k=x&&h.call(e,"__wrapped__"),O=E&&h.call(t,"__wrapped__");if(k||O){var C=k?e.value():e,N=O?t.value():t;return m||(m=new r),g(C,N,n,v,m)}}return!!S&&(m||(m=new r),a(e,t,n,v,g,m))}},3085:function(e,t,n){var r=n(8383),o=n(3141);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},8856:function(e,t,n){var r=n(2854),o=n(1848);e.exports=function(e,t,n,i){var a=n.length,u=a,l=!i;if(null==e)return!u;for(e=Object(e);a--;){var c=n[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<u;){var s=(c=n[a])[0],f=e[s],d=c[1];if(l&&c[2]){if(void 0===f&&!(s in e))return!1}else{var p=new r;if(i)var h=i(f,d,s,e,t,p);if(!(void 0===h?o(d,f,3,i,p):h))return!1}}return!0}},505:function(e){e.exports=function(e){return e!==e}},6703:function(e,t,n){var r=n(4786),o=n(257),i=n(8092),a=n(7907),u=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,s=l.toString,f=c.hasOwnProperty,d=RegExp("^"+s.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?d:u).test(a(e))}},8680:function(e,t,n){var r=n(8383),o=n(3141);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},8150:function(e,t,n){var r=n(9066),o=n(4635),i=n(3141),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},6025:function(e,t,n){var r=n(7080),o=n(4322),i=n(2100),a=n(3629),u=n(38);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):u(e)}},3654:function(e,t,n){var r=n(2936),o=n(8836),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},8664:function(e,t,n){var r=n(8092),o=n(2936),i=n(4221),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&a.call(e,u))&&n.push(u);return n}},2580:function(e){e.exports=function(e,t){return e<t}},3849:function(e,t,n){var r=n(7927),o=n(1473);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},7080:function(e,t,n){var r=n(8856),o=n(9091),i=n(284);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},4322:function(e,t,n){var r=n(1848),o=n(6181),i=n(5658),a=n(5823),u=n(5072),l=n(284),c=n(9793);e.exports=function(e,t){return a(e)&&u(t)?l(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},4173:function(e,t,n){var r=n(2854),o=n(8002),i=n(5099),a=n(9216),u=n(8092),l=n(3961),c=n(5906);e.exports=function e(t,n,s,f,d){t!==n&&i(n,(function(i,l){if(d||(d=new r),u(i))a(t,n,l,s,e,f,d);else{var p=f?f(c(t,l),i,l+"",t,n,d):void 0;void 0===p&&(p=i),o(t,l,p)}}),l)}},9216:function(e,t,n){var r=n(8002),o=n(4523),i=n(613),a=n(291),u=n(548),l=n(4963),c=n(3629),s=n(6279),f=n(5174),d=n(4786),p=n(8092),h=n(3977),v=n(9102),g=n(5906),m=n(6576);e.exports=function(e,t,n,y,b,w,_){var x=g(e,n),E=g(t,n),S=_.get(E);if(S)r(e,n,S);else{var k=w?w(x,E,n+"",e,t,_):void 0,O=void 0===k;if(O){var C=c(E),N=!C&&f(E),j=!C&&!N&&v(E);k=E,C||N||j?c(x)?k=x:s(x)?k=a(x):N?(O=!1,k=o(E,!0)):j?(O=!1,k=i(E,!0)):k=[]:h(E)||l(E)?(k=x,l(x)?k=m(x):p(x)&&!d(x)||(k=u(E))):O=!1}O&&(_.set(E,k),b(k,E,y,w,_),_.delete(E)),r(e,n,k)}}},3226:function(e,t,n){var r=n(8950),o=n(8667),i=n(6025),a=n(3849),u=n(9179),l=n(6194),c=n(4480),s=n(2100),f=n(3629);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return f(e)?function(t){return o(t,1===e.length?e[0]:e)}:e})):[s];var d=-1;t=r(t,l(i));var p=a(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++d,value:e}}));return u(p,(function(e,t){return c(e,t,n)}))}},4980:function(e,t,n){var r=n(2591),o=n(5658);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},2591:function(e,t,n){var r=n(8667),o=n(379),i=n(3082);e.exports=function(e,t,n){for(var a=-1,u=t.length,l={};++a<u;){var c=t[a],s=r(e,c);n(s,c)&&o(l,i(c,e),s)}return l}},9586:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},4084:function(e,t,n){var r=n(8667);e.exports=function(e){return function(t){return r(t,e)}}},7255:function(e){var t=Math.ceil,n=Math.max;e.exports=function(e,r,o,i){for(var a=-1,u=n(t((r-e)/(o||1)),0),l=Array(u);u--;)l[i?u:++a]=e,e+=o;return l}},750:function(e){e.exports=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}},8794:function(e,t,n){var r=n(2100),o=n(4262),i=n(9156);e.exports=function(e,t){return i(o(e,t,r),e+"")}},379:function(e,t,n){var r=n(8463),o=n(3082),i=n(6800),a=n(8092),u=n(9793);e.exports=function(e,t,n,l){if(!a(e))return e;for(var c=-1,s=(t=o(t,e)).length,f=s-1,d=e;null!=d&&++c<s;){var p=u(t[c]),h=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(c!=f){var v=d[p];void 0===(h=l?l(v,p,d):void 0)&&(h=a(v)?v:i(t[c+1])?[]:{})}r(d,p,h),d=d[p]}return e}},7532:function(e,t,n){var r=n(1547),o=n(8528),i=n(2100),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},9179:function(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},6478:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},2446:function(e,t,n){var r=n(7197),o=n(8950),i=n(3629),a=n(152),u=r?r.prototype:void 0,l=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},821:function(e,t,n){var r=n(5627),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},6194:function(e){e.exports=function(e){return function(t){return e(t)}}},9602:function(e,t,n){var r=n(692),o=n(9055),i=n(2683),a=n(75),u=n(7730),l=n(2230);e.exports=function(e,t,n){var c=-1,s=o,f=e.length,d=!0,p=[],h=p;if(n)d=!1,s=i;else if(f>=200){var v=t?null:u(e);if(v)return l(v);d=!1,s=a,h=new r}else h=t?[]:p;e:for(;++c<f;){var g=e[c],m=t?t(g):g;if(g=n||0!==g?g:0,d&&m===m){for(var y=h.length;y--;)if(h[y]===m)continue e;t&&h.push(m),p.push(g)}else s(h,m,n)||(h!==p&&h.push(m),p.push(g))}return p}},8019:function(e,t,n){var r=n(8950);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},2971:function(e){e.exports=function(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var u=r<i?t[r]:void 0;n(a,e[r],u)}return a}},75:function(e){e.exports=function(e,t){return e.has(t)}},3410:function(e,t,n){var r=n(2100);e.exports=function(e){return"function"==typeof e?e:r}},3082:function(e,t,n){var r=n(3629),o=n(5823),i=n(170),a=n(3518);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},7010:function(e,t,n){var r=n(6219);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4523:function(e,t,n){e=n.nmd(e);var r=n(7009),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}},1022:function(e,t,n){var r=n(7010);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},8503:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},4720:function(e,t,n){var r=n(7197),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},613:function(e,t,n){var r=n(7010);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},8558:function(e,t,n){var r=n(152);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e===e,a=r(e),u=void 0!==t,l=null===t,c=t===t,s=r(t);if(!l&&!s&&!a&&e>t||a&&u&&c&&!l&&!s||o&&u&&c||!n&&c||!i)return 1;if(!o&&!a&&!s&&e<t||s&&n&&i&&!o&&!a||l&&n&&i||!u&&i||!c)return-1}return 0}},4480:function(e,t,n){var r=n(8558);e.exports=function(e,t,n){for(var o=-1,i=e.criteria,a=t.criteria,u=i.length,l=n.length;++o<u;){var c=r(i[o],a[o]);if(c)return o>=l?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}},291:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},4503:function(e,t,n){var r=n(8463),o=n(2526);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var u=-1,l=t.length;++u<l;){var c=t[u],s=i?i(n[c],e[c],c,n,e):void 0;void 0===s&&(s=e[c]),a?o(n,c,s):r(n,c,s)}return n}},2455:function(e,t,n){var r=n(4503),o=n(5918);e.exports=function(e,t){return r(e,o(e),t)}},7636:function(e,t,n){var r=n(4503),o=n(8487);e.exports=function(e,t){return r(e,o(e),t)}},5525:function(e,t,n){var r=n(7009)["__core-js_shared__"];e.exports=r},9934:function(e,t,n){var r=n(8794),o=n(3195);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var l=n[r];l&&e(t,l,r,a)}return t}))}},7056:function(e,t,n){var r=n(1473);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,u=Object(n);(t?a--:++a<i)&&!1!==o(u[a],a,u););return n}}},372:function(e){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var l=a[e?u:++o];if(!1===n(i[l],l,i))break}return t}}},5481:function(e,t,n){var r=n(6025),o=n(1473),i=n(2742);e.exports=function(e){return function(t,n,a){var u=Object(t);if(!o(t)){var l=r(n,3);t=i(t),n=function(e){return l(u[e],e,u)}}var c=e(t,n,a);return c>-1?u[l?t[c]:c]:void 0}}},6381:function(e,t,n){var r=n(7255),o=n(3195),i=n(1495);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&o(t,n,a)&&(n=a=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),a=void 0===a?t<n?1:-1:i(a),r(t,n,a,e)}}},7730:function(e,t,n){var r=n(3924),o=n(9694),i=n(2230),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},8528:function(e,t,n){var r=n(8136),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},5305:function(e,t,n){var r=n(692),o=n(7897),i=n(75);e.exports=function(e,t,n,a,u,l){var c=1&n,s=e.length,f=t.length;if(s!=f&&!(c&&f>s))return!1;var d=l.get(e),p=l.get(t);if(d&&p)return d==t&&p==e;var h=-1,v=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h<s;){var m=e[h],y=t[h];if(a)var b=c?a(y,m,h,t,e,l):a(m,y,h,e,t,l);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!o(t,(function(e,t){if(!i(g,t)&&(m===e||u(m,e,n,a,l)))return g.push(t)}))){v=!1;break}}else if(m!==y&&!u(m,y,n,a,l)){v=!1;break}}return l.delete(e),l.delete(t),v}},2206:function(e,t,n){var r=n(7197),o=n(6219),i=n(9231),a=n(5305),u=n(234),l=n(2230),c=r?r.prototype:void 0,s=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=u;case"[object Set]":var h=1&r;if(p||(p=l),e.size!=t.size&&!h)return!1;var v=d.get(e);if(v)return v==t;r|=2,d.set(e,t);var g=a(p(e),p(t),r,c,f,d);return d.delete(e),g;case"[object Symbol]":if(s)return s.call(e)==s.call(t)}return!1}},8078:function(e,t,n){var r=n(8248),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,u){var l=1&n,c=r(e),s=c.length;if(s!=r(t).length&&!l)return!1;for(var f=s;f--;){var d=c[f];if(!(l?d in t:o.call(t,d)))return!1}var p=u.get(e),h=u.get(t);if(p&&h)return p==t&&h==e;var v=!0;u.set(e,t),u.set(t,e);for(var g=l;++f<s;){var m=e[d=c[f]],y=t[d];if(i)var b=l?i(y,m,d,t,e,u):i(m,y,d,e,t,u);if(!(void 0===b?m===y||a(m,y,n,i,u):b)){v=!1;break}g||(g="constructor"==d)}if(v&&!g){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(v=!1)}return u.delete(e),u.delete(t),v}},7038:function(e,t,n){var r=n(5506),o=n(4262),i=n(9156);e.exports=function(e){return i(o(e,void 0,r),e+"")}},1032:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8248:function(e,t,n){var r=n(1986),o=n(5918),i=n(2742);e.exports=function(e){return r(e,i,o)}},5341:function(e,t,n){var r=n(1986),o=n(8487),i=n(3961);e.exports=function(e){return r(e,i,o)}},2799:function(e,t,n){var r=n(5964);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},9091:function(e,t,n){var r=n(5072),o=n(2742);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},8136:function(e,t,n){var r=n(6703),o=n(40);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},1137:function(e,t,n){var r=n(2709)(Object.getPrototypeOf,Object);e.exports=r},1587:function(e,t,n){var r=n(7197),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(l){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},5918:function(e,t,n){var r=n(4903),o=n(8174),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=u},8487:function(e,t,n){var r=n(1705),o=n(1137),i=n(5918),a=n(8174),u=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=u},8383:function(e,t,n){var r=n(908),o=n(5797),i=n(8319),a=n(3924),u=n(7091),l=n(9066),c=n(7907),s="[object Map]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",v=c(r),g=c(o),m=c(i),y=c(a),b=c(u),w=l;(r&&w(new r(new ArrayBuffer(1)))!=h||o&&w(new o)!=s||i&&w(i.resolve())!=f||a&&w(new a)!=d||u&&w(new u)!=p)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return h;case g:return s;case m:return f;case y:return d;case b:return p}return t}),e.exports=w},40:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},6417:function(e,t,n){var r=n(3082),o=n(4963),i=n(3629),a=n(6800),u=n(4635),l=n(9793);e.exports=function(e,t,n){for(var c=-1,s=(t=r(t,e)).length,f=!1;++c<s;){var d=l(t[c]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++c!=s?f:!!(s=null==e?0:e.length)&&u(s)&&a(d,s)&&(i(e)||o(e))}},7302:function(e){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},5403:function(e,t,n){var r=n(9620);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2747:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6037:function(e,t,n){var r=n(9620),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},4154:function(e,t,n){var r=n(9620),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},7728:function(e,t,n){var r=n(9620);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},9243:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},9759:function(e,t,n){var r=n(7010),o=n(1022),i=n(8503),a=n(4720),u=n(613);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},548:function(e,t,n){var r=n(5763),o=n(1137),i=n(2936);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},3529:function(e,t,n){var r=n(7197),o=n(4963),i=n(3629),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},6800:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},3195:function(e,t,n){var r=n(9231),o=n(1473),i=n(6800),a=n(8092);e.exports=function(e,t,n){if(!a(n))return!1;var u=typeof t;return!!("number"==u?o(n)&&i(t,n.length):"string"==u&&t in n)&&r(n[t],e)}},5823:function(e,t,n){var r=n(3629),o=n(152),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},5964:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},257:function(e,t,n){var r=n(5525),o=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},2936:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5072:function(e,t,n){var r=n(8092);e.exports=function(e){return e===e&&!r(e)}},3894:function(e){e.exports=function(){this.__data__=[],this.size=0}},8699:function(e,t,n){var r=n(7112),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},4957:function(e,t,n){var r=n(7112);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7184:function(e,t,n){var r=n(7112);e.exports=function(e){return r(this.__data__,e)>-1}},7109:function(e,t,n){var r=n(7112);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4086:function(e,t,n){var r=n(9676),o=n(8384),i=n(5797);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},9255:function(e,t,n){var r=n(2799);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},9186:function(e,t,n){var r=n(2799);e.exports=function(e){return r(this,e).get(e)}},3423:function(e,t,n){var r=n(2799);e.exports=function(e){return r(this,e).has(e)}},3739:function(e,t,n){var r=n(2799);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},234:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},284:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4634:function(e,t,n){var r=n(9151);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},9620:function(e,t,n){var r=n(8136)(Object,"create");e.exports=r},8836:function(e,t,n){var r=n(2709)(Object.keys,Object);e.exports=r},4221:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},9494:function(e,t,n){e=n.nmd(e);var r=n(1032),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=u},3581:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2709:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},4262:function(e,t,n){var r=n(3665),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,u=o(i.length-t,0),l=Array(u);++a<u;)l[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(l),r(e,this,c)}}},7009:function(e,t,n){var r=n(1032),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},5906:function(e){e.exports=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}},5774:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1596:function(e){e.exports=function(e){return this.__data__.has(e)}},2230:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},9156:function(e,t,n){var r=n(7532),o=n(3197)(r);e.exports=o},3197:function(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},511:function(e,t,n){var r=n(8384);e.exports=function(){this.__data__=new r,this.size=0}},835:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},707:function(e){e.exports=function(e){return this.__data__.get(e)}},8832:function(e){e.exports=function(e){return this.__data__.has(e)}},5077:function(e,t,n){var r=n(8384),o=n(5797),i=n(8059);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},7167:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},4651:function(e,t,n){var r=n(405),o=n(7302),i=n(3007);e.exports=function(e){return o(e)?i(e):r(e)}},170:function(e,t,n){var r=n(4634),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},9793:function(e,t,n){var r=n(152);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},7907:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},5627:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},3007:function(e){var t="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+r+")"+"?",l="[\\ufe0e\\ufe0f]?",c=l+u+("(?:\\u200d(?:"+[o,i,a].join("|")+")"+l+u+")*"),s="(?:"+[o+n+"?",n,i,a,t].join("|")+")",f=RegExp(r+"(?="+r+")|"+s+c,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},8787:function(e,t,n){var r=n(1905);e.exports=function(e){return r(e,4)}},8121:function(e,t,n){var r=n(1905);e.exports=function(e){return r(e,5)}},1547:function(e){e.exports=function(e){return function(){return e}}},6933:function(e,t,n){var r=n(8794),o=n(9231),i=n(3195),a=n(3961),u=Object.prototype,l=u.hasOwnProperty,c=r((function(e,t){e=Object(e);var n=-1,r=t.length,c=r>2?t[2]:void 0;for(c&&i(t[0],t[1],c)&&(r=1);++n<r;)for(var s=t[n],f=a(s),d=-1,p=f.length;++d<p;){var h=f[d],v=e[h];(void 0===v||o(v,u[h])&&!l.call(e,h))&&(e[h]=s[h])}return e}));e.exports=c},9430:function(e,t,n){e.exports=n(6514)},9231:function(e){e.exports=function(e,t){return e===t||e!==e&&t!==t}},86:function(e,t,n){var r=n(4903),o=n(7523),i=n(6025),a=n(3629);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},1211:function(e,t,n){var r=n(5481)(n(1475));e.exports=r},1475:function(e,t,n){var r=n(2045),o=n(6025),i=n(9753),a=Math.max;e.exports=function(e,t,n){var u=null==e?0:e.length;if(!u)return-1;var l=null==n?0:i(n);return l<0&&(l=a(u+l,0)),r(e,o(t,3),l)}},5506:function(e,t,n){var r=n(5182);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},6514:function(e,t,n){var r=n(4550),o=n(7927),i=n(3410),a=n(3629);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},9144:function(e,t,n){var r=n(5099),o=n(3410),i=n(3961);e.exports=function(e,t){return null==e?e:r(e,o(t),i)}},6181:function(e,t,n){var r=n(8667);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},7805:function(e,t,n){var r=n(7852),o=n(6417);e.exports=function(e,t){return null!=e&&o(e,t,r)}},5658:function(e,t,n){var r=n(529),o=n(6417);e.exports=function(e,t){return null!=e&&o(e,t,r)}},2100:function(e){e.exports=function(e){return e}},4963:function(e,t,n){var r=n(4906),o=n(3141),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=l},3629:function(e){var t=Array.isArray;e.exports=t},1473:function(e,t,n){var r=n(4786),o=n(4635);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},6279:function(e,t,n){var r=n(1473),o=n(3141);e.exports=function(e){return o(e)&&r(e)}},5174:function(e,t,n){e=n.nmd(e);var r=n(7009),o=n(9488),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,l=(u?u.isBuffer:void 0)||o;e.exports=l},6364:function(e,t,n){var r=n(3654),o=n(8383),i=n(4963),a=n(3629),u=n(1473),l=n(5174),c=n(2936),s=n(9102),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(u(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||s(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},4786:function(e,t,n){var r=n(9066),o=n(8092);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},4635:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},103:function(e,t,n){var r=n(3085),o=n(6194),i=n(9494),a=i&&i.isMap,u=a?o(a):r;e.exports=u},8092:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3141:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},3977:function(e,t,n){var r=n(9066),o=n(1137),i=n(3141),a=Function.prototype,u=Object.prototype,l=a.toString,c=u.hasOwnProperty,s=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==s}},6995:function(e,t,n){var r=n(8680),o=n(6194),i=n(9494),a=i&&i.isSet,u=a?o(a):r;e.exports=u},6769:function(e,t,n){var r=n(9066),o=n(3629),i=n(3141);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},152:function(e,t,n){var r=n(9066),o=n(3141);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},9102:function(e,t,n){var r=n(8150),o=n(6194),i=n(9494),a=i&&i.isTypedArray,u=a?o(a):r;e.exports=u},2530:function(e){e.exports=function(e){return void 0===e}},2742:function(e,t,n){var r=n(7538),o=n(3654),i=n(1473);e.exports=function(e){return i(e)?r(e):o(e)}},3961:function(e,t,n){var r=n(7538),o=n(8664),i=n(1473);e.exports=function(e){return i(e)?r(e,!0):o(e)}},5727:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},2034:function(e,t,n){var r=n(8950),o=n(6025),i=n(3849),a=n(3629);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},7702:function(e,t,n){var r=n(2526),o=n(5358),i=n(6025);e.exports=function(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}},9627:function(e,t,n){var r=n(3079),o=n(1954),i=n(2100);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},9151:function(e,t,n){var r=n(8059);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},9286:function(e,t,n){var r=n(4173),o=n(9934)((function(e,t,n){r(e,t,n)}));e.exports=o},6452:function(e,t,n){var r=n(3079),o=n(2580),i=n(2100);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},3638:function(e,t,n){var r=n(3079),o=n(6025),i=n(2580);e.exports=function(e,t){return e&&e.length?r(e,o(t,2),i):void 0}},9694:function(e){e.exports=function(){}},72:function(e,t,n){var r=n(7009);e.exports=function(){return r.Date.now()}},6460:function(e,t,n){var r=n(4980),o=n(7038)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},38:function(e,t,n){var r=n(9586),o=n(4084),i=n(5823),a=n(9793);e.exports=function(e){return i(e)?r(a(e)):o(e)}},6222:function(e,t,n){var r=n(6381)();e.exports=r},5080:function(e,t,n){var r=n(2095),o=n(7927),i=n(6025),a=n(750),u=n(3629);e.exports=function(e,t,n){var l=u(e)?r:a,c=arguments.length<3;return l(e,i(t,4),n,c,o)}},9467:function(e,t,n){var r=n(3654),o=n(8383),i=n(1473),a=n(6769),u=n(4651);e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?u(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},4286:function(e,t,n){var r=n(5182),o=n(3226),i=n(8794),a=n(3195),u=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=u},8174:function(e){e.exports=function(){return[]}},9488:function(e){e.exports=function(){return!1}},1495:function(e,t,n){var r=n(2582),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},9753:function(e,t,n){var r=n(1495);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},2582:function(e,t,n){var r=n(821),o=n(8092),i=n(152),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=u.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},6576:function(e,t,n){var r=n(4503),o=n(3961);e.exports=function(e){return r(e,o(e))}},3518:function(e,t,n){var r=n(2446);e.exports=function(e){return null==e?"":r(e)}},5653:function(e,t,n){var r=n(4550),o=n(5763),i=n(5358),a=n(6025),u=n(1137),l=n(3629),c=n(5174),s=n(4786),f=n(8092),d=n(9102);e.exports=function(e,t,n){var p=l(e),h=p||c(e)||d(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=h?p?new v:[]:f(e)&&s(v)?o(u(e)):{}}return(h?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}},6310:function(e,t,n){var r=n(5182),o=n(8794),i=n(9602),a=n(6279),u=o((function(e){return i(r(e,1,a,!0))}));e.exports=u},804:function(e,t,n){var r=n(3518),o=0;e.exports=function(e){var t=++o;return r(e)+t}},2063:function(e,t,n){var r=n(8019),o=n(2742);e.exports=function(e){return null==e?[]:r(e,o(e))}},4827:function(e,t,n){var r=n(8463),o=n(2971);e.exports=function(e,t){return o(e||[],t||[],r)}},1725:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}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(o){return!1}}()?Object.assign:function(e,i){for(var a,u,l=o(e),c=1;c<arguments.length;c++){for(var s in a=Object(arguments[c]))n.call(a,s)&&(l[s]=a[s]);if(t){u=t(a);for(var f=0;f<u.length;f++)r.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l}},4463:function(e,t,n){"use strict";var r=n(2791),o=n(1725),i=n(5296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var u=new Set,l={};function c(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(l[e]=t,e=0;e<t.length;e++)u.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},v={};function g(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var o=m.hasOwnProperty(t)?m[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(v,e)||!p.call(h,e)&&(d.test(e)?v[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,E=60106,S=60107,k=60108,O=60114,C=60109,N=60110,j=60112,P=60113,M=60120,T=60115,D=60116,L=60121,A=60128,I=60129,z=60130,R=60131;if("function"===typeof Symbol&&Symbol.for){var B=Symbol.for;x=B("react.element"),E=B("react.portal"),S=B("react.fragment"),k=B("react.strict_mode"),O=B("react.profiler"),C=B("react.provider"),N=B("react.context"),j=B("react.forward_ref"),P=B("react.suspense"),M=B("react.suspense_list"),T=B("react.memo"),D=B("react.lazy"),L=B("react.block"),B("react.scope"),A=B("react.opaque.id"),I=B("react.debug_trace_mode"),z=B("react.offscreen"),R=B("react.legacy_hidden")}var F,U="function"===typeof Symbol&&Symbol.iterator;function $(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function V(e){if(void 0===F)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var H=!1;function Y(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var o=l.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,u=i.length-1;1<=a&&0<=u&&o[a]!==i[u];)u--;for(;1<=a&&0<=u;a--,u--)if(o[a]!==i[u]){if(1!==a||1!==u)do{if(a--,0>--u||o[a]!==i[u])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=u);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?V(e):""}function X(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=Y(e.type,!1);case 11:return e=Y(e.type.render,!1);case 22:return e=Y(e.type._render,!1);case 1:return e=Y(e.type,!0);default:return""}}function W(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case E:return"Portal";case O:return"Profiler";case k:return"StrictMode";case P:return"Suspense";case M:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case N:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case j:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case T:return W(e.type);case L:return W(e._render);case D:t=e._payload,e=e._init;try{return W(e(t))}catch(n){}}return null}function G(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+G(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function ue(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ce(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,ge,me=(ge=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function _e(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=_e(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function ke(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Oe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Ne=null,je=null;function Pe(e){if(e=ro(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),Ce(e.stateNode,e.type,t))}}function Me(e){Ne?je?je.push(e):je=[e]:Ne=e}function Te(){if(Ne){var e=Ne,t=je;if(je=Ne=null,Pe(e),t)for(e=0;e<t.length;e++)Pe(t[e])}}function De(e,t){return e(t)}function Le(e,t,n,r,o){return e(t,n,r,o)}function Ae(){}var Ie=De,ze=!1,Re=!1;function Be(){null===Ne&&null===je||(Ae(),Te())}function Fe(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ue=!1;if(f)try{var $e={};Object.defineProperty($e,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",$e,$e),window.removeEventListener("test",$e,$e)}catch(ge){Ue=!1}function Ve(e,t,n,r,o,i,a,u,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(s){this.onError(s)}}var He=!1,Ye=null,Xe=!1,We=null,Ge={onError:function(e){He=!0,Ye=e}};function qe(e,t,n,r,o,i,a,u,l){He=!1,Ye=null,Ve.apply(Ge,arguments)}function Ke(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ze(e){if(Ke(e)!==e)throw Error(a(188))}function Je(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Ze(o),e;if(i===r)return Ze(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var u=!1,l=o.child;l;){if(l===n){u=!0,n=o,r=i;break}if(l===r){u=!0,r=o,n=i;break}l=l.sibling}if(!u){for(l=i.child;l;){if(l===n){u=!0,n=i,r=o;break}if(l===r){u=!0,r=i,n=o;break}l=l.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],ut=null,lt=null,ct=null,st=new Map,ft=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":ut=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":st.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function gt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function mt(e){var t=no(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function wt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==ut&&yt(ut)&&(ut=null),null!==lt&&yt(lt)&&(lt=null),null!==ct&&yt(ct)&&(ct=null),st.forEach(bt),ft.forEach(bt)}function _t(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,wt)))}function xt(e){function t(t){return _t(t,e)}if(0<at.length){_t(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ut&&_t(ut,e),null!==lt&&_t(lt,e),null!==ct&&_t(ct,e),st.forEach(t),ft.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)mt(n),null===n.blockedOn&&dt.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},kt={},Ot={};function Ct(e){if(kt[e])return kt[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ot)return kt[e]=n[t];return e}f&&(Ot=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Nt=Ct("animationend"),jt=Ct("animationiteration"),Pt=Ct("animationstart"),Mt=Ct("transitionend"),Tt=new Map,Dt=new Map,Lt=["abort","abort",Nt,"animationEnd",jt,"animationIteration",Pt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Mt,"transitionEnd","waiting","waiting"];function At(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Dt.set(r,t),Tt.set(r,o),c(o,[r])}}(0,i.unstable_now)();var It=8;function zt(e){if(0!==(1&e))return It=15,1;if(0!==(2&e))return It=14,2;if(0!==(4&e))return It=13,4;var t=24&e;return 0!==t?(It=12,t):0!==(32&e)?(It=11,32):0!==(t=192&e)?(It=10,t):0!==(256&e)?(It=9,256):0!==(t=3584&e)?(It=8,t):0!==(4096&e)?(It=7,4096):0!==(t=4186112&e)?(It=6,t):0!==(t=62914560&e)?(It=5,t):67108864&e?(It=4,67108864):0!==(134217728&e)?(It=3,134217728):0!==(t=805306368&e)?(It=2,t):0!==(1073741824&e)?(It=1,1073741824):(It=8,e)}function Rt(e,t){var n=e.pendingLanes;if(0===n)return It=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,u=e.pingedLanes;if(0!==i)r=i,o=It=15;else if(0!==(i=134217727&n)){var l=i&~a;0!==l?(r=zt(l),o=It):0!==(u&=i)&&(r=zt(u),o=It)}else 0!==(i=n&~a)?(r=zt(i),o=It):0!==u&&(r=zt(u),o=It);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(zt(t),o<=It)return t;It=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Ht(t)),r|=e[n],t&=~o;return r}function Bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ft(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?Ft(10,t):e;case 10:return 0===(e=Ut(192&~t))?Ft(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ut(e){return e&-e}function $t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Yt(e)/Xt|0)|0},Yt=Math.log,Xt=Math.LN2;var Wt=i.unstable_UserBlockingPriority,Gt=i.unstable_runWithPriority,qt=!0;function Kt(e,t,n,r){ze||Ae();var o=Zt,i=ze;ze=!0;try{Le(o,e,t,n,r)}finally{(ze=i)||Be()}}function Qt(e,t,n,r){Gt(Wt,Zt.bind(null,e,t,n,r))}function Zt(e,t,n,r){var o;if(qt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Jt(e,t,n,r);if(null===i)o&&vt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return ut=gt(ut,e,t,n,r,o),!0;case"dragenter":return lt=gt(lt,e,t,n,r,o),!0;case"mouseover":return ct=gt(ct,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return st.set(i,gt(st.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ft.set(i,gt(ft.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;vt(e,r)}Ar(e,t,r,null,n)}}}function Jt(e,t,n,r){var o=Oe(r);if(null!==(o=no(o))){var i=Ke(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Qe(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Ar(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function un(){return!1}function ln(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:un,this.isPropagationStopped=un,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,sn,fn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=ln(dn),hn=o({},dn,{view:0,detail:0}),vn=ln(hn),gn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,sn=e.screenY-fn.screenY):sn=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),mn=ln(gn),yn=ln(o({},gn,{dataTransfer:0})),bn=ln(o({},hn,{relatedTarget:0})),wn=ln(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),_n=o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=ln(_n),En=ln(o({},dn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},On={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=On[e])&&!!t[e]}function Nn(){return Cn}var jn=o({},hn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?kn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=ln(jn),Mn=ln(o({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=ln(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nn})),Dn=ln(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=o({},gn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),An=ln(Ln),In=[9,13,27,32],zn=f&&"CompositionEvent"in window,Rn=null;f&&"documentMode"in document&&(Rn=document.documentMode);var Bn=f&&"TextEvent"in window&&!Rn,Fn=f&&(!zn||Rn&&8<Rn&&11>=Rn),Un=String.fromCharCode(32),$n=!1;function Vn(e,t){switch(e){case"keyup":return-1!==In.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Yn=!1;var Xn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Xn[e.type]:"textarea"===t}function Gn(e,t,n,r){Me(r),0<(t=zr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Kn=null;function Qn(e){jr(e,0)}function Zn(e){if(Q(oo(e)))return e}function Jn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){qn&&(qn.detachEvent("onpropertychange",ir),Kn=qn=null)}function ir(e){if("value"===e.propertyName&&Zn(Kn)){var t=[];if(Gn(t,Kn,e,Oe(e)),e=Qn,ze)e(t);else{ze=!0;try{De(e,t)}finally{ze=!1,Be()}}}}function ar(e,t,n){"focusin"===e?(or(),Kn=n,(qn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function ur(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn(Kn)}function lr(e,t){if("click"===e)return Zn(t)}function cr(e,t){if("input"===e||"change"===e)return Zn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function dr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!sr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function gr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yr=f&&"documentMode"in document&&11>=document.documentMode,br=null,wr=null,_r=null,xr=!1;function Er(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==br||br!==Z(r)||("selectionStart"in(r=br)&&mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},_r&&dr(_r,r)||(_r=r,0<(r=zr(wr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}At("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),At("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),At(Lt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),kr=0;kr<Sr.length;kr++)Dt.set(Sr[kr],0);s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Nr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,u,l,c){if(qe.apply(this,arguments),He){if(!He)throw Error(a(198));var s=Ye;He=!1,Ye=null,Xe||(Xe=!0,We=s)}}(r,t,void 0,e),e.currentTarget=null}function jr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],l=u.instance,c=u.currentTarget;if(u=u.listener,l!==i&&o.isPropagationStopped())break e;Nr(o,u,c),i=l}else for(a=0;a<r.length;a++){if(l=(u=r[a]).instance,c=u.currentTarget,u=u.listener,l!==i&&o.isPropagationStopped())break e;Nr(o,u,c),i=l}}}if(Xe)throw e=We,Xe=!1,We=null,e}function Pr(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Lr(t,e,2,!1),n.add(r))}var Mr="_reactListening"+Math.random().toString(36).slice(2);function Tr(e){e[Mr]||(e[Mr]=!0,u.forEach((function(t){Cr.has(t)||Dr(t,!1,e,null),Dr(t,!0,e,null)})))}function Dr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Cr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),u=e+"__"+(t?"capture":"bubble");a.has(u)||(t&&(o|=4),Lr(i,e,o,t),a.add(u))}function Lr(e,t,n,r){var o=Dt.get(t);switch(void 0===o?2:o){case 0:o=Kt;break;case 1:o=Qt;break;default:o=Zt}n=o.bind(null,t,n,e),o=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ar(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var u=r.stateNode.containerInfo;if(u===o||8===u.nodeType&&u.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==u;){if(null===(a=no(u)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}u=u.parentNode}}r=r.return}!function(e,t,n){if(Re)return e(t,n);Re=!0;try{Ie(e,t,n)}finally{Re=!1,Be()}}((function(){var r=i,o=Oe(n),a=[];e:{var u=Tt.get(e);if(void 0!==u){var l=pn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":l=Pn;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Nt:case jt:case Pt:l=wn;break;case Mt:l=Dn;break;case"scroll":l=vn;break;case"wheel":l=An;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Mn}var s=0!==(4&t),f=!s&&"scroll"===e,d=s?null!==u?u+"Capture":null:u;s=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==d&&(null!=(v=Fe(h,d))&&s.push(Ir(h,v,p)))),f)break;h=h.return}0<s.length&&(u=new l(u,c,null,n,o),a.push({event:u,listeners:s}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!no(c)&&!c[eo])&&(l||u)&&(u=o.window===o?o:(u=o.ownerDocument)?u.defaultView||u.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?no(c):null)&&(c!==(f=Ke(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(s=mn,v="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(s=Mn,v="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==l?u:oo(l),p=null==c?u:oo(c),(u=new s(v,h+"leave",l,n,o)).target=f,u.relatedTarget=p,v=null,no(o)===r&&((s=new s(d,h+"enter",c,n,o)).target=p,s.relatedTarget=f,v=s),f=v,l&&c)e:{for(d=c,h=0,p=s=l;p;p=Rr(p))h++;for(p=0,v=d;v;v=Rr(v))p++;for(;0<h-p;)s=Rr(s),h--;for(;0<p-h;)d=Rr(d),p--;for(;h--;){if(s===d||null!==d&&s===d.alternate)break e;s=Rr(s),d=Rr(d)}s=null}else s=null;null!==l&&Br(a,u,l,s,!1),null!==c&&null!==f&&Br(a,f,c,s,!0)}if("select"===(l=(u=r?oo(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===l&&"file"===u.type)var g=Jn;else if(Wn(u))if(er)g=cr;else{g=ur;var m=ar}else(l=u.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(g=lr);switch(g&&(g=g(e,r))?Gn(a,g,n,o):(m&&m(e,u,r),"focusout"===e&&(m=u._wrapperState)&&m.controlled&&"number"===u.type&&oe(u,"number",u.value)),m=r?oo(r):window,e){case"focusin":(Wn(m)||"true"===m.contentEditable)&&(br=m,wr=r,_r=null);break;case"focusout":_r=wr=br=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,Er(a,n,o);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":Er(a,n,o)}var y;if(zn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Yn?Vn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Fn&&"ko"!==n.locale&&(Yn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Yn&&(y=rn()):(tn="value"in(en=o)?en.value:en.textContent,Yn=!0)),0<(m=zr(r,b)).length&&(b=new En(b,e,null,n,o),a.push({event:b,listeners:m}),y?b.data=y:null!==(y=Hn(n))&&(b.data=y))),(y=Bn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:($n=!0,Un);case"textInput":return(e=t.data)===Un&&$n?null:e;default:return null}}(e,n):function(e,t){if(Yn)return"compositionend"===e||!zn&&Vn(e,t)?(e=rn(),nn=tn=en=null,Yn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Fn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=zr(r,"onBeforeInput")).length&&(o=new En("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}jr(a,t)}))}function Ir(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Fe(e,n))&&r.unshift(Ir(e,i,o)),null!=(i=Fe(e,t))&&r.push(Ir(e,i,o))),e=e.return}return r}function Rr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Br(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var u=n,l=u.alternate,c=u.stateNode;if(null!==l&&l===r)break;5===u.tag&&null!==c&&(u=c,o?null!=(l=Fe(n,i))&&a.unshift(Ir(n,l,u)):o||null!=(l=Fe(n,i))&&a.push(Ir(n,l,u))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Fr(){}var Ur=null,$r=null;function Vr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Yr="function"===typeof setTimeout?setTimeout:void 0,Xr="function"===typeof clearTimeout?clearTimeout:void 0;function Wr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function qr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Kr=0;var Qr=Math.random().toString(36).slice(2),Zr="__reactFiber$"+Qr,Jr="__reactProps$"+Qr,eo="__reactContainer$"+Qr,to="__reactEvents$"+Qr;function no(e){var t=e[Zr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Zr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=qr(e);null!==e;){if(n=e[Zr])return n;e=qr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Zr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Jr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var uo=[],lo=-1;function co(e){return{current:e}}function so(e){0>lo||(e.current=uo[lo],uo[lo]=null,lo--)}function fo(e,t){lo++,uo[lo]=e.current,e.current=t}var po={},ho=co(po),vo=co(!1),go=po;function mo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bo(){so(vo),so(ho)}function wo(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(vo,n)}function _o(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,W(t)||"Unknown",i));return o({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,go=ho.current,fo(ho,e),fo(vo,vo.current),!0}function Eo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=_o(e,t,go),r.__reactInternalMemoizedMergedChildContext=e,so(vo),so(ho),fo(ho,e)):so(vo),fo(vo,n)}var So=null,ko=null,Oo=i.unstable_runWithPriority,Co=i.unstable_scheduleCallback,No=i.unstable_cancelCallback,jo=i.unstable_shouldYield,Po=i.unstable_requestPaint,Mo=i.unstable_now,To=i.unstable_getCurrentPriorityLevel,Do=i.unstable_ImmediatePriority,Lo=i.unstable_UserBlockingPriority,Ao=i.unstable_NormalPriority,Io=i.unstable_LowPriority,zo=i.unstable_IdlePriority,Ro={},Bo=void 0!==Po?Po:function(){},Fo=null,Uo=null,$o=!1,Vo=Mo(),Ho=1e4>Vo?Mo:function(){return Mo()-Vo};function Yo(){switch(To()){case Do:return 99;case Lo:return 98;case Ao:return 97;case Io:return 96;case zo:return 95;default:throw Error(a(332))}}function Xo(e){switch(e){case 99:return Do;case 98:return Lo;case 97:return Ao;case 96:return Io;case 95:return zo;default:throw Error(a(332))}}function Wo(e,t){return e=Xo(e),Oo(e,t)}function Go(e,t,n){return e=Xo(e),Co(e,t,n)}function qo(){if(null!==Uo){var e=Uo;Uo=null,No(e)}Ko()}function Ko(){if(!$o&&null!==Fo){$o=!0;var e=0;try{var t=Fo;Wo(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Fo=null}catch(n){throw null!==Fo&&(Fo=Fo.slice(e+1)),Co(Do,qo),n}finally{$o=!1}}}var Qo=_.ReactCurrentBatchConfig;function Zo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Jo=co(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Jo.current;so(Jo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(za=!0),e.firstContext=null)}function ui(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var li=!1;function ci(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function si(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function di(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;li=!1;var a=i.firstBaseUpdate,u=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,s=c.next;c.next=null,null===u?a=s:u.next=s,u=c;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==u&&(null===d?f.firstBaseUpdate=s:d.next=s,f.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,u=0,f=s=c=null;;){l=a.lane;var p=a.eventTime;if((r&l)===l){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(l=t,p=n,v.tag){case 1:if("function"===typeof(h=v.payload)){d=h.call(p,d,l);break e}d=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(l="function"===typeof(h=v.payload)?h.call(p,d,l):h)||void 0===l)break e;d=o({},d,l);break e;case 2:li=!0}}null!==a.callback&&(e.flags|=32,null===(l=i.effects)?i.effects=[a]:l.push(a))}else p={eventTime:p,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(s=f=p,c=d):f=f.next=p,u|=l;if(null===(a=a.next)){if(null===(l=i.shared.pending))break;a=l.next,l.next=null,i.lastBaseUpdate=l,i.shared.pending=null}}null===f&&(c=d),i.baseState=c,i.firstBaseUpdate=s,i.lastBaseUpdate=f,Uu|=u,e.lanes=u,e.memoizedState=d}}function vi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var gi=(new r.Component).refs;function mi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yi={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=dl(),o=pl(e),i=fi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hl(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=dl(),o=pl(e),i=fi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hl(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=dl(),r=pl(e),o=fi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),di(e,o),hl(e,r,n)}};function bi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(o,i))}function wi(e,t,n){var r=!1,o=po,i=t.contextType;return"object"===typeof i&&null!==i?i=ui(i):(o=yo(t)?go:ho.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?mo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function _i(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=gi,ci(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=ui(i):(i=yo(t)?go:ho.current,o.context=mo(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(mi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&yi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var Ei=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===gi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ki(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Oi(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Xl(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function u(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Kl(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=Wl(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function s(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ql(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Gl(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Kl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Wl(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case E:return(t=Ql(t,e.mode,n)).return=e,t}if(Ei(t)||$(t))return(t=Gl(t,e.mode,n,null)).return=e,t;ki(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===S?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case E:return n.key===o?s(e,t,n,r):null}if(Ei(n)||$(n))return null!==o?null:f(e,t,n,r,null);ki(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===S?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case E:return s(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Ei(r)||$(r))return f(t,e=e.get(n)||null,r,o,null);ki(t,r)}return null}function v(o,a,u,l){for(var c=null,s=null,f=a,v=a=0,g=null;null!==f&&v<u.length;v++){f.index>v?(g=f,f=null):g=f.sibling;var m=p(o,f,u[v],l);if(null===m){null===f&&(f=g);break}e&&f&&null===m.alternate&&t(o,f),a=i(m,a,v),null===s?c=m:s.sibling=m,s=m,f=g}if(v===u.length)return n(o,f),c;if(null===f){for(;v<u.length;v++)null!==(f=d(o,u[v],l))&&(a=i(f,a,v),null===s?c=f:s.sibling=f,s=f);return c}for(f=r(o,f);v<u.length;v++)null!==(g=h(f,o,v,u[v],l))&&(e&&null!==g.alternate&&f.delete(null===g.key?v:g.key),a=i(g,a,v),null===s?c=g:s.sibling=g,s=g);return e&&f.forEach((function(e){return t(o,e)})),c}function g(o,u,l,c){var s=$(l);if("function"!==typeof s)throw Error(a(150));if(null==(l=s.call(l)))throw Error(a(151));for(var f=s=null,v=u,g=u=0,m=null,y=l.next();null!==v&&!y.done;g++,y=l.next()){v.index>g?(m=v,v=null):m=v.sibling;var b=p(o,v,y.value,c);if(null===b){null===v&&(v=m);break}e&&v&&null===b.alternate&&t(o,v),u=i(b,u,g),null===f?s=b:f.sibling=b,f=b,v=m}if(y.done)return n(o,v),s;if(null===v){for(;!y.done;g++,y=l.next())null!==(y=d(o,y.value,c))&&(u=i(y,u,g),null===f?s=y:f.sibling=y,f=y);return s}for(v=r(o,v);!y.done;g++,y=l.next())null!==(y=h(v,o,g,y.value,c))&&(e&&null!==y.alternate&&v.delete(null===y.key?g:y.key),u=i(y,u,g),null===f?s=y:f.sibling=y,f=y);return e&&v.forEach((function(e){return t(o,e)})),s}return function(e,r,i,l){var c="object"===typeof i&&null!==i&&i.type===S&&null===i.key;c&&(i=i.props.children);var s="object"===typeof i&&null!==i;if(s)switch(i.$$typeof){case x:e:{for(s=i.key,c=r;null!==c;){if(c.key===s){if(7===c.tag){if(i.type===S){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Si(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===S?((r=Gl(i.props.children,e.mode,l,i.key)).return=e,e=r):((l=Wl(i.type,i.key,i.props,null,e.mode,l)).ref=Si(e,r,i),l.return=e,e=l)}return u(e);case E:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ql(i,e.mode,l)).return=e,e=r}return u(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Kl(i,e.mode,l)).return=e,e=r),u(e);if(Ei(i))return v(e,r,i,l);if($(i))return g(e,r,i,l);if(s&&ki(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,W(e.type)||"Component"))}return n(e,r)}}var Ci=Oi(!0),Ni=Oi(!1),ji={},Pi=co(ji),Mi=co(ji),Ti=co(ji);function Di(e){if(e===ji)throw Error(a(174));return e}function Li(e,t){switch(fo(Ti,t),fo(Mi,e),fo(Pi,ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}so(Pi),fo(Pi,t)}function Ai(){so(Pi),so(Mi),so(Ti)}function Ii(e){Di(Ti.current);var t=Di(Pi.current),n=he(t,e.type);t!==n&&(fo(Mi,e),fo(Pi,n))}function zi(e){Mi.current===e&&(so(Pi),so(Mi))}var Ri=co(0);function Bi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fi=null,Ui=null,$i=!1;function Vi(e,t){var n=Hl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Hi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Yi(e){if($i){var t=Ui;if(t){var n=t;if(!Hi(e,t)){if(!(t=Gr(n.nextSibling))||!Hi(e,t))return e.flags=-1025&e.flags|2,$i=!1,void(Fi=e);Vi(Fi,n)}Fi=e,Ui=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,$i=!1,Fi=e}}function Xi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Fi=e}function Wi(e){if(e!==Fi)return!1;if(!$i)return Xi(e),$i=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Ui;t;)Vi(e,t),t=Gr(t.nextSibling);if(Xi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ui=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ui=null}}else Ui=Fi?Gr(e.stateNode.nextSibling):null;return!0}function Gi(){Ui=Fi=null,$i=!1}var qi=[];function Ki(){for(var e=0;e<qi.length;e++)qi[e]._workInProgressVersionPrimary=null;qi.length=0}var Qi=_.ReactCurrentDispatcher,Zi=_.ReactCurrentBatchConfig,Ji=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ua(e,t,n,r,o,i){if(Ji=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qi.current=null===e||null===e.memoizedState?Da:La,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Qi.current=Aa,e=n(r,o)}while(oa)}if(Qi.current=Ta,t=null!==ta&&null!==ta.next,Ji=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ca(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function sa(e,t){return"function"===typeof t?t(e):t}function fa(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var u=o.next;o.next=i.next,i.next=u}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var l=u=i=null,c=o;do{var s=c.lane;if((Ji&s)===s)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:s,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(u=l=f,i=r):l=l.next=f,ea.lanes|=s,Uu|=s}c=c.next}while(null!==c&&c!==o);null===l?i=r:l.next=u,sr(r,t.memoizedState)||(za=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var u=o=o.next;do{i=e(i,u.action),u=u.next}while(u!==o);sr(i,t.memoizedState)||(za=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Ji&e)===e)&&(t._workInProgressVersionPrimary=r,qi.push(t))),e)return n(t._source);throw qi.push(t),Error(a(350))}function ha(e,t,n,r){var o=Du;if(null===o)throw Error(a(349));var i=t._getVersion,u=i(t._source),l=Qi.current,c=l.useState((function(){return pa(o,t,n)})),s=c[1],f=c[0];c=na;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,v=d.source;d=d.subscribe;var g=ea;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=s;var e=i(t._source);if(!sr(u,e)){e=n(t._source),sr(f,e)||(s(e),e=pl(g),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var l=31-Ht(a),c=1<<l;r[l]|=e,a&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pl(g);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),sr(h,n)&&sr(v,t)&&sr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:f}).dispatch=s=Ma.bind(null,ea,e),c.queue=e,c.baseQueue=null,f=pa(o,t,n),c.memoizedState=c.baseState=f),f}function va(e,t,n){return ha(ca(),e,t,n)}function ga(e){var t=la();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e}).dispatch=Ma.bind(null,ea,e),[t.memoizedState,e]}function ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ya(e){return e={current:e},la().memoizedState=e}function ba(){return ca().memoizedState}function wa(e,t,n,r){var o=la();ea.flags|=e,o.memoizedState=ma(1|t,n,void 0,void 0===r?null:r)}function _a(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ma(t,n,i,r)}ea.flags|=e,o.memoizedState=ma(1|t,n,i,r)}function xa(e,t){return wa(516,4,e,t)}function Ea(e,t){return _a(516,4,e,t)}function Sa(e,t){return _a(4,2,e,t)}function ka(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Oa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,_a(4,2,ka.bind(null,t,e),n)}function Ca(){}function Na(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ja(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Pa(e,t){var n=Yo();Wo(98>n?98:n,(function(){e(!0)})),Wo(97<n?97:n,(function(){var n=Zi.transition;Zi.transition=1;try{e(!1),t()}finally{Zi.transition=n}}))}function Ma(e,t,n){var r=dl(),o=pl(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var u=t.lastRenderedState,l=a(u,n);if(i.eagerReducer=a,i.eagerState=l,sr(l,u))return}catch(c){}hl(e,o,r)}}var Ta={readContext:ui,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Da={readContext:ui,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:ui,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,ka.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wa(4,2,e,t)},useMemo:function(e,t){var n=la();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=la();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ma.bind(null,ea,e),[r.memoizedState,e]},useRef:ya,useState:ga,useDebugValue:Ca,useDeferredValue:function(e){var t=ga(e),n=t[0],r=t[1];return xa((function(){var t=Zi.transition;Zi.transition=1;try{r(e)}finally{Zi.transition=t}}),[e]),n},useTransition:function(){var e=ga(!1),t=e[0];return ya(e=Pa.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=la();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if($i){var e=!1,t=function(e){return{$$typeof:A,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Kr++).toString(36))),Error(a(355))})),n=ga(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ma(5,(function(){n("r:"+(Kr++).toString(36))}),void 0,null)),t}return ga(t="r:"+(Kr++).toString(36)),t},unstable_isNewReconciler:!1},La={readContext:ui,useCallback:Na,useContext:ui,useEffect:Ea,useImperativeHandle:Oa,useLayoutEffect:Sa,useMemo:ja,useReducer:fa,useRef:ba,useState:function(){return fa(sa)},useDebugValue:Ca,useDeferredValue:function(e){var t=fa(sa),n=t[0],r=t[1];return Ea((function(){var t=Zi.transition;Zi.transition=1;try{r(e)}finally{Zi.transition=t}}),[e]),n},useTransition:function(){var e=fa(sa)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return fa(sa)[0]},unstable_isNewReconciler:!1},Aa={readContext:ui,useCallback:Na,useContext:ui,useEffect:Ea,useImperativeHandle:Oa,useLayoutEffect:Sa,useMemo:ja,useReducer:da,useRef:ba,useState:function(){return da(sa)},useDebugValue:Ca,useDeferredValue:function(e){var t=da(sa),n=t[0],r=t[1];return Ea((function(){var t=Zi.transition;Zi.transition=1;try{r(e)}finally{Zi.transition=t}}),[e]),n},useTransition:function(){var e=da(sa)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return da(sa)[0]},unstable_isNewReconciler:!1},Ia=_.ReactCurrentOwner,za=!1;function Ra(e,t,n,r){t.child=null===e?Ni(t,null,n,r):Ci(t,e.child,n,r)}function Ba(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=ua(e,t,n,r,i,o),null===e||za?(t.flags|=1,Ra(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,iu(e,t,o))}function Fa(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||Yl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Wl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(o,r)&&e.ref===t.ref)?iu(e,t,i):(t.flags|=1,(e=Xl(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,o,i){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(za=!1,0===(i&o))return t.lanes=e.lanes,iu(e,t,i);0!==(16384&e.flags)&&(za=!0)}return Ha(e,t,n,r,i)}function $a(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},xl(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},xl(t,e),null;t.memoizedState={baseLanes:0},xl(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,xl(t,r);return Ra(e,t,o,n),t.child}function Va(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ha(e,t,n,r,o){var i=yo(n)?go:ho.current;return i=mo(t,i),ai(t,o),n=ua(e,t,n,r,i,o),null===e||za?(t.flags|=1,Ra(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,iu(e,t,o))}function Ya(e,t,n,r,o){if(yo(n)){var i=!0;xo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),wi(t,n,r),xi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ui(c):c=mo(t,c=yo(n)?go:ho.current);var s=n.getDerivedStateFromProps,f="function"===typeof s||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(u!==r||l!==c)&&_i(t,a,r,c),li=!1;var d=t.memoizedState;a.state=d,hi(t,r,a,o),l=t.memoizedState,u!==r||d!==l||vo.current||li?("function"===typeof s&&(mi(t,n,s,r),l=t.memoizedState),(u=li||bi(t,n,u,r,d,l,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=u):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,si(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:Zo(t.type,u),a.props=c,f=t.pendingProps,d=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=ui(l):l=mo(t,l=yo(n)?go:ho.current);var p=n.getDerivedStateFromProps;(s="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(u!==f||d!==l)&&_i(t,a,r,l),li=!1,d=t.memoizedState,a.state=d,hi(t,r,a,o);var h=t.memoizedState;u!==f||d!==h||vo.current||li?("function"===typeof p&&(mi(t,n,p,r),h=t.memoizedState),(c=li||bi(t,n,c,r,d,h,l))?(s||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Xa(e,t,n,r,i,o)}function Xa(e,t,n,r,o,i){Va(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&Eo(t,n,!1),iu(e,t,i);r=t.stateNode,Ia.current=t;var u=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ci(t,e.child,null,i),t.child=Ci(t,null,u,i)):Ra(e,t,u,i),t.memoizedState=r.state,o&&Eo(t,n,!0),t.child}function Wa(e){var t=e.stateNode;t.pendingContext?wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wo(0,t.context,!1),Li(e,t.containerInfo)}var Ga,qa,Ka,Qa={dehydrated:null,retryLane:0};function Za(e,t,n){var r,o=t.pendingProps,i=Ri.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),fo(Ri,1&i),null===e?(void 0!==o.fallback&&Yi(t),e=o.children,i=o.fallback,a?(e=Ja(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,e):"number"===typeof o.unstable_expectedLoadTime?(e=Ja(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,t.lanes=33554432,e):((n=ql({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=tu(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Qa,o):(n=eu(e,t,o.children,n),t.memoizedState=null,n))}function Ja(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=ql(t,o,0,null),n=Gl(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function eu(e,t,n,r){var o=e.child;return e=o.sibling,n=Xl(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function tu(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var u={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=u,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Xl(a,u),null!==e?r=Xl(e,r):(r=Gl(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function nu(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function ru(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function ou(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ra(e,t,r.children,n),0!==(2&(r=Ri.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nu(e,n);else if(19===e.tag)nu(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Ri,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Bi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ru(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Bi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ru(t,!0,n,null,i,t.lastEffect);break;case"together":ru(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function iu(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Uu|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Xl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Xl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function au(e,t){if(!$i)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function uu(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return yo(t.type)&&bo(),null;case 3:return Ai(),so(vo),so(ho),Ki(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Wi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:zi(t);var i=Di(Ti.current);if(n=t.type,null!==e&&null!=t.stateNode)qa(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Di(Pi.current),Wi(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[Zr]=t,r[Jr]=u,n){case"dialog":Pr("cancel",r),Pr("close",r);break;case"iframe":case"object":case"embed":Pr("load",r);break;case"video":case"audio":for(e=0;e<Or.length;e++)Pr(Or[e],r);break;case"source":Pr("error",r);break;case"img":case"image":case"link":Pr("error",r),Pr("load",r);break;case"details":Pr("toggle",r);break;case"input":ee(r,u),Pr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Pr("invalid",r);break;case"textarea":le(r,u),Pr("invalid",r)}for(var c in Se(n,u),e=null,u)u.hasOwnProperty(c)&&(i=u[c],"children"===c?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):l.hasOwnProperty(c)&&null!=i&&"onScroll"===c&&Pr("scroll",r));switch(n){case"input":K(r),re(r,u,!0);break;case"textarea":K(r),se(r);break;case"select":case"option":break;default:"function"===typeof u.onClick&&(r.onclick=Fr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===i.nodeType?i:i.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Zr]=t,e[Jr]=r,Ga(e,t),t.stateNode=e,c=ke(n,r),n){case"dialog":Pr("cancel",e),Pr("close",e),i=r;break;case"iframe":case"object":case"embed":Pr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Or.length;i++)Pr(Or[i],e);i=r;break;case"source":Pr("error",e),i=r;break;case"img":case"image":case"link":Pr("error",e),Pr("load",e),i=r;break;case"details":Pr("toggle",e),i=r;break;case"input":ee(e,r),i=J(e,r),Pr("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Pr("invalid",e);break;case"textarea":le(e,r),i=ue(e,r),Pr("invalid",e);break;default:i=r}Se(n,i);var s=i;for(u in s)if(s.hasOwnProperty(u)){var f=s[u];"style"===u?xe(e,f):"dangerouslySetInnerHTML"===u?null!=(f=f?f.__html:void 0)&&me(e,f):"children"===u?"string"===typeof f?("textarea"!==n||""!==f)&&ye(e,f):"number"===typeof f&&ye(e,""+f):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(l.hasOwnProperty(u)?null!=f&&"onScroll"===u&&Pr("scroll",e):null!=f&&w(e,u,f,c))}switch(n){case"input":K(e),re(e,r,!1);break;case"textarea":K(e),se(e);break;case"option":null!=r.value&&e.setAttribute("value",""+G(r.value));break;case"select":e.multiple=!!r.multiple,null!=(u=r.value)?ae(e,!!r.multiple,u,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Fr)}Vr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ka(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Di(Ti.current),Di(Pi.current),Wi(t)?(r=t.stateNode,n=t.memoizedProps,r[Zr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Zr]=t,t.stateNode=r)}return null;case 13:return so(Ri),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Wi(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Ri.current)?0===Ru&&(Ru=3):(0!==Ru&&3!==Ru||(Ru=4),null===Du||0===(134217727&Uu)&&0===(134217727&$u)||yl(Du,Au))),(r||n)&&(t.flags|=4),null);case 4:return Ai(),null===e&&Tr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(so(Ri),null===(r=t.memoizedState))return null;if(u=0!==(64&t.flags),null===(c=r.rendering))if(u)au(r,!1);else{if(0!==Ru||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Bi(e))){for(t.flags|=64,au(r,!1),null!==(u=c.updateQueue)&&(t.updateQueue=u,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(u=n).flags&=2,u.nextEffect=null,u.firstEffect=null,u.lastEffect=null,null===(c=u.alternate)?(u.childLanes=0,u.lanes=e,u.child=null,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=c.childLanes,u.lanes=c.lanes,u.child=c.child,u.memoizedProps=c.memoizedProps,u.memoizedState=c.memoizedState,u.updateQueue=c.updateQueue,u.type=c.type,e=c.dependencies,u.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fo(Ri,1&Ri.current|2),t.child}e=e.sibling}null!==r.tail&&Ho()>Xu&&(t.flags|=64,u=!0,au(r,!1),t.lanes=33554432)}else{if(!u)if(null!==(e=Bi(c))){if(t.flags|=64,u=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),au(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!$i)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ho()-r.renderingStartTime>Xu&&1073741824!==n&&(t.flags|=64,u=!0,au(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ho(),n.sibling=null,t=Ri.current,fo(Ri,u?1&t|2:1&t),n):null;case 23:case 24:return El(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function lu(e){switch(e.tag){case 1:yo(e.type)&&bo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ai(),so(vo),so(ho),Ki(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return zi(e),null;case 13:return so(Ri),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return so(Ri),null;case 4:return Ai(),null;case 10:return oi(e),null;case 23:case 24:return El(),null;default:return null}}function cu(e,t){try{var n="",r=t;do{n+=X(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function su(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},qa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Di(Pi.current);var a,u=null;switch(n){case"input":i=J(e,i),r=J(e,r),u=[];break;case"option":i=ie(e,i),r=ie(e,r),u=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),u=[];break;case"textarea":i=ue(e,i),r=ue(e,r),u=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Fr)}for(f in Se(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var c=i[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(l.hasOwnProperty(f)?u||(u=[]):(u=u||[]).push(f,null));for(f in r){var s=r[f];if(c=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&s!==c&&(null!=s||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&c[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(u||(u=[]),u.push(f,n)),n=s;else"dangerouslySetInnerHTML"===f?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(u=u||[]).push(f,s)):"children"===f?"string"!==typeof s&&"number"!==typeof s||(u=u||[]).push(f,""+s):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(l.hasOwnProperty(f)?(null!=s&&"onScroll"===f&&Pr("scroll",e),u||c===s||(u=[])):"object"===typeof s&&null!==s&&s.$$typeof===A?s.toString():(u=u||[]).push(f,s))}n&&(u=u||[]).push("style",n);var f=u;(t.updateQueue=f)&&(t.flags|=4)}},Ka=function(e,t,n,r){n!==r&&(t.flags|=4)};var fu="function"===typeof WeakMap?WeakMap:Map;function du(e,t,n){(n=fi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ku||(Ku=!0,Qu=r),su(0,t)},n}function pu(e,t,n){(n=fi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return su(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Zu?Zu=new Set([this]):Zu.add(this),su(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hu="function"===typeof WeakSet?WeakSet:Set;function vu(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Fl(e,n)}else t.current=null}function gu(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Zo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Wr(t.stateNode.containerInfo))}throw Error(a(163))}function mu(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(zl(n,e),Il(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Zo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&vi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}vi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Vr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function yu(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=_e("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bu(e,t){if(ko&&"function"===typeof ko.onCommitFiberUnmount)try{ko.onCommitFiberUnmount(So,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))zl(t,n);else{r=t;try{o()}catch(i){Fl(r,i)}}n=n.next}while(n!==e)}break;case 1:if(vu(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Fl(t,i)}break;case 5:vu(t);break;case 4:ku(e,t)}}function wu(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function _u(e){return 5===e.tag||3===e.tag||4===e.tag}function xu(e){e:{for(var t=e.return;null!==t;){if(_u(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||_u(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Eu(e,n,t):Su(e,n,t)}function Eu(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Fr));else if(4!==r&&null!==(e=e.child))for(Eu(e,t,n),e=e.sibling;null!==e;)Eu(e,t,n),e=e.sibling}function Su(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Su(e,t,n),e=e.sibling;null!==e;)Su(e,t,n),e=e.sibling}function ku(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var u=e,l=o,c=l;;)if(bu(u,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(u=n,l=o.stateNode,8===u.nodeType?u.parentNode.removeChild(l):u.removeChild(l)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bu(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Ou(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Jr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),ke(e,o),t=ke(e,r),o=0;o<i.length;o+=2){var u=i[o],l=i[o+1];"style"===u?xe(n,l):"dangerouslySetInnerHTML"===u?me(n,l):"children"===u?ye(n,l):w(n,u,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Yu=Ho(),yu(t.child,!0)),void Cu(t);case 19:return void Cu(t);case 23:case 24:return void yu(t,null!==t.memoizedState)}throw Error(a(163))}function Cu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hu),t.forEach((function(t){var r=$l.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Nu(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var ju=Math.ceil,Pu=_.ReactCurrentDispatcher,Mu=_.ReactCurrentOwner,Tu=0,Du=null,Lu=null,Au=0,Iu=0,zu=co(0),Ru=0,Bu=null,Fu=0,Uu=0,$u=0,Vu=0,Hu=null,Yu=0,Xu=1/0;function Wu(){Xu=Ho()+500}var Gu,qu=null,Ku=!1,Qu=null,Zu=null,Ju=!1,el=null,tl=90,nl=[],rl=[],ol=null,il=0,al=null,ul=-1,ll=0,cl=0,sl=null,fl=!1;function dl(){return 0!==(48&Tu)?Ho():-1!==ul?ul:ul=Ho()}function pl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Yo()?1:2;if(0===ll&&(ll=Fu),0!==Qo.transition){0!==cl&&(cl=null!==Hu?Hu.pendingLanes:0),e=ll;var t=4186112&~cl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Yo(),0!==(4&Tu)&&98===e?e=Ft(12,ll):e=Ft(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ll),e}function hl(e,t,n){if(50<il)throw il=0,al=null,Error(a(185));if(null===(e=vl(e,t)))return null;Vt(e,t,n),e===Du&&($u|=t,4===Ru&&yl(e,Au));var r=Yo();1===t?0!==(8&Tu)&&0===(48&Tu)?bl(e):(gl(e,n),0===Tu&&(Wu(),qo())):(0===(4&Tu)||98!==r&&99!==r||(null===ol?ol=new Set([e]):ol.add(e)),gl(e,n)),Hu=e}function vl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function gl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes;0<u;){var l=31-Ht(u),c=1<<l,s=i[l];if(-1===s){if(0===(c&r)||0!==(c&o)){s=t,zt(c);var f=It;i[l]=10<=f?s+250:6<=f?s+5e3:-1}}else s<=t&&(e.expiredLanes|=c);u&=~c}if(r=Rt(e,e===Du?Au:0),t=It,0===r)null!==n&&(n!==Ro&&No(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Ro&&No(n)}15===t?(n=bl.bind(null,e),null===Fo?(Fo=[n],Uo=Co(Do,Ko)):Fo.push(n),n=Ro):14===t?n=Go(99,bl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Go(n,ml.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function ml(e){if(ul=-1,cl=ll=0,0!==(48&Tu))throw Error(a(327));var t=e.callbackNode;if(Al()&&e.callbackNode!==t)return null;var n=Rt(e,e===Du?Au:0);if(0===n)return null;var r=n,o=Tu;Tu|=16;var i=Ol();for(Du===e&&Au===r||(Wu(),Sl(e,r));;)try{jl();break}catch(l){kl(e,l)}if(ri(),Pu.current=i,Tu=o,null!==Lu?r=0:(Du=null,Au=0,r=Ru),0!==(Fu&$u))Sl(e,0);else if(0!==r){if(2===r&&(Tu|=64,e.hydrate&&(e.hydrate=!1,Wr(e.containerInfo)),0!==(n=Bt(e))&&(r=Cl(e,n))),1===r)throw t=Bu,Sl(e,0),yl(e,n),gl(e,Ho()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Tl(e);break;case 3:if(yl(e,n),(62914560&n)===n&&10<(r=Yu+500-Ho())){if(0!==Rt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){dl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Yr(Tl.bind(null,e),r);break}Tl(e);break;case 4:if(yl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var u=31-Ht(n);i=1<<u,(u=r[u])>o&&(o=u),n&=~i}if(n=o,10<(n=(120>(n=Ho()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ju(n/1960))-n)){e.timeoutHandle=Yr(Tl.bind(null,e),n);break}Tl(e);break;default:throw Error(a(329))}}return gl(e,Ho()),e.callbackNode===t?ml.bind(null,e):null}function yl(e,t){for(t&=~Vu,t&=~$u,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function bl(e){if(0!==(48&Tu))throw Error(a(327));if(Al(),e===Du&&0!==(e.expiredLanes&Au)){var t=Au,n=Cl(e,t);0!==(Fu&$u)&&(n=Cl(e,t=Rt(e,t)))}else n=Cl(e,t=Rt(e,0));if(0!==e.tag&&2===n&&(Tu|=64,e.hydrate&&(e.hydrate=!1,Wr(e.containerInfo)),0!==(t=Bt(e))&&(n=Cl(e,t))),1===n)throw n=Bu,Sl(e,0),yl(e,t),gl(e,Ho()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tl(e),gl(e,Ho()),null}function wl(e,t){var n=Tu;Tu|=1;try{return e(t)}finally{0===(Tu=n)&&(Wu(),qo())}}function _l(e,t){var n=Tu;Tu&=-2,Tu|=8;try{return e(t)}finally{0===(Tu=n)&&(Wu(),qo())}}function xl(e,t){fo(zu,Iu),Iu|=t,Fu|=t}function El(){Iu=zu.current,so(zu)}function Sl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Xr(n)),null!==Lu)for(n=Lu.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bo();break;case 3:Ai(),so(vo),so(ho),Ki();break;case 5:zi(r);break;case 4:Ai();break;case 13:case 19:so(Ri);break;case 10:oi(r);break;case 23:case 24:El()}n=n.return}Du=e,Lu=Xl(e.current,null),Au=Iu=Fu=t,Ru=0,Bu=null,Vu=$u=Uu=0}function kl(e,t){for(;;){var n=Lu;try{if(ri(),Qi.current=Ta,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Ji=0,na=ta=ea=null,oa=!1,Mu.current=null,null===n||null===n.return){Ru=1,Bu=t,Lu=null;break}e:{var i=e,a=n.return,u=n,l=t;if(t=Au,u.flags|=2048,u.firstEffect=u.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l;if(0===(2&u.mode)){var s=u.alternate;s?(u.updateQueue=s.updateQueue,u.memoizedState=s.memoizedState,u.lanes=s.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=0!==(1&Ri.current),d=a;do{var p;if(p=13===d.tag){var h=d.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var v=d.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var g=d.updateQueue;if(null===g){var m=new Set;m.add(c),d.updateQueue=m}else g.add(c);if(0===(2&d.mode)){if(d.flags|=64,u.flags|=16384,u.flags&=-2981,1===u.tag)if(null===u.alternate)u.tag=17;else{var y=fi(-1,1);y.tag=2,di(u,y)}u.lanes|=1;break e}l=void 0,u=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new fu,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(u)){l.add(u);var w=Ul.bind(null,i,c,u);c.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);l=Error((W(u.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ru&&(Ru=2),l=cu(l,u),d=a;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t,pi(d,du(0,i,t));break e;case 1:i=l;var _=d.type,x=d.stateNode;if(0===(64&d.flags)&&("function"===typeof _.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Zu||!Zu.has(x)))){d.flags|=4096,t&=-t,d.lanes|=t,pi(d,pu(d,i,t));break e}}d=d.return}while(null!==d)}Ml(n)}catch(E){t=E,Lu===n&&null!==n&&(Lu=n=n.return);continue}break}}function Ol(){var e=Pu.current;return Pu.current=Ta,null===e?Ta:e}function Cl(e,t){var n=Tu;Tu|=16;var r=Ol();for(Du===e&&Au===t||Sl(e,t);;)try{Nl();break}catch(o){kl(e,o)}if(ri(),Tu=n,Pu.current=r,null!==Lu)throw Error(a(261));return Du=null,Au=0,Ru}function Nl(){for(;null!==Lu;)Pl(Lu)}function jl(){for(;null!==Lu&&!jo();)Pl(Lu)}function Pl(e){var t=Gu(e.alternate,e,Iu);e.memoizedProps=e.pendingProps,null===t?Ml(e):Lu=t,Mu.current=null}function Ml(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=uu(n,t,Iu)))return void(Lu=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Iu)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=lu(t)))return n.flags&=2047,void(Lu=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Lu=t);Lu=t=e}while(null!==t);0===Ru&&(Ru=5)}function Tl(e){var t=Yo();return Wo(99,Dl.bind(null,e,t)),null}function Dl(e,t){do{Al()}while(null!==el);if(0!==(48&Tu))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var u=e.eventTimes,l=e.expirationTimes;0<i;){var c=31-Ht(i),s=1<<c;o[c]=0,u[c]=-1,l[c]=-1,i&=~s}if(null!==ol&&0===(24&r)&&ol.has(e)&&ol.delete(e),e===Du&&(Lu=Du=null,Au=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Tu,Tu|=32,Mu.current=null,Ur=qt,mr(u=gr())){if("selectionStart"in u)l={start:u.selectionStart,end:u.selectionEnd};else e:if(l=(l=u.ownerDocument)&&l.defaultView||window,(s=l.getSelection&&l.getSelection())&&0!==s.rangeCount){l=s.anchorNode,i=s.anchorOffset,c=s.focusNode,s=s.focusOffset;try{l.nodeType,c.nodeType}catch(O){l=null;break e}var f=0,d=-1,p=-1,h=0,v=0,g=u,m=null;t:for(;;){for(var y;g!==l||0!==i&&3!==g.nodeType||(d=f+i),g!==c||0!==s&&3!==g.nodeType||(p=f+s),3===g.nodeType&&(f+=g.nodeValue.length),null!==(y=g.firstChild);)m=g,g=y;for(;;){if(g===u)break t;if(m===l&&++h===i&&(d=f),m===c&&++v===s&&(p=f),null!==(y=g.nextSibling))break;m=(g=m).parentNode}g=y}l=-1===d||-1===p?null:{start:d,end:p}}else l=null;l=l||{start:0,end:0}}else l=null;$r={focusedElem:u,selectionRange:l},qt=!1,sl=null,fl=!1,qu=r;do{try{Ll()}catch(O){if(null===qu)throw Error(a(330));Fl(qu,O),qu=qu.nextEffect}}while(null!==qu);sl=null,qu=r;do{try{for(u=e;null!==qu;){var b=qu.flags;if(16&b&&ye(qu.stateNode,""),128&b){var w=qu.alternate;if(null!==w){var _=w.ref;null!==_&&("function"===typeof _?_(null):_.current=null)}}switch(1038&b){case 2:xu(qu),qu.flags&=-3;break;case 6:xu(qu),qu.flags&=-3,Ou(qu.alternate,qu);break;case 1024:qu.flags&=-1025;break;case 1028:qu.flags&=-1025,Ou(qu.alternate,qu);break;case 4:Ou(qu.alternate,qu);break;case 8:ku(u,l=qu);var x=l.alternate;wu(l),null!==x&&wu(x)}qu=qu.nextEffect}}catch(O){if(null===qu)throw Error(a(330));Fl(qu,O),qu=qu.nextEffect}}while(null!==qu);if(_=$r,w=gr(),b=_.focusedElem,u=_.selectionRange,w!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==u&&mr(b)&&(w=u.start,void 0===(_=u.end)&&(_=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(_,b.value.length)):(_=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(_=_.getSelection(),l=b.textContent.length,x=Math.min(u.start,l),u=void 0===u.end?x:Math.min(u.end,l),!_.extend&&x>u&&(l=u,u=x,x=l),l=hr(b,x),i=hr(b,u),l&&i&&(1!==_.rangeCount||_.anchorNode!==l.node||_.anchorOffset!==l.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&((w=w.createRange()).setStart(l.node,l.offset),_.removeAllRanges(),x>u?(_.addRange(w),_.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),_.addRange(w))))),w=[];for(_=b;_=_.parentNode;)1===_.nodeType&&w.push({element:_,left:_.scrollLeft,top:_.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(_=w[b]).element.scrollLeft=_.left,_.element.scrollTop=_.top}qt=!!Ur,$r=Ur=null,e.current=n,qu=r;do{try{for(b=e;null!==qu;){var E=qu.flags;if(36&E&&mu(b,qu.alternate,qu),128&E){w=void 0;var S=qu.ref;if(null!==S){var k=qu.stateNode;qu.tag,w=k,"function"===typeof S?S(w):S.current=w}}qu=qu.nextEffect}}catch(O){if(null===qu)throw Error(a(330));Fl(qu,O),qu=qu.nextEffect}}while(null!==qu);qu=null,Bo(),Tu=o}else e.current=n;if(Ju)Ju=!1,el=e,tl=t;else for(qu=r;null!==qu;)t=qu.nextEffect,qu.nextEffect=null,8&qu.flags&&((E=qu).sibling=null,E.stateNode=null),qu=t;if(0===(r=e.pendingLanes)&&(Zu=null),1===r?e===al?il++:(il=0,al=e):il=0,n=n.stateNode,ko&&"function"===typeof ko.onCommitFiberRoot)try{ko.onCommitFiberRoot(So,n,void 0,64===(64&n.current.flags))}catch(O){}if(gl(e,Ho()),Ku)throw Ku=!1,e=Qu,Qu=null,e;return 0!==(8&Tu)||qo(),null}function Ll(){for(;null!==qu;){var e=qu.alternate;fl||null===sl||(0!==(8&qu.flags)?et(qu,sl)&&(fl=!0):13===qu.tag&&Nu(e,qu)&&et(qu,sl)&&(fl=!0));var t=qu.flags;0!==(256&t)&&gu(e,qu),0===(512&t)||Ju||(Ju=!0,Go(97,(function(){return Al(),null}))),qu=qu.nextEffect}}function Al(){if(90!==tl){var e=97<tl?97:tl;return tl=90,Wo(e,Rl)}return!1}function Il(e,t){nl.push(t,e),Ju||(Ju=!0,Go(97,(function(){return Al(),null})))}function zl(e,t){rl.push(t,e),Ju||(Ju=!0,Go(97,(function(){return Al(),null})))}function Rl(){if(null===el)return!1;var e=el;if(el=null,0!==(48&Tu))throw Error(a(331));var t=Tu;Tu|=32;var n=rl;rl=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],u=o.destroy;if(o.destroy=void 0,"function"===typeof u)try{u()}catch(c){if(null===i)throw Error(a(330));Fl(i,c)}}for(n=nl,nl=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var l=o.create;o.destroy=l()}catch(c){if(null===i)throw Error(a(330));Fl(i,c)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Tu=t,qo(),!0}function Bl(e,t,n){di(e,t=du(0,t=cu(n,t),1)),t=dl(),null!==(e=vl(e,1))&&(Vt(e,1,t),gl(e,t))}function Fl(e,t){if(3===e.tag)Bl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Bl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Zu||!Zu.has(r))){var o=pu(n,e=cu(t,e),1);if(di(n,o),o=dl(),null!==(n=vl(n,1)))Vt(n,1,o),gl(n,o);else if("function"===typeof r.componentDidCatch&&(null===Zu||!Zu.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function Ul(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=dl(),e.pingedLanes|=e.suspendedLanes&n,Du===e&&(Au&n)===n&&(4===Ru||3===Ru&&(62914560&Au)===Au&&500>Ho()-Yu?Sl(e,0):Vu|=n),gl(e,t)}function $l(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Yo()?1:2:(0===ll&&(ll=Fu),0===(t=Ut(62914560&~ll))&&(t=4194304))),n=dl(),null!==(e=vl(e,t))&&(Vt(e,t,n),gl(e,n))}function Vl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hl(e,t,n,r){return new Vl(e,t,n,r)}function Yl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Xl(e,t){var n=e.alternate;return null===n?((n=Hl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wl(e,t,n,r,o,i){var u=2;if(r=e,"function"===typeof e)Yl(e)&&(u=1);else if("string"===typeof e)u=5;else e:switch(e){case S:return Gl(n.children,o,i,t);case I:u=8,o|=16;break;case k:u=8,o|=1;break;case O:return(e=Hl(12,n,t,8|o)).elementType=O,e.type=O,e.lanes=i,e;case P:return(e=Hl(13,n,t,o)).type=P,e.elementType=P,e.lanes=i,e;case M:return(e=Hl(19,n,t,o)).elementType=M,e.lanes=i,e;case z:return ql(n,o,i,t);case R:return(e=Hl(24,n,t,o)).elementType=R,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:u=10;break e;case N:u=9;break e;case j:u=11;break e;case T:u=14;break e;case D:u=16,r=null;break e;case L:u=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Hl(u,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Gl(e,t,n,r){return(e=Hl(7,e,r,t)).lanes=n,e}function ql(e,t,n,r){return(e=Hl(23,e,r,t)).elementType=z,e.lanes=n,e}function Kl(e,t,n){return(e=Hl(6,e,null,t)).lanes=n,e}function Ql(e,t,n){return(t=Hl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=$t(0),this.expirationTimes=$t(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$t(0),this.mutableSourceEagerHydrationData=null}function Jl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ec(e,t,n,r){var o=t.current,i=dl(),u=pl(o);e:if(n){t:{if(Ke(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(yo(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(yo(c)){n=_o(n,c,l);break e}}n=l}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=fi(i,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),di(o,t),hl(o,u,i),u}function tc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rc(e,t){nc(e,t),(e=e.alternate)&&nc(e,t)}function oc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Zl(e,t,null!=n&&!0===n.hydrate),t=Hl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ci(t),e[eo]=n.current,Tr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ac(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var u=o;o=function(){var e=tc(a);u.call(e)}}ec(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new oc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var l=o;o=function(){var e=tc(a);l.call(e)}}_l((function(){ec(t,a,e,o)}))}return tc(a)}function uc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return Jl(e,t,null,n)}Gu=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||vo.current)za=!0;else{if(0===(n&r)){switch(za=!1,t.tag){case 3:Wa(t),Gi();break;case 5:Ii(t);break;case 1:yo(t.type)&&xo(t);break;case 4:Li(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fo(Jo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Za(e,t,n):(fo(Ri,1&Ri.current),null!==(t=iu(e,t,n))?t.sibling:null);fo(Ri,1&Ri.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return ou(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),fo(Ri,Ri.current),r)break;return null;case 23:case 24:return t.lanes=0,$a(e,t,n)}return iu(e,t,n)}za=0!==(16384&e.flags)}else za=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=mo(t,ho.current),ai(t,n),o=ua(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yo(r)){var i=!0;xo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ci(t);var u=r.getDerivedStateFromProps;"function"===typeof u&&mi(t,r,u,e),o.updater=yi,t.stateNode=o,o._reactInternals=t,xi(t,r,e,n),t=Xa(null,t,r,!0,i,n)}else t.tag=0,Ra(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return Yl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===j)return 11;if(e===T)return 14}return 2}(o),e=Zo(o,e),i){case 0:t=Ha(null,t,o,e,n);break e;case 1:t=Ya(null,t,o,e,n);break e;case 11:t=Ba(null,t,o,e,n);break e;case 14:t=Fa(null,t,o,Zo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ha(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ya(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 3:if(Wa(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,si(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Gi(),t=iu(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Ui=Gr(t.stateNode.containerInfo.firstChild),Fi=t,i=$i=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],qi.push(i);for(n=Ni(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Ra(e,t,r,n),Gi();t=t.child}return t;case 5:return Ii(t),null===e&&Yi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,u=o.children,Hr(r,o)?u=null:null!==i&&Hr(r,i)&&(t.flags|=16),Va(e,t),Ra(e,t,u,n),t.child;case 6:return null===e&&Yi(t),null;case 13:return Za(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ci(t,null,r,n):Ra(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ba(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 7:return Ra(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ra(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,u=t.memoizedProps,i=o.value;var l=t.type._context;if(fo(Jo,l._currentValue),l._currentValue=i,null!==u)if(l=u.value,0===(i=sr(l,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823))){if(u.children===o.children&&!vo.current){t=iu(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){u=l.child;for(var s=c.firstContext;null!==s;){if(s.context===r&&0!==(s.observedBits&i)){1===l.tag&&((s=fi(-1,n&-n)).tag=2,di(l,s)),l.lanes|=n,null!==(s=l.alternate)&&(s.lanes|=n),ii(l.return,n),c.lanes|=n;break}s=s.next}}else u=10===l.tag&&l.type===t.type?null:l.child;if(null!==u)u.return=l;else for(u=l;null!==u;){if(u===t){u=null;break}if(null!==(l=u.sibling)){l.return=u.return,u=l;break}u=u.return}l=u}Ra(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=ui(o,i.unstable_observedBits)),t.flags|=1,Ra(e,t,r,n),t.child;case 14:return i=Zo(o=t.type,t.pendingProps),Fa(e,t,o,i=Zo(o.type,i),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,yo(r)?(e=!0,xo(t)):e=!1,ai(t,n),wi(t,r,o),xi(t,r,o,n),Xa(null,t,r,!0,e,n);case 19:return ou(e,t,n);case 23:case 24:return $a(e,t,n)}throw Error(a(156,t.tag))},oc.prototype.render=function(e){ec(e,this._internalRoot,null,null)},oc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ec(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hl(e,4,dl()),rc(e,4))},nt=function(e){13===e.tag&&(hl(e,67108864,dl()),rc(e,67108864))},rt=function(e){if(13===e.tag){var t=dl(),n=pl(e);hl(e,n,t),rc(e,n)}},ot=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Q(r),ne(r,o)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},De=wl,Le=function(e,t,n,r,o){var i=Tu;Tu|=4;try{return Wo(98,e.bind(null,t,n,r,o))}finally{0===(Tu=i)&&(Wu(),qo())}},Ae=function(){0===(49&Tu)&&(function(){if(null!==ol){var e=ol;ol=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,gl(e,Ho())}))}qo()}(),Al())},Ie=function(e,t){var n=Tu;Tu|=2;try{return e(t)}finally{0===(Tu=n)&&(Wu(),qo())}};var lc={Events:[ro,oo,io,Me,Te,Al,{current:!1}]},cc={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},sc={bundleType:cc.bundleType,version:cc.version,rendererPackageName:cc.rendererPackageName,rendererConfig:cc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:cc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{So=fc.inject(sc),ko=fc}catch(ge){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lc,t.createPortal=uc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Je(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Tu;if(0!==(48&n))return e(t);Tu|=1;try{if(e)return Wo(99,e.bind(null,t))}finally{Tu=n,qo()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(_l((function(){ac(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=wl,t.unstable_createPortal=function(e,t){return uc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ac(e,t,n,!1,r)},t.version="17.0.2"},4164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4463)},6374:function(e,t,n){"use strict";n(1725);var r=n(2791),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,s=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(s=t.ref),t)u.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:s,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},9117:function(e,t,n){"use strict";var r=n(1725),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,u=60110,l=60112;t.Suspense=60113;var c=60115,s=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),u=f("react.context"),l=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),s=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function m(){}function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=g.prototype;var b=y.prototype=new m;b.constructor=y,r(b,g.prototype),b.isPureReactComponent=!0;var w={current:null},_=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r,i={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),s=0;s<l;s++)c[s]=arguments[s+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:u,props:i,_owner:w.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var k=/\/+/g;function O(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,n,r,a){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var l=!1;if(null===e)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case i:l=!0}}if(l)return a=a(l=e),e=""===r?"."+O(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(k,"$&/")+"/"),C(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(k,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var s=r+O(u=e[c],c);l+=C(u,t,n,s,a)}else if(s=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof s)for(e=s.call(e),c=0;!(u=e.next()).done;)l+=C(u=u.value,t,n,s=r+O(u,c++),a);else if("object"===u)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function N(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function j(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var P={current:null};function M(){var e=P.current;if(null===e)throw Error(p(321));return e}var T={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:N,forEach:function(e,t,n){N(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return N(e,(function(){t++})),t},toArray:function(e){return N(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(p(143));return e}},t.Component=g,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,u=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)_.call(t,s)&&!x.hasOwnProperty(s)&&(i[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){c=Array(s);for(var f=0;f<s;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:u,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:u,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:s,_payload:{_status:-1,_result:e},_init:j}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return M().useCallback(e,t)},t.useContext=function(e,t){return M().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return M().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return M().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return M().useLayoutEffect(e,t)},t.useMemo=function(e,t){return M().useMemo(e,t)},t.useReducer=function(e,t,n){return M().useReducer(e,t,n)},t.useRef=function(e){return M().useRef(e)},t.useState=function(e){return M().useState(e)},t.version="17.0.2"},2791:function(e,t,n){"use strict";e.exports=n(9117)},184:function(e,t,n){"use strict";e.exports=n(6374)},9727:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(M){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new N(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=s(e,t,n);if("normal"===l.type){if(r=n.done?h:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={};function g(){}function m(){}function y(){}var b={};l(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(j([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=y.prototype=g.prototype=Object.create(b);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,i,a,u){var l=s(e[o],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,u)}))}u(l.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function k(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=s(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var n=e[i];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:P}}function P(){return{value:t,done:!0}}return m.prototype=y,l(x,"constructor",y),l(y,"constructor",m),m.displayName=l(y,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,l(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},E(S.prototype),l(S.prototype,a,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new S(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(x),l(x,u,"Generator"),l(x,i,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=j,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:j(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},6813:function(e,t){"use strict";var n,r,o,i;if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();t.unstable_now=function(){return u.now()-l}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,s=null,f=function e(){if(null!==c)try{var n=t.unstable_now();c(!0,n),c=null}catch(r){throw setTimeout(e,0),r}};n=function(e){null!==c?setTimeout(n,0,e):(c=e,setTimeout(f,0))},r=function(e,t){s=setTimeout(e,t)},o=function(){clearTimeout(s)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var h=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var v=!1,g=null,m=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,_=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();b=e+y;try{g(!0,e)?_.postMessage(null):(v=!1,g=null)}catch(n){throw _.postMessage(null),n}}else v=!1},n=function(e){g=e,v||(v=!0,_.postMessage(null))},r=function(e,n){m=d((function(){e(t.unstable_now())}),n)},o=function(){p(m),m=-1}}function x(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<k(o,t)))break e;e[r]=t,e[n]=o,n=r}}function E(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,l=e[u];if(void 0!==a&&0>k(a,n))void 0!==l&&0>k(l,a)?(e[r]=l,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>k(l,n)))break e;e[r]=l,e[u]=n,r=u}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],C=[],N=1,j=null,P=3,M=!1,T=!1,D=!1;function L(e){for(var t=E(C);null!==t;){if(null===t.callback)S(C);else{if(!(t.startTime<=e))break;S(C),t.sortIndex=t.expirationTime,x(O,t)}t=E(C)}}function A(e){if(D=!1,L(e),!T)if(null!==E(O))T=!0,n(I);else{var t=E(C);null!==t&&r(A,t.startTime-e)}}function I(e,n){T=!1,D&&(D=!1,o()),M=!0;var i=P;try{for(L(n),j=E(O);null!==j&&(!(j.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=j.callback;if("function"===typeof a){j.callback=null,P=j.priorityLevel;var u=a(j.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?j.callback=u:j===E(O)&&S(O),L(n)}else S(O);j=E(O)}if(null!==j)var l=!0;else{var c=E(C);null!==c&&r(A,c.startTime-n),l=!1}return l}finally{j=null,P=i,M=!1}}var z=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){T||M||(T=!0,n(I))},t.unstable_getCurrentPriorityLevel=function(){return P},t.unstable_getFirstCallbackNode=function(){return E(O)},t.unstable_next=function(e){switch(P){case 1:case 2:case 3:var t=3;break;default:t=P}var n=P;P=t;try{return e()}finally{P=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=P;P=e;try{return t()}finally{P=n}},t.unstable_scheduleCallback=function(e,i,a){var u=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?u+a:u:a=u,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:N++,callback:i,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>u?(e.sortIndex=a,x(C,e),null===E(O)&&e===E(C)&&(D?o():D=!0,r(A,a-u))):(e.sortIndex=l,x(O,e),T||M||(T=!0,n(I))),e},t.unstable_wrapCallback=function(e){var t=P;return function(){var n=P;P=t;try{return e.apply(this,arguments)}finally{P=n}}}},5296:function(e,t,n){"use strict";e.exports=n(6813)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=n(2791),t=n(4164);function r(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,l,"next",e)}function l(e){r(a,o,i,u,l,"throw",e)}u(void 0)}))}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){if(e){if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){u=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var f,d,p=n(7757),h=n.n(p);var v=new WeakMap,g=new WeakMap,m=new WeakMap,y=new WeakMap,b=new WeakMap;var w={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return g.get(e);if("objectStoreNames"===t)return e.objectStoreNames||m.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return E(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function _(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(d||(d=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(S(this),n),E(v.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return E(e.apply(S(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=e.call.apply(e,[S(this),t].concat(r));return m.set(i,t.sort?t.sort():[t]),E(i)}}function x(e){return"function"===typeof e?_(e):(e instanceof IDBTransaction&&function(e){if(!g.has(e)){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("complete",o),e.removeEventListener("error",i),e.removeEventListener("abort",i)},o=function(){t(),r()},i=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",i),e.addEventListener("abort",i)}));g.set(e,t)}}(e),t=e,(f||(f=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((function(e){return t instanceof e}))?new Proxy(e,w):e);var t}function E(e){if(e instanceof IDBRequest)return function(e){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("success",o),e.removeEventListener("error",i)},o=function(){t(E(e.result)),r()},i=function(){n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",i)}));return t.then((function(t){t instanceof IDBCursor&&v.set(t,e)})).catch((function(){})),b.set(t,e),t}(e);if(y.has(e))return y.get(e);var t=x(e);return t!==e&&(y.set(e,t),b.set(t,e)),t}var S=function(e){return b.get(e)};function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,o=n.upgrade,i=n.blocking,a=n.terminated,u=indexedDB.open(e,t),l=E(u);return o&&u.addEventListener("upgradeneeded",(function(e){o(E(u.result),e.oldVersion,e.newVersion,E(u.transaction))})),r&&u.addEventListener("blocked",(function(){return r()})),l.then((function(e){a&&e.addEventListener("close",(function(){return a()})),i&&e.addEventListener("versionchange",(function(){return i()}))})).catch((function(){})),l}var O=["get","getKey","getAll","getAllKeys","count"],C=["put","add","delete","clear"],N=new Map;function j(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(N.get(t))return N.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=C.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||O.includes(n))){var a=function(){var e=o(h().mark((function e(t){var o,a,u,l,c,s,f=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a=this.transaction(t,i?"readwrite":"readonly"),u=a.store,l=f.length,c=new Array(l>1?l-1:0),s=1;s<l;s++)c[s-1]=f[s];return r&&(u=u.index(c.shift())),e.next=6,Promise.all([(o=u)[n].apply(o,c),i&&a.done]);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();return N.set(t,a),a}}}function P(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=c(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}w=function(e){return u(u({},e),{},{get:function(t,n,r){return j(t,n)||e.get(t,n,r)},has:function(t,n){return!!j(t,n)||e.has(t,n)}})}(w);var M=h().mark(Vr);function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function L(e){if("string"===typeof e||"number"===typeof e)return""+e;var t="";if(Array.isArray(e))for(var n,r=0;r<e.length;r++)""!==(n=L(e[r]))&&(t+=(t&&" ")+n);else for(var o in e)e[o]&&(t+=(t&&" ")+o);return t}function A(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var I="function"===typeof Symbol&&Symbol.observable||"@@observable",z=function(){return Math.random().toString(36).substring(7).split("").join(".")},R={INIT:"@@redux/INIT"+z(),REPLACE:"@@redux/REPLACE"+z(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+z()}};function B(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function F(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(A(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(A(1));return n(F)(e,t)}if("function"!==typeof e)throw new Error(A(2));var o=e,i=t,a=[],u=a,l=!1;function c(){u===a&&(u=a.slice())}function s(){if(l)throw new Error(A(3));return i}function f(e){if("function"!==typeof e)throw new Error(A(4));if(l)throw new Error(A(5));var t=!0;return c(),u.push(e),function(){if(t){if(l)throw new Error(A(6));t=!1,c();var n=u.indexOf(e);u.splice(n,1),a=null}}}function d(e){if(!B(e))throw new Error(A(7));if("undefined"===typeof e.type)throw new Error(A(8));if(l)throw new Error(A(9));try{l=!0,i=o(i,e)}finally{l=!1}for(var t=a=u,n=0;n<t.length;n++){(0,t[n])()}return e}function p(e){if("function"!==typeof e)throw new Error(A(10));o=e,d({type:R.REPLACE})}function h(){var e,t=f;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(A(11));function n(){e.next&&e.next(s())}return n(),{unsubscribe:t(n)}}})[I]=function(){return this},e}return d({type:R.INIT}),(r={dispatch:d,subscribe:f,getState:s,replaceReducer:p})[I]=h,r}function U(e,t){return function(){return t(e.apply(this,arguments))}}function $(e,t){if("function"===typeof e)return U(e,t);if("object"!==typeof e||null===e)throw new Error(A(16));var n={};for(var r in e){var o=e[r];"function"===typeof o&&(n[r]=U(o,t))}return n}function V(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var H={exports:{}},Y={exports:{}},X={},W="function"===typeof Symbol&&Symbol.for,G=W?Symbol.for("react.element"):60103,q=W?Symbol.for("react.portal"):60106,K=W?Symbol.for("react.fragment"):60107,Q=W?Symbol.for("react.strict_mode"):60108,Z=W?Symbol.for("react.profiler"):60114,J=W?Symbol.for("react.provider"):60109,ee=W?Symbol.for("react.context"):60110,te=W?Symbol.for("react.async_mode"):60111,ne=W?Symbol.for("react.concurrent_mode"):60111,re=W?Symbol.for("react.forward_ref"):60112,oe=W?Symbol.for("react.suspense"):60113,ie=W?Symbol.for("react.suspense_list"):60120,ae=W?Symbol.for("react.memo"):60115,ue=W?Symbol.for("react.lazy"):60116,le=W?Symbol.for("react.block"):60121,ce=W?Symbol.for("react.fundamental"):60117,se=W?Symbol.for("react.responder"):60118,fe=W?Symbol.for("react.scope"):60119;function de(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case G:switch(e=e.type){case te:case ne:case K:case Z:case Q:case oe:return e;default:switch(e=e&&e.$$typeof){case ee:case re:case ue:case ae:case J:return e;default:return t}}case q:return t}}}function pe(e){return de(e)===ne}X.AsyncMode=te,X.ConcurrentMode=ne,X.ContextConsumer=ee,X.ContextProvider=J,X.Element=G,X.ForwardRef=re,X.Fragment=K,X.Lazy=ue,X.Memo=ae,X.Portal=q,X.Profiler=Z,X.StrictMode=Q,X.Suspense=oe,X.isAsyncMode=function(e){return pe(e)||de(e)===te},X.isConcurrentMode=pe,X.isContextConsumer=function(e){return de(e)===ee},X.isContextProvider=function(e){return de(e)===J},X.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===G},X.isForwardRef=function(e){return de(e)===re},X.isFragment=function(e){return de(e)===K},X.isLazy=function(e){return de(e)===ue},X.isMemo=function(e){return de(e)===ae},X.isPortal=function(e){return de(e)===q},X.isProfiler=function(e){return de(e)===Z},X.isStrictMode=function(e){return de(e)===Q},X.isSuspense=function(e){return de(e)===oe},X.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===K||e===ne||e===Z||e===Q||e===oe||e===ie||"object"===typeof e&&null!==e&&(e.$$typeof===ue||e.$$typeof===ae||e.$$typeof===J||e.$$typeof===ee||e.$$typeof===re||e.$$typeof===ce||e.$$typeof===se||e.$$typeof===fe||e.$$typeof===le)},X.typeOf=de,Y.exports=X;var he=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable;function me(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(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;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}})()&&Object.assign,Function.call.bind(Object.prototype.hasOwnProperty);function ye(e,t,n,r,o){}ye.resetWarningCache=function(){0};Y.exports;function be(){}function we(){}we.resetWarningCache=be;H.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:we,resetWarningCache:be};return n.PropTypes=n,n}();H.exports;var _e=e.createContext(null);var xe=function(e){e()},Ee=function(){return xe};var Se={notify:function(){},get:function(){return[]}};function ke(e,t){var n,r=Se;function o(){a.onStateChange&&a.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){var e=Ee(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}var a={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=Se)},getListeners:function(){return r}};return a}var Oe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?e.useLayoutEffect:e.useEffect;function Ce(t){var n=t.store,r=t.context,o=t.children,i=(0,e.useMemo)((function(){var e=ke(n);return e.onStateChange=e.notifyNestedSubs,{store:n,subscription:e}}),[n]),a=(0,e.useMemo)((function(){return n.getState()}),[n]);Oe((function(){var e=i.subscription;return e.trySubscribe(),a!==n.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[i,a]);var u=r||_e;return e.createElement(u.Provider,{value:i},o)}var Ne=Y.exports,je={};je[Ne.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},je[Ne.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var Pe={},Me=60103,Te=60106,De=60107,Le=60108,Ae=60114,Ie=60109,ze=60110,Re=60112,Be=60113,Fe=60120,Ue=60115,$e=60116,Ve=60121,He=60122,Ye=60117,Xe=60129,We=60131;if("function"===typeof Symbol&&Symbol.for){var Ge=Symbol.for;Me=Ge("react.element"),Te=Ge("react.portal"),De=Ge("react.fragment"),Le=Ge("react.strict_mode"),Ae=Ge("react.profiler"),Ie=Ge("react.provider"),ze=Ge("react.context"),Re=Ge("react.forward_ref"),Be=Ge("react.suspense"),Fe=Ge("react.suspense_list"),Ue=Ge("react.memo"),$e=Ge("react.lazy"),Ve=Ge("react.block"),He=Ge("react.server.block"),Ye=Ge("react.fundamental"),Xe=Ge("react.debug_trace_mode"),We=Ge("react.legacy_hidden")}function qe(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case Me:switch(e=e.type){case De:case Ae:case Le:case Be:case Fe:return e;default:switch(e=e&&e.$$typeof){case ze:case Re:case $e:case Ue:case Ie:return e;default:return t}}case Te:return t}}}var Ke=Ie,Qe=Me,Ze=Re,Je=De,et=$e,tt=Ue,nt=Te,rt=Ae,ot=Le,it=Be;function at(){return(0,e.useContext)(_e)}function ut(t){void 0===t&&(t=_e);var n=t===_e?at:function(){return(0,e.useContext)(t)};return function(){return n().store}}Pe.ContextConsumer=ze,Pe.ContextProvider=Ke,Pe.Element=Qe,Pe.ForwardRef=Ze,Pe.Fragment=Je,Pe.Lazy=et,Pe.Memo=tt,Pe.Portal=nt,Pe.Profiler=rt,Pe.StrictMode=ot,Pe.Suspense=it,Pe.isAsyncMode=function(){return!1},Pe.isConcurrentMode=function(){return!1},Pe.isContextConsumer=function(e){return qe(e)===ze},Pe.isContextProvider=function(e){return qe(e)===Ie},Pe.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===Me},Pe.isForwardRef=function(e){return qe(e)===Re},Pe.isFragment=function(e){return qe(e)===De},Pe.isLazy=function(e){return qe(e)===$e},Pe.isMemo=function(e){return qe(e)===Ue},Pe.isPortal=function(e){return qe(e)===Te},Pe.isProfiler=function(e){return qe(e)===Ae},Pe.isStrictMode=function(e){return qe(e)===Le},Pe.isSuspense=function(e){return qe(e)===Be},Pe.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===De||e===Ae||e===Xe||e===Le||e===Be||e===Fe||e===We||"object"===typeof e&&null!==e&&(e.$$typeof===$e||e.$$typeof===Ue||e.$$typeof===Ie||e.$$typeof===ze||e.$$typeof===Re||e.$$typeof===Ye||e.$$typeof===Ve||e[0]===He)},Pe.typeOf=qe;var lt=ut();function ct(e){void 0===e&&(e=_e);var t=e===_e?lt:ut(e);return function(){return t().dispatch}}var st=ct(),ft=function(e,t){return e===t};function dt(t){void 0===t&&(t=_e);var n=t===_e?at:function(){return(0,e.useContext)(t)};return function(t,r){void 0===r&&(r=ft);var o=n(),i=function(t,n,r,o){var i,a=(0,e.useReducer)((function(e){return e+1}),0)[1],u=(0,e.useMemo)((function(){return ke(r,o)}),[r,o]),l=(0,e.useRef)(),c=(0,e.useRef)(),s=(0,e.useRef)(),f=(0,e.useRef)(),d=r.getState();try{if(t!==c.current||d!==s.current||l.current){var p=t(d);i=void 0!==f.current&&n(p,f.current)?f.current:p}else i=f.current}catch(h){throw l.current&&(h.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),h}return Oe((function(){c.current=t,s.current=d,f.current=i,l.current=void 0})),Oe((function(){function e(){try{var e=r.getState();if(e===s.current)return;var t=c.current(e);if(n(t,f.current))return;f.current=t,s.current=e}catch(h){l.current=h}a()}return u.onStateChange=e,u.trySubscribe(),e(),function(){return u.tryUnsubscribe()}}),[r,u]),i}(t,r,o.store,o.subscription);return(0,e.useDebugValue)(i),i}}var pt,ht=dt();function vt(e,t){return{type:e,payload:t}}pt=t.unstable_batchedUpdates,xe=pt;var gt="SET_ON_CONNECT",mt="SET_ON_CONNECT_START",yt="SET_ON_CONNECT_STOP",bt="SET_ON_CONNECT_END",wt="SET_ELEMENTS",_t="UPDATE_NODE_DIMENSIONS",xt="UPDATE_NODE_POS",Et="UPDATE_NODE_POS_DIFF",St="SET_USER_SELECTION",kt="UPDATE_USER_SELECTION",Ot="UNSET_USER_SELECTION",Ct="UNSET_NODES_SELECTION",Nt="SET_SELECTED_ELEMENTS",jt="RESET_SELECTED_ELEMENTS",Pt="ADD_SELECTED_ELEMENTS",Mt="UPDATE_TRANSFORM",Tt="UPDATE_SIZE",Dt="INIT_D3ZOOM",Lt="SET_MINZOOM",At="SET_MAXZOOM",It="SET_TRANSLATEEXTENT",zt="SET_CONNECTION_POSITION",Rt="SET_CONNECTION_NODEID",Bt="SET_SNAPTOGRID",Ft="SET_SNAPGRID",Ut="SET_INTERACTIVE",$t="SET_NODES_DRAGGABLE",Vt="SET_NODES_CONNECTABLE",Ht="SET_ELEMENTS_SELECTABLE",Yt="SET_MULTI_SELECTION_ACTIVE",Xt="SET_CONNECTION_MODE",Wt="SET_NODE_EXTENT",Gt=Object.freeze({__proto__:null,setOnConnect:function(e){return vt(gt,{onConnect:e})},setOnConnectStart:function(e){return vt(mt,{onConnectStart:e})},setOnConnectStop:function(e){return vt(yt,{onConnectStop:e})},setOnConnectEnd:function(e){return vt(bt,{onConnectEnd:e})},setElements:function(e){return vt(wt,e)},updateNodeDimensions:function(e){return vt(_t,e)},updateNodePos:function(e){return vt(xt,e)},updateNodePosDiff:function(e){return vt(Et,e)},setUserSelection:function(e){return vt(St,e)},updateUserSelection:function(e){return vt(kt,e)},unsetUserSelection:function(){return vt(Ot)},setSelection:function(e){return vt("SET_SELECTION",{selectionActive:e})},unsetNodesSelection:function(){return vt(Ct,{nodesSelectionActive:!1})},resetSelectedElements:function(){return vt(jt,{selectedElements:null})},setSelectedElements:function(e){return vt(Nt,e)},addSelectedElements:function(e){return vt(Pt,e)},updateTransform:function(e){return vt(Mt,{transform:e})},updateSize:function(e){return vt(Tt,{width:e.width||500,height:e.height||500})},initD3Zoom:function(e){return vt(Dt,e)},setMinZoom:function(e){return vt(Lt,e)},setMaxZoom:function(e){return vt(At,e)},setTranslateExtent:function(e){return vt(It,e)},setConnectionPosition:function(e){return vt(zt,{connectionPosition:e})},setConnectionNodeId:function(e){return vt(Rt,e)},setSnapToGrid:function(e){return vt(Bt,{snapToGrid:e})},setSnapGrid:function(e){return vt(Ft,{snapGrid:e})},setInteractive:function(e){return vt(Ut,{nodesDraggable:e,nodesConnectable:e,elementsSelectable:e})},setNodesDraggable:function(e){return vt($t,{nodesDraggable:e})},setNodesConnectable:function(e){return vt(Vt,{nodesConnectable:e})},setElementsSelectable:function(e){return vt(Ht,{elementsSelectable:e})},setMultiSelectionActive:function(e){return vt(Yt,{multiSelectionActive:e})},setConnectionMode:function(e){return vt(Xt,{connectionMode:e})},setNodeExtent:function(e){return vt(Wt,e)}});function qt(t){var n=st(),r=t(Gt);return(0,e.useMemo)((function(){return $(r,n)}),[n,r])}var Kt=ht,Qt=function(){return lt()};function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jt(e,t){if(e){if("string"===typeof e)return Zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(e,t):void 0}}function en(e){return function(e){if(Array.isArray(e))return Zt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Jt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){u=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||Jt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var nn=function(e){var t=null===e||void 0===e?void 0:e.target;return["INPUT","SELECT","TEXTAREA","BUTTON"].includes(null===t||void 0===t?void 0:t.nodeName)||(null===t||void 0===t?void 0:t.hasAttribute("contenteditable"))},rn=function(e){return{width:e.offsetWidth,height:e.offsetHeight}},on=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)},an=function(e,t){return{x:on(e.x,t[0][0],t[1][0]),y:on(e.y,t[0][1],t[1][1])}},un=function(t){var n=tn((0,e.useState)(!1),2),r=n[0],o=n[1];return(0,e.useEffect)((function(){if("undefined"!==typeof t){var e=function(e){nn(e)||e.key!==t&&e.keyCode!==t||(e.preventDefault(),o(!0))},n=function(e){nn(e)||e.key!==t&&e.keyCode!==t||o(!1)},r=function(){return o(!1)};return window.addEventListener("keydown",e),window.addEventListener("keyup",n),window.addEventListener("blur",r),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",n),window.removeEventListener("blur",r)}}}),[t,o]),r};function ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sn=function(e){return"id"in e&&"source"in e&&"target"in e},fn=function(e){return"id"in e&&!("source"in e)&&!("target"in e)},dn=function(e,t,n,r){var o=e.x,i=e.y,a=tn(t,3),u=a[0],l=a[1],c=a[2],s=tn(r,2),f=s[0],d=s[1],p={x:(o-u)/c,y:(i-l)/c};return n?{x:f*Math.round(p.x/f),y:d*Math.round(p.y/d)}:p},pn=function(e){return function(t){var n=e.getState(),r=n.transform,o=n.snapToGrid,i=n.snapGrid;return dn(t,r,o,i)}},hn=function(e,t){var n,r;return cn(cn({},e),{},{id:e.id.toString(),type:e.type||"default",__rf:{position:an(e.position,t),width:(null===(n=e.style)||void 0===n?void 0:n.width)||null,height:(null===(r=e.style)||void 0===r?void 0:r.height)||null,handleBounds:{},isDragging:!1}})},vn=function(e){return cn(cn({},e),{},{source:e.source.toString(),target:e.target.toString(),sourceHandle:e.sourceHandle?e.sourceHandle.toString():null,targetHandle:e.targetHandle?e.targetHandle.toString():null,id:e.id.toString(),type:e.type||"default"})},gn=function(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}},mn=function(e){var t=e.x,n=e.y;return{x:t,y:n,x2:t+e.width,y2:n+e.height}},yn=function(e){var t=e.x,n=e.y;return{x:t,y:n,width:e.x2-t,height:e.y2-n}},bn=function(e){var t=e.reduce((function(e,t){var n=t.__rf,r=(n=void 0===n?{}:n).position,o=n.width,i=n.height;return gn(e,mn(cn(cn({},r),{},{width:o,height:i})))}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return yn(t)},wn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,1],r=tn(n,3),o=r[0],i=r[1],a=r[2],u=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],c=mn({x:(t.x-o)/a,y:(t.y-i)/a,width:t.width/a,height:t.height/a});return e.filter((function(e){var t=e.selectable,n=void 0===t||t,r=e.__rf,o=r.position,i=r.width,a=r.height,s=r.isDragging;if(l&&!n)return!1;var f=mn(cn(cn({},o),{},{width:i,height:a})),d=Math.max(0,Math.min(c.x2,f.x2)-Math.max(c.x,f.x)),p=Math.max(0,Math.min(c.y2,f.y2)-Math.max(c.y,f.y)),h=Math.ceil(d*p);return!(null!==i&&null!==a&&!s)||(u?h>0:h>=i*a)}))},_n=function(e,t){var n=e.map((function(e){return e.id}));return t.filter((function(e){return n.includes(e.source)||n.includes(e.target)}))},xn=function(e,t){return[].concat(en(e.map((function(e){var t=cn({},e);return t.position=t.__rf.position,delete t.__rf,t}))),en(t.map((function(e){return cn({},e)}))))},En=function(e){return function(){var t=e.getState(),n=t.nodes,r=void 0===n?[]:n,o=t.edges;return xn(r,void 0===o?[]:o)}},Sn=function(e){return function(){var t=e.getState(),n=t.nodes,r=void 0===n?[]:n,o=t.edges,i=void 0===o?[]:o,a=t.transform;return{elements:xn(r,i),position:[a[0],a[1]],zoom:a[2]}}},kn=function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:.1,a=t/(e.width*(1+i)),u=n/(e.height*(1+i)),l=Math.min(a,u),c=on(l,r,o),s=e.x+e.width/2,f=e.y+e.height/2,d=t/2-s*c,p=n/2-f*c;return[d,p,c]},On={value:function(){}};function Cn(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new Nn(r)}function Nn(e){this._=e}function jn(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function Pn(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function Mn(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=On,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Nn.prototype=Cn.prototype={constructor:Nn,on:function(e,t){var n,r=this._,o=jn(e+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++i<a;)if(n=(e=o[i]).type)r[n]=Mn(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Mn(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=Pn(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Nn(e)},call:function(e,t){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(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};var Tn="http://www.w3.org/1999/xhtml",Dn={svg:"http://www.w3.org/2000/svg",xhtml:Tn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ln(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Dn.hasOwnProperty(t)?{space:Dn[t],local:e}:e}function An(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Tn&&t.documentElement.namespaceURI===Tn?t.createElement(e):t.createElementNS(n,e)}}function In(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zn(e){var t=Ln(e);return(t.local?In:An)(t)}function Rn(){}function Bn(e){return null==e?Rn:function(){return this.querySelector(e)}}function Fn(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function Un(){return[]}function $n(e){return null==e?Un:function(){return this.querySelectorAll(e)}}function Vn(e){return function(){return this.matches(e)}}function Hn(e){return function(t){return t.matches(e)}}var Yn=Array.prototype.find;function Xn(){return this.firstElementChild}var Wn=Array.prototype.filter;function Gn(){return Array.from(this.children)}function qn(e){return new Array(e.length)}function Kn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Qn(e){return function(){return e}}function Zn(e,t,n,r,o,i){for(var a,u=0,l=t.length,c=i.length;u<c;++u)(a=t[u])?(a.__data__=i[u],r[u]=a):n[u]=new Kn(e,i[u]);for(;u<l;++u)(a=t[u])&&(o[u]=a)}function Jn(e,t,n,r,o,i,a){var u,l,c,s=new Map,f=t.length,d=i.length,p=new Array(f);for(u=0;u<f;++u)(l=t[u])&&(p[u]=c=a.call(l,l.__data__,u,t)+"",s.has(c)?o[u]=l:s.set(c,l));for(u=0;u<d;++u)c=a.call(e,i[u],u,i)+"",(l=s.get(c))?(r[u]=l,l.__data__=i[u],s.delete(c)):n[u]=new Kn(e,i[u]);for(u=0;u<f;++u)(l=t[u])&&s.get(p[u])===l&&(o[u]=l)}function er(e){return e.__data__}function tr(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function nr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function rr(e){return function(){this.removeAttribute(e)}}function or(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ir(e,t){return function(){this.setAttribute(e,t)}}function ar(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ur(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function lr(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function cr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function sr(e){return function(){this.style.removeProperty(e)}}function fr(e,t,n){return function(){this.style.setProperty(e,t,n)}}function dr(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function pr(e,t){return e.style.getPropertyValue(t)||cr(e).getComputedStyle(e,null).getPropertyValue(t)}function hr(e){return function(){delete this[e]}}function vr(e,t){return function(){this[e]=t}}function gr(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function mr(e){return e.trim().split(/^|\s+/)}function yr(e){return e.classList||new br(e)}function br(e){this._node=e,this._names=mr(e.getAttribute("class")||"")}function wr(e,t){for(var n=yr(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function _r(e,t){for(var n=yr(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function xr(e){return function(){wr(this,e)}}function Er(e){return function(){_r(this,e)}}function Sr(e,t){return function(){(t.apply(this,arguments)?wr:_r)(this,e)}}function kr(){this.textContent=""}function Or(e){return function(){this.textContent=e}}function Cr(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Nr(){this.innerHTML=""}function jr(e){return function(){this.innerHTML=e}}function Pr(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function Mr(){this.nextSibling&&this.parentNode.appendChild(this)}function Tr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Dr(){return null}function Lr(){var e=this.parentNode;e&&e.removeChild(this)}function Ar(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ir(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function zr(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function Rr(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,i=t.length;r<i;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function Br(e,t,n){return function(){var r,o=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var a=0,u=o.length;a<u;++a)if((r=o[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=t);this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function Fr(e,t,n){var r=cr(e),o=r.CustomEvent;"function"===typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Ur(e,t){return function(){return Fr(this,e,t)}}function $r(e,t){return function(){return Fr(this,e,t.apply(this,arguments))}}function Vr(){var e,t,n,r,o,i,a;return h().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:e=this._groups,t=0,n=e.length;case 1:if(!(t<n)){u.next=13;break}r=e[t],o=0,i=r.length;case 3:if(!(o<i)){u.next=10;break}if(!(a=r[o])){u.next=7;break}return u.next=7,a;case 7:++o,u.next=3;break;case 10:++t,u.next=1;break;case 13:case"end":return u.stop()}}),M,this)}Kn.prototype={constructor:Kn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},br.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Hr=[null];function Yr(e,t){this._groups=e,this._parents=t}function Xr(){return new Yr([[document.documentElement]],Hr)}function Wr(e){return"string"===typeof e?new Yr([[document.querySelector(e)]],[document.documentElement]):new Yr([[e]],Hr)}function Gr(e,t){if(e=function(e){for(var t;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){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]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}Yr.prototype=Xr.prototype=i({constructor:Yr,select:function(e){"function"!==typeof e&&(e=Bn(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a,u=t[o],l=u.length,c=r[o]=new Array(l),s=0;s<l;++s)(i=u[s])&&(a=e.call(i,i.__data__,s,u))&&("__data__"in i&&(a.__data__=i.__data__),c[s]=a);return new Yr(r,this._parents)},selectAll:function(e){e="function"===typeof e?function(e){return function(){return Fn(e.apply(this,arguments))}}(e):$n(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a,u=t[i],l=u.length,c=0;c<l;++c)(a=u[c])&&(r.push(e.call(a,a.__data__,c,u)),o.push(a));return new Yr(r,o)},selectChild:function(e){return this.select(null==e?Xn:function(e){return function(){return Yn.call(this.children,e)}}("function"===typeof e?e:Hn(e)))},selectChildren:function(e){return this.selectAll(null==e?Gn:function(e){return function(){return Wn.call(this.children,e)}}("function"===typeof e?e:Hn(e)))},filter:function(e){"function"!==typeof e&&(e=Vn(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],u=a.length,l=r[o]=[],c=0;c<u;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new Yr(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,er);var n=t?Jn:Zn,r=this._parents,o=this._groups;"function"!==typeof e&&(e=Qn(e));for(var i=o.length,a=new Array(i),u=new Array(i),l=new Array(i),c=0;c<i;++c){var s=r[c],f=o[c],d=f.length,p=tr(e.call(s,s&&s.__data__,c,r)),h=p.length,v=u[c]=new Array(h),g=a[c]=new Array(h),m=l[c]=new Array(d);n(s,f,v,g,m,p,t);for(var y,b,w=0,_=0;w<h;++w)if(y=v[w]){for(w>=_&&(_=w+1);!(b=g[_])&&++_<h;);y._next=b||null}}return(a=new Yr(a,r))._enter=u,a._exit=l,a},enter:function(){return new Yr(this._enter||this._groups.map(qn),this._parents)},exit:function(){return new Yr(this._exit||this._groups.map(qn),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,i=this.exit();return"function"===typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,a=Math.min(o,i),u=new Array(o),l=0;l<a;++l)for(var c,s=n[l],f=r[l],d=s.length,p=u[l]=new Array(d),h=0;h<d;++h)(c=s[h]||f[h])&&(p[h]=c);for(;l<o;++l)u[l]=n[l];return new Yr(u,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],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(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=nr);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,u=n[i],l=u.length,c=o[i]=new Array(l),s=0;s<l;++s)(a=u[s])&&(c[s]=a);c.sort(t)}return new Yr(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){var e,t=0,n=P(this);try{for(n.s();!(e=n.n()).done;){e.value;++t}}catch(r){n.e(r)}finally{n.f()}return t},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,i=t[n],a=0,u=i.length;a<u;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this},attr:function(e,t){var n=Ln(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?or:rr:"function"===typeof t?n.local?lr:ur:n.local?ar:ir)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?sr:"function"===typeof t?dr:fr)(e,t,null==n?"":n)):pr(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?hr:"function"===typeof t?gr:vr)(e,t)):this.node()[e]},classed:function(e,t){var n=mr(e+"");if(arguments.length<2){for(var r=yr(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"===typeof t?Sr:t?xr:Er)(n,t))},text:function(e){return arguments.length?this.each(null==e?kr:("function"===typeof e?Cr:Or)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Nr:("function"===typeof e?Pr:jr)(e)):this.node().innerHTML},raise:function(){return this.each(Mr)},lower:function(){return this.each(Tr)},append:function(e){var t="function"===typeof e?e:zn(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"===typeof e?e:zn(e),r=null==t?Dr:"function"===typeof t?t:Bn(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Lr)},clone:function(e){return this.select(e?Ir:Ar)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,i=zr(e+""),a=i.length;if(!(arguments.length<2)){for(u=t?Br:Rr,r=0;r<a;++r)this.each(u(i[r],t,n));return this}var u=this.node().__on;if(u)for(var l,c=0,s=u.length;c<s;++c)for(r=0,l=u[c];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"===typeof t?$r:Ur)(e,t))}},Symbol.iterator,Vr);var qr={capture:!0,passive:!1};function Kr(e){e.preventDefault(),e.stopImmediatePropagation()}function Qr(e){var t=e.document.documentElement,n=Wr(e).on("dragstart.drag",Kr,qr);"onselectstart"in t?n.on("selectstart.drag",Kr,qr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Zr(e,t){var n=e.document.documentElement,r=Wr(e).on("dragstart.drag",null);t&&(r.on("click.drag",Kr,qr),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Jr(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function eo(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function to(){}var no=.7,ro=1/no,oo="\\s*([+-]?\\d+)\\s*",io="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ao="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uo=/^#([0-9a-f]{3,8})$/,lo=new RegExp("^rgb\\("+[oo,oo,oo]+"\\)$"),co=new RegExp("^rgb\\("+[ao,ao,ao]+"\\)$"),so=new RegExp("^rgba\\("+[oo,oo,oo,io]+"\\)$"),fo=new RegExp("^rgba\\("+[ao,ao,ao,io]+"\\)$"),po=new RegExp("^hsl\\("+[io,ao,ao]+"\\)$"),ho=new RegExp("^hsla\\("+[io,ao,ao,io]+"\\)$"),vo={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 go(){return this.rgb().formatHex()}function mo(){return this.rgb().formatRgb()}function yo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=uo.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?bo(t):3===n?new Eo(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?wo(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?wo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=lo.exec(e))?new Eo(t[1],t[2],t[3],1):(t=co.exec(e))?new Eo(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=so.exec(e))?wo(t[1],t[2],t[3],t[4]):(t=fo.exec(e))?wo(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=po.exec(e))?Co(t[1],t[2]/100,t[3]/100,1):(t=ho.exec(e))?Co(t[1],t[2]/100,t[3]/100,t[4]):vo.hasOwnProperty(e)?bo(vo[e]):"transparent"===e?new Eo(NaN,NaN,NaN,0):null}function bo(e){return new Eo(e>>16&255,e>>8&255,255&e,1)}function wo(e,t,n,r){return r<=0&&(e=t=n=NaN),new Eo(e,t,n,r)}function _o(e){return e instanceof to||(e=yo(e)),e?new Eo((e=e.rgb()).r,e.g,e.b,e.opacity):new Eo}function xo(e,t,n,r){return 1===arguments.length?_o(e):new Eo(e,t,n,null==r?1:r)}function Eo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function So(){return"#"+Oo(this.r)+Oo(this.g)+Oo(this.b)}function ko(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function Oo(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Co(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jo(e,t,n,r)}function No(e){if(e instanceof jo)return new jo(e.h,e.s,e.l,e.opacity);if(e instanceof to||(e=yo(e)),!e)return new jo;if(e instanceof jo)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,u=i-o,l=(i+o)/2;return u?(a=t===i?(n-r)/u+6*(n<r):n===i?(r-t)/u+2:(t-n)/u+4,u/=l<.5?i+o:2-i-o,a*=60):u=l>0&&l<1?0:a,new jo(a,u,l,e.opacity)}function jo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Po(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Jr(to,yo,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:go,formatHex:go,formatHsl:function(){return No(this).formatHsl()},formatRgb:mo,toString:mo}),Jr(Eo,xo,eo(to,{brighter:function(e){return e=null==e?ro:Math.pow(ro,e),new Eo(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?no:Math.pow(no,e),new Eo(this.r*e,this.g*e,this.b*e,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:So,formatHex:So,formatRgb:ko,toString:ko})),Jr(jo,(function(e,t,n,r){return 1===arguments.length?No(e):new jo(e,t,n,null==r?1:r)}),eo(to,{brighter:function(e){return e=null==e?ro:Math.pow(ro,e),new jo(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?no:Math.pow(no,e),new jo(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Eo(Po(e>=240?e-240:e+120,o,r),Po(e,o,r),Po(e<120?e+240:e-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 e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Mo=function(e){return function(){return e}};function To(e){return 1===(e=+e)?Do:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Mo(isNaN(t)?n:t)}}function Do(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Mo(isNaN(e)?t:e)}var Lo=function e(t){var n=To(t);function r(e,t){var r=n((e=xo(e)).r,(t=xo(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Do(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Ao(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Io=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zo=new RegExp(Io.source,"g");function Ro(e,t){var n,r,o,i=Io.lastIndex=zo.lastIndex=0,a=-1,u=[],l=[];for(e+="",t+="";(n=Io.exec(e))&&(r=zo.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:Ao(n,r)})),i=zo.lastIndex;return i<t.length&&(o=t.slice(i),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)u[(n=l[r]).i]=n.x(e);return u.join("")})}var Bo,Fo=180/Math.PI,Uo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $o(e,t,n,r,o,i){var a,u,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,l/=u),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Fo,skewX:Math.atan(l)*Fo,scaleX:a,scaleY:u}}function Vo(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,a){var u=[],l=[];return i=e(i),a=e(a),function(e,r,o,i,a,u){if(e!==o||r!==i){var l=a.push("translate(",null,t,null,n);u.push({i:l-4,x:Ao(e,o)},{i:l-2,x:Ao(r,i)})}else(o||i)&&a.push("translate("+o+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,u,l),function(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Ao(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,a.rotate,u,l),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Ao(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,a.skewX,u,l),function(e,t,n,r,i,a){if(e!==n||t!==r){var u=i.push(o(i)+"scale(",null,",",null,")");a.push({i:u-4,x:Ao(e,n)},{i:u-2,x:Ao(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,u,l),i=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)u[(t=l[n]).i]=t.x(e);return u.join("")}}}var Ho=Vo((function(e){var t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Uo:$o(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Yo=Vo((function(e){return null==e?Uo:(Bo||(Bo=document.createElementNS("http://www.w3.org/2000/svg","g")),Bo.setAttribute("transform",e),(e=Bo.transform.baseVal.consolidate())?$o((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Uo)}),", ",")",")");function Xo(e){return((e=Math.exp(e))+1/e)/2}var Wo,Go,qo=function e(t,n,r){function o(e,o){var i,a,u=e[0],l=e[1],c=e[2],s=o[0],f=o[1],d=o[2],p=s-u,h=f-l,v=p*p+h*h;if(v<1e-12)a=Math.log(d/c)/t,i=function(e){return[u+e*p,l+e*h,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(v),m=(d*d-c*c+r*v)/(2*c*n*g),y=(d*d-c*c-r*v)/(2*d*n*g),b=Math.log(Math.sqrt(m*m+1)-m),w=Math.log(Math.sqrt(y*y+1)-y);a=(w-b)/t,i=function(e){var r=e*a,o=Xo(b),i=c/(n*g)*(o*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(t*r+b)-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[u+i*p,l+i*h,c*o/Xo(t*r+b)]}}return i.duration=1e3*a*t/Math.SQRT2,i}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4),Ko=0,Qo=0,Zo=0,Jo=0,ei=0,ti=0,ni="object"===typeof performance&&performance.now?performance:Date,ri="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function oi(){return ei||(ri(ii),ei=ni.now()+ti)}function ii(){ei=0}function ai(){this._call=this._time=this._next=null}function ui(e,t,n){var r=new ai;return r.restart(e,t,n),r}function li(){ei=(Jo=ni.now())+ti,Ko=Qo=0;try{!function(){oi(),++Ko;for(var e,t=Wo;t;)(e=ei-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ko}()}finally{Ko=0,function(){var e,t,n=Wo,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Wo=t);Go=e,si(r)}(),ei=0}}function ci(){var e=ni.now(),t=e-Jo;t>1e3&&(ti-=t,Jo=e)}function si(e){Ko||(Qo&&(Qo=clearTimeout(Qo)),e-ei>24?(e<1/0&&(Qo=setTimeout(li,e-ni.now()-ti)),Zo&&(Zo=clearInterval(Zo))):(Zo||(Jo=ni.now(),Zo=setInterval(ci,1e3)),Ko=1,ri(li)))}function fi(e,t,n){var r=new ai;return t=null==t?0:+t,r.restart((function(n){r.stop(),e(n+t)}),t,n),r}ai.prototype=ui.prototype={constructor:ai,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?oi():+n)+(null==t?0:+t),this._next||Go===this||(Go?Go._next=this:Wo=this,Go=this),this._call=e,this._time=n,si()},stop:function(){this._call&&(this._call=null,this._time=1/0,si())}};var di=Cn("start","end","cancel","interrupt"),pi=[];function hi(e,t,n,r,o,i){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function i(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(i){var c,s,f,d;if(1!==n.state)return l();for(c in o)if((d=o[c]).name===n.name){if(3===d.state)return fi(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete o[c]):+c<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete o[c])}if(fi((function(){3===n.state&&(n.state=4,n.timer.restart(u,n.delay,n.time),u(i))})),n.state=2,n.on.call("start",e,e.__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)(d=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++s]=d);r.length=s+1}}function u(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=ui(i,0,n.time)}(e,n,{name:t,index:r,group:o,on:di,tween:pi,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function vi(e,t){var n=mi(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function gi(e,t){var n=mi(e,t);if(n.state>3)throw new Error("too late; already running");return n}function mi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function yi(e,t){var n,r,o,i=e.__transition,a=!0;if(i){for(o in t=null==t?null:t+"",i)(n=i[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete e.__transition}}function bi(e,t){var n,r;return function(){var o=gi(this,e),i=o.tween;if(i!==n)for(var a=0,u=(r=n=i).length;a<u;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}o.tween=r}}function wi(e,t,n){var r,o;if("function"!==typeof n)throw new Error;return function(){var i=gi(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var u={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=u;break}l===c&&o.push(u)}i.tween=o}}function _i(e,t,n){var r=e._id;return e.each((function(){var e=gi(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return mi(e,r).value[t]}}function xi(e,t){var n;return("number"===typeof t?Ao:t instanceof yo?Lo:(n=yo(t))?(t=n,Lo):Ro)(e,t)}function Ei(e){return function(){this.removeAttribute(e)}}function Si(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ki(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function Oi(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function Ci(e,t,n){var r,o,i;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(u=l+"")?null:a===r&&u===o?i:(o=u,i=t(r=a,l));this.removeAttribute(e)}}function Ni(e,t,n){var r,o,i;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(u=l+"")?null:a===r&&u===o?i:(o=u,i=t(r=a,l));this.removeAttributeNS(e.space,e.local)}}function ji(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Pi(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Mi(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Pi(e,o)),n}return o._value=t,o}function Ti(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&ji(e,o)),n}return o._value=t,o}function Di(e,t){return function(){vi(this,e).delay=+t.apply(this,arguments)}}function Li(e,t){return t=+t,function(){vi(this,e).delay=t}}function Ai(e,t){return function(){gi(this,e).duration=+t.apply(this,arguments)}}function Ii(e,t){return t=+t,function(){gi(this,e).duration=t}}function zi(e,t){if("function"!==typeof t)throw new Error;return function(){gi(this,e).ease=t}}function Ri(e,t,n){var r,o,i=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?vi:gi;return function(){var a=i(this,e),u=a.on;u!==r&&(o=(r=u).copy()).on(t,n),a.on=o}}var Bi=Xr.prototype.constructor;function Fi(e){return function(){this.style.removeProperty(e)}}function Ui(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function $i(e,t,n){var r,o;function i(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&Ui(e,i,n)),r}return i._value=t,i}function Vi(e){return function(t){this.textContent=e.call(this,t)}}function Hi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Vi(r)),t}return r._value=e,r}var Yi=0;function Xi(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Wi(){return++Yi}var Gi=Xr.prototype;Xi.prototype=i({constructor:Xi,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=Bn(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var u,l,c=r[a],s=c.length,f=i[a]=new Array(s),d=0;d<s;++d)(u=c[d])&&(l=e.call(u,u.__data__,d,c))&&("__data__"in u&&(l.__data__=u.__data__),f[d]=l,hi(f[d],t,n,d,f,mi(u,n)));return new Xi(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=$n(e));for(var r=this._groups,o=r.length,i=[],a=[],u=0;u<o;++u)for(var l,c=r[u],s=c.length,f=0;f<s;++f)if(l=c[f]){for(var d,p=e.call(l,l.__data__,f,c),h=mi(l,n),v=0,g=p.length;v<g;++v)(d=p[v])&&hi(d,t,n,v,p,h);i.push(p),a.push(l)}return new Xi(i,a,t,n)},selectChild:Gi.selectChild,selectChildren:Gi.selectChildren,filter:function(e){"function"!==typeof e&&(e=Vn(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],u=a.length,l=r[o]=[],c=0;c<u;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new Xi(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),a=new Array(r),u=0;u<i;++u)for(var l,c=t[u],s=n[u],f=c.length,d=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(d[p]=l);for(;u<r;++u)a[u]=t[u];return new Xi(a,this._parents,this._name,this._id)},selection:function(){return new Bi(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Wi(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],l=u.length,c=0;c<l;++c)if(a=u[c]){var s=mi(a,t);hi(a,e,n,c,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Xi(r,this._parents,e,n)},call:Gi.call,nodes:Gi.nodes,node:Gi.node,size:Gi.size,empty:Gi.empty,each:Gi.each,on:function(e,t){var n=this._id;return arguments.length<2?mi(this.node(),n).on.on(e):this.each(Ri(n,e,t))},attr:function(e,t){var n=Ln(e),r="transform"===n?Yo:xi;return this.attrTween(e,"function"===typeof t?(n.local?Ni:Ci)(n,r,_i(this,"attr."+e,t)):null==t?(n.local?Si:Ei)(n):(n.local?Oi:ki)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var r=Ln(e);return this.tween(n,(r.local?Mi:Ti)(r,t))},style:function(e,t,n){var r="transform"===(e+="")?Ho:xi;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=pr(this,e),a=(this.style.removeProperty(e),pr(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}(e,r)).on("end.style."+e,Fi(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var a=pr(this,e),u=n(this),l=u+"";return null==u&&(this.style.removeProperty(e),l=u=pr(this,e)),a===l?null:a===r&&l===o?i:(o=l,i=t(r=a,u))}}(e,r,_i(this,"style."+e,t))).each(function(e,t){var n,r,o,i,a="style."+t,u="end."+a;return function(){var l=gi(this,e),c=l.on,s=null==l.value[a]?i||(i=Fi(t)):void 0;c===n&&o===s||(r=(n=c).copy()).on(u,o=s),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var a=pr(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!==typeof t)throw new Error;return this.tween(r,$i(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(_i(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,Hi(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=mi(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((null==t?bi:wi)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?Di:Li)(t,e)):mi(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?Ai:Ii)(t,e)):mi(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(zi(t,e)):mi(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;gi(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var u={value:a},l={value:function(){0===--o&&i()}};n.each((function(){var n=gi(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(u),t._.interrupt.push(u),t._.end.push(l)),n.on=t})),0===o&&i()}))}},Symbol.iterator,Gi[Symbol.iterator]);var qi={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function Ki(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error("transition ".concat(t," not found"));return n}Xr.prototype.interrupt=function(e){return this.each((function(){yi(this,e)}))},Xr.prototype.transition=function(e){var t,n;e instanceof Xi?(t=e._id,e=e._name):(t=Wi(),(n=qi).time=oi(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],l=u.length,c=0;c<l;++c)(a=u[c])&&hi(a,e,t,c,u,n||Ki(a,t));return new Xi(r,this._parents,e,t)};var Qi=function(e){return function(){return e}};function Zi(e,t){var n=t.sourceEvent,r=t.target,o=t.transform,i=t.dispatch;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Ji(e,t,n){this.k=e,this.x=t,this.y=n}Ji.prototype={constructor:Ji,scale:function(e){return 1===e?this:new Ji(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Ji(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ea=new Ji(1,0,0);function ta(e){e.stopImmediatePropagation()}function na(e){e.preventDefault(),e.stopImmediatePropagation()}function ra(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function oa(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function ia(){return this.__zoom||ea}function aa(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ua(){return navigator.maxTouchPoints||"ontouchstart"in this}function la(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}var ca,sa,fa,da,pa,ha;!function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(ca||(ca={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(sa||(sa={})),function(e){e.Lines="lines",e.Dots="dots"}(fa||(fa={})),function(e){e.Strict="strict",e.Loose="loose"}(da||(da={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep"}(pa||(pa={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(ha||(ha={}));var va=function(e){return{x:e.x,y:e.y,zoom:e.k}},ga=function(e){return e.target.closest(".nowheel")},ma=function(t){var n=t.onMove,r=t.onMoveStart,o=t.onMoveEnd,i=t.zoomOnScroll,a=void 0===i||i,u=t.zoomOnPinch,l=void 0===u||u,c=t.panOnScroll,s=void 0!==c&&c,f=t.panOnScrollSpeed,d=void 0===f?.5:f,p=t.panOnScrollMode,h=void 0===p?ha.Free:p,v=t.zoomOnDoubleClick,g=void 0===v||v,m=t.selectionKeyPressed,y=t.elementsSelectable,b=t.paneMoveable,w=void 0===b||b,_=t.defaultPosition,x=void 0===_?[0,0]:_,E=t.defaultZoom,S=void 0===E?1:E,k=t.translateExtent,O=t.zoomActivationKeyCode,C=t.preventScrolling,N=void 0===C||C,j=t.children,P=(0,e.useRef)(null),M=(0,e.useRef)({x:0,y:0,zoom:0}),T=Qt(),D=Kt((function(e){return e.d3Zoom})),L=Kt((function(e){return e.d3Selection})),A=Kt((function(e){return e.d3ZoomHandler})),I=qt((function(e){return e.initD3Zoom})),z=qt((function(e){return e.updateTransform})),R=un(O);return function(t){var n=qt((function(e){return e.updateSize}));(0,e.useEffect)((function(){var e,r=function(){if(t.current){var e=rn(t.current);0!==e.height&&0!==e.width||console.warn("The React Flow parent container needs a width and a height to render the graph."),n(e)}};return r(),window.onresize=r,t.current&&(e=new ResizeObserver((function(){return r()}))).observe(t.current),function(){window.onresize=null,e&&t.current&&e.unobserve(t.current)}}),[])}(P),(0,e.useEffect)((function(){if(P.current){var e=T.getState(),t="undefined"!==typeof k?k:e.translateExtent,n=function(){var e,t,n,r=ra,o=oa,i=la,a=aa,u=ua,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],s=250,f=qo,d=Cn("start","zoom","end"),p=500,h=0,v=10;function g(e){e.property("__zoom",ia).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",k).filter(u).on("touchstart.zoom",O).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Ji(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new Ji(e.k,r,o)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function w(e,t,n,r){e.on("start.zoom",(function(){_(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,i=arguments,a=_(e,i).event(r),u=o.apply(e,i),l=null==n?b(u):"function"===typeof n?n.apply(e,i):n,c=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),s=e.__zoom,d="function"===typeof t?t.apply(e,i):t,p=f(s.invert(l).concat(c/s.k),d.invert(l).concat(c/d.k));return function(e){if(1===e)e=d;else{var t=p(e),n=c/t[2];e=new Ji(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function _(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function E(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(r.apply(this,arguments)){var u=_(this,n).event(e),s=this.__zoom,f=Math.max(l[0],Math.min(l[1],s.k*Math.pow(2,a.apply(this,arguments)))),d=Gr(e);if(u.wheel)u.mouse[0][0]===d[0]&&u.mouse[0][1]===d[1]||(u.mouse[1]=s.invert(u.mouse[0]=d)),clearTimeout(u.wheel);else{if(s.k===f)return;u.mouse=[d,s.invert(d)],yi(this),u.start()}na(e),u.wheel=setTimeout(p,150),u.zoom("mouse",i(y(m(s,f),u.mouse[0],u.mouse[1]),u.extent,c))}function p(){u.wheel=null,u.end()}}function S(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),a=1;a<t;a++)o[a-1]=arguments[a];if(!n&&r.apply(this,arguments)){var u=e.currentTarget,l=_(this,o,!0).event(e),s=Wr(e.view).on("mousemove.zoom",v,!0).on("mouseup.zoom",g,!0),f=Gr(e,u),d=e.clientX,p=e.clientY;Qr(e.view),ta(e),l.mouse=[f,this.__zoom.invert(f)],yi(this),l.start()}function v(e){if(na(e),!l.moved){var t=e.clientX-d,n=e.clientY-p;l.moved=t*t+n*n>h}l.event(e).zoom("mouse",i(y(l.that.__zoom,l.mouse[0]=Gr(e,u),l.mouse[1]),l.extent,c))}function g(e){s.on("mousemove.zoom mouseup.zoom",null),Zr(e.view,l.moved),na(e),l.event(e).end()}}function k(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];if(r.apply(this,arguments)){var u=this.__zoom,l=Gr(e.changedTouches?e.changedTouches[0]:e,this),f=u.invert(l),d=u.k*(e.shiftKey?.5:2),p=i(y(m(u,d),l,f),o.apply(this,n),c);na(e),s>0?Wr(this).transition().duration(s).call(w,p,l,e):Wr(this).call(g.transform,p,l,e)}}function O(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(r.apply(this,arguments)){var u,l,c,s,f=n.touches,d=f.length,h=_(this,i,n.changedTouches.length===d).event(n);for(ta(n),l=0;l<d;++l)s=[s=Gr(c=f[l],this),this.__zoom.invert(s),c.identifier],h.touch0?h.touch1||h.touch0[2]===s[2]||(h.touch1=s,h.taps=0):(h.touch0=s,u=!0,h.taps=1+!!e);e&&(e=clearTimeout(e)),u&&(h.taps<2&&(t=s[0],e=setTimeout((function(){e=null}),p)),yi(this),h.start())}}function C(e){if(this.__zooming){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o,a,u,l,s=_(this,n).event(e),f=e.changedTouches,d=f.length;for(na(e),o=0;o<d;++o)u=Gr(a=f[o],this),s.touch0&&s.touch0[2]===a.identifier?s.touch0[0]=u:s.touch1&&s.touch1[2]===a.identifier&&(s.touch1[0]=u);if(a=s.that.__zoom,s.touch1){var p=s.touch0[0],h=s.touch0[1],v=s.touch1[0],g=s.touch1[1],b=(b=v[0]-p[0])*b+(b=v[1]-p[1])*b,w=(w=g[0]-h[0])*w+(w=g[1]-h[1])*w;a=m(a,Math.sqrt(b/w)),u=[(p[0]+v[0])/2,(p[1]+v[1])/2],l=[(h[0]+g[0])/2,(h[1]+g[1])/2]}else{if(!s.touch0)return;u=s.touch0[0],l=s.touch0[1]}s.zoom("touch",i(y(a,u,l),s.extent,c))}}function N(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(this.__zooming){var a,u,l=_(this,o).event(e),c=e.changedTouches,s=c.length;for(ta(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),a=0;a<s;++a)u=c[a],l.touch0&&l.touch0[2]===u.identifier?delete l.touch0:l.touch1&&l.touch1[2]===u.identifier&&delete l.touch1;if(l.touch1&&!l.touch0&&(l.touch0=l.touch1,delete l.touch1),l.touch0)l.touch0[1]=this.__zoom.invert(l.touch0[0]);else if(l.end(),2===l.taps&&(u=Gr(u,this),Math.hypot(t[0]-u[0],t[1]-u[1])<v)){var f=Wr(this).on("dblclick.zoom");f&&f.apply(this,arguments)}}}return g.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",ia),e!==o?w(e,t,n,r):o.interrupt().each((function(){_(this,arguments).event(r).start().zoom(null,"function"===typeof t?t.apply(this,arguments):t).end()}))},g.scaleBy=function(e,t,n,r){g.scaleTo(e,(function(){return this.__zoom.k*("function"===typeof t?t.apply(this,arguments):t)}),n,r)},g.scaleTo=function(e,t,n,r){g.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,a=null==n?b(e):"function"===typeof n?n.apply(this,arguments):n,u=r.invert(a),l="function"===typeof t?t.apply(this,arguments):t;return i(y(m(r,l),a,u),e,c)}),n,r)},g.translateBy=function(e,t,n,r){g.transform(e,(function(){return i(this.__zoom.translate("function"===typeof t?t.apply(this,arguments):t,"function"===typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,r)},g.translateTo=function(e,t,n,r,a){g.transform(e,(function(){var e=o.apply(this,arguments),a=this.__zoom,u=null==r?b(e):"function"===typeof r?r.apply(this,arguments):r;return i(ea.translate(u[0],u[1]).scale(a.k).translate("function"===typeof t?-t.apply(this,arguments):-t,"function"===typeof n?-n.apply(this,arguments):-n),e,c)}),r,a)},x.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=Wr(this.that).datum();d.call(e,this.that,new Zi(e,{sourceEvent:this.sourceEvent,target:g,type:e,transform:this.that.__zoom,dispatch:d}),t)}},g.wheelDelta=function(e){return arguments.length?(a="function"===typeof e?e:Qi(+e),g):a},g.filter=function(e){return arguments.length?(r="function"===typeof e?e:Qi(!!e),g):r},g.touchable=function(e){return arguments.length?(u="function"===typeof e?e:Qi(!!e),g):u},g.extent=function(e){return arguments.length?(o="function"===typeof e?e:Qi([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),g):o},g.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],g):[l[0],l[1]]},g.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],g):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},g.constrain=function(e){return arguments.length?(i=e,g):i},g.duration=function(e){return arguments.length?(s=+e,g):s},g.interpolate=function(e){return arguments.length?(f=e,g):f},g.on=function(){var e=d.on.apply(d,arguments);return e===d?g:e},g.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,g):Math.sqrt(h)},g.tapDistance=function(e){return arguments.length?(v=+e,g):v},g}().scaleExtent([e.minZoom,e.maxZoom]).translateExtent(t),r=Wr(P.current).call(n),o=on(x[0],t[0][0],t[1][0]),i=on(x[1],t[0][1],t[1][1]),a=on(S,e.minZoom,e.maxZoom),u=ea.translate(o,i).scale(a);n.transform(r,u),I({d3Zoom:n,d3Selection:r,d3ZoomHandler:r.on("wheel.zoom"),transform:[o,i,a]})}}),[]),(0,e.useEffect)((function(){L&&D&&(s&&!R?L.on("wheel",(function(e){if(ga(e))return!1;e.preventDefault(),e.stopImmediatePropagation();var t=L.property("__zoom").k||1;if(e.ctrlKey&&l){var n=Gr(e),r=-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*10,o=t*Math.pow(2,r);D.scaleTo(L,o,n)}else{var i=1===e.deltaMode?20:1,a=h===ha.Vertical?0:e.deltaX*i,u=h===ha.Horizontal?0:e.deltaY*i;D.translateBy(L,-a/t*d,-u/t*d)}})).on("wheel.zoom",null):"undefined"!==typeof A&&L.on("wheel",(function(e){if(!N||ga(e))return null;e.preventDefault()})).on("wheel.zoom",A))}),[s,h,L,D,A,R,l,N]),(0,e.useEffect)((function(){D&&(m?D.on("zoom",null):D.on("zoom",(function(e){if(z([e.transform.x,e.transform.y,e.transform.k]),n){var t=va(e.transform);n(t)}})))}),[m,D,z,n]),(0,e.useEffect)((function(){D&&(r?D.on("start",(function(e){var t=va(e.transform);M.current=t,r(t)})):D.on("start",null))}),[D,r]),(0,e.useEffect)((function(){D&&(o?D.on("end",(function(e){if(function(e,t){return e.x!==t.x||e.y!==t.y||e.zoom!==t.k}(M.current,e.transform)){var t=va(e.transform);M.current=t,o(t)}})):D.on("end",null))}),[D,o]),(0,e.useEffect)((function(){D&&D.filter((function(e){var t=R||a,n=l&&e.ctrlKey;return!!(w||t||s||g||l)&&(!m&&(!(!g&&"dblclick"===e.type)&&((!ga(e)||"wheel"!==e.type)&&((!e.target.closest(".react-flow__node")&&!e.target.closest(".react-flow__edge")||"wheel"===e.type)&&((!e.target.closest(".react-flow__nodesselection")||"wheel"===e.type)&&(!(!l&&e.ctrlKey&&"wheel"===e.type)&&(!!(t||s||n||"wheel"!==e.type)&&(!!(w||"mousedown"!==e.type&&"touchstart"!==e.type)&&((!e.ctrlKey||"wheel"===e.type)&&!e.button)))))))))}))}),[D,a,l,s,g,w,m,y,R]),e.createElement("div",{className:"react-flow__renderer react-flow__zoompane",ref:P},j)};function ya(e){var t=e.target.closest(".react-flow");if(t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}}var ba=function(){var t=Kt((function(e){return e.userSelectionRect}));return t.draw?e.createElement("div",{className:"react-flow__selection",style:{width:t.width,height:t.height,transform:"translate(".concat(t.x,"px, ").concat(t.y,"px)")}}):null},wa=(0,e.memo)((function(t){var n=t.selectionKeyPressed,r=Kt((function(e){return e.selectionActive})),o=Kt((function(e){return e.elementsSelectable})),i=qt((function(e){return e.setUserSelection})),a=qt((function(e){return e.updateUserSelection})),u=qt((function(e){return e.unsetUserSelection})),l=qt((function(e){return e.unsetNodesSelection}));if(!o||!(r||n))return null;return e.createElement("div",{className:"react-flow__selectionpane",onMouseDown:function(e){var t=ya(e);t&&i(t)},onMouseMove:function(e){if(n&&r){var t=ya(e);t&&a(t)}},onMouseUp:function(){return u()},onMouseLeave:function(){u(),l()}},e.createElement(ba,null))})),_a={exports:{}},xa={};function Ea(e){var t,n,r="";if("string"===typeof e||"number"===typeof e)r+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ea(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var Sa=Object.freeze({__proto__:null,default:function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ea(e))&&(r&&(r+=" "),r+=t);return r}}),ka=V(Sa),Oa={},Ca={};Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.findInArray=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Ca.isFunction=function(e){return"function"===typeof e||"[object Function]"===Object.prototype.toString.call(e)},Ca.isNum=function(e){return"number"===typeof e&&!isNaN(e)},Ca.int=function(e){return parseInt(e,10)},Ca.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))};var Na={};Object.defineProperty(Na,"__esModule",{value:!0}),Na.getPrefix=Pa,Na.browserPrefixToKey=Ma,Na.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},Na.default=void 0;var ja=["Moz","Webkit","O","ms"];function Pa(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window)return"";var r=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!r)return"";if(n in r)return"";for(var o=0;o<ja.length;o++)if(Ma(n,ja[o])in r)return ja[o];return""}function Ma(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var Ta=Pa();function Da(e){return Da="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},Da(e)}Na.default=Ta,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.matchesSelector=Ua,Oa.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(Ua(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Oa.addEvent=function(e,t,n,r){if(!e)return;var o=Ra({capture:!0},r);e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Oa.removeEvent=function(e,t,n,r){if(!e)return;var o=Ra({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Oa.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,La.int)(n.borderTopWidth),t+=(0,La.int)(n.borderBottomWidth)},Oa.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,La.int)(n.borderLeftWidth),t+=(0,La.int)(n.borderRightWidth)},Oa.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,La.int)(n.paddingTop),t-=(0,La.int)(n.paddingBottom)},Oa.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,La.int)(n.paddingLeft),t-=(0,La.int)(n.paddingRight)},Oa.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},Oa.createCSSTransform=function(e,t){var n=$a(e,t,"px");return Ba({},(0,Aa.browserPrefixToKey)("transform",Aa.default),n)},Oa.createSVGTransform=function(e,t){return $a(e,t,"")},Oa.getTranslation=$a,Oa.getTouch=function(e,t){return e.targetTouches&&(0,La.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,La.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},Oa.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},Oa.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&Va(e.body,"react-draggable-transparent-selection")},Oa.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&Ha(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(Le){}},Oa.addClassName=Va,Oa.removeClassName=Ha;var La=Ca,Aa=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==Da(e)&&"function"!==typeof e)return{default:e};var n=Ia(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(Na);function Ia(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Ia=function(e){return e?n:t})(e)}function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?za(Object(n),!0).forEach((function(t){Ba(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ba(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fa="";function Ua(e,t){return Fa||(Fa=(0,La.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,La.isFunction)(e[t])}))),!!(0,La.isFunction)(e[Fa])&&e[Fa](t)}function $a(e,t,n){var r=e.x,o=e.y,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){var a="".concat("string"===typeof t.x?t.x:t.x+n),u="".concat("string"===typeof t.y?t.y:t.y+n);i="translate(".concat(a,", ").concat(u,")")+i}return i}function Va(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function Ha(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Ya={};Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var r=e.props.bounds;r="string"===typeof r?r:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(r);var o=Ga(e);if("string"===typeof r){var i,a=o.ownerDocument,u=a.defaultView;if(!((i="parent"===r?o.parentNode:a.querySelector(r))instanceof u.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');var l=i,c=u.getComputedStyle(o),s=u.getComputedStyle(l);r={left:-o.offsetLeft+(0,Xa.int)(s.paddingLeft)+(0,Xa.int)(c.marginLeft),top:-o.offsetTop+(0,Xa.int)(s.paddingTop)+(0,Xa.int)(c.marginTop),right:(0,Wa.innerWidth)(l)-(0,Wa.outerWidth)(o)-o.offsetLeft+(0,Xa.int)(s.paddingRight)-(0,Xa.int)(c.marginRight),bottom:(0,Wa.innerHeight)(l)-(0,Wa.outerHeight)(o)-o.offsetTop+(0,Xa.int)(s.paddingBottom)-(0,Xa.int)(c.marginBottom)}}(0,Xa.isNum)(r.right)&&(t=Math.min(t,r.right));(0,Xa.isNum)(r.bottom)&&(n=Math.min(n,r.bottom));(0,Xa.isNum)(r.left)&&(t=Math.max(t,r.left));(0,Xa.isNum)(r.top)&&(n=Math.max(n,r.top));return[t,n]},Ya.snapToGrid=function(e,t,n){var r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]},Ya.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Ya.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Ya.getControlPosition=function(e,t,n){var r="number"===typeof t?(0,Wa.getTouch)(e,t):null;if("number"===typeof t&&!r)return null;var o=Ga(n),i=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,Wa.offsetXYFromParent)(r||e,i,n.props.scale)},Ya.createCoreData=function(e,t,n){var r=e.state,o=!(0,Xa.isNum)(r.lastX),i=Ga(e);return o?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:n}},Ya.createDraggableData=function(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}};var Xa=Ca,Wa=Oa;function Ga(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var qa={},Ka={};function Qa(e){return Qa="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},Qa(e)}Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.default=function(){},Object.defineProperty(qa,"__esModule",{value:!0}),qa.default=void 0;var Za=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==Qa(e)&&"function"!==typeof e)return{default:e};var n=au(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(e),Ja=iu(H.exports),eu=iu(t),tu=Oa,nu=Ya,ru=Ca,ou=iu(Ka);function iu(e){return e&&e.__esModule?e:{default:e}}function au(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(au=function(e){return e?n:t})(e)}function uu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){u=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return lu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function su(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 fu(e,t){return fu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},fu(e,t)}function du(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(Le){return!1}}();return function(){var n,r=vu(e);if(t){var o=vu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pu(this,n)}}function pu(e,t){if(t&&("object"===Qa(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hu(e)}function hu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vu(e){return vu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},vu(e)}function gu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mu={start:"touchstart",move:"touchmove",stop:"touchend"},yu={start:"mousedown",move:"mousemove",stop:"mouseup"},bu=yu,wu=function(e){!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&&fu(e,t)}(i,e);var t,n,r,o=du(i);function i(){var e;cu(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gu(hu(e=o.call.apply(o,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),gu(hu(e),"mounted",!1),gu(hu(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"===typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,tu.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,tu.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var o=(0,tu.getTouchIdentifier)(t);e.setState({touchIdentifier:o});var i=(0,nu.getControlPosition)(t,o,hu(e));if(null!=i){var a=i.x,u=i.y,l=(0,nu.createCoreData)(hu(e),a,u);(0,ou.default)("DraggableCore: handleDragStart: %j",l),(0,ou.default)("calling",e.props.onStart),!1!==e.props.onStart(t,l)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,tu.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:a,lastY:u}),(0,tu.addEvent)(r,bu.move,e.handleDrag),(0,tu.addEvent)(r,bu.stop,e.handleDragStop))}}})),gu(hu(e),"handleDrag",(function(t){var n=(0,nu.getControlPosition)(t,e.state.touchIdentifier,hu(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var i=r-e.state.lastX,a=o-e.state.lastY,u=uu((0,nu.snapToGrid)(e.props.grid,i,a),2);if(i=u[0],a=u[1],!i&&!a)return;r=e.state.lastX+i,o=e.state.lastY+a}var l=(0,nu.createCoreData)(hu(e),r,o);if((0,ou.default)("DraggableCore: handleDrag: %j",l),!1!==e.props.onDrag(t,l)&&!1!==e.mounted)e.setState({lastX:r,lastY:o});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(s){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(c)}}})),gu(hu(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,nu.getControlPosition)(t,e.state.touchIdentifier,hu(e));if(null!=n){var r=n.x,o=n.y,i=(0,nu.createCoreData)(hu(e),r,o);if(!1===e.props.onStop(t,i)||!1===e.mounted)return!1;var a=e.findDOMNode();a&&e.props.enableUserSelectHack&&(0,tu.removeUserSelectStyles)(a.ownerDocument),(0,ou.default)("DraggableCore: handleDragStop: %j",i),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),a&&((0,ou.default)("DraggableCore: Removing handlers"),(0,tu.removeEvent)(a.ownerDocument,bu.move,e.handleDrag),(0,tu.removeEvent)(a.ownerDocument,bu.stop,e.handleDragStop))}}})),gu(hu(e),"onMouseDown",(function(t){return bu=yu,e.handleDragStart(t)})),gu(hu(e),"onMouseUp",(function(t){return bu=yu,e.handleDragStop(t)})),gu(hu(e),"onTouchStart",(function(t){return bu=mu,e.handleDragStart(t)})),gu(hu(e),"onTouchEnd",(function(t){return bu=mu,e.handleDragStop(t)})),e}return t=i,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,tu.addEvent)(e,mu.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,tu.removeEvent)(t,yu.move,this.handleDrag),(0,tu.removeEvent)(t,mu.move,this.handleDrag),(0,tu.removeEvent)(t,yu.stop,this.handleDragStop),(0,tu.removeEvent)(t,mu.stop,this.handleDragStop),(0,tu.removeEvent)(e,mu.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,tu.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:eu.default.findDOMNode(this)}},{key:"render",value:function(){return Za.cloneElement(Za.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&su(t.prototype,n),r&&su(t,r),i}(Za.Component);qa.default=wu,gu(wu,"displayName","DraggableCore"),gu(wu,"propTypes",{allowAnyClick:Ja.default.bool,disabled:Ja.default.bool,enableUserSelectHack:Ja.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Ja.default.arrayOf(Ja.default.number),handle:Ja.default.string,cancel:Ja.default.string,nodeRef:Ja.default.object,onStart:Ja.default.func,onDrag:Ja.default.func,onStop:Ja.default.func,onMouseDown:Ja.default.func,scale:Ja.default.number,className:ru.dontSetMe,style:ru.dontSetMe,transform:ru.dontSetMe}),gu(wu,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(n){function r(e){return r="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},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"DraggableCore",{enumerable:!0,get:function(){return f.default}}),n.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var u=i?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(e),i=h(H.exports),a=h(t),u=h(ka),l=Oa,c=Ya,s=Ca,f=h(qa),d=h(Ka),p=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function h(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}function m(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){u=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(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 E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function S(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(Le){return!1}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=function(e){!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&&E(e,t)}(s,e);var t,n,r,i=S(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),N(O(t=i.call(this,e)),"onDragStart",(function(e,n){if((0,d.default)("Draggable: onDragStart: %j",n),!1===t.props.onStart(e,(0,c.createDraggableData)(O(t),n)))return!1;t.setState({dragging:!0,dragged:!0})})),N(O(t),"onDrag",(function(e,n){if(!t.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",n);var r=(0,c.createDraggableData)(O(t),n),o={x:r.x,y:r.y};if(t.props.bounds){var i=o.x,a=o.y;o.x+=t.state.slackX,o.y+=t.state.slackY;var u=w((0,c.getBoundPosition)(O(t),o.x,o.y),2),l=u[0],s=u[1];o.x=l,o.y=s,o.slackX=t.state.slackX+(i-o.x),o.slackY=t.state.slackY+(a-o.y),r.x=o.x,r.y=o.y,r.deltaX=o.x-t.state.x,r.deltaY=o.y-t.state.y}if(!1===t.props.onDrag(e,r))return!1;t.setState(o)})),N(O(t),"onDragStop",(function(e,n){if(!t.state.dragging)return!1;if(!1===t.props.onStop(e,(0,c.createDraggableData)(O(t),n)))return!1;(0,d.default)("Draggable: onDragStop: %j",n);var r={dragging:!1,slackX:0,slackY:0};if(Boolean(t.props.position)){var o=t.props.position,i=o.x,a=o.y;r.x=i,r.y=a}t.setState(r)})),t.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:b({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return t=s,n=[{key:"componentDidMount",value:function(){"undefined"!==typeof window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:a.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props;t.axis,t.bounds;var n=t.children,r=t.defaultPosition,i=t.defaultClassName,a=t.defaultClassNameDragging,s=t.defaultClassNameDragged,d=t.position,h=t.positionOffset;t.scale;var v=m(t,p),y={},w=null,_=!Boolean(d)||this.state.dragging,x=d||r,E={x:(0,c.canDragX)(this)&&_?this.state.x:x.x,y:(0,c.canDragY)(this)&&_?this.state.y:x.y};this.state.isElementSVG?w=(0,l.createSVGTransform)(E,h):y=(0,l.createCSSTransform)(E,h);var S=(0,u.default)(n.props.className||"",i,(N(e={},a,this.state.dragging),N(e,s,this.state.dragged),e));return o.createElement(f.default,g({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.cloneElement(o.Children.only(n),{className:S,style:b(b({},n.props.style),y),transform:w}))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:b({},n)})}}],n&&x(t.prototype,n),r&&x(t,r),s}(o.Component);n.default=j,N(j,"displayName","Draggable"),N(j,"propTypes",b(b({},f.default.propTypes),{},{axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe})),N(j,"defaultProps",b(b({},f.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))}(xa);var _u=xa.default,xu=xa.DraggableCore;_a.exports=_u,_a.exports.default=_u;var Eu=_a.exports.DraggableCore=xu,Su=_a.exports;function ku(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ou(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ku(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ku(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cu=function(t){var n=t.onSelectionDragStart,r=t.onSelectionDrag,o=t.onSelectionDragStop,i=t.onSelectionContextMenu,a=tn(Kt((function(e){return e.transform})),3),u=a[0],l=a[1],c=a[2],s=Kt((function(e){return e.selectedNodesBbox})),f=Kt((function(e){return e.selectionActive})),d=Kt((function(e){return e.selectedElements})),p=Kt((function(e){return e.snapToGrid})),h=Kt((function(e){return e.snapGrid})),v=Kt((function(e){return e.nodes})),g=qt((function(e){return e.updateNodePosDiff})),m=(0,e.useRef)(null),y=(0,e.useMemo)((function(){return p?h:[1,1]}),[p,h]),b=(0,e.useMemo)((function(){return d?d.filter(fn).map((function(e){var t=v.find((function(t){return t.id===e.id}));return Ou(Ou({},t),{},{position:null===t||void 0===t?void 0:t.__rf.position})})):[]}),[d,v]),w=(0,e.useMemo)((function(){return{transform:"translate(".concat(u,"px,").concat(l,"px) scale(").concat(c,")")}}),[u,l,c]),_=(0,e.useMemo)((function(){return{width:s.width,height:s.height,top:s.y,left:s.x}}),[s]),x=(0,e.useCallback)((function(e){null===n||void 0===n||n(e,b)}),[n,b]),E=(0,e.useCallback)((function(e,t){r&&r(e,b),g({diff:{x:t.deltaX,y:t.deltaY},isDragging:!0})}),[r,b,g]),S=(0,e.useCallback)((function(e){g({isDragging:!1}),null===o||void 0===o||o(e,b)}),[b,o]),k=(0,e.useCallback)((function(e){var t=d?d.filter(fn).map((function(e){return v.find((function(t){return t.id===e.id}))})):[];null===i||void 0===i||i(e,t)}),[i]);return!d||f?null:e.createElement("div",{className:"react-flow__nodesselection",style:w},e.createElement(Su,{scale:c,grid:y,onStart:function(e){return x(e)},onDrag:function(e,t){return E(e,t)},onStop:function(e){return S(e)},nodeRef:m,enableUserSelectHack:!1},e.createElement("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:k,style:_})))},Nu=function(t){var n=t.children,r=t.onPaneClick,o=t.onPaneContextMenu,i=t.onPaneScroll,a=t.onElementsRemove,u=t.deleteKeyCode,l=t.onMove,c=t.onMoveStart,s=t.onMoveEnd,f=t.selectionKeyCode,d=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,h=t.elementsSelectable,v=t.zoomOnScroll,g=t.zoomOnPinch,m=t.panOnScroll,y=t.panOnScrollSpeed,b=t.panOnScrollMode,w=t.zoomOnDoubleClick,_=t.paneMoveable,x=t.defaultPosition,E=t.defaultZoom,S=t.translateExtent,k=t.preventScrolling,O=t.onSelectionDragStart,C=t.onSelectionDrag,N=t.onSelectionDragStop,j=t.onSelectionContextMenu,P=qt((function(e){return e.unsetNodesSelection})),M=qt((function(e){return e.resetSelectedElements})),T=Kt((function(e){return e.nodesSelectionActive})),D=un(f);!function(t){var n=t.deleteKeyCode,r=t.multiSelectionKeyCode,o=t.onElementsRemove,i=Qt(),a=qt((function(e){return e.unsetNodesSelection})),u=qt((function(e){return e.setMultiSelectionActive})),l=qt((function(e){return e.resetSelectedElements})),c=un(n),s=un(r);(0,e.useEffect)((function(){var e=i.getState(),t=e.edges,n=e.selectedElements;if(o&&c&&n){var r=n.filter(fn),u=_n(r,t),s=[].concat(en(n),en(u)).reduce((function(e,t){return e.set(t.id,t)}),new Map);o(Array.from(s.values())),a(),l()}}),[c]),(0,e.useEffect)((function(){u(s)}),[s])}({onElementsRemove:a,deleteKeyCode:u,multiSelectionKeyCode:d});var L=(0,e.useCallback)((function(e){null===r||void 0===r||r(e),P(),M()}),[r]),A=(0,e.useCallback)((function(e){null===o||void 0===o||o(e)}),[o]),I=(0,e.useCallback)((function(e){null===i||void 0===i||i(e)}),[i]);return e.createElement(ma,{onMove:l,onMoveStart:c,onMoveEnd:s,selectionKeyPressed:D,elementsSelectable:h,zoomOnScroll:v,zoomOnPinch:g,panOnScroll:m,panOnScrollSpeed:y,panOnScrollMode:b,zoomOnDoubleClick:w,paneMoveable:_,defaultPosition:x,defaultZoom:E,translateExtent:S,zoomActivationKeyCode:p,preventScrolling:k},n,e.createElement(wa,{selectionKeyPressed:D}),T&&e.createElement(Cu,{onSelectionDragStart:O,onSelectionDrag:C,onSelectionDragStop:N,onSelectionContextMenu:j}),e.createElement("div",{className:"react-flow__pane",onClick:L,onContextMenu:A,onWheel:I}))};Nu.displayName="FlowRenderer";var ju=(0,e.memo)(Nu),Pu=function(t){var n=Kt((function(e){return e.transform})),r=Kt((function(e){return e.selectedElements})),o=Kt((function(e){return e.nodesDraggable})),i=Kt((function(e){return e.nodesConnectable})),a=Kt((function(e){return e.elementsSelectable})),u=Kt((function(e){return e.width})),l=Kt((function(e){return e.height})),c=Kt((function(e){return e.nodes})),s=qt((function(e){return e.updateNodeDimensions})),f=t.onlyRenderVisibleElements?wn(c,{x:0,y:0,width:u,height:l},n,!0):c,d=(0,e.useMemo)((function(){return{transform:"translate(".concat(n[0],"px,").concat(n[1],"px) scale(").concat(n[2],")")}}),[n[0],n[1],n[2]]),p=(0,e.useMemo)((function(){return"undefined"===typeof ResizeObserver?null:new ResizeObserver((function(e){var t=e.map((function(e){return{id:e.target.getAttribute("data-id"),nodeElement:e.target}}));s(t)}))}),[]);return e.createElement("div",{className:"react-flow__nodes",style:d},f.map((function(u){var l=u.type||"default",c=t.nodeTypes[l]||t.nodeTypes.default;t.nodeTypes[l]||console.warn('Node type "'.concat(l,'" not found. Using fallback type "default".'));var s=!!(u.draggable||o&&"undefined"===typeof u.draggable),f=!!(u.selectable||a&&"undefined"===typeof u.selectable),d=!!(u.connectable||i&&"undefined"===typeof u.connectable);return e.createElement(c,{key:u.id,id:u.id,className:u.className,style:u.style,type:l,data:u.data,sourcePosition:u.sourcePosition,targetPosition:u.targetPosition,isHidden:u.isHidden,xPos:u.__rf.position.x,yPos:u.__rf.position.y,isDragging:u.__rf.isDragging,isInitialized:null!==u.__rf.width&&null!==u.__rf.height,snapGrid:t.snapGrid,snapToGrid:t.snapToGrid,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onElementClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onNodeDoubleClick:t.onNodeDoubleClick,onNodeDragStart:t.onNodeDragStart,onNodeDrag:t.onNodeDrag,onNodeDragStop:t.onNodeDragStop,scale:n[2],selected:(null===r||void 0===r?void 0:r.some((function(e){return e.id===u.id})))||!1,isDraggable:s,isSelectable:f,isConnectable:d,resizeObserver:p,dragHandle:u.dragHandle})})))};Pu.displayName="NodeRenderer";var Mu=(0,e.memo)(Pu),Tu=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function Du(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Lu=function(t){var n=t.x,r=t.y,o=t.label,i=t.labelStyle,a=void 0===i?{}:i,u=t.labelShowBg,l=void 0===u||u,c=t.labelBgStyle,s=void 0===c?{}:c,f=t.labelBgPadding,d=void 0===f?[2,4]:f,p=t.labelBgBorderRadius,h=void 0===p?2:p,v=t.children,g=t.className,m=D(t,Tu),y=(0,e.useRef)(null),b=tn((0,e.useState)({x:0,y:0,width:0,height:0}),2),w=b[0],_=b[1],x=L(["react-flow__edge-textwrapper",g]);return(0,e.useEffect)((function(){if(y.current){var e=y.current.getBBox();_({x:e.x,y:e.y,width:e.width,height:e.height})}}),[o]),"undefined"!==typeof o&&o?e.createElement("g",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Du(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Du(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({transform:"translate(".concat(n-w.width/2," ").concat(r-w.height/2,")"),className:x},m),l&&e.createElement("rect",{width:w.width+2*d[0],x:-d[0],y:-d[1],height:w.height+2*d[1],className:"react-flow__edge-textbg",style:s,rx:h,ry:h}),e.createElement("text",{className:"react-flow__edge-text",y:w.height/2,dy:"0.3em",ref:y,style:a},o),v):null},Au=(0,e.memo)(Lu),Iu=function(e,t){return"undefined"!==typeof t&&t?"url(#".concat(t,")"):"undefined"!==typeof e?"url(#react-flow__".concat(e,")"):"none"},zu=[ca.Left,ca.Right],Ru=function(e){var t=e.sourceX,n=e.sourceY,r=e.targetX,o=e.targetY,i=e.sourcePosition,a=void 0===i?ca.Bottom:i,u=e.targetPosition,l=void 0===u?ca.Top:u,c=zu.includes(a),s=zu.includes(l);if(c&&!s||s&&!c){var f=c?Math.abs(r-t):0,d=t>r?t-f:t+f,p=c?0:Math.abs(o-n);return[d,n<o?n+p:n-p,f,p]}var h=Math.abs(r-t)/2,v=r<t?r+h:r-h,g=Math.abs(o-n)/2;return[v,o<n?o+g:o-g,h,g]};function Bu(e){var t=e.sourceX,n=e.sourceY,r=e.sourcePosition,o=void 0===r?ca.Bottom:r,i=e.targetX,a=e.targetY,u=e.targetPosition,l=void 0===u?ca.Top:u,c=e.centerX,s=e.centerY,f=tn(Ru({sourceX:t,sourceY:n,targetX:i,targetY:a}),2),d=f[0],p=f[1],h=[ca.Left,ca.Right],v="undefined"!==typeof c?c:d,g="undefined"!==typeof s?s:p,m="M".concat(t,",").concat(n," C").concat(t,",").concat(g," ").concat(i,",").concat(g," ").concat(i,",").concat(a);return h.includes(o)&&h.includes(l)?m="M".concat(t,",").concat(n," C").concat(v,",").concat(n," ").concat(v,",").concat(a," ").concat(i,",").concat(a):h.includes(l)?m="M".concat(t,",").concat(n," Q").concat(t,",").concat(a," ").concat(i,",").concat(a):h.includes(o)&&(m="M".concat(t,",").concat(n," Q").concat(i,",").concat(n," ").concat(i,",").concat(a)),m}var Fu=(0,e.memo)((function(t){var n=t.sourceX,r=t.sourceY,o=t.targetX,i=t.targetY,a=t.sourcePosition,u=void 0===a?ca.Bottom:a,l=t.targetPosition,c=void 0===l?ca.Top:l,s=t.label,f=t.labelStyle,d=t.labelShowBg,p=t.labelBgStyle,h=t.labelBgPadding,v=t.labelBgBorderRadius,g=t.style,m=t.arrowHeadType,y=t.markerEndId,b=tn(Ru({sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:u,targetPosition:c}),2),w=b[0],_=b[1],x=Bu({sourceX:n,sourceY:r,sourcePosition:u,targetX:o,targetY:i,targetPosition:c}),E=s?e.createElement(Au,{x:w,y:_,label:s,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:h,labelBgBorderRadius:v}):null,S=Iu(m,y);return e.createElement(e.Fragment,null,e.createElement("path",{style:g,d:x,className:"react-flow__edge-path",markerEnd:S}),E)})),Uu=function(e,t,n){return"L ".concat(e,",").concat(t-n,"Q ").concat(e,",").concat(t," ").concat(e+n,",").concat(t)},$u=function(e,t,n){return"L ".concat(e+n,",").concat(t,"Q ").concat(e,",").concat(t," ").concat(e,",").concat(t-n)},Vu=function(e,t,n){return"L ".concat(e,",").concat(t-n,"Q ").concat(e,",").concat(t," ").concat(e-n,",").concat(t)},Hu=function(e,t,n){return"L ".concat(e-n,",").concat(t,"Q ").concat(e,",").concat(t," ").concat(e,",").concat(t-n)},Yu=function(e,t,n){return"L ".concat(e+n,",").concat(t,"Q ").concat(e,",").concat(t," ").concat(e,",").concat(t+n)},Xu=function(e,t,n){return"L ".concat(e,",").concat(t+n,"Q ").concat(e,",").concat(t," ").concat(e+n,",").concat(t)},Wu=function(e,t,n){return"L ".concat(e,",").concat(t+n,"Q ").concat(e,",").concat(t," ").concat(e-n,",").concat(t)},Gu=function(e,t,n){return"L ".concat(e-n,",").concat(t,"Q ").concat(e,",").concat(t," ").concat(e,",").concat(t+n)};function qu(e){var t=e.sourceX,n=e.sourceY,r=e.sourcePosition,o=void 0===r?ca.Bottom:r,i=e.targetX,a=e.targetY,u=e.targetPosition,l=void 0===u?ca.Top:u,c=e.borderRadius,s=void 0===c?5:c,f=e.centerX,d=e.centerY,p=tn(Ru({sourceX:t,sourceY:n,targetX:i,targetY:a}),4),h=p[0],v=p[1],g=p[2],m=p[3],y=Math.min(s,Math.abs(i-t)),b=Math.min(s,Math.abs(a-n)),w=Math.min(y,b,g,m),_=[ca.Left,ca.Right],x="undefined"!==typeof f?f:h,E="undefined"!==typeof d?d:v,S=null,k=null;return t<=i?(S=n<=a?Uu(t,E,w):Xu(t,E,w),k=n<=a?Gu(i,E,w):Hu(i,E,w)):(S=n<a?Vu(t,E,w):Wu(t,E,w),k=n<a?Yu(i,E,w):$u(i,E,w)),_.includes(o)&&_.includes(l)?t<=i?(S=n<=a?Gu(x,n,w):Hu(x,n,w),k=n<=a?Uu(x,a,w):Xu(x,a,w)):(o===ca.Right&&l===ca.Left||o===ca.Left&&l===ca.Right||o===ca.Left&&l===ca.Left)&&(S=n<=a?Yu(x,n,w):$u(x,n,w),k=n<=a?Vu(x,a,w):Wu(x,a,w)):_.includes(o)&&!_.includes(l)?(S=t<=i?n<=a?Gu(i,n,w):Hu(i,n,w):n<=a?Yu(i,n,w):$u(i,n,w),k=""):!_.includes(o)&&_.includes(l)&&(S=t<=i?n<=a?Uu(t,a,w):Xu(t,a,w):n<=a?Vu(t,a,w):Wu(t,a,w),k=""),"M ".concat(t,",").concat(n).concat(S).concat(k,"L ").concat(i,",").concat(a)}var Ku=(0,e.memo)((function(t){var n=t.sourceX,r=t.sourceY,o=t.targetX,i=t.targetY,a=t.label,u=t.labelStyle,l=t.labelShowBg,c=t.labelBgStyle,s=t.labelBgPadding,f=t.labelBgBorderRadius,d=t.style,p=t.sourcePosition,h=void 0===p?ca.Bottom:p,v=t.targetPosition,g=void 0===v?ca.Top:v,m=t.arrowHeadType,y=t.markerEndId,b=t.borderRadius,w=void 0===b?5:b,_=tn(Ru({sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:h,targetPosition:g}),2),x=_[0],E=_[1],S=qu({sourceX:n,sourceY:r,sourcePosition:h,targetX:o,targetY:i,targetPosition:g,borderRadius:w}),k=Iu(m,y),O=a?e.createElement(Au,{x:x,y:E,label:a,labelStyle:u,labelShowBg:l,labelBgStyle:c,labelBgPadding:s,labelBgBorderRadius:f}):null;return e.createElement(e.Fragment,null,e.createElement("path",{style:d,className:"react-flow__edge-path",d:S,markerEnd:k}),O)})),Qu=function(t){var n=t.connectionNodeId,r=t.connectionHandleId,o=t.connectionHandleType,i=t.connectionLineStyle,a=t.connectionPositionX,u=t.connectionPositionY,l=t.connectionLineType,c=void 0===l?pa.Bezier:l,s=t.nodes,f=void 0===s?[]:s,d=t.transform,p=t.isConnectable,h=t.CustomConnectionLineComponent,v=tn((0,e.useState)(null),2),g=v[0],m=v[1],y=n,b=r;if((0,e.useEffect)((function(){var e=f.find((function(e){return e.id===y}))||null;m(e)}),[]),!g||!p)return null;var w=function(e,t,n){var r="source"===n?"target":"source",o=t.__rf.handleBounds[n]||t.__rf.handleBounds[r];return e?o.find((function(t){return t.id===e})):o[0]}(b,g,o),_=w?w.x+w.width/2:g.__rf.width/2,x=w?w.y+w.height/2:g.__rf.height,E=g.__rf.position.x+_,S=g.__rf.position.y+x,k=(a-d[0])/d[2],O=(u-d[1])/d[2],C=(null===w||void 0===w?void 0:w.position)===ca.Left||(null===w||void 0===w?void 0:w.position)===ca.Right?ca.Left:ca.Top;if(h)return e.createElement("g",{className:"react-flow__connection"},e.createElement(h,{sourceX:E,sourceY:S,sourcePosition:null===w||void 0===w?void 0:w.position,targetX:k,targetY:O,targetPosition:C,connectionLineType:c,connectionLineStyle:i,sourceNode:g,sourceHandle:w}));var N="";return N=c===pa.Bezier?Bu({sourceX:E,sourceY:S,sourcePosition:null===w||void 0===w?void 0:w.position,targetX:k,targetY:O,targetPosition:C}):c===pa.Step?qu({sourceX:E,sourceY:S,sourcePosition:null===w||void 0===w?void 0:w.position,targetX:k,targetY:O,targetPosition:C,borderRadius:0}):c===pa.SmoothStep?qu({sourceX:E,sourceY:S,sourcePosition:null===w||void 0===w?void 0:w.position,targetX:k,targetY:O,targetPosition:C}):"M".concat(E,",").concat(S," ").concat(k,",").concat(O),e.createElement("g",{className:"react-flow__connection"},e.createElement("path",{d:N,className:"react-flow__connection-path",style:i}))},Zu=function(t){var n=t.id,r=t.children;return e.createElement("marker",{className:"react-flow__arrowhead",id:n,markerWidth:"12.5",markerHeight:"12.5",viewBox:"-10 -10 20 20",orient:"auto",refX:"0",refY:"0"},r)},Ju=function(t){var n=t.color;return e.createElement("defs",null,e.createElement(Zu,{id:"react-flow__arrowclosed"},e.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})),e.createElement(Zu,{id:"react-flow__arrow"},e.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",fill:"none",points:"-5,-4 0,0 -5,4"})))};function el(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?el(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):el(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ju.displayName="MarkerDefinitions";var nl=(0,e.memo)((function(t){return e.createElement(Ku,tl(tl({},t),{},{borderRadius:0}))})),rl=(0,e.memo)((function(t){var n=t.sourceX,r=t.sourceY,o=t.targetX,i=t.targetY,a=t.label,u=t.labelStyle,l=t.labelShowBg,c=t.labelBgStyle,s=t.labelBgPadding,f=t.labelBgBorderRadius,d=t.style,p=t.arrowHeadType,h=t.markerEndId,v=Math.abs(i-r)/2,g=i<r?i+v:i-v,m=Math.abs(o-n)/2,y=o<n?o+m:o-m,b=Iu(p,h),w=a?e.createElement(Au,{x:y,y:g,label:a,labelStyle:u,labelShowBg:l,labelBgStyle:c,labelBgPadding:s,labelBgBorderRadius:f}):null;return e.createElement(e.Fragment,null,e.createElement("path",{style:d,className:"react-flow__edge-path",d:"M ".concat(n,",").concat(r,"L ").concat(o,",").concat(i),markerEnd:b}),w)}));function ol(e,t,n,r,o,i,a){var u=a.elementFromPoint(e.clientX,e.clientY),l=(null===u||void 0===u?void 0:u.classList.contains("target"))||!1,c=(null===u||void 0===u?void 0:u.classList.contains("source"))||!1,s={elementBelow:u,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(u&&(l||c)&&(s.isHoveringHandle=!0,t!==da.Strict||(n&&c||!n&&l))){var f=u.getAttribute("data-nodeid"),d=u.getAttribute("data-handleid"),p=n?{source:f,sourceHandle:d,target:r,targetHandle:o}:{source:r,sourceHandle:o,target:f,targetHandle:d};s.connection=p,s.isValid=i(p)}return s}function il(e){null===e||void 0===e||e.classList.remove("react-flow__handle-valid"),null===e||void 0===e||e.classList.remove("react-flow__handle-connecting")}function al(e,t,n,r,o,i,a,u,l,c,s,f,d,p){var h=e.target.closest(".react-flow"),v=function(e){var t,n;return(null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||(null===(n=window)||void 0===n?void 0:n.document)}(e.target);if(v){var g=v.elementFromPoint(e.clientX,e.clientY),m=null===g||void 0===g?void 0:g.classList.contains("target"),y=null===g||void 0===g?void 0:g.classList.contains("source");if(h&&(m||y||c)){var b,w=c||(m?"target":"source"),_=h.getBoundingClientRect();o({x:e.clientX-_.left,y:e.clientY-_.top}),r({connectionNodeId:n,connectionHandleId:t,connectionHandleType:w}),null===f||void 0===f||f(e,{nodeId:n,handleId:t,handleType:w}),v.addEventListener("mousemove",x),v.addEventListener("mouseup",(function e(o){var f=ol(o,l,a,n,t,u,v),h=f.connection,g=f.isValid;null===d||void 0===d||d(o),g&&(null===i||void 0===i||i(h)),null===p||void 0===p||p(o),c&&s&&s(o),il(b),r({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),v.removeEventListener("mousemove",x),v.removeEventListener("mouseup",e)}))}}function x(e){o({x:e.clientX-_.left,y:e.clientY-_.top});var r=ol(e,l,a,n,t,u,v),i=r.connection,c=r.elementBelow,s=r.isValid;if(!r.isHoveringHandle)return il(b);!(i.source===i.target)&&c&&(b=c,c.classList.add("react-flow__handle-connecting"),c.classList.toggle("react-flow__handle-valid",s))}}var ul=function(e,t,n){return n===ca.Left?e-t:n===ca.Right?e+t:e},ll=function(e,t,n){return n===ca.Top?e-t:n===ca.Bottom?e+t:e},cl=function(t){var n=t.className,r=t.position,o=t.centerX,i=t.centerY,a=t.radius,u=void 0===a?10:a;return e.createElement("circle",{className:L(["react-flow__edgeupdater",n]),cx:ul(o,u,r),cy:ll(i,u,r),r:u,stroke:"transparent",fill:"transparent"})},sl=function(t){var n=function(n){var r=n.id,o=n.className,i=n.type,a=n.data,u=n.onClick,l=n.onEdgeDoubleClick,c=n.selected,s=n.animated,f=n.label,d=n.labelStyle,p=n.labelShowBg,h=n.labelBgStyle,v=n.labelBgPadding,g=n.labelBgBorderRadius,m=n.style,y=n.arrowHeadType,b=n.source,w=n.target,_=n.sourceX,x=n.sourceY,E=n.targetX,S=n.targetY,k=n.sourcePosition,O=n.targetPosition,C=n.elementsSelectable,N=n.markerEndId,j=n.isHidden,P=n.sourceHandleId,M=n.targetHandleId,T=n.handleEdgeUpdate,D=n.onConnectEdge,A=n.onContextMenu,I=n.onMouseEnter,z=n.onMouseMove,R=n.onMouseLeave,B=n.edgeUpdaterRadius,F=n.onEdgeUpdateStart,U=n.onEdgeUpdateEnd,$=qt((function(e){return e.addSelectedElements})),V=qt((function(e){return e.setConnectionNodeId})),H=qt((function(e){return e.unsetNodesSelection})),Y=qt((function(e){return e.setConnectionPosition})),X=Kt((function(e){return e.connectionMode})),W=tn((0,e.useState)(!1),2),G=W[0],q=W[1],K=!C&&!u,Q=L(["react-flow__edge","react-flow__edge-".concat(i),o,{selected:c,animated:s,inactive:K,updating:G}]),Z=(0,e.useMemo)((function(){var e={id:r,source:b,target:w,type:i};return P&&(e.sourceHandle=P),M&&(e.targetHandle=M),"undefined"!==typeof a&&(e.data=a),e}),[r,b,w,i,P,M,a]),J=(0,e.useCallback)((function(e){C&&(H(),$(Z)),null===u||void 0===u||u(e,Z)}),[C,Z,u]),ee=(0,e.useCallback)((function(e){null===l||void 0===l||l(e,Z)}),[Z,l]),te=(0,e.useCallback)((function(e){null===A||void 0===A||A(e,Z)}),[Z,A]),ne=(0,e.useCallback)((function(e){null===I||void 0===I||I(e,Z)}),[Z,A]),re=(0,e.useCallback)((function(e){null===z||void 0===z||z(e,Z)}),[Z,A]),oe=(0,e.useCallback)((function(e){null===R||void 0===R||R(e,Z)}),[Z,A]),ie=(0,e.useCallback)((function(e,t){var n=t?w:b,r=t?M:P,o=t;null===F||void 0===F||F(e,Z),al(e,r,n,V,Y,D,o,(function(){return!0}),X,t?"target":"source",U?function(e){return U(e,Z)}:void 0)}),[r,b,w,i,P,M,V,Y,Z,D]),ae=(0,e.useCallback)((function(e){ie(e,!0)}),[r,b,P,ie]),ue=(0,e.useCallback)((function(e){ie(e,!1)}),[r,w,M,ie]),le=(0,e.useCallback)((function(){return q(!0)}),[q]),ce=(0,e.useCallback)((function(){return q(!1)}),[q]);return j?null:e.createElement("g",{className:Q,onClick:J,onDoubleClick:ee,onContextMenu:te,onMouseEnter:ne,onMouseMove:re,onMouseLeave:oe},e.createElement(t,{id:r,source:b,target:w,selected:c,animated:s,label:f,labelStyle:d,labelShowBg:p,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:g,data:a,style:m,arrowHeadType:y,sourceX:_,sourceY:x,targetX:E,targetY:S,sourcePosition:k,targetPosition:O,markerEndId:N,sourceHandleId:P,targetHandleId:M}),T&&e.createElement("g",{onMouseDown:ae,onMouseEnter:le,onMouseOut:ce},e.createElement(cl,{position:k,centerX:_,centerY:x,radius:B})),T&&e.createElement("g",{onMouseDown:ue,onMouseEnter:le,onMouseOut:ce},e.createElement(cl,{position:O,centerX:E,centerY:S,radius:B})))};return n.displayName="EdgeWrapper",(0,e.memo)(n)};function fl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fl(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=((null===n||void 0===n?void 0:n.x)||0)+t.__rf.position.x,o=((null===n||void 0===n?void 0:n.y)||0)+t.__rf.position.y,i=(null===n||void 0===n?void 0:n.width)||t.__rf.width,a=(null===n||void 0===n?void 0:n.height)||t.__rf.height;switch(e){case ca.Top:return{x:r+i/2,y:o};case ca.Right:return{x:r+i,y:o+a/2};case ca.Bottom:return{x:r+i/2,y:o+a};case ca.Left:return{x:r,y:o+a/2}}}function hl(e,t){if(!e)return null;var n=null;return 1!==e.length&&t?t&&(n=e.find((function(e){return e.id===t}))):n=e[0],"undefined"===typeof n?null:n}var vl=function(t){var n=t.edge,r=t.props,o=t.nodes,i=t.selectedElements,a=t.elementsSelectable,u=t.transform,l=t.width,c=t.height,s=t.onlyRenderVisibleElements,f=t.connectionMode,d=n.sourceHandle||null,p=n.targetHandle||null,h=function(e,t){return t.reduce((function(t,n){return n.id===e.source&&(t.sourceNode=n),n.id===e.target&&(t.targetNode=n),t}),{sourceNode:null,targetNode:null})}(n,o),v=h.sourceNode,g=h.targetNode,m=(0,e.useCallback)((function(e){var t;null===(t=r.onEdgeUpdate)||void 0===t||t.call(r,n,e)}),[n,r.onEdgeUpdate]);if(!v)return console.warn("couldn't create edge for source id: ".concat(n.source,"; edge id: ").concat(n.id)),null;if(!g)return console.warn("couldn't create edge for target id: ".concat(n.target,"; edge id: ").concat(n.id)),null;if(!v.__rf.width||!g.__rf.width)return null;var y=n.type||"default",b=r.edgeTypes[y]||r.edgeTypes.default,w=g.__rf.handleBounds,_=f===da.Strict?w.target:w.target||w.source,x=hl(v.__rf.handleBounds.source,d),E=hl(_,p),S=x?x.position:ca.Bottom,k=E?E.position:ca.Top;if(!x)return console.warn("couldn't create edge for source handle id: ".concat(d,"; edge id: ").concat(n.id)),null;if(!E)return console.warn("couldn't create edge for target handle id: ".concat(p,"; edge id: ").concat(n.id)),null;var O=function(e,t,n,r,o,i){var a=pl(n,e,t),u=pl(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:u.x,targetY:u.y}}(v,x,S,g,E,k),C=O.sourceX,N=O.sourceY,j=O.targetX,P=O.targetY,M=!s||function(e){var t=e.sourcePos,n=e.targetPos,r=e.width,o=e.height,i=e.transform,a={x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),x2:Math.max(t.x,n.x),y2:Math.max(t.y,n.y)};a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);var u=mn({x:(0-i[0])/i[2],y:(0-i[1])/i[2],width:r/i[2],height:o/i[2]}),l=Math.max(0,Math.min(u.x2,a.x2)-Math.max(u.x,a.x)),c=Math.max(0,Math.min(u.y2,a.y2)-Math.max(u.y,a.y));return Math.ceil(l*c)>0}({sourcePos:{x:C,y:N},targetPos:{x:j,y:P},width:l,height:c,transform:u});if(!M)return null;var T=(null===i||void 0===i?void 0:i.some((function(e){return sn(e)&&e.id===n.id})))||!1;return e.createElement(b,{key:n.id,id:n.id,className:n.className,type:n.type,data:n.data,onClick:r.onElementClick,selected:T,animated:n.animated,label:n.label,labelStyle:n.labelStyle,labelShowBg:n.labelShowBg,labelBgStyle:n.labelBgStyle,labelBgPadding:n.labelBgPadding,labelBgBorderRadius:n.labelBgBorderRadius,style:n.style,arrowHeadType:n.arrowHeadType,source:n.source,target:n.target,sourceHandleId:d,targetHandleId:p,sourceX:C,sourceY:N,targetX:j,targetY:P,sourcePosition:S,targetPosition:k,elementsSelectable:a,markerEndId:r.markerEndId,isHidden:n.isHidden,onConnectEdge:m,handleEdgeUpdate:"undefined"!==typeof r.onEdgeUpdate,onContextMenu:r.onEdgeContextMenu,onMouseEnter:r.onEdgeMouseEnter,onMouseMove:r.onEdgeMouseMove,onMouseLeave:r.onEdgeMouseLeave,edgeUpdaterRadius:r.edgeUpdaterRadius,onEdgeDoubleClick:r.onEdgeDoubleClick,onEdgeUpdateStart:r.onEdgeUpdateStart,onEdgeUpdateEnd:r.onEdgeUpdateEnd})},gl=function(t){var n=Kt((function(e){return e.transform})),r=Kt((function(e){return e.nodes})),o=Kt((function(e){return e.edges})),i=Kt((function(e){return e.connectionNodeId})),a=Kt((function(e){return e.connectionHandleId})),u=Kt((function(e){return e.connectionHandleType})),l=Kt((function(e){return e.connectionPosition})),c=Kt((function(e){return e.selectedElements})),s=Kt((function(e){return e.nodesConnectable})),f=Kt((function(e){return e.elementsSelectable})),d=Kt((function(e){return e.width})),p=Kt((function(e){return e.height}));if(!d)return null;var h=t.connectionLineType,v=t.arrowHeadColor,g=t.connectionLineStyle,m=t.connectionLineComponent,y=t.onlyRenderVisibleElements,b="translate(".concat(n[0],"px,").concat(n[1],"px) scale(").concat(n[2],")"),w=i&&u;return e.createElement("svg",{width:d,height:p,className:"react-flow__edges"},e.createElement(Ju,{color:v}),e.createElement("g",{style:{transform:b}},o.map((function(o){return e.createElement(vl,{key:o.id,edge:o,props:t,nodes:r,selectedElements:c,elementsSelectable:f,transform:n,width:d,height:p,onlyRenderVisibleElements:y})})),w&&e.createElement(Qu,{nodes:r,connectionNodeId:i,connectionHandleId:a,connectionHandleType:u,connectionPositionX:l.x,connectionPositionY:l.y,transform:n,connectionLineStyle:g,connectionLineType:h,isConnectable:s,CustomConnectionLineComponent:m})))};gl.displayName="EdgeRenderer";var ml=(0,e.memo)(gl),yl=.1,bl={zoomIn:function(){},zoomOut:function(){},zoomTo:function(e){},transform:function(e){},fitView:function(){},setCenter:function(e,t){},fitBounds:function(e){},project:function(e){return e},initialized:!1},wl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.transition().duration(t)},_l=function(){var t=Qt(),n=Kt((function(e){return e.d3Zoom})),r=Kt((function(e){return e.d3Selection})),o=(0,e.useMemo)((function(){return r&&n?{zoomIn:function(e){return n.scaleBy(wl(r,e),1.2)},zoomOut:function(e){return n.scaleBy(wl(r,e),1/1.2)},zoomTo:function(e,t){return n.scaleTo(wl(r,t),e)},transform:function(e,t){var o=ea.translate(e.x,e.y).scale(e.zoom);n.transform(wl(r,t),o)},fitView:function(){var e,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{padding:yl,includeHiddenNodes:!1,duration:0},u=t.getState(),l=u.nodes,c=u.width,s=u.height,f=u.minZoom,d=u.maxZoom;if(l.length){var p=bn(a.includeHiddenNodes?l:l.filter((function(e){return!e.isHidden}))),h=kn(p,c,s,null!==(e=a.minZoom)&&void 0!==e?e:f,null!==(o=a.maxZoom)&&void 0!==o?o:d,null!==(i=a.padding)&&void 0!==i?i:yl),v=tn(h,3),g=v[0],m=v[1],y=v[2],b=ea.translate(g,m).scale(y);n.transform(wl(r,a.duration),b)}},setCenter:function(e,o,i,a){var u=t.getState(),l=u.width,c=u.height,s=u.maxZoom,f="undefined"!==typeof i?i:s,d=l/2-e*f,p=c/2-o*f,h=ea.translate(d,p).scale(f);n.transform(wl(r,a),h)},fitBounds:function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yl,i=arguments.length>2?arguments[2]:void 0,a=t.getState(),u=a.width,l=a.height,c=a.minZoom,s=a.maxZoom,f=kn(e,u,l,c,s,o),d=tn(f,3),p=d[0],h=d[1],v=d[2],g=ea.translate(p,h).scale(v);n.transform(wl(r,i),g)},project:function(e){var n=t.getState(),r=n.transform,o=n.snapToGrid,i=n.snapGrid;return dn(e,r,o,i)},initialized:!0}:bl}),[n,r]);return o},xl=function(t){var n=t.nodeTypes,r=t.edgeTypes,o=t.onMove,i=t.onMoveStart,a=t.onMoveEnd,u=t.onLoad,l=t.onElementClick,c=t.onNodeDoubleClick,s=t.onEdgeDoubleClick,f=t.onNodeMouseEnter,d=t.onNodeMouseMove,p=t.onNodeMouseLeave,h=t.onNodeContextMenu,v=t.onNodeDragStart,g=t.onNodeDrag,m=t.onNodeDragStop,y=t.onSelectionDragStart,b=t.onSelectionDrag,w=t.onSelectionDragStop,_=t.onSelectionContextMenu,x=t.connectionMode,E=t.connectionLineType,S=t.connectionLineStyle,k=t.connectionLineComponent,O=t.selectionKeyCode,C=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,j=t.onElementsRemove,P=t.deleteKeyCode,M=t.onConnect,T=t.onConnectStart,D=t.onConnectStop,L=t.onConnectEnd,A=t.snapToGrid,I=t.snapGrid,z=t.onlyRenderVisibleElements,R=t.nodesDraggable,B=t.nodesConnectable,F=t.elementsSelectable,U=t.selectNodesOnDrag,$=t.minZoom,V=t.maxZoom,H=t.defaultZoom,Y=t.defaultPosition,X=t.translateExtent,W=t.preventScrolling,G=t.nodeExtent,q=t.arrowHeadColor,K=t.markerEndId,Q=t.zoomOnScroll,Z=t.zoomOnPinch,J=t.panOnScroll,ee=t.panOnScrollSpeed,te=t.panOnScrollMode,ne=t.zoomOnDoubleClick,re=t.paneMoveable,oe=t.onPaneClick,ie=t.onPaneScroll,ae=t.onPaneContextMenu,ue=t.onEdgeUpdate,le=t.onEdgeContextMenu,ce=t.onEdgeMouseEnter,se=t.onEdgeMouseMove,fe=t.onEdgeMouseLeave,de=t.edgeUpdaterRadius,pe=t.onEdgeUpdateStart,he=t.onEdgeUpdateEnd,ve=(0,e.useRef)(!1),ge=qt((function(e){return e.setOnConnect})),me=qt((function(e){return e.setOnConnectStart})),ye=qt((function(e){return e.setOnConnectStop})),be=qt((function(e){return e.setOnConnectEnd})),we=qt((function(e){return e.setSnapGrid})),_e=qt((function(e){return e.setSnapToGrid})),xe=qt((function(e){return e.setNodesDraggable})),Ee=qt((function(e){return e.setNodesConnectable})),Se=qt((function(e){return e.setElementsSelectable})),ke=qt((function(e){return e.setMinZoom})),Oe=qt((function(e){return e.setMaxZoom})),Ce=qt((function(e){return e.setTranslateExtent})),Ne=qt((function(e){return e.setNodeExtent})),je=qt((function(e){return e.setConnectionMode})),Pe=Qt(),Me=_l(),Te=Me.zoomIn,De=Me.zoomOut,Le=Me.zoomTo,Ae=Me.transform,Ie=Me.fitView,ze=Me.initialized;return(0,e.useEffect)((function(){!ve.current&&ze&&(u&&u({fitView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{padding:.1};return Ie(e)},zoomIn:Te,zoomOut:De,zoomTo:Le,setTransform:Ae,project:pn(Pe),getElements:En(Pe),toObject:Sn(Pe)}),ve.current=!0)}),[u,Te,De,Le,Ae,Ie,ze]),(0,e.useEffect)((function(){M&&ge(M)}),[M]),(0,e.useEffect)((function(){T&&me(T)}),[T]),(0,e.useEffect)((function(){D&&ye(D)}),[D]),(0,e.useEffect)((function(){L&&be(L)}),[L]),(0,e.useEffect)((function(){"undefined"!==typeof A&&_e(A)}),[A]),(0,e.useEffect)((function(){"undefined"!==typeof I&&we(I)}),[I]),(0,e.useEffect)((function(){"undefined"!==typeof R&&xe(R)}),[R]),(0,e.useEffect)((function(){"undefined"!==typeof B&&Ee(B)}),[B]),(0,e.useEffect)((function(){"undefined"!==typeof F&&Se(F)}),[F]),(0,e.useEffect)((function(){"undefined"!==typeof $&&ke($)}),[$]),(0,e.useEffect)((function(){"undefined"!==typeof V&&Oe(V)}),[V]),(0,e.useEffect)((function(){"undefined"!==typeof X&&Ce(X)}),[X]),(0,e.useEffect)((function(){"undefined"!==typeof G&&Ne(G)}),[G]),(0,e.useEffect)((function(){"undefined"!==typeof x&&je(x)}),[x]),e.createElement(ju,{onPaneClick:oe,onPaneContextMenu:ae,onPaneScroll:ie,onElementsRemove:j,deleteKeyCode:P,selectionKeyCode:O,multiSelectionKeyCode:C,zoomActivationKeyCode:N,elementsSelectable:F,onMove:o,onMoveStart:i,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:Z,zoomOnDoubleClick:ne,panOnScroll:J,panOnScrollSpeed:ee,panOnScrollMode:te,paneMoveable:re,defaultPosition:Y,defaultZoom:H,translateExtent:X,onSelectionDragStart:y,onSelectionDrag:b,onSelectionDragStop:w,onSelectionContextMenu:_,preventScrolling:W},e.createElement(Mu,{nodeTypes:n,onElementClick:l,onNodeDoubleClick:c,onNodeMouseEnter:f,onNodeMouseMove:d,onNodeMouseLeave:p,onNodeContextMenu:h,onNodeDragStop:m,onNodeDrag:g,onNodeDragStart:v,selectNodesOnDrag:U,snapToGrid:A,snapGrid:I,onlyRenderVisibleElements:z}),e.createElement(ml,{edgeTypes:r,onElementClick:l,onEdgeDoubleClick:s,connectionLineType:E,connectionLineStyle:S,connectionLineComponent:k,connectionMode:x,arrowHeadColor:q,markerEndId:K,onEdgeUpdate:ue,onlyRenderVisibleElements:z,onEdgeContextMenu:le,onEdgeMouseEnter:ce,onEdgeMouseMove:se,onEdgeMouseLeave:fe,onEdgeUpdateStart:pe,onEdgeUpdateEnd:he,edgeUpdaterRadius:de}))};xl.displayName="GraphView";var El=(0,e.memo)(xl),Sl=function(t){var n=t.elements,r=qt((function(e){return e.setElements}));return(0,e.useEffect)((function(){r(n)}),[n]),null},kl=(0,e.createContext)(null),Ol=kl.Provider;kl.Consumer;var Cl=["type","position","isValidConnection","isConnectable","id","onConnect","children","className"];function Nl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var jl=function(){return!0},Pl=(0,e.forwardRef)((function(t,n){var r=t.type,o=void 0===r?"source":r,i=t.position,a=void 0===i?ca.Top:i,u=t.isValidConnection,l=void 0===u?jl:u,c=t.isConnectable,s=void 0===c||c,f=t.id,d=t.onConnect,p=t.children,h=t.className,v=D(t,Cl),g=(0,e.useContext)(kl),m=qt((function(e){return e.setConnectionPosition})),y=qt((function(e){return e.setConnectionNodeId})),b=Kt((function(e){return e.onConnect})),w=Kt((function(e){return e.onConnectStart})),_=Kt((function(e){return e.onConnectStop})),x=Kt((function(e){return e.onConnectEnd})),E=Kt((function(e){return e.connectionMode})),S=f||null,k="target"===o,O=(0,e.useCallback)((function(e){null===b||void 0===b||b(e),null===d||void 0===d||d(e)}),[b,d]),C=(0,e.useCallback)((function(e){al(e,S,g,y,m,O,k,l,E,void 0,void 0,w,_,x)}),[S,g,y,m,O,k,l,E,w,_,x]),N=L(["react-flow__handle","react-flow__handle-".concat(a),"nodrag",h,{source:!k,target:k,connectable:s}]);return e.createElement("div",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nl(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({"data-handleid":S,"data-nodeid":g,"data-handlepos":a,className:N,onMouseDown:C,ref:n},v),p)}));Pl.displayName="Handle";var Ml=(0,e.memo)(Pl),Tl=function(t){var n=t.data,r=t.isConnectable,o=t.targetPosition,i=void 0===o?ca.Top:o,a=t.sourcePosition,u=void 0===a?ca.Bottom:a;return e.createElement(e.Fragment,null,e.createElement(Ml,{type:"target",position:i,isConnectable:r}),n.label,e.createElement(Ml,{type:"source",position:u,isConnectable:r}))};Tl.displayName="DefaultNode";var Dl=(0,e.memo)(Tl),Ll=function(t){var n=t.data,r=t.isConnectable,o=t.sourcePosition,i=void 0===o?ca.Bottom:o;return e.createElement(e.Fragment,null,n.label,e.createElement(Ml,{type:"source",position:i,isConnectable:r}))};Ll.displayName="InputNode";var Al=(0,e.memo)(Ll),Il=function(t){var n=t.data,r=t.isConnectable,o=t.targetPosition,i=void 0===o?ca.Top:o;return e.createElement(e.Fragment,null,e.createElement(Ml,{type:"target",position:i,isConnectable:r}),n.label)};Il.displayName="OutputNode";var zl=(0,e.memo)(Il);function Rl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Bl=function(t){var n=function(n){var r=n.id,o=n.type,i=n.data,a=n.scale,u=n.xPos,l=n.yPos,c=n.selected,s=n.onClick,f=n.onMouseEnter,d=n.onMouseMove,p=n.onMouseLeave,h=n.onContextMenu,v=n.onNodeDoubleClick,g=n.onNodeDragStart,m=n.onNodeDrag,y=n.onNodeDragStop,b=n.style,w=n.className,_=n.isDraggable,x=n.isSelectable,E=n.isConnectable,S=n.selectNodesOnDrag,k=n.sourcePosition,O=n.targetPosition,C=n.isHidden,N=n.isInitialized,j=n.snapToGrid,P=n.snapGrid,M=n.isDragging,D=n.resizeObserver,A=n.dragHandle,I=qt((function(e){return e.updateNodeDimensions})),z=qt((function(e){return e.addSelectedElements})),R=qt((function(e){return e.updateNodePosDiff})),B=qt((function(e){return e.unsetNodesSelection})),F=(0,e.useRef)(null),U=(0,e.useMemo)((function(){return{id:r,type:o,position:{x:u,y:l},data:i}}),[r,o,u,l,i]),$=(0,e.useMemo)((function(){return j?P:[1,1]}),[j,P]),V=(0,e.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rl(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({zIndex:c?10:3,transform:"translate(".concat(u,"px,").concat(l,"px)"),pointerEvents:x||_||s||f||d||p?"all":"none",opacity:N?1:0},b)}),[c,u,l,x,_,s,N,b,f,d,p]),H=(0,e.useMemo)((function(){if(f&&!M)return function(e){return f(e,U)}}),[f,M,U]),Y=(0,e.useMemo)((function(){if(d&&!M)return function(e){return d(e,U)}}),[d,M,U]),X=(0,e.useMemo)((function(){if(p&&!M)return function(e){return p(e,U)}}),[p,M,U]),W=(0,e.useMemo)((function(){if(h)return function(e){return h(e,U)}}),[h,U]),G=(0,e.useCallback)((function(e){_||(x&&(B(),c||z(U)),null===s||void 0===s||s(e,U))}),[x,c,_,s,U]),q=(0,e.useCallback)((function(e){null===g||void 0===g||g(e,U),S&&x?(B(),c||z(U)):S||c||!x||(B(),z([]))}),[U,c,S,x,g]),K=(0,e.useCallback)((function(e,t){m&&(U.position.x+=t.deltaX,U.position.y+=t.deltaY,m(e,U)),R({id:r,diff:{x:t.deltaX,y:t.deltaY},isDragging:!0})}),[r,U,m]),Q=(0,e.useCallback)((function(e){if(!M)return!x||S||c||z(U),void(null===s||void 0===s||s(e,U));R({id:U.id,isDragging:!1}),null===y||void 0===y||y(e,U)}),[U,x,S,s,y,M,c]),Z=(0,e.useCallback)((function(e){null===v||void 0===v||v(e,U)}),[U,v]);if((0,e.useLayoutEffect)((function(){F.current&&!C&&I([{id:r,nodeElement:F.current,forceUpdate:!0}])}),[r,C,k,O]),(0,e.useEffect)((function(){if(F.current){var e=F.current;return null===D||void 0===D||D.observe(e),function(){return null===D||void 0===D?void 0:D.unobserve(e)}}}),[]),C)return null;var J=L(["react-flow__node","react-flow__node-".concat(o),w,{selected:c,selectable:x}]);return e.createElement(Eu,{onStart:q,onDrag:K,onStop:Q,scale:a,disabled:!_,cancel:".nodrag",nodeRef:F,grid:$,enableUserSelectHack:!1,handle:A},e.createElement("div",{className:J,ref:F,style:V,onMouseEnter:H,onMouseMove:Y,onMouseLeave:X,onContextMenu:W,onClick:G,onDoubleClick:Z,"data-id":r},e.createElement(Ol,{value:r},e.createElement(t,{id:r,data:i,type:o,xPos:u,yPos:l,selected:c,isConnectable:E,sourcePosition:k,targetPosition:O,isDragging:M,dragHandle:A}))))};return n.displayName="NodeWrapper",(0,e.memo)(n)};function Fl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ul(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fl(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $l=function(t){var n=t.onSelectionChange,r=Kt((function(e){return e.selectedElements}));return(0,e.useEffect)((function(){n(r)}),[r]),null},Vl=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n};function Hl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Yl=function(e,t){var n=e.getBoundingClientRect();return{source:Xl(".source",e,n,t),target:Xl(".target",e,n,t)}},Xl=function(e,t,n,r){var o=t.querySelectorAll(e);return o&&o.length?Array.from(o).map((function(e){var t=e.getBoundingClientRect(),o=rn(e);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hl(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.getAttribute("data-handleid"),position:e.getAttribute("data-handlepos"),x:(t.left-n.left)/r,y:(t.top-n.top)/r},o)})):null};function Wl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wl(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ql(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ql,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case wt:var n=t.payload,r={nextNodes:[],nextEdges:[]},o=n.reduce((function(t,n){if(fn(n)){var r=e.nodes.find((function(e){return e.id===n.id}));if(r){var o=Gl(Gl({},r),n);r.position.x===n.position.x&&r.position.y===n.position.y||(o.__rf.position=n.position),"undefined"!==typeof n.type&&n.type!==r.type&&(o.__rf.width=null),t.nextNodes.push(o)}else t.nextNodes.push(hn(n,e.nodeExtent))}else if(sn(n)){var i=e.edges.find((function(e){return e.id===n.id}));i?t.nextEdges.push(Gl(Gl({},i),n)):t.nextEdges.push(vn(n))}return t}),r),i=o.nextNodes,a=o.nextEdges;return Gl(Gl({},e),{},{nodes:i,edges:a});case _t:var u=e.nodes.map((function(n){var r=t.payload.find((function(e){return e.id===n.id}));if(r){var o=rn(r.nodeElement);if(o.width&&o.height&&(n.__rf.width!==o.width||n.__rf.height!==o.height||r.forceUpdate)){var i=Yl(r.nodeElement,e.transform[2]);return Gl(Gl({},n),{},{__rf:Gl(Gl(Gl({},n.__rf),o),{},{handleBounds:i})})}}return n}));return Gl(Gl({},e),{},{nodes:u});case xt:var l=t.payload,c=l.id,s=l.pos,f=s;if(e.snapToGrid){var d=tn(e.snapGrid,2),p=d[0],h=d[1];f={x:p*Math.round(s.x/p),y:h*Math.round(s.y/h)}}var v=e.nodes.map((function(e){return e.id===c?Gl(Gl({},e),{},{__rf:Gl(Gl({},e.__rf),{},{position:f})}):e}));return Gl(Gl({},e),{},{nodes:v});case Et:var g=t.payload,m=g.id,y=g.diff,b=g.isDragging,w=e.nodes.map((function(t){var n;if(m===t.id||null!==(n=e.selectedElements)&&void 0!==n&&n.find((function(e){return e.id===t.id}))){var r=Gl(Gl({},t),{},{__rf:Gl(Gl({},t.__rf),{},{isDragging:b})});return y&&(r.__rf.position={x:t.__rf.position.x+y.x,y:t.__rf.position.y+y.y}),r}return t}));return Gl(Gl({},e),{},{nodes:w});case St:var _=t.payload;return Gl(Gl({},e),{},{selectionActive:!0,userSelectionRect:{width:0,height:0,startX:_.x,startY:_.y,x:_.x,y:_.y,draw:!0}});case kt:var x,E,S=t.payload,k=null!==(x=e.userSelectionRect.startX)&&void 0!==x?x:0,O=null!==(E=e.userSelectionRect.startY)&&void 0!==E?E:0,C=Gl(Gl({},e.userSelectionRect),{},{x:S.x<k?S.x:k,y:S.y<O?S.y:O,width:Math.abs(S.x-k),height:Math.abs(S.y-O)}),N=wn(e.nodes,C,e.transform,!1,!0),j=_n(N,e.edges),P=[].concat(en(N),en(j)),M=!Vl(P,e.selectedElements),T=M?{selectedElements:P.length>0?P:null}:{};return Gl(Gl(Gl({},e),T),{},{userSelectionRect:C});case Ot:var D,L=null===(D=e.selectedElements)||void 0===D?void 0:D.filter((function(e){return fn(e)&&e.__rf})),A=Gl(Gl({},e),{},{selectionActive:!1,userSelectionRect:Gl(Gl({},e.userSelectionRect),{},{draw:!1})});if(L&&0!==L.length){var I=bn(L);A.selectedNodesBbox=I,A.nodesSelectionActive=!0}else A.selectedElements=null,A.nodesSelectionActive=!1;return A;case Nt:var z=t.payload,R=Array.isArray(z)?z:[z],B=!Vl(R,e.selectedElements),F=B?R:e.selectedElements;return Gl(Gl({},e),{},{selectedElements:F});case Pt:var U=e.multiSelectionActive,$=e.selectedElements,V=t.payload,H=Array.isArray(V)?V:[V],Y=H;U&&(Y=$?[].concat(en($),en(H)):H);var X=!Vl(Y,e.selectedElements),W=X?Y:e.selectedElements;return Gl(Gl({},e),{},{selectedElements:W});case Dt:var G=t.payload,q=G.d3Zoom,K=G.d3Selection,Q=G.d3ZoomHandler,Z=G.transform;return Gl(Gl({},e),{},{d3Zoom:q,d3Selection:K,d3ZoomHandler:Q,transform:Z});case Lt:var J,ee=t.payload;return null===(J=e.d3Zoom)||void 0===J||J.scaleExtent([ee,e.maxZoom]),Gl(Gl({},e),{},{minZoom:ee});case At:var te,ne=t.payload;return null===(te=e.d3Zoom)||void 0===te||te.scaleExtent([e.minZoom,ne]),Gl(Gl({},e),{},{maxZoom:ne});case It:var re,oe=t.payload;return null===(re=e.d3Zoom)||void 0===re||re.translateExtent(oe),Gl(Gl({},e),{},{translateExtent:oe});case Wt:var ie=t.payload;return Gl(Gl({},e),{},{nodeExtent:ie,nodes:e.nodes.map((function(e){return Gl(Gl({},e),{},{__rf:Gl(Gl({},e.__rf),{},{position:an(e.__rf.position,ie)})})}))});case gt:case mt:case yt:case bt:case jt:case Ct:case Mt:case Tt:case zt:case Rt:case Bt:case Ft:case Ut:case $t:case Vt:case Ht:case Yt:case Xt:return Gl(Gl({},e),t.payload);default:return e}}function Kl(e){return F(ql,e)}var Ql={width:0,height:0,transform:[0,0,1],nodes:[],edges:[],selectedElements:null,selectedNodesBbox:{x:0,y:0,width:0,height:0},d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodesSelectionActive:!1,selectionActive:!1,userSelectionRect:{startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:da.Strict,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,multiSelectionActive:!1,reactFlowVersion:"9.7.4"},Zl=Kl(Ql),Jl=function(t){var n=t.children,r=(0,e.useContext)(_e);return(0,e.useMemo)((function(){var e,t;return null===r||void 0===r||null===(e=r.store)||void 0===e||null===(t=e.getState())||void 0===t?void 0:t.reactFlowVersion}),[r])?e.createElement(e.Fragment,null,n):e.createElement(Ce,{store:Zl},n)};function ec(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Jl.displayName="ReactFlowWrapper";ec(".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__pane,.react-flow__renderer,.react-flow__selectionpane{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow__edges,.react-flow__selection{left:0;position:absolute;top:0}.react-flow__edges{pointer-events:none;z-index:2}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{height:100%;pointer-events:none;width:100%;z-index:3}.react-flow__node,.react-flow__nodes{position:absolute;transform-origin:0 0}.react-flow__node{pointer-events:all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{height:100%;left:0;pointer-events:none;position:absolute;top:0;transform-origin:left top;width:100%;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__background{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__controls{bottom:10px;left:10px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:10px;position:absolute;right:10px;z-index:5}");ec(".react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output{border-radius:3px;border-style:solid;border-width:1px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-input{background:#fff;border-color:#0041d0}.react-flow__node-input.selected,.react-flow__node-input.selected:hover{box-shadow:0 0 0 .5px #0041d0}.react-flow__node-input .react-flow__handle{background:#0041d0}.react-flow__node-default{background:#fff;border-color:#1a192b}.react-flow__node-default.selected,.react-flow__node-default.selected:hover{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle{background:#1a192b}.react-flow__node-output{background:#fff;border-color:#ff0072}.react-flow__node-output.selected,.react-flow__node-output.selected:hover{box-shadow:0 0 0 .5px #ff0072}.react-flow__node-output .react-flow__handle{background:#ff0072}.react-flow__nodesselection-rect{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;position:absolute;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}");var tc=["elements","className","nodeTypes","edgeTypes","onElementClick","onLoad","onMove","onMoveStart","onMoveEnd","onElementsRemove","onConnect","onConnectStart","onConnectStop","onConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","arrowHeadColor","markerEndId","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","paneMoveable","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","nodeTypesId","edgeTypesId"];function nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nc(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oc={input:Al,default:Dl,output:zl},ic={default:Fu,straight:rl,step:nl,smoothstep:Ku},ac=(0,e.forwardRef)((function(t,n){var r=t.elements,o=void 0===r?[]:r,i=t.className,a=t.nodeTypes,u=void 0===a?oc:a,l=t.edgeTypes,c=void 0===l?ic:l,s=t.onElementClick,f=t.onLoad,d=t.onMove,p=t.onMoveStart,h=t.onMoveEnd,v=t.onElementsRemove,g=t.onConnect,m=t.onConnectStart,y=t.onConnectStop,b=t.onConnectEnd,w=t.onNodeMouseEnter,_=t.onNodeMouseMove,x=t.onNodeMouseLeave,E=t.onNodeContextMenu,S=t.onNodeDoubleClick,k=t.onNodeDragStart,O=t.onNodeDrag,C=t.onNodeDragStop,N=t.onSelectionChange,j=t.onSelectionDragStart,P=t.onSelectionDrag,M=t.onSelectionDragStop,T=t.onSelectionContextMenu,A=t.connectionMode,I=void 0===A?da.Strict:A,z=t.connectionLineType,R=void 0===z?pa.Bezier:z,B=t.connectionLineStyle,F=t.connectionLineComponent,U=t.deleteKeyCode,$=void 0===U?"Backspace":U,V=t.selectionKeyCode,H=void 0===V?"Shift":V,Y=t.multiSelectionKeyCode,X=void 0===Y?"Meta":Y,W=t.zoomActivationKeyCode,G=void 0===W?"Meta":W,q=t.snapToGrid,K=void 0!==q&&q,Q=t.snapGrid,Z=void 0===Q?[15,15]:Q,J=t.onlyRenderVisibleElements,ee=void 0!==J&&J,te=t.selectNodesOnDrag,ne=void 0===te||te,re=t.nodesDraggable,oe=t.nodesConnectable,ie=t.elementsSelectable,ae=t.minZoom,ue=t.maxZoom,le=t.defaultZoom,ce=void 0===le?1:le,se=t.defaultPosition,fe=void 0===se?[0,0]:se,de=t.translateExtent,pe=t.preventScrolling,he=void 0===pe||pe,ve=t.nodeExtent,ge=t.arrowHeadColor,me=void 0===ge?"#b1b1b7":ge,ye=t.markerEndId,be=t.zoomOnScroll,we=void 0===be||be,_e=t.zoomOnPinch,xe=void 0===_e||_e,Ee=t.panOnScroll,Se=void 0!==Ee&&Ee,ke=t.panOnScrollSpeed,Oe=void 0===ke?.5:ke,Ce=t.panOnScrollMode,Ne=void 0===Ce?ha.Free:Ce,je=t.zoomOnDoubleClick,Pe=void 0===je||je,Me=t.paneMoveable,Te=void 0===Me||Me,De=t.onPaneClick,Le=t.onPaneScroll,Ae=t.onPaneContextMenu,Ie=t.children,ze=t.onEdgeUpdate,Re=t.onEdgeContextMenu,Be=t.onEdgeDoubleClick,Fe=t.onEdgeMouseEnter,Ue=t.onEdgeMouseMove,$e=t.onEdgeMouseLeave,Ve=t.onEdgeUpdateStart,He=t.onEdgeUpdateEnd,Ye=t.edgeUpdaterRadius,Xe=void 0===Ye?10:Ye,We=t.nodeTypesId,Ge=void 0===We?"1":We,qe=t.edgeTypesId,Ke=void 0===qe?"1":qe,Qe=D(t,tc),Ze=(0,e.useMemo)((function(){return function(e){var t={input:Bl(e.input||Al),default:Bl(e.default||Dl),output:Bl(e.output||zl)},n=Object.keys(e).filter((function(e){return!["input","default","output"].includes(e)})).reduce((function(t,n){return t[n]=Bl(e[n]||Dl),t}),{});return Ul(Ul({},t),n)}(u)}),[Ge]),Je=(0,e.useMemo)((function(){return function(e){var t={default:sl(e.default||Fu),straight:sl(e.bezier||rl),step:sl(e.step||nl),smoothstep:sl(e.step||Ku)},n=Object.keys(e).filter((function(e){return!["default","bezier"].includes(e)})).reduce((function(t,n){return t[n]=sl(e[n]||Fu),t}),{});return dl(dl({},t),n)}(c)}),[Ke]),et=L(["react-flow",i]);return e.createElement("div",rc(rc({},Qe),{},{ref:n,className:et}),e.createElement(Jl,null,e.createElement(El,{onLoad:f,onMove:d,onMoveStart:p,onMoveEnd:h,onElementClick:s,onNodeMouseEnter:w,onNodeMouseMove:_,onNodeMouseLeave:x,onNodeContextMenu:E,onNodeDoubleClick:S,onNodeDragStart:k,onNodeDrag:O,onNodeDragStop:C,nodeTypes:Ze,edgeTypes:Je,connectionMode:I,connectionLineType:R,connectionLineStyle:B,connectionLineComponent:F,selectionKeyCode:H,onElementsRemove:v,deleteKeyCode:$,multiSelectionKeyCode:X,zoomActivationKeyCode:G,onConnect:g,onConnectStart:m,onConnectStop:y,onConnectEnd:b,snapToGrid:K,snapGrid:Z,onlyRenderVisibleElements:ee,nodesDraggable:re,nodesConnectable:oe,elementsSelectable:ie,selectNodesOnDrag:ne,minZoom:ae,maxZoom:ue,defaultZoom:ce,defaultPosition:fe,translateExtent:de,preventScrolling:he,nodeExtent:ve,arrowHeadColor:me,markerEndId:ye,zoomOnScroll:we,zoomOnPinch:xe,zoomOnDoubleClick:Pe,panOnScroll:Se,panOnScrollSpeed:Oe,panOnScrollMode:Ne,paneMoveable:Te,onPaneClick:De,onPaneScroll:Le,onPaneContextMenu:Ae,onSelectionDragStart:j,onSelectionDrag:P,onSelectionDragStop:M,onSelectionContextMenu:T,onEdgeUpdate:ze,onEdgeContextMenu:Re,onEdgeDoubleClick:Be,onEdgeMouseEnter:Fe,onEdgeMouseMove:Ue,onEdgeMouseLeave:$e,onEdgeUpdateStart:Ve,onEdgeUpdateEnd:He,edgeUpdaterRadius:Xe}),e.createElement(Sl,{elements:o}),N&&e.createElement($l,{onSelectionChange:N}),Ie))}));ac.displayName="ReactFlow";var uc=function(t){var n=t.x,r=t.y,o=t.width,i=t.height,a=t.style,u=t.color,l=t.strokeColor,c=t.strokeWidth,s=t.className,f=t.borderRadius,d=t.shapeRendering,p=a||{},h=p.background,v=p.backgroundColor,g=u||h||v;return e.createElement("rect",{className:L(["react-flow__minimap-node",s]),x:n,y:r,rx:f,ry:f,width:o,height:i,fill:g,stroke:l,strokeWidth:c,shapeRendering:d})};uc.displayName="MiniMapNode";var lc=(0,e.memo)(uc),cc=function(t){var n,r=t.style,o=t.className,i=t.nodeStrokeColor,a=void 0===i?"#555":i,u=t.nodeColor,l=void 0===u?"#fff":u,c=t.nodeClassName,s=void 0===c?"":c,f=t.nodeBorderRadius,d=void 0===f?5:f,p=t.nodeStrokeWidth,h=void 0===p?2:p,v=t.maskColor,g=void 0===v?"rgb(240, 242, 243, 0.7)":v,m=Kt((function(e){return e.width})),y=Kt((function(e){return e.height})),b=tn(Kt((function(e){return e.transform})),3),w=b[0],_=b[1],x=b[2],E=Kt((function(e){return e.nodes})),S=L(["react-flow__minimap",o]),k=(null===r||void 0===r?void 0:r.width)||200,O=(null===r||void 0===r?void 0:r.height)||150,C=l instanceof Function?l:function(){return l},N=a instanceof Function?a:function(){return a},j=s instanceof Function?s:function(){return s},P=E&&E.length,M=bn(E),T={x:-w/x,y:-_/x,width:m/x,height:y/x},D=P?(n=T,yn(gn(mn(M),mn(n)))):T,A=D.width/k,I=D.height/O,z=Math.max(A,I),R=z*k,B=z*O,F=5*z,U=D.x-(R-D.width)/2-F,$=D.y-(B-D.height)/2-F,V=R+2*F,H=B+2*F,Y="undefined"===typeof window||window.chrome?"crispEdges":"geometricPrecision";return e.createElement("svg",{width:k,height:O,viewBox:"".concat(U," ").concat($," ").concat(V," ").concat(H),style:r,className:S},E.filter((function(e){return!e.isHidden})).map((function(t){return e.createElement(lc,{key:t.id,x:t.__rf.position.x,y:t.__rf.position.y,width:t.__rf.width,height:t.__rf.height,style:t.style,className:j(t),color:C(t),borderRadius:d,strokeColor:N(t),strokeWidth:h,shapeRendering:Y})})),e.createElement("path",{className:"react-flow__minimap-mask",d:"M".concat(U-F,",").concat($-F,"h").concat(V+2*F,"v").concat(H+2*F,"h").concat(-V-2*F,"z\n M").concat(T.x,",").concat(T.y,"h").concat(T.width,"v").concat(T.height,"h").concat(-T.width,"z"),fill:g,fillRule:"evenodd"}))};cc.displayName="MiniMap";var sc;function fc(){return fc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fc.apply(this,arguments)}var dc,pc=function(t){return e.createElement("svg",fc({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},t),sc||(sc=e.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})))};function hc(){return hc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hc.apply(this,arguments)}var vc,gc=function(t){return e.createElement("svg",hc({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},t),dc||(dc=e.createElement("path",{d:"M0 0h32v4.2H0z"})))};function mc(){return mc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mc.apply(this,arguments)}var yc,bc=function(t){return e.createElement("svg",mc({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},t),vc||(vc=e.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})))};function wc(){return wc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wc.apply(this,arguments)}var _c,xc=function(t){return e.createElement("svg",wc({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},t),yc||(yc=e.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})))};function Ec(){return Ec=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ec.apply(this,arguments)}var Sc=function(t){return e.createElement("svg",Ec({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},t),_c||(_c=e.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"})))},kc=["children","className"];function Oc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Cc=function(t){var n=t.children,r=t.className,o=D(t,kc);return e.createElement("button",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oc(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"button",className:L(["react-flow__controls-button",r])},o),n)},Nc=function(t){var n=t.style,r=t.showZoom,o=void 0===r||r,i=t.showFitView,a=void 0===i||i,u=t.showInteractive,l=void 0===u||u,c=t.fitViewParams,s=t.onZoomIn,f=t.onZoomOut,d=t.onFitView,p=t.onInteractiveChange,h=t.className,v=t.children,g=tn((0,e.useState)(!1),2),m=g[0],y=g[1],b=qt((function(e){return e.setInteractive})),w=_l(),_=w.zoomIn,x=w.zoomOut,E=w.fitView,S=Kt((function(e){return e.nodesDraggable&&e.nodesConnectable&&e.elementsSelectable})),k=L(["react-flow__controls",h]),O=(0,e.useCallback)((function(){null===_||void 0===_||_(),null===s||void 0===s||s()}),[_,s]),C=(0,e.useCallback)((function(){null===x||void 0===x||x(),null===f||void 0===f||f()}),[x,f]),N=(0,e.useCallback)((function(){null===E||void 0===E||E(c),null===d||void 0===d||d()}),[E,c,d]),j=(0,e.useCallback)((function(){null===b||void 0===b||b(!S),null===p||void 0===p||p(!S)}),[S,b,p]);return(0,e.useEffect)((function(){y(!0)}),[]),m?e.createElement("div",{className:k,style:n},o&&e.createElement(e.Fragment,null,e.createElement(Cc,{onClick:O,className:"react-flow__controls-zoomin"},e.createElement(pc,null)),e.createElement(Cc,{onClick:C,className:"react-flow__controls-zoomout"},e.createElement(gc,null))),a&&e.createElement(Cc,{className:"react-flow__controls-fitview",onClick:N},e.createElement(bc,null)),l&&e.createElement(Cc,{className:"react-flow__controls-interactive",onClick:j},S?e.createElement(Sc,null):e.createElement(xc,null)),v):null};Nc.displayName="Controls";var jc,Pc=(0,e.memo)(Nc);function Mc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mc(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dc=(T(jc={},fa.Dots,"#81818a"),T(jc,fa.Lines,"#eee"),jc),Lc=function(t){var n=t.variant,r=void 0===n?fa.Dots:n,o=t.gap,i=void 0===o?15:o,a=t.size,u=void 0===a?.4:a,l=t.color,c=t.style,s=t.className,f=tn(Kt((function(e){return e.transform})),3),d=f[0],p=f[1],h=f[2],v=(0,e.useMemo)((function(){return"pattern-".concat(Math.floor(1e5*Math.random()))}),[]),g=L(["react-flow__background",s]),m=i*h,y=d%m,b=p%m,w=r===fa.Lines,_=l||Dc[r],x=w?function(t,n,r){return e.createElement("path",{stroke:r,strokeWidth:n,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})}(m,u,_):function(t,n){return e.createElement("circle",{cx:t,cy:t,r:t,fill:n})}(u*h,_);return e.createElement("svg",{className:g,style:Tc(Tc({},c),{},{width:"100%",height:"100%"})},e.createElement("pattern",{id:v,x:y,y:b,width:m,height:m,patternUnits:"userSpaceOnUse"},x),e.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(v,")")}))};Lc.displayName="Background";var Ac=(0,e.memo)(Lc),Ic="Section_Section__TjDMz",zc=n(184),Rc=function(e){return(0,zc.jsx)("h2",{className:Ic,children:e.title})},Bc="Card_Card__Z9gdG",Fc=function(e){return(0,zc.jsx)("div",{className:Bc,children:e.children})},Uc="Button_Button__T-41v",$c="Button_inline__+XTDp",Vc="Button_tooltip__MAJLR",Hc=function(e){var t=Uc;"inline"===e.kind&&(t+=" "+$c);var n="";return void 0!==e.tooltip&&(n=(0,zc.jsx)("span",{className:Vc,children:e.tooltip})),(0,zc.jsxs)("button",{className:t,onClick:e.onClick,disabled:e.disabled,children:[n,e.label]})},Yc="PipelineBlock_PipelineBlock__uDJMa",Xc="PipelineBlock_PlantNode__Ms1c3",Wc="PipelineBlock_ProductNode__OA0PF",Gc=n(9790),qc=n.n(Gc);window.nextX=15,window.nextY=15;var Kc=function(){return window.nextY+=60,window.nextY>=500&&(window.nextY=15,window.nextX+=150),[window.nextX,window.nextY]},Qc=function(t){for(var n=[],r={},o=!1,i=0,a=Object.entries(t.products);i<a.length;i++){var u=s(a[i],2),l=u[0],c=u[1];c.x&&c.y||(o=!0),r[l]="product",n.push({id:l,data:{label:l,type:"product"},position:{x:c.x,y:c.y},sourcePosition:"right",targetPosition:"left",className:Wc})}for(var f=0,d=Object.entries(t.plants);f<d.length;f++){var p=s(d[f],2),h=p[0],v=p[1];v.x&&v.y||(o=!0),r[h]="plant",n.push({id:h,data:{label:h,type:"plant"},position:{x:v.x,y:v.y},sourcePosition:"right",targetPosition:"left",className:Xc}),void 0!==v.input&&n.push({id:"".concat(v.input,"-").concat(h),source:v.input,target:h,animated:!0,style:{stroke:"black"},selectable:!1});for(var g=0,m=Object.entries(v["outputs (tonne/tonne)"]);g<m.length;g++){var y=s(m[g],1)[0];n.push({id:"".concat(h,"-").concat(y),source:h,target:y,animated:!0,style:{stroke:"black"},selectable:!1})}}var b=function(){var e=function(e){var t=new(qc().graphlib.Graph);return t.setDefaultEdgeLabel((function(){return{}})),t.setGraph({rankdir:"LR"}),e.forEach((function(e){fn(e)?t.setNode(e.id,{width:125,height:45}):t.setEdge(e.source,e.target)})),qc().layout(t),e.map((function(e){if(fn(e)){var n=t.node(e.id);e.position={x:15+n.x-62.5,y:15+n.y-22.5}}return e}))}(n);e.forEach((function(e){fn(e)&&("plant"===e.data.type?t.onMovePlant(e.data.label,e.position.x,e.position.y):t.onMoveProduct(e.data.label,e.position.x,e.position.y))}))};return(0,e.useEffect)((function(){o&&b()}),[o]),(0,zc.jsxs)(zc.Fragment,{children:[(0,zc.jsx)(Rc,{title:"Pipeline"}),(0,zc.jsxs)(Fc,{children:[(0,zc.jsx)("div",{className:Yc,children:(0,zc.jsxs)(ac,{elements:n,onNodeDoubleClick:function(e,n){var o=n.data.label,i=window.prompt("Enter new name",o);void 0!==i&&0!==i.length&&(i in r||("plant"===n.data.type?t.onRenamePlant(o,i):t.onRenameProduct(o,i)))},onNodeDragStop:function(e,n){"plant"===n.data.type?t.onMovePlant(n.data.label,n.position.x,n.position.y):t.onMoveProduct(n.data.label,n.position.x,n.position.y)},onConnect:function(e){var n=r[e.source],o=r[e.target];"product"===n&&"plant"===o?t.onSetPlantInput(e.target,e.source):"plant"===n&&"product"===o&&t.onAddPlantOutput(e.source,e.target)},onElementsRemove:function(e){e.forEach((function(e){e.id in r&&("plant"===e.data.type?t.onRemovePlant(e.data.label):t.onRemoveProduct(e.data.label))}))},deleteKeyCode:46,maxZoom:1.25,minZoom:.5,snapToGrid:!0,preventScrolling:!1,children:[(0,zc.jsx)(Ac,{}),(0,zc.jsx)(Pc,{showInteractive:!1})]})}),(0,zc.jsxs)("div",{style:{textAlign:"center"},children:[(0,zc.jsx)(Hc,{label:"Add product",kind:"inline",onClick:t.onAddProduct}),(0,zc.jsx)(Hc,{label:"Add plant",kind:"inline",onClick:t.onAddPlant}),(0,zc.jsx)(Hc,{label:"Auto Layout",kind:"inline",onClick:b}),(0,zc.jsx)(Hc,{label:"?",kind:"inline",tooltip:"Drag from one connector to another to create links between products and plants. Double click to rename an element. Click an element to select and move it. Press the [Delete] key to remove it."})]})]})]})},Zc={int:new RegExp("^[0-9]+$"),intList:new RegExp("[[0-9]*]$"),float:new RegExp("^[0-9]*\\.?[0-9]*$"),floatList:new RegExp("^[?[0-9,.]*]?$")},Jc=function(e,t){return!!Zc[e].test(t)},es=function(e){return(0,zc.jsx)(zc.Fragment,{children:e.children})},ts="Form_FormRow__+cfai",ns="Form_FormRow_unit__gGptt",rs="Form_invalid__kTIKP",os=e.forwardRef((function(e,t){var n="";e.unit&&(n=(0,zc.jsxs)("span",{className:ns,children:["(",e.unit,")"]}));var r="";void 0!==e.tooltip&&(r=(0,zc.jsx)(Hc,{label:"?",kind:"inline",tooltip:e.tooltip}));var o=!0;e.disabled||void 0===e.validate||(o=Jc(e.validate,e.value));var i="";return o||(i=rs),(0,zc.jsxs)("div",{className:ts,children:[(0,zc.jsxs)("label",{children:[e.label," ",n]}),(0,zc.jsx)("input",{type:"text",placeholder:e.default,disabled:e.disabled,value:e.value,className:i,onChange:function(t){return e.onChange(t.target.value)},ref:t}),r]})})),is=os,as=function(e){var t=function(t,n){e.value[t]=n,e.onChange(e.value)};return(0,zc.jsxs)(zc.Fragment,{children:[(0,zc.jsx)(Rc,{title:"Parameters"}),(0,zc.jsx)(Fc,{children:(0,zc.jsxs)(es,{children:[(0,zc.jsx)(is,{label:"Time horizon",unit:"years",tooltip:"Number of years in the simulation.",value:e.value["time horizon (years)"],onChange:function(e){return t("time horizon (years)",e)},validate:"int"}),(0,zc.jsx)(is,{label:"Building period",unit:"years",tooltip:"List of years in which we are allowed to open new plants. For example, if this parameter is set to [1,2,3], we can only open plants during the first three years. By default, this equals [1]; that is, plants can only be opened during the first year.",value:e.value["building period (years)"],onChange:function(e){return t("building period (years)",e)},validate:"intList"}),(0,zc.jsx)(is,{label:"Inflation rate",unit:"%",tooltip:"Rate at which costs change from one time period to the next. This is applied uniformly to all costs.",value:e.value["inflation rate (%)"],onChange:function(e){return t("inflation rate (%)",e)},validate:"float"})]})})]})},us=function(t){var n="";void 0!==t.tooltip&&(n=(0,zc.jsx)(Hc,{label:"?",kind:"inline",tooltip:t.tooltip}));var r=(0,e.useRef)();return(0,zc.jsxs)("div",{className:ts,children:[(0,zc.jsx)("label",{children:t.label}),(0,zc.jsx)("input",{type:"text",value:t.value,disabled:"disabled"}),(0,zc.jsx)(Hc,{label:"Upload",kind:"inline",onClick:function(){r.current.click()}}),(0,zc.jsx)(Hc,{label:"Download",kind:"inline",onClick:t.onDownload,disabled:t.disableDownload}),(0,zc.jsx)(Hc,{label:"Clear",kind:"inline",onClick:t.onClear,disabled:t.disableClear}),(0,zc.jsx)(Hc,{label:"Template",kind:"inline",onClick:t.onTemplate}),n,(0,zc.jsx)("input",{type:"file",ref:r,accept:t.accept,style:{display:"none"},onChange:function(){var e=r.current.files[0];if(e){var n=new FileReader;n.addEventListener("load",(function(){t.onFile(n.result)})),n.readAsText(e)}r.current.value=""}})]})};var ls=function(e){var t=u({},e.value);e.disableKeys||(t[""]="0");var n="";e.unit&&(n=(0,zc.jsxs)("span",{className:ns,children:["(",e.unit,")"]}));var r="";void 0!==e.tooltip&&(r=(0,zc.jsx)(Hc,{label:"?",kind:"inline",tooltip:e.tooltip}));var o=function(n,r){var o=function(e,t,n){return Object.keys(e).reduce((function(r,o){return o===t?r[n]=e[t]:r[o]=e[o],r}),{})}(t,n,r);""in o||(o[""]=""),e.onChange(o)},i=[];return Object.keys(t).forEach((function(a,l){var c=(0,zc.jsxs)("span",{children:[e.label," ",n]});l>0&&(c="");var s=!0;void 0!==e.validate&&(s=Jc(e.validate,t[a]));var f="";s||(f=rs),i.push((0,zc.jsxs)("div",{className:ts,children:[(0,zc.jsx)("label",{children:c}),(0,zc.jsx)("input",{type:"text","data-index":l,value:a,placeholder:e.keyPlaceholder,disabled:e.disableKeys,onChange:function(e){return o(a,e.target.value)}}),(0,zc.jsx)("input",{type:"text","data-index":l,value:t[a],placeholder:e.valuePlaceholder,className:f,onChange:function(n){return function(n,r){var o=u({},t);o[n]=r,e.onChange(o)}(a,n.target.value)}}),r]},l))})),(0,zc.jsx)(zc.Fragment,{children:i})};function cs(){}function ss(e){return null==e?cs:function(){return this.querySelector(e)}}function fs(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function ds(){return[]}function ps(e){return null==e?ds:function(){return this.querySelectorAll(e)}}function hs(e){return function(){return this.matches(e)}}function vs(e){return function(t){return t.matches(e)}}var gs=Array.prototype.find;function ms(){return this.firstElementChild}var ys=Array.prototype.filter;function bs(){return Array.from(this.children)}function ws(e){return new Array(e.length)}function _s(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function xs(e){return function(){return e}}function Es(e,t,n,r,o,i){for(var a,u=0,l=t.length,c=i.length;u<c;++u)(a=t[u])?(a.__data__=i[u],r[u]=a):n[u]=new _s(e,i[u]);for(;u<l;++u)(a=t[u])&&(o[u]=a)}function Ss(e,t,n,r,o,i,a){var u,l,c,s=new Map,f=t.length,d=i.length,p=new Array(f);for(u=0;u<f;++u)(l=t[u])&&(p[u]=c=a.call(l,l.__data__,u,t)+"",s.has(c)?o[u]=l:s.set(c,l));for(u=0;u<d;++u)c=a.call(e,i[u],u,i)+"",(l=s.get(c))?(r[u]=l,l.__data__=i[u],s.delete(c)):n[u]=new _s(e,i[u]);for(u=0;u<f;++u)(l=t[u])&&s.get(p[u])===l&&(o[u]=l)}function ks(e){return e.__data__}function Os(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function Cs(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}_s.prototype={constructor:_s,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var Ns="http://www.w3.org/1999/xhtml",js={svg:"http://www.w3.org/2000/svg",xhtml:Ns,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ps(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),js.hasOwnProperty(t)?{space:js[t],local:e}:e}function Ms(e){return function(){this.removeAttribute(e)}}function Ts(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ds(e,t){return function(){this.setAttribute(e,t)}}function Ls(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function As(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Is(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function zs(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Rs(e){return function(){this.style.removeProperty(e)}}function Bs(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Fs(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Us(e,t){return e.style.getPropertyValue(t)||zs(e).getComputedStyle(e,null).getPropertyValue(t)}function $s(e){return function(){delete this[e]}}function Vs(e,t){return function(){this[e]=t}}function Hs(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Ys(e){return e.trim().split(/^|\s+/)}function Xs(e){return e.classList||new Ws(e)}function Ws(e){this._node=e,this._names=Ys(e.getAttribute("class")||"")}function Gs(e,t){for(var n=Xs(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function qs(e,t){for(var n=Xs(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Ks(e){return function(){Gs(this,e)}}function Qs(e){return function(){qs(this,e)}}function Zs(e,t){return function(){(t.apply(this,arguments)?Gs:qs)(this,e)}}function Js(){this.textContent=""}function ef(e){return function(){this.textContent=e}}function tf(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function nf(){this.innerHTML=""}function rf(e){return function(){this.innerHTML=e}}function of(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function af(){this.nextSibling&&this.parentNode.appendChild(this)}function uf(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function lf(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ns&&t.documentElement.namespaceURI===Ns?t.createElement(e):t.createElementNS(n,e)}}function cf(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function sf(e){var t=Ps(e);return(t.local?cf:lf)(t)}function ff(){return null}function df(){var e=this.parentNode;e&&e.removeChild(this)}function pf(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hf(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vf(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function gf(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,i=t.length;r<i;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function mf(e,t,n){return function(){var r,o=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var a=0,u=o.length;a<u;++a)if((r=o[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=t);this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function yf(e,t,n){var r=zs(e),o=r.CustomEvent;"function"===typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function bf(e,t){return function(){return yf(this,e,t)}}function wf(e,t){return function(){return yf(this,e,t.apply(this,arguments))}}Ws.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var _f=p.mark(xf);function xf(){var e,t,n,r,o,i,a;return p.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:e=this._groups,t=0,n=e.length;case 1:if(!(t<n)){u.next=13;break}r=e[t],o=0,i=r.length;case 3:if(!(o<i)){u.next=10;break}if(!(a=r[o])){u.next=7;break}return u.next=7,a;case 7:++o,u.next=3;break;case 10:++t,u.next=1;break;case 13:case"end":return u.stop()}}),_f,this)}var Ef=[null];function Sf(e,t){this._groups=e,this._parents=t}function kf(){return new Sf([[document.documentElement]],Ef)}Sf.prototype=kf.prototype=i({constructor:Sf,select:function(e){"function"!==typeof e&&(e=ss(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a,u=t[o],l=u.length,c=r[o]=new Array(l),s=0;s<l;++s)(i=u[s])&&(a=e.call(i,i.__data__,s,u))&&("__data__"in i&&(a.__data__=i.__data__),c[s]=a);return new Sf(r,this._parents)},selectAll:function(e){e="function"===typeof e?function(e){return function(){return fs(e.apply(this,arguments))}}(e):ps(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a,u=t[i],l=u.length,c=0;c<l;++c)(a=u[c])&&(r.push(e.call(a,a.__data__,c,u)),o.push(a));return new Sf(r,o)},selectChild:function(e){return this.select(null==e?ms:function(e){return function(){return gs.call(this.children,e)}}("function"===typeof e?e:vs(e)))},selectChildren:function(e){return this.selectAll(null==e?bs:function(e){return function(){return ys.call(this.children,e)}}("function"===typeof e?e:vs(e)))},filter:function(e){"function"!==typeof e&&(e=hs(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],u=a.length,l=r[o]=[],c=0;c<u;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new Sf(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,ks);var n=t?Ss:Es,r=this._parents,o=this._groups;"function"!==typeof e&&(e=xs(e));for(var i=o.length,a=new Array(i),u=new Array(i),l=new Array(i),c=0;c<i;++c){var s=r[c],f=o[c],d=f.length,p=Os(e.call(s,s&&s.__data__,c,r)),h=p.length,v=u[c]=new Array(h),g=a[c]=new Array(h),m=l[c]=new Array(d);n(s,f,v,g,m,p,t);for(var y,b,w=0,_=0;w<h;++w)if(y=v[w]){for(w>=_&&(_=w+1);!(b=g[_])&&++_<h;);y._next=b||null}}return(a=new Sf(a,r))._enter=u,a._exit=l,a},enter:function(){return new Sf(this._enter||this._groups.map(ws),this._parents)},exit:function(){return new Sf(this._exit||this._groups.map(ws),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,i=this.exit();return"function"===typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,a=Math.min(o,i),u=new Array(o),l=0;l<a;++l)for(var c,s=n[l],f=r[l],d=s.length,p=u[l]=new Array(d),h=0;h<d;++h)(c=s[h]||f[h])&&(p[h]=c);for(;l<o;++l)u[l]=n[l];return new Sf(u,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],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(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Cs);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,u=n[i],l=u.length,c=o[i]=new Array(l),s=0;s<l;++s)(a=u[s])&&(c[s]=a);c.sort(t)}return new Sf(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){var e,t=0,n=P(this);try{for(n.s();!(e=n.n()).done;){e.value;++t}}catch(r){n.e(r)}finally{n.f()}return t},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,i=t[n],a=0,u=i.length;a<u;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this},attr:function(e,t){var n=Ps(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Ts:Ms:"function"===typeof t?n.local?Is:As:n.local?Ls:Ds)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Rs:"function"===typeof t?Fs:Bs)(e,t,null==n?"":n)):Us(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?$s:"function"===typeof t?Hs:Vs)(e,t)):this.node()[e]},classed:function(e,t){var n=Ys(e+"");if(arguments.length<2){for(var r=Xs(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"===typeof t?Zs:t?Ks:Qs)(n,t))},text:function(e){return arguments.length?this.each(null==e?Js:("function"===typeof e?tf:ef)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?nf:("function"===typeof e?of:rf)(e)):this.node().innerHTML},raise:function(){return this.each(af)},lower:function(){return this.each(uf)},append:function(e){var t="function"===typeof e?e:sf(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"===typeof e?e:sf(e),r=null==t?ff:"function"===typeof t?t:ss(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(df)},clone:function(e){return this.select(e?hf:pf)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,i=vf(e+""),a=i.length;if(!(arguments.length<2)){for(u=t?mf:gf,r=0;r<a;++r)this.each(u(i[r],t,n));return this}var u=this.node().__on;if(u)for(var l,c=0,s=u.length;c<s;++c)for(r=0,l=u[c];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"===typeof t?wf:bf)(e,t))}},Symbol.iterator,xf);var Of=kf,Cf={value:function(){}};function Nf(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new jf(r)}function jf(e){this._=e}function Pf(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function Mf(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function Tf(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Cf,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}jf.prototype=Nf.prototype={constructor:jf,on:function(e,t){var n,r=this._,o=Pf(e+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++i<a;)if(n=(e=o[i]).type)r[n]=Tf(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Tf(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=Mf(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new jf(e)},call:function(e,t){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(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};var Df,Lf,Af=Nf,If=0,zf=0,Rf=0,Bf=0,Ff=0,Uf=0,$f="object"===typeof performance&&performance.now?performance:Date,Vf="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Hf(){return Ff||(Vf(Yf),Ff=$f.now()+Uf)}function Yf(){Ff=0}function Xf(){this._call=this._time=this._next=null}function Wf(e,t,n){var r=new Xf;return r.restart(e,t,n),r}function Gf(){Ff=(Bf=$f.now())+Uf,If=zf=0;try{!function(){Hf(),++If;for(var e,t=Df;t;)(e=Ff-t._time)>=0&&t._call.call(void 0,e),t=t._next;--If}()}finally{If=0,function(){var e,t,n=Df,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Df=t);Lf=e,Kf(r)}(),Ff=0}}function qf(){var e=$f.now(),t=e-Bf;t>1e3&&(Uf-=t,Bf=e)}function Kf(e){If||(zf&&(zf=clearTimeout(zf)),e-Ff>24?(e<1/0&&(zf=setTimeout(Gf,e-$f.now()-Uf)),Rf&&(Rf=clearInterval(Rf))):(Rf||(Bf=$f.now(),Rf=setInterval(qf,1e3)),If=1,Vf(Gf)))}function Qf(e,t,n){var r=new Xf;return t=null==t?0:+t,r.restart((function(n){r.stop(),e(n+t)}),t,n),r}Xf.prototype=Wf.prototype={constructor:Xf,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?Hf():+n)+(null==t?0:+t),this._next||Lf===this||(Lf?Lf._next=this:Df=this,Lf=this),this._call=e,this._time=n,Kf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kf())}};var Zf=Af("start","end","cancel","interrupt"),Jf=[];function ed(e,t,n,r,o,i){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function i(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(i){var c,s,f,d;if(1!==n.state)return l();for(c in o)if((d=o[c]).name===n.name){if(3===d.state)return Qf(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete o[c]):+c<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete o[c])}if(Qf((function(){3===n.state&&(n.state=4,n.timer.restart(u,n.delay,n.time),u(i))})),n.state=2,n.on.call("start",e,e.__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)(d=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++s]=d);r.length=s+1}}function u(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=Wf(i,0,n.time)}(e,n,{name:t,index:r,group:o,on:Zf,tween:Jf,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function td(e,t){var n=rd(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function nd(e,t){var n=rd(e,t);if(n.state>3)throw new Error("too late; already running");return n}function rd(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function od(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var id,ad=180/Math.PI,ud={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ld(e,t,n,r,o,i){var a,u,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,l/=u),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*ad,skewX:Math.atan(l)*ad,scaleX:a,scaleY:u}}function cd(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,a){var u=[],l=[];return i=e(i),a=e(a),function(e,r,o,i,a,u){if(e!==o||r!==i){var l=a.push("translate(",null,t,null,n);u.push({i:l-4,x:od(e,o)},{i:l-2,x:od(r,i)})}else(o||i)&&a.push("translate("+o+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,u,l),function(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:od(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,a.rotate,u,l),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:od(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,a.skewX,u,l),function(e,t,n,r,i,a){if(e!==n||t!==r){var u=i.push(o(i)+"scale(",null,",",null,")");a.push({i:u-4,x:od(e,n)},{i:u-2,x:od(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,u,l),i=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)u[(t=l[n]).i]=t.x(e);return u.join("")}}}var sd=cd((function(e){var t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ud:ld(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),fd=cd((function(e){return null==e?ud:(id||(id=document.createElementNS("http://www.w3.org/2000/svg","g")),id.setAttribute("transform",e),(e=id.transform.baseVal.consolidate())?ld((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):ud)}),", ",")",")");function dd(e,t){var n,r;return function(){var o=nd(this,e),i=o.tween;if(i!==n)for(var a=0,u=(r=n=i).length;a<u;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}o.tween=r}}function pd(e,t,n){var r,o;if("function"!==typeof n)throw new Error;return function(){var i=nd(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var u={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=u;break}l===c&&o.push(u)}i.tween=o}}function hd(e,t,n){var r=e._id;return e.each((function(){var e=nd(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return rd(e,r).value[t]}}function vd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function md(){}var yd=.7,bd=1/yd,wd="\\s*([+-]?\\d+)\\s*",_d="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",xd="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ed=/^#([0-9a-f]{3,8})$/,Sd=new RegExp("^rgb\\("+[wd,wd,wd]+"\\)$"),kd=new RegExp("^rgb\\("+[xd,xd,xd]+"\\)$"),Od=new RegExp("^rgba\\("+[wd,wd,wd,_d]+"\\)$"),Cd=new RegExp("^rgba\\("+[xd,xd,xd,_d]+"\\)$"),Nd=new RegExp("^hsl\\("+[_d,xd,xd]+"\\)$"),jd=new RegExp("^hsla\\("+[_d,xd,xd,_d]+"\\)$"),Pd={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 Md(){return this.rgb().formatHex()}function Td(){return this.rgb().formatRgb()}function Dd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ed.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ld(t):3===n?new Rd(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ad(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ad(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Sd.exec(e))?new Rd(t[1],t[2],t[3],1):(t=kd.exec(e))?new Rd(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Od.exec(e))?Ad(t[1],t[2],t[3],t[4]):(t=Cd.exec(e))?Ad(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Nd.exec(e))?$d(t[1],t[2]/100,t[3]/100,1):(t=jd.exec(e))?$d(t[1],t[2]/100,t[3]/100,t[4]):Pd.hasOwnProperty(e)?Ld(Pd[e]):"transparent"===e?new Rd(NaN,NaN,NaN,0):null}function Ld(e){return new Rd(e>>16&255,e>>8&255,255&e,1)}function Ad(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rd(e,t,n,r)}function Id(e){return e instanceof md||(e=Dd(e)),e?new Rd((e=e.rgb()).r,e.g,e.b,e.opacity):new Rd}function zd(e,t,n,r){return 1===arguments.length?Id(e):new Rd(e,t,n,null==r?1:r)}function Rd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Bd(){return"#"+Ud(this.r)+Ud(this.g)+Ud(this.b)}function Fd(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function Ud(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function $d(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Hd(e,t,n,r)}function Vd(e){if(e instanceof Hd)return new Hd(e.h,e.s,e.l,e.opacity);if(e instanceof md||(e=Dd(e)),!e)return new Hd;if(e instanceof Hd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,u=i-o,l=(i+o)/2;return u?(a=t===i?(n-r)/u+6*(n<r):n===i?(r-t)/u+2:(t-n)/u+4,u/=l<.5?i+o:2-i-o,a*=60):u=l>0&&l<1?0:a,new Hd(a,u,l,e.opacity)}function Hd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Yd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Xd(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}vd(md,Dd,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Md,formatHex:Md,formatHsl:function(){return Vd(this).formatHsl()},formatRgb:Td,toString:Td}),vd(Rd,zd,gd(md,{brighter:function(e){return e=null==e?bd:Math.pow(bd,e),new Rd(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?yd:Math.pow(yd,e),new Rd(this.r*e,this.g*e,this.b*e,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:Bd,formatHex:Bd,formatRgb:Fd,toString:Fd})),vd(Hd,(function(e,t,n,r){return 1===arguments.length?Vd(e):new Hd(e,t,n,null==r?1:r)}),gd(md,{brighter:function(e){return e=null==e?bd:Math.pow(bd,e),new Hd(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?yd:Math.pow(yd,e),new Hd(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Rd(Yd(e>=240?e-240:e+120,o,r),Yd(e,o,r),Yd(e<120?e+240:e-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 e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Wd=function(e){return function(){return e}};function Gd(e,t){return function(n){return e+n*t}}function qd(e){return 1===(e=+e)?Kd:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Wd(isNaN(t)?n:t)}}function Kd(e,t){var n=t-e;return n?Gd(e,n):Wd(isNaN(e)?t:e)}var Qd=function e(t){var n=qd(t);function r(e,t){var r=n((e=zd(e)).r,(t=zd(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Kd(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Zd(e){return function(t){var n,r,o=t.length,i=new Array(o),a=new Array(o),u=new Array(o);for(n=0;n<o;++n)r=zd(t[n]),i[n]=r.r||0,a[n]=r.g||0,u[n]=r.b||0;return i=e(i),a=e(a),u=e(u),r.opacity=1,function(e){return r.r=i(e),r.g=a(e),r.b=u(e),r+""}}}Zd((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,u=r<t-1?e[r+2]:2*i-o;return Xd((n-r/t)*t,a,o,i,u)}})),Zd((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],a=e[(r+1)%t],u=e[(r+2)%t];return Xd((n-r/t)*t,o,i,a,u)}}));var Jd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ep=new RegExp(Jd.source,"g");function tp(e,t){var n,r,o,i=Jd.lastIndex=ep.lastIndex=0,a=-1,u=[],l=[];for(e+="",t+="";(n=Jd.exec(e))&&(r=ep.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:od(n,r)})),i=ep.lastIndex;return i<t.length&&(o=t.slice(i),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)u[(n=l[r]).i]=n.x(e);return u.join("")})}function np(e,t){var n;return("number"===typeof t?od:t instanceof Dd?Qd:(n=Dd(t))?(t=n,Qd):tp)(e,t)}function rp(e){return function(){this.removeAttribute(e)}}function op(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ip(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function ap(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function up(e,t,n){var r,o,i;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(u=l+"")?null:a===r&&u===o?i:(o=u,i=t(r=a,l));this.removeAttribute(e)}}function lp(e,t,n){var r,o,i;return function(){var a,u,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(u=l+"")?null:a===r&&u===o?i:(o=u,i=t(r=a,l));this.removeAttributeNS(e.space,e.local)}}function cp(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function sp(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function fp(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&sp(e,o)),n}return o._value=t,o}function dp(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&cp(e,o)),n}return o._value=t,o}function pp(e,t){return function(){td(this,e).delay=+t.apply(this,arguments)}}function hp(e,t){return t=+t,function(){td(this,e).delay=t}}function vp(e,t){return function(){nd(this,e).duration=+t.apply(this,arguments)}}function gp(e,t){return t=+t,function(){nd(this,e).duration=t}}function mp(e,t){if("function"!==typeof t)throw new Error;return function(){nd(this,e).ease=t}}function yp(e,t,n){var r,o,i=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?td:nd;return function(){var a=i(this,e),u=a.on;u!==r&&(o=(r=u).copy()).on(t,n),a.on=o}}var bp=Of.prototype.constructor;function wp(e){return function(){this.style.removeProperty(e)}}function _p(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function xp(e,t,n){var r,o;function i(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&_p(e,i,n)),r}return i._value=t,i}function Ep(e){return function(t){this.textContent=e.call(this,t)}}function Sp(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ep(r)),t}return r._value=e,r}var kp=0;function Op(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Cp(){return++kp}var Np=Of.prototype;Op.prototype=function(e){return Of().transition(e)}.prototype=i({constructor:Op,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=ss(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var u,l,c=r[a],s=c.length,f=i[a]=new Array(s),d=0;d<s;++d)(u=c[d])&&(l=e.call(u,u.__data__,d,c))&&("__data__"in u&&(l.__data__=u.__data__),f[d]=l,ed(f[d],t,n,d,f,rd(u,n)));return new Op(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=ps(e));for(var r=this._groups,o=r.length,i=[],a=[],u=0;u<o;++u)for(var l,c=r[u],s=c.length,f=0;f<s;++f)if(l=c[f]){for(var d,p=e.call(l,l.__data__,f,c),h=rd(l,n),v=0,g=p.length;v<g;++v)(d=p[v])&&ed(d,t,n,v,p,h);i.push(p),a.push(l)}return new Op(i,a,t,n)},selectChild:Np.selectChild,selectChildren:Np.selectChildren,filter:function(e){"function"!==typeof e&&(e=hs(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],u=a.length,l=r[o]=[],c=0;c<u;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new Op(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),a=new Array(r),u=0;u<i;++u)for(var l,c=t[u],s=n[u],f=c.length,d=a[u]=new Array(f),p=0;p<f;++p)(l=c[p]||s[p])&&(d[p]=l);for(;u<r;++u)a[u]=t[u];return new Op(a,this._parents,this._name,this._id)},selection:function(){return new bp(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Cp(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],l=u.length,c=0;c<l;++c)if(a=u[c]){var s=rd(a,t);ed(a,e,n,c,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Op(r,this._parents,e,n)},call:Np.call,nodes:Np.nodes,node:Np.node,size:Np.size,empty:Np.empty,each:Np.each,on:function(e,t){var n=this._id;return arguments.length<2?rd(this.node(),n).on.on(e):this.each(yp(n,e,t))},attr:function(e,t){var n=Ps(e),r="transform"===n?fd:np;return this.attrTween(e,"function"===typeof t?(n.local?lp:up)(n,r,hd(this,"attr."+e,t)):null==t?(n.local?op:rp)(n):(n.local?ap:ip)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var r=Ps(e);return this.tween(n,(r.local?fp:dp)(r,t))},style:function(e,t,n){var r="transform"===(e+="")?sd:np;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=Us(this,e),a=(this.style.removeProperty(e),Us(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}(e,r)).on("end.style."+e,wp(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var a=Us(this,e),u=n(this),l=u+"";return null==u&&(this.style.removeProperty(e),l=u=Us(this,e)),a===l?null:a===r&&l===o?i:(o=l,i=t(r=a,u))}}(e,r,hd(this,"style."+e,t))).each(function(e,t){var n,r,o,i,a="style."+t,u="end."+a;return function(){var l=nd(this,e),c=l.on,s=null==l.value[a]?i||(i=wp(t)):void 0;c===n&&o===s||(r=(n=c).copy()).on(u,o=s),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var a=Us(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!==typeof t)throw new Error;return this.tween(r,xp(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(hd(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,Sp(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=rd(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((null==t?dd:pd)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?pp:hp)(t,e)):rd(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?vp:gp)(t,e)):rd(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(mp(t,e)):rd(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;nd(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var u={value:a},l={value:function(){0===--o&&i()}};n.each((function(){var n=nd(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(u),t._.interrupt.push(u),t._.end.push(l)),n.on=t})),0===o&&i()}))}},Symbol.iterator,Np[Symbol.iterator]);var jp={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function Pp(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error("transition ".concat(t," not found"));return n}Of.prototype.interrupt=function(e){return this.each((function(){!function(e,t){var n,r,o,i=e.__transition,a=!0;if(i){for(o in t=null==t?null:t+"",i)(n=i[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete e.__transition}}(this,e)}))},Of.prototype.transition=function(e){var t,n;e instanceof Op?(t=e._id,e=e._name):(t=Cp(),(n=jp).time=Hf(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,u=r[i],l=u.length,c=0;c<l;++c)(a=u[c])&&ed(a,e,t,c,u,n||Pp(a,t));return new Op(r,this._parents,e,t)};Math.abs,Math.max,Math.min;function Mp(e){return[+e[0],+e[1]]}function Tp(e){return[Mp(e[0]),Mp(e[1])]}["w","e"].map(Dp),["n","s"].map(Dp),["n","w","e","s","nw","ne","sw","se"].map(Dp);function Dp(e){return{type:e}}var Lp={},Ap={};function Ip(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function zp(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function Rp(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function Bp(e){var t,n=e.getUTCHours(),r=e.getUTCMinutes(),o=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":((t=e.getUTCFullYear())<0?"-"+Rp(-t,6):t>9999?"+"+Rp(t,6):Rp(t,4))+"-"+Rp(e.getUTCMonth()+1,2)+"-"+Rp(e.getUTCDate(),2)+(i?"T"+Rp(n,2)+":"+Rp(r,2)+":"+Rp(o,2)+"."+Rp(i,3)+"Z":o?"T"+Rp(n,2)+":"+Rp(r,2)+":"+Rp(o,2)+"Z":r||n?"T"+Rp(n,2)+":"+Rp(r,2)+"Z":"")}var Fp=function(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function r(e,t){var r,o=[],i=e.length,a=0,u=0,l=i<=0,c=!1;function s(){if(l)return Ap;if(c)return c=!1,Lp;var t,r,o=a;if(34===e.charCodeAt(o)){for(;a++<i&&34!==e.charCodeAt(a)||34===e.charCodeAt(++a););return(t=a)>=i?l=!0:10===(r=e.charCodeAt(a++))?c=!0:13===r&&(c=!0,10===e.charCodeAt(a)&&++a),e.slice(o+1,t-1).replace(/""/g,'"')}for(;a<i;){if(10===(r=e.charCodeAt(t=a++)))c=!0;else if(13===r)c=!0,10===e.charCodeAt(a)&&++a;else if(r!==n)continue;return e.slice(o,t)}return l=!0,e.slice(o,i)}for(10===e.charCodeAt(i-1)&&--i,13===e.charCodeAt(i-1)&&--i;(r=s())!==Ap;){for(var f=[];r!==Lp&&r!==Ap;)f.push(r),r=s();t&&null==(f=t(f,u++))||o.push(f)}return o}function o(t,n){return t.map((function(t){return n.map((function(e){return a(t[e])})).join(e)}))}function i(t){return t.map(a).join(e)}function a(e){return null==e?"":e instanceof Date?Bp(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,o,i=r(e,(function(e,r){if(n)return n(e,r-1);o=e,n=t?function(e,t){var n=Ip(e);return function(r,o){return t(n(r),o,e)}}(e,t):Ip(e)}));return i.columns=o||[],i},parseRows:r,format:function(t,n){return null==n&&(n=zp(t)),[n.map(a).join(e)].concat(o(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=zp(e)),o(e,t).join("\n")},formatRows:function(e){return e.map(i).join("\n")},formatRow:i,formatValue:a}}(","),Up=Fp.parse,$p=(Fp.parseRows,Fp.format);Fp.formatBody,Fp.formatRows,Fp.formatRow,Fp.formatValue;function Vp(e){for(var t in e){var n,r,o=e[t].trim();if(o)if("true"===o)o=!0;else if("false"===o)o=!1;else if("NaN"===o)o=NaN;else if(isNaN(n=+o)){if(!(r=o.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Hp&&r[4]&&!r[7]&&(o=o.replace(/-/g,"/").replace(/T/," ")),o=new Date(o)}else o=n;else o=null;e[t]=o}return e}var Hp=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Yp(e,t,n){this.k=e,this.x=t,this.y=n}Yp.prototype={constructor:Yp,scale:function(e){return 1===e?this:new Yp(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Yp(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new Yp(1,0,0);Yp.prototype;var Xp=function(e){var t=e.contents,n=e.requiredCols,r=Up(t,Vp);return n.forEach((function(e){if(!(e in r[0]))throw Error('Column "'.concat(e,'" not found in CSV file.'))})),r},Wp=function(e,t){for(var n=[],r=1;"".concat(t," ").concat(r)in e;r++)n.push(e["".concat(t," ").concat(r)]);return n},Gp=function(e){return $p(e)},qp=function(e,t){var n=document.createElement("a");n.setAttribute("href",URL.createObjectURL(new Blob([t]))),n.setAttribute("download",e),n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n)},Kp=function(e){var t=function(t,n){var r=u({},e.value);r[t]=n,e.onChange(r)},n="Not initially available",r=!0,o=Object.keys(e.value["initial amounts"]).length;return o>0&&(n="".concat(o," collection centers"),r=!1),(0,zc.jsxs)(zc.Fragment,{children:[(0,zc.jsx)(Rc,{title:e.name}),(0,zc.jsx)(Fc,{children:(0,zc.jsxs)(es,{children:[(0,zc.jsx)("h1",{children:"General Information"}),(0,zc.jsx)(us,{value:n,label:"Initial amounts",tooltip:"A table indicating the amount of this product initially available at each collection center.",accept:".csv",onFile:function(e){var n=Xp({contents:e,requiredCols:["latitude (deg)","longitude (deg)","name"]}),r={};n.forEach((function(e){r[e.name]={"latitude (deg)":e["latitude (deg)"],"longitude (deg)":e["longitude (deg)"],"amount (tonne)":Wp(e,"amount")}})),t("initial amounts",r)},onDownload:function(){for(var t=[],n=function(){var e=s(o[r],2),n=e[0],i=e[1],a={name:n,"latitude (deg)":i["latitude (deg)"],"longitude (deg)":i["longitude (deg)"]};i["amount (tonne)"].forEach((function(e,t){a["amount ".concat(t+1)]=e})),t.push(a)},r=0,o=Object.entries(e.value["initial amounts"]);r<o.length;r++)n();qp("Initial amounts - ".concat(e.name,".csv"),$p(t))},onClear:function(){t("initial amounts",{})},onTemplate:function(){qp("Initial amounts - Template.csv",$p([{name:"Washakie County","latitude (deg)":"43.8356","longitude (deg)":"-107.6602","amount 1":"21902","amount 2":"6160","amount 3":"2721","amount 4":"12917","amount 5":"18048"},{name:"Platte County","latitude (deg)":"42.1314","longitude (deg)":"-104.9676","amount 1":"16723","amount 2":"8709","amount 3":"22584","amount 4":"12278","amount 5":"7196"},{name:"Park County","latitude (deg)":"44.4063","longitude (deg)":"-109.4153","amount 1":"14731","amount 2":"11729","amount 3":"15562","amount 4":"7703","amount 5":"23349"}]))},disableDownload:r,disableClear:r}),(0,zc.jsx)("h1",{style:{display:0==o?"none":"block"},children:"Disposal"}),(0,zc.jsxs)("div",{style:{display:0==o?"none":"block"},children:[(0,zc.jsx)(is,{label:"Disposal cost",unit:"$/tonne",tooltip:"The cost to dispose of one tonne of this product at a collection center, without further processing.",value:e.value["disposal cost ($/tonne)"],onChange:function(e){return t("disposal cost ($/tonne)",e)},validate:"floatList"}),(0,zc.jsx)(is,{label:"Disposal limit",unit:"tonne",tooltip:"The maximum amount (in tonnes) of this product that can be disposed of across all collection centers, without further processing.",value:e.value["disposal limit (tonne)"],onChange:function(e){return t("disposal limit (tonne)",e)},validate:"floatList",disabled:String(e.value["disposal limit (%)"]).length>0}),(0,zc.jsx)(is,{label:"Disposal limit",unit:"%",tooltip:"The maximum amount of this product that can be disposed of across all collection centers, without further processing, as a percentage of the total amount available.",value:e.value["disposal limit (%)"],onChange:function(e){return t("disposal limit (%)",e)},validate:"floatList",disabled:e.value["disposal limit (tonne)"].length>0})]}),(0,zc.jsx)("h1",{children:"Transportation"}),(0,zc.jsx)(is,{label:"Transportation cost",unit:"$/km/tonne",tooltip:"The cost to transport this product.",value:e.value["transportation cost ($/km/tonne)"],onChange:function(e){return t("transportation cost ($/km/tonne)",e)},validate:"floatList"}),(0,zc.jsx)(is,{label:"Transportation energy",unit:"J/km/tonne",tooltip:"The energy required to transport this product.",value:e.value["transportation energy (J/km/tonne)"],onChange:function(e){return t("transportation energy (J/km/tonne)",e)},validate:"floatList"}),(0,zc.jsx)(ls,{label:"Transportation emissions",unit:"tonne/km/tonne",tooltip:"A dictionary mapping the name of each greenhouse gas, produced to transport one tonne of this product along one kilometer, to the amount of gas produced.",keyPlaceholder:"Emission name",value:e.value["transportation emissions (tonne/km/tonne)"],onChange:function(e){return t("transportation emissions (tonne/km/tonne)",e)},validate:"floatList"})]})})]})},Qp=function(e){var t=function(t,n,r,o){var i=u({},e.value);void 0!==o?i[n][r][o]=t:void 0!==r?i[n][r]=t:i[n]=t,e.onChange(i)},n="No locations set",r=Object.keys(e.value.locations).length;r>0&&(n="".concat(r," locations"));var o=e.value["minimum capacity (tonne)"]===e.value["maximum capacity (tonne)"];return(0,zc.jsxs)(zc.Fragment,{children:[(0,zc.jsx)(Rc,{title:e.name}),(0,zc.jsx)(Fc,{children:(0,zc.jsxs)(es,{children:[(0,zc.jsx)("h1",{children:"General information"}),(0,zc.jsx)(us,{label:"Candidate locations",tooltip:"A table describing potential locations where plants can be built and their characteristics.",onTemplate:function(){qp("Candidate locations - Template.csv",Gp([{name:"Washakie County","latitude (deg)":"43.8356","longitude (deg)":"-107.6602","area cost factor":"0.88"},{name:"Platte County","latitude (deg)":"42.1314","longitude (deg)":"-104.9676","area cost factor":"1.29"},{name:"Park County","latitude (deg)":"44.4063","longitude (deg)":"-109.4153","area cost factor":"0.99"},{name:"Goshen County","latitude (deg)":"42.0853","longitude (deg)":"-104.3534","area cost factor":"1"}]))},onFile:function(e){var n=Xp({contents:e,requiredCols:["name","latitude (deg)","longitude (deg)","area cost factor"]}),r={};n.forEach((function(e){r[e.name]={"latitude (deg)":e["latitude (deg)"],"longitude (deg)":e["longitude (deg)"],"area cost factor":e["area cost factor"]}})),t(r,"locations")},onDownload:function(){for(var t=[],n=0,r=Object.entries(e.value.locations);n<r.length;n++){var o=s(r[n],2),i=o[0],a=o[1];t.push({name:i,"latitude (deg)":a["latitude (deg)"],"longitude (deg)":a["longitude (deg)"],"area cost factor":a["area cost factor"]})}qp("Candidate locations - ".concat(e.name,".csv"),Gp(t))},onClear:function(){t({},"locations")},value:n}),(0,zc.jsx)("h1",{children:"Inputs & Outputs"}),(0,zc.jsx)(is,{label:"Input",tooltip:"The name of the product that this plant takes as input.",disabled:"disabled",value:e.value.input}),(0,zc.jsx)(ls,{label:"Outputs",unit:"tonne/tonne",tooltip:"A dictionary specifying how many tonnes of each product is produced for each tonne of input.",value:e.value["outputs (tonne/tonne)"],onChange:function(e){return t(e,"outputs (tonne/tonne)")},disableKeys:!0,validate:"float"}),(0,zc.jsx)("h1",{children:"Capacity & Costs"}),(0,zc.jsx)(is,{label:"Minimum capacity",unit:"tonne",tooltip:"The minimum size of the plant.",value:e.value["minimum capacity (tonne)"],onChange:function(e){return t(e,"minimum capacity (tonne)")},validate:"float"}),(0,zc.jsx)(is,{label:"Opening cost (min capacity)",unit:"$",tooltip:"The cost to open the plant at minimum capacity.",value:e.value["opening cost (min capacity) ($)"],onChange:function(e){return t(e,"opening cost (min capacity) ($)")},validate:"float"}),(0,zc.jsx)(is,{label:"Fixed operating cost (min capacity)",unit:"$",tooltip:"The cost to keep the plant open, even if the plant doesn't process anything.",value:e.value["fixed operating cost (min capacity) ($)"],onChange:function(e){return t(e,"fixed operating cost (min capacity) ($)")},validate:"float"}),(0,zc.jsx)(is,{label:"Maximum capacity",unit:"tonne",tooltip:"The maximum size of the plant.",value:e.value["maximum capacity (tonne)"],onChange:function(e){return t(e,"maximum capacity (tonne)")},validate:"float"}),(0,zc.jsx)(is,{label:"Opening cost (max capacity)",unit:"$",tooltip:"The cost to open a plant of this size.",value:o?"":e.value["opening cost (max capacity) ($)"],onChange:function(e){return t(e,"opening cost (max capacity) ($)")},validate:"float",disabled:o}),(0,zc.jsx)(is,{label:"Fixed operating cost (max capacity)",unit:"$",tooltip:"The cost to keep the plant open, even if the plant doesn't process anything.",value:o?"":e.value["fixed operating cost (max capacity) ($)"],onChange:function(e){return t(e,"fixed operating cost (max capacity) ($)")},validate:"float",disabled:o}),(0,zc.jsx)(is,{label:"Variable operating cost",unit:"$/tonne",tooltip:"The cost that the plant incurs to process each tonne of input.",value:e.value["variable operating cost ($/tonne)"],onChange:function(e){return t(e,"variable operating cost ($/tonne)")},validate:"float"}),(0,zc.jsx)(is,{label:"Energy expenditure",unit:"GJ/tonne",tooltip:"The energy required to process one tonne of the input.",value:e.value["energy (GJ/tonne)"],onChange:function(e){return t(e,"energy (GJ/tonne)")},validate:"float"}),(0,zc.jsx)("h1",{children:"Storage"}),(0,zc.jsx)(is,{label:"Storage cost",unit:"$/tonne",tooltip:"The cost to store a tonne of input product for one time period.",value:e.value.storage["cost ($/tonne)"],onChange:function(e){return t(e,"storage","cost ($/tonne)")},validate:"float"}),(0,zc.jsx)(is,{label:"Storage limit",unit:"tonne",tooltip:"The maximum amount of input product this plant can have in storage at any given time.",value:e.value.storage["limit (tonne)"],onChange:function(e){return t(e,"storage","limit (tonne)")},validate:"float"}),(0,zc.jsx)("h1",{children:"Disposal"}),(0,zc.jsx)(ls,{label:"Disposal cost",unit:"$/tonne",tooltip:"The cost to dispose of the product.",value:e.value["disposal cost ($/tonne)"],onChange:function(e){return t(e,"disposal cost ($/tonne)")},disableKeys:!0,validate:"float"}),(0,zc.jsx)(ls,{label:"Disposal limit",unit:"tonne",tooltip:"The maximum amount that can be disposed of. If an unlimited amount can be disposed, leave blank.",value:e.value["disposal limit (tonne)"],onChange:function(e){return t(e,"disposal limit (tonne)")},disableKeys:!0,valuePlaceholder:"Unlimited",validate:"float"}),(0,zc.jsx)("h1",{children:"Emissions"}),(0,zc.jsx)(ls,{label:"Emissions",unit:"tonne/tonne",tooltip:"A dictionary mapping the name of each greenhouse gas, produced to process each tonne of input, to the amount of gas produced (in tonne).",value:e.value["emissions (tonne/tonne)"],onChange:function(e){return t(e,"emissions (tonne/tonne)")},keyPlaceholder:"Emission name",valuePlaceholder:"0",validate:"float"})]})})]})},Zp="Header_HeaderBox__1tBDX",Jp="Header_HeaderContent__Ac8nl",eh=function(e){return(0,zc.jsx)("div",{className:Zp,children:(0,zc.jsxs)("div",{className:Jp,children:[(0,zc.jsx)("h1",{children:"RELOG"}),(0,zc.jsx)("h2",{children:e.title}),(0,zc.jsx)("div",{style:{float:"right",paddingTop:"5px"},children:e.children})]})})},th="Footer_Footer__YUTTj",nh=function(){return(0,zc.jsxs)("div",{className:th,children:[(0,zc.jsx)("p",{children:"RELOG: Reverse Logistics Optimization"}),(0,zc.jsx)("p",{children:"Copyright \xa9 2020\u20142022, UChicago Argonne, LLC. All Rights Reserved."})]})},rh={"initial amounts":{},"disposal cost ($/tonne)":"0","disposal limit (tonne)":"0","disposal limit (%)":"","transportation cost ($/km/tonne)":"0","transportation energy (J/km/tonne)":"0","transportation emissions (tonne/km/tonne)":{},x:0,y:0},oh={locations:{},"outputs (tonne/tonne)":{},"disposal cost ($/tonne)":{},"disposal limit (tonne)":{},"emissions (tonne/tonne)":{},storage:{"cost ($/tonne)":0,"limit (tonne)":0},"maximum capacity (tonne)":0,"minimum capacity (tonne)":0,"opening cost (max capacity) ($)":0,"opening cost (min capacity) ($)":0,"fixed operating cost (max capacity) ($)":0,"fixed operating cost (min capacity) ($)":0,"variable operating cost ($/tonne)":0,"energy (GJ/tonne)":0,x:0,y:0},ih={parameters:{"time horizon (years)":"1","building period (years)":"[1]","inflation rate (%)":"0"},products:{},plants:{}};function ah(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var uh=function(e){return String(e).length>0&&!isNaN(e)},lh=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(uh(e)){if(t){for(var r=parseFloat(e),o=[],i=0;i<t;i++)o.push(r),r*=n;return o}return parseFloat(e)}try{var a=JSON.parse(e);return a}catch(u){}return e},ch=function(e,t){for(var n={},r=0,o=Object.entries(e);r<o.length;r++){var i=s(o[r],2),a=i[0],u=i[1];0!==a.length&&(n[a]=lh(u,t))}return Object.keys(n).length>0?n:null},sh=function(e){for(var t=null,n=0,r=Object.values(e["initial amounts"]);n<r.length;n++){var o=r[n]["amount (tonne)"];if(t)for(var i=0;i<o.length;i++)t[i]+=o[i];else t=ah(o)}return t},fh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(void 0===e)return"";if(Array.isArray(e)&&e.length>0){for(var n=!0,r=1;r<e.length;r++)if(Math.abs(e[r-1]-e[r]/t)>.001){n=!1;break}return n?String(e[0]):JSON.stringify(e)}return e},dh=function(e){if(!e)return{};for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var o=s(r[n],2),i=o[0],a=o[1];t[i]=fh(a)}return t},ph=function(e,t){for(var n=0;n<t.length;n++){var r=e[t[n]];if(Array.isArray(r)&&r.length>1&&uh(r[0])&&uh(r[1])&&Math.abs(r[0])>0)return[r[1]/r[0],r.length]}return[1,1]},hh=function(e,t){var n={},r=t["time horizon (years)"];r=uh(r)?parseInt(r):1;var o=t["inflation rate (%)"];return o=uh(o)?parseFloat(o)/100+1:1,n["initial amounts"]=e["initial amounts"],["disposal limit (tonne)","transportation energy (J/km/tonne)"].forEach((function(t){var o=lh(e[t],r);o.length>0&&(n[t]=o)})),["disposal cost ($/tonne)","transportation cost ($/km/tonne)"].forEach((function(t){var i=lh(e[t],r,o);i.length>0&&(n[t]=i)})),["transportation emissions (tonne/km/tonne)"].forEach((function(t){var o=ch(e[t],r);o&&(n[t]=o)})),uh(e["disposal limit (%)"])&&(n["disposal limit (tonne)"]=function(e){for(var t=e["disposal limit (%)"],n=sh(e),r=[],o=0;o<n.length;o++)r[o]=n[o]*t/100;return r}(e)),n},vh=function(e,t){var n={},r=t["time horizon (years)"];r=uh(r)?parseInt(r):1;var o=t["inflation rate (%)"];o=uh(o)?parseFloat(o)/100+1:1,["input"].forEach((function(t){n[t]=e[t]})),["energy (GJ/tonne)"].forEach((function(t){n[t]=lh(e[t],r),void 0===n[t]&&delete n[t]})),["outputs (tonne/tonne)"].forEach((function(t){var r=ch(e[t]);r&&(n[t]=r)})),["emissions (tonne/tonne)"].forEach((function(t){var o=ch(e[t],r);o&&(n[t]=o)}));var i=e["minimum capacity (tonne)"],a=e["maximum capacity (tonne)"];n.locations={};for(var u=function(){var t=s(c[l],2),u=t[0],f=t[1],d=n.locations[u]={},p=d["capacities (tonne)"]={},h=f["area cost factor"],v=function(e){var t=lh(e,r,o);return Array.isArray(t)?t.map((function(e){return e*h})):""};["latitude (deg)","longitude (deg)"].forEach((function(e){d[e]=f[e]})),p[i]={};for(var g=0,m=Object.entries({"opening cost ($)":"opening cost (min capacity) ($)","fixed operating cost ($)":"fixed operating cost (min capacity) ($)","variable operating cost ($/tonne)":"variable operating cost ($/tonne)"});g<m.length;g++){var y=s(m[g],2),b=y[0],w=y[1];p[i][b]=v(e[w])}if(a!==i){p[a]={};for(var _=0,x=Object.entries({"opening cost ($)":"opening cost (max capacity) ($)","fixed operating cost ($)":"fixed operating cost (max capacity) ($)","variable operating cost ($/tonne)":"variable operating cost ($/tonne)"});_<x.length;_++){var E=s(x[_],2),S=E[0],k=E[1];p[a][S]=v(e[k])}}d.disposal={};for(var O=0,C=Object.entries(e["disposal cost ($/tonne)"]);O<C.length;O++){var N=s(C[O],2),j=N[0],P=N[1];if(0!==j.length){var M=v(P);if(M){d.disposal[j]={"cost ($/tonne)":M};var T=e["disposal limit (tonne)"][j];uh(T)&&(d.disposal[j]["limit (tonne)"]=lh(T,r))}}}d.storage={"cost ($/tonne)":v(e.storage["cost ($/tonne)"])};var D=e.storage["limit (tonne)"];uh(D)&&(d.storage["limit (tonne)"]=lh(D))},l=0,c=Object.entries(e.locations);l<c.length;l++)u();return n},gh=function(e){var t={},n={};t["initial amounts"]=u({},e["initial amounts"]),["x","y"].forEach((function(e){t[e]=null})),["disposal limit (%)"].forEach((function(e){t[e]=""})),["transportation energy (J/km/tonne)","disposal limit (tonne)"].forEach((function(n){t[n]=fh(e[n])}));var r=s(ph(e,["transportation cost ($/km/tonne)","disposal cost ($/tonne)"]),2),o=r[0],i=r[1];return n["inflation rate (%)"]=String(100*(o-1)),n["time horizon (years)"]=String(i),["transportation cost ($/km/tonne)","disposal cost ($/tonne)"].forEach((function(n){t[n]=fh(e[n],o)})),["transportation emissions (tonne/km/tonne)"].forEach((function(n){t[n]=dh(e[n])})),function(e,t){if("disposal limit (tonne)"in e){var n=sh(e);if(n){for(var r=e["disposal limit (tonne)"],o=Math.round(r[0]/n[0]*1e6)/1e6,i=1;i<r.length;i++)if(Math.abs(r[i]/n[i]-o)>1e-5)return;t["disposal limit (tonne)"]="",t["disposal limit (%)"]=String(100*o)}}}(e,t),[t,n]},mh=function(e){var t={},n={};t.storage={},t.storage["cost ($/tonne)"]=0,t.storage["limit (tonne)"]=0,t["disposal cost ($/tonne)"]=0,t["disposal limit (tonne)"]=0,["x","y"].forEach((function(e){t[e]=null})),["input"].forEach((function(n){t[n]=e[n]})),["energy (GJ/tonne)"].forEach((function(n){t[n]=fh(e[n]),""===t[n]&&delete t[n]})),["outputs (tonne/tonne)","emissions (tonne/tonne)"].forEach((function(n){t[n]=dh(e[n])}));for(var r=!1,o=t.locations={},i=function(){var i=s(u[a],2),l=i[0],c=i[1];o[l]={},["latitude (deg)","longitude (deg)"].forEach((function(e){o[l][e]=c[e]}));var f=function(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];t.push(o)}return t}(c["capacities (tonne)"]),d=f.length-1,p=f[0],h=f[d],v=c["capacities (tonne)"][p],g=c["capacities (tonne)"][h];if("minimum capacity (tonne)"in t){if(t["minimum capacity (tonne)"]!==p||t["maximum capacity (tonne)"]!==h)throw"Data loss"}else t["minimum capacity (tonne)"]=p,t["maximum capacity (tonne)"]=h;var m=1;r&&(m=t["opening cost (max capacity) ($)"],Array.isArray(m)&&(m=m[0]),m=g["opening cost ($)"][0]/m),o[l]["area cost factor"]=m;var y=s(ph(g,["opening cost ($)","fixed operating cost ($)","variable operating cost ($/tonne)"]),2),b=y[0],w=y[1];n["inflation rate (%)"]=String(100*(b-1)),n["time horizon (years)"]=String(w);for(var _=function(e){return fh(e.map((function(e){return e/m})),b)},x=_(g["opening cost ($)"]),E=_(v["opening cost ($)"]),S=_(g["fixed operating cost ($)"]),k=_(v["fixed operating cost ($)"]),O=_(c.storage["cost ($/tonne)"]),C=String(c.storage["limit (tonne)"]),N=_(v["variable operating cost ($/tonne)"]),j={},P={},M=0,T=Object.keys(e["outputs (tonne/tonne)"]);M<T.length;M++){var D=T[M];if(j[D]="",P[D]="",D in c.disposal){var L=c.disposal[D];j[D]=_(L["cost ($/tonne)"]),"limit (tonne)"in L&&(P[D]=fh(L["limit (tonne)"]))}}var A=function(e,t){(uh(e)&&uh(t)?Math.abs(e-t)<1:e===t)||console.warn("Data loss detected: ".concat(l,", ").concat(e," != ").concat(t))};r?(A(t["opening cost (max capacity) ($)"],x),A(t["opening cost (min capacity) ($)"],E),A(t["fixed operating cost (max capacity) ($)"],S),A(t["fixed operating cost (min capacity) ($)"],k),A(t["variable operating cost ($/tonne)"],N),A(t.storage["cost ($/tonne)"],O),A(t.storage["limit (tonne)"],C),A(String(t["disposal cost ($/tonne)"]),String(j)),A(String(t["disposal limit (tonne)"]),String(P))):(r=!0,t["opening cost (max capacity) ($)"]=x,t["opening cost (min capacity) ($)"]=E,t["fixed operating cost (max capacity) ($)"]=S,t["fixed operating cost (min capacity) ($)"]=k,t["variable operating cost ($/tonne)"]=N,t.storage={},t.storage["cost ($/tonne)"]=O,t.storage["limit (tonne)"]=C,t["disposal cost ($/tonne)"]=j,t["disposal limit (tonne)"]=P,n["inflation rate (%)"]=String(100*(b-1)))},a=0,u=Object.entries(e.locations);a<u.length;a++)i();return[t,n]},yh=function(){var e=o(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k("RELOG",1,{upgrade:function(e){e.createObjectStore("casebuilder")}});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),bh=function(){var t=(0,e.useRef)(),n=s((0,e.useState)(ih),2),r=n[0],i=n[1],a=function(){var e=o(h().mark((function e(t){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yh();case 2:return n=e.sent,e.next=5,n.put("casebuilder",t,"data");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,e.useEffect)(o(h().mark((function e(){var t,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yh();case 2:return t=e.sent,e.next=5,t.get("casebuilder","data");case 5:(n=e.sent)&&i(n);case 7:case"end":return e.stop()}}),e)}))),[]);for(var l=function(e){var t=prompt("Name");if(t&&0!==t.length&&!(t in e.products)&&!(t in e.plants))return t},c=function(e){var t=function(e){["parameters","plants","products"].forEach((function(t){if(!(t in e))throw"File not recognized."}));var t={};t.parameters=dh(e.parameters),["building period (years)"].forEach((function(n){t.parameters[n]=JSON.stringify(e.parameters[n])})),t.parameters["inflation rate (%)"]="0",t.products={};for(var n=0,r=Object.entries(e.products);n<r.length;n++){var o=s(r[n],2),i=o[0],a=o[1],l=s(gh(a),2),c=l[0],f=l[1];t.products[i]=c,t.parameters=u(u({},t.parameters),f)}t.plants={};for(var d=0,p=Object.entries(e.plants);d<p.length;d++){var h=s(p[d],2),v=h[0],g=h[1],m=s(mh(g),2),y=m[0],b=m[1];t.plants[v]=y,t.parameters=u(u({},t.parameters),b)}return t}(JSON.parse(e));i(t),a(t)},f=function(e,t,n){i((function(r){var o=u({},r);return void 0!==n?o[t][n]=e:o[t]=e,a(o),o}))},d=[],p=function(){var e=s(g[v],2),t=e[0],n=e[1];d.push((0,zc.jsx)(Kp,{name:t,value:n,onChange:function(e){return f(e,"products",t)}},t))},v=0,g=Object.entries(r.products);v<g.length;v++)p();for(var m=[],y=function(){var e=s(w[b],2),t=e[0],n=e[1];m.push((0,zc.jsx)(Qp,{name:t,value:n,onChange:function(e){return f(e,"plants",t)}},t))},b=0,w=Object.entries(r.plants);b<w.length;b++)y();return(0,zc.jsxs)(zc.Fragment,{children:[(0,zc.jsxs)(eh,{title:"Case Builder",children:[(0,zc.jsx)(Hc,{label:"Clear",onClick:function(){var e=JSON.parse(JSON.stringify(ih));i(e),a(e)}}),(0,zc.jsx)(Hc,{label:"Load",onClick:function(e){return t.current.click()}}),(0,zc.jsx)(Hc,{label:"Save",onClick:function(){qp("case.json",JSON.stringify(function(e){var t={parameters:{},products:{},plants:{}};["time horizon (years)","building period (years)"].forEach((function(n){t.parameters[n]=lh(e.parameters[n])}));var n=t.parameters["time horizon (years)"];uh(n)||(n=1);for(var r=0,o=Object.entries(e.products);r<o.length;r++){var i=s(o[r],2),a=i[0],u=i[1];t.products[a]=hh(u,e.parameters)}for(var l=0,c=Object.entries(e.plants);l<c.length;l++){var f=s(c[l],2),d=f[0],p=f[1];t.plants[d]=vh(p,e.parameters)}return t}(r),null,2))}}),(0,zc.jsx)("input",{type:"file",ref:t,accept:".json",style:{display:"none"},onChange:function(){var e=t.current.files[0];if(e){var n=new FileReader;n.addEventListener("load",(function(){c(n.result)})),n.readAsText(e)}t.current.value=""}})]}),(0,zc.jsxs)("div",{id:"content",children:[(0,zc.jsx)(Qc,{onAddPlant:function(){i((function(e){var t=l(e);if(void 0===t)return e;var n=u({},e),r=s(Kc(),2),o=r[0],i=r[1];return n.plants[t]=u(u({},oh),{},{x:o,y:i}),a(n),n}))},onAddPlantOutput:function(e,t){i((function(n){if(t in n.plants[e]["outputs (tonne/tonne)"])return n;var r=u({},n);return["outputs (tonne/tonne)","disposal cost ($/tonne)","disposal limit (tonne)"].forEach((function(n){r.plants[e][n]=u({},r.plants[e][n]),r.plants[e][n][t]=0})),a(r),r}))},onAddProduct:function(){i((function(e){var t=l(e);if(void 0===t)return e;var n=u({},e),r=s(Kc(),2),o=r[0],i=r[1];return console.log(o,i),n.products[t]=u(u({},rh),{},{x:o,y:i}),a(n),n}))},onMovePlant:function(e,t,n){i((function(r){var o=u({},r);return o.plants[e].x=t,o.plants[e].y=n,a(o),o}))},onMoveProduct:function(e,t,n){i((function(r){var o=u({},r);return o.products[e].x=t,o.products[e].y=n,a(o),o}))},onRenamePlant:function(e,t){i((function(n){var r=u({},n);return r.plants[t]=r.plants[e],delete r.plants[e],a(r),r}))},onRenameProduct:function(e,t){i((function(n){var r=u({},n);r.products[t]=r.products[e],delete r.products[e];for(var o=0,i=Object.entries(r.plants);o<i.length;o++){var l=s(i[o],2)[1];l.input===e&&(l.input=t);for(var c=!1,f=0,d=Object.entries(l["outputs (tonne/tonne)"]);f<d.length;f++){s(d[f],1)[0]===e&&(c=!0)}c&&(l["outputs (tonne/tonne)"][t]=l["outputs (tonne/tonne)"][e],delete l["outputs (tonne/tonne)"][e])}return a(r),r}))},onSetPlantInput:function(e,t){i((function(n){var r=u({},n);return r.plants[e].input=t,a(r),r}))},onRemovePlant:function(e){i((function(t){var n=u({},t);return delete n.plants[e],a(n),n}))},onRemoveProduct:function(e){i((function(t){var n=u({},t);delete n.products[e];for(var r=0,o=Object.entries(n.plants);r<o.length;r++){var i=s(o[r],2)[1];i.input===e&&delete i.input;for(var l=!1,c=0,f=Object.entries(i["outputs (tonne/tonne)"]);c<f.length;c++){s(f[c],1)[0]===e&&(l=!0)}l&&delete i["outputs (tonne/tonne)"][e]}return a(n),n}))},plants:r.plants,products:r.products}),(0,zc.jsx)(as,{value:r.parameters,onChange:function(e){return f(e,"parameters")}}),d,m]}),(0,zc.jsx)(nh,{})]})};t.render((0,zc.jsx)(e.StrictMode,{children:(0,zc.jsx)(bh,{})}),document.getElementById("root"))}()}();
//# sourceMappingURL=main.61f89eef.js.map