text: (this["webpackJsonpgraph-visualizer"]=this["webpackJsonpgraph-visualizer"]||[]).push([[0],{15:function(e,t,n){e.exports={node:"Node_node__2Cbef",common:"Node_common__30yaU",directedEdge:"Node_directedEdge__WJMid",visited:"Node_visited__zJZsq",shortestPath:"Node_shortestPath__1vWBN",deleteNodeMode:"Node_deleteNodeMode__14SAY",editEdgeMode:"Node_editEdgeMode__2FdYs",undirectedEdge:"Node_undirectedEdge__2oEGj",deleteEdgeMode:"Node_deleteEdgeMode__2X5Ia",nodeText:"Node_nodeText__2wrL6",edgeText:"Node_edgeText__28eQf",arrow:"Node_arrow___KGkP"}},28:function(e,t,n){e.exports={graph:"Graph_graph__3l3QX",mockEdge:"Graph_mockEdge__1HiUy",mockArrow:"Graph_mockArrow__1TSmV",modalButton:"Graph_modalButton__3oOMx",pathError:"Graph_pathError__3t8eO",traversal:"Graph_traversal__3EU2v",pathfinding:"Graph_pathfinding__faZhg"}},85:function(e,t,n){e.exports=n(93)},9:function(e,t,n){e.exports={controlPanel:"Board_controlPanel__erP7h",nodeOptions:"Board_nodeOptions__18MB1",edgeOptions:"Board_edgeOptions__r0Fag",miscellaneous:"Board_miscellaneous__3CRW8",algorithm:"Board_algorithm__m1qpp",visualizeControls:"Board_visualizeControls__sW7jh",board:"Board_board__1Y7VT",graphContainer:"Board_graphContainer__Qq_Cf",icon:"Board_icon__3-dTt",optionButtons:"Board_optionButtons__3Pt51",speedSlider:"Board_speedSlider__2vluo",visualizerProgress:"Board_visualizerProgress__2nl_9"}},90:function(e,t,n){},91:function(e,t,n){},93:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),o=n(31),i=n.n(o),c=(n(90),n(132)),d=(n(91),n(14)),s=n(59),l=n(18),u=n(54),f=n(34),m=n(15),p=n.n(m),g=function(e,t,n,a){var r=Math.sqrt((n-e)*(n-e)+(a-t)*(a-t)),o=(r-30)/r;return{tempX:e+(n-e)*o,tempY:t+(a-t)*o}},h=function(e){var t=e.node,n=e.edges,a=e.handleMove,o=e.handleEdge,i=e.deleteNodeMode,c=e.deleteEdgeMode,d=e.editEdgeMode;return r.a.createElement("g",{className:p.a.nodeGroup},r.a.createElement("circle",{onMouseDown:a,className:"".concat(p.a.node," ").concat(i&&p.a.deleteNodeMode," ").concat(t.isVisited&&p.a.visited," ").concat(t.isInShortestPath&&p.a.shortestPath),cx:t.x,cy:t.y,r:t.r,id:t.id}),n&&n.get(t.id).map((function(e){var n=function(e,t,n,a){var r=.5*(n+e),o=.5*(a+t),i=Math.atan2(a-t,n-e)-Math.PI/2,c=r+30*Math.cos(i),d=o+30*Math.sin(i);return"M".concat(e," ").concat(t," Q").concat(c," ").concat(d," ").concat(n," ").concat(a)}(e.x1,e.y1,e.x2,e.y2),a="M".concat(e.x1,",").concat(e.y1," L").concat(e.x2,",").concat(e.y2),i=function(e,t,n,a){var r=.5*(n+e),o=.5*(a+t),i=Math.atan2(a-t,n-e)-Math.PI/2;return{c1x:r+30*Math.cos(i),c1y:o+30*Math.sin(i)}}(e.x1,e.y1,e.x2,e.y2);return r.a.createElement(r.a.Fragment,null,"directed"===e.type&&r.a.createElement(r.a.Fragment,null,r.a.createElement("marker",{className:p.a.arrow,id:"arrowhead".concat(t.id).concat(e.to),markerWidth:"10",markerHeight:"7",refX:"9.7",refY:"3.5",orient:"auto"},r.a.createElement("polygon",{points:"0 0, 10 3.5, 0 7"})),r.a.createElement("path",{id:"".concat(t.id).concat(e.to),onClick:function(){return o(e,t)},d:n,className:"".concat(p.a.directedEdge," ").concat(c&&p.a.deleteEdgeMode," ").concat(d&&p.a.editEdgeMode),markerEnd:"url(#arrowhead".concat(t.id).concat(e.to,")")},"dsds"),e.weight&&r.a.createElement("text",{className:p.a.edgeText,x:i.c1x,y:i.c1y+7},e.weight),"})}"),"undirected"===e.type&&r.a.createElement(r.a.Fragment,null,r.a.createElement("path",{d:a,id:"".concat(t.id).concat(e.to),onClick:function(){return o(e,t)},className:"".concat(p.a.undirectedEdge," ").concat(c&&p.a.deleteEdgeMode," ").concat(d&&p.a.editEdgeMode," ")}),e.weight&&r.a.createElement("text",{className:p.a.edgeText,x:(e.x1+e.nodeX2)/2,y:(e.y1+e.nodeY2)/2-5},e.weight)))})),r.a.createElement("text",{className:p.a.nodeText,x:t.x,y:t.y+5},t.id))},v=n(28),E=n.n(v),b=n(141),y=n(4),N=n(137),w=n(136),_=n(44),k=n(45),x=function(){function e(){Object(_.a)(this,e),this.queue=void 0,this.queue=[]}return Object(k.a)(e,[{key:"push",value:function(e){this.queue.push(e)}},{key:"front",value:function(){return this.isEmpty()?-1:this.queue[0]}},{key:"back",value:function(){return this.isEmpty()?-1:this.queue[this.queue.length-1]}},{key:"pop",value:function(){this.isEmpty()||this.queue.shift()}},{key:"isEmpty",value:function(){return 0===this.queue.length}}]),e}(),O=function(){function e(){Object(_.a)(this,e),this.stack=void 0,this.stack=[]}return Object(k.a)(e,[{key:"push",value:function(e){this.stack.push(e)}},{key:"top",value:function(){return this.isEmpty()?-1:this.stack[this.stack.length-1]}},{key:"pop",value:function(){this.isEmpty()||this.stack.pop()}},{key:"isEmpty",value:function(){return 0===this.stack.length}}]),e}(),S=function(e,t){var n=[],a=t;for(n.push(a);e.has(a);)a=e.get(a),n.push(a);return n.reverse()},j=function(e,t){var n=[];return e.forEach((function(e,a){t.has(a)&&n.push(a)})),n.sort((function(t,n){return e.get(t)-e.get(n)}))[0]},M=function(e,t,n,a,r){t.get(e)&&t.get(e).forEach((function(t){if(a.has(parseInt(t.to))){var o=n.get(e)+t.weight;o<n.get(parseInt(t.to))&&(n.set(parseInt(t.to),o),r.set(parseInt(t.to),e))}}))},I=function(e,t,n){return n.has(e)?[]:(n.add(e),t.get(e).map((function(e){return parseInt(e.to)})))},B=function(e){var t=e.options,n=e.selectedEdge,o=e.selectedAlgo,i=e.setOptions,c=e.visualizationSpeed,m=e.setVisualizingState,p=Object(a.useState)([]),v=Object(d.a)(p,2),_=v[0],k=v[1],B=Object(a.useState)(new Map),C=Object(d.a)(B,2),A=C[0],P=C[1],W=Object(a.useState)(!1),Y=Object(d.a)(W,2),T=Y[0],X=Y[1],z=Object(a.useState)(),D=Object(d.a)(z,2),L=D[0],V=D[1],R=Object(a.useState)(null),q=Object(d.a)(R,2),F=q[0],G=q[1],U=Object(a.useState)(!0),H=Object(d.a)(U,2),J=H[0],K=H[1],Q=Object(a.useRef)(),Z=Object(a.useRef)(),$=Object(a.useRef)(0),ee=Object(a.useRef)(),te=Object(a.useState)(null),ne=Object(d.a)(te,2),ae=ne[0],re=ne[1];Object(a.useEffect)((function(){t.reset&&(k([]),P(new Map),$.current=0)}),[t.reset]),Object(a.useEffect)((function(){G(null)}),[t]);var oe=function(e){for(var n=function(n){if(n===e.length)return setTimeout((function(){var e=_.map((function(e){return Object(l.a)({},e,{isInShortestPath:!1,isVisited:!1})}));k(e),i(Object(l.a)({},t,{selectStartNode:!0})),m(!1)}),c*n),{v:void 0};setTimeout((function(){var t=e[n],a=Object(f.a)(_);a.forEach((function(e){e.id===t&&(e.isInShortestPath=!0,e.isVisited=!1)})),k(a)}),c*n)},a=0;a<=e.length;a++){var r=n(a);if("object"===typeof r)return r.v}},ie=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];i(Object(l.a)({},t,{selectStartNode:!1})),m(!0);for(var a=function(t){if(t===e.length)return setTimeout((function(){oe(n)}),c*t),{v:void 0};setTimeout((function(){var n=e[t],a=Object(f.a)(_);a.forEach((function(e){e.id===n&&(e.isVisited=!0)})),k(a)}),c*t)},r=0;r<=e.length;r++){var o=a(r);if("object"===typeof o)return o.v}},ce=function(e,n){t.deleteEdge?de(e,n.id):t.editEdge&&se(e,n)},de=function(e,t){if("directed"===e.type){var n=A.get(t).filter((function(t){return t.to!==e.to})),a=new Map(A);a.set(t,n),P(a)}else if("undirected"===e.type){var r=A.get(t).filter((function(t){return t.to!==e.to})),o=A.get(parseInt(e.to)).filter((function(e){return e.to!==t.toString()})),i=new Map(A);i.set(t,r),i.set(parseInt(e.to),o),P(i)}},se=function(e,t){Q.current=Object(l.a)({},t),V(e),X(!0)},le=function(){var e=Object(l.a)({},L);if("directed"===L.type){var t=A.get(Q.current.id).map((function(t){return t.to===e.to?Object(l.a)({},t,{weight:e.weight}):t})),n=new Map(A);n.set(Q.current.id,t),P(n)}else if("undirected"===L.type){var a=A.get(Q.current.id).map((function(t){return t.to===e.to?Object(l.a)({},t,{weight:e.weight}):t})),r=A.get(parseInt(e.to)).map((function(t){return t.to===Q.current.id.toString()?Object(l.a)({},t,{weight:e.weight}):t})),o=new Map(A);o.set(Q.current.id,a),o.set(parseInt(e.to),r),P(o)}X(!1)},ue=function(e){var a=t.moveNode,r=n.key&&("directed"===n.key||"undirected"===n.key);if(a){Q.current=e.target;var o=function(e){var t=e.offsetX,n=e.offsetY;Q.current.setAttribute("cx",t),Q.current.setAttribute("cy",n),Q.current.nextElementSibling.setAttribute("x",t),Q.current.nextElementSibling.setAttribute("y",n+5),function(e,t){var n=_.map((function(n){return n.id===parseInt(Q.current.id)?Object(l.a)({},n,{x:e,y:t}):n}));k(n)}(t,n),function(e,t){var n=A.get(parseInt(Q.current.id)).map((function(n){var a=g(e,t,n.nodeX2,n.nodeY2),r=a.tempX,o=a.tempY;return Object(l.a)({},n,{x1:e,y1:t,x2:r,y2:o})}));A.set(parseInt(Q.current.id),n);var a,r=Object(u.a)(A.entries());try{for(r.s();!(a=r.n()).done;){var o=Object(d.a)(a.value,2),i=o[0],c=o[1].map((function(n){if(Q.current.id===n.to){var a=g(n.x1,n.y1,n.nodeX2,n.nodeY2),r=a.tempX,o=a.tempY;return Object(l.a)({},n,{x2:r,y2:o,nodeX2:e,nodeY2:t})}return n}));A.set(i,c)}}catch(s){r.e(s)}finally{r.f()}P(A)}(t,n)};ee.current.addEventListener("mousemove",o),ee.current.addEventListener("mouseup",(function e(t){ee.current.removeEventListener("mousemove",o),ee.current.removeEventListener("mouseup",e)}))}else if(r){Q.current=e.target;var i=function(e){var t=e.offsetX,n=e.offsetY;Z.current={x1:parseInt(Q.current.getAttribute("cx")),y1:parseInt(Q.current.getAttribute("cy")),x2:t,y2:n,from:Q.current.id,to:null,weight:0},re(Z.current)};ee.current.addEventListener("mousemove",i),ee.current.addEventListener("mouseup",(function e(t){!function(e){var t,a,r;if((null===(t=e.target)||void 0===t||null===(a=t.className)||void 0===a||null===(r=a.baseVal)||void 0===r?void 0:r.includes("node"))&&Z.current){var o=Z.current.x1,i=Z.current.y1,c=parseInt(e.target.getAttribute("cx")),d=parseInt(e.target.getAttribute("cy")),l=c,u=d;Z.current.to=e.target.id;var f=0===A.get(parseInt(Z.current.from)).length||A.get(parseInt(Z.current.from)).every((function(e){return e.to!==Z.current.to})),m=Z.current.from!==Z.current.to;if(f&&m){if("directed"===n.key){var p=g(o,i,c,d),h=p.tempX,v=p.tempY,E=parseInt(Z.current.from),b=Z.current,y=(b.from,Object(s.a)(b,["from"]));y.x2=h,y.y2=v,y.nodeX2=l,y.nodeY2=u,y.type="directed",A.get(E).push(y)}else if("undirected"===n.key){var N=parseInt(Z.current.from),w=parseInt(Z.current.to);if(!(A.get(N).some((function(e){return parseInt(e.to)===w}))||A.get(w).some((function(e){return parseInt(e.to)===N})))){var _=g(o,i,c,d),k=_.tempX,x=_.tempY,O=Z.current,S=(O.from,Object(s.a)(O,["from"]));S.x2=k,S.y2=x,S.nodeX2=l,S.nodeY2=u,S.type="undirected",A.get(N).push(S);var j=g(c,d,o,i),M={x1:c,y1:d,x2:j.tempX,y2:j.tempY,nodeX2:o,nodeY2:i,to:Z.current.from,type:"undirected",weight:Z.current.weight};A.get(w).push(M)}}P(A)}}re(null),Z.current=void 0}(t),ee.current.removeEventListener("mousemove",i),ee.current.removeEventListener("mouseup",e)}))}};return r.a.createElement(r.a.Fragment,null,t.selectStartNode&&!t.selectEndNode&&r.a.createElement(b.a,{className:E.a.traversal,isMultiline:!1,dismissButtonAriaLabel:"Close",styles:{text:{fontWeight:"bold",fontSize:"14px"}}},"Click on any node to begin the traversal."),t.selectStartNode&&t.selectEndNode&&(J?r.a.createElement(b.a,{className:E.a.pathfinding,isMultiline:!1,dismissButtonAriaLabel:"Close",styles:{text:{fontWeight:"bold",fontSize:"14px"}}},"Select a starting node and ending node to visualize the pathfinding algorithm."):r.a.createElement(b.a,{className:E.a.pathError,messageBarType:y.a.error,isMultiline:!1,dismissButtonAriaLabel:"Close",styles:{text:{fontWeight:"bold",fontSize:"14px"}}},"Path is not possible for the given vertices.")),r.a.createElement("svg",{ref:ee,className:E.a.graph,onClick:function(e){var n,a,r,i,c,s,l,m,p,g,h,v;if(t.drawNode&&!(null===(n=e.target)||void 0===n||null===(a=n.className)||void 0===a||null===(r=a.baseVal)||void 0===r?void 0:r.includes("Node")))!function(e){var t=e.clientX-e.target.getBoundingClientRect().left,n=e.clientY-e.target.getBoundingClientRect().top;$.current+=1;var a={id:$.current,x:t,y:n,r:30};A.set($.current,[]),P(A),k([].concat(Object(f.a)(_),[a]))}(e);else if(t.deleteNode&&(null===(i=e.target)||void 0===i||null===(c=i.className)||void 0===c||null===(s=c.baseVal)||void 0===s?void 0:s.includes("Node")))!function(e){var t,n=_.filter((function(t){return t.id!==parseInt(e.target.id)})),a=Object(u.a)(A.entries());try{for(a.s();!(t=a.n()).done;){var r=Object(d.a)(t.value,2),o=r[0],i=r[1].filter((function(t){if(e.target.id!==t.to)return t}));A.set(o,i)}}catch(c){a.e(c)}finally{a.f()}A.delete(parseInt(e.target.id)),P(A),k(n)}(e);else if(t.selectStartNode&&!t.selectEndNode&&(null===(l=e.target)||void 0===l||null===(m=l.className)||void 0===m||null===(p=m.baseVal)||void 0===p?void 0:p.includes("Node"))){var E=_.filter((function(t){return t.id===parseInt(e.target.id)}))[0];if(E&&E.id)if("bfs"===o.key){var b=function(e,t){var n=new x,a=[],r=new Set;n.push(t);for(var o=new Map(e);!n.isEmpty();){var i=n.front();if(n.pop(),!r.has(i))a.push(i),I(i,o,r).forEach((function(e){n.push(e)}))}return a}(A,E.id);ie(b)}else if("dfs"===o.key){var y=function(e,t){var n=new O,a=[],r=new Set;n.push(t);for(var o=new Map(e);!n.isEmpty();){var i=n.top();if(n.pop(),!r.has(i))a.push(i),I(i,o,r).forEach((function(e){n.push(e)}))}return a}(A,E.id);ie(y)}}else if(t.selectStartNode&&t.selectEndNode&&(null===(g=e.target)||void 0===g||null===(h=g.className)||void 0===h||null===(v=h.baseVal)||void 0===v?void 0:v.includes("Node"))&&"circle"===e.target.tagName)if(F){var N=function(e,t,n,a){if(t===n)return{shortestPath:[t],visitedNodes:[t]};var r=new Map(e),o=Object(f.a)(a),i=new Map,c=new Map,d=new Set,s=[];o.forEach((function(e){i.set(e.id,1/0),d.add(e.id)})),i.set(t,0);var l=t;for(s.push(l),d.delete(l);0!==d.size;){if(M(l,r,i,d,c),l=j(i,d),i.get(l)===1/0)return{shortestPath:[],visitedNodes:s};if(s.push(l),d.delete(l),l===n)return{shortestPath:S(c,n),visitedNodes:s}}}(A,F,parseInt(e.target.id),_),w=N.shortestPath,B=N.visitedNodes;0!==w.length?ie(B,w):(K(!1),setTimeout((function(){K(!0)}),2500)),G(null)}else G(parseInt(e.target.id))}},_.map((function(e){return r.a.createElement(h,{handleEdge:ce,handleMove:ue,key:e.id,node:e,edges:A,deleteEdgeMode:t.deleteEdge,deleteNodeMode:t.deleteNode,editEdgeMode:t.editEdge})})),ae&&r.a.createElement(r.a.Fragment,null,"directed"===n.key&&r.a.createElement("marker",{className:E.a.mockArrow,id:"mockArrowHead",markerWidth:"10",markerHeight:"7",refX:"0",refY:"3.5",orient:"auto"},r.a.createElement("polygon",{points:"0 0, 10 3.5, 0 7"})),r.a.createElement("line",{className:E.a.mockEdge,x1:ae.x1,y1:ae.y1,x2:ae.x2,y2:ae.y2,markerEnd:"url(#mockArrowHead)"}))),r.a.createElement(N.a,{styles:{main:{minHeight:"0px",minWidth:"0px",height:"31px"},scrollableContent:{display:"flex"}},isOpen:T},L&&null!==L.weight&&r.a.createElement(w.a,{styles:{fieldGroup:{border:"none"}},type:"number",min:0,max:500,value:L.weight,onKeyDown:function(e){13===e.keyCode&&le()},onChange:function(e){parseInt(e.target.value)>=0&&parseInt(e.target.value)<=500&&V(Object(l.a)({},L,{weight:parseInt(e.target.value)}))}}),r.a.createElement("button",{className:E.a.modalButton,onClick:le},"Set Weight")))},C=n(9),A=n.n(C),P=n(134),W=n(143),Y=n(142),T=[{key:"select",text:"Select Edge"},{key:"directed",text:"Directed"},{key:"undirected",text:"Undirected"}],X=[{key:"select",text:"Select Algorithm"},{key:"bfs",text:"Breath First Search Traversal"},{key:"dfs",text:"Depth First Search Traversal"},{key:"dijkstra",text:"Dijkstra PathFinding Algorithm"}],z={edgeDropdown:{title:{background:"transparent",color:"white !important",borderRadius:"5px",border:"2px solid white !important"},dropdownItemSelectedAndDisabled:{color:"white"},caretDown:{color:"white !important"},dropdownItem:{background:"rgb(84, 99, 173)  !important",color:"white",border:"none"},dropdownItemSelected:{background:"#4144a0 !important",color:"white",border:"none"}},algoDropdown:{title:{background:"transparent",color:"white !important",borderRadius:"5px",border:"2px solid white !important",width:"200px"},dropdownItemSelectedAndDisabled:{color:"white"},caretDown:{color:"white !important"},dropdownItem:{background:"rgb(84, 99, 173)  !important",color:"white",border:"none"},dropdownItemSelected:{background:"#4144a0 !important",color:"white",border:"none"}}},D=function(e){var t=Object(a.useState)({drawNode:!0,moveNode:!1,deleteNode:!1,reset:!1,editEdge:!1,deleteEdge:!1,selectStartNode:!1,selectEndNode:!1}),n=Object(d.a)(t,2),o=n[0],i=n[1],c=Object(a.useState)(),s=Object(d.a)(c,2),l=s[0],u=s[1],f=Object(a.useState)(),m=Object(d.a)(f,2),p=m[0],g=m[1],h=Object(a.useState)(),v=Object(d.a)(h,2),E=v[0],b=v[1],y=Object(a.useState)(250),N=Object(d.a)(y,2),w=N[0],_=N[1],k=function(e){Object.keys(o).forEach((function(t){o[t]=t===e})),u({key:"select",text:"Select Edge"}),g({key:"select",text:"Select Algorithm"}),i(o)};return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:A.a.board},r.a.createElement("div",{className:A.a.controlPanel},r.a.createElement("div",{className:A.a.nodeOptions},r.a.createElement("button",{className:A.a.optionButtons,onClick:function(){return k("drawNode")},disabled:E},r.a.createElement("i",{className:"".concat(A.a.icon," fas fa-circle")}),"Draw Node"),r.a.createElement("button",{className:A.a.optionButtons,onClick:function(){return k("moveNode")},disabled:E},r.a.createElement("i",{className:"".concat(A.a.icon," fas fa-arrows-alt")}),"Move Node"),r.a.createElement("button",{className:A.a.optionButtons,onClick:function(){return k("deleteNode")},disabled:E},r.a.createElement("i",{className:"".concat(A.a.icon," fas fa-trash")}),"Delete Node")),r.a.createElement("div",{className:A.a.edgeOptions},r.a.createElement(P.a,{className:A.a.dropdownWrapper,options:T,styles:z.edgeDropdown,placeholder:"Select Edge",selectedKey:l&&l.key,onChange:function(e,t){i({drawNode:!1,moveNode:!1,deleteNode:!1,reset:!1,editEdge:!1,deleteEdge:!1,selectStartNode:!1,selectEndNode:!1}),g({key:"select",text:"Select Algorithm"}),u(t)},disabled:E}),r.a.createElement("button",{className:A.a.optionButtons,onClick:function(){return k("editEdge")},disabled:E},r.a.createElement("i",{className:"".concat(A.a.icon," fas fa-pen")}),"Edit Edge"),r.a.createElement("button",{className:A.a.optionButtons,onClick:function(){return k("deleteEdge")},disabled:E},r.a.createElement("i",{className:"".concat(A.a.icon," fas fa-trash")}),"Delete Edge")),r.a.createElement("div",{className:A.a.visualizeControls},r.a.createElement(P.a,{className:A.a.dropdownWrapper,options:X,styles:z.algoDropdown,placeholder:"Select Algorithm",selectedKey:p&&p.key,onChange:function(e,t){g(t),u({key:"select",text:"Select Edge"}),"select"===(null===t||void 0===t?void 0:t.key)?i({selectStartNode:!1,selectEndNode:!1,editEdge:!1,deleteEdge:!1,drawNode:!1,moveNode:!1,deleteNode:!1,reset:!1}):"bfs"===(null===t||void 0===t?void 0:t.key)||"dfs"===(null===t||void 0===t?void 0:t.key)?i({selectStartNode:!0,selectEndNode:!1,editEdge:!1,deleteEdge:!1,drawNode:!1,moveNode:!1,deleteNode:!1,reset:!1}):i({selectStartNode:!0,selectEndNode:!0,editEdge:!1,deleteEdge:!1,drawNode:!1,moveNode:!1,deleteNode:!1,reset:!1})},disabled:E}),r.a.createElement(W.a,{className:A.a.speedSlider,label:"Visual Delay",styles:{titleLabel:{color:"white"},valueLabel:{color:"white"},inactiveSection:{background:"white"},activeSection:{backgroundImage:"linear-gradient(45deg, #eaecff, #946cff)"}},min:100,max:1e3,step:100,value:w,onChange:_,disabled:E})),r.a.createElement("div",{className:A.a.miscellaneous},r.a.createElement("button",{className:A.a.optionButtons,onClick:function(){return k("reset")},disabled:E},r.a.createElement("i",{className:"".concat(A.a.icon," fas fa-undo-alt")}),"Reset"))),r.a.createElement("div",{className:A.a.visualizerProgress},E?r.a.createElement(Y.a,{styles:{itemProgress:{padding:"0"}}}):r.a.createElement("hr",null)),r.a.createElement("div",{className:A.a.graphContainer},r.a.createElement(B,{options:o,selectedAlgo:p,selectedEdge:l,setOptions:i,visualizationSpeed:w,setVisualizingState:b}))))};Object(c.a)();var L=function(){return r.a.createElement(D,null)},V=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function R(e,t){navigator.serviceWorker.register(e).then((function(e){e.onupdatefound=function(){var n=e.installing;null!=n&&(n.onstatechange=function(){"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://bit.ly/CRA-PWA."),t&&t.onUpdate&&t.onUpdate(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}i.a.render(r.a.createElement(r.a.StrictMode,null,r.a.createElement(L,null)),document.getElementById("root")),function(e){if("serviceWorker"in navigator){if(new URL("",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("","/service-worker.js");V?(!function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then((function(n){var a=n.headers.get("content-type");404===n.status||null!=a&&-1===a.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):R(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://bit.ly/CRA-PWA")}))):R(t,e)}))}}()}},[[85,1,2]]]);
  //# sourceMappingURL=main.bc2ba2f9.chunk.js.map