v||of?d.offsetWidth:i.setup.minPositionX||0,P=o>v?d.offsetHeight:i.setup.minPositionY||0,w=$(i,y,P,r,i.bounds,s||l),E=w.x,Y=w.y;return{scale:r,positionX:h?E:e,positionY:b?Y:o}}}function Ue(i,n,e,o,r){var a=i.setup.limitToBounds,t=i.wrapperComponent,s=i.bounds,l=i.transformState,d=l.scale,u=l.positionX,f=l.positionY;if(!(t===null||s===null||n===u&&e===f)){var m=J(n,e,s,a,o,r,t),v=m.x,p=m.y;i.setTransformState(d,v,p)}}var xe=function(i,n,e){var o=i.startCoords,r=i.transformState,a=i.setup.panning,t=a.lockAxisX,s=a.lockAxisY,l=r.positionX,d=r.positionY;if(!o)return{x:l,y:d};var u=n-o.x,f=e-o.y,m=t?l:u,v=s?d:f;return{x:m,y:v}},G=function(i,n){var e=i.setup,o=i.transformState,r=o.scale,a=e.minScale,t=e.disablePadding;return n>0&&r>=a&&!t?n:0},Ge=function(i){var n=i.mounted,e=i.setup,o=e.disabled,r=e.velocityAnimation,a=i.transformState.scale,t=r.disabled,s=!t||a>1||!o||n;return!!s},Je=function(i){var n=i.mounted,e=i.velocity,o=i.bounds,r=i.setup,a=r.disabled,t=r.velocityAnimation,s=i.transformState.scale,l=t.disabled,d=!l||s>1||!a||n;return!(!d||!e||!o)};function $e(i,n){var e=i.setup.velocityAnimation,o=e.equalToMove,r=e.animationTime,a=e.sensitivity;return o?r*n*a:r}function Si(i,n,e,o,r,a,t,s,l,d){if(r){if(n>t&&e>t){var u=t+(i-t)*d;return u>l?l:ua?a:u}}return o?n:ai(i,a,t,r)}function Ie(i,n){var e=1;return n?Math.min(e,i.offsetWidth/window.innerWidth):e}function io(i,n){var e=Ge(i);if(e){var o=i.lastMousePosition,r=i.velocityTime,a=i.setup,t=i.wrapperComponent,s=a.velocityAnimation.equalToMove,l=Date.now();if(o&&r&&t){var d=Ie(t,s),u=n.x-o.x,f=n.y-o.y,m=u/d,v=f/d,p=l-r,h=u*u+f*f,b=Math.sqrt(h)/p;i.velocity={velocityX:m,velocityY:v,total:b}}i.lastMousePosition=n,i.velocityTime=l}}function eo(i){var n=i.velocity,e=i.bounds,o=i.setup,r=i.wrapperComponent,a=Je(i);if(!(!a||!n||!e||!r)){var t=n.velocityX,s=n.velocityY,l=n.total,d=e.maxPositionX,u=e.minPositionX,f=e.maxPositionY,m=e.minPositionY,v=o.limitToBounds,p=o.alignmentAnimation,h=o.zoomAnimation,b=o.panning,y=b.lockAxisY,P=b.lockAxisX,w=h.animationType,E=p.sizeX,Y=p.sizeY,k=p.velocityAlignmentTime,_=k,L=$e(i,l),D=Math.max(L,_),O=G(i,E),B=G(i,Y),H=O*r.offsetWidth/100,fi=B*r.offsetHeight/100,ae=d+H,te=u-H,se=f+fi,le=m-fi,mi=i.transformState,ue=new Date().getTime();Ui(i,w,D,function(de){var ii=i.transformState,fe=ii.scale,ei=ii.positionX,oi=ii.positionY,me=new Date().getTime()-ue,ve=me/_,pe=Qi[p.animationType],vi=1-pe(Math.min(1,ve)),pi=1-de,hi=ei+t*pi,ci=oi+s*pi,he=Si(hi,mi.positionX,ei,P,v,u,d,te,ae,vi),ce=Si(ci,mi.positionY,oi,y,v,m,f,le,se,vi);(ei!==hi||oi!==ci)&&i.setTransformState(fe,he,ce)})}}function wi(i,n){var e=i.transformState.scale;X(i),Z(i,e),window.TouchEvent!==void 0&&n instanceof TouchEvent?Qe(i,n):Fe(i,n)}function xi(i){var n=i.transformState.scale,e=i.setup,o=e.minScale,r=e.alignmentAnimation,a=r.disabled,t=r.sizeX,s=r.sizeY,l=r.animationTime,d=r.animationType,u=a||n.1&&f;m?eo(i):xi(i)}}function ui(i,n,e,o){var r=i.setup,a=r.minScale,t=r.maxScale,s=r.limitToBounds,l=j(T(n,2),a,t,0,!1),d=Z(i,l),u=$(i,e,o,l,d,s),f=u.x,m=u.y;return{scale:l,positionX:f,positionY:m}}function Gi(i,n,e){var o=i.transformState.scale,r=i.wrapperComponent,a=i.setup,t=a.minScale,s=a.limitToBounds,l=a.zoomAnimation,d=l.disabled,u=l.animationTime,f=l.animationType,m=d||o>=t;if((o>=1||s)&&xi(i),!(m||!r||!i.mounted)){var v=n||r.offsetWidth/2,p=e||r.offsetHeight/2,h=ui(i,t,v,p);h&&A(i,h,u,f)}}var N=function(){return N=Object.assign||function(n){for(var e,o=1,r=arguments.length;ot||Math.sign(e.deltaY)!==Math.sign(n.deltaY)||e.deltaY>0&&e.deltaYn.deltaY||Math.sign(e.deltaY)!==Math.sign(n.deltaY):!1},wo=function(i,n){var e=i.setup.pinch,o=e.disabled,r=e.excluded,a=i.isInitialized,t=n.target,s=a&&!o&&t;if(!s)return!1;var l=I(t,r);return!l},yo=function(i){var n=i.setup.pinch.disabled,e=i.isInitialized,o=i.pinchStartDistance,r=e&&!n&&o;return!!r},Co=function(i,n,e){var o=e.getBoundingClientRect(),r=i.touches,a=T(r[0].clientX-o.left,5),t=T(r[0].clientY-o.top,5),s=T(r[1].clientX-o.left,5),l=T(r[1].clientY-o.top,5);return{x:(a+s)/2/n,y:(t+l)/2/n}},ne=function(i){return Math.sqrt(Math.pow(i.touches[0].pageX-i.touches[1].pageX,2)+Math.pow(i.touches[0].pageY-i.touches[1].pageY,2))},Po=function(i,n){var e=i.pinchStartScale,o=i.pinchStartDistance,r=i.setup,a=r.maxScale,t=r.minScale,s=r.zoomAnimation,l=r.disablePadding,d=s.size,u=s.disabled;if(!e||o===null||!n)throw new Error("Pinch touches distance was not provided");if(n<0)return i.transformState.scale;var f=n/o,m=f*e;return j(T(m,2),t,a,d,!u&&!l)},To=160,Yo=100,Xo=function(i,n){var e=i.props,o=e.onWheelStart,r=e.onZoomStart;i.wheelStopEventTimer||(X(i),g(c(i),n,o),g(c(i),n,r))},No=function(i,n){var e=i.props,o=e.onWheel,r=e.onZoom,a=i.contentComponent,t=i.setup,s=i.transformState,l=s.scale,d=t.limitToBounds,u=t.centerZoomedOut,f=t.zoomAnimation,m=t.wheel,v=t.disablePadding,p=t.smooth,h=f.size,b=f.disabled,y=m.step,P=m.smoothStep;if(!a)throw new Error("Component not mounted");n.preventDefault(),n.stopPropagation();var w=go(n,null),E=p?P*Math.abs(n.deltaY):y,Y=bo(i,w,E,!n.ctrlKey);if(l!==Y){var k=Z(i,Y),_=oe(n,a,l),L=b||h===0||u||v,D=d&&L,O=$(i,_.x,_.y,Y,k,D),B=O.x,H=O.y;i.previousWheelEvent=n,i.setTransformState(Y,B,H),g(c(i),n,o),g(c(i),n,r)}},zo=function(i,n){var e=i.props,o=e.onWheelStop,r=e.onZoomStop;si(i.wheelAnimationTimer),i.wheelAnimationTimer=setTimeout(function(){i.mounted&&(Gi(i,n.x,n.y),i.wheelAnimationTimer=null)},Yo);var a=So(i,n);a&&(si(i.wheelStopEventTimer),i.wheelStopEventTimer=setTimeout(function(){i.mounted&&(i.wheelStopEventTimer=null,g(c(i),n,o),g(c(i),n,r))},To))},Ao=function(i,n){var e=ne(n);i.pinchStartDistance=e,i.lastDistance=e,i.pinchStartScale=i.transformState.scale,i.isPanning=!1,X(i)},Eo=function(i,n){var e=i.contentComponent,o=i.pinchStartDistance,r=i.transformState.scale,a=i.setup,t=a.limitToBounds,s=a.centerZoomedOut,l=a.zoomAnimation,d=l.disabled,u=l.size;if(!(o===null||!e)){var f=Co(n,r,e);if(!(!Number.isFinite(f.x)||!Number.isFinite(f.y))){var m=ne(n),v=Po(i,m);if(v!==r){var p=Z(i,v),h=d||u===0||s,b=t&&h,y=$(i,f.x,f.y,v,p,b),P=y.x,w=y.y;i.pinchMidpoint=f,i.lastDistance=m,i.setTransformState(v,P,w)}}}},_o=function(i){var n=i.pinchMidpoint;i.velocity=null,i.lastDistance=null,i.pinchMidpoint=null,i.pinchStartScale=null,i.pinchStartDistance=null,Gi(i,n==null?void 0:n.x,n==null?void 0:n.y)},re=function(i,n){var e=i.props.onZoomStop,o=i.setup.doubleClick.animationTime;si(i.doubleClickStopEventTimer),i.doubleClickStopEventTimer=setTimeout(function(){i.doubleClickStopEventTimer=null,g(c(i),n,e)},o)},Wo=function(i,n){var e=i.props,o=e.onZoomStart,r=e.onZoom,a=i.setup.doubleClick,t=a.animationTime,s=a.animationType;g(c(i),n,o),ie(i,t,s,function(){return g(c(i),n,r)}),re(i,n)};function Do(i,n){var e=i.setup,o=i.doubleClickStopEventTimer,r=i.transformState,a=i.contentComponent,t=r.scale,s=i.props,l=s.onZoomStart,d=s.onZoom,u=e.doubleClick,f=u.disabled,m=u.mode,v=u.step,p=u.animationTime,h=u.animationType;if(!f&&!o){if(m==="reset")return Wo(i,n);if(!a)return console.error("No ContentComponent found");var b=m==="zoomOut"?-1:1,y=$i(i,b,v);if(t!==y){g(c(i),n,l);var P=oe(n,a,t),w=ui(i,y,P.x,P.y);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");g(c(i),n,d),A(i,w,p,h),re(i,n)}}}var Oo=function(i,n){var e=i.isInitialized,o=i.setup,r=i.wrapperComponent,a=o.doubleClick,t=a.disabled,s=a.excluded,l=n.target,d=r==null?void 0:r.contains(l),u=e&&l&&d&&!t;if(!u)return!1;var f=I(l,s);return!f},Zo=function(){function i(n){var e=this;this.mounted=!0,this.onChangeCallbacks=new Set,this.onInitCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.startCoords=null,this.lastTouch=null,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.animate=!1,this.animation=null,this.maxBounds=null,this.pressedKeys={},this.mount=function(){e.initializeWindowEvents()},this.unmount=function(){e.cleanupWindowEvents()},this.update=function(o){Z(e,e.transformState.scale),e.setup=Pi(o)},this.initializeWindowEvents=function(){var o,r=ri(),a=(o=e.wrapperComponent)===null||o===void 0?void 0:o.ownerDocument,t=a==null?void 0:a.defaultView;t==null||t.addEventListener("mousedown",e.onPanningStart,r),t==null||t.addEventListener("mousemove",e.onPanning,r),t==null||t.addEventListener("mouseup",e.onPanningStop,r),a==null||a.addEventListener("mouseleave",e.clearPanning,r),t==null||t.addEventListener("keyup",e.setKeyUnPressed,r),t==null||t.addEventListener("keydown",e.setKeyPressed,r)},this.cleanupWindowEvents=function(){var o,r,a=ri(),t=(o=e.wrapperComponent)===null||o===void 0?void 0:o.ownerDocument,s=t==null?void 0:t.defaultView;s==null||s.removeEventListener("mousedown",e.onPanningStart,a),s==null||s.removeEventListener("mousemove",e.onPanning,a),s==null||s.removeEventListener("mouseup",e.onPanningStop,a),t==null||t.removeEventListener("mouseleave",e.clearPanning,a),s==null||s.removeEventListener("keyup",e.setKeyUnPressed,a),s==null||s.removeEventListener("keydown",e.setKeyPressed,a),document.removeEventListener("mouseleave",e.clearPanning,a),X(e),(r=e.observer)===null||r===void 0||r.disconnect()},this.handleInitializeWrapperEvents=function(o){var r=ri();o.addEventListener("wheel",e.onWheelZoom,r),o.addEventListener("dblclick",e.onDoubleClick,r),o.addEventListener("touchstart",e.onTouchPanningStart,r),o.addEventListener("touchmove",e.onTouchPanning,r),o.addEventListener("touchend",e.onTouchPanningStop,r)},this.handleInitialize=function(o){var r=e.setup.centerOnInit;e.applyTransformation(),e.onInitCallbacks.forEach(function(a){return a(c(e))}),r&&(e.setCenter(),e.observer=new ResizeObserver(function(){var a;e.onInitCallbacks.forEach(function(t){return t(c(e))}),e.setCenter(),(a=e.observer)===null||a===void 0||a.disconnect()}),e.observer.observe(o))},this.onWheelZoom=function(o){var r=e.setup.disabled;if(!r){var a=ho(e,o);if(a){var t=e.isPressingKeys(e.setup.wheel.activationKeys);t&&(Xo(e,o),No(e,o),zo(e,o))}}},this.onPanningStart=function(o){var r=e.setup.disabled,a=e.props.onPanningStart;if(!r){var t=gi(e,o);if(t){var s=e.isPressingKeys(e.setup.panning.activationKeys);s&&(o.preventDefault(),o.stopPropagation(),X(e),wi(e,o),g(c(e),o,a))}}},this.onPanning=function(o){var r=e.setup.disabled,a=e.props.onPanning;if(!r){var t=bi(e);if(t){var s=e.isPressingKeys(e.setup.panning.activationKeys);s&&(o.preventDefault(),o.stopPropagation(),yi(e,o.clientX,o.clientY),g(c(e),o,a))}}},this.onPanningStop=function(o){var r=e.props.onPanningStop;e.isPanning&&(oo(e),g(c(e),o,r))},this.onPinchStart=function(o){var r=e.setup.disabled,a=e.props,t=a.onPinchingStart,s=a.onZoomStart;if(!r){var l=wo(e,o);l&&(Ao(e,o),X(e),g(c(e),o,t),g(c(e),o,s))}},this.onPinch=function(o){var r=e.setup.disabled,a=e.props,t=a.onPinching,s=a.onZoom;if(!r){var l=yo(e);l&&(o.preventDefault(),o.stopPropagation(),Eo(e,o),g(c(e),o,t),g(c(e),o,s))}},this.onPinchStop=function(o){var r=e.props,a=r.onPinchingStop,t=r.onZoomStop;e.pinchStartScale&&(_o(e),g(c(e),o,a),g(c(e),o,t))},this.onTouchPanningStart=function(o){var r=e.setup.disabled,a=e.props.onPanningStart;if(!r){var t=gi(e,o);if(t){var s=e.lastTouch&&+new Date-e.lastTouch<200;if(s&&o.touches.length===1)e.onDoubleClick(o);else{e.lastTouch=+new Date,X(e);var l=o.touches,d=l.length===1,u=l.length===2;d&&(X(e),wi(e,o),g(c(e),o,a)),u&&e.onPinchStart(o)}}}},this.onTouchPanning=function(o){var r=e.setup.disabled,a=e.props.onPanning;if(e.isPanning&&o.touches.length===1){if(r)return;var t=bi(e);if(!t)return;o.preventDefault(),o.stopPropagation();var s=o.touches[0];yi(e,s.clientX,s.clientY),g(c(e),o,a)}else o.touches.length>1&&e.onPinch(o)},this.onTouchPanningStop=function(o){e.onPanningStop(o),e.onPinchStop(o)},this.onDoubleClick=function(o){var r=e.setup.disabled;if(!r){var a=Oo(e,o);a&&Do(e,o)}},this.clearPanning=function(o){e.isPanning&&e.onPanningStop(o)},this.setKeyPressed=function(o){e.pressedKeys[o.key]=!0},this.setKeyUnPressed=function(o){e.pressedKeys[o.key]=!1},this.isPressingKeys=function(o){return o.length?!!o.find(function(r){return e.pressedKeys[r]}):!0},this.setTransformState=function(o,r,a){var t=e.props.onTransformed;if(!Number.isNaN(o)&&!Number.isNaN(r)&&!Number.isNaN(a)){o!==e.transformState.scale&&(e.transformState.previousScale=e.transformState.scale,e.transformState.scale=o),e.transformState.positionX=r,e.transformState.positionY=a,e.applyTransformation();var s=c(e);e.onChangeCallbacks.forEach(function(l){return l(s)}),g(s,{scale:o,positionX:r,positionY:a},t)}else console.error("Detected NaN set state values")},this.setCenter=function(){if(e.wrapperComponent&&e.contentComponent){var o=ee(e.transformState.scale,e.wrapperComponent,e.contentComponent);e.setTransformState(o.scale,o.positionX,o.positionY)}},this.handleTransformStyles=function(o,r,a){return e.props.customTransform?e.props.customTransform(o,r,a):vo(o,r,a)},this.applyTransformation=function(){if(!(!e.mounted||!e.contentComponent)){var o=e.transformState,r=o.scale,a=o.positionX,t=o.positionY,s=e.handleTransformStyles(a,t,r);e.contentComponent.style.transform=s}},this.getContext=function(){return c(e)},this.onChange=function(o){return e.onChangeCallbacks.has(o)||e.onChangeCallbacks.add(o),function(){e.onChangeCallbacks.delete(o)}},this.onInit=function(o){return e.onInitCallbacks.has(o)||e.onInitCallbacks.add(o),function(){e.onInitCallbacks.delete(o)}},this.init=function(o,r){e.cleanupWindowEvents(),e.wrapperComponent=o,e.contentComponent=r,Z(e,e.transformState.scale),e.handleInitializeWrapperEvents(o),e.handleInitialize(r),e.initializeWindowEvents(),e.isInitialized=!0;var a=c(e);g(a,void 0,e.props.onInit)},this.props=n,this.setup=Pi(this.props),this.transformState=Ji(this.props)}return i}(),di=W.createContext(null),ko=function(i,n){return typeof i=="function"?i(n):i},Lo=W.forwardRef(function(i,n){var e=C.useRef(new Zo(i)).current,o=ko(i.children,ti(e));return C.useImperativeHandle(n,function(){return ti(e)},[e]),C.useEffect(function(){e.update(i)},[e,i]),W.createElement(di.Provider,{value:e},o)});W.forwardRef(function(i,n){var e=C.useRef(null),o=C.useContext(di);return C.useEffect(function(){return o.onChange(function(r){if(e.current){var a=0,t=0;e.current.style.transform=o.handleTransformStyles(a,t,1/r.instance.transformState.scale)}})},[o]),W.createElement("div",N({},i,{ref:po([e,n])}))});function Bo(i,n){n===void 0&&(n={});var e=n.insertAt;if(!(!i||typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i))}}var Mo=`.transform-component-module_wrapper__SPB86 {
+ position: relative;
+ width: -moz-fit-content;
+ width: fit-content;
+ height: -moz-fit-content;
+ height: fit-content;
+ overflow: hidden;
+ -webkit-touch-callout: none; /* iOS Safari */
+ -webkit-user-select: none; /* Safari */
+ -khtml-user-select: none; /* Konqueror HTML */
+ -moz-user-select: none; /* Firefox */
+ -ms-user-select: none; /* Internet Explorer/Edge */
+ user-select: none;
+ margin: 0;
+ padding: 0;
+}
+.transform-component-module_content__FBWxo {
+ display: flex;
+ flex-wrap: wrap;
+ width: -moz-fit-content;
+ width: fit-content;
+ height: -moz-fit-content;
+ height: fit-content;
+ margin: 0;
+ padding: 0;
+ transform-origin: 0% 0%;
+}
+.transform-component-module_content__FBWxo img {
+ pointer-events: none;
+}
+`,Ti={wrapper:"transform-component-module_wrapper__SPB86",content:"transform-component-module_content__FBWxo"};Bo(Mo);var jo=function(i){var n=i.children,e=i.wrapperClass,o=e===void 0?"":e,r=i.contentClass,a=r===void 0?"":r,t=i.wrapperStyle,s=i.contentStyle,l=i.wrapperProps,d=l===void 0?{}:l,u=i.contentProps,f=u===void 0?{}:u,m=C.useContext(di).init,v=C.useRef(null),p=C.useRef(null);return C.useEffect(function(){var h=v.current,b=p.current;h!==null&&b!==null&&m&&m(h,b)},[]),W.createElement("div",N({},d,{ref:v,className:"react-transform-wrapper ".concat(Ti.wrapper," ").concat(o),style:t}),W.createElement("div",N({},f,{ref:p,className:"react-transform-component ".concat(Ti.content," ").concat(a),style:s}),n))};const Qo={title:"Demos/Controls",component:z,subcomponents:{Node:ge,Edge:be,MarkerArrow:Se,Arrow:we,Icon:ye,Label:Ce,Port:Pe,Remove:Te,Add:Ye}},K=()=>S.jsx("div",{style:{border:"solid 1px #12131e",height:450,width:450,position:"relative"},children:S.jsx(z,{pannable:!1,nodes:[{id:"1",text:"Node 1"},{id:"2",text:"Node 2"},{id:"3",text:"Node 3"}],edges:[{id:"1-2",from:"1",to:"2"},{id:"1-3",from:"1",to:"3"}],onLayoutChange:i=>console.log("Layout",i)})}),V=()=>S.jsx("div",{style:{border:"solid 1px #12131e",height:200,width:200,position:"relative"},children:S.jsx(z,{height:150,width:150,disabled:!0,fit:!0,pannable:!1,arrow:null,nodes:[{id:"1",text:"1"},{id:"2",text:"2"},{id:"3",text:"3"},{id:"4",text:"4"}],edges:[{id:"1-2",from:"1",to:"2"},{id:"1-3",from:"1",to:"3"},{id:"1-4",from:"1",to:"4"}],onLayoutChange:i=>console.log("Layout",i)})}),F=()=>S.jsx("div",{style:{border:"solid 1px #12131e",height:450,width:450,position:"relative"},children:S.jsx(z,{pannable:!1,defaultPosition:null,nodes:[{id:"1",text:"Node 1"},{id:"2",text:"Node 2"},{id:"3",text:"Node 3"}],edges:[{id:"1-2",from:"1",to:"2"},{id:"1-3",from:"1",to:"3"}],onLayoutChange:i=>console.log("Layout",i)})}),Q=()=>S.jsx("div",{style:{border:"solid 1px #12131e",height:450,width:450,position:"relative"},children:S.jsx(z,{pannable:!1,defaultPosition:Xe.TOP,nodes:[{id:"1",text:"Node 1"},{id:"2",text:"Node 2"},{id:"3",text:"Node 3"}],edges:[{id:"1-2",from:"1",to:"2"},{id:"1-3",from:"1",to:"3"}],onLayoutChange:i=>console.log("Layout",i)})}),q=()=>S.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:S.jsx(z,{fit:!0,nodes:[{id:"1",text:"Node 1"},{id:"2",text:"Node 2"},{id:"3",text:"Node 3"}],edges:[{id:"1-2",from:"1",to:"2"},{id:"1-3",from:"1",to:"3"}],onLayoutChange:i=>console.log("Layout",i)})}),U=()=>{const[i,n]=C.useState(.7),e=C.useRef(null);return S.jsxs("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:[S.jsxs("pre",{style:{zIndex:9,position:"absolute",bottom:15,right:15,background:"rgba(0, 0, 0, .5)",padding:20,color:"white"},children:["Zoom: ",i,S.jsx("br",{}),S.jsx("button",{style:{display:"block",width:"100%",margin:"5px 0"},onClick:()=>e.current.zoomIn(),children:"Zoom In"}),S.jsx("button",{style:{display:"block",width:"100%",margin:"5px 0"},onClick:()=>e.current.zoomOut(),children:"Zoom Out"}),S.jsx("button",{style:{display:"block",width:"100%"},onClick:()=>e.current.fitCanvas(),children:"Fit"})]}),S.jsx(z,{maxZoom:.2,minZoom:-.9,zoom:i,ref:e,nodes:[{id:"1",text:"Node 1"},{id:"2",text:"Node 2"},{id:"3",text:"Node 3"}],edges:[{id:"1-2",from:"1",to:"2"},{id:"1-3",from:"1",to:"3"}],onZoomChange:o=>{console.log("zooming",o),n(o)},onLayoutChange:o=>console.log("Layout",o)})]})},x=()=>{const i=C.useRef(null);return S.jsx(Lo,{wheel:{step:40},options:{maxScale:4,limitToBounds:!1},children:S.jsx(jo,{children:S.jsx(z,{ref:i,zoomable:!1,maxWidth:800,maxHeight:800,fit:!0,nodes:[{id:"1",text:"Node 1"},{id:"2",text:"Node 2"},{id:"3",text:"Node 3"}],edges:[{id:"1-2",from:"1",to:"2"},{id:"1-3",from:"1",to:"3"}]})})})};var Yi,Xi,Ni;K.parameters={...K.parameters,docs:{...(Yi=K.parameters)==null?void 0:Yi.docs,source:{originalSource:`() =>
+
`,...(Ni=(Xi=K.parameters)==null?void 0:Xi.docs)==null?void 0:Ni.source}}};var zi,Ai,Ei;V.parameters={...V.parameters,docs:{...(zi=V.parameters)==null?void 0:zi.docs,source:{originalSource:`() =>
+
`,...(Ei=(Ai=V.parameters)==null?void 0:Ai.docs)==null?void 0:Ei.source}}};var _i,Wi,Di;F.parameters={...F.parameters,docs:{...(_i=F.parameters)==null?void 0:_i.docs,source:{originalSource:`() =>
+
`,...(Di=(Wi=F.parameters)==null?void 0:Wi.docs)==null?void 0:Di.source}}};var Oi,Zi,ki;Q.parameters={...Q.parameters,docs:{...(Oi=Q.parameters)==null?void 0:Oi.docs,source:{originalSource:`() =>
+
`,...(ki=(Zi=Q.parameters)==null?void 0:Zi.docs)==null?void 0:ki.source}}};var Li,Bi,Mi;q.parameters={...q.parameters,docs:{...(Li=q.parameters)==null?void 0:Li.docs,source:{originalSource:`() =>
+
`,...(Mi=(Bi=q.parameters)==null?void 0:Bi.docs)==null?void 0:Mi.source}}};var ji,Hi,Ri;U.parameters={...U.parameters,docs:{...(ji=U.parameters)==null?void 0:ji.docs,source:{originalSource:`() => {
+ const [zoom, setZoom] = useState(0.7);
+ const ref = useRef(null);
+ return
+
+ Zoom: {zoom}
+
+
+
+
+
;
+}`,...(Ri=(Hi=U.parameters)==null?void 0:Hi.docs)==null?void 0:Ri.source}}};var Ki,Vi,Fi;x.parameters={...x.parameters,docs:{...(Ki=x.parameters)==null?void 0:Ki.docs,source:{originalSource:`() => {
+ const ref = useRef(null);
+ return
+
+
+
+ ;
+}`,...(Fi=(Vi=x.parameters)==null?void 0:Vi.docs)==null?void 0:Fi.source}}};const qo=["FixedPosition","Small","NonCentered","TopPosition","Fit","Zoom","ZoomExternal"];export{q as Fit,K as FixedPosition,F as NonCentered,V as Small,Q as TopPosition,U as Zoom,x as ZoomExternal,qo as __namedExportsOrder,Qo as default};
+//# sourceMappingURL=Controls.stories-aa0f23e4.js.map
diff --git a/assets/Controls.stories-aa0f23e4.js.map b/assets/Controls.stories-aa0f23e4.js.map
new file mode 100644
index 0000000..9475145
--- /dev/null
+++ b/assets/Controls.stories-aa0f23e4.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Controls.stories-aa0f23e4.js","sources":["../../node_modules/react-zoom-pan-pinch/dist/index.esm.js"],"sourcesContent":["import React, { useRef, useImperativeHandle, useEffect, useContext, useLayoutEffect, useState, useCallback, useMemo } from 'react';\n\n/**\n * Rounds number to given decimal\n * eg. roundNumber(2.34343, 1) => 2.3\n */\nvar roundNumber = function (num, decimal) {\n return Number(num.toFixed(decimal));\n};\n/**\n * Checks if value is number, if not it returns default value\n * 1# eg. checkIsNumber(2, 30) => 2\n * 2# eg. checkIsNumber(null, 30) => 30\n */\nvar checkIsNumber = function (num, defaultValue) {\n return typeof num === \"number\" ? num : defaultValue;\n};\n\nvar handleCallback = function (context, event, callback) {\n if (callback && typeof callback === \"function\") {\n callback(context, event);\n }\n};\n\n/* eslint-disable no-plusplus */\n/* eslint-disable no-param-reassign */\n/**\n * Functions should return denominator of the target value, which is the next animation step.\n * t is a value from 0 to 1, reflecting the percentage of animation status.\n */\nvar easeOut = function (t) {\n return -Math.cos(t * Math.PI) / 2 + 0.5;\n};\n// linear\nvar linear = function (t) {\n return t;\n};\n// accelerating from zero velocity\nvar easeInQuad = function (t) {\n return t * t;\n};\n// decelerating to zero velocity\nvar easeOutQuad = function (t) {\n return t * (2 - t);\n};\n// acceleration until halfway, then deceleration\nvar easeInOutQuad = function (t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n};\n// accelerating from zero velocity\nvar easeInCubic = function (t) {\n return t * t * t;\n};\n// decelerating to zero velocity\nvar easeOutCubic = function (t) {\n return --t * t * t + 1;\n};\n// acceleration until halfway, then deceleration\nvar easeInOutCubic = function (t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n};\n// accelerating from zero velocity\nvar easeInQuart = function (t) {\n return t * t * t * t;\n};\n// decelerating to zero velocity\nvar easeOutQuart = function (t) {\n return 1 - --t * t * t * t;\n};\n// acceleration until halfway, then deceleration\nvar easeInOutQuart = function (t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n};\n// accelerating from zero velocity\nvar easeInQuint = function (t) {\n return t * t * t * t * t;\n};\n// decelerating to zero velocity\nvar easeOutQuint = function (t) {\n return 1 + --t * t * t * t * t;\n};\n// acceleration until halfway, then deceleration\nvar easeInOutQuint = function (t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n};\nvar animations = {\n easeOut: easeOut,\n linear: linear,\n easeInQuad: easeInQuad,\n easeOutQuad: easeOutQuad,\n easeInOutQuad: easeInOutQuad,\n easeInCubic: easeInCubic,\n easeOutCubic: easeOutCubic,\n easeInOutCubic: easeInOutCubic,\n easeInQuart: easeInQuart,\n easeOutQuart: easeOutQuart,\n easeInOutQuart: easeInOutQuart,\n easeInQuint: easeInQuint,\n easeOutQuint: easeOutQuint,\n easeInOutQuint: easeInOutQuint,\n};\n\n/* eslint-disable no-param-reassign */\nvar handleCancelAnimationFrame = function (animation) {\n if (typeof animation === \"number\") {\n cancelAnimationFrame(animation);\n }\n};\nvar handleCancelAnimation = function (contextInstance) {\n if (!contextInstance.mounted)\n return;\n handleCancelAnimationFrame(contextInstance.animation);\n // Clear animation state\n contextInstance.animate = false;\n contextInstance.animation = null;\n contextInstance.velocity = null;\n};\nfunction handleSetupAnimation(contextInstance, animationName, animationTime, callback) {\n if (!contextInstance.mounted)\n return;\n var startTime = new Date().getTime();\n var lastStep = 1;\n // if another animation is active\n handleCancelAnimation(contextInstance);\n // new animation\n contextInstance.animation = function () {\n if (!contextInstance.mounted) {\n return handleCancelAnimationFrame(contextInstance.animation);\n }\n var frameTime = new Date().getTime() - startTime;\n var animationProgress = frameTime / animationTime;\n var animationType = animations[animationName];\n var step = animationType(animationProgress);\n if (frameTime >= animationTime) {\n callback(lastStep);\n contextInstance.animation = null;\n }\n else if (contextInstance.animation) {\n callback(step);\n requestAnimationFrame(contextInstance.animation);\n }\n };\n requestAnimationFrame(contextInstance.animation);\n}\nfunction isValidTargetState(targetState) {\n var scale = targetState.scale, positionX = targetState.positionX, positionY = targetState.positionY;\n if (Number.isNaN(scale) ||\n Number.isNaN(positionX) ||\n Number.isNaN(positionY)) {\n return false;\n }\n return true;\n}\nfunction animate(contextInstance, targetState, animationTime, animationName) {\n var isValid = isValidTargetState(targetState);\n if (!contextInstance.mounted || !isValid)\n return;\n var setTransformState = contextInstance.setTransformState;\n var _a = contextInstance.transformState, scale = _a.scale, positionX = _a.positionX, positionY = _a.positionY;\n var scaleDiff = targetState.scale - scale;\n var positionXDiff = targetState.positionX - positionX;\n var positionYDiff = targetState.positionY - positionY;\n if (animationTime === 0) {\n setTransformState(targetState.scale, targetState.positionX, targetState.positionY);\n }\n else {\n // animation start timestamp\n handleSetupAnimation(contextInstance, animationName, animationTime, function (step) {\n var newScale = scale + scaleDiff * step;\n var newPositionX = positionX + positionXDiff * step;\n var newPositionY = positionY + positionYDiff * step;\n setTransformState(newScale, newPositionX, newPositionY);\n });\n }\n}\n\n/* eslint-disable no-param-reassign */\nfunction getComponentsSizes(wrapperComponent, contentComponent, newScale) {\n var wrapperWidth = wrapperComponent.offsetWidth;\n var wrapperHeight = wrapperComponent.offsetHeight;\n var contentWidth = contentComponent.offsetWidth;\n var contentHeight = contentComponent.offsetHeight;\n var newContentWidth = contentWidth * newScale;\n var newContentHeight = contentHeight * newScale;\n var newDiffWidth = wrapperWidth - newContentWidth;\n var newDiffHeight = wrapperHeight - newContentHeight;\n return {\n wrapperWidth: wrapperWidth,\n wrapperHeight: wrapperHeight,\n newContentWidth: newContentWidth,\n newDiffWidth: newDiffWidth,\n newContentHeight: newContentHeight,\n newDiffHeight: newDiffHeight,\n };\n}\nvar getBounds = function (wrapperWidth, newContentWidth, diffWidth, wrapperHeight, newContentHeight, diffHeight, centerZoomedOut) {\n var scaleWidthFactor = wrapperWidth > newContentWidth\n ? diffWidth * (centerZoomedOut ? 1 : 0.5)\n : 0;\n var scaleHeightFactor = wrapperHeight > newContentHeight\n ? diffHeight * (centerZoomedOut ? 1 : 0.5)\n : 0;\n var minPositionX = wrapperWidth - newContentWidth - scaleWidthFactor;\n var maxPositionX = scaleWidthFactor;\n var minPositionY = wrapperHeight - newContentHeight - scaleHeightFactor;\n var maxPositionY = scaleHeightFactor;\n return { minPositionX: minPositionX, maxPositionX: maxPositionX, minPositionY: minPositionY, maxPositionY: maxPositionY };\n};\nvar calculateBounds = function (contextInstance, newScale) {\n var wrapperComponent = contextInstance.wrapperComponent, contentComponent = contextInstance.contentComponent;\n var centerZoomedOut = contextInstance.setup.centerZoomedOut;\n if (!wrapperComponent || !contentComponent) {\n throw new Error(\"Components are not mounted\");\n }\n var _a = getComponentsSizes(wrapperComponent, contentComponent, newScale), wrapperWidth = _a.wrapperWidth, wrapperHeight = _a.wrapperHeight, newContentWidth = _a.newContentWidth, newDiffWidth = _a.newDiffWidth, newContentHeight = _a.newContentHeight, newDiffHeight = _a.newDiffHeight;\n var bounds = getBounds(wrapperWidth, newContentWidth, newDiffWidth, wrapperHeight, newContentHeight, newDiffHeight, Boolean(centerZoomedOut));\n return bounds;\n};\n/**\n * Keeps value between given bounds, used for limiting view to given boundaries\n * 1# eg. boundLimiter(2, 0, 3, true) => 2\n * 2# eg. boundLimiter(4, 0, 3, true) => 3\n * 3# eg. boundLimiter(-2, 0, 3, true) => 0\n * 4# eg. boundLimiter(10, 0, 3, false) => 10\n */\nvar boundLimiter = function (value, minBound, maxBound, isActive) {\n if (!isActive)\n return roundNumber(value, 2);\n if (value < minBound)\n return roundNumber(minBound, 2);\n if (value > maxBound)\n return roundNumber(maxBound, 2);\n return roundNumber(value, 2);\n};\nvar handleCalculateBounds = function (contextInstance, newScale) {\n var bounds = calculateBounds(contextInstance, newScale);\n // Save bounds\n contextInstance.bounds = bounds;\n return bounds;\n};\nfunction getMouseBoundedPosition(positionX, positionY, bounds, limitToBounds, paddingValueX, paddingValueY, wrapperComponent) {\n var minPositionX = bounds.minPositionX, minPositionY = bounds.minPositionY, maxPositionX = bounds.maxPositionX, maxPositionY = bounds.maxPositionY;\n var paddingX = 0;\n var paddingY = 0;\n if (wrapperComponent) {\n paddingX = paddingValueX;\n paddingY = paddingValueY;\n }\n var x = boundLimiter(positionX, minPositionX - paddingX, maxPositionX + paddingX, limitToBounds);\n var y = boundLimiter(positionY, minPositionY - paddingY, maxPositionY + paddingY, limitToBounds);\n return { x: x, y: y };\n}\n\nfunction handleCalculateZoomPositions(contextInstance, mouseX, mouseY, newScale, bounds, limitToBounds) {\n var _a = contextInstance.transformState, scale = _a.scale, positionX = _a.positionX, positionY = _a.positionY;\n var scaleDifference = newScale - scale;\n if (typeof mouseX !== \"number\" || typeof mouseY !== \"number\") {\n console.error(\"Mouse X and Y position were not provided!\");\n return { x: positionX, y: positionY };\n }\n var calculatedPositionX = positionX - mouseX * scaleDifference;\n var calculatedPositionY = positionY - mouseY * scaleDifference;\n // do not limit to bounds when there is padding animation,\n // it causes animation strange behaviour\n var newPositions = getMouseBoundedPosition(calculatedPositionX, calculatedPositionY, bounds, limitToBounds, 0, 0, null);\n return newPositions;\n}\nfunction checkZoomBounds(zoom, minScale, maxScale, zoomPadding, enablePadding) {\n var scalePadding = enablePadding ? zoomPadding : 0;\n var minScaleWithPadding = minScale - scalePadding;\n if (!Number.isNaN(maxScale) && zoom >= maxScale)\n return maxScale;\n if (!Number.isNaN(minScale) && zoom <= minScaleWithPadding)\n return minScaleWithPadding;\n return zoom;\n}\n\nvar isPanningStartAllowed = function (contextInstance, event) {\n var excluded = contextInstance.setup.panning.excluded;\n var isInitialized = contextInstance.isInitialized, wrapperComponent = contextInstance.wrapperComponent;\n var target = event.target;\n var isWrapperChild = wrapperComponent === null || wrapperComponent === void 0 ? void 0 : wrapperComponent.contains(target);\n var isAllowed = isInitialized && target && isWrapperChild;\n if (!isAllowed)\n return false;\n var isExcluded = isExcludedNode(target, excluded);\n if (isExcluded)\n return false;\n return true;\n};\nvar isPanningAllowed = function (contextInstance) {\n var isInitialized = contextInstance.isInitialized, isPanning = contextInstance.isPanning, setup = contextInstance.setup;\n var disabled = setup.panning.disabled;\n var isAllowed = isInitialized && isPanning && !disabled;\n if (!isAllowed)\n return false;\n return true;\n};\nvar handlePanningSetup = function (contextInstance, event) {\n var _a = contextInstance.transformState, positionX = _a.positionX, positionY = _a.positionY;\n contextInstance.isPanning = true;\n // Panning with mouse\n var x = event.clientX;\n var y = event.clientY;\n contextInstance.startCoords = { x: x - positionX, y: y - positionY };\n};\nvar handleTouchPanningSetup = function (contextInstance, event) {\n var touches = event.touches;\n var _a = contextInstance.transformState, positionX = _a.positionX, positionY = _a.positionY;\n contextInstance.isPanning = true;\n // Panning with touch\n var oneFingerTouch = touches.length === 1;\n if (oneFingerTouch) {\n var x = touches[0].clientX;\n var y = touches[0].clientY;\n contextInstance.startCoords = { x: x - positionX, y: y - positionY };\n }\n};\nfunction handlePanToBounds(contextInstance) {\n var _a = contextInstance.transformState, positionX = _a.positionX, positionY = _a.positionY, scale = _a.scale;\n var _b = contextInstance.setup, disabled = _b.disabled, limitToBounds = _b.limitToBounds, centerZoomedOut = _b.centerZoomedOut;\n var wrapperComponent = contextInstance.wrapperComponent;\n if (disabled || !wrapperComponent || !contextInstance.bounds)\n return;\n var _c = contextInstance.bounds, maxPositionX = _c.maxPositionX, minPositionX = _c.minPositionX, maxPositionY = _c.maxPositionY, minPositionY = _c.minPositionY;\n var xChanged = positionX > maxPositionX || positionX < minPositionX;\n var yChanged = positionY > maxPositionY || positionY < minPositionY;\n var mousePosX = positionX > maxPositionX\n ? wrapperComponent.offsetWidth\n : contextInstance.setup.minPositionX || 0;\n var mousePosY = positionY > maxPositionY\n ? wrapperComponent.offsetHeight\n : contextInstance.setup.minPositionY || 0;\n var _d = handleCalculateZoomPositions(contextInstance, mousePosX, mousePosY, scale, contextInstance.bounds, limitToBounds || centerZoomedOut), x = _d.x, y = _d.y;\n return {\n scale: scale,\n positionX: xChanged ? x : positionX,\n positionY: yChanged ? y : positionY,\n };\n}\nfunction handleNewPosition(contextInstance, newPositionX, newPositionY, paddingValueX, paddingValueY) {\n var limitToBounds = contextInstance.setup.limitToBounds;\n var wrapperComponent = contextInstance.wrapperComponent, bounds = contextInstance.bounds;\n var _a = contextInstance.transformState, scale = _a.scale, positionX = _a.positionX, positionY = _a.positionY;\n if (wrapperComponent === null ||\n bounds === null ||\n (newPositionX === positionX && newPositionY === positionY)) {\n return;\n }\n var _b = getMouseBoundedPosition(newPositionX, newPositionY, bounds, limitToBounds, paddingValueX, paddingValueY, wrapperComponent), x = _b.x, y = _b.y;\n contextInstance.setTransformState(scale, x, y);\n}\nvar getPanningClientPosition = function (contextInstance, clientX, clientY) {\n var startCoords = contextInstance.startCoords, transformState = contextInstance.transformState;\n var panning = contextInstance.setup.panning;\n var lockAxisX = panning.lockAxisX, lockAxisY = panning.lockAxisY;\n var positionX = transformState.positionX, positionY = transformState.positionY;\n if (!startCoords) {\n return { x: positionX, y: positionY };\n }\n var mouseX = clientX - startCoords.x;\n var mouseY = clientY - startCoords.y;\n var newPositionX = lockAxisX ? positionX : mouseX;\n var newPositionY = lockAxisY ? positionY : mouseY;\n return { x: newPositionX, y: newPositionY };\n};\nvar getPaddingValue = function (contextInstance, size) {\n var setup = contextInstance.setup, transformState = contextInstance.transformState;\n var scale = transformState.scale;\n var minScale = setup.minScale, disablePadding = setup.disablePadding;\n if (size > 0 && scale >= minScale && !disablePadding) {\n return size;\n }\n return 0;\n};\n\nvar isVelocityCalculationAllowed = function (contextInstance) {\n var mounted = contextInstance.mounted;\n var _a = contextInstance.setup, disabled = _a.disabled, velocityAnimation = _a.velocityAnimation;\n var scale = contextInstance.transformState.scale;\n var disabledVelocity = velocityAnimation.disabled;\n var isAllowed = !disabledVelocity || scale > 1 || !disabled || mounted;\n if (!isAllowed)\n return false;\n return true;\n};\nvar isVelocityAllowed = function (contextInstance) {\n var mounted = contextInstance.mounted, velocity = contextInstance.velocity, bounds = contextInstance.bounds;\n var _a = contextInstance.setup, disabled = _a.disabled, velocityAnimation = _a.velocityAnimation;\n var scale = contextInstance.transformState.scale;\n var disabledVelocity = velocityAnimation.disabled;\n var isAllowed = !disabledVelocity || scale > 1 || !disabled || mounted;\n if (!isAllowed)\n return false;\n if (!velocity || !bounds)\n return false;\n return true;\n};\nfunction getVelocityMoveTime(contextInstance, velocity) {\n var velocityAnimation = contextInstance.setup.velocityAnimation;\n var equalToMove = velocityAnimation.equalToMove, animationTime = velocityAnimation.animationTime, sensitivity = velocityAnimation.sensitivity;\n if (equalToMove) {\n return animationTime * velocity * sensitivity;\n }\n return animationTime;\n}\nfunction getVelocityPosition(newPosition, startPosition, currentPosition, isLocked, limitToBounds, minPosition, maxPosition, minTarget, maxTarget, step) {\n if (limitToBounds) {\n if (startPosition > maxPosition && currentPosition > maxPosition) {\n var calculatedPosition = maxPosition + (newPosition - maxPosition) * step;\n if (calculatedPosition > maxTarget)\n return maxTarget;\n if (calculatedPosition < maxPosition)\n return maxPosition;\n return calculatedPosition;\n }\n if (startPosition < minPosition && currentPosition < minPosition) {\n var calculatedPosition = minPosition + (newPosition - minPosition) * step;\n if (calculatedPosition < minTarget)\n return minTarget;\n if (calculatedPosition > minPosition)\n return minPosition;\n return calculatedPosition;\n }\n }\n if (isLocked)\n return startPosition;\n return boundLimiter(newPosition, minPosition, maxPosition, limitToBounds);\n}\n\nfunction getSizeMultiplier(wrapperComponent, equalToMove) {\n var defaultMultiplier = 1;\n if (equalToMove) {\n return Math.min(defaultMultiplier, wrapperComponent.offsetWidth / window.innerWidth);\n }\n return defaultMultiplier;\n}\nfunction handleCalculateVelocity(contextInstance, position) {\n var isAllowed = isVelocityCalculationAllowed(contextInstance);\n if (!isAllowed) {\n return;\n }\n var lastMousePosition = contextInstance.lastMousePosition, velocityTime = contextInstance.velocityTime, setup = contextInstance.setup;\n var wrapperComponent = contextInstance.wrapperComponent;\n var equalToMove = setup.velocityAnimation.equalToMove;\n var now = Date.now();\n if (lastMousePosition && velocityTime && wrapperComponent) {\n var sizeMultiplier = getSizeMultiplier(wrapperComponent, equalToMove);\n var distanceX = position.x - lastMousePosition.x;\n var distanceY = position.y - lastMousePosition.y;\n var velocityX = distanceX / sizeMultiplier;\n var velocityY = distanceY / sizeMultiplier;\n var interval = now - velocityTime;\n var speed = distanceX * distanceX + distanceY * distanceY;\n var velocity = Math.sqrt(speed) / interval;\n contextInstance.velocity = { velocityX: velocityX, velocityY: velocityY, total: velocity };\n }\n contextInstance.lastMousePosition = position;\n contextInstance.velocityTime = now;\n}\nfunction handleVelocityPanning(contextInstance) {\n var velocity = contextInstance.velocity, bounds = contextInstance.bounds, setup = contextInstance.setup, wrapperComponent = contextInstance.wrapperComponent;\n var isAllowed = isVelocityAllowed(contextInstance);\n if (!isAllowed || !velocity || !bounds || !wrapperComponent) {\n return;\n }\n var velocityX = velocity.velocityX, velocityY = velocity.velocityY, total = velocity.total;\n var maxPositionX = bounds.maxPositionX, minPositionX = bounds.minPositionX, maxPositionY = bounds.maxPositionY, minPositionY = bounds.minPositionY;\n var limitToBounds = setup.limitToBounds, alignmentAnimation = setup.alignmentAnimation;\n var zoomAnimation = setup.zoomAnimation, panning = setup.panning;\n var lockAxisY = panning.lockAxisY, lockAxisX = panning.lockAxisX;\n var animationType = zoomAnimation.animationType;\n var sizeX = alignmentAnimation.sizeX, sizeY = alignmentAnimation.sizeY, velocityAlignmentTime = alignmentAnimation.velocityAlignmentTime;\n var alignAnimationTime = velocityAlignmentTime;\n var moveAnimationTime = getVelocityMoveTime(contextInstance, total);\n var finalAnimationTime = Math.max(moveAnimationTime, alignAnimationTime);\n var paddingValueX = getPaddingValue(contextInstance, sizeX);\n var paddingValueY = getPaddingValue(contextInstance, sizeY);\n var paddingX = (paddingValueX * wrapperComponent.offsetWidth) / 100;\n var paddingY = (paddingValueY * wrapperComponent.offsetHeight) / 100;\n var maxTargetX = maxPositionX + paddingX;\n var minTargetX = minPositionX - paddingX;\n var maxTargetY = maxPositionY + paddingY;\n var minTargetY = minPositionY - paddingY;\n var startState = contextInstance.transformState;\n var startTime = new Date().getTime();\n handleSetupAnimation(contextInstance, animationType, finalAnimationTime, function (step) {\n var _a = contextInstance.transformState, scale = _a.scale, positionX = _a.positionX, positionY = _a.positionY;\n var frameTime = new Date().getTime() - startTime;\n var animationProgress = frameTime / alignAnimationTime;\n var alignAnimation = animations[alignmentAnimation.animationType];\n var alignStep = 1 - alignAnimation(Math.min(1, animationProgress));\n var customStep = 1 - step;\n var newPositionX = positionX + velocityX * customStep;\n var newPositionY = positionY + velocityY * customStep;\n var currentPositionX = getVelocityPosition(newPositionX, startState.positionX, positionX, lockAxisX, limitToBounds, minPositionX, maxPositionX, minTargetX, maxTargetX, alignStep);\n var currentPositionY = getVelocityPosition(newPositionY, startState.positionY, positionY, lockAxisY, limitToBounds, minPositionY, maxPositionY, minTargetY, maxTargetY, alignStep);\n if (positionX !== newPositionX || positionY !== newPositionY) {\n contextInstance.setTransformState(scale, currentPositionX, currentPositionY);\n }\n });\n}\n\nfunction handlePanningStart(contextInstance, event) {\n var scale = contextInstance.transformState.scale;\n handleCancelAnimation(contextInstance);\n handleCalculateBounds(contextInstance, scale);\n if (window.TouchEvent !== undefined && event instanceof TouchEvent) {\n handleTouchPanningSetup(contextInstance, event);\n }\n else {\n handlePanningSetup(contextInstance, event);\n }\n}\nfunction handleAlignToBounds(contextInstance) {\n var scale = contextInstance.transformState.scale;\n var _a = contextInstance.setup, minScale = _a.minScale, alignmentAnimation = _a.alignmentAnimation;\n var disabled = alignmentAnimation.disabled, sizeX = alignmentAnimation.sizeX, sizeY = alignmentAnimation.sizeY, animationTime = alignmentAnimation.animationTime, animationType = alignmentAnimation.animationType;\n var isDisabled = disabled || scale < minScale || (!sizeX && !sizeY);\n if (isDisabled)\n return;\n var targetState = handlePanToBounds(contextInstance);\n if (targetState) {\n animate(contextInstance, targetState, animationTime, animationType);\n }\n}\nfunction handlePanning(contextInstance, clientX, clientY) {\n var startCoords = contextInstance.startCoords, setup = contextInstance.setup;\n var _a = setup.alignmentAnimation, sizeX = _a.sizeX, sizeY = _a.sizeY;\n if (!startCoords)\n return;\n var _b = getPanningClientPosition(contextInstance, clientX, clientY), x = _b.x, y = _b.y;\n var paddingValueX = getPaddingValue(contextInstance, sizeX);\n var paddingValueY = getPaddingValue(contextInstance, sizeY);\n handleCalculateVelocity(contextInstance, { x: x, y: y });\n handleNewPosition(contextInstance, x, y, paddingValueX, paddingValueY);\n}\nfunction handlePanningEnd(contextInstance) {\n if (contextInstance.isPanning) {\n var velocityDisabled = contextInstance.setup.panning.velocityDisabled;\n var velocity = contextInstance.velocity, wrapperComponent = contextInstance.wrapperComponent, contentComponent = contextInstance.contentComponent;\n contextInstance.isPanning = false;\n contextInstance.animate = false;\n contextInstance.animation = null;\n var wrapperRect = wrapperComponent === null || wrapperComponent === void 0 ? void 0 : wrapperComponent.getBoundingClientRect();\n var contentRect = contentComponent === null || contentComponent === void 0 ? void 0 : contentComponent.getBoundingClientRect();\n var wrapperWidth = (wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) || 0;\n var wrapperHeight = (wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.height) || 0;\n var contentWidth = (contentRect === null || contentRect === void 0 ? void 0 : contentRect.width) || 0;\n var contentHeight = (contentRect === null || contentRect === void 0 ? void 0 : contentRect.height) || 0;\n var isZoomed = wrapperWidth < contentWidth || wrapperHeight < contentHeight;\n var shouldAnimate = !velocityDisabled && velocity && (velocity === null || velocity === void 0 ? void 0 : velocity.total) > 0.1 && isZoomed;\n if (shouldAnimate) {\n handleVelocityPanning(contextInstance);\n }\n else {\n handleAlignToBounds(contextInstance);\n }\n }\n}\n\nfunction handleZoomToPoint(contextInstance, scale, mouseX, mouseY) {\n var _a = contextInstance.setup, minScale = _a.minScale, maxScale = _a.maxScale, limitToBounds = _a.limitToBounds;\n var newScale = checkZoomBounds(roundNumber(scale, 2), minScale, maxScale, 0, false);\n var bounds = handleCalculateBounds(contextInstance, newScale);\n var _b = handleCalculateZoomPositions(contextInstance, mouseX, mouseY, newScale, bounds, limitToBounds), x = _b.x, y = _b.y;\n return { scale: newScale, positionX: x, positionY: y };\n}\nfunction handleAlignToScaleBounds(contextInstance, mousePositionX, mousePositionY) {\n var scale = contextInstance.transformState.scale;\n var wrapperComponent = contextInstance.wrapperComponent;\n var _a = contextInstance.setup, minScale = _a.minScale, limitToBounds = _a.limitToBounds, zoomAnimation = _a.zoomAnimation;\n var disabled = zoomAnimation.disabled, animationTime = zoomAnimation.animationTime, animationType = zoomAnimation.animationType;\n var isDisabled = disabled || scale >= minScale;\n if (scale >= 1 || limitToBounds) {\n // fire fit to bounds animation\n handleAlignToBounds(contextInstance);\n }\n if (isDisabled || !wrapperComponent || !contextInstance.mounted)\n return;\n var mouseX = mousePositionX || wrapperComponent.offsetWidth / 2;\n var mouseY = mousePositionY || wrapperComponent.offsetHeight / 2;\n var targetState = handleZoomToPoint(contextInstance, minScale, mouseX, mouseY);\n if (targetState) {\n animate(contextInstance, targetState, animationTime, animationType);\n }\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\n\nvar initialState = {\n previousScale: 1,\n scale: 1,\n positionX: 0,\n positionY: 0,\n};\nvar initialSetup = {\n disabled: false,\n minPositionX: null,\n maxPositionX: null,\n minPositionY: null,\n maxPositionY: null,\n minScale: 1,\n maxScale: 8,\n limitToBounds: true,\n centerZoomedOut: false,\n centerOnInit: false,\n disablePadding: false,\n smooth: true,\n wheel: {\n step: 0.2,\n disabled: false,\n smoothStep: 0.001,\n wheelDisabled: false,\n touchPadDisabled: false,\n activationKeys: [],\n excluded: [],\n },\n panning: {\n disabled: false,\n velocityDisabled: false,\n lockAxisX: false,\n lockAxisY: false,\n activationKeys: [],\n excluded: [],\n },\n pinch: {\n step: 5,\n disabled: false,\n excluded: [],\n },\n doubleClick: {\n disabled: false,\n step: 0.7,\n mode: \"zoomIn\",\n animationType: \"easeOut\",\n animationTime: 200,\n excluded: [],\n },\n zoomAnimation: {\n disabled: false,\n size: 0.4,\n animationTime: 200,\n animationType: \"easeOut\",\n },\n alignmentAnimation: {\n disabled: false,\n sizeX: 100,\n sizeY: 100,\n animationTime: 200,\n velocityAlignmentTime: 400,\n animationType: \"easeOut\",\n },\n velocityAnimation: {\n disabled: false,\n sensitivity: 1,\n animationTime: 400,\n animationType: \"easeOut\",\n equalToMove: true,\n },\n};\n\nvar createState = function (props) {\n var _a, _b, _c, _d;\n return {\n previousScale: (_a = props.initialScale) !== null && _a !== void 0 ? _a : initialState.scale,\n scale: (_b = props.initialScale) !== null && _b !== void 0 ? _b : initialState.scale,\n positionX: (_c = props.initialPositionX) !== null && _c !== void 0 ? _c : initialState.positionX,\n positionY: (_d = props.initialPositionY) !== null && _d !== void 0 ? _d : initialState.positionY,\n };\n};\nvar createSetup = function (props) {\n var newSetup = __assign({}, initialSetup);\n Object.keys(props).forEach(function (key) {\n var validValue = typeof props[key] !== \"undefined\";\n var validParameter = typeof initialSetup[key] !== \"undefined\";\n if (validParameter && validValue) {\n var dataType = Object.prototype.toString.call(initialSetup[key]);\n var isObject = dataType === \"[object Object]\";\n var isArray = dataType === \"[object Array]\";\n if (isObject) {\n newSetup[key] = __assign(__assign({}, initialSetup[key]), props[key]);\n }\n else if (isArray) {\n newSetup[key] = __spreadArray(__spreadArray([], initialSetup[key], true), props[key], true);\n }\n else {\n newSetup[key] = props[key];\n }\n }\n });\n return newSetup;\n};\n\nvar handleCalculateButtonZoom = function (contextInstance, delta, step) {\n var scale = contextInstance.transformState.scale;\n var wrapperComponent = contextInstance.wrapperComponent, setup = contextInstance.setup;\n var maxScale = setup.maxScale, minScale = setup.minScale, zoomAnimation = setup.zoomAnimation, smooth = setup.smooth;\n var size = zoomAnimation.size;\n if (!wrapperComponent) {\n throw new Error(\"Wrapper is not mounted\");\n }\n var targetScale = smooth\n ? scale * Math.exp(delta * step)\n : scale + delta * step;\n var newScale = checkZoomBounds(roundNumber(targetScale, 3), minScale, maxScale, size, false);\n return newScale;\n};\nfunction handleZoomToViewCenter(contextInstance, delta, step, animationTime, animationType) {\n var wrapperComponent = contextInstance.wrapperComponent;\n var _a = contextInstance.transformState, scale = _a.scale, positionX = _a.positionX, positionY = _a.positionY;\n if (!wrapperComponent)\n return console.error(\"No WrapperComponent found\");\n var wrapperWidth = wrapperComponent.offsetWidth;\n var wrapperHeight = wrapperComponent.offsetHeight;\n var mouseX = (wrapperWidth / 2 - positionX) / scale;\n var mouseY = (wrapperHeight / 2 - positionY) / scale;\n var newScale = handleCalculateButtonZoom(contextInstance, delta, step);\n var targetState = handleZoomToPoint(contextInstance, newScale, mouseX, mouseY);\n if (!targetState) {\n return console.error(\"Error during zoom event. New transformation state was not calculated.\");\n }\n animate(contextInstance, targetState, animationTime, animationType);\n}\nfunction resetTransformations(contextInstance, animationTime, animationType, onResetTransformation) {\n var setup = contextInstance.setup, wrapperComponent = contextInstance.wrapperComponent;\n var limitToBounds = setup.limitToBounds;\n var initialTransformation = createState(contextInstance.props);\n var _a = contextInstance.transformState, scale = _a.scale, positionX = _a.positionX, positionY = _a.positionY;\n if (!wrapperComponent)\n return;\n var newBounds = calculateBounds(contextInstance, initialTransformation.scale);\n var boundedPositions = getMouseBoundedPosition(initialTransformation.positionX, initialTransformation.positionY, newBounds, limitToBounds, 0, 0, wrapperComponent);\n var newState = {\n scale: initialTransformation.scale,\n positionX: boundedPositions.x,\n positionY: boundedPositions.y,\n };\n if (scale === initialTransformation.scale &&\n positionX === initialTransformation.positionX &&\n positionY === initialTransformation.positionY) {\n return;\n }\n onResetTransformation === null || onResetTransformation === void 0 ? void 0 : onResetTransformation();\n animate(contextInstance, newState, animationTime, animationType);\n}\nfunction getOffset(element, wrapper, content, state) {\n var offset = element.getBoundingClientRect();\n var wrapperOffset = wrapper.getBoundingClientRect();\n var contentOffset = content.getBoundingClientRect();\n var xOff = wrapperOffset.x * state.scale;\n var yOff = wrapperOffset.y * state.scale;\n return {\n x: (offset.x - contentOffset.x + xOff) / state.scale,\n y: (offset.y - contentOffset.y + yOff) / state.scale,\n };\n}\nfunction calculateZoomToNode(contextInstance, node, customZoom) {\n var wrapperComponent = contextInstance.wrapperComponent, contentComponent = contextInstance.contentComponent, transformState = contextInstance.transformState;\n var _a = contextInstance.setup, limitToBounds = _a.limitToBounds, minScale = _a.minScale, maxScale = _a.maxScale;\n if (!wrapperComponent || !contentComponent)\n return transformState;\n var wrapperRect = wrapperComponent.getBoundingClientRect();\n var nodeRect = node.getBoundingClientRect();\n var nodeOffset = getOffset(node, wrapperComponent, contentComponent, transformState);\n var nodeLeft = nodeOffset.x;\n var nodeTop = nodeOffset.y;\n var nodeWidth = nodeRect.width / transformState.scale;\n var nodeHeight = nodeRect.height / transformState.scale;\n var scaleX = wrapperComponent.offsetWidth / nodeWidth;\n var scaleY = wrapperComponent.offsetHeight / nodeHeight;\n var newScale = checkZoomBounds(customZoom || Math.min(scaleX, scaleY), minScale, maxScale, 0, false);\n var offsetX = (wrapperRect.width - nodeWidth * newScale) / 2;\n var offsetY = (wrapperRect.height - nodeHeight * newScale) / 2;\n var newPositionX = (wrapperRect.left - nodeLeft) * newScale + offsetX;\n var newPositionY = (wrapperRect.top - nodeTop) * newScale + offsetY;\n var bounds = calculateBounds(contextInstance, newScale);\n var _b = getMouseBoundedPosition(newPositionX, newPositionY, bounds, limitToBounds, 0, 0, wrapperComponent), x = _b.x, y = _b.y;\n return { positionX: x, positionY: y, scale: newScale };\n}\n\nvar zoomIn = function (contextInstance) {\n return function (step, animationTime, animationType) {\n if (step === void 0) { step = 0.5; }\n if (animationTime === void 0) { animationTime = 300; }\n if (animationType === void 0) { animationType = \"easeOut\"; }\n handleZoomToViewCenter(contextInstance, 1, step, animationTime, animationType);\n };\n};\nvar zoomOut = function (contextInstance) {\n return function (step, animationTime, animationType) {\n if (step === void 0) { step = 0.5; }\n if (animationTime === void 0) { animationTime = 300; }\n if (animationType === void 0) { animationType = \"easeOut\"; }\n handleZoomToViewCenter(contextInstance, -1, step, animationTime, animationType);\n };\n};\nvar setTransform = function (contextInstance) {\n return function (newPositionX, newPositionY, newScale, animationTime, animationType) {\n if (animationTime === void 0) { animationTime = 300; }\n if (animationType === void 0) { animationType = \"easeOut\"; }\n var _a = contextInstance.transformState, positionX = _a.positionX, positionY = _a.positionY, scale = _a.scale;\n var wrapperComponent = contextInstance.wrapperComponent, contentComponent = contextInstance.contentComponent;\n var disabled = contextInstance.setup.disabled;\n if (disabled || !wrapperComponent || !contentComponent)\n return;\n var targetState = {\n positionX: Number.isNaN(newPositionX) ? positionX : newPositionX,\n positionY: Number.isNaN(newPositionY) ? positionY : newPositionY,\n scale: Number.isNaN(newScale) ? scale : newScale,\n };\n animate(contextInstance, targetState, animationTime, animationType);\n };\n};\nvar resetTransform = function (contextInstance) {\n return function (animationTime, animationType) {\n if (animationTime === void 0) { animationTime = 200; }\n if (animationType === void 0) { animationType = \"easeOut\"; }\n resetTransformations(contextInstance, animationTime, animationType);\n };\n};\nvar centerView = function (contextInstance) {\n return function (scale, animationTime, animationType) {\n if (animationTime === void 0) { animationTime = 200; }\n if (animationType === void 0) { animationType = \"easeOut\"; }\n var transformState = contextInstance.transformState, wrapperComponent = contextInstance.wrapperComponent, contentComponent = contextInstance.contentComponent;\n if (wrapperComponent && contentComponent) {\n var targetState = getCenterPosition(scale || transformState.scale, wrapperComponent, contentComponent);\n animate(contextInstance, targetState, animationTime, animationType);\n }\n };\n};\nvar zoomToElement = function (contextInstance) {\n return function (node, scale, animationTime, animationType) {\n if (animationTime === void 0) { animationTime = 600; }\n if (animationType === void 0) { animationType = \"easeOut\"; }\n handleCancelAnimation(contextInstance);\n var wrapperComponent = contextInstance.wrapperComponent;\n var target = typeof node === \"string\" ? document.getElementById(node) : node;\n if (wrapperComponent && target && wrapperComponent.contains(target)) {\n var targetState = calculateZoomToNode(contextInstance, target, scale);\n animate(contextInstance, targetState, animationTime, animationType);\n }\n };\n};\n\nvar getControls = function (contextInstance) {\n return {\n instance: contextInstance,\n zoomIn: zoomIn(contextInstance),\n zoomOut: zoomOut(contextInstance),\n setTransform: setTransform(contextInstance),\n resetTransform: resetTransform(contextInstance),\n centerView: centerView(contextInstance),\n zoomToElement: zoomToElement(contextInstance),\n };\n};\nvar getState = function (contextInstance) {\n return {\n instance: contextInstance,\n state: contextInstance.transformState,\n };\n};\nvar getContext = function (contextInstance) {\n var ref = {};\n Object.assign(ref, getState(contextInstance));\n Object.assign(ref, getControls(contextInstance));\n return ref;\n};\n\n// We want to make event listeners non-passive, and to do so have to check\n// that browsers support EventListenerOptions in the first place.\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\nvar passiveSupported = false;\nfunction makePassiveEventOption() {\n try {\n var options = {\n get passive() {\n // This function will be called when the browser\n // attempts to access the passive property.\n passiveSupported = true;\n return false;\n },\n };\n return options;\n }\n catch (err) {\n passiveSupported = false;\n return passiveSupported;\n }\n}\n\nvar isExcludedNode = function (node, excluded) {\n var targetTagName = node.tagName.toUpperCase();\n var isExcludedTag = excluded.find(function (tag) { return tag.toUpperCase() === targetTagName; });\n if (isExcludedTag)\n return true;\n var isExcludedClassName = excluded.find(function (className) {\n return node.classList.contains(className);\n });\n if (isExcludedClassName)\n return true;\n return false;\n};\nvar cancelTimeout = function (timeout) {\n if (timeout) {\n clearTimeout(timeout);\n }\n};\n\nvar getTransformStyles = function (x, y, scale) {\n // Standard translate prevents blurry svg on the safari\n return \"translate(\".concat(x, \"px, \").concat(y, \"px) scale(\").concat(scale, \")\");\n};\nvar getMatrixTransformStyles = function (x, y, scale) {\n // The shorthand for matrix does not work for Safari hence the need to explicitly use matrix3d\n // Refer to https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix\n var a = scale;\n var b = 0;\n var c = 0;\n var d = scale;\n var tx = x;\n var ty = y;\n return \"matrix3d(\".concat(a, \", \").concat(b, \", 0, 0, \").concat(c, \", \").concat(d, \", 0, 0, 0, 0, 1, 0, \").concat(tx, \", \").concat(ty, \", 0, 1)\");\n};\nvar getCenterPosition = function (scale, wrapperComponent, contentComponent) {\n var contentWidth = contentComponent.offsetWidth * scale;\n var contentHeight = contentComponent.offsetHeight * scale;\n var centerPositionX = (wrapperComponent.offsetWidth - contentWidth) / 2;\n var centerPositionY = (wrapperComponent.offsetHeight - contentHeight) / 2;\n return {\n scale: scale,\n positionX: centerPositionX,\n positionY: centerPositionY,\n };\n};\n\nfunction mergeRefs(refs) {\n return function (value) {\n refs.forEach(function (ref) {\n if (typeof ref === \"function\") {\n ref(value);\n }\n else if (ref != null) {\n ref.current = value;\n }\n });\n };\n}\n\nvar isWheelAllowed = function (contextInstance, event) {\n var _a = contextInstance.setup.wheel, disabled = _a.disabled, wheelDisabled = _a.wheelDisabled, touchPadDisabled = _a.touchPadDisabled, excluded = _a.excluded;\n var isInitialized = contextInstance.isInitialized, isPanning = contextInstance.isPanning;\n var target = event.target;\n var isAllowed = isInitialized && !isPanning && !disabled && target;\n if (!isAllowed)\n return false;\n // Event ctrlKey detects if touchpad action is executing wheel or pinch gesture\n if (wheelDisabled && !event.ctrlKey)\n return false;\n if (touchPadDisabled && event.ctrlKey)\n return false;\n var isExcluded = isExcludedNode(target, excluded);\n if (isExcluded)\n return false;\n return true;\n};\nvar getDeltaY = function (event) {\n if (event) {\n return event.deltaY < 0 ? 1 : -1;\n }\n return 0;\n};\nfunction getDelta(event, customDelta) {\n var deltaY = getDeltaY(event);\n var delta = checkIsNumber(customDelta, deltaY);\n return delta;\n}\nfunction getMousePosition(event, contentComponent, scale) {\n var contentRect = contentComponent.getBoundingClientRect();\n var mouseX = 0;\n var mouseY = 0;\n if (\"clientX\" in event) {\n // mouse position x, y over wrapper component\n mouseX = (event.clientX - contentRect.left) / scale;\n mouseY = (event.clientY - contentRect.top) / scale;\n }\n else {\n var touch = event.touches[0];\n mouseX = (touch.clientX - contentRect.left) / scale;\n mouseY = (touch.clientY - contentRect.top) / scale;\n }\n if (Number.isNaN(mouseX) || Number.isNaN(mouseY))\n console.error(\"No mouse or touch offset found\");\n return {\n x: mouseX,\n y: mouseY,\n };\n}\nvar handleCalculateWheelZoom = function (contextInstance, delta, step, disable, getTarget) {\n var scale = contextInstance.transformState.scale;\n var wrapperComponent = contextInstance.wrapperComponent, setup = contextInstance.setup;\n var maxScale = setup.maxScale, minScale = setup.minScale, zoomAnimation = setup.zoomAnimation, disablePadding = setup.disablePadding;\n var size = zoomAnimation.size, disabled = zoomAnimation.disabled;\n if (!wrapperComponent) {\n throw new Error(\"Wrapper is not mounted\");\n }\n var targetScale = scale + delta * step;\n if (getTarget)\n return targetScale;\n var paddingEnabled = disable ? false : !disabled;\n var newScale = checkZoomBounds(roundNumber(targetScale, 3), minScale, maxScale, size, paddingEnabled && !disablePadding);\n return newScale;\n};\nvar handleWheelZoomStop = function (contextInstance, event) {\n var previousWheelEvent = contextInstance.previousWheelEvent;\n var scale = contextInstance.transformState.scale;\n var _a = contextInstance.setup, maxScale = _a.maxScale, minScale = _a.minScale;\n if (!previousWheelEvent)\n return false;\n if (scale < maxScale || scale > minScale)\n return true;\n if (Math.sign(previousWheelEvent.deltaY) !== Math.sign(event.deltaY))\n return true;\n if (previousWheelEvent.deltaY > 0 && previousWheelEvent.deltaY < event.deltaY)\n return true;\n if (previousWheelEvent.deltaY < 0 && previousWheelEvent.deltaY > event.deltaY)\n return true;\n if (Math.sign(previousWheelEvent.deltaY) !== Math.sign(event.deltaY))\n return true;\n return false;\n};\n\nvar isPinchStartAllowed = function (contextInstance, event) {\n var _a = contextInstance.setup.pinch, disabled = _a.disabled, excluded = _a.excluded;\n var isInitialized = contextInstance.isInitialized;\n var target = event.target;\n var isAllowed = isInitialized && !disabled && target;\n if (!isAllowed)\n return false;\n var isExcluded = isExcludedNode(target, excluded);\n if (isExcluded)\n return false;\n return true;\n};\nvar isPinchAllowed = function (contextInstance) {\n var disabled = contextInstance.setup.pinch.disabled;\n var isInitialized = contextInstance.isInitialized, pinchStartDistance = contextInstance.pinchStartDistance;\n var isAllowed = isInitialized && !disabled && pinchStartDistance;\n if (!isAllowed)\n return false;\n return true;\n};\nvar calculateTouchMidPoint = function (event, scale, contentComponent) {\n var contentRect = contentComponent.getBoundingClientRect();\n var touches = event.touches;\n var firstPointX = roundNumber(touches[0].clientX - contentRect.left, 5);\n var firstPointY = roundNumber(touches[0].clientY - contentRect.top, 5);\n var secondPointX = roundNumber(touches[1].clientX - contentRect.left, 5);\n var secondPointY = roundNumber(touches[1].clientY - contentRect.top, 5);\n return {\n x: (firstPointX + secondPointX) / 2 / scale,\n y: (firstPointY + secondPointY) / 2 / scale,\n };\n};\nvar getTouchDistance = function (event) {\n return Math.sqrt(Math.pow((event.touches[0].pageX - event.touches[1].pageX), 2) +\n Math.pow((event.touches[0].pageY - event.touches[1].pageY), 2));\n};\nvar calculatePinchZoom = function (contextInstance, currentDistance) {\n var pinchStartScale = contextInstance.pinchStartScale, pinchStartDistance = contextInstance.pinchStartDistance, setup = contextInstance.setup;\n var maxScale = setup.maxScale, minScale = setup.minScale, zoomAnimation = setup.zoomAnimation, disablePadding = setup.disablePadding;\n var size = zoomAnimation.size, disabled = zoomAnimation.disabled;\n if (!pinchStartScale || pinchStartDistance === null || !currentDistance) {\n throw new Error(\"Pinch touches distance was not provided\");\n }\n if (currentDistance < 0) {\n return contextInstance.transformState.scale;\n }\n var touchProportion = currentDistance / pinchStartDistance;\n var scaleDifference = touchProportion * pinchStartScale;\n return checkZoomBounds(roundNumber(scaleDifference, 2), minScale, maxScale, size, !disabled && !disablePadding);\n};\n\nvar wheelStopEventTime = 160;\nvar wheelAnimationTime = 100;\nvar handleWheelStart = function (contextInstance, event) {\n var _a = contextInstance.props, onWheelStart = _a.onWheelStart, onZoomStart = _a.onZoomStart;\n if (!contextInstance.wheelStopEventTimer) {\n handleCancelAnimation(contextInstance);\n handleCallback(getContext(contextInstance), event, onWheelStart);\n handleCallback(getContext(contextInstance), event, onZoomStart);\n }\n};\nvar handleWheelZoom = function (contextInstance, event) {\n var _a = contextInstance.props, onWheel = _a.onWheel, onZoom = _a.onZoom;\n var contentComponent = contextInstance.contentComponent, setup = contextInstance.setup, transformState = contextInstance.transformState;\n var scale = transformState.scale;\n var limitToBounds = setup.limitToBounds, centerZoomedOut = setup.centerZoomedOut, zoomAnimation = setup.zoomAnimation, wheel = setup.wheel, disablePadding = setup.disablePadding, smooth = setup.smooth;\n var size = zoomAnimation.size, disabled = zoomAnimation.disabled;\n var step = wheel.step, smoothStep = wheel.smoothStep;\n if (!contentComponent) {\n throw new Error(\"Component not mounted\");\n }\n event.preventDefault();\n event.stopPropagation();\n var delta = getDelta(event, null);\n var zoomStep = smooth ? smoothStep * Math.abs(event.deltaY) : step;\n var newScale = handleCalculateWheelZoom(contextInstance, delta, zoomStep, !event.ctrlKey);\n // if scale not change\n if (scale === newScale)\n return;\n var bounds = handleCalculateBounds(contextInstance, newScale);\n var mousePosition = getMousePosition(event, contentComponent, scale);\n var isPaddingDisabled = disabled || size === 0 || centerZoomedOut || disablePadding;\n var isLimitedToBounds = limitToBounds && isPaddingDisabled;\n var _b = handleCalculateZoomPositions(contextInstance, mousePosition.x, mousePosition.y, newScale, bounds, isLimitedToBounds), x = _b.x, y = _b.y;\n contextInstance.previousWheelEvent = event;\n contextInstance.setTransformState(newScale, x, y);\n handleCallback(getContext(contextInstance), event, onWheel);\n handleCallback(getContext(contextInstance), event, onZoom);\n};\nvar handleWheelStop = function (contextInstance, event) {\n var _a = contextInstance.props, onWheelStop = _a.onWheelStop, onZoomStop = _a.onZoomStop;\n // fire animation\n cancelTimeout(contextInstance.wheelAnimationTimer);\n contextInstance.wheelAnimationTimer = setTimeout(function () {\n if (!contextInstance.mounted)\n return;\n handleAlignToScaleBounds(contextInstance, event.x, event.y);\n contextInstance.wheelAnimationTimer = null;\n }, wheelAnimationTime);\n // Wheel stop event\n var hasStoppedZooming = handleWheelZoomStop(contextInstance, event);\n if (hasStoppedZooming) {\n cancelTimeout(contextInstance.wheelStopEventTimer);\n contextInstance.wheelStopEventTimer = setTimeout(function () {\n if (!contextInstance.mounted)\n return;\n contextInstance.wheelStopEventTimer = null;\n handleCallback(getContext(contextInstance), event, onWheelStop);\n handleCallback(getContext(contextInstance), event, onZoomStop);\n }, wheelStopEventTime);\n }\n};\n\nvar handlePinchStart = function (contextInstance, event) {\n var distance = getTouchDistance(event);\n contextInstance.pinchStartDistance = distance;\n contextInstance.lastDistance = distance;\n contextInstance.pinchStartScale = contextInstance.transformState.scale;\n contextInstance.isPanning = false;\n handleCancelAnimation(contextInstance);\n};\nvar handlePinchZoom = function (contextInstance, event) {\n var contentComponent = contextInstance.contentComponent, pinchStartDistance = contextInstance.pinchStartDistance;\n var scale = contextInstance.transformState.scale;\n var _a = contextInstance.setup, limitToBounds = _a.limitToBounds, centerZoomedOut = _a.centerZoomedOut, zoomAnimation = _a.zoomAnimation;\n var disabled = zoomAnimation.disabled, size = zoomAnimation.size;\n // if one finger starts from outside of wrapper\n if (pinchStartDistance === null || !contentComponent)\n return;\n var midPoint = calculateTouchMidPoint(event, scale, contentComponent);\n // if touches goes off of the wrapper element\n if (!Number.isFinite(midPoint.x) || !Number.isFinite(midPoint.y))\n return;\n var currentDistance = getTouchDistance(event);\n var newScale = calculatePinchZoom(contextInstance, currentDistance);\n if (newScale === scale)\n return;\n var bounds = handleCalculateBounds(contextInstance, newScale);\n var isPaddingDisabled = disabled || size === 0 || centerZoomedOut;\n var isLimitedToBounds = limitToBounds && isPaddingDisabled;\n var _b = handleCalculateZoomPositions(contextInstance, midPoint.x, midPoint.y, newScale, bounds, isLimitedToBounds), x = _b.x, y = _b.y;\n contextInstance.pinchMidpoint = midPoint;\n contextInstance.lastDistance = currentDistance;\n contextInstance.setTransformState(newScale, x, y);\n};\nvar handlePinchStop = function (contextInstance) {\n var pinchMidpoint = contextInstance.pinchMidpoint;\n contextInstance.velocity = null;\n contextInstance.lastDistance = null;\n contextInstance.pinchMidpoint = null;\n contextInstance.pinchStartScale = null;\n contextInstance.pinchStartDistance = null;\n handleAlignToScaleBounds(contextInstance, pinchMidpoint === null || pinchMidpoint === void 0 ? void 0 : pinchMidpoint.x, pinchMidpoint === null || pinchMidpoint === void 0 ? void 0 : pinchMidpoint.y);\n};\n\nvar handleDoubleClickStop = function (contextInstance, event) {\n var onZoomStop = contextInstance.props.onZoomStop;\n var animationTime = contextInstance.setup.doubleClick.animationTime;\n cancelTimeout(contextInstance.doubleClickStopEventTimer);\n contextInstance.doubleClickStopEventTimer = setTimeout(function () {\n contextInstance.doubleClickStopEventTimer = null;\n handleCallback(getContext(contextInstance), event, onZoomStop);\n }, animationTime);\n};\nvar handleDoubleClickResetMode = function (contextInstance, event) {\n var _a = contextInstance.props, onZoomStart = _a.onZoomStart, onZoom = _a.onZoom;\n var _b = contextInstance.setup.doubleClick, animationTime = _b.animationTime, animationType = _b.animationType;\n handleCallback(getContext(contextInstance), event, onZoomStart);\n resetTransformations(contextInstance, animationTime, animationType, function () {\n return handleCallback(getContext(contextInstance), event, onZoom);\n });\n handleDoubleClickStop(contextInstance, event);\n};\nfunction handleDoubleClick(contextInstance, event) {\n var setup = contextInstance.setup, doubleClickStopEventTimer = contextInstance.doubleClickStopEventTimer, transformState = contextInstance.transformState, contentComponent = contextInstance.contentComponent;\n var scale = transformState.scale;\n var _a = contextInstance.props, onZoomStart = _a.onZoomStart, onZoom = _a.onZoom;\n var _b = setup.doubleClick, disabled = _b.disabled, mode = _b.mode, step = _b.step, animationTime = _b.animationTime, animationType = _b.animationType;\n if (disabled)\n return;\n if (doubleClickStopEventTimer)\n return;\n if (mode === \"reset\") {\n return handleDoubleClickResetMode(contextInstance, event);\n }\n if (!contentComponent)\n return console.error(\"No ContentComponent found\");\n var delta = mode === \"zoomOut\" ? -1 : 1;\n var newScale = handleCalculateButtonZoom(contextInstance, delta, step);\n // stop execution when scale didn't change\n if (scale === newScale)\n return;\n handleCallback(getContext(contextInstance), event, onZoomStart);\n var mousePosition = getMousePosition(event, contentComponent, scale);\n var targetState = handleZoomToPoint(contextInstance, newScale, mousePosition.x, mousePosition.y);\n if (!targetState) {\n return console.error(\"Error during zoom event. New transformation state was not calculated.\");\n }\n handleCallback(getContext(contextInstance), event, onZoom);\n animate(contextInstance, targetState, animationTime, animationType);\n handleDoubleClickStop(contextInstance, event);\n}\nvar isDoubleClickAllowed = function (contextInstance, event) {\n var isInitialized = contextInstance.isInitialized, setup = contextInstance.setup, wrapperComponent = contextInstance.wrapperComponent;\n var _a = setup.doubleClick, disabled = _a.disabled, excluded = _a.excluded;\n var target = event.target;\n var isWrapperChild = wrapperComponent === null || wrapperComponent === void 0 ? void 0 : wrapperComponent.contains(target);\n var isAllowed = isInitialized && target && isWrapperChild && !disabled;\n if (!isAllowed)\n return false;\n var isExcluded = isExcludedNode(target, excluded);\n if (isExcluded)\n return false;\n return true;\n};\n\nvar ZoomPanPinch = /** @class */ (function () {\n function ZoomPanPinch(props) {\n var _this = this;\n this.mounted = true;\n this.onChangeCallbacks = new Set();\n this.onInitCallbacks = new Set();\n // Components\n this.wrapperComponent = null;\n this.contentComponent = null;\n // Initialization\n this.isInitialized = false;\n this.bounds = null;\n // wheel helpers\n this.previousWheelEvent = null;\n this.wheelStopEventTimer = null;\n this.wheelAnimationTimer = null;\n // panning helpers\n this.isPanning = false;\n this.startCoords = null;\n this.lastTouch = null;\n // pinch helpers\n this.distance = null;\n this.lastDistance = null;\n this.pinchStartDistance = null;\n this.pinchStartScale = null;\n this.pinchMidpoint = null;\n // double click helpers\n this.doubleClickStopEventTimer = null;\n // velocity helpers\n this.velocity = null;\n this.velocityTime = null;\n this.lastMousePosition = null;\n // animations helpers\n this.animate = false;\n this.animation = null;\n this.maxBounds = null;\n // key press\n this.pressedKeys = {};\n this.mount = function () {\n _this.initializeWindowEvents();\n };\n this.unmount = function () {\n _this.cleanupWindowEvents();\n };\n this.update = function (newProps) {\n handleCalculateBounds(_this, _this.transformState.scale);\n _this.setup = createSetup(newProps);\n };\n this.initializeWindowEvents = function () {\n var _a;\n var passive = makePassiveEventOption();\n var currentDocument = (_a = _this.wrapperComponent) === null || _a === void 0 ? void 0 : _a.ownerDocument;\n var currentWindow = currentDocument === null || currentDocument === void 0 ? void 0 : currentDocument.defaultView;\n // Panning on window to allow panning when mouse is out of component wrapper\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.addEventListener(\"mousedown\", _this.onPanningStart, passive);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.addEventListener(\"mousemove\", _this.onPanning, passive);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.addEventListener(\"mouseup\", _this.onPanningStop, passive);\n currentDocument === null || currentDocument === void 0 ? void 0 : currentDocument.addEventListener(\"mouseleave\", _this.clearPanning, passive);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.addEventListener(\"keyup\", _this.setKeyUnPressed, passive);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.addEventListener(\"keydown\", _this.setKeyPressed, passive);\n };\n this.cleanupWindowEvents = function () {\n var _a, _b;\n var passive = makePassiveEventOption();\n var currentDocument = (_a = _this.wrapperComponent) === null || _a === void 0 ? void 0 : _a.ownerDocument;\n var currentWindow = currentDocument === null || currentDocument === void 0 ? void 0 : currentDocument.defaultView;\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.removeEventListener(\"mousedown\", _this.onPanningStart, passive);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.removeEventListener(\"mousemove\", _this.onPanning, passive);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.removeEventListener(\"mouseup\", _this.onPanningStop, passive);\n currentDocument === null || currentDocument === void 0 ? void 0 : currentDocument.removeEventListener(\"mouseleave\", _this.clearPanning, passive);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.removeEventListener(\"keyup\", _this.setKeyUnPressed, passive);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.removeEventListener(\"keydown\", _this.setKeyPressed, passive);\n document.removeEventListener(\"mouseleave\", _this.clearPanning, passive);\n handleCancelAnimation(_this);\n (_b = _this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();\n };\n this.handleInitializeWrapperEvents = function (wrapper) {\n // Zooming events on wrapper\n var passive = makePassiveEventOption();\n wrapper.addEventListener(\"wheel\", _this.onWheelZoom, passive);\n wrapper.addEventListener(\"dblclick\", _this.onDoubleClick, passive);\n wrapper.addEventListener(\"touchstart\", _this.onTouchPanningStart, passive);\n wrapper.addEventListener(\"touchmove\", _this.onTouchPanning, passive);\n wrapper.addEventListener(\"touchend\", _this.onTouchPanningStop, passive);\n };\n this.handleInitialize = function (contentComponent) {\n var centerOnInit = _this.setup.centerOnInit;\n _this.applyTransformation();\n _this.onInitCallbacks.forEach(function (callback) { return callback(getContext(_this)); });\n if (centerOnInit) {\n _this.setCenter();\n _this.observer = new ResizeObserver(function () {\n var _a;\n _this.onInitCallbacks.forEach(function (callback) { return callback(getContext(_this)); });\n _this.setCenter();\n (_a = _this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();\n });\n // Start observing the target node for configured mutations\n _this.observer.observe(contentComponent);\n }\n };\n /// ///////\n // Zoom\n /// ///////\n this.onWheelZoom = function (event) {\n var disabled = _this.setup.disabled;\n if (disabled)\n return;\n var isAllowed = isWheelAllowed(_this, event);\n if (!isAllowed)\n return;\n var keysPressed = _this.isPressingKeys(_this.setup.wheel.activationKeys);\n if (!keysPressed)\n return;\n handleWheelStart(_this, event);\n handleWheelZoom(_this, event);\n handleWheelStop(_this, event);\n };\n /// ///////\n // Pan\n /// ///////\n this.onPanningStart = function (event) {\n var disabled = _this.setup.disabled;\n var onPanningStart = _this.props.onPanningStart;\n if (disabled)\n return;\n var isAllowed = isPanningStartAllowed(_this, event);\n if (!isAllowed)\n return;\n var keysPressed = _this.isPressingKeys(_this.setup.panning.activationKeys);\n if (!keysPressed)\n return;\n event.preventDefault();\n event.stopPropagation();\n handleCancelAnimation(_this);\n handlePanningStart(_this, event);\n handleCallback(getContext(_this), event, onPanningStart);\n };\n this.onPanning = function (event) {\n var disabled = _this.setup.disabled;\n var onPanning = _this.props.onPanning;\n if (disabled)\n return;\n var isAllowed = isPanningAllowed(_this);\n if (!isAllowed)\n return;\n var keysPressed = _this.isPressingKeys(_this.setup.panning.activationKeys);\n if (!keysPressed)\n return;\n event.preventDefault();\n event.stopPropagation();\n handlePanning(_this, event.clientX, event.clientY);\n handleCallback(getContext(_this), event, onPanning);\n };\n this.onPanningStop = function (event) {\n var onPanningStop = _this.props.onPanningStop;\n if (_this.isPanning) {\n handlePanningEnd(_this);\n handleCallback(getContext(_this), event, onPanningStop);\n }\n };\n /// ///////\n // Pinch\n /// ///////\n this.onPinchStart = function (event) {\n var disabled = _this.setup.disabled;\n var _a = _this.props, onPinchingStart = _a.onPinchingStart, onZoomStart = _a.onZoomStart;\n if (disabled)\n return;\n var isAllowed = isPinchStartAllowed(_this, event);\n if (!isAllowed)\n return;\n handlePinchStart(_this, event);\n handleCancelAnimation(_this);\n handleCallback(getContext(_this), event, onPinchingStart);\n handleCallback(getContext(_this), event, onZoomStart);\n };\n this.onPinch = function (event) {\n var disabled = _this.setup.disabled;\n var _a = _this.props, onPinching = _a.onPinching, onZoom = _a.onZoom;\n if (disabled)\n return;\n var isAllowed = isPinchAllowed(_this);\n if (!isAllowed)\n return;\n event.preventDefault();\n event.stopPropagation();\n handlePinchZoom(_this, event);\n handleCallback(getContext(_this), event, onPinching);\n handleCallback(getContext(_this), event, onZoom);\n };\n this.onPinchStop = function (event) {\n var _a = _this.props, onPinchingStop = _a.onPinchingStop, onZoomStop = _a.onZoomStop;\n if (_this.pinchStartScale) {\n handlePinchStop(_this);\n handleCallback(getContext(_this), event, onPinchingStop);\n handleCallback(getContext(_this), event, onZoomStop);\n }\n };\n /// ///////\n // Touch\n /// ///////\n this.onTouchPanningStart = function (event) {\n var disabled = _this.setup.disabled;\n var onPanningStart = _this.props.onPanningStart;\n if (disabled)\n return;\n var isAllowed = isPanningStartAllowed(_this, event);\n if (!isAllowed)\n return;\n var isDoubleTap = _this.lastTouch && +new Date() - _this.lastTouch < 200;\n if (isDoubleTap && event.touches.length === 1) {\n _this.onDoubleClick(event);\n }\n else {\n _this.lastTouch = +new Date();\n handleCancelAnimation(_this);\n var touches = event.touches;\n var isPanningAction = touches.length === 1;\n var isPinchAction = touches.length === 2;\n if (isPanningAction) {\n handleCancelAnimation(_this);\n handlePanningStart(_this, event);\n handleCallback(getContext(_this), event, onPanningStart);\n }\n if (isPinchAction) {\n _this.onPinchStart(event);\n }\n }\n };\n this.onTouchPanning = function (event) {\n var disabled = _this.setup.disabled;\n var onPanning = _this.props.onPanning;\n if (_this.isPanning && event.touches.length === 1) {\n if (disabled)\n return;\n var isAllowed = isPanningAllowed(_this);\n if (!isAllowed)\n return;\n event.preventDefault();\n event.stopPropagation();\n var touch = event.touches[0];\n handlePanning(_this, touch.clientX, touch.clientY);\n handleCallback(getContext(_this), event, onPanning);\n }\n else if (event.touches.length > 1) {\n _this.onPinch(event);\n }\n };\n this.onTouchPanningStop = function (event) {\n _this.onPanningStop(event);\n _this.onPinchStop(event);\n };\n /// ///////\n // Double Click\n /// ///////\n this.onDoubleClick = function (event) {\n var disabled = _this.setup.disabled;\n if (disabled)\n return;\n var isAllowed = isDoubleClickAllowed(_this, event);\n if (!isAllowed)\n return;\n handleDoubleClick(_this, event);\n };\n /// ///////\n // Helpers\n /// ///////\n this.clearPanning = function (event) {\n if (_this.isPanning) {\n _this.onPanningStop(event);\n }\n };\n this.setKeyPressed = function (e) {\n _this.pressedKeys[e.key] = true;\n };\n this.setKeyUnPressed = function (e) {\n _this.pressedKeys[e.key] = false;\n };\n this.isPressingKeys = function (keys) {\n if (!keys.length) {\n return true;\n }\n return Boolean(keys.find(function (key) { return _this.pressedKeys[key]; }));\n };\n this.setTransformState = function (scale, positionX, positionY) {\n var onTransformed = _this.props.onTransformed;\n if (!Number.isNaN(scale) &&\n !Number.isNaN(positionX) &&\n !Number.isNaN(positionY)) {\n if (scale !== _this.transformState.scale) {\n _this.transformState.previousScale = _this.transformState.scale;\n _this.transformState.scale = scale;\n }\n _this.transformState.positionX = positionX;\n _this.transformState.positionY = positionY;\n _this.applyTransformation();\n var ctx_1 = getContext(_this);\n _this.onChangeCallbacks.forEach(function (callback) { return callback(ctx_1); });\n handleCallback(ctx_1, { scale: scale, positionX: positionX, positionY: positionY }, onTransformed);\n }\n else {\n console.error(\"Detected NaN set state values\");\n }\n };\n this.setCenter = function () {\n if (_this.wrapperComponent && _this.contentComponent) {\n var targetState = getCenterPosition(_this.transformState.scale, _this.wrapperComponent, _this.contentComponent);\n _this.setTransformState(targetState.scale, targetState.positionX, targetState.positionY);\n }\n };\n this.handleTransformStyles = function (x, y, scale) {\n if (_this.props.customTransform) {\n return _this.props.customTransform(x, y, scale);\n }\n return getTransformStyles(x, y, scale);\n };\n this.applyTransformation = function () {\n if (!_this.mounted || !_this.contentComponent)\n return;\n var _a = _this.transformState, scale = _a.scale, positionX = _a.positionX, positionY = _a.positionY;\n var transform = _this.handleTransformStyles(positionX, positionY, scale);\n _this.contentComponent.style.transform = transform;\n };\n this.getContext = function () {\n return getContext(_this);\n };\n /**\n * Hooks\n */\n this.onChange = function (callback) {\n if (!_this.onChangeCallbacks.has(callback)) {\n _this.onChangeCallbacks.add(callback);\n }\n return function () {\n _this.onChangeCallbacks.delete(callback);\n };\n };\n this.onInit = function (callback) {\n if (!_this.onInitCallbacks.has(callback)) {\n _this.onInitCallbacks.add(callback);\n }\n return function () {\n _this.onInitCallbacks.delete(callback);\n };\n };\n /**\n * Initialization\n */\n this.init = function (wrapperComponent, contentComponent) {\n _this.cleanupWindowEvents();\n _this.wrapperComponent = wrapperComponent;\n _this.contentComponent = contentComponent;\n handleCalculateBounds(_this, _this.transformState.scale);\n _this.handleInitializeWrapperEvents(wrapperComponent);\n _this.handleInitialize(contentComponent);\n _this.initializeWindowEvents();\n _this.isInitialized = true;\n var ctx = getContext(_this);\n handleCallback(ctx, undefined, _this.props.onInit);\n };\n this.props = props;\n this.setup = createSetup(this.props);\n this.transformState = createState(this.props);\n }\n return ZoomPanPinch;\n}());\n\nvar Context = React.createContext(null);\nvar getContent = function (children, ctx) {\n if (typeof children === \"function\") {\n return children(ctx);\n }\n return children;\n};\nvar TransformWrapper = React.forwardRef(function (props, ref) {\n var instance = useRef(new ZoomPanPinch(props)).current;\n var content = getContent(props.children, getControls(instance));\n useImperativeHandle(ref, function () { return getControls(instance); }, [instance]);\n useEffect(function () {\n instance.update(props);\n }, [instance, props]);\n return React.createElement(Context.Provider, { value: instance }, content);\n});\n\nvar KeepScale = React.forwardRef(function (props, ref) {\n var localRef = useRef(null);\n var instance = useContext(Context);\n useEffect(function () {\n return instance.onChange(function (ctx) {\n if (localRef.current) {\n var positionX = 0;\n var positionY = 0;\n localRef.current.style.transform = instance.handleTransformStyles(positionX, positionY, 1 / ctx.instance.transformState.scale);\n }\n });\n }, [instance]);\n return React.createElement(\"div\", __assign({}, props, { ref: mergeRefs([localRef, ref]) }));\n});\n\nvar initialElementRect = {\n width: 0,\n height: 0,\n y: 0,\n x: 0,\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n};\nvar useResize = function (ref, onResize, dependencies) {\n var resizeObserverRef = useRef();\n var rectRef = useRef(initialElementRect);\n var didUnmount = useRef(false);\n useLayoutEffect(function () {\n var _a;\n didUnmount.current = false;\n if (ref) {\n resizeObserverRef.current = new ResizeObserver(function (entries) {\n var newSize = ref.getBoundingClientRect();\n if (!Array.isArray(entries) ||\n !entries.length ||\n didUnmount.current ||\n (newSize.width === rectRef.current.width &&\n newSize.height === rectRef.current.height))\n return;\n onResize(newSize, ref);\n rectRef.current = newSize;\n });\n (_a = resizeObserverRef.current) === null || _a === void 0 ? void 0 : _a.observe(ref);\n }\n return function () {\n var _a;\n didUnmount.current = true;\n if (ref) {\n (_a = resizeObserverRef.current) === null || _a === void 0 ? void 0 : _a.unobserve(ref);\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, __spreadArray([onResize, ref], dependencies, true));\n};\n\nvar previewStyles = {\n position: \"absolute\",\n zIndex: 2,\n top: \"0px\",\n left: \"0px\",\n boxSizing: \"border-box\",\n border: \"3px solid red\",\n transformOrigin: \"0% 0%\",\n boxShadow: \"rgba(0,0,0,0.2) 0 0 0 10000000px\",\n};\nvar MiniMap = function (_a) {\n var _b = _a.width, width = _b === void 0 ? 200 : _b, _c = _a.height, height = _c === void 0 ? 200 : _c, _d = _a.borderColor, borderColor = _d === void 0 ? \"red\" : _d, children = _a.children, rest = __rest(_a, [\"width\", \"height\", \"borderColor\", \"children\"]);\n var _e = useState(false), initialized = _e[0], setInitialized = _e[1];\n var instance = useTransformContext();\n var miniMapInstance = useRef(null);\n var mainRef = useRef(null);\n var wrapperRef = useRef(null);\n var previewRef = useRef(null);\n var getContentSize = useCallback(function () {\n if (instance.contentComponent) {\n var rect = instance.contentComponent.getBoundingClientRect();\n return {\n width: rect.width / instance.transformState.scale,\n height: rect.height / instance.transformState.scale,\n };\n }\n return {\n width: 0,\n height: 0,\n };\n }, [instance.contentComponent, instance.transformState.scale]);\n var computeMiniMapScale = useCallback(function () {\n var contentSize = getContentSize();\n var scaleX = width / contentSize.width;\n var scaleY = height / contentSize.height;\n var scale = scaleY > scaleX ? scaleX : scaleY;\n return scale;\n }, [getContentSize, height, width]);\n var computeMiniMapSize = function () {\n var contentSize = getContentSize();\n var scaleX = width / contentSize.width;\n var scaleY = height / contentSize.height;\n if (scaleY > scaleX) {\n return { width: width, height: contentSize.height * scaleX };\n }\n return { width: contentSize.width * scaleY, height: height };\n };\n var computeMiniMapStyle = function () {\n var scale = computeMiniMapScale();\n var style = {\n transform: \"scale(\".concat(scale || 1, \")\"),\n transformOrigin: \"0% 0%\",\n position: \"absolute\",\n boxSizing: \"border-box\",\n zIndex: 1,\n overflow: \"hidden\",\n };\n Object.keys(style).forEach(function (key) {\n if (wrapperRef.current) {\n wrapperRef.current.style[key] = style[key];\n }\n });\n };\n var transformMiniMap = function () {\n computeMiniMapStyle();\n var miniSize = computeMiniMapSize();\n var wrapSize = getContentSize();\n if (wrapperRef.current) {\n wrapperRef.current.style.width = \"\".concat(wrapSize.width, \"px\");\n wrapperRef.current.style.height = \"\".concat(wrapSize.height, \"px\");\n }\n if (mainRef.current) {\n mainRef.current.style.width = \"\".concat(miniSize.width, \"px\");\n mainRef.current.style.height = \"\".concat(miniSize.height, \"px\");\n }\n if (previewRef.current) {\n var size = getContentSize();\n var scale = computeMiniMapScale();\n var previewScale = scale * (1 / instance.transformState.scale);\n var transform = instance.handleTransformStyles(-instance.transformState.positionX * previewScale, -instance.transformState.positionY * previewScale, 1);\n previewRef.current.style.transform = transform;\n previewRef.current.style.width = \"\".concat(size.width * previewScale, \"px\");\n previewRef.current.style.height = \"\".concat(size.height * previewScale, \"px\");\n }\n };\n var initialize = function () {\n transformMiniMap();\n };\n useTransformEffect(function () {\n transformMiniMap();\n });\n useTransformInit(function () {\n initialize();\n setInitialized(true);\n });\n useResize(instance.contentComponent, initialize, [initialized]);\n useEffect(function () {\n return instance.onChange(function (zpp) {\n var scale = computeMiniMapScale();\n if (miniMapInstance.current) {\n miniMapInstance.current.instance.transformState.scale =\n zpp.instance.transformState.scale;\n miniMapInstance.current.instance.transformState.positionX =\n zpp.instance.transformState.positionX * scale;\n miniMapInstance.current.instance.transformState.positionY =\n zpp.instance.transformState.positionY * scale;\n }\n });\n }, [computeMiniMapScale, instance, miniMapInstance]);\n var wrapperStyle = useMemo(function () {\n return {\n position: \"relative\",\n zIndex: 2,\n overflow: \"hidden\",\n };\n }, []);\n return (React.createElement(\"div\", __assign({}, rest, { ref: mainRef, style: wrapperStyle, className: \"rzpp-mini-map \".concat(rest.className || \"\") }),\n React.createElement(\"div\", __assign({}, rest, { ref: wrapperRef, className: \"rzpp-wrapper\" }), children),\n React.createElement(\"div\", { className: \"rzpp-preview\", ref: previewRef, style: __assign(__assign({}, previewStyles), { borderColor: borderColor }) })));\n};\n\nfunction styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".transform-component-module_wrapper__SPB86 {\\n position: relative;\\n width: -moz-fit-content;\\n width: fit-content;\\n height: -moz-fit-content;\\n height: fit-content;\\n overflow: hidden;\\n -webkit-touch-callout: none; /* iOS Safari */\\n -webkit-user-select: none; /* Safari */\\n -khtml-user-select: none; /* Konqueror HTML */\\n -moz-user-select: none; /* Firefox */\\n -ms-user-select: none; /* Internet Explorer/Edge */\\n user-select: none;\\n margin: 0;\\n padding: 0;\\n}\\n.transform-component-module_content__FBWxo {\\n display: flex;\\n flex-wrap: wrap;\\n width: -moz-fit-content;\\n width: fit-content;\\n height: -moz-fit-content;\\n height: fit-content;\\n margin: 0;\\n padding: 0;\\n transform-origin: 0% 0%;\\n}\\n.transform-component-module_content__FBWxo img {\\n pointer-events: none;\\n}\\n\";\nvar styles = {\"wrapper\":\"transform-component-module_wrapper__SPB86\",\"content\":\"transform-component-module_content__FBWxo\"};\nstyleInject(css_248z);\n\nvar TransformComponent = function (_a) {\n var children = _a.children, _b = _a.wrapperClass, wrapperClass = _b === void 0 ? \"\" : _b, _c = _a.contentClass, contentClass = _c === void 0 ? \"\" : _c, wrapperStyle = _a.wrapperStyle, contentStyle = _a.contentStyle, _d = _a.wrapperProps, wrapperProps = _d === void 0 ? {} : _d, _e = _a.contentProps, contentProps = _e === void 0 ? {} : _e;\n var init = useContext(Context).init;\n var wrapperRef = useRef(null);\n var contentRef = useRef(null);\n useEffect(function () {\n var wrapper = wrapperRef.current;\n var content = contentRef.current;\n if (wrapper !== null && content !== null && init) {\n init(wrapper, content);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return (React.createElement(\"div\", __assign({}, wrapperProps, { ref: wrapperRef, className: \"react-transform-wrapper \".concat(styles.wrapper, \" \").concat(wrapperClass), style: wrapperStyle }),\n React.createElement(\"div\", __assign({}, contentProps, { ref: contentRef, className: \"react-transform-component \".concat(styles.content, \" \").concat(contentClass), style: contentStyle }), children)));\n};\n\nvar useTransformContext = function () {\n var libraryContext = useContext(Context);\n if (!libraryContext) {\n throw new Error(\"Transform context must be placed inside TransformWrapper\");\n }\n return libraryContext;\n};\n\nvar useControls = function () {\n var libraryContext = useTransformContext();\n return getControls(libraryContext);\n};\n\nvar useTransformInit = function (callback) {\n var libraryContext = useTransformContext();\n useEffect(function () {\n var unmountCallback;\n var unmount;\n if (libraryContext.contentComponent && libraryContext.wrapperComponent) {\n unmountCallback = callback(getState(libraryContext));\n }\n else {\n unmount = libraryContext.onInit(function (ref) {\n unmountCallback = callback(getState(ref.instance));\n });\n }\n return function () {\n unmount === null || unmount === void 0 ? void 0 : unmount();\n unmountCallback === null || unmountCallback === void 0 ? void 0 : unmountCallback();\n };\n }, []);\n};\n\nvar useTransformEffect = function (callback) {\n var libraryContext = useTransformContext();\n useEffect(function () {\n var unmountCallback;\n var unmount = libraryContext.onChange(function (ref) {\n unmountCallback = callback(getState(ref.instance));\n });\n return function () {\n unmount();\n unmountCallback === null || unmountCallback === void 0 ? void 0 : unmountCallback();\n };\n }, [callback, libraryContext]);\n};\n\nexport { Context, KeepScale, MiniMap, TransformComponent, TransformWrapper, getCenterPosition, getMatrixTransformStyles, getTransformStyles, useControls, useTransformContext, useTransformEffect, useTransformInit };\n//# sourceMappingURL=index.esm.js.map\n"],"names":["roundNumber","num","decimal","checkIsNumber","defaultValue","handleCallback","context","event","callback","easeOut","t","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","animations","handleCancelAnimationFrame","animation","handleCancelAnimation","contextInstance","handleSetupAnimation","animationName","animationTime","startTime","lastStep","frameTime","animationProgress","animationType","step","isValidTargetState","targetState","scale","positionX","positionY","animate","isValid","setTransformState","_a","scaleDiff","positionXDiff","positionYDiff","newScale","newPositionX","newPositionY","getComponentsSizes","wrapperComponent","contentComponent","wrapperWidth","wrapperHeight","contentWidth","contentHeight","newContentWidth","newContentHeight","newDiffWidth","newDiffHeight","getBounds","diffWidth","diffHeight","centerZoomedOut","scaleWidthFactor","scaleHeightFactor","minPositionX","maxPositionX","minPositionY","maxPositionY","calculateBounds","bounds","boundLimiter","value","minBound","maxBound","isActive","handleCalculateBounds","getMouseBoundedPosition","limitToBounds","paddingValueX","paddingValueY","paddingX","paddingY","x","y","handleCalculateZoomPositions","mouseX","mouseY","scaleDifference","calculatedPositionX","calculatedPositionY","newPositions","checkZoomBounds","zoom","minScale","maxScale","zoomPadding","enablePadding","scalePadding","minScaleWithPadding","isPanningStartAllowed","excluded","isInitialized","target","isWrapperChild","isAllowed","isExcluded","isExcludedNode","isPanningAllowed","isPanning","setup","disabled","handlePanningSetup","handleTouchPanningSetup","touches","oneFingerTouch","handlePanToBounds","_b","_c","xChanged","yChanged","mousePosX","mousePosY","_d","handleNewPosition","getPanningClientPosition","clientX","clientY","startCoords","transformState","panning","lockAxisX","lockAxisY","getPaddingValue","size","disablePadding","isVelocityCalculationAllowed","mounted","velocityAnimation","disabledVelocity","isVelocityAllowed","velocity","getVelocityMoveTime","equalToMove","sensitivity","getVelocityPosition","newPosition","startPosition","currentPosition","isLocked","minPosition","maxPosition","minTarget","maxTarget","calculatedPosition","getSizeMultiplier","defaultMultiplier","handleCalculateVelocity","position","lastMousePosition","velocityTime","now","sizeMultiplier","distanceX","distanceY","velocityX","velocityY","interval","speed","handleVelocityPanning","total","alignmentAnimation","zoomAnimation","sizeX","sizeY","velocityAlignmentTime","alignAnimationTime","moveAnimationTime","finalAnimationTime","maxTargetX","minTargetX","maxTargetY","minTargetY","startState","alignAnimation","alignStep","customStep","currentPositionX","currentPositionY","handlePanningStart","handleAlignToBounds","isDisabled","handlePanning","handlePanningEnd","velocityDisabled","wrapperRect","contentRect","isZoomed","shouldAnimate","handleZoomToPoint","handleAlignToScaleBounds","mousePositionX","mousePositionY","__assign","s","i","n","p","__spreadArray","to","from","pack","l","ar","initialState","initialSetup","createState","props","createSetup","newSetup","key","validValue","validParameter","dataType","isObject","isArray","handleCalculateButtonZoom","delta","smooth","targetScale","handleZoomToViewCenter","resetTransformations","onResetTransformation","initialTransformation","newBounds","boundedPositions","newState","getOffset","element","wrapper","content","state","offset","wrapperOffset","contentOffset","xOff","yOff","calculateZoomToNode","node","customZoom","nodeRect","nodeOffset","nodeLeft","nodeTop","nodeWidth","nodeHeight","scaleX","scaleY","offsetX","offsetY","zoomIn","zoomOut","setTransform","resetTransform","centerView","getCenterPosition","zoomToElement","getControls","getState","getContext","ref","passiveSupported","makePassiveEventOption","options","targetTagName","isExcludedTag","tag","isExcludedClassName","className","cancelTimeout","timeout","getTransformStyles","centerPositionX","centerPositionY","mergeRefs","refs","isWheelAllowed","wheelDisabled","touchPadDisabled","getDeltaY","getDelta","customDelta","deltaY","getMousePosition","touch","handleCalculateWheelZoom","disable","getTarget","paddingEnabled","handleWheelZoomStop","previousWheelEvent","isPinchStartAllowed","isPinchAllowed","pinchStartDistance","calculateTouchMidPoint","firstPointX","firstPointY","secondPointX","secondPointY","getTouchDistance","calculatePinchZoom","currentDistance","pinchStartScale","touchProportion","wheelStopEventTime","wheelAnimationTime","handleWheelStart","onWheelStart","onZoomStart","handleWheelZoom","onWheel","onZoom","wheel","smoothStep","zoomStep","mousePosition","isPaddingDisabled","isLimitedToBounds","handleWheelStop","onWheelStop","onZoomStop","hasStoppedZooming","handlePinchStart","distance","handlePinchZoom","midPoint","handlePinchStop","pinchMidpoint","handleDoubleClickStop","handleDoubleClickResetMode","handleDoubleClick","doubleClickStopEventTimer","mode","isDoubleClickAllowed","ZoomPanPinch","_this","newProps","passive","currentDocument","currentWindow","centerOnInit","keysPressed","onPanningStart","onPanning","onPanningStop","onPinchingStart","onPinching","onPinchingStop","isDoubleTap","isPanningAction","isPinchAction","e","keys","onTransformed","ctx_1","transform","ctx","Context","React","getContent","children","TransformWrapper","instance","useRef","useImperativeHandle","useEffect","localRef","useContext","styleInject","css","insertAt","head","style","css_248z","styles","TransformComponent","wrapperClass","contentClass","wrapperStyle","contentStyle","wrapperProps","_e","contentProps","init","wrapperRef","contentRef"],"mappings":"gSAMA,IAAIA,EAAc,SAAUC,EAAKC,EAAS,CACtC,OAAO,OAAOD,EAAI,QAAQC,CAAO,CAAC,CACtC,EAMIC,GAAgB,SAAUF,EAAKG,EAAc,CAC7C,OAAO,OAAOH,GAAQ,SAAWA,EAAMG,CAC3C,EAEIC,EAAiB,SAAUC,EAASC,EAAOC,EAAU,CACjDA,GAAY,OAAOA,GAAa,YAChCA,EAASF,EAASC,CAAK,CAE/B,EAQIE,GAAU,SAAUC,EAAG,CACvB,MAAO,CAAC,KAAK,IAAIA,EAAI,KAAK,EAAE,EAAI,EAAI,EACxC,EAEIC,GAAS,SAAUD,EAAG,CACtB,OAAOA,CACX,EAEIE,GAAa,SAAUF,EAAG,CAC1B,OAAOA,EAAIA,CACf,EAEIG,GAAc,SAAUH,EAAG,CAC3B,OAAOA,GAAK,EAAIA,EACpB,EAEII,GAAgB,SAAUJ,EAAG,CAC7B,OAAOA,EAAI,GAAM,EAAIA,EAAIA,EAAI,IAAM,EAAI,EAAIA,GAAKA,CACpD,EAEIK,GAAc,SAAUL,EAAG,CAC3B,OAAOA,EAAIA,EAAIA,CACnB,EAEIM,GAAe,SAAUN,EAAG,CAC5B,MAAO,EAAEA,EAAIA,EAAIA,EAAI,CACzB,EAEIO,GAAiB,SAAUP,EAAG,CAC9B,OAAOA,EAAI,GAAM,EAAIA,EAAIA,EAAIA,GAAKA,EAAI,IAAM,EAAIA,EAAI,IAAM,EAAIA,EAAI,GAAK,CAC3E,EAEIQ,GAAc,SAAUR,EAAG,CAC3B,OAAOA,EAAIA,EAAIA,EAAIA,CACvB,EAEIS,GAAe,SAAUT,EAAG,CAC5B,MAAO,IAAI,EAAEA,EAAIA,EAAIA,EAAIA,CAC7B,EAEIU,GAAiB,SAAUV,EAAG,CAC9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AAA,EACGgI,EAAM,cAAc,MAAOrK,EAAS,CAAE,EAAE2L,EAAc,CAAE,IAAKI,EAAY,UAAW,2BAA2B,OAAOV,GAAO,QAAS,GAAG,EAAE,OAAOE,CAAY,EAAG,MAAOE,EAAc,EAC1LpB,EAAM,cAAc,MAAOrK,EAAS,CAAE,EAAE6L,EAAc,CAAE,IAAKG,EAAY,UAAW,6BAA6B,OAAOX,GAAO,QAAS,GAAG,EAAE,OAAOG,CAAY,EAAG,MAAOE,CAAc,CAAA,EAAGnB,CAAQ,CAAC,CAC5M;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
\ No newline at end of file
diff --git a/assets/Crud-64485ba6.js b/assets/Crud-64485ba6.js
new file mode 100644
index 0000000..4db5840
--- /dev/null
+++ b/assets/Crud-64485ba6.js
@@ -0,0 +1,18 @@
+import{j as e}from"./jsx-runtime-9c4ae004.js";import"./blocks-2646952b.js";import{u as s}from"./index-2ef8b458.js";import{M as i}from"./index-44920ba4.js";import"./index-1b03fe98.js";import"./iframe-983ca2ba.js";import"../sb-preview/runtime.js";import"./chunk-H6ZRF7XV-146ce0bc.js";import"./index-d475d2ea.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-6fd5a17b.js";import"./index-4d52b68d.js";import"./index-356e4a49.js";function o(n){const t=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",h4:"h4",blockquote:"blockquote",a:"a"},s(),n.components);return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Docs/Utils/Getting Started"}),`
+`,e.jsx(t.h1,{id:"getting-started-with-utils",children:"Getting Started with Utils"}),`
+`,e.jsx(t.p,{children:`There a variety of common interactions you want to make
+with the canvas and graph. reaflow has some helpers out of
+the box to help manage those typical operations. Those
+helpers are broken up into two categories:`}),`
+`,e.jsxs(t.ul,{children:[`
+`,e.jsx(t.li,{children:"CRUD - Dealing with manipulating nodes/edges"}),`
+`,e.jsx(t.li,{children:"Graph - Dealing with traversing the graph"}),`
+`,e.jsx(t.li,{children:"Extended Utils - More use-case focused helpers"}),`
+`]}),`
+`,e.jsx(t.h4,{id:"notes",children:"Notes"}),`
+`,e.jsxs(t.blockquote,{children:[`
+`,e.jsx(t.p,{children:"These helpers are very generic and meant to help people getting started, but they're not meant to cover specific use-cases."}),`
+`,e.jsxs(t.p,{children:["You should copy them and adapt them to your own needs if they don't cover your needs. ",e.jsx(t.a,{href:"https://github.com/reaviz/reaflow/issues/47#issuecomment-775919579",target:"_blank",rel:"nofollow noopener noreferrer",children:"See discussion"}),"."]}),`
+`,e.jsxs(t.p,{children:["There are advanced examples in ",e.jsx(t.a,{href:"/?path=/story/docs-utils-extending--page",children:"Extending Utils"})," page."]}),`
+`]})]})}function w(n={}){const{wrapper:t}=Object.assign({},s(),n.components);return t?e.jsx(t,Object.assign({},n,{children:e.jsx(o,n)})):o(n)}export{w as default};
+//# sourceMappingURL=Crud-64485ba6.js.map
diff --git a/assets/Crud-64485ba6.js.map b/assets/Crud-64485ba6.js.map
new file mode 100644
index 0000000..bb28597
--- /dev/null
+++ b/assets/Crud-64485ba6.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Crud-64485ba6.js","sources":["../../docs/Utils/Crud.mdx"],"sourcesContent":["import { Meta } from '@storybook/addon-docs/blocks';\n\n\n\n# Getting Started with Utils\n\nThere a variety of common interactions you want to make\nwith the canvas and graph. reaflow has some helpers out of\nthe box to help manage those typical operations. Those\nhelpers are broken up into two categories:\n\n- CRUD - Dealing with manipulating nodes/edges\n- Graph - Dealing with traversing the graph\n- Extended Utils - More use-case focused helpers\n\n#### Notes\n> These helpers are very generic and meant to help people getting started, but they're not meant to cover specific use-cases.\n>\n> You should copy them and adapt them to your own needs if they don't cover your needs. [See discussion](https://github.com/reaviz/reaflow/issues/47#issuecomment-775919579).\n>\n> There are advanced examples in [Extending Utils](/?path=/story/docs-utils-extending--page) page.\n"],"names":["_createMdxContent","props","_components","_provideComponents","_jsxs","_Fragment","_jsx","Meta","MDXContent","MDXLayout"],"mappings":"0bAIA,SAASA,EAAkBC,EAAO,CAChC,MAAMC,EAAc,OAAO,OAAO,CAChC,GAAI,KACJ,EAAG,IACH,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,WAAY,aACZ,EAAG,GACJ,EAAEC,EAAoB,EAAEF,EAAM,UAAU,EACzC,OAAOG,EAAAA,KAAMC,EAAAA,SAAW,CACtB,SAAU,CAACC,EAAI,IAACC,EAAM,CACpB,MAAO,4BACR,CAAA,EAAG;AAAA,EAAMD,MAAKJ,EAAY,GAAI,CAC7B,GAAI,6BACJ,SAAU,4BACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,EAAG,CAC5B,SAAU;AAAA;AAAA;AAAA,2CACX,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,GAAI,CAC9B,SAAU,CAAC;AAAA,EAAMI,MAAKJ,EAAY,GAAI,CACpC,SAAU,8CACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,GAAI,CAC7B,SAAU,2CACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,GAAI,CAC7B,SAAU,gDACX,CAAA,EAAG;AAAA,CAAI,CACT,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,GAAI,CAC7B,GAAI,QACJ,SAAU,OACX,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,WAAY,CACtC,SAAU,CAAC;AAAA,EAAMI,MAAKJ,EAAY,EAAG,CACnC,SAAU,6HACX,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,EAAG,CAC7B,SAAU,CAAC,yFAA0FI,MAAKJ,EAAY,EAAG,CACvH,KAAM,qEACN,OAAQ,SACR,IAAK,+BACL,SAAU,gBACX,CAAA,EAAG,GAAG,CACR,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,EAAG,CAC7B,SAAU,CAAC,kCAAmCI,MAAKJ,EAAY,EAAG,CAChE,KAAM,2CACN,SAAU,iBACX,CAAA,EAAG,QAAQ,CACb,CAAA,EAAG;AAAA,CAAI,CACd,CAAK,CAAC,CACN,CAAG,CACH,CACA,SAASM,EAAWP,EAAQ,GAAI,CAC9B,KAAM,CAAC,QAASQ,CAAS,EAAI,OAAO,OAAO,CAAE,EAAEN,EAAoB,EAAEF,EAAM,UAAU,EACrF,OAAOQ,EAAYH,EAAAA,IAAKG,EAAW,OAAO,OAAO,CAAE,EAAER,EAAO,CAC1D,SAAUK,EAAAA,IAAKN,EAAmBC,CAAK,CAC3C,CAAG,CAAC,EAAID,EAAkBC,CAAK,CAC/B"}
\ No newline at end of file
diff --git a/assets/CustomNodes-511b91de.js b/assets/CustomNodes-511b91de.js
new file mode 100644
index 0000000..f52615a
--- /dev/null
+++ b/assets/CustomNodes-511b91de.js
@@ -0,0 +1,75 @@
+import{j as e}from"./jsx-runtime-9c4ae004.js";import"./blocks-2646952b.js";import{u as s}from"./index-2ef8b458.js";import{M as r}from"./index-44920ba4.js";import"./index-1b03fe98.js";import"./iframe-983ca2ba.js";import"../sb-preview/runtime.js";import"./chunk-H6ZRF7XV-146ce0bc.js";import"./index-d475d2ea.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-6fd5a17b.js";import"./index-4d52b68d.js";import"./index-356e4a49.js";function t(o){const n=Object.assign({h1:"h1",p:"p",code:"code",a:"a",blockquote:"blockquote",h2:"h2",pre:"pre",h3:"h3",ul:"ul",li:"li",strong:"strong"},s(),o.components);return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Docs/Advanced/Custom nodes"}),`
+`,e.jsx(n.h1,{id:"custom-nodes",children:"Custom nodes"}),`
+`,e.jsxs(n.p,{children:["Using HTML within a ",e.jsx(n.code,{children:"Node"})," component relies on the SVG ",e.jsx(n.a,{href:"https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject",target:"_blank",rel:"nofollow noopener noreferrer",children:e.jsx(n.code,{children:"foreignObject"})}),"."]}),`
+`,e.jsxs(n.blockquote,{children:[`
+`,e.jsxs(n.p,{children:["You do not need to use ",e.jsx(n.code,{children:"xmlns"})," (XML NameSpace) in the first ",e.jsx(n.code,{children:"div"})," within ",e.jsx(n.code,{children:"foreignObject"}),", it's only required when the SVG is a whole document."]}),`
+`]}),`
+`,e.jsx(n.h2,{id:"rendering-different-kindstypes-of-nodes",children:"Rendering different kinds/types of nodes"}),`
+`,e.jsxs(n.p,{children:['Most apps will need to render different kinds of nodes. The way to go is to use a Node "',e.jsx(n.a,{href:"https://github.com/Vadorequest/poc-nextjs-reaflow/blob/734018e8135523fccc2c01077294bca0a32ddfbe/src/components/nodes/NodeRouter.tsx#L43",target:"_blank",rel:"nofollow noopener noreferrer",children:"Router"}),`" component, which checks what the node's type is, and renders the related React component.`]}),`
+`,e.jsxs(n.h2,{id:"how-does-foreignobject-render-in-html",children:["How does ",e.jsx(n.code,{children:"foreignObject"})," render in HTML?"]}),`
+`,e.jsxs(n.p,{children:["While using ",e.jsx(n.code,{children:"foreignObject"})," allows building components using usual HTML/CSS, there are a few quirks to consider."]}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-html",children:`
+
+
+
+
+
+
+
+
+ Node content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`})}),`
+`,e.jsx(n.h2,{id:"known-issues-and-workarounds",children:"Known issues and workarounds"}),`
+`,e.jsxs(n.h3,{id:"use-position-fixed-in-the-first-div",children:["Use ",e.jsx(n.code,{children:"position: fixed"})," in the first div"]}),`
+`,e.jsxs(n.p,{children:["You must apply ",e.jsx(n.code,{children:"position: fixed"})," to the first ",e.jsx(n.code,{children:"div"})," element contained by the ",e.jsx(n.code,{children:"foreignObject"}),", otherwise any child element using ",e.jsx(n.code,{children:"position"})," ",e.jsx(n.a,{href:"https://github.com/reaviz/reaflow/issues/44#issuecomment-776883460",target:"_blank",rel:"nofollow noopener noreferrer",children:"will not be displayed"}),"."]}),`
+`,e.jsxs(n.ul,{children:[`
+`,e.jsxs(n.li,{children:["This issue was the reason why ",e.jsx(n.code,{children:"react-select"})," and ",e.jsx(n.code,{children:"ChakraUI Select"})," components wouldn't display properly."]}),`
+`]}),`
+`,e.jsx(n.h3,{id:"z-index-doesnt-have-any-effect-on-svg-elements",children:"Z-index doesn't have any effect on SVG elements"}),`
+`,e.jsxs(n.p,{children:["The ",e.jsx(n.code,{children:"foreignObject"})," is still a SVG element, and it is displayed on top of the ",e.jsx(n.code,{children:"rect"})," (which represents the Node component created by reaflow)."]}),`
+`,e.jsxs(n.p,{children:["It is not possible to re-order SVG elements using ",e.jsx(n.code,{children:"z-index"}),`.
+The rule of display on the Z index being "the last element is displayed on top of the other element".`]}),`
+`,e.jsxs(n.h3,{id:"the-foreignobject-will-steal-events-onclick-onenter-onleave-etc-that-are-bound-to-the-rect-node",children:["The ",e.jsx(n.code,{children:"foreignObject"})," will steal events (onClick, onEnter, onLeave, etc.) that are bound to the ",e.jsx(n.code,{children:"rect"})," (Node)"]}),`
+`,e.jsxs(n.p,{children:["Because the ",e.jsx(n.code,{children:"foreignObject"})," displays on top of the ",e.jsx(n.code,{children:"rect"}),' element, it will "steal" events such as onClick, onEnter/onLeave (mouse).']}),`
+`,e.jsxs(n.p,{children:["Those events are provided by default by Reaflow ",e.jsx(n.code,{children:"Canvas"})," to its ",e.jsx(n.code,{children:"Node"}),` components.
+Thus, by using `,e.jsx(n.code,{children:"foreignObject"}),", ",e.jsx(n.strong,{children:"none of the built-in Node events will work anymore"}),", ",e.jsxs(n.a,{href:"https://github.com/reaviz/reaflow/discussions/34",target:"_blank",rel:"nofollow noopener noreferrer",children:["unless you set ",e.jsx(n.code,{children:"pointer-events: none"})," to the ",e.jsx(n.code,{children:"foreignObject"})," element"]}),"."]}),`
+`,e.jsxs(n.p,{children:["Although, even if you disable ",e.jsx(n.code,{children:"pointer-events"}),", depending on your Node component UI, it might only work for part of the component."]}),`
+`,e.jsx(n.p,{children:"Many built-in behaviors will be affected because of this, such as:"}),`
+`,e.jsxs(n.ul,{children:[`
+`,e.jsxs(n.li,{children:["Dragging an edge from a node",`
+`,e.jsxs(n.ul,{children:[`
+`,e.jsxs(n.li,{children:["Dragging won't work if the click doesn't happen on the ",e.jsx(n.code,{children:"rect"})]}),`
+`]}),`
+`]}),`
+`,e.jsxs(n.li,{children:["Selecting nodes",`
+`,e.jsxs(n.ul,{children:[`
+`,e.jsxs(n.li,{children:["The click won't work it doesn't happen on the ",e.jsx(n.code,{children:"rect"})]}),`
+`,e.jsxs(n.li,{children:["Using shortcuts for multiple selection ",e.jsx(n.a,{href:"https://github.com/reaviz/reaflow/issues/50",target:"_blank",rel:"nofollow noopener noreferrer",children:"won't work because keyboard events won't be captured"})]}),`
+`]}),`
+`]}),`
+`]}),`
+`,e.jsxs(n.p,{children:["That's why, in addition to disabling ",e.jsx(n.code,{children:"pointer-events"}),", ",e.jsxs(n.strong,{children:["you might also want ",e.jsx(n.a,{href:"https://github.com/Vadorequest/poc-nextjs-reaflow/blob/272a23604e0a11ef0726e19091be58ffd5861d62/src/components/nodes/BaseNode.tsx#L357-L360",target:"_blank",rel:"nofollow noopener noreferrer",children:"to forward the native events"})]})," (onClick, onEnter, onLeave, onKeyPress, etc.) to the main div (",e.jsx(n.code,{children:".node"})," above)."]}),`
+`,e.jsxs(n.p,{children:["By forwarding those events to the first ",e.jsx(n.code,{children:"div"}),", you'll work around most of the above-mentioned issues."]}),`
+`,e.jsx(n.h3,{id:"enteringleaving-a-node",children:"Entering/leaving a node"}),`
+`,e.jsx(n.p,{children:"Depending on how complicated your HTML is within the nodes themselves, it might be tough to detect whether you're in a node or not."}),`
+`,e.jsxs(n.p,{children:["When not using ",e.jsx(n.code,{children:"foreignObject"}),", it is really straightforward, but when the ",e.jsx(n.code,{children:"foreignObject"})," contains complex HTML structure, the ",e.jsx(n.code,{children:"onEnter/onLeave"})," events applied to main ",e.jsx(n.code,{children:"div"})," will trigger when hovering other elements within that node, leading to a tons of false-positive events."]}),`
+`,e.jsx(n.p,{children:"At this time, there was no viable solution being reported to work around this issue."}),`
+`,e.jsx(n.h2,{id:"community-examples",children:"Community examples"}),`
+`,e.jsxs(n.ul,{children:[`
+`,e.jsxs(n.li,{children:[e.jsx(n.a,{href:"https://github.com/Vadorequest/poc-nextjs-reaflow",target:"_blank",rel:"nofollow noopener noreferrer",children:"Vadorequest/poc-nextjs-reaflow"})," uses custom nodes UI, and ",e.jsxs(n.a,{href:"https://github.com/Vadorequest/poc-nextjs-reaflow/blob/287141b94145eec18fb02aab8f00676ae92f1310/src/components/nodes/BaseNode.tsx#L279-L418",target:"_blank",rel:"nofollow noopener noreferrer",children:["all nodes relies on ",e.jsx(n.code,{children:"foreignObject"})]})]}),`
+`]})]})}function b(o={}){const{wrapper:n}=Object.assign({},s(),o.components);return n?e.jsx(n,Object.assign({},o,{children:e.jsx(t,o)})):t(o)}export{b as default};
+//# sourceMappingURL=CustomNodes-511b91de.js.map
diff --git a/assets/CustomNodes-511b91de.js.map b/assets/CustomNodes-511b91de.js.map
new file mode 100644
index 0000000..b62f741
--- /dev/null
+++ b/assets/CustomNodes-511b91de.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CustomNodes-511b91de.js","sources":["../../docs/Advanced/CustomNodes.mdx"],"sourcesContent":["import { Meta } from '@storybook/addon-docs/blocks';\n\n\n\n# Custom nodes\n\nUsing HTML within a `Node` component relies on the SVG [`foreignObject`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject).\n\n> You do not need to use `xmlns` (XML NameSpace) in the first `div` within `foreignObject`, it's only required when the SVG is a whole document.\n\n## Rendering different kinds/types of nodes\n\nMost apps will need to render different kinds of nodes. The way to go is to use a Node \"[Router](https://github.com/Vadorequest/poc-nextjs-reaflow/blob/734018e8135523fccc2c01077294bca0a32ddfbe/src/components/nodes/NodeRouter.tsx#L43)\" component, which checks what the node's type is, and renders the related React component.\n\n## How does `foreignObject` render in HTML?\n\nWhile using `foreignObject` allows building components using usual HTML/CSS, there are a few quirks to consider.\n\n```html\n\n\n \n \n\n \n \n \n \n Node content\n
\n \n\n \n \n \n \n \n \n \n \n \n \n\n```\n\n## Known issues and workarounds\n\n### Use `position: fixed` in the first div\n\nYou must apply `position: fixed` to the first `div` element contained by the `foreignObject`, otherwise any child element using `position` [will not be displayed](https://github.com/reaviz/reaflow/issues/44#issuecomment-776883460).\n - This issue was the reason why `react-select` and `ChakraUI Select` components wouldn't display properly.\n\n### Z-index doesn't have any effect on SVG elements\n\nThe `foreignObject` is still a SVG element, and it is displayed on top of the `rect` (which represents the Node component created by reaflow).\n\nIt is not possible to re-order SVG elements using `z-index`.\nThe rule of display on the Z index being \"the last element is displayed on top of the other element\".\n\n### The `foreignObject` will steal events (onClick, onEnter, onLeave, etc.) that are bound to the `rect` (Node)\n\nBecause the `foreignObject` displays on top of the `rect` element, it will \"steal\" events such as onClick, onEnter/onLeave (mouse).\n\nThose events are provided by default by Reaflow `Canvas` to its `Node` components.\nThus, by using `foreignObject`, **none of the built-in Node events will work anymore**, [unless you set `pointer-events: none` to the `foreignObject` element](https://github.com/reaviz/reaflow/discussions/34).\n\nAlthough, even if you disable `pointer-events`, depending on your Node component UI, it might only work for part of the component.\n\nMany built-in behaviors will be affected because of this, such as:\n- Dragging an edge from a node\n - Dragging won't work if the click doesn't happen on the `rect`\n- Selecting nodes\n - The click won't work it doesn't happen on the `rect`\n - Using shortcuts for multiple selection [won't work because keyboard events won't be captured](https://github.com/reaviz/reaflow/issues/50)\n\nThat's why, in addition to disabling `pointer-events`, **you might also want [to forward the native events](https://github.com/Vadorequest/poc-nextjs-reaflow/blob/272a23604e0a11ef0726e19091be58ffd5861d62/src/components/nodes/BaseNode.tsx#L357-L360)** (onClick, onEnter, onLeave, onKeyPress, etc.) to the main div (`.node` above).\n\nBy forwarding those events to the first `div`, you'll work around most of the above-mentioned issues.\n\n### Entering/leaving a node\n\nDepending on how complicated your HTML is within the nodes themselves, it might be tough to detect whether you're in a node or not.\n\nWhen not using `foreignObject`, it is really straightforward, but when the `foreignObject` contains complex HTML structure, the `onEnter/onLeave` events applied to main `div` will trigger when hovering other elements within that node, leading to a tons of false-positive events.\n\nAt this time, there was no viable solution being reported to work around this issue.\n\n## Community examples\n\n- [Vadorequest/poc-nextjs-reaflow](https://github.com/Vadorequest/poc-nextjs-reaflow) uses custom nodes UI, and [all nodes relies on `foreignObject`](https://github.com/Vadorequest/poc-nextjs-reaflow/blob/287141b94145eec18fb02aab8f00676ae92f1310/src/components/nodes/BaseNode.tsx#L279-L418)\n"],"names":["_createMdxContent","props","_components","_provideComponents","_jsxs","_Fragment","_jsx","Meta","MDXContent","MDXLayout"],"mappings":"0bAIA,SAASA,EAAkBC,EAAO,CAChC,MAAMC,EAAc,OAAO,OAAO,CAChC,GAAI,KACJ,EAAG,IACH,KAAM,OACN,EAAG,IACH,WAAY,aACZ,GAAI,KACJ,IAAK,MACL,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,OAAQ,QACT,EAAEC,EAAoB,EAAEF,EAAM,UAAU,EACzC,OAAOG,EAAAA,KAAMC,EAAAA,SAAW,CACtB,SAAU,CAACC,EAAI,IAACC,EAAM,CACpB,MAAO,4BACR,CAAA,EAAG;AAAA,EAAMD,MAAKJ,EAAY,GAAI,CAC7B,GAAI,eACJ,SAAU,cACX,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,EAAG,CAC7B,SAAU,CAAC,uBAAwBI,MAAKJ,EAAY,KAAM,CACxD,SAAU,MACX,CAAA,EAAG,gCAAiCI,MAAKJ,EAAY,EAAG,CACvD,KAAM,yEACN,OAAQ,SACR,IAAK,+BACL,SAAUI,EAAAA,IAAKJ,EAAY,KAAM,CAC/B,SAAU,eACpB,CAAS,CACF,CAAA,EAAG,GAAG,CACR,CAAA,EAAG;A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,IAAKN,EAAmBC,CAAK,CAC3C,CAAG,CAAC,EAAID,EAAkBC,CAAK,CAC/B"}
\ No newline at end of file
diff --git a/assets/DataShapes-05db0f71.js b/assets/DataShapes-05db0f71.js
new file mode 100644
index 0000000..b7761a3
--- /dev/null
+++ b/assets/DataShapes-05db0f71.js
@@ -0,0 +1,204 @@
+import{j as n}from"./jsx-runtime-9c4ae004.js";import"./blocks-2646952b.js";import{u as a}from"./index-2ef8b458.js";import{M as i}from"./index-44920ba4.js";import"./index-1b03fe98.js";import"./iframe-983ca2ba.js";import"../sb-preview/runtime.js";import"./chunk-H6ZRF7XV-146ce0bc.js";import"./index-d475d2ea.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-6fd5a17b.js";import"./index-4d52b68d.js";import"./index-356e4a49.js";function o(t){const e=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",code:"code",h2:"h2",pre:"pre"},a(),t.components);return n.jsxs(n.Fragment,{children:[n.jsx(i,{title:"Docs/Getting Started/Data Shapes"}),`
+`,n.jsx(e.h1,{id:"data-shapes",children:"Data Shapes"}),`
+`,n.jsx(e.p,{children:`The graph is made up of 3 basic data shape objects you
+can pass to the graph.`}),`
+`,n.jsxs(e.ul,{children:[`
+`,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"NodeData"})," - The element block which renders"]}),`
+`,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"EdgeData"})," - The link between Nodes"]}),`
+`,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"PortData"})," - A specific enter/exit block to link between Nodes"]}),`
+`]}),`
+`,n.jsx(e.h2,{id:"node",children:"Node"}),`
+`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-ts",children:`export interface NodeData {
+ /**
+ * Unique ID for the node.
+ */
+ id: string;
+
+ /**
+ * Whether the node is disabled or not.
+ */
+ disabled?: boolean;
+
+ /**
+ * Text label for the node.
+ */
+ text?: any;
+
+ /**
+ * Optional height attribute. If not passed with calculate
+ * default sizes using text.
+ */
+ height?: number;
+
+ /**
+ * Optional width attribute. If not passed with calculate
+ * default sizes using text.
+ */
+ width?: number;
+
+ /**
+ * Parent node id for nesting.
+ */
+ parent?: string;
+
+ /**
+ * List of ports.
+ */
+ ports?: PortData[];
+
+ /**
+ * Icon for the node.
+ */
+ icon?: IconData;
+
+ /**
+ * Padding for the node.
+ */
+ nodePadding?: number | [number, number] | [number, number, number, number];
+
+ /**
+ * Data for the node.
+ */
+ data?: T;
+
+ /**
+ * CSS classname for the node.
+ */
+ className?: string;
+
+ /**
+ * ELK layout options.
+ */
+ layoutOptions?: ElkNodeLayoutOptions;
+
+ /**
+ * Whether the node can be clicked.
+ */
+ selectionDisabled?: boolean;
+}
+`})}),`
+`,n.jsxs(e.p,{children:["The node also has a ",n.jsx(e.code,{children:"IconData"})," shape:"]}),`
+`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-ts",children:`export interface IconData {
+ /**
+ * URL for the icon.
+ */
+ url: string;
+
+ /**
+ * Height of the icon.
+ */
+ height: number;
+
+ /**
+ * Width of the icon.
+ */
+ width: number;
+}
+`})}),`
+`,n.jsx(e.h2,{id:"edge",children:"Edge"}),`
+`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-ts",children:`export interface EdgeData {
+ /**
+ * Unique ID of the edge.
+ */
+ id: string;
+
+ /**
+ * Whether the edge is disabled or not.
+ */
+ disabled?: boolean;
+
+ /**
+ * Text label for the edge.
+ */
+ text?: any;
+
+ /**
+ * ID of the from node.
+ */
+ from?: string;
+
+ /**
+ * ID of the to node.
+ */
+ to?: string;
+
+ /**
+ * Optional ID of the from port.
+ */
+ fromPort?: string;
+
+ /**
+ * Optional ID of the to port.
+ */
+ toPort?: string;
+
+ /**
+ * Data about the edge.
+ */
+ data?: T;
+
+ /**
+ * CSS Classname for the edge.
+ */
+ className?: string;
+
+ /**
+ * Optional arrow head type.
+ */
+ arrowHeadType?: any;
+
+ /**
+ * Parent of the edge for nesting.
+ */
+ parent?: string;
+
+ /**
+ * Whether the edge can be clicked.
+ */
+ selectionDisabled?: boolean;
+}
+`})}),`
+`,n.jsx(e.h2,{id:"port",children:"Port"}),`
+`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-ts",children:`export interface PortData {
+ /**
+ * Unique ID of the port.
+ */
+ id: string;
+
+ /**
+ * Height of the port.
+ */
+ height: number;
+
+ /**
+ * Width of the port.
+ */
+ width: number;
+
+ /**
+ * Whether the port is visually hidden or not.
+ */
+ hidden?: boolean;
+
+ /**
+ * Classname for the port.
+ */
+ className?: string;
+
+ /**
+ * Alignment of the port.
+ */
+ alignment?: 'CENTER';
+
+ /**
+ * Side the port is located.
+ */
+ side: 'NORTH' | 'SOUTH' | 'EAST' | 'WEST';
+
+ /**
+ * Port is disabled.
+ */
+ disabled?: boolean;
+}
+`})})]})}function j(t={}){const{wrapper:e}=Object.assign({},a(),t.components);return e?n.jsx(e,Object.assign({},t,{children:n.jsx(o,t)})):o(t)}export{j as default};
+//# sourceMappingURL=DataShapes-05db0f71.js.map
diff --git a/assets/DataShapes-05db0f71.js.map b/assets/DataShapes-05db0f71.js.map
new file mode 100644
index 0000000..90011bd
--- /dev/null
+++ b/assets/DataShapes-05db0f71.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DataShapes-05db0f71.js","sources":["../../docs/GettingStarted/DataShapes.mdx"],"sourcesContent":["import { Meta } from '@storybook/addon-docs/blocks';\n\n\n\n# Data Shapes\nThe graph is made up of 3 basic data shape objects you\ncan pass to the graph.\n\n- `NodeData` - The element block which renders\n- `EdgeData` - The link between Nodes\n- `PortData` - A specific enter/exit block to link between Nodes\n\n## Node\n```ts\nexport interface NodeData {\n /**\n * Unique ID for the node.\n */\n id: string;\n\n /**\n * Whether the node is disabled or not.\n */\n disabled?: boolean;\n\n /**\n * Text label for the node.\n */\n text?: any;\n\n /**\n * Optional height attribute. If not passed with calculate\n * default sizes using text.\n */\n height?: number;\n\n /**\n * Optional width attribute. If not passed with calculate\n * default sizes using text.\n */\n width?: number;\n\n /**\n * Parent node id for nesting.\n */\n parent?: string;\n\n /**\n * List of ports.\n */\n ports?: PortData[];\n\n /**\n * Icon for the node.\n */\n icon?: IconData;\n\n /**\n * Padding for the node.\n */\n nodePadding?: number | [number, number] | [number, number, number, number];\n\n /**\n * Data for the node.\n */\n data?: T;\n\n /**\n * CSS classname for the node.\n */\n className?: string;\n\n /**\n * ELK layout options.\n */\n layoutOptions?: ElkNodeLayoutOptions;\n\n /**\n * Whether the node can be clicked.\n */\n selectionDisabled?: boolean;\n}\n```\n\nThe node also has a `IconData` shape:\n\n```ts\nexport interface IconData {\n /**\n * URL for the icon.\n */\n url: string;\n\n /**\n * Height of the icon.\n */\n height: number;\n\n /**\n * Width of the icon.\n */\n width: number;\n}\n```\n\n## Edge\n```ts\nexport interface EdgeData {\n /**\n * Unique ID of the edge.\n */\n id: string;\n\n /**\n * Whether the edge is disabled or not.\n */\n disabled?: boolean;\n\n /**\n * Text label for the edge.\n */\n text?: any;\n\n /**\n * ID of the from node.\n */\n from?: string;\n\n /**\n * ID of the to node.\n */\n to?: string;\n\n /**\n * Optional ID of the from port.\n */\n fromPort?: string;\n\n /**\n * Optional ID of the to port.\n */\n toPort?: string;\n\n /**\n * Data about the edge.\n */\n data?: T;\n\n /**\n * CSS Classname for the edge.\n */\n className?: string;\n\n /**\n * Optional arrow head type.\n */\n arrowHeadType?: any;\n\n /**\n * Parent of the edge for nesting.\n */\n parent?: string;\n\n /**\n * Whether the edge can be clicked.\n */\n selectionDisabled?: boolean;\n}\n```\n\n## Port\n```ts\nexport interface PortData {\n /**\n * Unique ID of the port.\n */\n id: string;\n\n /**\n * Height of the port.\n */\n height: number;\n\n /**\n * Width of the port.\n */\n width: number;\n\n /**\n * Whether the port is visually hidden or not.\n */\n hidden?: boolean;\n\n /**\n * Classname for the port.\n */\n className?: string;\n\n /**\n * Alignment of the port.\n */\n alignment?: 'CENTER';\n\n /**\n * Side the port is located.\n */\n side: 'NORTH' | 'SOUTH' | 'EAST' | 'WEST';\n\n /**\n * Port is disabled.\n */\n disabled?: boolean;\n}\n```\n"],"names":["_createMdxContent","props","_components","_provideComponents","_jsxs","_Fragment","_jsx","Meta","MDXContent","MDXLayout"],"mappings":"0bAIA,SAASA,EAAkBC,EAAO,CAChC,MAAMC,EAAc,OAAO,OAAO,CAChC,GAAI,KACJ,EAAG,IACH,GAAI,KACJ,GAAI,KACJ,KAAM,OACN,GAAI,KACJ,IAAK,KACN,EAAEC,EAAoB,EAAEF,EAAM,UAAU,EACzC,OAAOG,EAAAA,KAAMC,EAAAA,SAAW,CACtB,SAAU,CAACC,EAAI,IAACC,EAAM,CACpB,MAAO,kCACR,CAAA,EAAG;AAAA,EAAMD,MAAKJ,EAAY,GAAI,CAC7B,GAAI,cACJ,SAAU,aACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,EAAG,CAC5B,SAAU;AAAA,uBACX,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,GAAI,CAC9B,SAAU,CAAC;AAAA,EAAME,OAAMF,EAAY,GAAI,CACrC,SAAU,CAACI,EAAAA,IAAKJ,EAAY,KAAM,CAChC,SAAU,UACX,CAAA,EAAG,oCAAoC,CACzC,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,GAAI,CAC9B,SAAU,CAACI,EAAAA,IAAKJ,EAAY,KAAM,CAChC,SAAU,UACX,CAAA,EAAG,2BAA2B,CAChC,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,GAAI,CAC9B,SAAU,CAACI,EAAAA,IAAKJ,EAAY,KAAM,CAChC,SAAU,UACX,CAAA,EAAG,sDAAsD,CAC3D,CAAA,EAAG;AAAA,CAAI,CACT,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,GAAI,CAC7B,GAAI,OACJ,SAAU,MACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,IAAK,CAC9B,SAAUI,EAAAA,IAAKJ,EAAY,KAAM,CAC/B,UAAW,cACX,SAAU;AAAA;AAAA;AA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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAClB,CAAO,CACF,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,GAAI,CAC7B,GAAI,OACJ,SAAU,MACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,IAAK,CAC9B,SAAUI,EAAAA,IAAKJ,EAAY,KAAM,CAC/B,UAAW,cACX,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAClB,CAAO,CACP,CAAK,CAAC,CACN,CAAG,CACH,CACA,SAASM,EAAWP,EAAQ,GAAI,CAC9B,KAAM,CAAC,QAASQ,CAAS,EAAI,OAAO,OAAO,CAAE,EAAEN,EAAoB,EAAEF,EAAM,UAAU,EACrF,OAAOQ,EAAYH,EAAAA,IAAKG,EAAW,OAAO,OAAO,CAAE,EAAER,EAAO,CAC1D,SAAUK,EAAAA,IAAKN,EAAmBC,CAAK,CAC3C,CAAG,CAAC,EAAID,EAAkBC,CAAK,CAC/B"}
\ No newline at end of file
diff --git a/assets/DocsRenderer-3PUGWF3O-ee3b1a4c.js b/assets/DocsRenderer-3PUGWF3O-ee3b1a4c.js
new file mode 100644
index 0000000..bacd8be
--- /dev/null
+++ b/assets/DocsRenderer-3PUGWF3O-ee3b1a4c.js
@@ -0,0 +1,2 @@
+import{D as c,d as l}from"./chunk-S4VUQJ4A-48c253a4.js";import"./iframe-983ca2ba.js";import"../sb-preview/runtime.js";import"./index-1b03fe98.js";import"./react-18-5df836b6.js";import"./index-6fd5a17b.js";import"./index-44920ba4.js";import"./chunk-H6ZRF7XV-146ce0bc.js";import"./index-d475d2ea.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-4d52b68d.js";import"./index-356e4a49.js";export{c as DocsRenderer,l as defaultComponents};
+//# sourceMappingURL=DocsRenderer-3PUGWF3O-ee3b1a4c.js.map
diff --git a/assets/DocsRenderer-3PUGWF3O-ee3b1a4c.js.map b/assets/DocsRenderer-3PUGWF3O-ee3b1a4c.js.map
new file mode 100644
index 0000000..149bf49
--- /dev/null
+++ b/assets/DocsRenderer-3PUGWF3O-ee3b1a4c.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DocsRenderer-3PUGWF3O-ee3b1a4c.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/assets/Drag.stories-006fce37.js b/assets/Drag.stories-006fce37.js
new file mode 100644
index 0000000..4c53c4e
--- /dev/null
+++ b/assets/Drag.stories-006fce37.js
@@ -0,0 +1,350 @@
+import{j as o}from"./jsx-runtime-9c4ae004.js";import{r as f}from"./index-1b03fe98.js";import{C as n,N as p,E as X,M as Y,a as Z,I as ee,L as te,P as oe,R as re,A as se}from"./Icon-81c21a65.js";import"./IntersectionQuery-9432d399.js";import{c as D,r as j}from"./crudHelpers-031fd461.js";import{h as b}from"./graphHelpers-fa49f917.js";import"./index-6fd5a17b.js";import"./_commonjs-dynamic-modules-302442b1.js";const fe={title:"Demos/Drag",component:n,subcomponents:{Node:p,Edge:X,MarkerArrow:Y,Arrow:Z,Icon:ee,Label:te,Port:oe,Remove:re,Add:se}},c=()=>o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(n,{nodes:[{id:"1",text:"1"},{id:"2",text:"2"}],edges:[{id:"1-2",from:"1",to:"2"}],node:o.jsx(p,{dragCursor:"grab",dragType:"node"})})}),u=()=>o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(n,{nodes:[{id:"1",text:"1",ports:i("1")},{id:"2",text:"2",ports:i("2")}],edges:[l("1","2")],node:o.jsx(p,{dragType:"port"})})}),x=()=>o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(n,{nodes:[{id:"1",text:"1",ports:i("1")},{id:"2",text:"2"}],edges:[{id:"1-2",from:"1",to:"2"}],node:o.jsx(p,{dragType:"multiportOnly"})})}),N=()=>o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(n,{nodes:[{id:"1",text:"1",ports:i("1")},{id:"2",text:"2"}],edges:[{id:"1-2",from:"1",to:"2"}],node:o.jsx(p,{dragType:"all"})})}),k=()=>{const[r,g]=f.useState([{id:"1",text:"1"},{id:"2",text:"2"},{id:"3",text:"3"},{id:"4",text:"4"},{id:"5",text:"5"},{id:"6",text:"6"}]),[s,m]=f.useState([{id:"1-2",from:"1",to:"2"},{id:"2-3",from:"2",to:"3"},{id:"2-4",from:"2",to:"4"},{id:"2-5",from:"2",to:"5"},{id:"5-6",from:"5",to:"6"}]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(n,{nodes:r,edges:s,node:o.jsx(p,{dragType:"node"}),onNodeLinkCheck:(d,e,t)=>!(e.id===t.id||b(s,e,t)),onNodeLink:(d,e,t)=>{const a=s.filter(E=>E.to!==e.id);m([...a,D(t,e)])}})})},h=()=>{const[r,g]=f.useState([{id:"1",text:"1"},{id:"2",text:"2"},{id:"3",text:"3"},{id:"4",text:"4"},{id:"5",text:"5"},{id:"6",text:"6"}]),[s,m]=f.useState([{id:"1-2",from:"1",to:"2"},{id:"2-3",from:"2",to:"3"},{id:"2-4",from:"2",to:"4"},{id:"2-5",from:"2",to:"5"},{id:"5-6",from:"5",to:"6"}]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(n,{nodes:r,edges:s,node:o.jsx(p,{dragType:"node"}),onNodeLinkCheck:(d,e,t)=>!(e.id===t.id||b(s,e,t)),onNodeLink:(d,e,t)=>{const a=j(r,s,e);m([...a.edges,D(t,e)])}})})},v=()=>{const[r,g]=f.useState([{id:"1",text:"1",ports:i("1")},{id:"2",text:"2",ports:i("2")},{id:"3",text:"3",ports:i("3")},{id:"4",text:"4",ports:i("4")},{id:"5",text:"5",ports:i("5")},{id:"6",text:"6",ports:i("6")}]),[s,m]=f.useState([l("1","2"),l("2","3"),l("2","4"),l("2","5"),l("5","6")]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(n,{nodes:r,edges:s,node:o.jsx(p,{dragType:"all"}),onNodeLinkCheck:(d,e,t)=>!(e.id===t.id||b(s,e,t)),onNodeLink:(d,e,t)=>{if(d.dragType==="node"){const a=j(r,s,e);m([...a.edges,l(t.id,e.id)])}else d.dragType==="port"&&m([...s,l(e.id,t.id)])}})})},y=()=>{const[r,g]=f.useState([{id:"1",text:"1"},{id:"2"},{id:"2-1-1",text:"2 > 1.1",parent:"2"},{id:"2-1-2",text:"2 > 1.2",parent:"2"},{id:"2-1-3",text:"2 > 1.3",parent:"2"},{id:"2-1-4",text:"2 > 1.4",parent:"2"},{id:"2-2-1",parent:"2"},{id:"2-2-1-1",text:"2 > 2.1 > 1.1",parent:"2-2-1"},{id:"3",text:"3"}]),[s,m]=f.useState([{id:"1-2",from:"1",to:"2"},{id:"2-1-1>2-1-2",from:"2-1-1",to:"2-1-2",parent:"2"},{id:"2-1-1>2-1-3",from:"2-1-1",to:"2-1-3",parent:"2"},{id:"2-1-2>2-2-1",from:"2-1-2",to:"2-2-1",parent:"2"},{id:"2-1-3>2-1-4",from:"2-1-3",to:"2-1-4",parent:"2"},{id:"2-3",from:"2",to:"3"}]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(n,{nodes:r,edges:s,node:d=>{const t=r.filter(a=>a.parent&&a.parent===d.id).length>3;return o.jsx(p,{...d,dragType:"node",draggable:!t})},onNodeLinkCheck:(d,e,t)=>!(e.id===t.id||e.id===t.parent||b(s,t,e)),onNodeLink:(d,e,t)=>{const a=j(r,s,e);if((e.parent||t.parent)&&e.parent!==t.parent){const E=r.map(P=>P.id===e.id?{...P,parent:t.parent}:{...P});e.parent=t.parent,g(E)}m([...a.edges,D(t,e)])}})})},i=r=>[{id:`${r}-from`,width:10,height:10,side:"SOUTH"},{id:`${r}-to`,width:10,height:10,side:"NORTH"}],l=(r,g)=>({id:`${r}-${g}`,from:r,to:g,fromPort:`${r}-from`,toPort:`${g}-to`});var S,F,L;c.parameters={...c.parameters,docs:{...(S=c.parameters)==null?void 0:S.docs,source:{originalSource:`() =>
+ } />
+
`,...(L=(F=c.parameters)==null?void 0:F.docs)==null?void 0:L.source}}};var T,C,_;u.parameters={...u.parameters,docs:{...(T=u.parameters)==null?void 0:T.docs,source:{originalSource:`() =>
+ } />
+
`,...(_=(C=u.parameters)==null?void 0:C.docs)==null?void 0:_.source}}};var O,w,R;x.parameters={...x.parameters,docs:{...(O=x.parameters)==null?void 0:O.docs,source:{originalSource:`() =>
+ } />
+
`,...(R=(w=x.parameters)==null?void 0:w.docs)==null?void 0:R.source}}};var A,W,U;N.parameters={...N.parameters,docs:{...(A=N.parameters)==null?void 0:A.docs,source:{originalSource:`() =>
+ } />
+
`,...(U=(W=N.parameters)==null?void 0:W.docs)==null?void 0:U.source}}};var $,M,H;k.parameters={...k.parameters,docs:{...($=k.parameters)==null?void 0:$.docs,source:{originalSource:`() => {
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: '1'
+ }, {
+ id: '2',
+ text: '2'
+ }, {
+ id: '3',
+ text: '3'
+ }, {
+ id: '4',
+ text: '4'
+ }, {
+ id: '5',
+ text: '5'
+ }, {
+ id: '6',
+ text: '6'
+ }]);
+ const [edges, setEdges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }, {
+ id: '2-3',
+ from: '2',
+ to: '3'
+ }, {
+ id: '2-4',
+ from: '2',
+ to: '4'
+ }, {
+ id: '2-5',
+ from: '2',
+ to: '5'
+ }, {
+ id: '5-6',
+ from: '5',
+ to: '6'
+ }]);
+ return
+ } onNodeLinkCheck={(_event, from: NodeData, to: NodeData) => {
+ if (from.id === to.id) {
+ return false;
+ }
+ if (hasLink(edges, from, to)) {
+ return false;
+ }
+ return true;
+ }} onNodeLink={(_event, from, to) => {
+ const newEdges = edges.filter(e => e.to !== from.id);
+ setEdges([...newEdges, createEdgeFromNodes(to, from)]);
+ }} />
+
;
+}`,...(H=(M=k.parameters)==null?void 0:M.docs)==null?void 0:H.source}}};var I,q,z;h.parameters={...h.parameters,docs:{...(I=h.parameters)==null?void 0:I.docs,source:{originalSource:`() => {
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: '1'
+ }, {
+ id: '2',
+ text: '2'
+ }, {
+ id: '3',
+ text: '3'
+ }, {
+ id: '4',
+ text: '4'
+ }, {
+ id: '5',
+ text: '5'
+ }, {
+ id: '6',
+ text: '6'
+ }]);
+ const [edges, setEdges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }, {
+ id: '2-3',
+ from: '2',
+ to: '3'
+ }, {
+ id: '2-4',
+ from: '2',
+ to: '4'
+ }, {
+ id: '2-5',
+ from: '2',
+ to: '5'
+ }, {
+ id: '5-6',
+ from: '5',
+ to: '6'
+ }]);
+ return
+ } onNodeLinkCheck={(_event, from: NodeData, to: NodeData) => {
+ if (from.id === to.id) {
+ return false;
+ }
+ if (hasLink(edges, from, to)) {
+ return false;
+ }
+ return true;
+ }} onNodeLink={(_event, from, to) => {
+ const result = removeAndUpsertNodes(nodes, edges, from);
+ setEdges([...result.edges, createEdgeFromNodes(to, from)]);
+ }} />
+
;
+}`,...(z=(q=h.parameters)==null?void 0:q.docs)==null?void 0:z.source}}};var B,G,J;v.parameters={...v.parameters,docs:{...(B=v.parameters)==null?void 0:B.docs,source:{originalSource:`() => {
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: '1',
+ ports: makeFakePorts('1')
+ }, {
+ id: '2',
+ text: '2',
+ ports: makeFakePorts('2')
+ }, {
+ id: '3',
+ text: '3',
+ ports: makeFakePorts('3')
+ }, {
+ id: '4',
+ text: '4',
+ ports: makeFakePorts('4')
+ }, {
+ id: '5',
+ text: '5',
+ ports: makeFakePorts('5')
+ }, {
+ id: '6',
+ text: '6',
+ ports: makeFakePorts('6')
+ }]);
+ const [edges, setEdges] = useState([makeFakeEdgeWithPorts('1', '2'), makeFakeEdgeWithPorts('2', '3'), makeFakeEdgeWithPorts('2', '4'), makeFakeEdgeWithPorts('2', '5'), makeFakeEdgeWithPorts('5', '6')]);
+ return
+ } onNodeLinkCheck={(_event, from: NodeData, to: NodeData) => {
+ if (from.id === to.id) {
+ return false;
+ }
+ if (hasLink(edges, from, to)) {
+ return false;
+ }
+ return true;
+ }} onNodeLink={(event, from, to) => {
+ if (event.dragType === 'node') {
+ // TODO: Need to make handle ports
+ const result = removeAndUpsertNodes(nodes, edges, from);
+ setEdges([...result.edges, makeFakeEdgeWithPorts(to.id, from.id)]);
+ } else if (event.dragType === 'port') {
+ setEdges([...edges, makeFakeEdgeWithPorts(from.id, to.id)]);
+ }
+ }} />
+
;
+}`,...(J=(G=v.parameters)==null?void 0:G.docs)==null?void 0:J.source}}};var K,Q,V;y.parameters={...y.parameters,docs:{...(K=y.parameters)==null?void 0:K.docs,source:{originalSource:`() => {
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: '1'
+ }, {
+ id: '2'
+ }, {
+ id: '2-1-1',
+ text: '2 > 1.1',
+ parent: '2'
+ }, {
+ id: '2-1-2',
+ text: '2 > 1.2',
+ parent: '2'
+ }, {
+ id: '2-1-3',
+ text: '2 > 1.3',
+ parent: '2'
+ }, {
+ id: '2-1-4',
+ text: '2 > 1.4',
+ parent: '2'
+ }, {
+ id: '2-2-1',
+ parent: '2'
+ }, {
+ id: '2-2-1-1',
+ text: '2 > 2.1 > 1.1',
+ parent: '2-2-1'
+ }, {
+ id: '3',
+ text: '3'
+ }]);
+ const [edges, setEdges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }, {
+ id: '2-1-1>2-1-2',
+ from: '2-1-1',
+ to: '2-1-2',
+ parent: '2'
+ }, {
+ id: '2-1-1>2-1-3',
+ from: '2-1-1',
+ to: '2-1-3',
+ parent: '2'
+ }, {
+ id: '2-1-2>2-2-1',
+ from: '2-1-2',
+ to: '2-2-1',
+ parent: '2'
+ }, {
+ id: '2-1-3>2-1-4',
+ from: '2-1-3',
+ to: '2-1-4',
+ parent: '2'
+ }, {
+ id: '2-3',
+ from: '2',
+ to: '3'
+ }]);
+ return
+
;
+}`,...(V=(Q=y.parameters)==null?void 0:Q.docs)==null?void 0:V.source}}};const ce=["NodeOnlyDrag","PortOnlyDrag","MultiPortOnlyDrag","AllDrag","NodeRearranging","NodeRearrangingUpsert","NodePortRearranging","NestedNodeRearranging"];export{N as AllDrag,x as MultiPortOnlyDrag,y as NestedNodeRearranging,c as NodeOnlyDrag,v as NodePortRearranging,k as NodeRearranging,h as NodeRearrangingUpsert,u as PortOnlyDrag,ce as __namedExportsOrder,fe as default};
+//# sourceMappingURL=Drag.stories-006fce37.js.map
diff --git a/assets/Drag.stories-006fce37.js.map b/assets/Drag.stories-006fce37.js.map
new file mode 100644
index 0000000..0b989f8
--- /dev/null
+++ b/assets/Drag.stories-006fce37.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Drag.stories-006fce37.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/assets/Edge.stories-7f912866.js b/assets/Edge.stories-7f912866.js
new file mode 100644
index 0000000..69b44d0
--- /dev/null
+++ b/assets/Edge.stories-7f912866.js
@@ -0,0 +1,266 @@
+import{j as o}from"./jsx-runtime-9c4ae004.js";import{r as i}from"./index-1b03fe98.js";import{C as r,N as h,E as u,M as Z,a as ee,I as oe,L as te,P as ne,R as se,A as C}from"./Icon-81c21a65.js";import"./IntersectionQuery-9432d399.js";import{u as X,r as Y}from"./crudHelpers-031fd461.js";import"./index-6fd5a17b.js";import"./_commonjs-dynamic-modules-302442b1.js";const ue={title:"Demos/Edges",component:r,subcomponents:{Node:h,Edge:u,MarkerArrow:Z,Arrow:ee,Icon:oe,Label:te,Port:ne,Remove:se,Add:C}},m=()=>{const[n,s]=i.useState([{id:"1",text:"Node 1"},{id:"2",text:"Node 2"}]),[a,g]=i.useState([{id:"1-2",from:"1",to:"2"}]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{nodes:n,edges:a,edge:o.jsx(u,{add:o.jsx(C,{hidden:!1}),onAdd:(l,c)=>{const e=`node-${Math.random()}`,d=X(n,a,c,{id:e,text:e});s(d.nodes),g(d.edges)}}),onLayoutChange:l=>console.log("Layout",l)})})},v=()=>{const[n,s]=i.useState([{id:"1",text:"Node 1"},{id:"2",text:"Node 2"}]),[a,g]=i.useState([{id:"1-2",from:"1",to:"2"}]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{nodes:n,edges:a,edge:o.jsx(u,{add:o.jsx(C,{hidden:!1}),upsertable:!1,onAdd:(l,c)=>{const e=`node-${Math.random()}`,d=X(n,a,c,{id:e,text:e});s(d.nodes),g(d.edges)}}),onLayoutChange:l=>console.log("Layout",l)})})},p=()=>{const[n]=i.useState([{id:"1",text:"Node 1"},{id:"2",text:"Node 2"}]),[s]=i.useState([{id:"1-2",from:"1",to:"2"}]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{nodes:n,edges:s,edge:o.jsx(u,{selectable:!1}),onLayoutChange:a=>console.log("Layout",a)})})},N=()=>{const[n,s]=i.useState(["1","1-2"]),[a,g]=i.useState([{id:"1",text:"Node 1"},{id:"2",text:"Node 2"},{id:"3",text:"Node 3"}]),[l,c]=i.useState([{id:"1-2",from:"1",to:"2"},{id:"2-3",from:"2",to:"3"}]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{nodes:a,edges:l,selections:n,node:o.jsx(h,{onClick:(e,t)=>{console.log("Selecting Node",e,t),s([t.id])},onRemove:(e,t)=>{console.log("Removing Node",e,t);const d=Y(a,l,t);c(d.edges),g(d.nodes),s([])}}),edge:o.jsx(u,{onClick:(e,t)=>{console.log("Selecting Edge",e,t),s([t.id])},onRemove:(e,t)=>{console.log("Removing Edge",e,t),c(l.filter(d=>d.id!==t.id)),s([])}}),onCanvasClick:e=>{console.log("Canvas Clicked",e),s([])},onLayoutChange:e=>console.log("Layout",e)})})},x=()=>{const[n,s]=i.useState(["1-2"]),[a,g]=i.useState([{id:"1",text:"Node 1"},{id:"2",text:"Node 2"},{id:"3",text:"Node 3"}]),[l,c]=i.useState([{id:"1-2",from:"1",to:"2"},{id:"2-3",from:"2",to:"3"}]);return o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{nodes:a,edges:l,selections:n,node:o.jsx(h,{removable:!1,onClick:(e,t)=>{console.log("Selecting Node",e,t),s([t.id])},onRemove:(e,t)=>{console.log("Removing Node",e,t);const d=Y(a,l,t);c(d.edges),g(d.nodes),s([])}}),edge:o.jsx(u,{removable:!1,onClick:(e,t)=>{console.log("Selecting Edge",e,t),s([t.id])},onRemove:(e,t)=>{console.log("Removing Edge",e,t),c(l.filter(d=>d.id!==t.id)),s([])}}),onCanvasClick:e=>{console.log("Canvas Clicked",e),s([])},onLayoutChange:e=>console.log("Layout",e)})})},y=()=>o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{arrow:null,nodes:[{id:"1",text:"1"},{id:"2",text:"2"},{id:"3",text:"3"}],edges:[{id:"1-2",from:"1",to:"2",selectionDisabled:!0},{id:"2-3",from:"2",to:"3",disabled:!0},{id:"1-3",from:"1",to:"3"}],onLayoutChange:n=>console.log("Layout",n)})}),b=()=>o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{arrow:null,nodes:[{id:"1",text:"1"},{id:"2",text:"2"}],edges:[{id:"1-2",from:"1",to:"2"}],onLayoutChange:n=>console.log("Layout",n)})}),f=()=>o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{nodes:[{id:"1",text:"Node 1"},{id:"2",text:"Node 2"}],edges:[],onLayoutChange:n=>console.log("Layout",n)})}),S=()=>o.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:o.jsx(r,{nodes:[{id:"1",text:"Node 1"},{id:"2",text:"Node 2"}],edges:[{id:"1-2",from:"1",to:"2",text:"Label 1-2"}],onLayoutChange:n=>console.log("Layout",n)})});var L,E,j;m.parameters={...m.parameters,docs:{...(L=m.parameters)==null?void 0:L.docs,source:{originalSource:`() => {
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: 'Node 1'
+ }, {
+ id: '2',
+ text: 'Node 2'
+ }]);
+ const [edges, setEdges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }]);
+ return
+ } onAdd={(event, edge) => {
+ const id = \`node-\${Math.random()}\`;
+ const newNode = {
+ id,
+ text: id
+ };
+ const results = upsertNode(nodes, edges, edge, newNode);
+ setNodes(results.nodes);
+ setEdges(results.edges);
+ }} />} onLayoutChange={layout => console.log('Layout', layout)} />
+
;
+}`,...(j=(E=m.parameters)==null?void 0:E.docs)==null?void 0:j.source}}};var R,k,A;v.parameters={...v.parameters,docs:{...(R=v.parameters)==null?void 0:R.docs,source:{originalSource:`() => {
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: 'Node 1'
+ }, {
+ id: '2',
+ text: 'Node 2'
+ }]);
+ const [edges, setEdges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }]);
+ return
+ } upsertable={false} onAdd={(event, edge) => {
+ const id = \`node-\${Math.random()}\`;
+ const newNode = {
+ id,
+ text: id
+ };
+ const results = upsertNode(nodes, edges, edge, newNode);
+ setNodes(results.nodes);
+ setEdges(results.edges);
+ }} />} onLayoutChange={layout => console.log('Layout', layout)} />
+
;
+}`,...(A=(k=v.parameters)==null?void 0:k.docs)==null?void 0:A.source}}};var w,D,M;p.parameters={...p.parameters,docs:{...(w=p.parameters)==null?void 0:w.docs,source:{originalSource:`() => {
+ const [nodes] = useState([{
+ id: '1',
+ text: 'Node 1'
+ }, {
+ id: '2',
+ text: 'Node 2'
+ }]);
+ const [edges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }]);
+ return
+ } onLayoutChange={layout => console.log('Layout', layout)} />
+
;
+}`,...(M=(D=p.parameters)==null?void 0:D.docs)==null?void 0:M.source}}};var U,$,_;N.parameters={...N.parameters,docs:{...(U=N.parameters)==null?void 0:U.docs,source:{originalSource:`() => {
+ const [selections, setSelections] = useState(['1', '1-2']);
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: 'Node 1'
+ }, {
+ id: '2',
+ text: 'Node 2'
+ }, {
+ id: '3',
+ text: 'Node 3'
+ }]);
+ const [edges, setEdges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }, {
+ id: '2-3',
+ from: '2',
+ to: '3'
+ }]);
+ return
+
;
+}`,...(_=($=N.parameters)==null?void 0:$.docs)==null?void 0:_.source}}};var I,P,O;x.parameters={...x.parameters,docs:{...(I=x.parameters)==null?void 0:I.docs,source:{originalSource:`() => {
+ const [selections, setSelections] = useState(['1-2']);
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: 'Node 1'
+ }, {
+ id: '2',
+ text: 'Node 2'
+ }, {
+ id: '3',
+ text: 'Node 3'
+ }]);
+ const [edges, setEdges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }, {
+ id: '2-3',
+ from: '2',
+ to: '3'
+ }]);
+ return
+
;
+}`,...(O=(P=x.parameters)==null?void 0:P.docs)==null?void 0:O.source}}};var q,z,B;y.parameters={...y.parameters,docs:{...(q=y.parameters)==null?void 0:q.docs,source:{originalSource:`() =>
+
`,...(B=(z=y.parameters)==null?void 0:z.docs)==null?void 0:B.source}}};var F,G,H;b.parameters={...b.parameters,docs:{...(F=b.parameters)==null?void 0:F.docs,source:{originalSource:`() =>
+
`,...(H=(G=b.parameters)==null?void 0:G.docs)==null?void 0:H.source}}};var J,K,Q;f.parameters={...f.parameters,docs:{...(J=f.parameters)==null?void 0:J.docs,source:{originalSource:`() =>
+
`,...(Q=(K=f.parameters)==null?void 0:K.docs)==null?void 0:Q.source}}};var T,V,W;S.parameters={...S.parameters,docs:{...(T=S.parameters)==null?void 0:T.docs,source:{originalSource:`() =>
+
`,...(W=(V=S.parameters)==null?void 0:V.docs)==null?void 0:W.source}}};const me=["Adding","NotUpsertable","NotSelectable","Removeable","NotRemoveable","Disabled","NoArrows","NoEdges","Labels"];export{m as Adding,y as Disabled,S as Labels,b as NoArrows,f as NoEdges,x as NotRemoveable,p as NotSelectable,v as NotUpsertable,N as Removeable,me as __namedExportsOrder,ue as default};
+//# sourceMappingURL=Edge.stories-7f912866.js.map
diff --git a/assets/Edge.stories-7f912866.js.map b/assets/Edge.stories-7f912866.js.map
new file mode 100644
index 0000000..8263344
--- /dev/null
+++ b/assets/Edge.stories-7f912866.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Edge.stories-7f912866.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/assets/Editor.stories-19410bbd.js b/assets/Editor.stories-19410bbd.js
new file mode 100644
index 0000000..0a55a0a
--- /dev/null
+++ b/assets/Editor.stories-19410bbd.js
@@ -0,0 +1,186 @@
+import{j as t}from"./jsx-runtime-9c4ae004.js";import{r as s}from"./index-1b03fe98.js";import{C as v,N as f,E as y,M as S,a as j,I as C,L as M,P as A,R as L,A as I,m as d,c as P}from"./Icon-81c21a65.js";import"./IntersectionQuery-9432d399.js";import{a as z}from"./crudHelpers-031fd461.js";import{u as B}from"./use-drag-controls-c572fac6.js";import"./index-6fd5a17b.js";import"./_commonjs-dynamic-modules-302442b1.js";const H={title:"Demos/Editor",component:v,subcomponents:{Node:f,Edge:y,MarkerArrow:S,Arrow:j,Icon:C,Label:M,Port:A,Remove:L,Add:I}},n=()=>{const i=B(),[D,r]=s.useState(null),[a,c]=s.useState(null),[N,l]=s.useState(!1),[g,E]=s.useState([{id:"1-2",from:"1",to:"2"}]),[u,k]=s.useState([{id:"1",text:"1"},{id:"2",text:"2"}]),p=(e,o)=>{console.log("Start of Dragging",e,o),c(o),i.start(e,{snapToCursor:!0})},w=e=>{if(console.log("End of Dragging",e),N){const o=`${a}-${Math.floor(Math.random()*100)+1}`,m=z(u,g,{id:o,text:o},D);k(m.nodes),E(m.edges)}l(!1),c(null),r(null)};return t.jsxs("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0},children:[t.jsx("style",{children:`
+ .left {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 150px;
+ background: #272626;
+ color: white;
+ padding: 20px;
+ display: flex;
+ }
+ .right {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 150px;
+ right: 0;
+ }
+ .block {
+ height: 50px;
+ width: 50px;
+ cursor: grab;
+ background: black;
+ margin-right: 10px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 5px;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ flex: 1;
+ }
+ .dragger {
+ z-index: 999;
+ pointer-events: none;
+ user-select: none;
+ cursor: grabbing;
+ height: 70px;
+ width: 150px;
+ }
+ .dragInner {
+ pointer-events: none;
+ margin-left: 80px;
+ border-radius: 5px;
+ background: black;
+ border: solid 1px #00c5be;
+ height: 40px;
+ width: 40px;
+ color: white;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ `}),t.jsxs("div",{className:"left",children:[t.jsx(d.div,{className:"block",onMouseDown:e=>p(e,"1"),children:"Block 1"}),t.jsx(d.div,{className:"block",onMouseDown:e=>p(e,"2"),children:"Block 2"})]}),t.jsx("div",{className:"right",children:t.jsx(v,{nodes:u,edges:g,node:t.jsx(f,{onEnter:(e,o)=>r(o),onLeave:(e,o)=>r(null)}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onLayoutChange:e=>console.log("Layout",e)})}),t.jsx(P,{children:t.jsx(d.div,{drag:!0,dragControls:i,className:"dragger",onDragEnd:w,children:a&&t.jsx("div",{className:"dragInner",children:a})})})]})};var x,b,h;n.parameters={...n.parameters,docs:{...(x=n.parameters)==null?void 0:x.docs,source:{originalSource:`() => {
+ const dragControls = useDragControls();
+ const [enteredNode, setEnteredNode] = useState(null);
+ const [activeDrag, setActiveDrag] = useState(null);
+ const [droppable, setDroppable] = useState(false);
+ const [edges, setEdges] = useState([{
+ id: '1-2',
+ from: '1',
+ to: '2'
+ }]);
+ const [nodes, setNodes] = useState([{
+ id: '1',
+ text: '1'
+ }, {
+ id: '2',
+ text: '2'
+ }]);
+ const onDragStart = (event, data) => {
+ console.log('Start of Dragging', event, data);
+ setActiveDrag(data);
+ dragControls.start(event, {
+ snapToCursor: true
+ });
+ };
+ const onDragEnd = event => {
+ console.log('End of Dragging', event);
+ if (droppable) {
+ const id = \`\${activeDrag}-\${Math.floor(Math.random() * (100 - 1 + 1)) + 1}\`;
+ const result = addNodeAndEdge(nodes, edges, {
+ id,
+ text: id
+ }, enteredNode);
+ setNodes(result.nodes);
+ setEdges(result.edges);
+ }
+ setDroppable(false);
+ setActiveDrag(null);
+ setEnteredNode(null);
+ };
+ return
+
+
+ onDragStart(event, '1')}>
+ Block 1
+
+ onDragStart(event, '2')}>
+ Block 2
+
+
+
+
+
+
+ {activeDrag &&
+ {activeDrag}
+
}
+
+
+
;
+}`,...(h=(b=n.parameters)==null?void 0:b.docs)==null?void 0:h.source}}};const J=["Simple"];export{n as Simple,J as __namedExportsOrder,H as default};
+//# sourceMappingURL=Editor.stories-19410bbd.js.map
diff --git a/assets/Editor.stories-19410bbd.js.map b/assets/Editor.stories-19410bbd.js.map
new file mode 100644
index 0000000..15c2f02
--- /dev/null
+++ b/assets/Editor.stories-19410bbd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Editor.stories-19410bbd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/assets/Extending-3fdead41.js b/assets/Extending-3fdead41.js
new file mode 100644
index 0000000..d43b5d2
--- /dev/null
+++ b/assets/Extending-3fdead41.js
@@ -0,0 +1,171 @@
+import{j as e}from"./jsx-runtime-9c4ae004.js";import"./blocks-2646952b.js";import{u as d}from"./index-2ef8b458.js";import{M as s}from"./index-44920ba4.js";import"./index-1b03fe98.js";import"./iframe-983ca2ba.js";import"../sb-preview/runtime.js";import"./chunk-H6ZRF7XV-146ce0bc.js";import"./index-d475d2ea.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-6fd5a17b.js";import"./index-4d52b68d.js";import"./index-356e4a49.js";function t(n){const o=Object.assign({h1:"h1",p:"p",strong:"strong",code:"code",blockquote:"blockquote",em:"em",a:"a",pre:"pre"},d(),n.components);return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Docs/Utils/Extending"}),`
+`,e.jsx(o.h1,{id:"extended-utils",children:"Extended utils"}),`
+`,e.jsx(o.p,{children:"The basic utils will not cover all use-cases."}),`
+`,e.jsxs(o.p,{children:["Below are a few examples of advanced use-cases ",e.jsxs(o.strong,{children:["with first-class support for connecting nodes through their ",e.jsx(o.code,{children:"ports"})]}),", built on top of the default built-in utils."]}),`
+`,e.jsxs(o.blockquote,{children:[`
+`,e.jsx(o.p,{children:e.jsxs(o.em,{children:["Courtesy of ",e.jsx(o.a,{href:"https://github.com/Vadorequest/poc-nextjs-reaflow/blob/91275644e9c3d0ed8cf7c2c80d49ef526b5e5069/src/utils/nodes.ts",target:"_blank",rel:"nofollow noopener noreferrer",children:"Vadorequest/poc-nextjs-reaflow"}),"."]})}),`
+`]}),`
+`,e.jsx(o.pre,{children:e.jsx(o.code,{className:"language-tsx",children:`import BaseEdgeData from '../types/BaseEdgeData';
+import BaseNodeData from '../types/BaseNodeData';
+import BasePortData from '../types/BasePortData';
+import { CanvasDataset } from '../types/CanvasDataset';
+import { createEdge } from './edges';
+import {
+ getDefaultFromPort,
+ getDefaultToPort,
+} from './ports';
+
+/**
+ * Add a node and optional edge, and automatically link their ports.
+ *
+ * Automatically connects the fromNode (left node) using its EAST port (right side) to the newNode (right node) using it's WEST port (left side).
+ *
+ * Similar to reaflow.addNodeAndEdge utility.
+ */
+export function addNodeAndEdgeThroughPorts(
+ nodes: BaseNodeData[],
+ edges: BaseEdgeData[],
+ newNode: BaseNodeData,
+ fromNode?: BaseNodeData,
+ toNode?: BaseNodeData,
+ fromPort?: BasePortData,
+ toPort?: BasePortData,
+): CanvasDataset {
+ // The default destination node is the newly created node
+ toNode = toNode || newNode;
+
+ const newEdge: BaseEdgeData = createEdge(
+ fromNode,
+ toNode,
+ getDefaultFromPort(fromNode, fromPort),
+ getDefaultToPort(toNode, toPort),
+ );
+
+ return {
+ nodes: [...nodes, newNode],
+ edges: [
+ ...edges,
+ ...(fromNode ?
+ [
+ newEdge,
+ ]
+ : []),
+ ],
+ };
+}
+
+/**
+ * Helper function for upserting a node in a edge (split the edge in 2 and put the node in between), and automatically link their ports.
+ *
+ * Automatically connects the left edge to the newNode using it's WEST port (left side).
+ * Automatically connects the right edge to the newNode using it's EAST port (right side).
+ *
+ * Similar to reaflow.upsertNode utility.
+ */
+export function upsertNodeThroughPorts(
+ nodes: BaseNodeData[],
+ edges: BaseEdgeData[],
+ edge: BaseEdgeData,
+ newNode: BaseNodeData,
+): CanvasDataset {
+ const oldEdgeIndex = edges.findIndex(e => e.id === edge.id);
+ const edgeBeforeNewNode = {
+ ...edge,
+ id: \`\${edge.from}-\${newNode.id}\`,
+ to: newNode.id,
+ };
+ const edgeAfterNewNode = {
+ ...edge,
+ id: \`\${newNode.id}-\${edge.to}\`,
+ from: newNode.id,
+ };
+
+ if (edge.fromPort && edge.toPort) {
+ const fromLeftNodeToWestPort: BasePortData | undefined = newNode?.ports?.find((port: BasePortData) => port?.side === 'WEST');
+ const fromRightNodeToEastPort: BasePortData | undefined = newNode?.ports?.find((port: BasePortData) => port?.side === 'EAST');
+
+ edgeBeforeNewNode.fromPort = edge.fromPort;
+ edgeBeforeNewNode.toPort = fromLeftNodeToWestPort?.id || \`\${newNode.id}-to\`;
+
+ edgeAfterNewNode.fromPort = fromRightNodeToEastPort?.id || \`\${newNode.id}-from\`;
+ edgeAfterNewNode.toPort = edge.toPort;
+ }
+
+ edges.splice(oldEdgeIndex, 1, edgeBeforeNewNode, edgeAfterNewNode);
+
+ return {
+ nodes: [...nodes, newNode],
+ edges: [...edges],
+ };
+}
+
+/**
+ * Removes a node between two edges and merges the two edges into one, and automatically link their ports.
+ *
+ * Similar to reaflow.removeAndUpsertNodes utility.
+ */
+export function removeAndUpsertNodesThroughPorts(
+ nodes: BaseNodeData[],
+ edges: BaseEdgeData[],
+ removeNodes: BaseNodeData | BaseNodeData[],
+ onNodeLinkCheck?: (
+ newNodes: BaseNodeData[],
+ newEdges: BaseEdgeData[],
+ from: BaseNodeData,
+ to: BaseNodeData,
+ port?: BasePortData,
+ ) => undefined | boolean,
+): CanvasDataset {
+ if (!Array.isArray(removeNodes)) {
+ removeNodes = [removeNodes];
+ }
+
+ const nodeIds = removeNodes.map((n) => n.id);
+ const newNodes = nodes.filter((n) => !nodeIds.includes(n.id));
+ const newEdges = edges.filter(
+ (e: BaseEdgeData) => !nodeIds.includes(e?.from as string) && !nodeIds.includes(e?.to as string),
+ );
+
+ for (const nodeId of nodeIds) {
+ const sourceEdges = edges.filter((e) => e.to === nodeId);
+ const targetEdges = edges.filter((e) => e.from === nodeId);
+
+ for (const sourceEdge of sourceEdges) {
+ for (const targetEdge of targetEdges) {
+ const sourceNode = nodes.find((n) => n.id === sourceEdge.from);
+ const targetNode = nodes.find((n) => n.id === targetEdge.to);
+
+ if (sourceNode && targetNode) {
+ const canLink = onNodeLinkCheck?.(
+ newNodes,
+ newEdges,
+ sourceNode,
+ targetNode,
+ );
+
+ if (canLink === undefined || canLink) {
+ const fromPort: BasePortData | undefined = sourceNode?.ports?.find((port: BasePortData) => port?.side === 'EAST');
+ const toPort: BasePortData | undefined = targetNode?.ports?.find((port: BasePortData) => port?.side === 'WEST');
+
+ newEdges.push({
+ id: \`\${sourceNode.id}-\${targetNode.id}\`,
+ from: sourceNode.id,
+ to: targetNode.id,
+ parent: sourceNode?.parent,
+ fromPort: fromPort?.id,
+ toPort: toPort?.id,
+ });
+ }
+ }
+ }
+ }
+ }
+
+ return {
+ edges: newEdges,
+ nodes: newNodes,
+ };
+}
+
+`})})]})}function D(n={}){const{wrapper:o}=Object.assign({},d(),n.components);return o?e.jsx(o,Object.assign({},n,{children:e.jsx(t,n)})):t(n)}export{D as default};
+//# sourceMappingURL=Extending-3fdead41.js.map
diff --git a/assets/Extending-3fdead41.js.map b/assets/Extending-3fdead41.js.map
new file mode 100644
index 0000000..9fe3532
--- /dev/null
+++ b/assets/Extending-3fdead41.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Extending-3fdead41.js","sources":["../../docs/Utils/Extending.mdx"],"sourcesContent":["import { Meta } from '@storybook/addon-docs/blocks';\n\n\n\n# Extended utils\n\nThe basic utils will not cover all use-cases.\n\nBelow are a few examples of advanced use-cases **with first-class support for connecting nodes through their `ports`**, built on top of the default built-in utils.\n\n> _Courtesy of [Vadorequest/poc-nextjs-reaflow](https://github.com/Vadorequest/poc-nextjs-reaflow/blob/91275644e9c3d0ed8cf7c2c80d49ef526b5e5069/src/utils/nodes.ts)._\n\n```tsx\nimport BaseEdgeData from '../types/BaseEdgeData';\nimport BaseNodeData from '../types/BaseNodeData';\nimport BasePortData from '../types/BasePortData';\nimport { CanvasDataset } from '../types/CanvasDataset';\nimport { createEdge } from './edges';\nimport {\n getDefaultFromPort,\n getDefaultToPort,\n} from './ports';\n\n/**\n * Add a node and optional edge, and automatically link their ports.\n *\n * Automatically connects the fromNode (left node) using its EAST port (right side) to the newNode (right node) using it's WEST port (left side).\n *\n * Similar to reaflow.addNodeAndEdge utility.\n */\nexport function addNodeAndEdgeThroughPorts(\n nodes: BaseNodeData[],\n edges: BaseEdgeData[],\n newNode: BaseNodeData,\n fromNode?: BaseNodeData,\n toNode?: BaseNodeData,\n fromPort?: BasePortData,\n toPort?: BasePortData,\n): CanvasDataset {\n // The default destination node is the newly created node\n toNode = toNode || newNode;\n\n const newEdge: BaseEdgeData = createEdge(\n fromNode,\n toNode,\n getDefaultFromPort(fromNode, fromPort),\n getDefaultToPort(toNode, toPort),\n );\n\n return {\n nodes: [...nodes, newNode],\n edges: [\n ...edges,\n ...(fromNode ?\n [\n newEdge,\n ]\n : []),\n ],\n };\n}\n\n/**\n * Helper function for upserting a node in a edge (split the edge in 2 and put the node in between), and automatically link their ports.\n *\n * Automatically connects the left edge to the newNode using it's WEST port (left side).\n * Automatically connects the right edge to the newNode using it's EAST port (right side).\n *\n * Similar to reaflow.upsertNode utility.\n */\nexport function upsertNodeThroughPorts(\n nodes: BaseNodeData[],\n edges: BaseEdgeData[],\n edge: BaseEdgeData,\n newNode: BaseNodeData,\n): CanvasDataset {\n const oldEdgeIndex = edges.findIndex(e => e.id === edge.id);\n const edgeBeforeNewNode = {\n ...edge,\n id: `${edge.from}-${newNode.id}`,\n to: newNode.id,\n };\n const edgeAfterNewNode = {\n ...edge,\n id: `${newNode.id}-${edge.to}`,\n from: newNode.id,\n };\n\n if (edge.fromPort && edge.toPort) {\n const fromLeftNodeToWestPort: BasePortData | undefined = newNode?.ports?.find((port: BasePortData) => port?.side === 'WEST');\n const fromRightNodeToEastPort: BasePortData | undefined = newNode?.ports?.find((port: BasePortData) => port?.side === 'EAST');\n\n edgeBeforeNewNode.fromPort = edge.fromPort;\n edgeBeforeNewNode.toPort = fromLeftNodeToWestPort?.id || `${newNode.id}-to`;\n\n edgeAfterNewNode.fromPort = fromRightNodeToEastPort?.id || `${newNode.id}-from`;\n edgeAfterNewNode.toPort = edge.toPort;\n }\n\n edges.splice(oldEdgeIndex, 1, edgeBeforeNewNode, edgeAfterNewNode);\n\n return {\n nodes: [...nodes, newNode],\n edges: [...edges],\n };\n}\n\n/**\n * Removes a node between two edges and merges the two edges into one, and automatically link their ports.\n *\n * Similar to reaflow.removeAndUpsertNodes utility.\n */\nexport function removeAndUpsertNodesThroughPorts(\n nodes: BaseNodeData[],\n edges: BaseEdgeData[],\n removeNodes: BaseNodeData | BaseNodeData[],\n onNodeLinkCheck?: (\n newNodes: BaseNodeData[],\n newEdges: BaseEdgeData[],\n from: BaseNodeData,\n to: BaseNodeData,\n port?: BasePortData,\n ) => undefined | boolean,\n): CanvasDataset {\n if (!Array.isArray(removeNodes)) {\n removeNodes = [removeNodes];\n }\n\n const nodeIds = removeNodes.map((n) => n.id);\n const newNodes = nodes.filter((n) => !nodeIds.includes(n.id));\n const newEdges = edges.filter(\n (e: BaseEdgeData) => !nodeIds.includes(e?.from as string) && !nodeIds.includes(e?.to as string),\n );\n\n for (const nodeId of nodeIds) {\n const sourceEdges = edges.filter((e) => e.to === nodeId);\n const targetEdges = edges.filter((e) => e.from === nodeId);\n\n for (const sourceEdge of sourceEdges) {\n for (const targetEdge of targetEdges) {\n const sourceNode = nodes.find((n) => n.id === sourceEdge.from);\n const targetNode = nodes.find((n) => n.id === targetEdge.to);\n\n if (sourceNode && targetNode) {\n const canLink = onNodeLinkCheck?.(\n newNodes,\n newEdges,\n sourceNode,\n targetNode,\n );\n\n if (canLink === undefined || canLink) {\n const fromPort: BasePortData | undefined = sourceNode?.ports?.find((port: BasePortData) => port?.side === 'EAST');\n const toPort: BasePortData | undefined = targetNode?.ports?.find((port: BasePortData) => port?.side === 'WEST');\n\n newEdges.push({\n id: `${sourceNode.id}-${targetNode.id}`,\n from: sourceNode.id,\n to: targetNode.id,\n parent: sourceNode?.parent,\n fromPort: fromPort?.id,\n toPort: toPort?.id,\n });\n }\n }\n }\n }\n }\n\n return {\n edges: newEdges,\n nodes: newNodes,\n };\n}\n\n```\n"],"names":["_createMdxContent","props","_components","_provideComponents","_jsxs","_Fragment","_jsx","Meta","MDXContent","MDXLayout"],"mappings":"0bAIA,SAASA,EAAkBC,EAAO,CAChC,MAAMC,EAAc,OAAO,OAAO,CAChC,GAAI,KACJ,EAAG,IACH,OAAQ,SACR,KAAM,OACN,WAAY,aACZ,GAAI,KACJ,EAAG,IACH,IAAK,KACN,EAAEC,EAAoB,EAAEF,EAAM,UAAU,EACzC,OAAOG,EAAAA,KAAMC,EAAAA,SAAW,CACtB,SAAU,CAACC,EAAI,IAACC,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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAClB,CAAO,CACP,CAAK,CAAC,CACN,CAAG,CACH,CACA,SAASM,EAAWP,EAAQ,GAAI,CAC9B,KAAM,CAAC,QAASQ,CAAS,EAAI,OAAO,OAAO,CAAE,EAAEN,EAAoB,EAAEF,EAAM,UAAU,EACrF,OAAOQ,EAAYH,EAAAA,IAAKG,EAAW,OAAO,OAAO,CAAE,EAAER,EAAO,CAC1D,SAAUK,EAAAA,IAAKN,EAAmBC,CAAK,CAC3C,CAAG,CAAC,EAAID,EAAkBC,CAAK,CAC/B"}
\ No newline at end of file
diff --git a/assets/GlobalScrollAreaStyles-DZEYMYDM-a718cfb3.js b/assets/GlobalScrollAreaStyles-DZEYMYDM-a718cfb3.js
new file mode 100644
index 0000000..5f1d47c
--- /dev/null
+++ b/assets/GlobalScrollAreaStyles-DZEYMYDM-a718cfb3.js
@@ -0,0 +1,8 @@
+import{R as o}from"./index-1b03fe98.js";import{G as s}from"./index-44920ba4.js";import"./iframe-983ca2ba.js";import"../sb-preview/runtime.js";import"./chunk-H6ZRF7XV-146ce0bc.js";import"./index-d475d2ea.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-6fd5a17b.js";import"./index-4d52b68d.js";import"./index-356e4a49.js";var a=r=>({".os-size-observer,\n.os-size-observer-listener":{direction:"inherit",pointerEvents:"none",overflow:"hidden",visibility:"hidden",boxSizing:"border-box"},".os-size-observer,\n.os-size-observer-listener,\n.os-size-observer-listener-item,\n.os-size-observer-listener-item-final":{writingMode:"horizontal-tb",position:"absolute",left:"0",top:"0"},".os-size-observer":{zIndex:-1,contain:"strict",display:"flex",flexDirection:"row",flexWrap:"nowrap",padding:"inherit",border:"inherit",boxSizing:"inherit",margin:"-133px",top:"0",right:"0",bottom:"0",left:"0",transform:"scale(0.1)"},".os-size-observer::before":{content:'""',flex:"none",boxSizing:"inherit",padding:"10px",width:"10px",height:"10px"},".os-size-observer-appear":{animation:"os-size-observer-appear-animation 1ms forwards"},".os-size-observer-listener":{boxSizing:"border-box",position:"relative",flex:"auto",padding:"inherit",border:"inherit",margin:"-133px",transform:"scale(10)"},".os-size-observer-listener.ltr":{marginRight:"-266px",marginLeft:"0"},".os-size-observer-listener.rtl":{marginLeft:"-266px",marginRight:"0"},".os-size-observer-listener:empty::before":{content:'""',width:"100%",height:"100%"},".os-size-observer-listener:empty::before, .os-size-observer-listener > .os-size-observer-listener-item":{display:"block",position:"relative",padding:"inherit",border:"inherit",boxSizing:"content-box",flex:"auto"},".os-size-observer-listener-scroll":{boxSizing:"border-box",display:"flex"},".os-size-observer-listener-item":{right:"0",bottom:"0",overflow:"hidden",direction:"ltr",flex:"none"},".os-size-observer-listener-item-final":{transition:"none"},"@keyframes os-size-observer-appear-animation":{from:{cursor:"auto"},to:{cursor:"none"}},".os-trinsic-observer":{flex:"none",boxSizing:"border-box",position:"relative",maxWidth:"0px",maxHeight:"1px",padding:"0",margin:"0",border:"none",overflow:"hidden",zIndex:-1,height:"0",top:"calc(100% + 1px)",contain:"strict"},".os-trinsic-observer:not(:empty)":{height:"calc(100% + 1px)",top:"-1px"},".os-trinsic-observer:not(:empty) > .os-size-observer":{width:"1000%",height:"1000%",minHeight:"1px",minWidth:"1px"},".os-environment":{"--os-custom-prop":"-1",position:"fixed",opacity:0,visibility:"hidden",overflow:"scroll",height:"200px",width:"200px",zIndex:"var(--os-custom-prop)"},".os-environment div":{width:"200%",height:"200%",margin:"10px 0"},".os-environment.os-environment-flexbox-glue":{display:"flex",flexDirection:"row",flexWrap:"nowrap",height:"auto",width:"auto",minHeight:"200px",minWidth:"200px"},".os-environment.os-environment-flexbox-glue div":{flex:"auto",width:"auto",height:"auto",maxHeight:"100%",maxWidth:"100%",margin:"0"},".os-environment.os-environment-flexbox-glue-max":{maxHeight:"200px"},".os-environment.os-environment-flexbox-glue-max div":{overflow:"visible"},".os-environment.os-environment-flexbox-glue-max div::before":{content:'""',display:"block",height:"999px",width:"999px"},".os-environment,\n[data-overlayscrollbars-viewport]":{msOverflowStyle:"scrollbar !important"},"[data-overlayscrollbars-initialize],\n[data-overlayscrollbars~=scrollbarHidden],\n[data-overlayscrollbars-viewport~=scrollbarHidden],\n.os-scrollbar-hidden.os-environment":{scrollbarWidth:"none !important"},"[data-overlayscrollbars-initialize]::-webkit-scrollbar,\n[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner,\n[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar,\n[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar-corner,\n[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar,\n[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner,\n.os-scrollbar-hidden.os-environment::-webkit-scrollbar,\n.os-scrollbar-hidden.os-environment::-webkit-scrollbar-corner":{WebkitAppearance:"none !important",appearance:"none !important",display:"none !important",width:"0 !important",height:"0 !important"},"[data-overlayscrollbars-initialize]":{overflow:"auto"},"html[data-overlayscrollbars],\nhtml.os-scrollbar-hidden,\nhtml.os-scrollbar-hidden > body":{boxSizing:"border-box",margin:"0",width:"100%",height:"100%"},"html[data-overlayscrollbars] > body":{overflow:"visible"},"[data-overlayscrollbars~=host]":{position:"relative"},"[data-overlayscrollbars~=host],\n[data-overlayscrollbars-padding]":{display:"flex",flexDirection:"row !important",flexWrap:"nowrap !important"},"[data-overlayscrollbars-padding],\n[data-overlayscrollbars-viewport]":{boxSizing:"inherit",position:"relative",flex:"auto !important",height:"auto",width:"100%",padding:"0",margin:"0",border:"none",zIndex:0,overflow:"hidden"},"[data-overlayscrollbars-viewport]":{"--os-vaw":"0","--os-vah":"0"},"[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]::before":{content:'""',position:"absolute",pointerEvents:"none",zIndex:-1,minWidth:"1px",minHeight:"1px",width:"var(--os-vaw)",height:"var(--os-vah)"},"[data-overlayscrollbars~=host],\n[data-overlayscrollbars~=viewport]":{overflow:"hidden"},"[data-overlayscrollbars~=overflowVisible],\n[data-overlayscrollbars-padding~=overflowVisible],\n[data-overlayscrollbars-viewport~=overflowVisible]":{overflow:"visible"},"[data-overlayscrollbars-overflow-x=hidden]":{overflowX:"hidden",overflowY:"hidden"},"[data-overlayscrollbars-overflow-x=scroll]":{overflowX:"scroll"},"[data-overlayscrollbars-overflow-y=scroll]":{overflowY:"scroll"},"[data-overlayscrollbars~=scrollbarPressed],\n[data-overlayscrollbars~=scrollbarPressed] [data-overlayscrollbars-viewport]":{scrollBehavior:"auto !important"},"[data-overlayscrollbars-content]":{boxSizing:"inherit"},"[data-overlayscrollbars-grid],\n[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]":{display:"grid",gridTemplate:"1fr/1fr"},"[data-overlayscrollbars-grid] > [data-overlayscrollbars-padding],\n[data-overlayscrollbars-grid] > [data-overlayscrollbars-viewport],\n[data-overlayscrollbars-grid] > [data-overlayscrollbars-padding] > [data-overlayscrollbars-viewport]":{height:"auto !important",width:"auto !important"},".os-scrollbar":{contain:["size layout","size layout style"],transition:"opacity 0.15s, visibility 0.15s, top 0.15s, right 0.15s, bottom 0.15s, left 0.15s",pointerEvents:"none",position:"absolute",opacity:0,visibility:"hidden","--os-size":"0","--os-padding-perpendicular":"0","--os-padding-axis":"0","--os-track-border-radius":"0","--os-track-bg":"none","--os-track-bg-hover":"none","--os-track-bg-active":"none","--os-track-border":"none","--os-track-border-hover":"none","--os-track-border-active":"none","--os-handle-border-radius":"0","--os-handle-bg":"none","--os-handle-bg-hover":"none","--os-handle-bg-active":"none","--os-handle-border":"none","--os-handle-border-hover":"none","--os-handle-border-active":"none","--os-handle-min-size":"33px","--os-handle-max-size":"none","--os-handle-perpendicular-size":"100%","--os-handle-perpendicular-size-hover":"100%","--os-handle-perpendicular-size-active":"100%","--os-handle-interactive-area-offset":"0"},"body > .os-scrollbar":{position:"fixed",zIndex:99999},".os-scrollbar-transitionless":{transition:"none"},".os-scrollbar-track":{position:"relative",direction:"ltr !important",padding:"0 !important",border:"none !important"},".os-scrollbar-handle":{position:"absolute"},".os-scrollbar-track,\n.os-scrollbar-handle":{pointerEvents:"none",width:"100%",height:"100%"},".os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,\n.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle":{pointerEvents:"auto",touchAction:"none"},".os-scrollbar-horizontal":{bottom:"0",left:"0",padding:"var(--os-padding-perpendicular) var(--os-padding-axis)",right:"var(--os-size)",height:"var(--os-size)"},".os-scrollbar-vertical":{top:"0",right:"0",padding:"var(--os-padding-axis) var(--os-padding-perpendicular)",bottom:"var(--os-size)",width:"var(--os-size)"},".os-scrollbar-rtl.os-scrollbar-horizontal":{right:"0"},".os-scrollbar-rtl.os-scrollbar-vertical":{right:"auto",left:"0"},".os-scrollbar-visible,\n.os-scrollbar-interaction.os-scrollbar-visible":{opacity:1,visibility:"visible"},".os-scrollbar-auto-hidden":{opacity:0,visibility:"hidden"},".os-scrollbar-unusable,\n.os-scrollbar-unusable *,\n.os-scrollbar-wheel,\n.os-scrollbar-wheel *":{pointerEvents:"none !important"},".os-scrollbar-unusable .os-scrollbar-handle":{opacity:"0 !important"},".os-scrollbar-horizontal .os-scrollbar-handle":{bottom:"0",minWidth:"var(--os-handle-min-size)",maxWidth:"var(--os-handle-max-size)",height:"var(--os-handle-perpendicular-size)",transition:"opacity 0.15s, background-color 0.15s, border-color 0.15s, height 0.15s"},".os-scrollbar-vertical .os-scrollbar-handle":{right:"0",minHeight:"var(--os-handle-min-size)",maxHeight:"var(--os-handle-max-size)",width:"var(--os-handle-perpendicular-size)",transition:"opacity 0.15s, background-color 0.15s, border-color 0.15s, width 0.15s"},".os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle":{right:"auto",left:"0"},".os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,\n.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl":{left:"0",right:"0"},".os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,\n.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl":{top:"0",bottom:"0"},".os-scrollbar .os-scrollbar-track":{border:"var(--os-track-border)",borderRadius:"var(--os-track-border-radius)",background:"var(--os-track-bg)",transition:"opacity 0.15s, background-color 0.15s, border-color 0.15s"},".os-scrollbar .os-scrollbar-track:hover":{border:"var(--os-track-border-hover)",background:"var(--os-track-bg-hover)"},".os-scrollbar .os-scrollbar-track:active":{border:"var(--os-track-border-active)",background:"var(--os-track-bg-active)"},".os-scrollbar .os-scrollbar-handle":{border:"var(--os-handle-border)",borderRadius:"var(--os-handle-border-radius)",background:r.textMutedColor,opacity:.5},".os-scrollbar .os-scrollbar-handle:before":{content:'""',position:"absolute",left:"0",right:"0",top:"0",bottom:"0",display:"block"},".os-scrollbar .os-scrollbar-handle:hover":{border:"var(--os-handle-border-hover)",opacity:.6},".os-scrollbar .os-scrollbar-handle:active":{border:"var(--os-handle-border-active)",background:"var(--os-handle-bg-active)"},".os-scrollbar-horizontal.os-scrollbar-rtl":{left:"var(--os-size)",right:"0"},".os-scrollbar-horizontal .os-scrollbar-handle:before":{top:"calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1)",bottom:"calc(var(--os-padding-perpendicular) * -1)"},".os-scrollbar-horizontal:hover .os-scrollbar-handle":{height:"var(--os-handle-perpendicular-size-hover)"},".os-scrollbar-horizontal:active .os-scrollbar-handle":{height:"var(--os-handle-perpendicular-size-active)"},".os-scrollbar-vertical .os-scrollbar-handle:before":{left:"calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1)",right:"calc(var(--os-padding-perpendicular) * -1)"},".os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before":{right:"calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1)",left:"calc(var(--os-padding-perpendicular) * -1)"},".os-scrollbar-vertical:hover .os-scrollbar-handle":{width:"var(--os-handle-perpendicular-size-hover)"},".os-scrollbar-vertical:active .os-scrollbar-handle":{width:"var(--os-handle-perpendicular-size-active)"},"[data-overlayscrollbars~=updating] > .os-scrollbar,\n.os-theme-none.os-scrollbar":{display:"none !important"},".os-theme-dark,\n.os-theme-light":{boxSizing:"border-box","--os-size":"10px","--os-padding-perpendicular":"2px","--os-padding-axis":"2px","--os-track-border-radius":"10px","--os-handle-interactive-area-offset":"4px","--os-handle-border-radius":"10px"},".os-theme-dark":{"--os-handle-bg":"rgba(0, 0, 0, 0.44)","--os-handle-bg-hover":"rgba(0, 0, 0, 0.55)","--os-handle-bg-active":"rgba(0, 0, 0, 0.66)"},".os-theme-light":{"--os-handle-bg":"rgba(255, 255, 255, 0.44)","--os-handle-bg-hover":"rgba(255, 255, 255, 0.55)","--os-handle-bg-active":"rgba(255, 255, 255, 0.66)"},".os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-handle, .os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-handle":{borderRadius:"10px"},".os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-track, .os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-track":{borderRadius:"10px"},".os-no-css-vars.os-theme-dark.os-scrollbar-horizontal, .os-no-css-vars.os-theme-light.os-scrollbar-horizontal":{padding:"2px 2px",right:"10px",height:"10px"},".os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl, .os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl":{left:"10px",right:"0"},".os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle, .os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle":{minWidth:"33px",maxWidth:"none"},".os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle:before, .os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle:before":{top:`calc((
+ 2px + 4px
+ ) * -1)`,bottom:"calc(2px * -1)"},".os-no-css-vars.os-theme-dark.os-scrollbar-vertical, .os-no-css-vars.os-theme-light.os-scrollbar-vertical":{padding:"2px 2px",bottom:"10px",width:"10px"},".os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle, .os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle":{minHeight:"33px",maxHeight:"none"},".os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle:before, .os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle:before":{left:`calc((
+ 2px + 4px
+ ) * -1)`,right:"calc(2px * -1)"},".os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before, .os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before":{right:`calc((
+ 2px + 4px
+ ) * -1)`,left:"calc(2px * -1)"},".os-no-css-vars.os-theme-dark .os-scrollbar-handle":{background:"rgba(0, 0, 0, 0.44)"},".os-no-css-vars.os-theme-dark:hover .os-scrollbar-handle":{background:"rgba(0, 0, 0, 0.55)"},".os-no-css-vars.os-theme-dark:active .os-scrollbar-handle":{background:"rgba(0, 0, 0, 0.66)"},".os-no-css-vars.os-theme-light .os-scrollbar-handle":{background:"rgba(255, 255, 255, 0.44)"},".os-no-css-vars.os-theme-light:hover .os-scrollbar-handle":{background:"rgba(255, 255, 255, 0.55)"},".os-no-css-vars.os-theme-light:active .os-scrollbar-handle":{background:"rgba(255, 255, 255, 0.66)"}}),e=()=>o.createElement(s,{styles:a}),g=e;export{g as default,a as getScrollAreaStyles};
+//# sourceMappingURL=GlobalScrollAreaStyles-DZEYMYDM-a718cfb3.js.map
diff --git a/assets/GlobalScrollAreaStyles-DZEYMYDM-a718cfb3.js.map b/assets/GlobalScrollAreaStyles-DZEYMYDM-a718cfb3.js.map
new file mode 100644
index 0000000..55c536b
--- /dev/null
+++ b/assets/GlobalScrollAreaStyles-DZEYMYDM-a718cfb3.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"GlobalScrollAreaStyles-DZEYMYDM-a718cfb3.js","sources":["../../node_modules/@storybook/components/dist/GlobalScrollAreaStyles-DZEYMYDM.mjs"],"sourcesContent":["import './chunk-NNAAFZ4U.mjs';\nimport React from 'react';\nimport { Global } from '@storybook/theming';\n\nvar getScrollAreaStyles=theme=>({\".os-size-observer,\\n.os-size-observer-listener\":{direction:\"inherit\",pointerEvents:\"none\",overflow:\"hidden\",visibility:\"hidden\",boxSizing:\"border-box\"},\".os-size-observer,\\n.os-size-observer-listener,\\n.os-size-observer-listener-item,\\n.os-size-observer-listener-item-final\":{writingMode:\"horizontal-tb\",position:\"absolute\",left:\"0\",top:\"0\"},\".os-size-observer\":{zIndex:-1,contain:\"strict\",display:\"flex\",flexDirection:\"row\",flexWrap:\"nowrap\",padding:\"inherit\",border:\"inherit\",boxSizing:\"inherit\",margin:\"-133px\",top:\"0\",right:\"0\",bottom:\"0\",left:\"0\",transform:\"scale(0.1)\"},\".os-size-observer::before\":{content:'\"\"',flex:\"none\",boxSizing:\"inherit\",padding:\"10px\",width:\"10px\",height:\"10px\"},\".os-size-observer-appear\":{animation:\"os-size-observer-appear-animation 1ms forwards\"},\".os-size-observer-listener\":{boxSizing:\"border-box\",position:\"relative\",flex:\"auto\",padding:\"inherit\",border:\"inherit\",margin:\"-133px\",transform:\"scale(10)\"},\".os-size-observer-listener.ltr\":{marginRight:\"-266px\",marginLeft:\"0\"},\".os-size-observer-listener.rtl\":{marginLeft:\"-266px\",marginRight:\"0\"},\".os-size-observer-listener:empty::before\":{content:'\"\"',width:\"100%\",height:\"100%\"},\".os-size-observer-listener:empty::before, .os-size-observer-listener > .os-size-observer-listener-item\":{display:\"block\",position:\"relative\",padding:\"inherit\",border:\"inherit\",boxSizing:\"content-box\",flex:\"auto\"},\".os-size-observer-listener-scroll\":{boxSizing:\"border-box\",display:\"flex\"},\".os-size-observer-listener-item\":{right:\"0\",bottom:\"0\",overflow:\"hidden\",direction:\"ltr\",flex:\"none\"},\".os-size-observer-listener-item-final\":{transition:\"none\"},\"@keyframes os-size-observer-appear-animation\":{from:{cursor:\"auto\"},to:{cursor:\"none\"}},\".os-trinsic-observer\":{flex:\"none\",boxSizing:\"border-box\",position:\"relative\",maxWidth:\"0px\",maxHeight:\"1px\",padding:\"0\",margin:\"0\",border:\"none\",overflow:\"hidden\",zIndex:-1,height:\"0\",top:\"calc(100% + 1px)\",contain:\"strict\"},\".os-trinsic-observer:not(:empty)\":{height:\"calc(100% + 1px)\",top:\"-1px\"},\".os-trinsic-observer:not(:empty) > .os-size-observer\":{width:\"1000%\",height:\"1000%\",minHeight:\"1px\",minWidth:\"1px\"},\".os-environment\":{\"--os-custom-prop\":\"-1\",position:\"fixed\",opacity:0,visibility:\"hidden\",overflow:\"scroll\",height:\"200px\",width:\"200px\",zIndex:\"var(--os-custom-prop)\"},\".os-environment div\":{width:\"200%\",height:\"200%\",margin:\"10px 0\"},\".os-environment.os-environment-flexbox-glue\":{display:\"flex\",flexDirection:\"row\",flexWrap:\"nowrap\",height:\"auto\",width:\"auto\",minHeight:\"200px\",minWidth:\"200px\"},\".os-environment.os-environment-flexbox-glue div\":{flex:\"auto\",width:\"auto\",height:\"auto\",maxHeight:\"100%\",maxWidth:\"100%\",margin:\"0\"},\".os-environment.os-environment-flexbox-glue-max\":{maxHeight:\"200px\"},\".os-environment.os-environment-flexbox-glue-max div\":{overflow:\"visible\"},\".os-environment.os-environment-flexbox-glue-max div::before\":{content:'\"\"',display:\"block\",height:\"999px\",width:\"999px\"},\".os-environment,\\n[data-overlayscrollbars-viewport]\":{msOverflowStyle:\"scrollbar !important\"},\"[data-overlayscrollbars-initialize],\\n[data-overlayscrollbars~=scrollbarHidden],\\n[data-overlayscrollbars-viewport~=scrollbarHidden],\\n.os-scrollbar-hidden.os-environment\":{scrollbarWidth:\"none !important\"},\"[data-overlayscrollbars-initialize]::-webkit-scrollbar,\\n[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner,\\n[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar,\\n[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar-corner,\\n[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar,\\n[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner,\\n.os-scrollbar-hidden.os-environment::-webkit-scrollbar,\\n.os-scrollbar-hidden.os-environment::-webkit-scrollbar-corner\":{WebkitAppearance:\"none !important\",appearance:\"none !important\",display:\"none !important\",width:\"0 !important\",height:\"0 !important\"},\"[data-overlayscrollbars-initialize]\":{overflow:\"auto\"},\"html[data-overlayscrollbars],\\nhtml.os-scrollbar-hidden,\\nhtml.os-scrollbar-hidden > body\":{boxSizing:\"border-box\",margin:\"0\",width:\"100%\",height:\"100%\"},\"html[data-overlayscrollbars] > body\":{overflow:\"visible\"},\"[data-overlayscrollbars~=host]\":{position:\"relative\"},\"[data-overlayscrollbars~=host],\\n[data-overlayscrollbars-padding]\":{display:\"flex\",flexDirection:\"row !important\",flexWrap:\"nowrap !important\"},\"[data-overlayscrollbars-padding],\\n[data-overlayscrollbars-viewport]\":{boxSizing:\"inherit\",position:\"relative\",flex:\"auto !important\",height:\"auto\",width:\"100%\",padding:\"0\",margin:\"0\",border:\"none\",zIndex:0,overflow:\"hidden\"},\"[data-overlayscrollbars-viewport]\":{\"--os-vaw\":\"0\",\"--os-vah\":\"0\"},\"[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]::before\":{content:'\"\"',position:\"absolute\",pointerEvents:\"none\",zIndex:-1,minWidth:\"1px\",minHeight:\"1px\",width:\"var(--os-vaw)\",height:\"var(--os-vah)\"},\"[data-overlayscrollbars~=host],\\n[data-overlayscrollbars~=viewport]\":{overflow:\"hidden\"},\"[data-overlayscrollbars~=overflowVisible],\\n[data-overlayscrollbars-padding~=overflowVisible],\\n[data-overlayscrollbars-viewport~=overflowVisible]\":{overflow:\"visible\"},\"[data-overlayscrollbars-overflow-x=hidden]\":{overflowX:\"hidden\",overflowY:\"hidden\"},\"[data-overlayscrollbars-overflow-x=scroll]\":{overflowX:\"scroll\"},\"[data-overlayscrollbars-overflow-y=scroll]\":{overflowY:\"scroll\"},\"[data-overlayscrollbars~=scrollbarPressed],\\n[data-overlayscrollbars~=scrollbarPressed] [data-overlayscrollbars-viewport]\":{scrollBehavior:\"auto !important\"},\"[data-overlayscrollbars-content]\":{boxSizing:\"inherit\"},\"[data-overlayscrollbars-grid],\\n[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]\":{display:\"grid\",gridTemplate:\"1fr/1fr\"},\"[data-overlayscrollbars-grid] > [data-overlayscrollbars-padding],\\n[data-overlayscrollbars-grid] > [data-overlayscrollbars-viewport],\\n[data-overlayscrollbars-grid] > [data-overlayscrollbars-padding] > [data-overlayscrollbars-viewport]\":{height:\"auto !important\",width:\"auto !important\"},\".os-scrollbar\":{contain:[\"size layout\",\"size layout style\"],transition:\"opacity 0.15s, visibility 0.15s, top 0.15s, right 0.15s, bottom 0.15s, left 0.15s\",pointerEvents:\"none\",position:\"absolute\",opacity:0,visibility:\"hidden\",\"--os-size\":\"0\",\"--os-padding-perpendicular\":\"0\",\"--os-padding-axis\":\"0\",\"--os-track-border-radius\":\"0\",\"--os-track-bg\":\"none\",\"--os-track-bg-hover\":\"none\",\"--os-track-bg-active\":\"none\",\"--os-track-border\":\"none\",\"--os-track-border-hover\":\"none\",\"--os-track-border-active\":\"none\",\"--os-handle-border-radius\":\"0\",\"--os-handle-bg\":\"none\",\"--os-handle-bg-hover\":\"none\",\"--os-handle-bg-active\":\"none\",\"--os-handle-border\":\"none\",\"--os-handle-border-hover\":\"none\",\"--os-handle-border-active\":\"none\",\"--os-handle-min-size\":\"33px\",\"--os-handle-max-size\":\"none\",\"--os-handle-perpendicular-size\":\"100%\",\"--os-handle-perpendicular-size-hover\":\"100%\",\"--os-handle-perpendicular-size-active\":\"100%\",\"--os-handle-interactive-area-offset\":\"0\"},\"body > .os-scrollbar\":{position:\"fixed\",zIndex:99999},\".os-scrollbar-transitionless\":{transition:\"none\"},\".os-scrollbar-track\":{position:\"relative\",direction:\"ltr !important\",padding:\"0 !important\",border:\"none !important\"},\".os-scrollbar-handle\":{position:\"absolute\"},\".os-scrollbar-track,\\n.os-scrollbar-handle\":{pointerEvents:\"none\",width:\"100%\",height:\"100%\"},\".os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,\\n.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle\":{pointerEvents:\"auto\",touchAction:\"none\"},\".os-scrollbar-horizontal\":{bottom:\"0\",left:\"0\",padding:\"var(--os-padding-perpendicular) var(--os-padding-axis)\",right:\"var(--os-size)\",height:\"var(--os-size)\"},\".os-scrollbar-vertical\":{top:\"0\",right:\"0\",padding:\"var(--os-padding-axis) var(--os-padding-perpendicular)\",bottom:\"var(--os-size)\",width:\"var(--os-size)\"},\".os-scrollbar-rtl.os-scrollbar-horizontal\":{right:\"0\"},\".os-scrollbar-rtl.os-scrollbar-vertical\":{right:\"auto\",left:\"0\"},\".os-scrollbar-visible,\\n.os-scrollbar-interaction.os-scrollbar-visible\":{opacity:1,visibility:\"visible\"},\".os-scrollbar-auto-hidden\":{opacity:0,visibility:\"hidden\"},\".os-scrollbar-unusable,\\n.os-scrollbar-unusable *,\\n.os-scrollbar-wheel,\\n.os-scrollbar-wheel *\":{pointerEvents:\"none !important\"},\".os-scrollbar-unusable .os-scrollbar-handle\":{opacity:\"0 !important\"},\".os-scrollbar-horizontal .os-scrollbar-handle\":{bottom:\"0\",minWidth:\"var(--os-handle-min-size)\",maxWidth:\"var(--os-handle-max-size)\",height:\"var(--os-handle-perpendicular-size)\",transition:\"opacity 0.15s, background-color 0.15s, border-color 0.15s, height 0.15s\"},\".os-scrollbar-vertical .os-scrollbar-handle\":{right:\"0\",minHeight:\"var(--os-handle-min-size)\",maxHeight:\"var(--os-handle-max-size)\",width:\"var(--os-handle-perpendicular-size)\",transition:\"opacity 0.15s, background-color 0.15s, border-color 0.15s, width 0.15s\"},\".os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle\":{right:\"auto\",left:\"0\"},\".os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,\\n.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl\":{left:\"0\",right:\"0\"},\".os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,\\n.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl\":{top:\"0\",bottom:\"0\"},\".os-scrollbar .os-scrollbar-track\":{border:\"var(--os-track-border)\",borderRadius:\"var(--os-track-border-radius)\",background:\"var(--os-track-bg)\",transition:\"opacity 0.15s, background-color 0.15s, border-color 0.15s\"},\".os-scrollbar .os-scrollbar-track:hover\":{border:\"var(--os-track-border-hover)\",background:\"var(--os-track-bg-hover)\"},\".os-scrollbar .os-scrollbar-track:active\":{border:\"var(--os-track-border-active)\",background:\"var(--os-track-bg-active)\"},\".os-scrollbar .os-scrollbar-handle\":{border:\"var(--os-handle-border)\",borderRadius:\"var(--os-handle-border-radius)\",background:theme.textMutedColor,opacity:.5},\".os-scrollbar .os-scrollbar-handle:before\":{content:'\"\"',position:\"absolute\",left:\"0\",right:\"0\",top:\"0\",bottom:\"0\",display:\"block\"},\".os-scrollbar .os-scrollbar-handle:hover\":{border:\"var(--os-handle-border-hover)\",opacity:.6},\".os-scrollbar .os-scrollbar-handle:active\":{border:\"var(--os-handle-border-active)\",background:\"var(--os-handle-bg-active)\"},\".os-scrollbar-horizontal.os-scrollbar-rtl\":{left:\"var(--os-size)\",right:\"0\"},\".os-scrollbar-horizontal .os-scrollbar-handle:before\":{top:\"calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1)\",bottom:\"calc(var(--os-padding-perpendicular) * -1)\"},\".os-scrollbar-horizontal:hover .os-scrollbar-handle\":{height:\"var(--os-handle-perpendicular-size-hover)\"},\".os-scrollbar-horizontal:active .os-scrollbar-handle\":{height:\"var(--os-handle-perpendicular-size-active)\"},\".os-scrollbar-vertical .os-scrollbar-handle:before\":{left:\"calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1)\",right:\"calc(var(--os-padding-perpendicular) * -1)\"},\".os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before\":{right:\"calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1)\",left:\"calc(var(--os-padding-perpendicular) * -1)\"},\".os-scrollbar-vertical:hover .os-scrollbar-handle\":{width:\"var(--os-handle-perpendicular-size-hover)\"},\".os-scrollbar-vertical:active .os-scrollbar-handle\":{width:\"var(--os-handle-perpendicular-size-active)\"},\"[data-overlayscrollbars~=updating] > .os-scrollbar,\\n.os-theme-none.os-scrollbar\":{display:\"none !important\"},\".os-theme-dark,\\n.os-theme-light\":{boxSizing:\"border-box\",\"--os-size\":\"10px\",\"--os-padding-perpendicular\":\"2px\",\"--os-padding-axis\":\"2px\",\"--os-track-border-radius\":\"10px\",\"--os-handle-interactive-area-offset\":\"4px\",\"--os-handle-border-radius\":\"10px\"},\".os-theme-dark\":{\"--os-handle-bg\":\"rgba(0, 0, 0, 0.44)\",\"--os-handle-bg-hover\":\"rgba(0, 0, 0, 0.55)\",\"--os-handle-bg-active\":\"rgba(0, 0, 0, 0.66)\"},\".os-theme-light\":{\"--os-handle-bg\":\"rgba(255, 255, 255, 0.44)\",\"--os-handle-bg-hover\":\"rgba(255, 255, 255, 0.55)\",\"--os-handle-bg-active\":\"rgba(255, 255, 255, 0.66)\"},\".os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-handle, .os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-handle\":{borderRadius:\"10px\"},\".os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-track, .os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-track\":{borderRadius:\"10px\"},\".os-no-css-vars.os-theme-dark.os-scrollbar-horizontal, .os-no-css-vars.os-theme-light.os-scrollbar-horizontal\":{padding:\"2px 2px\",right:\"10px\",height:\"10px\"},\".os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl, .os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl\":{left:\"10px\",right:\"0\"},\".os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle, .os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle\":{minWidth:\"33px\",maxWidth:\"none\"},\".os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle:before, .os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle:before\":{top:`calc((\n 2px + 4px\n ) * -1)`,bottom:\"calc(2px * -1)\"},\".os-no-css-vars.os-theme-dark.os-scrollbar-vertical, .os-no-css-vars.os-theme-light.os-scrollbar-vertical\":{padding:\"2px 2px\",bottom:\"10px\",width:\"10px\"},\".os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle, .os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle\":{minHeight:\"33px\",maxHeight:\"none\"},\".os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle:before, .os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle:before\":{left:`calc((\n 2px + 4px\n ) * -1)`,right:\"calc(2px * -1)\"},\".os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before, .os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before\":{right:`calc((\n 2px + 4px\n ) * -1)`,left:\"calc(2px * -1)\"},\".os-no-css-vars.os-theme-dark .os-scrollbar-handle\":{background:\"rgba(0, 0, 0, 0.44)\"},\".os-no-css-vars.os-theme-dark:hover .os-scrollbar-handle\":{background:\"rgba(0, 0, 0, 0.55)\"},\".os-no-css-vars.os-theme-dark:active .os-scrollbar-handle\":{background:\"rgba(0, 0, 0, 0.66)\"},\".os-no-css-vars.os-theme-light .os-scrollbar-handle\":{background:\"rgba(255, 255, 255, 0.44)\"},\".os-no-css-vars.os-theme-light:hover .os-scrollbar-handle\":{background:\"rgba(255, 255, 255, 0.55)\"},\".os-no-css-vars.os-theme-light:active .os-scrollbar-handle\":{background:\"rgba(255, 255, 255, 0.66)\"}}),GlobalScrollAreaStyles=()=>React.createElement(Global,{styles:getScrollAreaStyles}),GlobalScrollAreaStyles_default=GlobalScrollAreaStyles;\n\nexport { GlobalScrollAreaStyles_default as default, getScrollAreaStyles };\n"],"names":["getScrollAreaStyles","theme","GlobalScrollAreaStyles","React","Global","GlobalScrollAreaStyles_default"],"mappings":"mVAIG,IAACA,EAAoBC,IAAQ,CAAC,iDAAiD,CAAC,UAAU,UAAU,cAAc,OAAO,SAAS,SAAS,WAAW,SAAS,UAAU,YAAY,EAAE,2HAA2H,CAAC,YAAY,gBAAgB,SAAS,WAAW,KAAK,IAAI,IAAI,GAAG,EAAE,oBAAoB,CAAC,OAAO,GAAG,QAAQ,SAAS,QAAQ,OAAO,cAAc,MAAM,SAAS,SAAS,QAAQ,UAAU,OAAO,UAAU,UAAU,UAAU,OAAO,SAAS,IAAI,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AAQ,iBAAiB,EAAE,mCAAmC,CAAC,UAAU,aAAa,YAAY,OAAO,6BAA6B,MAAM,oBAAoB,MAAM,2BAA2B,OAAO,sCAAsC,MAAM,4BAA4B,MAAM,EAAE,iBAAiB,CAAC,iBAAiB,sBAAsB,uBAAuB,sBAAsB,wBAAwB,qBAAqB,EAAE,kBAAkB,CAAC,iBAAiB,4BAA4B,uBAAuB,4BAA4B,wBAAwB,2BAA2B,EAAE,oIAAoI,CAAC,aAAa,MAAM,EAAE,kIAAkI,CAAC,aAAa,MAAM,EAAE,gHAAgH,CAAC,QAAQ,UAAU,MAAM,OAAO,OAAO,MAAM,EAAE,kJAAkJ,CAAC,KAAK,OAAO,MAAM,GAAG,EAAE,0JAA0J,CAAC,SAAS,OAAO,SAAS,MAAM,EAAE,wKAAwK,CAAC,IAAI;AAAA;AAAA,uBAErvZ,OAAO,gBAAgB,EAAE,4GAA4G,CAAC,QAAQ,UAAU,OAAO,OAAO,MAAM,MAAM,EAAE,sJAAsJ,CAAC,UAAU,OAAO,UAAU,MAAM,EAAE,oKAAoK,CAAC,KAAK;AAAA;AAAA,uBAExhB,MAAM,gBAAgB,EAAE,sMAAsM,CAAC,MAAM;AAAA;AAAA,qBAEvO,KAAK,gBAAgB,EAAE,qDAAqD,CAAC,WAAW,qBAAqB,EAAE,2DAA2D,CAAC,WAAW,qBAAqB,EAAE,4DAA4D,CAAC,WAAW,qBAAqB,EAAE,sDAAsD,CAAC,WAAW,2BAA2B,EAAE,4DAA4D,CAAC,WAAW,2BAA2B,EAAE,6DAA6D,CAAC,WAAW,2BAA2B,CAAC,GAAGC,EAAuB,IAAIC,EAAM,cAAcC,EAAO,CAAC,OAAOJ,CAAmB,CAAC,EAAEK,EAA+BH","x_google_ignoreList":[0]}
\ No newline at end of file
diff --git a/assets/Graph-763b6e82.js b/assets/Graph-763b6e82.js
new file mode 100644
index 0000000..96201e7
--- /dev/null
+++ b/assets/Graph-763b6e82.js
@@ -0,0 +1,73 @@
+import{j as e}from"./jsx-runtime-9c4ae004.js";import"./blocks-2646952b.js";import{u as a}from"./index-2ef8b458.js";import{M as d}from"./index-44920ba4.js";import"./index-1b03fe98.js";import"./iframe-983ca2ba.js";import"../sb-preview/runtime.js";import"./chunk-H6ZRF7XV-146ce0bc.js";import"./index-d475d2ea.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-6fd5a17b.js";import"./index-4d52b68d.js";import"./index-356e4a49.js";function o(s){const n=Object.assign({h1:"h1",h2:"h2",p:"p",code:"code",pre:"pre"},a(),s.components);return e.jsxs(e.Fragment,{children:[e.jsx(d,{title:"Docs/Utils/Graph"}),`
+`,e.jsx(n.h1,{id:"graph-utils",children:"Graph Utils"}),`
+`,e.jsx(n.h2,{id:"detecting-circulars",children:"Detecting Circulars"}),`
+`,e.jsxs(n.p,{children:["The ",e.jsx(n.code,{children:"detectCircular"}),` function helps you determine if
+the source node will create a circular link if connected
+to the target node.`]}),`
+`,e.jsx(n.p,{children:"The signature for this looks like:"}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`detectCircular(
+ nodes: NodeData[],
+ edges: EdgeData[],
+ fromNode: NodeData,
+ toNode: NodeData
+) => boolean;
+`})}),`
+`,e.jsx(n.p,{children:"Below is an example usage:"}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`import { detectCircular } from 'reaflow';
+
+const has = detectCircular(nodes, edges, fromNode, toNode);
+if (!has) {
+ // Do something
+}
+`})}),`
+`,e.jsx(n.h2,{id:"parent-node-traversal",children:"Parent Node Traversal"}),`
+`,e.jsxs(n.p,{children:["The ",e.jsx(n.code,{children:"getParentsForNodeId"}),` function helps you find all the
+parent nodes for a given node id.`]}),`
+`,e.jsx(n.p,{children:"The signature for this looks like:"}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`getParentsForNodeId(
+ nodes: NodeData[],
+ edges: EdgeData[],
+ nodeId: string
+) => NodeData[];
+`})}),`
+`,e.jsx(n.p,{children:"Below is an example usage:"}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`import { getParentsForNodeId } from 'reaflow';
+
+const nodes = getParentsForNodeId(nodes, edges, node.id);
+`})}),`
+`,e.jsx(n.h2,{id:"has-link",children:"Has Link"}),`
+`,e.jsxs(n.p,{children:["The ",e.jsx(n.code,{children:"hasLink"}),` function helps you determine if
+the source node already has a link to the target node.`]}),`
+`,e.jsx(n.p,{children:"The signature for this looks like:"}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`hasLink(
+ edges: EdgeData[],
+ fromNode: NodeData,
+ toNode: NodeData
+) => boolean;
+`})}),`
+`,e.jsx(n.p,{children:"Below is an example usage:"}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`import { hasLink } from 'reaflow';
+
+const has = hasLink(edges, fromNode, toNode);
+if (!has) {
+ // Do something
+}
+`})}),`
+`,e.jsx(n.h2,{id:"get-edges-given-a-node",children:"Get Edges Given a Node"}),`
+`,e.jsxs(n.p,{children:["Similar to ",e.jsx(n.code,{children:"hasLink"})," the ",e.jsx(n.code,{children:"getEdgesByNode"}),` function will
+return all the edges given a node.`]}),`
+`,e.jsx(n.p,{children:"The signature looks like this:"}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`getEdgesByNode(
+ edges: EdgeData[],
+ node: NodeData,
+) => { all: EdgeData[], to: EdgeData[], from: EdgeData[] }
+`})}),`
+`,e.jsx(n.p,{children:"Below is an example usage:"}),`
+`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`import { getEdgesByNode } from 'reaflow';
+
+const { all, to, from } = getEdgesByNode(edges, node);
+if (!all.length) {
+ // Do something
+}
+`})})]})}function N(s={}){const{wrapper:n}=Object.assign({},a(),s.components);return n?e.jsx(n,Object.assign({},s,{children:e.jsx(o,s)})):o(s)}export{N as default};
+//# sourceMappingURL=Graph-763b6e82.js.map
diff --git a/assets/Graph-763b6e82.js.map b/assets/Graph-763b6e82.js.map
new file mode 100644
index 0000000..49d2939
--- /dev/null
+++ b/assets/Graph-763b6e82.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Graph-763b6e82.js","sources":["../../docs/Utils/Graph.mdx"],"sourcesContent":["import { Meta } from '@storybook/addon-docs/blocks';\n\n\n\n# Graph Utils\n\n## Detecting Circulars\nThe `detectCircular` function helps you determine if\nthe source node will create a circular link if connected\nto the target node.\n\nThe signature for this looks like:\n\n```js\ndetectCircular(\n nodes: NodeData[],\n edges: EdgeData[],\n fromNode: NodeData,\n toNode: NodeData\n) => boolean;\n```\n\nBelow is an example usage:\n\n```js\nimport { detectCircular } from 'reaflow';\n\nconst has = detectCircular(nodes, edges, fromNode, toNode);\nif (!has) {\n // Do something\n}\n```\n\n## Parent Node Traversal\nThe `getParentsForNodeId` function helps you find all the\nparent nodes for a given node id.\n\nThe signature for this looks like:\n\n```js\ngetParentsForNodeId(\n nodes: NodeData[],\n edges: EdgeData[],\n nodeId: string\n) => NodeData[];\n```\n\nBelow is an example usage:\n\n```js\nimport { getParentsForNodeId } from 'reaflow';\n\nconst nodes = getParentsForNodeId(nodes, edges, node.id);\n```\n\n## Has Link\nThe `hasLink` function helps you determine if\nthe source node already has a link to the target node.\n\nThe signature for this looks like:\n\n```js\nhasLink(\n edges: EdgeData[],\n fromNode: NodeData,\n toNode: NodeData\n) => boolean;\n```\n\nBelow is an example usage:\n\n```js\nimport { hasLink } from 'reaflow';\n\nconst has = hasLink(edges, fromNode, toNode);\nif (!has) {\n // Do something\n}\n```\n\n## Get Edges Given a Node\nSimilar to `hasLink` the `getEdgesByNode` function will\nreturn all the edges given a node.\n\nThe signature looks like this:\n\n```js\ngetEdgesByNode(\n edges: EdgeData[],\n node: NodeData,\n) => { all: EdgeData[], to: EdgeData[], from: EdgeData[] }\n```\n\nBelow is an example usage:\n\n```js\nimport { getEdgesByNode } from 'reaflow';\n\nconst { all, to, from } = getEdgesByNode(edges, node);\nif (!all.length) {\n // Do something\n}\n```\n"],"names":["_createMdxContent","props","_components","_provideComponents","_jsxs","_Fragment","_jsx","Meta","MDXContent","MDXLayout"],"mappings":"0bAIA,SAASA,EAAkBC,EAAO,CAChC,MAAMC,EAAc,OAAO,OAAO,CAChC,GAAI,KACJ,GAAI,KACJ,EAAG,IACH,KAAM,OACN,IAAK,KACN,EAAEC,EAAoB,EAAEF,EAAM,UAAU,EACzC,OAAOG,EAAAA,KAAMC,EAAAA,SAAW,CACtB,SAAU,CAACC,EAAI,IAACC,EAAM,CACpB,MAAO,kBACR,CAAA,EAAG;AAAA,EAAMD,MAAKJ,EAAY,GAAI,CAC7B,GAAI,cACJ,SAAU,aACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,GAAI,CAC7B,GAAI,sBACJ,SAAU,qBACX,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,EAAG,CAC7B,SAAU,CAAC,OAAQI,MAAKJ,EAAY,KAAM,CACxC,SAAU,gBACX,CAAA,EAAG;AAAA;AAAA,oBAAiH,CACtH,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,EAAG,CAC5B,SAAU,oCACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,IAAK,CAC9B,SAAUI,EAAAA,IAAKJ,EAAY,KAAM,CAC/B,UAAW,cACX,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAClB,CAAO,CACF,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,EAAG,CAC5B,SAAU,4BACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,IAAK,CAC9B,SAAUI,EAAAA,IAAKJ,EAAY,KAAM,CAC/B,UAAW,cACX,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAClB,CAAO,CACF,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,GAAI,CAC7B,GAAI,wBACJ,SAAU,uBACX,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,EAAG,CA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J,EAAY,GAAI,CAC7B,GAAI,yBACJ,SAAU,wBACX,CAAA,EAAG;AAAA,EAAME,OAAMF,EAAY,EAAG,CAC7B,SAAU,CAAC,cAAeI,MAAKJ,EAAY,KAAM,CAC/C,SAAU,SACX,CAAA,EAAG,QAASI,MAAKJ,EAAY,KAAM,CAClC,SAAU,gBACX,CAAA,EAAG;AAAA,mCAAoD,CACzD,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,EAAG,CAC5B,SAAU,gCACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,IAAK,CAC9B,SAAUI,EAAAA,IAAKJ,EAAY,KAAM,CAC/B,UAAW,cACX,SAAU;AAAA;AAAA;AAAA;AAAA,CAClB,CAAO,CACF,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,EAAG,CAC5B,SAAU,4BACX,CAAA,EAAG;AAAA,EAAMI,MAAKJ,EAAY,IAAK,CAC9B,SAAUI,EAAAA,IAAKJ,EAAY,KAAM,CAC/B,UAAW,cACX,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAClB,CAAO,CACP,CAAK,CAAC,CACN,CAAG,CACH,CACA,SAASM,EAAWP,EAAQ,GAAI,CAC9B,KAAM,CAAC,QAASQ,CAAS,EAAI,OAAO,OAAO,CAAE,EAAEN,EAAoB,EAAEF,EAAM,UAAU,EACrF,OAAOQ,EAAYH,EAAAA,IAAKG,EAAW,OAAO,OAAO,CAAE,EAAER,EAAO,CAC1D,SAAUK,EAAAA,IAAKN,EAAmBC,CAAK,CAC3C,CAAG,CAAC,EAAID,EAAkBC,CAAK,CAC/B"}
\ No newline at end of file
diff --git a/assets/Icon-81c21a65.js b/assets/Icon-81c21a65.js
new file mode 100644
index 0000000..2867c66
--- /dev/null
+++ b/assets/Icon-81c21a65.js
@@ -0,0 +1,72 @@
+import{j as At}from"./jsx-runtime-9c4ae004.js";import{r as Ee,g as OG,R as gO,c as Vcn}from"./index-1b03fe98.js";import{r as XDn}from"./index-6fd5a17b.js";import{c as uG}from"./_commonjs-dynamic-modules-302442b1.js";if(typeof window<"u"){var Gcn={get passive(){}};window.addEventListener("testPassive",null,Gcn),window.removeEventListener("testPassive",null,Gcn)}const YDn=Ee.createContext(null),QDn=typeof document<"u",psn=QDn?Ee.useLayoutEffect:Ee.useEffect;function JDn(d){const b=Ee.useRef(null);return b.current===null&&(b.current=d()),b.current}const ZDn=Ee.createContext({});function e$n(d){return Ee.useEffect(()=>()=>d(),[])}const n$n="production",t$n=typeof process>"u"||process.env===void 0?n$n:"production",zcn=new Set;function i$n(d,b,m){d||zcn.has(b)||(console.warn(b),m&&console.warn(m),zcn.add(b))}var r$n=function(){},wG=function(){};const msn=1/60*1e3,c$n=typeof performance<"u"?()=>performance.now():()=>Date.now(),vsn=typeof window<"u"?d=>window.requestAnimationFrame(d):d=>setTimeout(()=>d(c$n()),msn);function u$n(d){let b=[],m=[],v=0,E=!1,S=!1;const y=new WeakSet,$={schedule:(N,B=!1,H=!1)=>{const z=H&&E,Y=z?b:m;return B&&y.add(N),Y.indexOf(N)===-1&&(Y.push(N),z&&E&&(v=b.length)),N},cancel:N=>{const B=m.indexOf(N);B!==-1&&m.splice(B,1),y.delete(N)},process:N=>{if(E){S=!0;return}if(E=!0,[b,m]=[m,b],m.length=0,v=b.length,v)for(let B=0;B(d[b]=u$n(()=>pO=!0),d),{}),o$n=TO.reduce((d,b)=>{const m=DG[b];return d[b]=(v,E=!1,S=!1)=>(pO||l$n(),m.schedule(v,E,S)),d},{});TO.reduce((d,b)=>(d[b]=DG[b].cancel,d),{});TO.reduce((d,b)=>(d[b]=()=>DG[b].process(fO),d),{});const f$n=d=>DG[d].process(fO),ysn=d=>{pO=!1,fO.delta=S0e?msn:Math.max(Math.min(d-fO.timestamp,s$n),1),fO.timestamp=d,P0e=!0,TO.forEach(f$n),P0e=!1,pO&&(S0e=!1,vsn(ysn))},l$n=()=>{pO=!0,S0e=!0,P0e||vsn(ysn)};function ksn(){const d=Ee.useRef(!1);return psn(()=>(d.current=!0,()=>{d.current=!1}),[]),d}function a$n(){const d=ksn(),[b,m]=Ee.useState(0),v=Ee.useCallback(()=>{d.current&&m(b+1)},[b]);return[Ee.useCallback(()=>o$n.postRender(v),[v]),b]}class h$n extends Ee.Component{getSnapshotBeforeUpdate(b){const m=this.props.childRef.current;if(m&&b.isPresent&&!this.props.isPresent){const v=this.props.sizeRef.current;v.height=m.offsetHeight||0,v.width=m.offsetWidth||0,v.top=m.offsetTop,v.left=m.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function d$n({children:d,isPresent:b}){const m=Ee.useId(),v=Ee.useRef(null),E=Ee.useRef({width:0,height:0,top:0,left:0});return Ee.useInsertionEffect(()=>{const{width:S,height:y,top:$,left:N}=E.current;if(b||!v.current||!S||!y)return;v.current.dataset.motionPopId=m;const B=document.createElement("style");return document.head.appendChild(B),B.sheet&&B.sheet.insertRule(`
+ [data-motion-pop-id="${m}"] {
+ position: absolute !important;
+ width: ${S}px !important;
+ height: ${y}px !important;
+ top: ${$}px !important;
+ left: ${N}px !important;
+ }
+ `),()=>{document.head.removeChild(B)}},[b]),Ee.createElement(h$n,{isPresent:b,childRef:v,sizeRef:E},Ee.cloneElement(d,{ref:v}))}const s0e=({children:d,initial:b,isPresent:m,onExitComplete:v,custom:E,presenceAffectsLayout:S,mode:y})=>{const $=JDn(b$n),N=Ee.useId(),B=Ee.useMemo(()=>({id:N,initial:b,isPresent:m,custom:E,onExitComplete:H=>{$.set(H,!0);for(const z of $.values())if(!z)return;v&&v()},register:H=>($.set(H,!1),()=>$.delete(H))}),S?void 0:[m]);return Ee.useMemo(()=>{$.forEach((H,z)=>$.set(z,!1))},[m]),Ee.useEffect(()=>{!m&&!$.size&&v&&v()},[m]),y==="popLayout"&&(d=Ee.createElement(d$n,{isPresent:m},d)),Ee.createElement(YDn.Provider,{value:B},d)};function b$n(){return new Map}const wE=d=>d.key||"";function w$n(d,b){d.forEach(m=>{const v=wE(m);b.set(v,m)})}function g$n(d){const b=[];return Ee.Children.forEach(d,m=>{Ee.isValidElement(m)&&b.push(m)}),b}const p$n=({children:d,custom:b,initial:m=!0,onExitComplete:v,exitBeforeEnter:E,presenceAffectsLayout:S=!0,mode:y="sync"})=>{E&&(y="wait",i$n(!1,"Replace exitBeforeEnter with mode='wait'"));let[$]=a$n();const N=Ee.useContext(ZDn).forceRender;N&&($=N);const B=ksn(),H=g$n(d);let z=H;const Y=new Set,Z=Ee.useRef(z),J=Ee.useRef(new Map).current,qe=Ee.useRef(!0);if(psn(()=>{qe.current=!1,w$n(H,J),Z.current=z}),e$n(()=>{qe.current=!0,J.clear(),Y.clear()}),qe.current)return Ee.createElement(Ee.Fragment,null,z.map(Ue=>Ee.createElement(s0e,{key:wE(Ue),isPresent:!0,initial:m?void 0:!1,presenceAffectsLayout:S,mode:y},Ue)));z=[...z];const on=Z.current.map(wE),bn=H.map(wE),xn=on.length;for(let Ue=0;Ue{if(bn.indexOf(Ue)!==-1)return;const mn=J.get(Ue);if(!mn)return;const bt=on.indexOf(Ue),_t=()=>{J.delete(Ue),Y.delete(Ue);const Mi=Z.current.findIndex(li=>li.key===Ue);if(Z.current.splice(Mi,1),!Y.size){if(Z.current=H,B.current===!1)return;$(),v&&v()}};z.splice(bt,0,Ee.createElement(s0e,{key:wE(mn),isPresent:!1,onExitComplete:_t,custom:b,presenceAffectsLayout:S,mode:y},mn))}),z=z.map(Ue=>{const mn=Ue.key;return Y.has(mn)?Ue:Ee.createElement(s0e,{key:wE(Ue),isPresent:!0,presenceAffectsLayout:S,mode:y},Ue)}),t$n!=="production"&&y==="wait"&&z.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),Ee.createElement(Ee.Fragment,null,Y.size?z:z.map(Ue=>Ee.cloneElement(Ue)))};var jsn={exports:{}};/*!
+ Copyright (c) 2018 Jed Watson.
+ Licensed under the MIT License (MIT), see
+ http://jedwatson.github.io/classnames
+*/(function(d){(function(){var b={}.hasOwnProperty;function m(){for(var v=[],E=0;E=0)return 1;return 0}();function y$n(d){var b=!1;return function(){b||(b=!0,window.Promise.resolve().then(function(){b=!1,d()}))}}function k$n(d){var b=!1;return function(){b||(b=!0,setTimeout(function(){b=!1,d()},v$n))}}var j$n=CO&&window.Promise,E$n=j$n?y$n:k$n;function Esn(d){var b={};return d&&b.toString.call(d)==="[object Function]"}function q9(d,b){if(d.nodeType!==1)return[];var m=d.ownerDocument.defaultView,v=m.getComputedStyle(d,null);return b?v[b]:v}function ube(d){return d.nodeName==="HTML"?d:d.parentNode||d.host}function MO(d){if(!d)return document.body;switch(d.nodeName){case"HTML":case"BODY":return d.ownerDocument.body;case"#document":return d.body}var b=q9(d),m=b.overflow,v=b.overflowX,E=b.overflowY;return/(auto|scroll|overlay)/.test(m+E+v)?d:MO(ube(d))}function Tsn(d){return d&&d.referenceNode?d.referenceNode:d}var Ucn=CO&&!!(window.MSInputMethodContext&&document.documentMode),Wcn=CO&&/MSIE 10/.test(navigator.userAgent);function AE(d){return d===11?Ucn:d===10?Wcn:Ucn||Wcn}function EE(d){if(!d)return document.documentElement;for(var b=AE(10)?document.body:null,m=d.offsetParent||null;m===b&&d.nextElementSibling;)m=(d=d.nextElementSibling).offsetParent;var v=m&&m.nodeName;return!v||v==="BODY"||v==="HTML"?d?d.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(m.nodeName)!==-1&&q9(m,"position")==="static"?EE(m):m}function T$n(d){var b=d.nodeName;return b==="BODY"?!1:b==="HTML"||EE(d.firstElementChild)===d}function A0e(d){return d.parentNode!==null?A0e(d.parentNode):d}function gG(d,b){if(!d||!d.nodeType||!b||!b.nodeType)return document.documentElement;var m=d.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING,v=m?d:b,E=m?b:d,S=document.createRange();S.setStart(v,0),S.setEnd(E,0);var y=S.commonAncestorContainer;if(d!==y&&b!==y||v.contains(E))return T$n(y)?y:EE(y);var $=A0e(d);return $.host?gG($.host,b):gG(d,A0e(b).host)}function TE(d){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",m=b==="top"?"scrollTop":"scrollLeft",v=d.nodeName;if(v==="BODY"||v==="HTML"){var E=d.ownerDocument.documentElement,S=d.ownerDocument.scrollingElement||E;return S[m]}return d[m]}function C$n(d,b){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,v=TE(b,"top"),E=TE(b,"left"),S=m?-1:1;return d.top+=v*S,d.bottom+=v*S,d.left+=E*S,d.right+=E*S,d}function Xcn(d,b){var m=b==="x"?"Left":"Top",v=m==="Left"?"Right":"Bottom";return parseFloat(d["border"+m+"Width"])+parseFloat(d["border"+v+"Width"])}function Ycn(d,b,m,v){return Math.max(b["offset"+d],b["scroll"+d],m["client"+d],m["offset"+d],m["scroll"+d],AE(10)?parseInt(m["offset"+d])+parseInt(v["margin"+(d==="Height"?"Top":"Left")])+parseInt(v["margin"+(d==="Height"?"Bottom":"Right")]):0)}function Csn(d){var b=d.body,m=d.documentElement,v=AE(10)&&getComputedStyle(m);return{height:Ycn("Height",b,m,v),width:Ycn("Width",b,m,v)}}var M$n=function(d,b){if(!(d instanceof b))throw new TypeError("Cannot call a class as a function")},S$n=function(){function d(b,m){for(var v=0;v2&&arguments[2]!==void 0?arguments[2]:!1,v=AE(10),E=b.nodeName==="HTML",S=x0e(d),y=x0e(b),$=MO(d),N=q9(b),B=parseFloat(N.borderTopWidth),H=parseFloat(N.borderLeftWidth);m&&E&&(y.top=Math.max(y.top,0),y.left=Math.max(y.left,0));var z=L4({top:S.top-y.top-B,left:S.left-y.left-H,width:S.width,height:S.height});if(z.marginTop=0,z.marginLeft=0,!v&&E){var Y=parseFloat(N.marginTop),Z=parseFloat(N.marginLeft);z.top-=B-Y,z.bottom-=B-Y,z.left-=H-Z,z.right-=H-Z,z.marginTop=Y,z.marginLeft=Z}return(v&&!m?b.contains($):b===$&&$.nodeName!=="BODY")&&(z=C$n(z,b)),z}function P$n(d){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=d.ownerDocument.documentElement,v=sbe(d,m),E=Math.max(m.clientWidth,window.innerWidth||0),S=Math.max(m.clientHeight,window.innerHeight||0),y=b?0:TE(m),$=b?0:TE(m,"left"),N={top:y-v.top+v.marginTop,left:$-v.left+v.marginLeft,width:E,height:S};return L4(N)}function Msn(d){var b=d.nodeName;if(b==="BODY"||b==="HTML")return!1;if(q9(d,"position")==="fixed")return!0;var m=ube(d);return m?Msn(m):!1}function Ssn(d){if(!d||!d.parentElement||AE())return document.documentElement;for(var b=d.parentElement;b&&q9(b,"transform")==="none";)b=b.parentElement;return b||document.documentElement}function obe(d,b,m,v){var E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,S={top:0,left:0},y=E?Ssn(d):gG(d,Tsn(b));if(v==="viewport")S=P$n(y,E);else{var $=void 0;v==="scrollParent"?($=MO(ube(b)),$.nodeName==="BODY"&&($=d.ownerDocument.documentElement)):v==="window"?$=d.ownerDocument.documentElement:$=v;var N=sbe($,y,E);if($.nodeName==="HTML"&&!Msn(y)){var B=Csn(d.ownerDocument),H=B.height,z=B.width;S.top+=N.top-N.marginTop,S.bottom=H+N.top,S.left+=N.left-N.marginLeft,S.right=z+N.left}else S=N}m=m||0;var Y=typeof m=="number";return S.left+=Y?m:m.left||0,S.top+=Y?m:m.top||0,S.right-=Y?m:m.right||0,S.bottom-=Y?m:m.bottom||0,S}function A$n(d){var b=d.width,m=d.height;return b*m}function Psn(d,b,m,v,E){var S=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(d.indexOf("auto")===-1)return d;var y=obe(m,v,S,E),$={top:{width:y.width,height:b.top-y.top},right:{width:y.right-b.right,height:y.height},bottom:{width:y.width,height:y.bottom-b.bottom},left:{width:b.left-y.left,height:y.height}},N=Object.keys($).map(function(Y){return kb({key:Y},$[Y],{area:A$n($[Y])})}).sort(function(Y,Z){return Z.area-Y.area}),B=N.filter(function(Y){var Z=Y.width,J=Y.height;return Z>=m.clientWidth&&J>=m.clientHeight}),H=B.length>0?B[0].key:N[0].key,z=d.split("-")[1];return H+(z?"-"+z:"")}function Asn(d,b,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,E=v?Ssn(b):gG(b,Tsn(m));return sbe(m,E,v)}function xsn(d){var b=d.ownerDocument.defaultView,m=b.getComputedStyle(d),v=parseFloat(m.marginTop||0)+parseFloat(m.marginBottom||0),E=parseFloat(m.marginLeft||0)+parseFloat(m.marginRight||0),S={width:d.offsetWidth+E,height:d.offsetHeight+v};return S}function pG(d){var b={left:"right",right:"left",bottom:"top",top:"bottom"};return d.replace(/left|right|bottom|top/g,function(m){return b[m]})}function Isn(d,b,m){m=m.split("-")[0];var v=xsn(d),E={width:v.width,height:v.height},S=["right","left"].indexOf(m)!==-1,y=S?"top":"left",$=S?"left":"top",N=S?"height":"width",B=S?"width":"height";return E[y]=b[y]+b[N]/2-v[N]/2,m===$?E[$]=b[$]-v[B]:E[$]=b[pG($)],E}function SO(d,b){return Array.prototype.find?d.find(b):d.filter(b)[0]}function x$n(d,b,m){if(Array.prototype.findIndex)return d.findIndex(function(E){return E[b]===m});var v=SO(d,function(E){return E[b]===m});return d.indexOf(v)}function Osn(d,b,m){var v=m===void 0?d:d.slice(0,x$n(d,"name",m));return v.forEach(function(E){E.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var S=E.function||E.fn;E.enabled&&Esn(S)&&(b.offsets.popper=L4(b.offsets.popper),b.offsets.reference=L4(b.offsets.reference),b=S(b,E))}),b}function I$n(){if(!this.state.isDestroyed){var d={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};d.offsets.reference=Asn(this.state,this.popper,this.reference,this.options.positionFixed),d.placement=Psn(this.options.placement,d.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),d.originalPlacement=d.placement,d.positionFixed=this.options.positionFixed,d.offsets.popper=Isn(this.popper,d.offsets.reference,d.placement),d.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",d=Osn(this.modifiers,d),this.state.isCreated?this.options.onUpdate(d):(this.state.isCreated=!0,this.options.onCreate(d))}}function Dsn(d,b){return d.some(function(m){var v=m.name,E=m.enabled;return E&&v===b})}function fbe(d){for(var b=[!1,"ms","Webkit","Moz","O"],m=d.charAt(0).toUpperCase()+d.slice(1),v=0;vy[Z]&&(d.offsets.popper[z]+=$[z]+J-y[Z]),d.offsets.popper=L4(d.offsets.popper);var qe=$[z]+$[B]/2-J/2,on=q9(d.instance.popper),bn=parseFloat(on["margin"+H]),xn=parseFloat(on["border"+H+"Width"]),Ue=qe-d.offsets.popper[z]-bn-xn;return Ue=Math.max(Math.min(y[B]-J,Ue),0),d.arrowElement=v,d.offsets.arrow=(m={},CE(m,z,Math.round(Ue)),CE(m,Y,""),m),d}function V$n(d){return d==="end"?"start":d==="start"?"end":d}var Nsn=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],o0e=Nsn.slice(3);function Qcn(d){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=o0e.indexOf(d),v=o0e.slice(m+1).concat(o0e.slice(0,m));return b?v.reverse():v}var f0e={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function G$n(d,b){if(Dsn(d.instance.modifiers,"inner")||d.flipped&&d.placement===d.originalPlacement)return d;var m=obe(d.instance.popper,d.instance.reference,b.padding,b.boundariesElement,d.positionFixed),v=d.placement.split("-")[0],E=pG(v),S=d.placement.split("-")[1]||"",y=[];switch(b.behavior){case f0e.FLIP:y=[v,E];break;case f0e.CLOCKWISE:y=Qcn(v);break;case f0e.COUNTERCLOCKWISE:y=Qcn(v,!0);break;default:y=b.behavior}return y.forEach(function($,N){if(v!==$||y.length===N+1)return d;v=d.placement.split("-")[0],E=pG(v);var B=d.offsets.popper,H=d.offsets.reference,z=Math.floor,Y=v==="left"&&z(B.right)>z(H.left)||v==="right"&&z(B.left)z(H.top)||v==="bottom"&&z(B.top)z(m.right),qe=z(B.top)z(m.bottom),bn=v==="left"&&Z||v==="right"&&J||v==="top"&&qe||v==="bottom"&&on,xn=["top","bottom"].indexOf(v)!==-1,Ue=!!b.flipVariations&&(xn&&S==="start"&&Z||xn&&S==="end"&&J||!xn&&S==="start"&&qe||!xn&&S==="end"&&on),mn=!!b.flipVariationsByContent&&(xn&&S==="start"&&J||xn&&S==="end"&&Z||!xn&&S==="start"&&on||!xn&&S==="end"&&qe),bt=Ue||mn;(Y||bn||bt)&&(d.flipped=!0,(Y||bn)&&(v=y[N+1]),bt&&(S=V$n(S)),d.placement=v+(S?"-"+S:""),d.offsets.popper=kb({},d.offsets.popper,Isn(d.instance.popper,d.offsets.reference,d.placement)),d=Osn(d.instance.modifiers,d,"flip"))}),d}function z$n(d){var b=d.offsets,m=b.popper,v=b.reference,E=d.placement.split("-")[0],S=Math.floor,y=["top","bottom"].indexOf(E)!==-1,$=y?"right":"bottom",N=y?"left":"top",B=y?"width":"height";return m[$]S(v[$])&&(d.offsets.popper[N]=S(v[$])),d}function U$n(d,b,m,v){var E=d.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),S=+E[1],y=E[2];if(!S)return d;if(y.indexOf("%")===0){var $=void 0;switch(y){case"%p":$=m;break;case"%":case"%r":default:$=v}var N=L4($);return N[b]/100*S}else if(y==="vh"||y==="vw"){var B=void 0;return y==="vh"?B=Math.max(document.documentElement.clientHeight,window.innerHeight||0):B=Math.max(document.documentElement.clientWidth,window.innerWidth||0),B/100*S}else return S}function W$n(d,b,m,v){var E=[0,0],S=["right","left"].indexOf(v)!==-1,y=d.split(/(\+|\-)/).map(function(H){return H.trim()}),$=y.indexOf(SO(y,function(H){return H.search(/,|\s/)!==-1}));y[$]&&y[$].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var N=/\s*,\s*|\s+/,B=$!==-1?[y.slice(0,$).concat([y[$].split(N)[0]]),[y[$].split(N)[1]].concat(y.slice($+1))]:[y];return B=B.map(function(H,z){var Y=(z===1?!S:S)?"height":"width",Z=!1;return H.reduce(function(J,qe){return J[J.length-1]===""&&["+","-"].indexOf(qe)!==-1?(J[J.length-1]=qe,Z=!0,J):Z?(J[J.length-1]+=qe,Z=!1,J):J.concat(qe)},[]).map(function(J){return U$n(J,Y,b,m)})}),B.forEach(function(H,z){H.forEach(function(Y,Z){lbe(Y)&&(E[z]+=Y*(H[Z-1]==="-"?-1:1))})}),E}function X$n(d,b){var m=b.offset,v=d.placement,E=d.offsets,S=E.popper,y=E.reference,$=v.split("-")[0],N=void 0;return lbe(+m)?N=[+m,0]:N=W$n(m,S,y,$),$==="left"?(S.top+=N[0],S.left-=N[1]):$==="right"?(S.top+=N[0],S.left+=N[1]):$==="top"?(S.left+=N[0],S.top-=N[1]):$==="bottom"&&(S.left+=N[0],S.top+=N[1]),d.popper=S,d}function Y$n(d,b){var m=b.boundariesElement||EE(d.instance.popper);d.instance.reference===m&&(m=EE(m));var v=fbe("transform"),E=d.instance.popper.style,S=E.top,y=E.left,$=E[v];E.top="",E.left="",E[v]="";var N=obe(d.instance.popper,d.instance.reference,b.padding,m,d.positionFixed);E.top=S,E.left=y,E[v]=$,b.boundaries=N;var B=b.priority,H=d.offsets.popper,z={primary:function(Z){var J=H[Z];return H[Z]N[Z]&&!b.escapeWithReference&&(qe=Math.min(H[J],N[Z]-(Z==="right"?H.width:H.height))),CE({},J,qe)}};return B.forEach(function(Y){var Z=["left","top"].indexOf(Y)!==-1?"primary":"secondary";H=kb({},H,z[Z](Y))}),d.offsets.popper=H,d}function Q$n(d){var b=d.placement,m=b.split("-")[0],v=b.split("-")[1];if(v){var E=d.offsets,S=E.reference,y=E.popper,$=["bottom","top"].indexOf(m)!==-1,N=$?"left":"top",B=$?"width":"height",H={start:CE({},N,S[N]),end:CE({},N,S[N]+S[B]-y[B])};d.offsets.popper=kb({},y,H[v])}return d}function J$n(d){if(!Fsn(d.instance.modifiers,"hide","preventOverflow"))return d;var b=d.offsets.reference,m=SO(d.instance.modifiers,function(v){return v.name==="preventOverflow"}).boundaries;if(b.bottomm.right||b.top>m.bottom||b.right2&&arguments[2]!==void 0?arguments[2]:{};M$n(this,d),this.scheduleUpdate=function(){return requestAnimationFrame(v.update)},this.update=E$n(this.update.bind(this)),this.options=kb({},d.Defaults,E),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=b&&b.jquery?b[0]:b,this.popper=m&&m.jquery?m[0]:m,this.options.modifiers={},Object.keys(kb({},d.Defaults.modifiers,E.modifiers)).forEach(function(y){v.options.modifiers[y]=kb({},d.Defaults.modifiers[y]||{},E.modifiers?E.modifiers[y]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(y){return kb({name:y},v.options.modifiers[y])}).sort(function(y,$){return y.order-$.order}),this.modifiers.forEach(function(y){y.enabled&&Esn(y.onLoad)&&y.onLoad(v.reference,v.popper,v.options,y,v.state)}),this.update();var S=this.options.eventsEnabled;S&&this.enableEventListeners(),this.state.eventsEnabled=S}return S$n(d,[{key:"update",value:function(){return I$n.call(this)}},{key:"destroy",value:function(){return O$n.call(this)}},{key:"enableEventListeners",value:function(){return $$n.call(this)}},{key:"disableEventListeners",value:function(){return F$n.call(this)}}]),d}();$G.Utils=(typeof window<"u"?window:global).PopperUtils;$G.placements=Nsn;$G.Defaults=nLn;const tLn=$G;(function(){try{if(typeof document<"u"){var d=document.createElement("style");d.appendChild(document.createTextNode(`._backdrop_uxwv8_1 {
+ position: fixed;
+ background: var(--color-layer-transparent);
+ top: 0;
+ bottom: 0;
+ right: 0;
+ left: 0;
+ opacity: 0;
+ user-select: none;
+}`)),document.head.appendChild(d)}}catch(b){console.error("vite-plugin-css-injected-by-js",b)}})();const iLn=({ref:d,open:b=!0,onClickOutside:m,onEscape:v})=>{Ee.useEffect(()=>{if(!b)return;const E=y=>{d.current&&!d.current.contains(y.target)&&(m==null||m(y))},S=y=>{y.code==="Escape"&&(v==null||v(y))};return m&&(document.addEventListener("mousedown",E),document.addEventListener("touchstart",E)),v&&document.addEventListener("keydown",S),()=>{m&&(document.removeEventListener("mousedown",E),document.removeEventListener("touchstart",E)),v&&document.removeEventListener("keydown",S)}},[d,m,v,b])},rLn=Ee.createContext({close:()=>{}});let cLn=0;const uLn=()=>`ref-${++cLn}`,abe=d=>{const[b]=Ee.useState(d||uLn());return`${b}`},sLn=d=>{const b=Ee.useRef(d);b.current=d,Ee.useLayoutEffect(()=>()=>b.current(),[])},oLn=Ee.forwardRef(({children:d,className:b,element:m="div",onMount:v,onUnmount:E},S)=>{const y=Ee.useRef(null),$=Ee.useRef(!1);return Ee.useEffect(()=>{b&&y.current&&y.current.setAttribute("class",`${b} rdk-portal`)},[b,y.current]),Ee.useLayoutEffect(()=>{y.current=document.createElement(m),v==null||v()},[]),sLn(()=>{E==null||E();const N=y.current;N&&document.body.contains(N)&&document.body.removeChild(N)}),Ee.useImperativeHandle(S,()=>y.current),y.current?($.current||($.current=!0,y.current.classList.add("rdk-portal"),document.body.appendChild(y.current)),XDn.createPortal(d,y.current)):null}),gE=[],fLn=990,_sn=Ee.forwardRef(({className:d,children:b,onMount:m,onUnmount:v,appendToBody:E,id:S},y)=>{let $=abe(S);const[N,B]=Ee.useState(null),[H,z]=Ee.useState(null),Y=Ee.useRef(null);return Ee.useImperativeHandle(y,()=>Y.current),At.jsx(oLn,{className:d,ref:Y,appendToBody:E,onMount:()=>{gE.push($);let Z=gE.indexOf($);B(Z);const J=fLn+Z*2+1;z(J),m==null||m({portalId:$,overlayIndex:J,portalIndex:Z,backdropIndex:J})},onUnmount:()=>{v==null||v(),gE.splice(gE.indexOf($),1),B(null),z(null)},children:b({overlayIndex:H,portalIndex:N,backdropIndex:H,portalId:$})})});_sn.defaultProps={appendToBody:!0};const lLn=Ee.forwardRef(({children:d,className:b,elementType:m="span",trigger:v=["click"],onOpen:E=()=>{},onClose:S=()=>{}},y)=>{const $=Ee.useCallback(on=>Array.isArray(v)?v.includes(on):on===v,[v]),N=Ee.useCallback(on=>{$("focus")&&E({type:"focus",nativeEvent:on})},[E,$]),B=Ee.useCallback(on=>{$("focus")&&S({type:"focus",nativeEvent:on})},[S,$]),H=Ee.useCallback(on=>{$("hover")&&E({type:"hover",nativeEvent:on})},[E,$]),z=Ee.useCallback(on=>{$("hover")&&S({type:"hover",nativeEvent:on})},[S,$]),Y=Ee.useCallback(on=>{$("click")&&E({type:"click",nativeEvent:on}),$("click")||S({type:"hover",nativeEvent:on})},[E,S,$]),Z=Ee.useCallback(on=>{$("contextmenu")&&(on.preventDefault(),E({type:"contextmenu",nativeEvent:on}))},[E]),J=$("focus")?-1:void 0,qe=m;return At.jsx(qe,{ref:y,tabIndex:J,onMouseEnter:H,onMouseLeave:z,onFocus:N,onBlur:B,onClick:Y,onContextMenu:Z,className:b,children:d})}),aLn=(d,{followCursor:b,placement:m,modifiers:v}={})=>{const E=Ee.useRef(null),S=Ee.useRef(null),y=Ee.useRef({pageX:0,pageY:0}),$=d.current,N=Ee.useMemo(()=>{const B=d;if(B.current!==void 0)return B.current;const H=d;if(b)return{getBoundingClientRect:()=>({top:y.current.pageY,right:y.current.pageX,bottom:y.current.pageY,left:y.current.pageX,width:0,height:0}),clientWidth:0,clientHeight:0};if(H&&!H.getBoundingClientRect){const{top:z,left:Y,width:Z,height:J}=d;return{getBoundingClientRect:()=>({top:z,left:Y,width:Z,bottom:z-J,right:Y-Z,height:J}),clientWidth:Z,clientHeight:J}}return H},[b,d,$,y]);return Ee.useLayoutEffect(()=>{let B;const H=({pageX:Y,pageY:Z})=>{var J;y.current={pageX:Y,pageY:Z},(J=S.current)==null||J.scheduleUpdate()},z=()=>{B=requestAnimationFrame(()=>{var Y;(Y=S.current)==null||Y.scheduleUpdate()})};return E.current&&N&&(S.current=new tLn(N,E.current,{placement:m||"top",modifiers:v||{},onCreate:()=>{window.addEventListener("scroll",z),b&&window.addEventListener("mousemove",H)}})),()=>{var Y;E.current||((Y=S.current)==null||Y.destroy(),cancelAnimationFrame(B),window.removeEventListener("scroll",z),b&&window.removeEventListener("mousemove",H))}},[E.current]),Ee.useLayoutEffect(()=>{S.current&&(S.current.reference=N,S.current.scheduleUpdate())},[N]),[E,S]};function Ch({children:d,element:b,childRef:m,...v}){const E=Ee.useMemo(()=>$=>{const N=b.props;return Object.keys($).reduce((B,H)=>{const z=$[H],Y=N[H];return typeof z=="function"&&typeof Y=="function"?B[H]=(...Z)=>{z(...Z),Y(...Z)}:H==="className"?B[H]=jb(z,Y):B[H]=z,B},{})},[v]);if(b===null)return d;const S=m?$=>{typeof m=="function"?m($):S&&(m.current=$)}:void 0,y=E(v);return Ee.cloneElement(b,{...b.props,...y,children:d,ref:S})}const Bsn=Ee.forwardRef(({triggerRef:d,children:b,portalClassName:m,closeOnBodyClick:v,closeOnEscape:E,elementType:S,appendToBody:y,followCursor:$,modifiers:N,placement:B,onClose:H},z)=>{const Y=abe(),[Z,J]=Ee.useState(null),[qe,on]=aLn(d,{followCursor:$,modifiers:N,placement:B});Ee.useImperativeHandle(z,()=>({updatePosition:()=>{var Ue;(Ue=on==null?void 0:on.current)==null||Ue.scheduleUpdate()}}));const bn=Ee.useCallback(Ue=>{if(v){let mn=null;d.current?mn=d.current:d.contains!==void 0&&(mn=d);const bt=Ue.target.closest(".rdk-portal"),_t=gE.indexOf(Y)===gE.length-1;!(mn!=null&&mn.contains(Ue.target))&&(_t||!bt)&&(H==null||H(Ue))}},[v,H]),xn=Ee.useCallback(()=>{E&&(H==null||H())},[E,H]);return iLn({open:!0,ref:qe,onClickOutside:bn,onEscape:xn}),Ee.useEffect(()=>{qe&&Z&&(qe.current.style.zIndex=Z)},[qe.current,Z]),At.jsx(_sn,{id:Y,ref:qe,className:m,elementType:S,appendToBody:y,onMount:Ue=>J(Ue.overlayIndex),onUnmount:()=>J(null),children:b})});Bsn.defaultProps={closeOnBodyClick:!0,closeOnEscape:!0,appendToBody:!0,placement:"bottom"};const hLn=Ee.forwardRef(({reference:d,children:b,open:m,content:v,triggerElement:E,triggerClassName:S,trigger:y,onOpen:$,onClose:N,...B},H)=>{const z=Ee.useRef(!1),Y=Ee.useRef(null),Z=Ee.useRef(null),J=d||Y;Ee.useImperativeHandle(H,()=>({updatePosition:()=>{var on;(on=Z.current)==null||on.updatePosition()}})),Ee.useEffect(()=>{z.current&&(m?$==null||$():N==null||N())},[m]),Ee.useEffect(()=>{z.current||(z.current=!0)});const qe=Ee.useMemo(()=>({close:()=>N==null?void 0:N()}),[N]);return At.jsxs(rLn.Provider,{value:qe,children:[b&&At.jsx(Ee.Fragment,{children:y?At.jsx(lLn,{elementType:E,ref:Y,className:S,trigger:y,onOpen:$,onClose:N,children:b}):b}),At.jsx(p$n,{children:m&&At.jsx(Bsn,{...B,ref:Z,triggerRef:J,onClose:N,children:v})})]})});hLn.defaultProps={trigger:"click"};const hbe=Ee.createContext({transformPagePoint:d=>d,isStatic:!1,reducedMotion:"never"}),LG=Ee.createContext({});function dLn(){return Ee.useContext(LG).visualElement}const FG=Ee.createContext(null),H9=typeof document<"u",l0e=H9?Ee.useLayoutEffect:Ee.useEffect,Rsn=Ee.createContext({strict:!1});function bLn(d,b,m,v){const E=dLn(),S=Ee.useContext(Rsn),y=Ee.useContext(FG),$=Ee.useContext(hbe).reducedMotion,N=Ee.useRef();v=v||S.renderer,!N.current&&v&&(N.current=v(d,{visualState:b,parent:E,props:m,presenceId:y?y.id:void 0,blockInitialAnimation:y?y.initial===!1:!1,reducedMotionConfig:$}));const B=N.current;return l0e(()=>{B&&B.render()}),l0e(()=>{B&&B.animationState&&B.animationState.animateChanges()}),l0e(()=>()=>B&&B.notify("Unmount"),[]),B}function pE(d){return typeof d=="object"&&Object.prototype.hasOwnProperty.call(d,"current")}function wLn(d,b,m){return Ee.useCallback(v=>{v&&d.mount&&d.mount(v),b&&(v?b.mount(v):b.unmount()),m&&(typeof m=="function"?m(v):pE(m)&&(m.current=v))},[b])}function mO(d){return typeof d=="string"||Array.isArray(d)}function NG(d){return typeof d=="object"&&typeof d.start=="function"}const gLn=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function _G(d){return NG(d.animate)||gLn.some(b=>mO(d[b]))}function Ksn(d){return!!(_G(d)||d.variants)}function pLn(d,b){if(_G(d)){const{initial:m,animate:v}=d;return{initial:m===!1||mO(m)?m:void 0,animate:mO(v)?v:void 0}}return d.inherit!==!1?b:{}}function mLn(d){const{initial:b,animate:m}=pLn(d,Ee.useContext(LG));return Ee.useMemo(()=>({initial:b,animate:m}),[Jcn(b),Jcn(m)])}function Jcn(d){return Array.isArray(d)?d.join(" "):d}const xm=d=>({isEnabled:b=>d.some(m=>!!b[m])}),vO={measureLayout:xm(["layout","layoutId","drag"]),animation:xm(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:xm(["exit"]),drag:xm(["drag","dragControls"]),focus:xm(["whileFocus"]),hover:xm(["whileHover","onHoverStart","onHoverEnd"]),tap:xm(["whileTap","onTap","onTapStart","onTapCancel"]),pan:xm(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:xm(["whileInView","onViewportEnter","onViewportLeave"])};function vLn(d){for(const b in d)b==="projectionNodeConstructor"?vO.projectionNodeConstructor=d[b]:vO[b].Component=d[b]}function BG(d){const b=Ee.useRef(null);return b.current===null&&(b.current=d()),b.current}const lO={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let yLn=1;function kLn(){return BG(()=>{if(lO.hasEverUpdated)return yLn++})}const qsn=Ee.createContext({});class jLn extends gO.Component{getSnapshotBeforeUpdate(){const{visualElement:b,props:m}=this.props;return b&&b.setProps(m),null}componentDidUpdate(){}render(){return this.props.children}}const Hsn=Ee.createContext({}),ELn=Symbol.for("motionComponentSymbol");function TLn({preloadedFeatures:d,createVisualElement:b,projectionNodeConstructor:m,useRender:v,useVisualState:E,Component:S}){d&&vLn(d);function y(N,B){const H={...Ee.useContext(hbe),...N,layoutId:CLn(N)},{isStatic:z}=H;let Y=null;const Z=mLn(N),J=z?void 0:kLn(),qe=E(N,z);if(!z&&H9){Z.visualElement=bLn(S,qe,H,b);const on=Ee.useContext(Rsn).strict,bn=Ee.useContext(Hsn);Z.visualElement&&(Y=Z.visualElement.loadFeatures(H,on,d,J,m||vO.projectionNodeConstructor,bn))}return Ee.createElement(jLn,{visualElement:Z.visualElement,props:H},Y,Ee.createElement(LG.Provider,{value:Z},v(S,N,J,wLn(qe,Z.visualElement,B),qe,z,Z.visualElement)))}const $=Ee.forwardRef(y);return $[ELn]=S,$}function CLn({layoutId:d}){const b=Ee.useContext(qsn).id;return b&&d!==void 0?b+"-"+d:d}function MLn(d){function b(v,E={}){return TLn(d(v,E))}if(typeof Proxy>"u")return b;const m=new Map;return new Proxy(b,{get:(v,E)=>(m.has(E)||m.set(E,b(E)),m.get(E))})}const SLn=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dbe(d){return typeof d!="string"||d.includes("-")?!1:!!(SLn.indexOf(d)>-1||/[A-Z]/.test(d))}const mG={};function PLn(d){Object.assign(mG,d)}const vG=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],V9=new Set(vG);function Vsn(d,{layout:b,layoutId:m}){return V9.has(d)||d.startsWith("origin")||(b||m!==void 0)&&(!!mG[d]||d==="opacity")}const Gp=d=>!!(d!=null&&d.getVelocity),ALn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xLn=(d,b)=>vG.indexOf(d)-vG.indexOf(b);function ILn({transform:d,transformKeys:b},{enableHardwareAcceleration:m=!0,allowTransformNone:v=!0},E,S){let y="";b.sort(xLn);for(const $ of b)y+=`${ALn[$]||$}(${d[$]}) `;return m&&!d.z&&(y+="translateZ(0)"),y=y.trim(),S?y=S(d,E?"":y):v&&E&&(y="none"),y}function Gsn(d){return d.startsWith("--")}const OLn=(d,b)=>b&&typeof d=="number"?b.transform(d):d,ME=(d,b,m)=>Math.min(Math.max(m,d),b),G9={test:d=>typeof d=="number",parse:parseFloat,transform:d=>d},aO={...G9,transform:d=>ME(0,1,d)},sG={...G9,default:1},hO=d=>Math.round(d*1e5)/1e5,yO=/(-)?([\d]*\.?[\d])+/g,O0e=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,DLn=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function PO(d){return typeof d=="string"}const AO=d=>({test:b=>PO(b)&&b.endsWith(d)&&b.split(" ").length===1,parse:parseFloat,transform:b=>`${b}${d}`}),I4=AO("deg"),Vp=AO("%"),Ui=AO("px"),$Ln=AO("vh"),LLn=AO("vw"),Zcn={...Vp,parse:d=>Vp.parse(d)/100,transform:d=>Vp.transform(d*100)},eun={...G9,transform:Math.round},zsn={borderWidth:Ui,borderTopWidth:Ui,borderRightWidth:Ui,borderBottomWidth:Ui,borderLeftWidth:Ui,borderRadius:Ui,radius:Ui,borderTopLeftRadius:Ui,borderTopRightRadius:Ui,borderBottomRightRadius:Ui,borderBottomLeftRadius:Ui,width:Ui,maxWidth:Ui,height:Ui,maxHeight:Ui,size:Ui,top:Ui,right:Ui,bottom:Ui,left:Ui,padding:Ui,paddingTop:Ui,paddingRight:Ui,paddingBottom:Ui,paddingLeft:Ui,margin:Ui,marginTop:Ui,marginRight:Ui,marginBottom:Ui,marginLeft:Ui,rotate:I4,rotateX:I4,rotateY:I4,rotateZ:I4,scale:sG,scaleX:sG,scaleY:sG,scaleZ:sG,skew:I4,skewX:I4,skewY:I4,distance:Ui,translateX:Ui,translateY:Ui,translateZ:Ui,x:Ui,y:Ui,z:Ui,perspective:Ui,transformPerspective:Ui,opacity:aO,originX:Zcn,originY:Zcn,originZ:Ui,zIndex:eun,fillOpacity:aO,strokeOpacity:aO,numOctaves:eun};function bbe(d,b,m,v){const{style:E,vars:S,transform:y,transformKeys:$,transformOrigin:N}=d;$.length=0;let B=!1,H=!1,z=!0;for(const Y in b){const Z=b[Y];if(Gsn(Y)){S[Y]=Z;continue}const J=zsn[Y],qe=OLn(Z,J);if(V9.has(Y)){if(B=!0,y[Y]=qe,$.push(Y),!z)continue;Z!==(J.default||0)&&(z=!1)}else Y.startsWith("origin")?(H=!0,N[Y]=qe):E[Y]=qe}if(b.transform||(B||v?E.transform=ILn(d,m,z,v):E.transform&&(E.transform="none")),H){const{originX:Y="50%",originY:Z="50%",originZ:J=0}=N;E.transformOrigin=`${Y} ${Z} ${J}`}}const wbe=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Usn(d,b,m){for(const v in b)!Gp(b[v])&&!Vsn(v,m)&&(d[v]=b[v])}function FLn({transformTemplate:d},b,m){return Ee.useMemo(()=>{const v=wbe();return bbe(v,b,{enableHardwareAcceleration:!m},d),Object.assign({},v.vars,v.style)},[b])}function NLn(d,b,m){const v=d.style||{},E={};return Usn(E,v,d),Object.assign(E,FLn(d,b,m)),d.transformValues?d.transformValues(E):E}function _Ln(d,b,m){const v={},E=NLn(d,b,m);return d.drag&&d.dragListener!==!1&&(v.draggable=!1,E.userSelect=E.WebkitUserSelect=E.WebkitTouchCallout="none",E.touchAction=d.drag===!0?"none":`pan-${d.drag==="x"?"y":"x"}`),v.style=E,v}const BLn=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],RLn=["whileTap","onTap","onTapStart","onTapCancel"],KLn=["onPan","onPanStart","onPanSessionStart","onPanEnd"],qLn=["whileInView","onViewportEnter","onViewportLeave","viewport"],HLn=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...qLn,...RLn,...BLn,...KLn]);function yG(d){return HLn.has(d)}let Wsn=d=>!yG(d);function VLn(d){d&&(Wsn=b=>b.startsWith("on")?!yG(b):d(b))}try{VLn(require("@emotion/is-prop-valid").default)}catch{}function GLn(d,b,m){const v={};for(const E in d)(Wsn(E)||m===!0&&yG(E)||!b&&!yG(E)||d.draggable&&E.startsWith("onDrag"))&&(v[E]=d[E]);return v}function nun(d,b,m){return typeof d=="string"?d:Ui.transform(b+m*d)}function zLn(d,b,m){const v=nun(b,d.x,d.width),E=nun(m,d.y,d.height);return`${v} ${E}`}const ULn={offset:"stroke-dashoffset",array:"stroke-dasharray"},WLn={offset:"strokeDashoffset",array:"strokeDasharray"};function XLn(d,b,m=1,v=0,E=!0){d.pathLength=1;const S=E?ULn:WLn;d[S.offset]=Ui.transform(-v);const y=Ui.transform(b),$=Ui.transform(m);d[S.array]=`${y} ${$}`}function gbe(d,{attrX:b,attrY:m,originX:v,originY:E,pathLength:S,pathSpacing:y=1,pathOffset:$=0,...N},B,H,z){if(bbe(d,N,B,z),H){d.style.viewBox&&(d.attrs.viewBox=d.style.viewBox);return}d.attrs=d.style,d.style={};const{attrs:Y,style:Z,dimensions:J}=d;Y.transform&&(J&&(Z.transform=Y.transform),delete Y.transform),J&&(v!==void 0||E!==void 0||Z.transform)&&(Z.transformOrigin=zLn(J,v!==void 0?v:.5,E!==void 0?E:.5)),b!==void 0&&(Y.x=b),m!==void 0&&(Y.y=m),S!==void 0&&XLn(Y,S,y,$,!1)}const Xsn=()=>({...wbe(),attrs:{}}),pbe=d=>typeof d=="string"&&d.toLowerCase()==="svg";function YLn(d,b,m,v){const E=Ee.useMemo(()=>{const S=Xsn();return gbe(S,b,{enableHardwareAcceleration:!1},pbe(v),d.transformTemplate),{...S.attrs,style:{...S.style}}},[b]);if(d.style){const S={};Usn(S,d.style,d),E.style={...S,...E.style}}return E}function QLn(d=!1){return(m,v,E,S,{latestValues:y},$)=>{const B=(dbe(m)?YLn:_Ln)(v,y,$,m),z={...GLn(v,typeof m=="string",d),...B,ref:S};return E&&(z["data-projection-id"]=E),Ee.createElement(m,z)}}const mbe=d=>d.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Ysn(d,{style:b,vars:m},v,E){Object.assign(d.style,b,E&&E.getProjectionStyles(v));for(const S in m)d.style.setProperty(S,m[S])}const Qsn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Jsn(d,b,m,v){Ysn(d,b,void 0,v);for(const E in b.attrs)d.setAttribute(Qsn.has(E)?E:mbe(E),b.attrs[E])}function vbe(d){const{style:b}=d,m={};for(const v in b)(Gp(b[v])||Vsn(v,d))&&(m[v]=b[v]);return m}function Zsn(d){const b=vbe(d);for(const m in d)if(Gp(d[m])){const v=m==="x"||m==="y"?"attr"+m.toUpperCase():m;b[v]=d[m]}return b}function ybe(d,b,m,v={},E={}){return typeof b=="function"&&(b=b(m!==void 0?m:d.custom,v,E)),typeof b=="string"&&(b=d.variants&&d.variants[b]),typeof b=="function"&&(b=b(m!==void 0?m:d.custom,v,E)),b}const kG=d=>Array.isArray(d),JLn=d=>!!(d&&typeof d=="object"&&d.mix&&d.toValue),ZLn=d=>kG(d)?d[d.length-1]||0:d;function aG(d){const b=Gp(d)?d.get():d;return JLn(b)?b.toValue():b}function eFn({scrapeMotionValuesFromProps:d,createRenderState:b,onMount:m},v,E,S){const y={latestValues:nFn(v,E,S,d),renderState:b()};return m&&(y.mount=$=>m(v,$,y)),y}const eon=d=>(b,m)=>{const v=Ee.useContext(LG),E=Ee.useContext(FG),S=()=>eFn(d,b,v,E);return m?S():BG(S)};function nFn(d,b,m,v){const E={},S=v(d);for(const Y in S)E[Y]=aG(S[Y]);let{initial:y,animate:$}=d;const N=_G(d),B=Ksn(d);b&&B&&!N&&d.inherit!==!1&&(y===void 0&&(y=b.initial),$===void 0&&($=b.animate));let H=m?m.initial===!1:!1;H=H||y===!1;const z=H?$:y;return z&&typeof z!="boolean"&&!NG(z)&&(Array.isArray(z)?z:[z]).forEach(Z=>{const J=ybe(d,Z);if(!J)return;const{transitionEnd:qe,transition:on,...bn}=J;for(const xn in bn){let Ue=bn[xn];if(Array.isArray(Ue)){const mn=H?Ue.length-1:0;Ue=Ue[mn]}Ue!==null&&(E[xn]=Ue)}for(const xn in qe)E[xn]=qe[xn]}),E}const tFn={useVisualState:eon({scrapeMotionValuesFromProps:Zsn,createRenderState:Xsn,onMount:(d,b,{renderState:m,latestValues:v})=>{try{m.dimensions=typeof b.getBBox=="function"?b.getBBox():b.getBoundingClientRect()}catch{m.dimensions={x:0,y:0,width:0,height:0}}gbe(m,v,{enableHardwareAcceleration:!1},pbe(b.tagName),d.transformTemplate),Jsn(b,m)}})},iFn={useVisualState:eon({scrapeMotionValuesFromProps:vbe,createRenderState:wbe})};function rFn(d,{forwardMotionProps:b=!1},m,v,E){return{...dbe(d)?tFn:iFn,preloadedFeatures:m,useRender:QLn(b),createVisualElement:v,projectionNodeConstructor:E,Component:d}}var ds;(function(d){d.Animate="animate",d.Hover="whileHover",d.Tap="whileTap",d.Drag="whileDrag",d.Focus="whileFocus",d.InView="whileInView",d.Exit="exit"})(ds||(ds={}));function RG(d,b,m,v={passive:!0}){return d.addEventListener(b,m,v),()=>d.removeEventListener(b,m)}function D0e(d,b,m,v){Ee.useEffect(()=>{const E=d.current;if(m&&E)return RG(E,b,m,v)},[d,b,m,v])}function cFn({whileFocus:d,visualElement:b}){const{animationState:m}=b,v=()=>{m&&m.setActive(ds.Focus,!0)},E=()=>{m&&m.setActive(ds.Focus,!1)};D0e(b,"focus",d?v:void 0),D0e(b,"blur",d?E:void 0)}function non(d){return typeof PointerEvent<"u"&&d instanceof PointerEvent?d.pointerType==="mouse":d instanceof MouseEvent}function ton(d){return!!d.touches}function uFn(d){return b=>{const m=b instanceof MouseEvent;(!m||m&&b.button===0)&&d(b)}}const sFn={pageX:0,pageY:0};function oFn(d,b="page"){const v=d.touches[0]||d.changedTouches[0]||sFn;return{x:v[b+"X"],y:v[b+"Y"]}}function fFn(d,b="page"){return{x:d[b+"X"],y:d[b+"Y"]}}function kbe(d,b="page"){return{point:ton(d)?oFn(d,b):fFn(d,b)}}const ion=(d,b=!1)=>{const m=v=>d(v,kbe(v));return b?uFn(m):m},lFn=()=>H9&&window.onpointerdown===null,aFn=()=>H9&&window.ontouchstart===null,hFn=()=>H9&&window.onmousedown===null,dFn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},bFn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ron(d){return lFn()?d:aFn()?bFn[d]:hFn()?dFn[d]:d}function jE(d,b,m,v){return RG(d,ron(b),ion(m,b==="pointerdown"),v)}function jG(d,b,m,v){return D0e(d,ron(b),m&&ion(m,b==="pointerdown"),v)}function con(d){let b=null;return()=>{const m=()=>{b=null};return b===null?(b=d,m):!1}}const tun=con("dragHorizontal"),iun=con("dragVertical");function uon(d){let b=!1;if(d==="y")b=iun();else if(d==="x")b=tun();else{const m=tun(),v=iun();m&&v?b=()=>{m(),v()}:(m&&m(),v&&v())}return b}function son(){const d=uon(!0);return d?(d(),!1):!0}function run(d,b,m){return(v,E)=>{!non(v)||son()||(d.animationState&&d.animationState.setActive(ds.Hover,b),m&&m(v,E))}}function wFn({onHoverStart:d,onHoverEnd:b,whileHover:m,visualElement:v}){jG(v,"pointerenter",d||m?run(v,!0,d):void 0,{passive:!d}),jG(v,"pointerleave",b||m?run(v,!1,b):void 0,{passive:!b})}const oon=(d,b)=>b?d===b?!0:oon(d,b.parentElement):!1;function fon(d){return Ee.useEffect(()=>()=>d(),[])}const gFn=(d,b)=>m=>b(d(m)),KG=(...d)=>d.reduce(gFn);function pFn({onTap:d,onTapStart:b,onTapCancel:m,whileTap:v,visualElement:E}){const S=d||b||m||v,y=Ee.useRef(!1),$=Ee.useRef(null),N={passive:!(b||d||m||Z)};function B(){$.current&&$.current(),$.current=null}function H(){return B(),y.current=!1,E.animationState&&E.animationState.setActive(ds.Tap,!1),!son()}function z(J,qe){H()&&(oon(E.current,J.target)?d&&d(J,qe):m&&m(J,qe))}function Y(J,qe){H()&&m&&m(J,qe)}function Z(J,qe){B(),!y.current&&(y.current=!0,$.current=KG(jE(window,"pointerup",z,N),jE(window,"pointercancel",Y,N)),E.animationState&&E.animationState.setActive(ds.Tap,!0),b&&b(J,qe))}jG(E,"pointerdown",S?Z:void 0,N),fon(B)}const mFn="production",vFn=typeof process>"u"||process.env===void 0?mFn:"production",cun=new Set;function yFn(d,b,m){d||cun.has(b)||(console.warn(b),m&&console.warn(m),cun.add(b))}const $0e=new WeakMap,a0e=new WeakMap,kFn=d=>{const b=$0e.get(d.target);b&&b(d)},jFn=d=>{d.forEach(kFn)};function EFn({root:d,...b}){const m=d||document;a0e.has(m)||a0e.set(m,{});const v=a0e.get(m),E=JSON.stringify(b);return v[E]||(v[E]=new IntersectionObserver(jFn,{root:d,...b})),v[E]}function TFn(d,b,m){const v=EFn(b);return $0e.set(d,m),v.observe(d),()=>{$0e.delete(d),v.unobserve(d)}}function CFn({visualElement:d,whileInView:b,onViewportEnter:m,onViewportLeave:v,viewport:E={}}){const S=Ee.useRef({hasEnteredView:!1,isInView:!1});let y=!!(b||m||v);E.once&&S.current.hasEnteredView&&(y=!1),(typeof IntersectionObserver>"u"?PFn:SFn)(y,S.current,d,E)}const MFn={some:0,all:1};function SFn(d,b,m,{root:v,margin:E,amount:S="some",once:y}){Ee.useEffect(()=>{if(!d||!m.current)return;const $={root:v==null?void 0:v.current,rootMargin:E,threshold:typeof S=="number"?S:MFn[S]},N=B=>{const{isIntersecting:H}=B;if(b.isInView===H||(b.isInView=H,y&&!H&&b.hasEnteredView))return;H&&(b.hasEnteredView=!0),m.animationState&&m.animationState.setActive(ds.InView,H);const z=m.getProps(),Y=H?z.onViewportEnter:z.onViewportLeave;Y&&Y(B)};return TFn(m.current,$,N)},[d,v,E,S])}function PFn(d,b,m,{fallback:v=!0}){Ee.useEffect(()=>{!d||!v||(vFn!=="production"&&yFn(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{b.hasEnteredView=!0;const{onViewportEnter:E}=m.getProps();E&&E(null),m.animationState&&m.animationState.setActive(ds.InView,!0)}))},[d])}const $4=d=>b=>(d(b),null),AFn={inView:$4(CFn),tap:$4(pFn),focus:$4(cFn),hover:$4(wFn)};function lon(){const d=Ee.useContext(FG);if(d===null)return[!0,null];const{isPresent:b,onExitComplete:m,register:v}=d,E=Ee.useId();return Ee.useEffect(()=>v(E),[]),!b&&m?[!1,()=>m&&m(E)]:[!0]}function aon(d,b){if(!Array.isArray(b))return!1;const m=b.length;if(m!==d.length)return!1;for(let v=0;v/^\-?\d*\.?\d+$/.test(d),IFn=d=>/^0[^.\s]+$/.test(d),Im={delta:0,timestamp:0},hon=1/60*1e3,OFn=typeof performance<"u"?()=>performance.now():()=>Date.now(),don=typeof window<"u"?d=>window.requestAnimationFrame(d):d=>setTimeout(()=>d(OFn()),hon);function DFn(d){let b=[],m=[],v=0,E=!1,S=!1;const y=new WeakSet,$={schedule:(N,B=!1,H=!1)=>{const z=H&&E,Y=z?b:m;return B&&y.add(N),Y.indexOf(N)===-1&&(Y.push(N),z&&E&&(v=b.length)),N},cancel:N=>{const B=m.indexOf(N);B!==-1&&m.splice(B,1),y.delete(N)},process:N=>{if(E){S=!0;return}if(E=!0,[b,m]=[m,b],m.length=0,v=b.length,v)for(let B=0;B(d[b]=DFn(()=>kO=!0),d),{}),Hd=xO.reduce((d,b)=>{const m=qG[b];return d[b]=(v,E=!1,S=!1)=>(kO||FFn(),m.schedule(v,E,S)),d},{}),F4=xO.reduce((d,b)=>(d[b]=qG[b].cancel,d),{}),h0e=xO.reduce((d,b)=>(d[b]=()=>qG[b].process(Im),d),{}),LFn=d=>qG[d].process(Im),bon=d=>{kO=!1,Im.delta=L0e?hon:Math.max(Math.min(d-Im.timestamp,$Fn),1),Im.timestamp=d,F0e=!0,xO.forEach(LFn),F0e=!1,kO&&(L0e=!1,don(bon))},FFn=()=>{kO=!0,L0e=!0,F0e||don(bon)};function jbe(d,b){d.indexOf(b)===-1&&d.push(b)}function Ebe(d,b){const m=d.indexOf(b);m>-1&&d.splice(m,1)}class Tbe{constructor(){this.subscriptions=[]}add(b){return jbe(this.subscriptions,b),()=>Ebe(this.subscriptions,b)}notify(b,m,v){const E=this.subscriptions.length;if(E)if(E===1)this.subscriptions[0](b,m,v);else for(let S=0;S!isNaN(parseFloat(d));class _Fn{constructor(b,m={}){this.version="7.10.3",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(v,E=!0)=>{this.prev=this.current,this.current=v;const{delta:S,timestamp:y}=Im;this.lastUpdated!==y&&(this.timeDelta=S,this.lastUpdated=y,Hd.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),E&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Hd.postRender(this.velocityCheck),this.velocityCheck=({timestamp:v})=>{v!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=b,this.canTrackVelocity=NFn(this.current),this.owner=m.owner}onChange(b){return this.on("change",b)}on(b,m){return this.events[b]||(this.events[b]=new Tbe),this.events[b].add(m)}clearListeners(){for(const b in this.events)this.events[b].clear()}attach(b){this.passiveEffect=b}set(b,m=!0){!m||!this.passiveEffect?this.updateAndNotify(b,m):this.passiveEffect(b,this.updateAndNotify)}setWithVelocity(b,m,v){this.set(m),this.prev=b,this.timeDelta=v}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Cbe(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(b){return this.stop(),new Promise(m=>{this.hasAnimated=!0,this.stopAnimation=b(m),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.stopAnimation&&(this.stopAnimation(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.clearListeners(),this.stop()}}function SE(d,b){return new _Fn(d,b)}const Mbe=(d,b)=>m=>!!(PO(m)&&DLn.test(m)&&m.startsWith(d)||b&&Object.prototype.hasOwnProperty.call(m,b)),won=(d,b,m)=>v=>{if(!PO(v))return v;const[E,S,y,$]=v.match(yO);return{[d]:parseFloat(E),[b]:parseFloat(S),[m]:parseFloat(y),alpha:$!==void 0?parseFloat($):1}},BFn=d=>ME(0,255,d),d0e={...G9,transform:d=>Math.round(BFn(d))},B9={test:Mbe("rgb","red"),parse:won("red","green","blue"),transform:({red:d,green:b,blue:m,alpha:v=1})=>"rgba("+d0e.transform(d)+", "+d0e.transform(b)+", "+d0e.transform(m)+", "+hO(aO.transform(v))+")"};function RFn(d){let b="",m="",v="",E="";return d.length>5?(b=d.substring(1,3),m=d.substring(3,5),v=d.substring(5,7),E=d.substring(7,9)):(b=d.substring(1,2),m=d.substring(2,3),v=d.substring(3,4),E=d.substring(4,5),b+=b,m+=m,v+=v,E+=E),{red:parseInt(b,16),green:parseInt(m,16),blue:parseInt(v,16),alpha:E?parseInt(E,16)/255:1}}const N0e={test:Mbe("#"),parse:RFn,transform:B9.transform},mE={test:Mbe("hsl","hue"),parse:won("hue","saturation","lightness"),transform:({hue:d,saturation:b,lightness:m,alpha:v=1})=>"hsla("+Math.round(d)+", "+Vp.transform(hO(b))+", "+Vp.transform(hO(m))+", "+hO(aO.transform(v))+")"},Th={test:d=>B9.test(d)||N0e.test(d)||mE.test(d),parse:d=>B9.test(d)?B9.parse(d):mE.test(d)?mE.parse(d):N0e.parse(d),transform:d=>PO(d)?d:d.hasOwnProperty("red")?B9.transform(d):mE.transform(d)},gon="${c}",pon="${n}";function KFn(d){var b,m;return isNaN(d)&&PO(d)&&(((b=d.match(yO))===null||b===void 0?void 0:b.length)||0)+(((m=d.match(O0e))===null||m===void 0?void 0:m.length)||0)>0}function EG(d){typeof d=="number"&&(d=`${d}`);const b=[];let m=0,v=0;const E=d.match(O0e);E&&(m=E.length,d=d.replace(O0e,gon),b.push(...E.map(Th.parse)));const S=d.match(yO);return S&&(v=S.length,d=d.replace(yO,pon),b.push(...S.map(G9.parse))),{values:b,numColors:m,numNumbers:v,tokenised:d}}function mon(d){return EG(d).values}function von(d){const{values:b,numColors:m,tokenised:v}=EG(d),E=b.length;return S=>{let y=v;for(let $=0;$typeof d=="number"?0:d;function HFn(d){const b=mon(d);return von(d)(b.map(qFn))}const N4={test:KFn,parse:mon,createTransformer:von,getAnimatableNone:HFn},VFn=new Set(["brightness","contrast","saturate","opacity"]);function GFn(d){const[b,m]=d.slice(0,-1).split("(");if(b==="drop-shadow")return d;const[v]=m.match(yO)||[];if(!v)return d;const E=m.replace(v,"");let S=VFn.has(b)?1:0;return v!==m&&(S*=100),b+"("+S+E+")"}const zFn=/([a-z-]*)\(.*?\)/g,_0e={...N4,getAnimatableNone:d=>{const b=d.match(zFn);return b?b.map(GFn).join(" "):d}},UFn={...zsn,color:Th,backgroundColor:Th,outlineColor:Th,fill:Th,stroke:Th,borderColor:Th,borderTopColor:Th,borderRightColor:Th,borderBottomColor:Th,borderLeftColor:Th,filter:_0e,WebkitFilter:_0e},Sbe=d=>UFn[d];function Pbe(d,b){var m;let v=Sbe(d);return v!==_0e&&(v=N4),(m=v.getAnimatableNone)===null||m===void 0?void 0:m.call(v,b)}const yon=d=>b=>b.test(d),WFn={test:d=>d==="auto",parse:d=>d},kon=[G9,Ui,Vp,I4,LLn,$Ln,WFn],nO=d=>kon.find(yon(d)),XFn=[...kon,Th,N4],YFn=d=>XFn.find(yon(d));function QFn(d){const b={};return d.values.forEach((m,v)=>b[v]=m.get()),b}function JFn(d){const b={};return d.values.forEach((m,v)=>b[v]=m.getVelocity()),b}function HG(d,b,m){const v=d.getProps();return ybe(v,b,m!==void 0?m:v.custom,QFn(d),JFn(d))}function ZFn(d,b,m){d.hasValue(b)?d.getValue(b).set(m):d.addValue(b,SE(m))}function Abe(d,b){const m=HG(d,b);let{transitionEnd:v={},transition:E={},...S}=m?d.makeTargetAnimatable(m,!1):{};S={...S,...v};for(const y in S){const $=ZLn(S[y]);ZFn(d,y,$)}}function B0e(d,b){[...b].reverse().forEach(v=>{var E;const S=d.getVariant(v);S&&Abe(d,S),(E=d.variantChildren)===null||E===void 0||E.forEach(y=>{B0e(y,b)})})}function eNn(d,b){if(Array.isArray(b))return B0e(d,b);if(typeof b=="string")return B0e(d,[b]);Abe(d,b)}function nNn(d,b,m){var v,E;const S=Object.keys(b).filter($=>!d.hasValue($)),y=S.length;if(y)for(let $=0;$`${d}: ${b}`;function cNn(d,b){const{MotionAppearAnimations:m}=window,v=rNn(d,V9.has(b)?"transform":b),E=m&&m.get(v);return E?(Hd.render(()=>{try{E.cancel(),m.delete(v)}catch{}}),E.currentTime||0):0}const uNn="framerAppearId",sNn="data-"+mbe(uNn),hG=d=>d*1e3,oNn={current:!1},xbe=d=>b=>b<=.5?d(2*b)/2:(2-d(2*(1-b)))/2,Ibe=d=>b=>1-d(1-b),Obe=d=>d*d,fNn=Ibe(Obe),Dbe=xbe(Obe),Bo=(d,b,m)=>-m*d+m*b+d;function b0e(d,b,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?d+(b-d)*6*m:m<1/2?b:m<2/3?d+(b-d)*(2/3-m)*6:d}function lNn({hue:d,saturation:b,lightness:m,alpha:v}){d/=360,b/=100,m/=100;let E=0,S=0,y=0;if(!b)E=S=y=m;else{const $=m<.5?m*(1+b):m+b-m*b,N=2*m-$;E=b0e(N,$,d+1/3),S=b0e(N,$,d),y=b0e(N,$,d-1/3)}return{red:Math.round(E*255),green:Math.round(S*255),blue:Math.round(y*255),alpha:v}}const w0e=(d,b,m)=>{const v=d*d;return Math.sqrt(Math.max(0,m*(b*b-v)+v))},aNn=[N0e,B9,mE],hNn=d=>aNn.find(b=>b.test(d));function uun(d){const b=hNn(d);let m=b.parse(d);return b===mE&&(m=lNn(m)),m}const jon=(d,b)=>{const m=uun(d),v=uun(b),E={...m};return S=>(E.red=w0e(m.red,v.red,S),E.green=w0e(m.green,v.green,S),E.blue=w0e(m.blue,v.blue,S),E.alpha=Bo(m.alpha,v.alpha,S),B9.transform(E))};function Eon(d,b){return typeof d=="number"?m=>Bo(d,b,m):Th.test(d)?jon(d,b):Con(d,b)}const Ton=(d,b)=>{const m=[...d],v=m.length,E=d.map((S,y)=>Eon(S,b[y]));return S=>{for(let y=0;y{const m={...d,...b},v={};for(const E in m)d[E]!==void 0&&b[E]!==void 0&&(v[E]=Eon(d[E],b[E]));return E=>{for(const S in v)m[S]=v[S](E);return m}},Con=(d,b)=>{const m=N4.createTransformer(b),v=EG(d),E=EG(b);return v.numColors===E.numColors&&v.numNumbers>=E.numNumbers?KG(Ton(v.values,E.values),m):y=>`${y>0?b:d}`},CG=(d,b,m)=>{const v=b-d;return v===0?1:(m-d)/v},sun=(d,b)=>m=>Bo(d,b,m);function bNn(d){return typeof d=="number"?sun:typeof d=="string"?Th.test(d)?jon:Con:Array.isArray(d)?Ton:typeof d=="object"?dNn:sun}function wNn(d,b,m){const v=[],E=m||bNn(d[0]),S=d.length-1;for(let y=0;yd[S-1]&&(d=[...d].reverse(),b=[...b].reverse());const y=wNn(b,v,E),$=y.length,N=B=>{let H=0;if($>1)for(;HN(ME(d[0],d[S-1],B)):N}const $be=d=>d,Son=(d,b,m)=>(((1-3*m+3*b)*d+(3*m-6*b))*d+3*b)*d,gNn=1e-7,pNn=12;function mNn(d,b,m,v,E){let S,y,$=0;do y=b+(m-b)/2,S=Son(y,v,E)-d,S>0?m=y:b=y;while(Math.abs(S)>gNn&&++$mNn(S,0,1,d,m);return S=>S===0||S===1?S:Son(E(S),b,v)}const Aon=d=>1-Math.sin(Math.acos(d)),Lbe=Ibe(Aon),vNn=xbe(Lbe),xon=Pon(.33,1.53,.69,.99),Fbe=Ibe(xon),yNn=xbe(Fbe),kNn=d=>(d*=2)<1?.5*Fbe(d):.5*(2-Math.pow(2,-10*(d-1))),jNn={linear:$be,easeIn:Obe,easeInOut:Dbe,easeOut:fNn,circIn:Aon,circInOut:vNn,circOut:Lbe,backIn:Fbe,backInOut:yNn,backOut:xon,anticipate:kNn},oun=d=>{if(Array.isArray(d)){wG(d.length===4);const[b,m,v,E]=d;return Pon(b,m,v,E)}else if(typeof d=="string")return jNn[d];return d},ENn=d=>Array.isArray(d)&&typeof d[0]!="number";function TNn(d,b){return d.map(()=>b||Dbe).splice(0,d.length-1)}function CNn(d){const b=d.length;return d.map((m,v)=>v!==0?v/(b-1):0)}function MNn(d,b){return d.map(m=>m*b)}function MG({keyframes:d,ease:b=Dbe,times:m,duration:v=300}){d=[...d];const E=MG[0],S=ENn(b)?b.map(oun):oun(b),y={done:!1,value:E},$=MNn(m&&m.length===MG.length?m:CNn(d),v);function N(){return Mon($,d,{ease:Array.isArray(S)?S:TNn(d,S)})}let B=N();return{next:H=>(y.value=B(H),y.done=H>=v,y),flipTarget:()=>{d.reverse(),B=N()}}}const g0e=.001,SNn=.01,fun=10,PNn=.05,ANn=1;function xNn({duration:d=800,bounce:b=.25,velocity:m=0,mass:v=1}){let E,S;r$n(d<=fun*1e3);let y=1-b;y=ME(PNn,ANn,y),d=ME(SNn,fun,d/1e3),y<1?(E=B=>{const H=B*y,z=H*d,Y=H-m,Z=R0e(B,y),J=Math.exp(-z);return g0e-Y/Z*J},S=B=>{const z=B*y*d,Y=z*m+m,Z=Math.pow(y,2)*Math.pow(B,2)*d,J=Math.exp(-z),qe=R0e(Math.pow(B,2),y);return(-E(B)+g0e>0?-1:1)*((Y-Z)*J)/qe}):(E=B=>{const H=Math.exp(-B*d),z=(B-m)*d+1;return-g0e+H*z},S=B=>{const H=Math.exp(-B*d),z=(m-B)*(d*d);return H*z});const $=5/d,N=ONn(E,S,$);if(d=d*1e3,isNaN(N))return{stiffness:100,damping:10,duration:d};{const B=Math.pow(N,2)*v;return{stiffness:B,damping:y*2*Math.sqrt(v*B),duration:d}}}const INn=12;function ONn(d,b,m){let v=m;for(let E=1;Ed[m]!==void 0)}function LNn(d){let b={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...d};if(!lun(d,$Nn)&&lun(d,DNn)){const m=xNn(d);b={...b,...m,velocity:0,mass:1},b.isResolvedFromDuration=!0}return b}const FNn=5;function Ion({keyframes:d,restSpeed:b=2,restDelta:m=.01,...v}){let E=d[0],S=d[d.length-1];const y={done:!1,value:E},{stiffness:$,damping:N,mass:B,velocity:H,duration:z,isResolvedFromDuration:Y}=LNn(v);let Z=NNn,J=H?-(H/1e3):0;const qe=N/(2*Math.sqrt($*B));function on(){const bn=S-E,xn=Math.sqrt($/B)/1e3;if(m===void 0&&(m=Math.min(Math.abs(S-E)/100,.4)),qe<1){const Ue=R0e(xn,qe);Z=mn=>{const bt=Math.exp(-qe*xn*mn);return S-bt*((J+qe*xn*bn)/Ue*Math.sin(Ue*mn)+bn*Math.cos(Ue*mn))}}else if(qe===1)Z=Ue=>S-Math.exp(-xn*Ue)*(bn+(J+xn*bn)*Ue);else{const Ue=xn*Math.sqrt(qe*qe-1);Z=mn=>{const bt=Math.exp(-qe*xn*mn),_t=Math.min(Ue*mn,300);return S-bt*((J+qe*xn*bn)*Math.sinh(_t)+Ue*bn*Math.cosh(_t))/Ue}}}return on(),{next:bn=>{const xn=Z(bn);if(Y)y.done=bn>=z;else{let Ue=J;if(bn!==0)if(qe<1){const _t=Math.max(0,bn-FNn);Ue=Cbe(xn-Z(_t),bn-_t)}else Ue=0;const mn=Math.abs(Ue)<=b,bt=Math.abs(S-xn)<=m;y.done=mn&&bt}return y.value=y.done?S:xn,y},flipTarget:()=>{J=-J,[E,S]=[S,E],on()}}}Ion.needsInterpolation=(d,b)=>typeof d=="string"||typeof b=="string";const NNn=d=>0;function _Nn({keyframes:d=[0],velocity:b=0,power:m=.8,timeConstant:v=350,restDelta:E=.5,modifyTarget:S}){const y=d[0],$={done:!1,value:y};let N=m*b;const B=y+N,H=S===void 0?B:S(B);return H!==B&&(N=H-y),{next:z=>{const Y=-N*Math.exp(-z/v);return $.done=!(Y>E||Y<-E),$.value=$.done?H:H+Y,$},flipTarget:()=>{}}}const BNn={decay:_Nn,keyframes:MG,tween:MG,spring:Ion};function Oon(d,b,m=0){return d-b-m}function RNn(d,b=0,m=0,v=!0){return v?Oon(b+-d,b,m):b-(d-b)+m}function KNn(d,b,m,v){return v?d>=b+m:d<=-m}const qNn=d=>{const b=({delta:m})=>d(m);return{start:()=>Hd.update(b,!0),stop:()=>F4.update(b)}};function SG({duration:d,driver:b=qNn,elapsed:m=0,repeat:v=0,repeatType:E="loop",repeatDelay:S=0,keyframes:y,autoplay:$=!0,onPlay:N,onStop:B,onComplete:H,onRepeat:z,onUpdate:Y,type:Z="keyframes",...J}){var qe,on;let bn,xn=0,Ue=d,mn,bt=!1,_t=!0,Mi;const li=BNn[y.length>2?"keyframes":Z],sc=y[0],Zi=y[y.length-1];!((on=(qe=li).needsInterpolation)===null||on===void 0)&&on.call(qe,sc,Zi)&&(Mi=Mon([0,100],[sc,Zi],{clamp:!1}),y=[0,100]);const fr=li({...J,duration:d,keyframes:y});function Mc(){xn++,E==="reverse"?(_t=xn%2===0,m=RNn(m,Ue,S,_t)):(m=Oon(m,Ue,S),E==="mirror"&&fr.flipTarget()),bt=!1,z&&z()}function lr(){bn.stop(),H&&H()}function er(wr){if(_t||(wr=-wr),m+=wr,!bt){const ai=fr.next(Math.max(0,m));mn=ai.value,Mi&&(mn=Mi(mn)),bt=_t?ai.done:m<=0}Y&&Y(mn),bt&&(xn===0&&(Ue=Ue!==void 0?Ue:m),xn{B&&B(),bn.stop()},sample:wr=>fr.next(Math.max(0,wr))}}function HNn(d){return!d||Array.isArray(d)||typeof d=="string"&&Don[d]}const oO=([d,b,m,v])=>`cubic-bezier(${d}, ${b}, ${m}, ${v})`,Don={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:oO([0,.65,.55,1]),circOut:oO([.55,0,1,.45]),backIn:oO([.31,.01,.66,-.59]),backOut:oO([.33,1.53,.69,.99])};function VNn(d){if(d)return Array.isArray(d)?oO(d):Don[d]}function GNn(d,b,m,{delay:v=0,duration:E,repeat:S=0,repeatType:y="loop",ease:$,times:N}={}){return d.animate({[b]:m,offset:N},{delay:v,duration:E,easing:VNn($),fill:"both",iterations:S+1,direction:y==="reverse"?"alternate":"normal"})}const oG=10;function zNn(d,b,{onUpdate:m,onComplete:v,...E}){let{keyframes:S,duration:y=.3,elapsed:$=0,ease:N}=E;if(E.type==="spring"||!HNn(E.ease)){const H=SG(E);let z={done:!1,value:S[0]};const Y=[];let Z=0;for(;!z.done;)z=H.sample(Z),Y.push(z.value),Z+=oG;S=Y,y=Z-oG,N="linear"}const B=GNn(d.owner.current,b,S,{...E,delay:-$,duration:y,ease:N});return B.onfinish=()=>{d.set(S[S.length-1]),v&&v()},()=>{const{currentTime:H}=B;if(H){const z=SG(E);d.setWithVelocity(z.sample(H-oG).value,z.sample(H).value,oG)}Hd.update(()=>B.cancel())}}function $on(d,b){const m=performance.now(),v=({timestamp:E})=>{const S=E-m;S>=b&&(F4.read(v),d(S-b))};return Hd.read(v,!0),()=>F4.read(v)}function UNn({keyframes:d,elapsed:b,onUpdate:m,onComplete:v}){const E=()=>(m&&m(d[d.length-1]),v&&v(),()=>{});return b?$on(E,-b):E()}function WNn({keyframes:d,velocity:b=0,min:m,max:v,power:E=.8,timeConstant:S=750,bounceStiffness:y=500,bounceDamping:$=10,restDelta:N=1,modifyTarget:B,driver:H,onUpdate:z,onComplete:Y,onStop:Z}){const J=d[0];let qe;function on(mn){return m!==void 0&&mnv}function bn(mn){return m===void 0?v:v===void 0||Math.abs(m-mn){var _t;z==null||z(bt),(_t=mn.onUpdate)===null||_t===void 0||_t.call(mn,bt)},onComplete:Y,onStop:Z})}function Ue(mn){xn({type:"spring",stiffness:y,damping:$,restDelta:N,...mn})}if(on(J))Ue({velocity:b,keyframes:[J,bn(J)]});else{let mn=E*b+J;typeof B<"u"&&(mn=B(mn));const bt=bn(mn),_t=bt===m?-1:1;let Mi,li;const sc=Zi=>{Mi=li,li=Zi,b=Cbe(Zi-Mi,Im.delta),(_t===1&&Zi>bt||_t===-1&&Ziqe==null?void 0:qe.stop()}}const $9=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),fG=d=>({type:"spring",stiffness:550,damping:d===0?2*Math.sqrt(550):30,restSpeed:10}),p0e=()=>({type:"keyframes",ease:"linear",duration:.3}),XNn={type:"keyframes",duration:.8},aun={x:$9,y:$9,z:$9,rotate:$9,rotateX:$9,rotateY:$9,rotateZ:$9,scaleX:fG,scaleY:fG,scale:fG,opacity:p0e,backgroundColor:p0e,color:p0e,default:fG},YNn=(d,{keyframes:b})=>b.length>2?XNn:(aun[d]||aun.default)(b[1]),K0e=(d,b)=>d==="zIndex"?!1:!!(typeof b=="number"||Array.isArray(b)||typeof b=="string"&&N4.test(b)&&!b.startsWith("url("));function QNn({when:d,delay:b,delayChildren:m,staggerChildren:v,staggerDirection:E,repeat:S,repeatType:y,repeatDelay:$,from:N,...B}){return!!Object.keys(B).length}function hun(d){return d===0||typeof d=="string"&&parseFloat(d)===0&&d.indexOf(" ")===-1}function dun(d){return typeof d=="number"?0:Pbe("",d)}function Lon(d,b){return d[b]||d.default||d}function JNn(d,b,m,v){const E=K0e(b,m);let S=v.from!==void 0?v.from:d.get();return S==="none"&&E&&typeof m=="string"?S=Pbe(b,m):hun(S)&&typeof m=="string"?S=dun(m):!Array.isArray(m)&&hun(m)&&typeof S=="string"&&(m=dun(S)),Array.isArray(m)?(m[0]===null&&(m[0]=S),m):[S,m]}const bun={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},m0e={},Fon={};for(const d in bun)Fon[d]=()=>(m0e[d]===void 0&&(m0e[d]=bun[d]()),m0e[d]);const ZNn=new Set(["opacity"]),Nbe=(d,b,m,v={})=>E=>{const S=Lon(v,d)||{},y=S.delay||v.delay||0;let{elapsed:$=0}=v;$=$-hG(y);const N=JNn(b,d,m,S),B=N[0],H=N[N.length-1],z=K0e(d,B),Y=K0e(d,H);let Z={keyframes:N,velocity:b.getVelocity(),...S,elapsed:$,onUpdate:bn=>{b.set(bn),S.onUpdate&&S.onUpdate(bn)},onComplete:()=>{E(),S.onComplete&&S.onComplete()}};if(!z||!Y||oNn.current||S.type===!1)return UNn(Z);if(S.type==="inertia"){const bn=WNn(Z);return()=>bn.stop()}QNn(S)||(Z={...Z,...YNn(d,Z)}),Z.duration&&(Z.duration=hG(Z.duration)),Z.repeatDelay&&(Z.repeatDelay=hG(Z.repeatDelay));const J=b.owner,qe=J&&J.current;if(Fon.waapi()&&ZNn.has(d)&&!Z.repeatDelay&&Z.repeatType!=="mirror"&&Z.damping!==0&&J&&qe instanceof HTMLElement&&!J.getProps().onUpdate)return zNn(b,d,Z);{const bn=SG(Z);return()=>bn.stop()}};function Non(d,b,m={}){d.notify("AnimationStart",b);let v;if(Array.isArray(b)){const E=b.map(S=>q0e(d,S,m));v=Promise.all(E)}else if(typeof b=="string")v=q0e(d,b,m);else{const E=typeof b=="function"?HG(d,b,m.custom):b;v=_on(d,E,m)}return v.then(()=>d.notify("AnimationComplete",b))}function q0e(d,b,m={}){var v;const E=HG(d,b,m.custom);let{transition:S=d.getDefaultTransition()||{}}=E||{};m.transitionOverride&&(S=m.transitionOverride);const y=E?()=>_on(d,E,m):()=>Promise.resolve(),$=!((v=d.variantChildren)===null||v===void 0)&&v.size?(B=0)=>{const{delayChildren:H=0,staggerChildren:z,staggerDirection:Y}=S;return e_n(d,b,H+B,z,Y,m)}:()=>Promise.resolve(),{when:N}=S;if(N){const[B,H]=N==="beforeChildren"?[y,$]:[$,y];return B().then(H)}else return Promise.all([y(),$(m.delay)])}function _on(d,b,{delay:m=0,transitionOverride:v,type:E}={}){var S;let{transition:y=d.getDefaultTransition(),transitionEnd:$,...N}=d.makeTargetAnimatable(b);const B=d.getValue("willChange");v&&(y=v);const H=[],z=E&&((S=d.animationState)===null||S===void 0?void 0:S.getState()[E]);for(const Y in N){const Z=d.getValue(Y),J=N[Y];if(!Z||J===void 0||z&&i_n(z,Y))continue;let qe={delay:m,elapsed:0,...y};if(d.shouldReduceMotion&&V9.has(Y)&&(qe={...qe,type:!1,delay:0}),!Z.hasAnimated){const bn=d.getProps()[sNn];bn&&(qe.elapsed=cNn(bn,Y))}let on=Z.start(Nbe(Y,Z,J,qe));TG(B)&&(B.add(Y),on=on.then(()=>B.remove(Y))),H.push(on)}return Promise.all(H).then(()=>{$&&Abe(d,$)})}function e_n(d,b,m=0,v=0,E=1,S){const y=[],$=(d.variantChildren.size-1)*v,N=E===1?(B=0)=>B*v:(B=0)=>$-B*v;return Array.from(d.variantChildren).sort(t_n).forEach((B,H)=>{y.push(q0e(B,b,{...S,delay:m+N(H)}).then(()=>B.notify("AnimationComplete",b)))}),Promise.all(y)}function n_n(d){d.values.forEach(b=>b.stop())}function t_n(d,b){return d.sortNodePosition(b)}function i_n({protectedKeys:d,needsAnimating:b},m){const v=d.hasOwnProperty(m)&&b[m]!==!0;return b[m]=!1,v}const _be=[ds.Animate,ds.InView,ds.Focus,ds.Hover,ds.Tap,ds.Drag,ds.Exit],r_n=[..._be].reverse(),c_n=_be.length;function u_n(d){return b=>Promise.all(b.map(({animation:m,options:v})=>Non(d,m,v)))}function s_n(d){let b=u_n(d);const m=f_n();let v=!0;const E=(N,B)=>{const H=HG(d,B);if(H){const{transition:z,transitionEnd:Y,...Z}=H;N={...N,...Z,...Y}}return N};function S(N){b=N(d)}function y(N,B){const H=d.getProps(),z=d.getVariantContext(!0)||{},Y=[],Z=new Set;let J={},qe=1/0;for(let bn=0;bnqe&&bt;const Zi=Array.isArray(mn)?mn:[mn];let fr=Zi.reduce(E,{});_t===!1&&(fr={});const{prevResolvedValues:Mc={}}=Ue,lr={...Mc,...fr},er=nr=>{sc=!0,Z.delete(nr),Ue.needsAnimating[nr]=!0};for(const nr in lr){const wr=fr[nr],ai=Mc[nr];J.hasOwnProperty(nr)||(wr!==ai?kG(wr)&&kG(ai)?!aon(wr,ai)||li?er(nr):Ue.protectedKeys[nr]=!0:wr!==void 0?er(nr):Z.add(nr):wr!==void 0&&Z.has(nr)?er(nr):Ue.protectedKeys[nr]=!0)}Ue.prevProp=mn,Ue.prevResolvedValues=fr,Ue.isActive&&(J={...J,...fr}),v&&d.blockInitialAnimation&&(sc=!1),sc&&!Mi&&Y.push(...Zi.map(nr=>({animation:nr,options:{type:xn,...N}})))}if(Z.size){const bn={};Z.forEach(xn=>{const Ue=d.getBaseTarget(xn);Ue!==void 0&&(bn[xn]=Ue)}),Y.push({animation:bn})}let on=!!Y.length;return v&&H.initial===!1&&!d.manuallyAnimateOnMount&&(on=!1),v=!1,on?b(Y):Promise.resolve()}function $(N,B,H){var z;if(m[N].isActive===B)return Promise.resolve();(z=d.variantChildren)===null||z===void 0||z.forEach(Z=>{var J;return(J=Z.animationState)===null||J===void 0?void 0:J.setActive(N,B)}),m[N].isActive=B;const Y=y(H,N);for(const Z in m)m[Z].protectedKeys={};return Y}return{animateChanges:y,setActive:$,setAnimateFunction:S,getState:()=>m}}function o_n(d,b){return typeof b=="string"?b!==d:Array.isArray(b)?!aon(b,d):!1}function L9(d=!1){return{isActive:d,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function f_n(){return{[ds.Animate]:L9(!0),[ds.InView]:L9(),[ds.Hover]:L9(),[ds.Tap]:L9(),[ds.Drag]:L9(),[ds.Focus]:L9(),[ds.Exit]:L9()}}const l_n={animation:$4(({visualElement:d,animate:b})=>{d.animationState||(d.animationState=s_n(d)),NG(b)&&Ee.useEffect(()=>b.subscribe(d),[b])}),exit:$4(d=>{const{custom:b,visualElement:m}=d,[v,E]=lon(),S=Ee.useContext(FG);Ee.useEffect(()=>{m.isPresent=v;const y=m.animationState&&m.animationState.setActive(ds.Exit,!v,{custom:S&&S.custom||b});y&&!v&&y.then(E)},[v])})},wun=(d,b)=>Math.abs(d-b);function a_n(d,b){const m=wun(d.x,b.x),v=wun(d.y,b.y);return Math.sqrt(m**2+v**2)}class Bon{constructor(b,m,{transformPagePoint:v}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const B=y0e(this.lastMoveEventInfo,this.history),H=this.startEvent!==null,z=a_n(B.offset,{x:0,y:0})>=3;if(!H&&!z)return;const{point:Y}=B,{timestamp:Z}=Im;this.history.push({...Y,timestamp:Z});const{onStart:J,onMove:qe}=this.handlers;H||(J&&J(this.lastMoveEvent,B),this.startEvent=this.lastMoveEvent),qe&&qe(this.lastMoveEvent,B)},this.handlePointerMove=(B,H)=>{if(this.lastMoveEvent=B,this.lastMoveEventInfo=v0e(H,this.transformPagePoint),non(B)&&B.buttons===0){this.handlePointerUp(B,H);return}Hd.update(this.updatePoint,!0)},this.handlePointerUp=(B,H)=>{this.end();const{onEnd:z,onSessionEnd:Y}=this.handlers,Z=y0e(v0e(H,this.transformPagePoint),this.history);this.startEvent&&z&&z(B,Z),Y&&Y(B,Z)},ton(b)&&b.touches.length>1)return;this.handlers=m,this.transformPagePoint=v;const E=kbe(b),S=v0e(E,this.transformPagePoint),{point:y}=S,{timestamp:$}=Im;this.history=[{...y,timestamp:$}];const{onSessionStart:N}=m;N&&N(b,y0e(S,this.history)),this.removeListeners=KG(jE(window,"pointermove",this.handlePointerMove),jE(window,"pointerup",this.handlePointerUp),jE(window,"pointercancel",this.handlePointerUp))}updateHandlers(b){this.handlers=b}end(){this.removeListeners&&this.removeListeners(),F4.update(this.updatePoint)}}function v0e(d,b){return b?{point:b(d.point)}:d}function gun(d,b){return{x:d.x-b.x,y:d.y-b.y}}function y0e({point:d},b){return{point:d,delta:gun(d,Ron(b)),offset:gun(d,h_n(b)),velocity:d_n(b,.1)}}function h_n(d){return d[0]}function Ron(d){return d[d.length-1]}function d_n(d,b){if(d.length<2)return{x:0,y:0};let m=d.length-1,v=null;const E=Ron(d);for(;m>=0&&(v=d[m],!(E.timestamp-v.timestamp>hG(b)));)m--;if(!v)return{x:0,y:0};const S=(E.timestamp-v.timestamp)/1e3;if(S===0)return{x:0,y:0};const y={x:(E.x-v.x)/S,y:(E.y-v.y)/S};return y.x===1/0&&(y.x=0),y.y===1/0&&(y.y=0),y}function Vd(d){return d.max-d.min}function H0e(d,b=0,m=.01){return Math.abs(d-b)<=m}function pun(d,b,m,v=.5){d.origin=v,d.originPoint=Bo(b.min,b.max,d.origin),d.scale=Vd(m)/Vd(b),(H0e(d.scale,1,1e-4)||isNaN(d.scale))&&(d.scale=1),d.translate=Bo(m.min,m.max,d.origin)-d.originPoint,(H0e(d.translate)||isNaN(d.translate))&&(d.translate=0)}function dO(d,b,m,v){pun(d.x,b.x,m.x,v==null?void 0:v.originX),pun(d.y,b.y,m.y,v==null?void 0:v.originY)}function mun(d,b,m){d.min=m.min+b.min,d.max=d.min+Vd(b)}function b_n(d,b,m){mun(d.x,b.x,m.x),mun(d.y,b.y,m.y)}function vun(d,b,m){d.min=b.min-m.min,d.max=d.min+Vd(b)}function bO(d,b,m){vun(d.x,b.x,m.x),vun(d.y,b.y,m.y)}function w_n(d,{min:b,max:m},v){return b!==void 0&&dm&&(d=v?Bo(m,d,v.max):Math.min(d,m)),d}function yun(d,b,m){return{min:b!==void 0?d.min+b:void 0,max:m!==void 0?d.max+m-(d.max-d.min):void 0}}function g_n(d,{top:b,left:m,bottom:v,right:E}){return{x:yun(d.x,m,E),y:yun(d.y,b,v)}}function kun(d,b){let m=b.min-d.min,v=b.max-d.max;return b.max-b.minv?m=CG(b.min,b.max-v,d.min):v>E&&(m=CG(d.min,d.max-E,b.min)),ME(0,1,m)}function v_n(d,b){const m={};return b.min!==void 0&&(m.min=b.min-d.min),b.max!==void 0&&(m.max=b.max-d.min),m}const V0e=.35;function y_n(d=V0e){return d===!1?d=0:d===!0&&(d=V0e),{x:jun(d,"left","right"),y:jun(d,"top","bottom")}}function jun(d,b,m){return{min:Eun(d,b),max:Eun(d,m)}}function Eun(d,b){return typeof d=="number"?d:d[b]||0}const Tun=()=>({translate:0,scale:1,origin:0,originPoint:0}),wO=()=>({x:Tun(),y:Tun()}),Cun=()=>({min:0,max:0}),cl=()=>({x:Cun(),y:Cun()});function Hp(d){return[d("x"),d("y")]}function Kon({top:d,left:b,right:m,bottom:v}){return{x:{min:b,max:m},y:{min:d,max:v}}}function k_n({x:d,y:b}){return{top:b.min,right:d.max,bottom:b.max,left:d.min}}function j_n(d,b){if(!b)return d;const m=b({x:d.left,y:d.top}),v=b({x:d.right,y:d.bottom});return{top:m.y,left:m.x,bottom:v.y,right:v.x}}function k0e(d){return d===void 0||d===1}function G0e({scale:d,scaleX:b,scaleY:m}){return!k0e(d)||!k0e(b)||!k0e(m)}function N9(d){return G0e(d)||qon(d)||d.z||d.rotate||d.rotateX||d.rotateY}function qon(d){return Mun(d.x)||Mun(d.y)}function Mun(d){return d&&d!=="0%"}function PG(d,b,m){const v=d-m,E=b*v;return m+E}function Sun(d,b,m,v,E){return E!==void 0&&(d=PG(d,E,v)),PG(d,m,v)+b}function z0e(d,b=0,m=1,v,E){d.min=Sun(d.min,b,m,v,E),d.max=Sun(d.max,b,m,v,E)}function Hon(d,{x:b,y:m}){z0e(d.x,b.translate,b.scale,b.originPoint),z0e(d.y,m.translate,m.scale,m.originPoint)}function E_n(d,b,m,v=!1){var E,S;const y=m.length;if(!y)return;b.x=b.y=1;let $,N;for(let B=0;B1.0000000000001||d<.999999999999?d:1}function O4(d,b){d.min=d.min+b,d.max=d.max+b}function Aun(d,b,[m,v,E]){const S=b[E]!==void 0?b[E]:.5,y=Bo(d.min,d.max,S);z0e(d,b[m],b[v],y,b.scale)}const T_n=["x","scaleX","originX"],C_n=["y","scaleY","originY"];function vE(d,b){Aun(d.x,b,T_n),Aun(d.y,b,C_n)}function Von(d,b){return Kon(j_n(d.getBoundingClientRect(),b))}function M_n(d,b,m){const v=Von(d,m),{scroll:E}=b;return E&&(O4(v.x,E.offset.x),O4(v.y,E.offset.y)),v}const S_n=new WeakMap;class P_n{constructor(b){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=cl(),this.visualElement=b}start(b,{snapToCursor:m=!1}={}){if(this.visualElement.isPresent===!1)return;const v=$=>{this.stopAnimation(),m&&this.snapToCursor(kbe($,"page").point)},E=($,N)=>{var B;const{drag:H,dragPropagation:z,onDragStart:Y}=this.getProps();H&&!z&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=uon(H),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Hp(Z=>{var J,qe;let on=this.getAxisMotionValue(Z).get()||0;if(Vp.test(on)){const bn=(qe=(J=this.visualElement.projection)===null||J===void 0?void 0:J.layout)===null||qe===void 0?void 0:qe.layoutBox[Z];bn&&(on=Vd(bn)*(parseFloat(on)/100))}this.originPoint[Z]=on}),Y==null||Y($,N),(B=this.visualElement.animationState)===null||B===void 0||B.setActive(ds.Drag,!0))},S=($,N)=>{const{dragPropagation:B,dragDirectionLock:H,onDirectionLock:z,onDrag:Y}=this.getProps();if(!B&&!this.openGlobalLock)return;const{offset:Z}=N;if(H&&this.currentDirection===null){this.currentDirection=A_n(Z),this.currentDirection!==null&&(z==null||z(this.currentDirection));return}this.updateAxis("x",N.point,Z),this.updateAxis("y",N.point,Z),this.visualElement.render(),Y==null||Y($,N)},y=($,N)=>this.stop($,N);this.panSession=new Bon(b,{onSessionStart:v,onStart:E,onMove:S,onSessionEnd:y},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(b,m){const v=this.isDragging;if(this.cancel(),!v)return;const{velocity:E}=m;this.startAnimation(E);const{onDragEnd:S}=this.getProps();S==null||S(b,m)}cancel(){var b,m;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(b=this.panSession)===null||b===void 0||b.end(),this.panSession=void 0;const{dragPropagation:v}=this.getProps();!v&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(m=this.visualElement.animationState)===null||m===void 0||m.setActive(ds.Drag,!1)}updateAxis(b,m,v){const{drag:E}=this.getProps();if(!v||!lG(b,E,this.currentDirection))return;const S=this.getAxisMotionValue(b);let y=this.originPoint[b]+v[b];this.constraints&&this.constraints[b]&&(y=w_n(y,this.constraints[b],this.elastic[b])),S.set(y)}resolveConstraints(){const{dragConstraints:b,dragElastic:m}=this.getProps(),{layout:v}=this.visualElement.projection||{},E=this.constraints;b&&pE(b)?this.constraints||(this.constraints=this.resolveRefConstraints()):b&&v?this.constraints=g_n(v.layoutBox,b):this.constraints=!1,this.elastic=y_n(m),E!==this.constraints&&v&&this.constraints&&!this.hasMutatedConstraints&&Hp(S=>{this.getAxisMotionValue(S)&&(this.constraints[S]=v_n(v.layoutBox[S],this.constraints[S]))})}resolveRefConstraints(){const{dragConstraints:b,onMeasureDragConstraints:m}=this.getProps();if(!b||!pE(b))return!1;const v=b.current,{projection:E}=this.visualElement;if(!E||!E.layout)return!1;const S=M_n(v,E.root,this.visualElement.getTransformPagePoint());let y=p_n(E.layout.layoutBox,S);if(m){const $=m(k_n(y));this.hasMutatedConstraints=!!$,$&&(y=Kon($))}return y}startAnimation(b){const{drag:m,dragMomentum:v,dragElastic:E,dragTransition:S,dragSnapToOrigin:y,onDragTransitionEnd:$}=this.getProps(),N=this.constraints||{},B=Hp(H=>{if(!lG(H,m,this.currentDirection))return;let z=(N==null?void 0:N[H])||{};y&&(z={min:0,max:0});const Y=E?200:1e6,Z=E?40:1e7,J={type:"inertia",velocity:v?b[H]:0,bounceStiffness:Y,bounceDamping:Z,timeConstant:750,restDelta:1,restSpeed:10,...S,...z};return this.startAxisValueAnimation(H,J)});return Promise.all(B).then($)}startAxisValueAnimation(b,m){const v=this.getAxisMotionValue(b);return v.start(Nbe(b,v,0,m))}stopAnimation(){Hp(b=>this.getAxisMotionValue(b).stop())}getAxisMotionValue(b){var m;const v="_drag"+b.toUpperCase(),E=this.visualElement.getProps()[v];return E||this.visualElement.getValue(b,((m=this.visualElement.getProps().initial)===null||m===void 0?void 0:m[b])||0)}snapToCursor(b){Hp(m=>{const{drag:v}=this.getProps();if(!lG(m,v,this.currentDirection))return;const{projection:E}=this.visualElement,S=this.getAxisMotionValue(m);if(E&&E.layout){const{min:y,max:$}=E.layout.layoutBox[m];S.set(b[m]-Bo(y,$,.5))}})}scalePositionWithinConstraints(){var b;if(!this.visualElement.current)return;const{drag:m,dragConstraints:v}=this.getProps(),{projection:E}=this.visualElement;if(!pE(v)||!E||!this.constraints)return;this.stopAnimation();const S={x:0,y:0};Hp($=>{const N=this.getAxisMotionValue($);if(N){const B=N.get();S[$]=m_n({min:B,max:B},this.constraints[$])}});const{transformTemplate:y}=this.visualElement.getProps();this.visualElement.current.style.transform=y?y({},""):"none",(b=E.root)===null||b===void 0||b.updateScroll(),E.updateLayout(),this.resolveConstraints(),Hp($=>{if(!lG($,m,null))return;const N=this.getAxisMotionValue($),{min:B,max:H}=this.constraints[$];N.set(Bo(B,H,S[$]))})}addListeners(){var b;if(!this.visualElement.current)return;S_n.set(this.visualElement,this);const m=this.visualElement.current,v=jE(m,"pointerdown",B=>{const{drag:H,dragListener:z=!0}=this.getProps();H&&z&&this.start(B)}),E=()=>{const{dragConstraints:B}=this.getProps();pE(B)&&(this.constraints=this.resolveRefConstraints())},{projection:S}=this.visualElement,y=S.addEventListener("measure",E);S&&!S.layout&&((b=S.root)===null||b===void 0||b.updateScroll(),S.updateLayout()),E();const $=RG(window,"resize",()=>this.scalePositionWithinConstraints()),N=S.addEventListener("didUpdate",({delta:B,hasLayoutChanged:H})=>{this.isDragging&&H&&(Hp(z=>{const Y=this.getAxisMotionValue(z);Y&&(this.originPoint[z]+=B[z].translate,Y.set(Y.get()+B[z].translate))}),this.visualElement.render())});return()=>{$(),v(),y(),N==null||N()}}getProps(){const b=this.visualElement.getProps(),{drag:m=!1,dragDirectionLock:v=!1,dragPropagation:E=!1,dragConstraints:S=!1,dragElastic:y=V0e,dragMomentum:$=!0}=b;return{...b,drag:m,dragDirectionLock:v,dragPropagation:E,dragConstraints:S,dragElastic:y,dragMomentum:$}}}function lG(d,b,m){return(b===!0||b===d)&&(m===null||m===d)}function A_n(d,b=10){let m=null;return Math.abs(d.y)>b?m="y":Math.abs(d.x)>b&&(m="x"),m}function x_n(d){const{dragControls:b,visualElement:m}=d,v=BG(()=>new P_n(m));Ee.useEffect(()=>b&&b.subscribe(v),[v,b]),Ee.useEffect(()=>v.addListeners(),[v])}function I_n({onPan:d,onPanStart:b,onPanEnd:m,onPanSessionStart:v,visualElement:E}){const S=d||b||m||v,y=Ee.useRef(null),{transformPagePoint:$}=Ee.useContext(hbe),N={onSessionStart:v,onStart:b,onMove:d,onEnd:(H,z)=>{y.current=null,m&&m(H,z)}};Ee.useEffect(()=>{y.current!==null&&y.current.updateHandlers(N)});function B(H){y.current=new Bon(H,N,{transformPagePoint:$})}jG(E,"pointerdown",S&&B),fon(()=>y.current&&y.current.end())}const O_n={pan:$4(I_n),drag:$4(x_n)};function U0e(d){return typeof d=="string"&&d.startsWith("var(--")}const Gon=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function D_n(d){const b=Gon.exec(d);if(!b)return[,];const[,m,v]=b;return[m,v]}function W0e(d,b,m=1){const[v,E]=D_n(d);if(!v)return;const S=window.getComputedStyle(b).getPropertyValue(v);return S?S.trim():U0e(E)?W0e(E,b,m+1):E}function $_n(d,{...b},m){const v=d.current;if(!(v instanceof Element))return{target:b,transitionEnd:m};m&&(m={...m}),d.values.forEach(E=>{const S=E.get();if(!U0e(S))return;const y=W0e(S,v);y&&E.set(y)});for(const E in b){const S=b[E];if(!U0e(S))continue;const y=W0e(S,v);y&&(b[E]=y,m&&m[E]===void 0&&(m[E]=S))}return{target:b,transitionEnd:m}}const L_n=new Set(["width","height","top","left","right","bottom","x","y"]),zon=d=>L_n.has(d),F_n=d=>Object.keys(d).some(zon),Uon=(d,b)=>{d.set(b,!1),d.set(b)},xun=d=>d===G9||d===Ui;var Iun;(function(d){d.width="width",d.height="height",d.left="left",d.right="right",d.top="top",d.bottom="bottom"})(Iun||(Iun={}));const Oun=(d,b)=>parseFloat(d.split(", ")[b]),Dun=(d,b)=>(m,{transform:v})=>{if(v==="none"||!v)return 0;const E=v.match(/^matrix3d\((.+)\)$/);if(E)return Oun(E[1],b);{const S=v.match(/^matrix\((.+)\)$/);return S?Oun(S[1],d):0}},N_n=new Set(["x","y","z"]),__n=vG.filter(d=>!N_n.has(d));function B_n(d){const b=[];return __n.forEach(m=>{const v=d.getValue(m);v!==void 0&&(b.push([m,v.get()]),v.set(m.startsWith("scale")?1:0))}),b.length&&d.render(),b}const $un={width:({x:d},{paddingLeft:b="0",paddingRight:m="0"})=>d.max-d.min-parseFloat(b)-parseFloat(m),height:({y:d},{paddingTop:b="0",paddingBottom:m="0"})=>d.max-d.min-parseFloat(b)-parseFloat(m),top:(d,{top:b})=>parseFloat(b),left:(d,{left:b})=>parseFloat(b),bottom:({y:d},{top:b})=>parseFloat(b)+(d.max-d.min),right:({x:d},{left:b})=>parseFloat(b)+(d.max-d.min),x:Dun(4,13),y:Dun(5,14)},R_n=(d,b,m)=>{const v=b.measureViewportBox(),E=b.current,S=getComputedStyle(E),{display:y}=S,$={};y==="none"&&b.setStaticValue("display",d.display||"block"),m.forEach(B=>{$[B]=$un[B](v,S)}),b.render();const N=b.measureViewportBox();return m.forEach(B=>{const H=b.getValue(B);Uon(H,$[B]),d[B]=$un[B](N,S)}),d},K_n=(d,b,m={},v={})=>{b={...b},v={...v};const E=Object.keys(b).filter(zon);let S=[],y=!1;const $=[];if(E.forEach(N=>{const B=d.getValue(N);if(!d.hasValue(N))return;let H=m[N],z=nO(H);const Y=b[N];let Z;if(kG(Y)){const J=Y.length,qe=Y[0]===null?1:0;H=Y[qe],z=nO(H);for(let on=qe;on=0?window.pageYOffset:null,B=R_n(b,d,$);return S.length&&S.forEach(([H,z])=>{d.getValue(H).set(z)}),d.render(),H9&&N!==null&&window.scrollTo({top:N}),{target:B,transitionEnd:v}}else return{target:b,transitionEnd:v}};function q_n(d,b,m,v){return F_n(b)?K_n(d,b,m,v):{target:b,transitionEnd:v}}const H_n=(d,b,m,v)=>{const E=$_n(d,b,v);return b=E.target,v=E.transitionEnd,q_n(d,b,m,v)},X0e={current:null},Won={current:!1};function V_n(){if(Won.current=!0,!!H9)if(window.matchMedia){const d=window.matchMedia("(prefers-reduced-motion)"),b=()=>X0e.current=d.matches;d.addListener(b),b()}else X0e.current=!1}function G_n(d,b,m){const{willChange:v}=b;for(const E in b){const S=b[E],y=m[E];if(Gp(S))d.addValue(E,S),TG(v)&&v.add(E);else if(Gp(y))d.addValue(E,SE(S,{owner:d})),TG(v)&&v.remove(E);else if(y!==S)if(d.hasValue(E)){const $=d.getValue(E);!$.hasAnimated&&$.set(S)}else{const $=d.getStaticValue(E);d.addValue(E,SE($!==void 0?$:S))}}for(const E in m)b[E]===void 0&&d.removeValue(E);return b}const Xon=Object.keys(vO),z_n=Xon.length,Lun=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class U_n{constructor({parent:b,props:m,reducedMotionConfig:v,visualState:E},S={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Hd.render(this.render,!1,!0);const{latestValues:y,renderState:$}=E;this.latestValues=y,this.baseTarget={...y},this.initialValues=m.initial?{...y}:{},this.renderState=$,this.parent=b,this.props=m,this.depth=b?b.depth+1:0,this.reducedMotionConfig=v,this.options=S,this.isControllingVariants=_G(m),this.isVariantNode=Ksn(m),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(b&&b.current);const{willChange:N,...B}=this.scrapeMotionValuesFromProps(m);for(const H in B){const z=B[H];y[H]!==void 0&&Gp(z)&&(z.set(y[H],!1),TG(N)&&N.add(H))}}scrapeMotionValuesFromProps(b){return{}}mount(b){var m;this.current=b,this.projection&&this.projection.mount(b),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(m=this.parent)===null||m===void 0?void 0:m.addVariantChild(this)),this.values.forEach((v,E)=>this.bindToMotionValue(E,v)),Won.current||V_n(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:X0e.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var b,m,v;(b=this.projection)===null||b===void 0||b.unmount(),F4.update(this.notifyUpdate),F4.render(this.render),this.valueSubscriptions.forEach(E=>E()),(m=this.removeFromVariantTree)===null||m===void 0||m.call(this),(v=this.parent)===null||v===void 0||v.children.delete(this);for(const E in this.events)this.events[E].clear();this.current=null}bindToMotionValue(b,m){const v=V9.has(b),E=m.on("change",y=>{this.latestValues[b]=y,this.props.onUpdate&&Hd.update(this.notifyUpdate,!1,!0),v&&this.projection&&(this.projection.isTransformDirty=!0)}),S=m.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(b,()=>{E(),S()})}sortNodePosition(b){return!this.current||!this.sortInstanceNodePosition||this.type!==b.type?0:this.sortInstanceNodePosition(this.current,b.current)}loadFeatures(b,m,v,E,S,y){const $=[];for(let N=0;Nthis.scheduleRender(),animationType:typeof B=="string"?B:"both",initialPromotionConfig:y,layoutScroll:Y})}return $}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):cl()}getStaticValue(b){return this.latestValues[b]}setStaticValue(b,m){this.latestValues[b]=m}makeTargetAnimatable(b,m=!0){return this.makeTargetAnimatableFromInstance(b,this.props,m)}setProps(b){(b.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=b;for(let m=0;mv.variantChildren.delete(b)}addValue(b,m){this.hasValue(b)&&this.removeValue(b),this.values.set(b,m),this.latestValues[b]=m.get(),this.bindToMotionValue(b,m)}removeValue(b){var m;this.values.delete(b),(m=this.valueSubscriptions.get(b))===null||m===void 0||m(),this.valueSubscriptions.delete(b),delete this.latestValues[b],this.removeValueFromRenderState(b,this.renderState)}hasValue(b){return this.values.has(b)}getValue(b,m){if(this.props.values&&this.props.values[b])return this.props.values[b];let v=this.values.get(b);return v===void 0&&m!==void 0&&(v=SE(m,{owner:this}),this.addValue(b,v)),v}readValue(b){return this.latestValues[b]!==void 0||!this.current?this.latestValues[b]:this.readValueFromInstance(this.current,b,this.options)}setBaseTarget(b,m){this.baseTarget[b]=m}getBaseTarget(b){var m;const{initial:v}=this.props,E=typeof v=="string"||typeof v=="object"?(m=ybe(this.props,v))===null||m===void 0?void 0:m[b]:void 0;if(v&&E!==void 0)return E;const S=this.getBaseTargetFromProps(this.props,b);return S!==void 0&&!Gp(S)?S:this.initialValues[b]!==void 0&&E===void 0?void 0:this.baseTarget[b]}on(b,m){return this.events[b]||(this.events[b]=new Tbe),this.events[b].add(m)}notify(b,...m){var v;(v=this.events[b])===null||v===void 0||v.notify(...m)}}const Yon=["initial",..._be],W_n=Yon.length;class Qon extends U_n{sortInstanceNodePosition(b,m){return b.compareDocumentPosition(m)&2?1:-1}getBaseTargetFromProps(b,m){var v;return(v=b.style)===null||v===void 0?void 0:v[m]}removeValueFromRenderState(b,{vars:m,style:v}){delete m[b],delete v[b]}makeTargetAnimatableFromInstance({transition:b,transitionEnd:m,...v},{transformValues:E},S){let y=iNn(v,b||{},this);if(E&&(m&&(m=E(m)),v&&(v=E(v)),y&&(y=E(y))),S){nNn(this,v,y);const $=H_n(this,v,y,m);m=$.transitionEnd,v=$.target}return{transition:b,transitionEnd:m,...v}}}function X_n(d){return window.getComputedStyle(d)}class Y_n extends Qon{readValueFromInstance(b,m){if(V9.has(m)){const v=Sbe(m);return v&&v.default||0}else{const v=X_n(b),E=(Gsn(m)?v.getPropertyValue(m):v[m])||0;return typeof E=="string"?E.trim():E}}measureInstanceViewportBox(b,{transformPagePoint:m}){return Von(b,m)}build(b,m,v,E){bbe(b,m,v,E.transformTemplate)}scrapeMotionValuesFromProps(b){return vbe(b)}renderInstance(b,m,v,E){Ysn(b,m,v,E)}}class Q_n extends Qon{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(b,m){return b[m]}readValueFromInstance(b,m){var v;return V9.has(m)?((v=Sbe(m))===null||v===void 0?void 0:v.default)||0:(m=Qsn.has(m)?m:mbe(m),b.getAttribute(m))}measureInstanceViewportBox(){return cl()}scrapeMotionValuesFromProps(b){return Zsn(b)}build(b,m,v,E){gbe(b,m,v,this.isSVGTag,E.transformTemplate)}renderInstance(b,m,v,E){Jsn(b,m,v,E)}mount(b){this.isSVGTag=pbe(b.tagName),super.mount(b)}}const J_n=(d,b)=>dbe(d)?new Q_n(b,{enableHardwareAcceleration:!1}):new Y_n(b,{enableHardwareAcceleration:!0});function Fun(d,b){return b.max===b.min?0:d/(b.max-b.min)*100}const tO={correct:(d,b)=>{if(!b.target)return d;if(typeof d=="string")if(Ui.test(d))d=parseFloat(d);else return d;const m=Fun(d,b.target.x),v=Fun(d,b.target.y);return`${m}% ${v}%`}},Nun="_$css",Z_n={correct:(d,{treeScale:b,projectionDelta:m})=>{const v=d,E=d.includes("var("),S=[];E&&(d=d.replace(Gon,Z=>(S.push(Z),Nun)));const y=N4.parse(d);if(y.length>5)return v;const $=N4.createTransformer(d),N=typeof y[0]!="number"?1:0,B=m.x.scale*b.x,H=m.y.scale*b.y;y[0+N]/=B,y[1+N]/=H;const z=Bo(B,H,.5);typeof y[2+N]=="number"&&(y[2+N]/=z),typeof y[3+N]=="number"&&(y[3+N]/=z);let Y=$(y);if(E){let Z=0;Y=Y.replace(Nun,()=>{const J=S[Z];return Z++,J})}return Y}};class eBn extends gO.Component{componentDidMount(){const{visualElement:b,layoutGroup:m,switchLayoutGroup:v,layoutId:E}=this.props,{projection:S}=b;PLn(tBn),S&&(m.group&&m.group.add(S),v&&v.register&&E&&v.register(S),S.root.didUpdate(),S.addEventListener("animationComplete",()=>{this.safeToRemove()}),S.setOptions({...S.options,onExitComplete:()=>this.safeToRemove()})),lO.hasEverUpdated=!0}getSnapshotBeforeUpdate(b){const{layoutDependency:m,visualElement:v,drag:E,isPresent:S}=this.props,y=v.projection;return y&&(y.isPresent=S,E||b.layoutDependency!==m||m===void 0?y.willUpdate():this.safeToRemove(),b.isPresent!==S&&(S?y.promote():y.relegate()||Hd.postRender(()=>{var $;!(($=y.getStack())===null||$===void 0)&&$.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:b}=this.props.visualElement;b&&(b.root.didUpdate(),!b.currentAnimation&&b.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:b,layoutGroup:m,switchLayoutGroup:v}=this.props,{projection:E}=b;E&&(E.scheduleCheckAfterUnmount(),m!=null&&m.group&&m.group.remove(E),v!=null&&v.deregister&&v.deregister(E))}safeToRemove(){const{safeToRemove:b}=this.props;b==null||b()}render(){return null}}function nBn(d){const[b,m]=lon(),v=Ee.useContext(qsn);return gO.createElement(eBn,{...d,layoutGroup:v,switchLayoutGroup:Ee.useContext(Hsn),isPresent:b,safeToRemove:m})}const tBn={borderRadius:{...tO,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tO,borderTopRightRadius:tO,borderBottomLeftRadius:tO,borderBottomRightRadius:tO,boxShadow:Z_n},iBn={measureLayout:nBn};function rBn(d,b,m={}){const v=Gp(d)?d:SE(d);return v.start(Nbe("",v,b,m)),{stop:()=>v.stop(),isAnimating:()=>v.isAnimating()}}const Jon=["TopLeft","TopRight","BottomLeft","BottomRight"],cBn=Jon.length,_un=d=>typeof d=="string"?parseFloat(d):d,Bun=d=>typeof d=="number"||Ui.test(d);function uBn(d,b,m,v,E,S){E?(d.opacity=Bo(0,m.opacity!==void 0?m.opacity:1,sBn(v)),d.opacityExit=Bo(b.opacity!==void 0?b.opacity:1,0,oBn(v))):S&&(d.opacity=Bo(b.opacity!==void 0?b.opacity:1,m.opacity!==void 0?m.opacity:1,v));for(let y=0;yvb?1:m(CG(d,b,v))}function Kun(d,b){d.min=b.min,d.max=b.max}function sg(d,b){Kun(d.x,b.x),Kun(d.y,b.y)}function qun(d,b,m,v,E){return d-=b,d=PG(d,1/m,v),E!==void 0&&(d=PG(d,1/E,v)),d}function fBn(d,b=0,m=1,v=.5,E,S=d,y=d){if(Vp.test(b)&&(b=parseFloat(b),b=Bo(y.min,y.max,b/100)-y.min),typeof b!="number")return;let $=Bo(S.min,S.max,v);d===S&&($-=b),d.min=qun(d.min,b,m,$,E),d.max=qun(d.max,b,m,$,E)}function Hun(d,b,[m,v,E],S,y){fBn(d,b[m],b[v],b[E],b.scale,S,y)}const lBn=["x","scaleX","originX"],aBn=["y","scaleY","originY"];function Vun(d,b,m,v){Hun(d.x,b,lBn,m==null?void 0:m.x,v==null?void 0:v.x),Hun(d.y,b,aBn,m==null?void 0:m.y,v==null?void 0:v.y)}function Gun(d){return d.translate===0&&d.scale===1}function efn(d){return Gun(d.x)&&Gun(d.y)}function nfn(d,b){return d.x.min===b.x.min&&d.x.max===b.x.max&&d.y.min===b.y.min&&d.y.max===b.y.max}function zun(d){return Vd(d.x)/Vd(d.y)}class hBn{constructor(){this.members=[]}add(b){jbe(this.members,b),b.scheduleRender()}remove(b){if(Ebe(this.members,b),b===this.prevLead&&(this.prevLead=void 0),b===this.lead){const m=this.members[this.members.length-1];m&&this.promote(m)}}relegate(b){const m=this.members.findIndex(E=>b===E);if(m===0)return!1;let v;for(let E=m;E>=0;E--){const S=this.members[E];if(S.isPresent!==!1){v=S;break}}return v?(this.promote(v),!0):!1}promote(b,m){var v;const E=this.lead;if(b!==E&&(this.prevLead=E,this.lead=b,b.show(),E)){E.instance&&E.scheduleRender(),b.scheduleRender(),b.resumeFrom=E,m&&(b.resumeFrom.preserveOpacity=!0),E.snapshot&&(b.snapshot=E.snapshot,b.snapshot.latestValues=E.animationValues||E.latestValues),!((v=b.root)===null||v===void 0)&&v.isUpdating&&(b.isLayoutDirty=!0);const{crossfade:S}=b.options;S===!1&&E.hide()}}exitAnimationComplete(){this.members.forEach(b=>{var m,v,E,S,y;(v=(m=b.options).onExitComplete)===null||v===void 0||v.call(m),(y=(E=b.resumingFrom)===null||E===void 0?void 0:(S=E.options).onExitComplete)===null||y===void 0||y.call(S)})}scheduleRender(){this.members.forEach(b=>{b.instance&&b.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Uun(d,b,m){let v="";const E=d.x.translate/b.x,S=d.y.translate/b.y;if((E||S)&&(v=`translate3d(${E}px, ${S}px, 0) `),(b.x!==1||b.y!==1)&&(v+=`scale(${1/b.x}, ${1/b.y}) `),m){const{rotate:N,rotateX:B,rotateY:H}=m;N&&(v+=`rotate(${N}deg) `),B&&(v+=`rotateX(${B}deg) `),H&&(v+=`rotateY(${H}deg) `)}const y=d.x.scale*b.x,$=d.y.scale*b.y;return(y!==1||$!==1)&&(v+=`scale(${y}, ${$})`),v||"none"}const dBn=(d,b)=>d.depth-b.depth;class bBn{constructor(){this.children=[],this.isDirty=!1}add(b){jbe(this.children,b),this.isDirty=!0}remove(b){Ebe(this.children,b),this.isDirty=!0}forEach(b){this.isDirty&&this.children.sort(dBn),this.isDirty=!1,this.children.forEach(b)}}const Wun=["","X","Y","Z"],Xun=1e3;let wBn=0;function tfn({attachResizeListener:d,defaultParent:b,measureScroll:m,checkIsScrollRoot:v,resetTransform:E}){return class{constructor(y,$={},N=b==null?void 0:b()){this.id=wBn++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(mBn),this.nodes.forEach(kBn),this.nodes.forEach(jBn)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=y,this.latestValues=$,this.root=N?N.root||N:this,this.path=N?[...N.path,N]:[],this.parent=N,this.depth=N?N.depth+1:0,y&&this.root.registerPotentialNode(y,this);for(let B=0;Bthis.root.updateBlockedByResize=!1;d(y,()=>{this.root.updateBlockedByResize=!0,Y&&Y(),Y=$on(Z,250),lO.hasAnimatedSinceResize&&(lO.hasAnimatedSinceResize=!1,this.nodes.forEach(Qun))})}B&&this.root.registerSharedNode(B,this),this.options.animate!==!1&&z&&(B||H)&&this.addEventListener("didUpdate",({delta:Y,hasLayoutChanged:Z,hasRelativeTargetChanged:J,layout:qe})=>{var on,bn,xn,Ue,mn;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const bt=(bn=(on=this.options.transition)!==null&&on!==void 0?on:z.getDefaultTransition())!==null&&bn!==void 0?bn:SBn,{onLayoutAnimationStart:_t,onLayoutAnimationComplete:Mi}=z.getProps(),li=!this.targetLayout||!nfn(this.targetLayout,qe)||J,sc=!Z&&J;if(!((xn=this.resumeFrom)===null||xn===void 0)&&xn.instance||sc||Z&&(li||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(Y,sc);const Zi={...Lon(bt,"layout"),onPlay:_t,onComplete:Mi};z.shouldReduceMotion&&(Zi.delay=0,Zi.type=!1),this.startAnimation(Zi)}else!Z&&this.animationProgress===0&&Qun(this),this.isLead()&&((mn=(Ue=this.options).onExitComplete)===null||mn===void 0||mn.call(Ue));this.targetLayout=qe})}unmount(){var y,$;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(y=this.getStack())===null||y===void 0||y.remove(this),($=this.parent)===null||$===void 0||$.children.delete(this),this.instance=void 0,F4.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var y;return this.isAnimationBlocked||((y=this.parent)===null||y===void 0?void 0:y.isTreeAnimationBlocked())||!1}startUpdate(){var y;this.isUpdateBlocked()||(this.isUpdating=!0,(y=this.nodes)===null||y===void 0||y.forEach(EBn),this.animationId++)}willUpdate(y=!0){var $,N,B;if(this.root.isUpdateBlocked()){(N=($=this.options).onExitComplete)===null||N===void 0||N.call($);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let Z=0;Z{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var y;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let N=0;N{var Ue;const mn=xn/1e3;Jun(Z.x,y.x,mn),Jun(Z.y,y.y,mn),this.setTargetDelta(Z),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((Ue=this.relativeParent)===null||Ue===void 0)&&Ue.layout)&&(bO(J,this.layout.layoutBox,this.relativeParent.layout.layoutBox),CBn(this.relativeTarget,this.relativeTargetOrigin,J,mn)),qe&&(this.animationValues=Y,uBn(Y,z,this.latestValues,mn,bn,on)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=mn},this.mixTargetDelta(0)}startAnimation(y){var $,N;this.notifyListeners("animationStart"),($=this.currentAnimation)===null||$===void 0||$.stop(),this.resumingFrom&&((N=this.resumingFrom.currentAnimation)===null||N===void 0||N.stop()),this.pendingAnimation&&(F4.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Hd.update(()=>{lO.hasAnimatedSinceResize=!0,this.currentAnimation=rBn(0,Xun,{...y,onUpdate:B=>{var H;this.mixTargetDelta(B),(H=y.onUpdate)===null||H===void 0||H.call(y,B)},onComplete:()=>{var B;(B=y.onComplete)===null||B===void 0||B.call(y),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var y;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(y=this.getStack())===null||y===void 0||y.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var y;this.currentAnimation&&((y=this.mixTargetDelta)===null||y===void 0||y.call(this,Xun),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const y=this.getLead();let{targetWithTransforms:$,target:N,layout:B,latestValues:H}=y;if(!(!$||!N||!B)){if(this!==y&&this.layout&&B&&ifn(this.options.animationType,this.layout.layoutBox,B.layoutBox)){N=this.target||cl();const z=Vd(this.layout.layoutBox.x);N.x.min=y.target.x.min,N.x.max=N.x.min+z;const Y=Vd(this.layout.layoutBox.y);N.y.min=y.target.y.min,N.y.max=N.y.min+Y}sg($,N),vE($,H),dO(this.projectionDeltaWithTransform,this.layoutCorrected,$,H)}}registerSharedNode(y,$){var N,B,H;this.sharedNodes.has(y)||this.sharedNodes.set(y,new hBn),this.sharedNodes.get(y).add($),$.promote({transition:(N=$.options.initialPromotionConfig)===null||N===void 0?void 0:N.transition,preserveFollowOpacity:(H=(B=$.options.initialPromotionConfig)===null||B===void 0?void 0:B.shouldPreserveFollowOpacity)===null||H===void 0?void 0:H.call(B,$)})}isLead(){const y=this.getStack();return y?y.lead===this:!0}getLead(){var y;const{layoutId:$}=this.options;return $?((y=this.getStack())===null||y===void 0?void 0:y.lead)||this:this}getPrevLead(){var y;const{layoutId:$}=this.options;return $?(y=this.getStack())===null||y===void 0?void 0:y.prevLead:void 0}getStack(){const{layoutId:y}=this.options;if(y)return this.root.sharedNodes.get(y)}promote({needsReset:y,transition:$,preserveFollowOpacity:N}={}){const B=this.getStack();B&&B.promote(this,N),y&&(this.projectionDelta=void 0,this.needsReset=!0),$&&this.setOptions({transition:$})}relegate(){const y=this.getStack();return y?y.relegate(this):!1}resetRotation(){const{visualElement:y}=this.options;if(!y)return;let $=!1;const{latestValues:N}=y;if((N.rotate||N.rotateX||N.rotateY||N.rotateZ)&&($=!0),!$)return;const B={};for(let H=0;H{var $;return($=y.currentAnimation)===null||$===void 0?void 0:$.stop()}),this.root.nodes.forEach(Yun),this.root.sharedNodes.clear()}}}function gBn(d){d.updateLayout()}function pBn(d){var b,m,v;const E=((b=d.resumeFrom)===null||b===void 0?void 0:b.snapshot)||d.snapshot;if(d.isLead()&&d.layout&&E&&d.hasListeners("didUpdate")){const{layoutBox:S,measuredBox:y}=d.layout,{animationType:$}=d.options,N=E.source!==d.layout.source;$==="size"?Hp(Z=>{const J=N?E.measuredBox[Z]:E.layoutBox[Z],qe=Vd(J);J.min=S[Z].min,J.max=J.min+qe}):ifn($,E.layoutBox,S)&&Hp(Z=>{const J=N?E.measuredBox[Z]:E.layoutBox[Z],qe=Vd(S[Z]);J.max=J.min+qe});const B=wO();dO(B,S,E.layoutBox);const H=wO();N?dO(H,d.applyTransform(y,!0),E.measuredBox):dO(H,S,E.layoutBox);const z=!efn(B);let Y=!1;if(!d.resumeFrom){const Z=d.getClosestProjectingParent();if(Z&&!Z.resumeFrom){const{snapshot:J,layout:qe}=Z;if(J&&qe){const on=cl();bO(on,E.layoutBox,J.layoutBox);const bn=cl();bO(bn,S,qe.layoutBox),nfn(on,bn)||(Y=!0)}}}d.notifyListeners("didUpdate",{layout:S,snapshot:E,delta:H,layoutDelta:B,hasLayoutChanged:z,hasRelativeTargetChanged:Y})}else d.isLead()&&((v=(m=d.options).onExitComplete)===null||v===void 0||v.call(m));d.options.transition=void 0}function mBn(d){d.isProjectionDirty||(d.isProjectionDirty=!!(d.parent&&d.parent.isProjectionDirty)),d.isTransformDirty||(d.isTransformDirty=!!(d.parent&&d.parent.isTransformDirty))}function vBn(d){d.clearSnapshot()}function Yun(d){d.clearMeasurements()}function yBn(d){const{visualElement:b}=d.options;b!=null&&b.getProps().onBeforeLayoutMeasure&&b.notify("BeforeLayoutMeasure"),d.resetTransform()}function Qun(d){d.finishAnimation(),d.targetDelta=d.relativeTarget=d.target=void 0}function kBn(d){d.resolveTargetDelta()}function jBn(d){d.calcProjection()}function EBn(d){d.resetRotation()}function TBn(d){d.removeLeadSnapshot()}function Jun(d,b,m){d.translate=Bo(b.translate,0,m),d.scale=Bo(b.scale,1,m),d.origin=b.origin,d.originPoint=b.originPoint}function Zun(d,b,m,v){d.min=Bo(b.min,m.min,v),d.max=Bo(b.max,m.max,v)}function CBn(d,b,m,v){Zun(d.x,b.x,m.x,v),Zun(d.y,b.y,m.y,v)}function MBn(d){return d.animationValues&&d.animationValues.opacityExit!==void 0}const SBn={duration:.45,ease:[.4,0,.1,1]};function PBn(d,b){let m=d.root;for(let S=d.path.length-1;S>=0;S--)if(d.path[S].instance){m=d.path[S];break}const E=(m&&m!==d.root?m.instance:document).querySelector(`[data-projection-id="${b}"]`);E&&d.mount(E,!0)}function esn(d){d.min=Math.round(d.min),d.max=Math.round(d.max)}function ABn(d){esn(d.x),esn(d.y)}function ifn(d,b,m){return d==="position"||d==="preserve-aspect"&&!H0e(zun(b),zun(m),.2)}const xBn=tfn({attachResizeListener:(d,b)=>RG(d,"resize",b),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),j0e={current:void 0},IBn=tfn({measureScroll:d=>({x:d.scrollLeft,y:d.scrollTop}),defaultParent:()=>{if(!j0e.current){const d=new xBn(0,{});d.mount(window),d.setOptions({layoutScroll:!0}),j0e.current=d}return j0e.current},resetTransform:(d,b)=>{d.style.transform=b!==void 0?b:"none"},checkIsScrollRoot:d=>window.getComputedStyle(d).position==="fixed"}),OBn={...l_n,...AFn,...O_n,...iBn},K9=MLn((d,b)=>rFn(d,b,OBn,J_n,IBn));function DBn(){let d=!1;const b=[],m=new Set,v={subscribe(E){return m.add(E),()=>void m.delete(E)},start(E,S){if(d){const y=[];return m.forEach($=>{y.push(Non($,E,{transitionOverride:S}))}),Promise.all(y)}else return new Promise(y=>{b.push({animation:[E,S],resolve:y})})},set(E){return m.forEach(S=>{eNn(S,E)})},stop(){m.forEach(E=>{n_n(E)})},mount(){return d=!0,b.forEach(({animation:E,resolve:S})=>{v.start(...E).then(S)}),()=>{d=!1,v.stop()}}};return v}function $Bn(){const d=BG(DBn);return Ee.useEffect(d.mount,[]),d}const LBn=$Bn;function Y0e(d,b){return d.map(function(m,v){return m+b[v]})}function Bbe(d,b){return d.map(function(m,v){return m-b[v]})}function jO(d){return Math.hypot.apply(Math,d)}function rfn(d,b){b===void 0&&(b=d);var m=jO(b),v=m===0?0:1/m,E=b.map(function(y){return v*y}),S=jO(d);return{distance:S,direction:E}}function cfn(d,b,m){var v=jO(b),E=v===0?0:1/v,S=m===0?0:1/m,y=S*v,$=b.map(function(H){return S*H}),N=b.map(function(H){return E*H}),B=jO(d);return{velocities:$,velocity:y,distance:B,direction:N}}function AG(d){return Math.sign?Math.sign(d):+(d>0)-+(d<0)||+d}function FBn(d,b,m){return Math.max(b,Math.min(d,m))}function NBn(d,b){return Math.pow(d,b*5)}function nsn(d,b,m){return b===0||Math.abs(b)===1/0?NBn(d,m):d*b*m/(b+m*d)}function tsn(d,b,m,v){return v===void 0&&(v=.15),v===0?FBn(d,b,m):dm?+nsn(d-m,m-b,v)+m:d}function isn(d,b){for(var m=0;m=0)&&(m[E]=d[E]);return m}function hs(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function RBn(d,b){if(d){if(typeof d=="string")return rsn(d,b);var m=Object.prototype.toString.call(d).slice(8,-1);if(m==="Object"&&d.constructor&&(m=d.constructor.name),m==="Map"||m==="Set")return Array.from(d);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return rsn(d,b)}}function rsn(d,b){(b==null||b>d.length)&&(b=d.length);for(var m=0,v=new Array(b);m"u"||d[Symbol.iterator]==null){if(Array.isArray(d)||(m=RBn(d))||b&&d&&typeof d.length=="number"){m&&(d=m);var v=0;return function(){return v>=d.length?{done:!0}:{done:!1,value:d[v++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return m=d[Symbol.iterator](),m.next.bind(m)}function ufn(){}function sfn(){for(var d=arguments.length,b=new Array(d),m=0;m1?b-1:0),v=1;v0,H},swipeVelocity:function(b){return b===void 0&&(b=HBn),D4(b)},swipeDistance:function(b){return b===void 0&&(b=VBn),D4(b)},delay:function(b){switch(b===void 0&&(b=0),b){case!0:return KBn;case!1:return 0;default:return b}}});function ffn(d){return d===void 0&&(d={}),IO(d,zBn)}function E0e(d){return d===void 0&&(d={}),IO(d,Rbe)}function XBn(d){return d===void 0&&(d={}),IO(d,UBn)}function lfn(d){return d===void 0&&(d={}),IO(d,WBn)}function YBn(d){var b=d.domTarget,m=d.eventOptions,v=d.window,E=d.enabled,S=BBn(d,["domTarget","eventOptions","window","enabled"]),y=ffn({domTarget:b,eventOptions:m,window:v,enabled:E});return y.drag=lfn(S),y}function QBn(d,b){d===void 0&&(d={}),b===void 0&&(b=new Set);var m=d,v=m.drag,E=m.wheel,S=m.move,y=m.scroll,$=m.pinch,N=m.hover,B=m.eventOptions,H=m.window,z=m.domTarget,Y=m.enabled,Z=ffn({eventOptions:B,window:H,domTarget:z,enabled:Y});return b.has("onDrag")&&(Z.drag=lfn(v)),b.has("onWheel")&&(Z.wheel=E0e(E)),b.has("onScroll")&&(Z.scroll=E0e(y)),b.has("onMove")&&(Z.move=E0e(S)),b.has("onPinch")&&(Z.pinch=XBn($)),b.has("onHover")&&(Z.hover=pc({enabled:!0},N)),Z}function iO(d){return pc({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:ufn,canceled:!1,memo:void 0,args:void 0},d)}function afn(){var d={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},b=iO({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),m=iO({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),v=iO({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),E=iO({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),S=iO({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:d,drag:b,pinch:m,wheel:v,move:E,scroll:S}}var qd=new Map,hfn=function(){function d(m,v){var E=this;v===void 0&&(v=[]),this.controller=m,this.args=v,this.debounced=!0,this.setTimeout=function(S,y){var $;y===void 0&&(y=140),clearTimeout(E.controller.timeouts[E.stateKey]);for(var N=arguments.length,B=new Array(N>2?N-2:0),H=2;H=b?AG(d)*b:!1}function ssn(d,b,m){var v=b[0],E=b[1],S=m[0],y=m[1],$=d[0],N=$[0],B=$[1],H=d[1],z=H[0],Y=H[1];return[tsn(v,N,B,S),tsn(E,z,Y,y)]}function ul(d,b,m){var v=d.state,E=d.args,S=b.timeStamp,y=b.type,$=v.values,N=m?0:S-v.startTime;return{_lastEventType:y,event:b,timeStamp:S,elapsedTime:N,args:E,previous:$}}function R9(d,b,m){var v=d.state.offset,E=m.timeStamp;return pc({},afn()[d.stateKey],{_active:!0,values:b,initial:b,offset:v,lastOffset:v,startTime:E})}function JBn(d,b){return function(m){for(var v=arguments.length,E=new Array(v>1?v-1:0),S=1;SN?"x":$0?b:m}return null}function Kd(d){var b="buttons"in d?d.buttons:0,m=pfn(d),v=m&&m.length||0,E=v>0||b>0,S=d.shiftKey,y=d.altKey,$=d.metaKey,N=d.ctrlKey;return{touches:v,down:E,buttons:b,shiftKey:S,altKey:y,metaKey:$,ctrlKey:N}}function kE(d){var b=pfn(d),m=b?b[0]:d,v=m.clientX,E=m.clientY;return[v,E]}function lRn(d){var b=d.currentTarget,m=b.scrollX,v=b.scrollY,E=b.scrollLeft,S=b.scrollTop;return[m||E||0,v||S||0]}function mfn(d){var b=d.deltaX,m=d.deltaY;return[b,m]}function osn(d){return[d.scale*sRn,d.rotation]}function fsn(d){var b,m=d.targetTouches,v=m[0],E=m[1],S=E.clientX-v.clientX,y=E.clientY-v.clientY,$=(E.clientX+v.clientX)/2,N=(E.clientY+v.clientY)/2,B="nativeEvent"in d?d.nativeEvent:d,H=Math.hypot(S,y),z=(b=B.rotation)!=null?b:-(Math.atan2(S,y)*180)/Math.PI,Y=[H,z],Z=[$,N];return{values:Y,origin:Z}}var aRn=3,hRn=220,vfn=function(d){z9(b,d);function b(){var v;return v=d.apply(this,arguments)||this,v.ingKey="dragging",v.stateKey="drag",v.onDragStart=function(E){!v.enabled||v.state._active||(tRn(v.controller,v.stateKey,[["pointermove",v.onDragChange],["pointerup",v.onDragEnd],["pointercancel",v.onDragEnd]]),v.updateGestureState({_pointerId:E.pointerId}),v.config.delay>0?(v.state._delayedEvent=!0,"persist"in E&&typeof E.persist=="function"&&E.persist(),v.setTimeout(v.startDrag.bind(hs(v)),v.config.delay,E)):v.startDrag(E))},v.onDragChange=function(E){if(!v.state.canceled&&E.pointerId===v.state._pointerId){if(!v.state._active){v.state._delayedEvent&&(v.clearTimeout(),v.startDrag(E));return}var S=Kd(E);if(!S.down){v.onDragEnd(E);return}v.updateSharedState(S);var y=kE(E),$=v.getKinematics(y,E),N=ul(hs(v),E),B=v.state._isTap,H=jO($._movement);B&&H>=aRn&&(B=!1),v.updateGestureState(pc({},N,$,{_isTap:B})),v.fireGestureHandler()}},v.onDragEnd=function(E){if(E.pointerId===v.state._pointerId){v.state._active=!1,v.updateSharedState({down:!1,buttons:0,touches:0});var S=v.state._isTap,y=v.state.velocities,$=y[0],N=y[1],B=v.state.movement,H=B[0],z=B[1],Y=v.state._intentional,Z=Y[0],J=Y[1],qe=v.config.swipeVelocity,on=qe[0],bn=qe[1],xn=v.config.swipeDistance,Ue=xn[0],mn=xn[1],bt=pc({},ul(hs(v),E),v.getMovement(v.state.values)),_t=[0,0];bt.elapsedTimeon&&Math.abs(H)>Ue&&(_t[0]=AG($)),J!==!1&&Math.abs(N)>bn&&Math.abs(z)>mn&&(_t[1]=AG(N))),v.updateGestureState(pc({},bt,{tap:S,swipe:_t})),v.fireGestureHandler(S===!0)}},v.clean=function(){d.prototype.clean.call(hs(v)),v.state._delayedEvent=!1,nRn(v.controller,v.stateKey)},v.onCancel=function(){v.state.canceled||(v.updateGestureState({canceled:!0}),v.state._active=!1,v.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return v.fireGestureHandler()}))},v.onClick=function(E){v.state._isTap||E.stopPropagation()},v}var m=b.prototype;return m.startDrag=function(E){var S=kE(E);this.updateSharedState(Kd(E)),this.updateGestureState(pc({},R9(this,S,E),ul(this,E,!0),{_pointerId:E.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(S)),this.fireGestureHandler()},m.addBindings=function(E){if(Na(E,"onPointerDown",this.onDragStart),this.config.filterTaps){var S=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Na(E,S,this.onClick)}},b}(GG);function dRn(d,b){var m,v=[],E,S=!1;function y(){for(var $=arguments.length,N=new Array($),B=0;B<$;B++)N[B]=arguments[B];return S&&m===this&&b(N,v)||(E=d.apply(this,N),S=!0,m=this,v=N),E}return y}function dG(d,b){if(d===b)return!0;if(d&&b&&typeof d=="object"&&typeof b=="object"){if(d.constructor!==b.constructor)return!1;var m,v,E;if(Array.isArray(d)){if(m=d.length,m!==b.length)return!1;for(v=m;v--!==0;)if(!dG(d[v],b[v]))return!1;return!0}var S;if(typeof Map=="function"&&d instanceof Map&&b instanceof Map){if(d.size!==b.size)return!1;for(S=d.entries();!(v=S.next()).done;)if(!b.has(v.value[0]))return!1;for(S=d.entries();!(v=S.next()).done;)if(!dG(v.value[1],b.get(v.value[0])))return!1;return!0}if(typeof Set=="function"&&d instanceof Set&&b instanceof Set){if(d.size!==b.size)return!1;for(S=d.entries();!(v=S.next()).done;)if(!b.has(v.value[0]))return!1;return!0}if(d.constructor===RegExp)return d.source===b.source&&d.flags===b.flags;if(d.valueOf!==Object.prototype.valueOf)return d.valueOf()===b.valueOf();if(d.toString!==Object.prototype.toString)return d.toString()===b.toString();if(E=Object.keys(d),m=E.length,m!==Object.keys(b).length)return!1;for(v=m;v--!==0;)if(!Object.prototype.hasOwnProperty.call(b,E[v]))return!1;if(typeof Element<"u"&&d instanceof Element)return!1;for(v=m;v--!==0;)if(!(E[v]==="_owner"&&d.$$typeof)&&!dG(d[E[v]],b[E[v]]))return!1;return!0}return d!==d&&b!==b}function bRn(d,b){try{return dG(d,b)}catch(m){if((m.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw m}}function wRn(d,b){b===void 0&&(b={}),qd.set("drag",vfn);var m=Ee.useRef();return m.current||(m.current=dRn(YBn,bRn)),gfn({drag:d},m.current(b))}var gRn=function(d){z9(b,d);function b(){return d.apply(this,arguments)||this}var m=b.prototype;return m.getInternalMovement=function(E,S){var y=S.values[1],$=E[0],N=E[1],B=N===void 0?y:N,H=B-y,z=S.turns;return Math.abs(H)>270&&(z+=AG(H)),Bbe([$,B-360*z],S.initial)},m.getKinematics=function(E,S){var y=this.getMovement(E),$=(E[1]-y.movement[1]-this.state.initial[1])/360,N=S.timeStamp-this.state.timeStamp,B=cfn(y.movement,y.delta,N);return pc({turns:$},y,B)},m.mapStateValues=function(E){return{da:E.values,vdva:E.velocities}},b}(hfn),pRn=function(d){z9(b,d);function b(){var v;return v=d.apply(this,arguments)||this,v.ingKey="pinching",v.stateKey="pinch",v.pinchShouldStart=function(E){var S=Kd(E),y=S.touches;return v.enabled&&y===2},v.onPinchStart=function(E){if(v.pinchShouldStart(E)){var S=fsn(E),y=S.values,$=S.origin;v.updateSharedState(Kd(E)),v.updateGestureState(pc({},R9(hs(v),y,E),ul(hs(v),E,!0),{cancel:v.onCancel,origin:$})),v.updateGestureState(v.getMovement(y)),v.fireGestureHandler()}},v.onPinchChange=function(E){var S=v.state,y=S.canceled,$=S._active;if(!(y||!$)){var N=Kd(E);v.updateSharedState(N);var B=fsn(E),H=B.values,z=B.origin,Y=v.getKinematics(H,E);v.updateGestureState(pc({},ul(hs(v),E),Y,{origin:z})),v.fireGestureHandler()}},v.onPinchEnd=function(E){v.state.active&&(v.state._active=!1,v.updateSharedState({down:!1,touches:0}),v.updateGestureState(pc({},ul(hs(v),E),v.getMovement(v.state.values))),v.fireGestureHandler())},v.onCancel=function(){v.state.canceled||(v.state._active=!1,v.updateGestureState({canceled:!0}),v.updateSharedState({down:!1,touches:0}),requestAnimationFrame(function(){return v.fireGestureHandler()}))},v.onGestureStart=function(E){if(v.enabled){E.preventDefault();var S=osn(E);v.updateSharedState(Kd(E)),v.updateGestureState(pc({},R9(hs(v),S,E),ul(hs(v),E,!0),{origin:[E.clientX,E.clientY],cancel:v.onCancel})),v.updateGestureState(v.getMovement(S)),v.fireGestureHandler()}},v.onGestureChange=function(E){var S=v.state,y=S.canceled,$=S._active;if(!(y||!$)){E.preventDefault();var N=Kd(E);v.updateSharedState(N);var B=osn(E),H=v.getKinematics(B,E);v.updateGestureState(pc({},ul(hs(v),E),H,{origin:[E.clientX,E.clientY]})),v.fireGestureHandler()}},v.onGestureEnd=function(E){E.preventDefault(),v.state.active&&(v.state._active=!1,v.updateSharedState({down:!1,touches:0}),v.updateGestureState(pc({},ul(hs(v),E),v.getMovement(v.state.values),{origin:[E.clientX,E.clientY]})),v.fireGestureHandler())},v.wheelShouldRun=function(E){return v.enabled&&E.ctrlKey},v.getWheelValuesFromEvent=function(E){var S=mfn(E),y=S[1],$=v.state.values,N=$[0],B=$[1],H=N-y,z=B!==void 0?B:0;return{values:[H,z],origin:[E.clientX,E.clientY],delta:[0,y]}},v.onWheel=function(E){v.wheelShouldRun(E)&&(v.setTimeout(v.onWheelEnd),v.state._active?v.onWheelChange(E):v.onWheelStart(E))},v.onWheelStart=function(E){var S=v.getWheelValuesFromEvent(E),y=S.values,$=S.delta,N=S.origin;E.cancelable&&E.preventDefault(),v.updateSharedState(Kd(E)),v.updateGestureState(pc({},R9(hs(v),y,E),ul(hs(v),E,!0),{initial:v.state.values,offset:y,delta:$,origin:N})),v.updateGestureState(v.getMovement(y)),v.fireGestureHandler()},v.onWheelChange=function(E){v.updateSharedState(Kd(E));var S=v.getWheelValuesFromEvent(E),y=S.values,$=S.origin,N=S.delta;v.updateGestureState(pc({},ul(hs(v),E),v.getKinematics(y,E),{origin:$,delta:N})),v.fireGestureHandler()},v.onWheelEnd=function(){v.state._active=!1,v.updateGestureState(v.getMovement(v.state.values)),v.fireGestureHandler()},v}var m=b.prototype;return m.addBindings=function(E){this.controller.config.domTarget&&!fRn()&&oRn()?(Na(E,"onGestureStart",this.onGestureStart),Na(E,"onGestureChange",this.onGestureChange),Na(E,"onGestureEnd",this.onGestureEnd)):(Na(E,"onTouchStart",this.onPinchStart),Na(E,"onTouchMove",this.onPinchChange),Na(E,"onTouchEnd",this.onPinchEnd),Na(E,"onTouchCancel",this.onPinchEnd),Na(E,"onWheel",this.onWheel))},b}(gRn),mRn=function(d){z9(b,d);function b(){var v;return v=d.apply(this,arguments)||this,v.ingKey="wheeling",v.stateKey="wheel",v.debounced=!0,v.handleEvent=function(E){if(!(E.ctrlKey&&"pinch"in v.controller.handlers)&&v.enabled){v.setTimeout(v.onEnd),v.updateSharedState(Kd(E));var S=Y0e(mfn(E),v.state.values);if(v.state._active)v.updateGestureState(pc({},ul(hs(v),E),v.getKinematics(S,E)));else{v.updateGestureState(pc({},R9(hs(v),S,E),ul(hs(v),E,!0),{initial:v.state.values}));var y=v.getMovement(S),$=rfn(y.delta);v.updateGestureState(y),v.updateGestureState($)}v.fireGestureHandler()}},v.onEnd=function(){var E=v.getMovement(v.state.values);v.updateGestureState(E),v.updateGestureState({_active:!1,velocities:[0,0],velocity:0}),v.fireGestureHandler()},v}var m=b.prototype;return m.addBindings=function(E){Na(E,"onWheel",this.handleEvent)},b}(GG),lsn=function(d){z9(b,d);function b(){var v;return v=d.apply(this,arguments)||this,v.ingKey="moving",v.stateKey="move",v.debounced=!0,v.onMove=function(E){v.enabled&&(v.setTimeout(v.onMoveEnd),v.state._active?v.onMoveChange(E):v.onMoveStart(E))},v.onMoveStart=function(E){v.updateSharedState(Kd(E));var S=kE(E);v.updateGestureState(pc({},R9(hs(v),S,E),ul(hs(v),E,!0))),v.updateGestureState(v.getMovement(S)),v.fireGestureHandler()},v.onMoveChange=function(E){v.updateSharedState(Kd(E));var S=kE(E);v.updateGestureState(pc({},ul(hs(v),E),v.getKinematics(S,E))),v.fireGestureHandler()},v.onMoveEnd=function(){var E=v.state.values;v.updateGestureState(v.getMovement(E)),v.updateGestureState({velocities:[0,0],velocity:0,_active:!1}),v.fireGestureHandler()},v.onPointerEnter=function(E){if(v.controller.state.shared.hovering=!0,!!v.controller.config.enabled){if(v.controller.config.hover.enabled){var S=kE(E),y=pc({},v.controller.state.shared,v.state,ul(hs(v),E,!0),{values:S,active:!0,hovering:!0});v.controller.handlers.hover(pc({},y,v.mapStateValues(y)))}"move"in v.controller.handlers&&v.onMoveStart(E)}},v.onPointerLeave=function(E){if(v.controller.state.shared.hovering=!1,"move"in v.controller.handlers&&v.onMoveEnd(),!!v.controller.config.hover.enabled){var S=kE(E),y=pc({},v.controller.state.shared,v.state,ul(hs(v),E),{values:S,active:!1});v.controller.handlers.hover(pc({},y,v.mapStateValues(y)))}},v}var m=b.prototype;return m.addBindings=function(E){"move"in this.controller.handlers&&Na(E,"onPointerMove",this.onMove),"hover"in this.controller.handlers&&(Na(E,"onPointerEnter",this.onPointerEnter),Na(E,"onPointerLeave",this.onPointerLeave))},b}(GG),vRn=function(d){z9(b,d);function b(){var v;return v=d.apply(this,arguments)||this,v.ingKey="scrolling",v.stateKey="scroll",v.debounced=!0,v.handleEvent=function(E){if(v.enabled){v.clearTimeout(),v.setTimeout(v.onEnd);var S=lRn(E);if(v.updateSharedState(Kd(E)),v.state._active)v.updateGestureState(pc({},ul(hs(v),E),v.getKinematics(S,E)));else{v.updateGestureState(pc({},R9(hs(v),S,E),ul(hs(v),E,!0),{initial:v.state.values}));var y=v.getMovement(S),$=rfn(y.delta);v.updateGestureState(y),v.updateGestureState($)}v.fireGestureHandler()}},v.onEnd=function(){v.state._active=!1,v.updateGestureState(pc({},v.getMovement(v.state.values),{velocities:[0,0],velocity:0})),v.fireGestureHandler()},v}var m=b.prototype;return m.addBindings=function(E){Na(E,"onScroll",this.handleEvent)},b}(GG),yRn=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function kRn(d){var b={},m={},v=new Set;for(var E in d)yRn.test(E)?(v.add(RegExp.lastMatch),m[E]=d[E]):b[E]=d[E];return[m,b,v]}function jRn(d,b){b===void 0&&(b={});var m=kRn(d),v=m[0],E=m[1],S=m[2];qd.set("drag",vfn),qd.set("hover",lsn),qd.set("move",lsn),qd.set("pinch",pRn),qd.set("scroll",vRn),qd.set("wheel",mRn);var y=QBn(b,S),$={};return S.has("onDrag")&&($.drag=rO(v,"onDrag")),S.has("onWheel")&&($.wheel=rO(v,"onWheel")),S.has("onScroll")&&($.scroll=rO(v,"onScroll")),S.has("onMove")&&($.move=rO(v,"onMove")),S.has("onPinch")&&($.pinch=rO(v,"onPinch")),S.has("onHover")&&($.hover=v.onHover),gfn($,y,E)}function rO(d,b){var m=b+"Start",v=b+"End",E=function(y){var $=void 0;return y.first&&m in d&&d[m](y),b in d&&($=d[b](y)),y.last&&v in d&&d[v](y),$};return E}var yfn={exports:{}};(function(d,b){(function(m){d.exports=m()})(function(){return function(){function m(v,E,S){function y(B,H){if(!E[B]){if(!v[B]){var z=typeof uG=="function"&&uG;if(!H&&z)return z(B,!0);if($)return $(B,!0);var Y=new Error("Cannot find module '"+B+"'");throw Y.code="MODULE_NOT_FOUND",Y}var Z=E[B]={exports:{}};v[B][0].call(Z.exports,function(J){var qe=v[B][1][J];return y(qe||J)},Z,Z.exports,m,v,E,S)}return E[B].exports}for(var $=typeof uG=="function"&&uG,N=0;N0&&arguments[0]!==void 0?arguments[0]:{},Y=z.defaultLayoutOptions,Z=Y===void 0?{}:Y,J=z.algorithms,qe=J===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:J,on=z.workerFactory,bn=z.workerUrl;if(y(this,B),this.defaultLayoutOptions=Z,this.initialized=!1,typeof bn>"u"&&typeof on>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var xn=on;typeof bn<"u"&&typeof on>"u"&&(xn=function(bt){return new Worker(bt)});var Ue=xn(bn);if(typeof Ue.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new N(Ue),this.worker.postMessage({cmd:"register",algorithms:qe}).then(function(mn){return H.initialized=!0}).catch(console.err)}return S(B,[{key:"layout",value:function(z){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=Y.layoutOptions,J=Z===void 0?this.defaultLayoutOptions:Z,qe=Y.logging,on=qe===void 0?!1:qe,bn=Y.measureExecutionTime,xn=bn===void 0?!1:bn;return z?this.worker.postMessage({cmd:"layout",graph:z,layoutOptions:J,options:{logging:on,measureExecutionTime:xn}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),B}();E.default=$;var N=function(){function B(H){var z=this;if(y(this,B),H===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=H,this.worker.onmessage=function(Y){setTimeout(function(){z.receive(z,Y)},0)}}return S(B,[{key:"postMessage",value:function(z){var Y=this.id||0;this.id=Y+1,z.id=Y;var Z=this;return new Promise(function(J,qe){Z.resolvers[Y]=function(on,bn){on?(Z.convertGwtStyleError(on),qe(on)):J(bn)},Z.worker.postMessage(z)})}},{key:"receive",value:function(z,Y){var Z=Y.data,J=z.resolvers[Z.id];J&&(delete z.resolvers[Z.id],Z.error?J(Z.error):J(null,Z.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(z){if(z){var Y=z.__java$exception;Y&&(Y.cause&&Y.cause.backingJsObject&&(z.cause=Y.cause.backingJsObject,this.convertGwtStyleError(z.cause)),delete z.__java$exception)}}}]),B}()},{}],2:[function(m,v,E){(function(S){(function(){var y;typeof window<"u"?y=window:typeof S<"u"?y=S:typeof self<"u"&&(y=self);var $;function N(){}function B(){}function H(){}function z(){}function Y(){}function Z(){}function J(){}function qe(){}function on(){}function bn(){}function xn(){}function Ue(){}function mn(){}function bt(){}function _t(){}function Mi(){}function li(){}function sc(){}function Zi(){}function fr(){}function Mc(){}function lr(){}function er(){}function nr(){}function wr(){}function ai(){}function U(){}function Mh(){}function _a(){}function ua(){}function Gs(){}function _4(){}function Om(){}function zp(){}function Eb(){}function og(){}function Dm(){}function nu(){}function Af(){}function Tb(){}function pu(){}function ao(){}function sl(){}function Cb(){}function B4(){}function $O(){}function O1(){}function D1(){}function $m(){}function bs(){}function R4(){}function U9(){}function fg(){}function Ro(){}function Mb(){}function Sb(){}function LO(){}function UG(){}function W9(){}function FO(){}function NO(){}function _O(){}function BO(){}function RO(){}function Ot(){}function Dc(){}function qc(){}function lg(){}function KO(){}function qO(){}function HO(){}function VO(){}function GO(){}function xE(){}function IE(){}function OE(){}function DE(){}function $E(){}function LE(){}function qbe(){}function Hbe(){}function Vbe(){}function Gbe(){}function zbe(){}function Ube(){}function Wbe(){}function Xbe(){}function Ybe(){}function Qbe(){}function Jbe(){}function Zbe(){}function ewe(){}function WG(){}function nwe(){}function twe(){}function iwe(){}function rwe(){}function zO(){}function UO(){}function FE(){}function cwe(){}function uwe(){}function WO(){}function swe(){}function owe(){}function fwe(){}function NE(){}function lwe(){}function awe(){}function hwe(){}function dwe(){}function bwe(){}function wwe(){}function gwe(){}function pwe(){}function mwe(){}function XG(){}function vwe(){}function ywe(){}function kwe(){}function jwe(){}function Ewe(){}function YG(){}function Twe(){}function Cwe(){}function Mwe(){}function Swe(){}function Pwe(){}function Awe(){}function xwe(){}function Iwe(){}function Owe(){}function Dwe(){}function $we(){}function Lwe(){}function Fwe(){}function Nwe(){}function XO(){}function _we(){}function Bwe(){}function Rwe(){}function Kwe(){}function qwe(){}function QG(){}function Hwe(){}function Vwe(){}function Gwe(){}function zwe(){}function Uwe(){}function Wwe(){}function Xwe(){}function Ywe(){}function Qwe(){}function Jwe(){}function Zwe(){}function ege(){}function nge(){}function tge(){}function ige(){}function rge(){}function cge(){}function uge(){}function sge(){}function oge(){}function fge(){}function lge(){}function age(){}function hge(){}function dge(){}function bge(){}function wge(){}function gge(){}function pge(){}function mge(){}function vge(){}function yge(){}function kge(){}function jge(){}function Ege(){}function Tge(){}function Cge(){}function Mge(){}function Sge(){}function Pge(){}function Age(){}function xge(){}function Ige(){}function Oge(){}function Dge(){}function $ge(){}function Lge(){}function Fge(){}function Nge(){}function _ge(){}function Bge(){}function Rge(){}function Kge(){}function qge(){}function Hge(){}function Vge(){}function Gge(){}function zge(){}function Uge(){}function Wge(){}function Xge(){}function Yge(){}function Qge(){}function Jge(){}function Zge(){}function epe(){}function npe(){}function tpe(){}function ipe(){}function rpe(){}function cpe(){}function upe(){}function spe(){}function ope(){}function fpe(){}function lpe(){}function ape(){}function hpe(){}function dpe(){}function bpe(){}function wpe(){}function gpe(){}function ppe(){}function mpe(){}function vpe(){}function ype(){}function kpe(){}function jpe(){}function Epe(){}function Tpe(){}function Cpe(){}function Mpe(){}function Spe(){}function Ppe(){}function Ape(){}function xpe(){}function Ipe(){}function Ope(){}function Dpe(){}function $pe(){}function JG(){}function Lpe(){}function Fpe(){}function Npe(){}function _pe(){}function Bpe(){}function Rpe(){}function Kpe(){}function qpe(){}function Hpe(){}function Vpe(){}function Gpe(){}function zpe(){}function Upe(){}function Wpe(){}function Xpe(){}function Ype(){}function Qpe(){}function Jpe(){}function Zpe(){}function e2e(){}function n2e(){}function t2e(){}function i2e(){}function r2e(){}function c2e(){}function u2e(){}function s2e(){}function o2e(){}function f2e(){}function l2e(){}function a2e(){}function h2e(){}function d2e(){}function b2e(){}function w2e(){}function g2e(){}function p2e(){}function m2e(){}function v2e(){}function y2e(){}function k2e(){}function j2e(){}function E2e(){}function T2e(){}function C2e(){}function M2e(){}function S2e(){}function P2e(){}function A2e(){}function x2e(){}function I2e(){}function O2e(){}function D2e(){}function $2e(){}function L2e(){}function F2e(){}function N2e(){}function _2e(){}function B2e(){}function R2e(){}function K2e(){}function q2e(){}function H2e(){}function V2e(){}function G2e(){}function z2e(){}function U2e(){}function ZG(){}function W2e(){}function X2e(){}function Y2e(){}function Q2e(){}function J2e(){}function Z2e(){}function eme(){}function nme(){}function tme(){}function ime(){}function rme(){}function cme(){}function ume(){}function sme(){}function ome(){}function fme(){}function lme(){}function ame(){}function hme(){}function dme(){}function ez(){}function bme(){}function wme(){}function gme(){}function pme(){}function mme(){}function vme(){}function nz(){}function tz(){}function yme(){}function iz(){}function rz(){}function kme(){}function jme(){}function Eme(){}function Tme(){}function Cme(){}function Mme(){}function Sme(){}function Pme(){}function Ame(){}function cz(){}function xme(){}function Ime(){}function Ome(){}function Dme(){}function $me(){}function Lme(){}function Fme(){}function Nme(){}function _me(){}function Bme(){}function Rme(){}function Kme(){}function qme(){}function Hme(){}function Vme(){}function Gme(){}function zme(){}function Ume(){}function Wme(){}function Xme(){}function Yme(){}function Qme(){}function Jme(){}function Zme(){}function eve(){}function nve(){}function tve(){}function ive(){}function rve(){}function cve(){}function uve(){}function sve(){}function ove(){}function fve(){}function lve(){}function ave(){}function hve(){}function dve(){}function bve(){}function wve(){}function gve(){}function pve(){}function mve(){}function vve(){}function yve(){}function kve(){}function jve(){}function Eve(){}function Tve(){}function Cve(){}function Mve(){}function Sve(){}function Pve(){}function Ave(){}function xve(){}function Ive(){}function Ove(){}function Dve(){}function $ve(){}function Lve(){}function Fve(){}function Nve(){}function _ve(){}function Bve(){}function Rve(){}function Kve(){}function qve(){}function Hve(){}function YO(){}function QO(){}function JO(){}function Vve(){}function Gve(){}function zve(){}function Uve(){}function Wve(){}function uz(){}function Xve(){}function Yve(){}function Ifn(){}function Qve(){}function Jve(){}function Zve(){}function e3e(){}function n3e(){}function t3e(){}function i3e(){}function $1(){}function r3e(){}function Up(){}function sz(){}function c3e(){}function u3e(){}function s3e(){}function o3e(){}function f3e(){}function l3e(){}function a3e(){}function h3e(){}function d3e(){}function b3e(){}function w3e(){}function g3e(){}function p3e(){}function m3e(){}function v3e(){}function y3e(){}function k3e(){}function j3e(){}function E3e(){}function T3e(){}function C3e(){}function Se(){}function M3e(){}function S3e(){}function P3e(){}function A3e(){}function x3e(){}function I3e(){}function O3e(){}function D3e(){}function $3e(){}function L3e(){}function ZO(){}function F3e(){}function N3e(){}function _3e(){}function B3e(){}function R3e(){}function oz(){}function _E(){}function BE(){}function K3e(){}function fz(){}function RE(){}function q3e(){}function H3e(){}function V3e(){}function G3e(){}function z3e(){}function U3e(){}function KE(){}function W3e(){}function X3e(){}function Y3e(){}function qE(){}function Q3e(){}function lz(){}function J3e(){}function eD(){}function az(){}function Z3e(){}function e4e(){}function n4e(){}function t4e(){}function Ofn(){}function i4e(){}function r4e(){}function c4e(){}function u4e(){}function s4e(){}function o4e(){}function f4e(){}function l4e(){}function a4e(){}function h4e(){}function Lm(){}function nD(){}function d4e(){}function b4e(){}function w4e(){}function g4e(){}function p4e(){}function m4e(){}function v4e(){}function y4e(){}function k4e(){}function j4e(){}function E4e(){}function T4e(){}function C4e(){}function M4e(){}function S4e(){}function P4e(){}function A4e(){}function x4e(){}function I4e(){}function O4e(){}function D4e(){}function $4e(){}function L4e(){}function F4e(){}function N4e(){}function _4e(){}function B4e(){}function R4e(){}function K4e(){}function q4e(){}function H4e(){}function V4e(){}function G4e(){}function z4e(){}function U4e(){}function W4e(){}function X4e(){}function Y4e(){}function Q4e(){}function J4e(){}function Z4e(){}function e5e(){}function n5e(){}function t5e(){}function i5e(){}function r5e(){}function c5e(){}function u5e(){}function s5e(){}function o5e(){}function f5e(){}function l5e(){}function a5e(){}function h5e(){}function d5e(){}function b5e(){}function w5e(){}function g5e(){}function p5e(){}function m5e(){}function v5e(){}function y5e(){}function k5e(){}function j5e(){}function E5e(){}function T5e(){}function C5e(){}function M5e(){}function S5e(){}function P5e(){}function A5e(){}function x5e(){}function I5e(){}function O5e(){}function D5e(){}function $5e(){}function L5e(){}function F5e(){}function N5e(){}function _5e(){}function B5e(){}function R5e(){}function K5e(){}function q5e(){}function H5e(){}function V5e(){}function G5e(){}function z5e(){}function U5e(){}function W5e(){}function X5e(){}function Y5e(){}function Q5e(){}function J5e(){}function Z5e(){}function e6e(){}function n6e(){}function t6e(){}function i6e(){}function r6e(){}function c6e(){}function hz(){}function u6e(){}function s6e(){}function tD(){U4()}function o6e(){WF()}function f6e(){y6()}function l6e(){NS()}function a6e(){ane()}function h6e(){jf()}function d6e(){jee()}function b6e(){U7()}function w6e(){h8()}function g6e(){a8()}function p6e(){_8()}function m6e(){yEe()}function v6e(){A2()}function y6e(){mT()}function k6e(){IOe()}function j6e(){V$e()}function E6e(){fDe()}function T6e(){Mxe()}function C6e(){zv()}function M6e(){e1()}function S6e(){G$e()}function P6e(){vIe()}function A6e(){rie()}function x6e(){O_e()}function I6e(){Sxe()}function O6e(){be()}function D6e(){Cxe()}function $6e(){z$e()}function L6e(){XLe()}function F6e(){Axe()}function N6e(){bDe()}function _6e(){kEe()}function B6e(){zne()}function R6e(){ow()}function K6e(){vLe()}function q6e(){Q7()}function H6e(){E_()}function V6e(){xN()}function G6e(){B0()}function z6e(){qJ()}function U6e(){Pxe()}function W6e(){Rqe()}function X6e(){Hne()}function Y6e(){w_()}function Q6e(){jM()}function J6e(){VS()}function dz(){ht()}function Z6e(){cS()}function eye(){YZ()}function bz(){fP()}function hf(){wSe()}function wz(){OF()}function nye(){xte()}function gz(e){nn(e)}function tye(e){this.a=e}function HE(e){this.a=e}function iye(e){this.a=e}function rye(e){this.a=e}function cye(e){this.a=e}function uye(e){this.a=e}function sye(e){this.a=e}function oye(e){this.a=e}function pz(e){this.a=e}function mz(e){this.a=e}function fye(e){this.a=e}function iD(e){this.a=e}function lye(e){this.a=e}function rD(e){this.a=e}function aye(e){this.a=e}function cD(e){this.a=e}function hye(e){this.a=e}function uD(e){this.a=e}function dye(e){this.a=e}function bye(e){this.a=e}function wye(e){this.a=e}function vz(e){this.b=e}function gye(e){this.c=e}function pye(e){this.a=e}function mye(e){this.a=e}function vye(e){this.a=e}function yye(e){this.a=e}function kye(e){this.a=e}function jye(e){this.a=e}function Eye(e){this.a=e}function Tye(e){this.a=e}function Cye(e){this.a=e}function Mye(e){this.a=e}function Sye(e){this.a=e}function Pye(e){this.a=e}function Aye(e){this.a=e}function yz(e){this.a=e}function kz(e){this.a=e}function VE(e){this.a=e}function X9(e){this.a=e}function L1(){this.a=[]}function xye(e,n){e.a=n}function Dfn(e,n){e.a=n}function $fn(e,n){e.b=n}function Lfn(e,n){e.b=n}function Ffn(e,n){e.b=n}function jz(e,n){e.j=n}function Nfn(e,n){e.g=n}function _fn(e,n){e.i=n}function Bfn(e,n){e.c=n}function Rfn(e,n){e.d=n}function Kfn(e,n){e.d=n}function qfn(e,n){e.c=n}function F1(e,n){e.k=n}function Hfn(e,n){e.c=n}function Ez(e,n){e.c=n}function Tz(e,n){e.a=n}function Vfn(e,n){e.a=n}function Gfn(e,n){e.f=n}function zfn(e,n){e.a=n}function Ufn(e,n){e.b=n}function sD(e,n){e.d=n}function GE(e,n){e.i=n}function Cz(e,n){e.o=n}function Wfn(e,n){e.r=n}function Xfn(e,n){e.a=n}function Yfn(e,n){e.b=n}function Iye(e,n){e.e=n}function Qfn(e,n){e.f=n}function Mz(e,n){e.g=n}function Jfn(e,n){e.e=n}function Zfn(e,n){e.f=n}function eln(e,n){e.f=n}function nln(e,n){e.n=n}function tln(e,n){e.a=n}function iln(e,n){e.a=n}function rln(e,n){e.c=n}function cln(e,n){e.c=n}function uln(e,n){e.d=n}function sln(e,n){e.e=n}function oln(e,n){e.g=n}function fln(e,n){e.a=n}function lln(e,n){e.c=n}function aln(e,n){e.d=n}function hln(e,n){e.e=n}function dln(e,n){e.f=n}function bln(e,n){e.j=n}function wln(e,n){e.a=n}function gln(e,n){e.b=n}function pln(e,n){e.a=n}function Oye(e){e.b=e.a}function Dye(e){e.c=e.d.d}function K4(e){this.d=e}function N1(e){this.a=e}function Fm(e){this.a=e}function Sz(e){this.a=e}function sa(e){this.a=e}function Y9(e){this.a=e}function $ye(e){this.a=e}function Pz(e){this.a=e}function Q9(e){this.a=e}function Az(e){this.a=e}function xz(e){this.a=e}function Iz(e){this.a=e}function Pb(e){this.a=e}function J9(e){this.a=e}function Z9(e){this.a=e}function Oz(e){this.b=e}function Nm(e){this.b=e}function _m(e){this.b=e}function oD(e){this.a=e}function Lye(e){this.a=e}function Dz(e){this.a=e}function fD(e){this.c=e}function A(e){this.c=e}function Fye(e){this.c=e}function $z(e){this.a=e}function Lz(e){this.a=e}function Fz(e){this.a=e}function Nz(e){this.a=e}function Ct(e){this.a=e}function Nye(e){this.a=e}function _z(e){this.a=e}function Bz(e){this.a=e}function _ye(e){this.a=e}function Bye(e){this.a=e}function q4(e){this.a=e}function Rye(e){this.a=e}function Kye(e){this.a=e}function qye(e){this.a=e}function Hye(e){this.a=e}function Vye(e){this.a=e}function Gye(e){this.a=e}function zye(e){this.a=e}function Uye(e){this.a=e}function Wye(e){this.a=e}function Xye(e){this.a=e}function Yye(e){this.a=e}function Qye(e){this.a=e}function Jye(e){this.a=e}function Zye(e){this.a=e}function e9e(e){this.a=e}function n9e(e){this.a=e}function t9e(e){this.a=e}function e8(e){this.a=e}function i9e(e){this.a=e}function r9e(e){this.a=e}function zE(e){this.a=e}function c9e(e){this.a=e}function u9e(e){this.a=e}function Bm(e){this.a=e}function Rz(e){this.a=e}function s9e(e){this.a=e}function o9e(e){this.a=e}function f9e(e){this.a=e}function l9e(e){this.a=e}function a9e(e){this.a=e}function Kz(e){this.a=e}function qz(e){this.a=e}function Hz(e){this.a=e}function UE(e){this.a=e}function WE(e){this.e=e}function Rm(e){this.a=e}function h9e(e){this.a=e}function Wp(e){this.a=e}function Vz(e){this.a=e}function d9e(e){this.a=e}function b9e(e){this.a=e}function w9e(e){this.a=e}function g9e(e){this.a=e}function p9e(e){this.a=e}function m9e(e){this.a=e}function v9e(e){this.a=e}function y9e(e){this.a=e}function k9e(e){this.a=e}function j9e(e){this.a=e}function E9e(e){this.a=e}function Gz(e){this.a=e}function T9e(e){this.a=e}function C9e(e){this.a=e}function M9e(e){this.a=e}function S9e(e){this.a=e}function P9e(e){this.a=e}function A9e(e){this.a=e}function x9e(e){this.a=e}function I9e(e){this.a=e}function O9e(e){this.a=e}function D9e(e){this.a=e}function $9e(e){this.a=e}function L9e(e){this.a=e}function F9e(e){this.a=e}function N9e(e){this.a=e}function _9e(e){this.a=e}function B9e(e){this.a=e}function R9e(e){this.a=e}function K9e(e){this.a=e}function q9e(e){this.a=e}function H9e(e){this.a=e}function V9e(e){this.a=e}function G9e(e){this.a=e}function z9e(e){this.a=e}function U9e(e){this.a=e}function W9e(e){this.a=e}function X9e(e){this.a=e}function Y9e(e){this.a=e}function Q9e(e){this.a=e}function J9e(e){this.a=e}function Z9e(e){this.a=e}function e8e(e){this.a=e}function n8e(e){this.a=e}function t8e(e){this.a=e}function i8e(e){this.a=e}function r8e(e){this.a=e}function c8e(e){this.a=e}function u8e(e){this.a=e}function s8e(e){this.c=e}function o8e(e){this.b=e}function f8e(e){this.a=e}function l8e(e){this.a=e}function a8e(e){this.a=e}function h8e(e){this.a=e}function d8e(e){this.a=e}function b8e(e){this.a=e}function w8e(e){this.a=e}function g8e(e){this.a=e}function p8e(e){this.a=e}function m8e(e){this.a=e}function v8e(e){this.a=e}function y8e(e){this.a=e}function k8e(e){this.a=e}function j8e(e){this.a=e}function E8e(e){this.a=e}function T8e(e){this.a=e}function C8e(e){this.a=e}function M8e(e){this.a=e}function S8e(e){this.a=e}function P8e(e){this.a=e}function A8e(e){this.a=e}function x8e(e){this.a=e}function I8e(e){this.a=e}function O8e(e){this.a=e}function Sh(e){this.a=e}function Xp(e){this.a=e}function D8e(e){this.a=e}function $8e(e){this.a=e}function L8e(e){this.a=e}function F8e(e){this.a=e}function N8e(e){this.a=e}function _8e(e){this.a=e}function B8e(e){this.a=e}function R8e(e){this.a=e}function K8e(e){this.a=e}function q8e(e){this.a=e}function H8e(e){this.a=e}function V8e(e){this.a=e}function G8e(e){this.a=e}function z8e(e){this.a=e}function U8e(e){this.a=e}function W8e(e){this.a=e}function XE(e){this.a=e}function X8e(e){this.a=e}function Y8e(e){this.a=e}function Q8e(e){this.a=e}function J8e(e){this.a=e}function Z8e(e){this.a=e}function e7e(e){this.a=e}function n7e(e){this.a=e}function t7e(e){this.a=e}function i7e(e){this.a=e}function r7e(e){this.a=e}function c7e(e){this.a=e}function u7e(e){this.a=e}function s7e(e){this.a=e}function o7e(e){this.a=e}function f7e(e){this.a=e}function l7e(e){this.a=e}function a7e(e){this.a=e}function h7e(e){this.a=e}function d7e(e){this.a=e}function b7e(e){this.a=e}function w7e(e){this.a=e}function g7e(e){this.a=e}function p7e(e){this.a=e}function m7e(e){this.a=e}function v7e(e){this.a=e}function y7e(e){this.a=e}function k7e(e){this.a=e}function j7e(e){this.a=e}function zz(e){this.a=e}function Rt(e){this.b=e}function E7e(e){this.f=e}function Uz(e){this.a=e}function T7e(e){this.a=e}function C7e(e){this.a=e}function M7e(e){this.a=e}function S7e(e){this.a=e}function P7e(e){this.a=e}function A7e(e){this.a=e}function x7e(e){this.a=e}function I7e(e){this.a=e}function n8(e){this.a=e}function O7e(e){this.a=e}function D7e(e){this.b=e}function Wz(e){this.c=e}function YE(e){this.e=e}function $7e(e){this.a=e}function QE(e){this.a=e}function JE(e){this.a=e}function lD(e){this.a=e}function L7e(e){this.a=e}function F7e(e){this.d=e}function Xz(e){this.a=e}function Yz(e){this.a=e}function Gd(e){this.e=e}function mln(){this.a=0}function ag(){wCe(this)}function oe(){g$(this)}function Ln(){Wu(this)}function aD(){vAe(this)}function N7e(){}function zd(){this.c=xde}function vln(e,n){n.Wb(e)}function _7e(e,n){e.b+=n}function B7e(e){e.b=new PD}function I(e){return e.e}function yln(e){return e.a}function kln(e){return e.a}function jln(e){return e.a}function Eln(e){return e.a}function Tln(e){return e.a}function Cln(){return null}function Mln(){return null}function Sln(){FU(),_On()}function Pln(e){e.b.tf(e.e)}function H4(e,n){e.b=n-e.b}function V4(e,n){e.a=n-e.a}function R7e(e,n){n.ad(e.a)}function Aln(e,n){Ei(n,e)}function xln(e,n,t){e.Od(t,n)}function t8(e,n){e.e=n,n.b=e}function Qz(e){dl(),this.a=e}function K7e(e){dl(),this.a=e}function q7e(e){dl(),this.a=e}function Jz(e){zb(),this.a=e}function H7e(e){pv(),HK.be(e)}function _1(){JCe.call(this)}function Zz(){JCe.call(this)}function eU(){_1.call(this)}function hD(){_1.call(this)}function V7e(){_1.call(this)}function i8(){_1.call(this)}function $u(){_1.call(this)}function G4(){_1.call(this)}function Kn(){_1.call(this)}function zs(){_1.call(this)}function G7e(){_1.call(this)}function Sc(){_1.call(this)}function z7e(){_1.call(this)}function U7e(){this.a=this}function ZE(){this.Bb|=256}function W7e(){this.b=new YTe}function nU(){nU=U,new Ln}function tU(){eU.call(this)}function X7e(e,n){e.length=n}function eT(e,n){se(e.a,n)}function Iln(e,n){dne(e.c,n)}function Oln(e,n){ki(e.b,n)}function Dln(e,n){IS(e.a,n)}function $ln(e,n){iN(e.a,n)}function Km(e,n){yt(e.e,n)}function Yp(e){US(e.c,e.b)}function Lln(e,n){e.kc().Nb(n)}function iU(e){this.a=D6n(e)}function Si(){this.a=new Ln}function Y7e(){this.a=new Ln}function nT(){this.a=new oe}function dD(){this.a=new oe}function rU(){this.a=new oe}function ho(){this.a=new HO}function B1(){this.a=new SOe}function cU(){this.a=new XG}function uU(){this.a=new hEe}function Q7e(){this.a=new eIe}function sU(){this.a=new gxe}function oU(){this.a=new RMe}function J7e(){this.a=new oe}function fU(){this.a=new oe}function Z7e(){this.a=new oe}function eke(){this.a=new oe}function nke(){this.d=new oe}function tke(){this.a=new Si}function ike(){this.a=new Ln}function rke(){this.b=new Ln}function cke(){this.b=new oe}function lU(){this.e=new oe}function uke(){this.d=new oe}function ske(){this.a=new M6e}function oke(){oe.call(this)}function aU(){nT.call(this)}function fke(){lC.call(this)}function lke(){fU.call(this)}function bD(){z4.call(this)}function z4(){N7e.call(this)}function Qp(){N7e.call(this)}function hU(){Qp.call(this)}function ake(){UAe.call(this)}function hke(){UAe.call(this)}function dke(){vU.call(this)}function bke(){vU.call(this)}function wke(){vU.call(this)}function gke(){yU.call(this)}function Lu(){Vt.call(this)}function dU(){R3e.call(this)}function bU(){R3e.call(this)}function pke(){Dke.call(this)}function mke(){Dke.call(this)}function vke(){Ln.call(this)}function yke(){Ln.call(this)}function kke(){Ln.call(this)}function jke(){Si.call(this)}function wD(){K$e.call(this)}function Eke(){ZE.call(this)}function gD(){VW.call(this)}function pD(){VW.call(this)}function wU(){Ln.call(this)}function mD(){Ln.call(this)}function Tke(){Ln.call(this)}function gU(){qE.call(this)}function Cke(){qE.call(this)}function Mke(){gU.call(this)}function Ske(){hz.call(this)}function Pke(e){h$e.call(this,e)}function Ake(e){h$e.call(this,e)}function pU(e){pz.call(this,e)}function mU(e){tEe.call(this,e)}function Fln(e){mU.call(this,e)}function Nln(e){tEe.call(this,e)}function qm(){this.a=new Vt}function vU(){this.a=new Si}function yU(){this.a=new Ln}function xke(){this.a=new oe}function Ike(){this.j=new oe}function kU(){this.a=new Kve}function Oke(){this.a=new Sje}function Dke(){this.a=new Y3e}function vD(){vD=U,NK=new Qke}function yD(){yD=U,FK=new Yke}function U4(){U4=U,LK=new B}function tT(){tT=U,RK=new YCe}function _ln(e){mU.call(this,e)}function Bln(e){mU.call(this,e)}function $ke(e){YL.call(this,e)}function Lke(e){YL.call(this,e)}function Fke(e){oSe.call(this,e)}function kD(e){cjn.call(this,e)}function Ud(e){Ob.call(this,e)}function W4(e){bT.call(this,e)}function jU(e){bT.call(this,e)}function Nke(e){bT.call(this,e)}function oc(e){jPe.call(this,e)}function _ke(e){oc.call(this,e)}function Jp(){X9.call(this,{})}function iT(e){tv(),this.a=e}function X4(e){e.b=null,e.c=0}function Rln(e,n){e.e=n,BKe(e,n)}function Kln(e,n){e.a=n,Gjn(e)}function jD(e,n,t){e.a[n.g]=t}function qln(e,n,t){s7n(t,e,n)}function Hln(e,n){bdn(n.i,e.n)}function Bke(e,n){w5n(e).td(n)}function Vln(e,n){return e*e/n}function Rke(e,n){return e.g-n.g}function Gln(e){return new VE(e)}function zln(e){return new Gb(e)}function rT(e){oc.call(this,e)}function Rr(e){oc.call(this,e)}function Kke(e){oc.call(this,e)}function ED(e){jPe.call(this,e)}function TD(e){RJ(),this.a=e}function qke(e){bSe(),this.a=e}function Ab(e){eL(),this.f=e}function CD(e){eL(),this.f=e}function Hm(e){oc.call(this,e)}function rn(e){oc.call(this,e)}function ec(e){oc.call(this,e)}function Hke(e){oc.call(this,e)}function Zp(e){oc.call(this,e)}function ke(e){return nn(e),e}function ne(e){return nn(e),e}function r8(e){return nn(e),e}function EU(e){return nn(e),e}function Uln(e){return nn(e),e}function Y4(e){return e.b==e.c}function xb(e){return!!e&&e.b}function Wln(e){return!!e&&e.k}function Xln(e){return!!e&&e.j}function ws(e){nn(e),this.a=e}function TU(e){return id(e),e}function Q4(e){FY(e,e.length)}function Ba(e){oc.call(this,e)}function ol(e){oc.call(this,e)}function MD(e){oc.call(this,e)}function hg(e){oc.call(this,e)}function J4(e){oc.call(this,e)}function Hn(e){oc.call(this,e)}function SD(e){oX.call(this,e,0)}function PD(){gQ.call(this,12,3)}function CU(){CU=U,Mue=new Zi}function Vke(){Vke=U,Cue=new N}function cT(){cT=U,ky=new mn}function Gke(){Gke=U,yXe=new _t}function zke(){throw I(new Kn)}function MU(){throw I(new Kn)}function Uke(){throw I(new Kn)}function Yln(){throw I(new Kn)}function Qln(){throw I(new Kn)}function Jln(){throw I(new Kn)}function AD(){this.a=Vn(Nn(vr))}function e2(e){dl(),this.a=Nn(e)}function Wke(e,n){e.Td(n),n.Sd(e)}function Zln(e,n){e.a.ec().Mc(n)}function ean(e,n,t){e.c.lf(n,t)}function SU(e){Rr.call(this,e)}function fl(e){rn.call(this,e)}function Ra(){Y9.call(this,"")}function Z4(){Y9.call(this,"")}function Ph(){Y9.call(this,"")}function Ib(){Y9.call(this,"")}function PU(e){Rr.call(this,e)}function Vm(e){Nm.call(this,e)}function xD(e){nC.call(this,e)}function Xke(e){Vm.call(this,e)}function Yke(){rD.call(this,null)}function Qke(){rD.call(this,null)}function uT(){uT=U,pv()}function Jke(){Jke=U,xXe=$7n()}function Zke(e){return e.a?e.b:0}function nan(e){return e.a?e.b:0}function tan(e,n){return e.a-n.a}function ian(e,n){return e.a-n.a}function ran(e,n){return e.a-n.a}function sT(e,n){return uJ(e,n)}function O(e,n){return vxe(e,n)}function can(e,n){return n in e.a}function eje(e,n){return e.f=n,e}function uan(e,n){return e.b=n,e}function nje(e,n){return e.c=n,e}function san(e,n){return e.g=n,e}function AU(e,n){return e.a=n,e}function xU(e,n){return e.f=n,e}function oan(e,n){return e.k=n,e}function IU(e,n){return e.a=n,e}function fan(e,n){return e.e=n,e}function OU(e,n){return e.e=n,e}function lan(e,n){return e.f=n,e}function aan(e,n){e.b=!0,e.d=n}function han(e,n){e.b=new Kr(n)}function dan(e,n,t){n.td(e.a[t])}function ban(e,n,t){n.we(e.a[t])}function wan(e,n){return e.b-n.b}function gan(e,n){return e.g-n.g}function pan(e,n){return e.s-n.s}function man(e,n){return e?0:n-1}function tje(e,n){return e?0:n-1}function van(e,n){return e?n-1:0}function yan(e,n){return n.Yf(e)}function Wd(e,n){return e.b=n,e}function oT(e,n){return e.a=n,e}function Xd(e,n){return e.c=n,e}function Yd(e,n){return e.d=n,e}function Qd(e,n){return e.e=n,e}function DU(e,n){return e.f=n,e}function e5(e,n){return e.a=n,e}function Gm(e,n){return e.b=n,e}function zm(e,n){return e.c=n,e}function xe(e,n){return e.c=n,e}function ze(e,n){return e.b=n,e}function Ie(e,n){return e.d=n,e}function Oe(e,n){return e.e=n,e}function kan(e,n){return e.f=n,e}function De(e,n){return e.g=n,e}function $e(e,n){return e.a=n,e}function Le(e,n){return e.i=n,e}function Fe(e,n){return e.j=n,e}function ije(e,n){return e.k=n,e}function jan(e,n){return e.j=n,e}function Ean(e,n){e1(),lc(n,e)}function Tan(e,n,t){mwn(e.a,n,t)}function rje(e){kAe.call(this,e)}function $U(e){kAe.call(this,e)}function fT(e){N$.call(this,e)}function cje(e){K6n.call(this,e)}function Ah(e){j0.call(this,e)}function uje(e){CL.call(this,e)}function sje(e){CL.call(this,e)}function oje(){BW.call(this,"")}function tr(){this.a=0,this.b=0}function fje(){this.b=0,this.a=0}function lje(e,n){e.b=0,tw(e,n)}function Can(e,n){e.c=n,e.b=!0}function aje(e,n){return e.c._b(n)}function df(e){return e.e&&e.e()}function ID(e){return e?e.d:null}function hje(e,n){return _Fe(e.b,n)}function Man(e){return e?e.g:null}function San(e){return e?e.i:null}function xh(e){return la(e),e.o}function Jd(){Jd=U,Prn=G8n()}function dje(){dje=U,Fi=ikn()}function Um(){Um=U,Ade=U8n()}function bje(){bje=U,hcn=z8n()}function LU(){LU=U,Oc=qjn()}function FU(){FU=U,M1=$v()}function wje(){throw I(new Kn)}function gje(){throw I(new Kn)}function pje(){throw I(new Kn)}function mje(){throw I(new Kn)}function vje(){throw I(new Kn)}function yje(){throw I(new Kn)}function lT(e){this.a=new n2(e)}function NU(e){wVe(),QOn(this,e)}function Ih(e){this.a=new rL(e)}function dg(e,n){for(;e.ye(n););}function _U(e,n){for(;e.sd(n););}function bg(e,n){return e.a+=n,e}function OD(e,n){return e.a+=n,e}function Ka(e,n){return e.a+=n,e}function Zd(e,n){return e.a+=n,e}function n5(e){return qh(e),e.a}function aT(e){return e.b!=e.d.c}function kje(e){return e.l|e.m<<22}function BU(e,n){return e.d[n.p]}function jje(e,n){return IMn(e,n)}function RU(e,n,t){e.splice(n,t)}function Eje(e){e.c?uqe(e):sqe(e)}function hT(e){this.a=0,this.b=e}function Tje(){this.a=new sk(qae)}function Cje(){this.b=new sk(Pae)}function Mje(){this.b=new sk(oV)}function Sje(){this.b=new sk(oV)}function Pje(){throw I(new Kn)}function Aje(){throw I(new Kn)}function xje(){throw I(new Kn)}function Ije(){throw I(new Kn)}function Oje(){throw I(new Kn)}function Dje(){throw I(new Kn)}function $je(){throw I(new Kn)}function Lje(){throw I(new Kn)}function Fje(){throw I(new Kn)}function Nje(){throw I(new Kn)}function Pan(){throw I(new Sc)}function Aan(){throw I(new Sc)}function c8(e){this.a=new _je(e)}function _je(e){R3n(this,e,R7n())}function u8(e){return!e||cAe(e)}function s8(e){return il[e]!=-1}function xan(){xA!=0&&(xA=0),IA=-1}function Bje(){$K==null&&($K=[])}function Ian(e,n){l_(Q(e.a),n)}function Oan(e,n){l_(Q(e.a),n)}function o8(e,n){Eg.call(this,e,n)}function Wm(e,n){o8.call(this,e,n)}function KU(e,n){this.b=e,this.c=n}function Rje(e,n){this.b=e,this.a=n}function Kje(e,n){this.a=e,this.b=n}function qje(e,n){this.a=e,this.b=n}function Hje(e,n){this.a=e,this.b=n}function Vje(e,n){this.a=e,this.b=n}function Gje(e,n){this.a=e,this.b=n}function zje(e,n){this.a=e,this.b=n}function Uje(e,n){this.a=e,this.b=n}function Wje(e,n){this.a=e,this.b=n}function Xje(e,n){this.b=e,this.a=n}function Yje(e,n){this.b=e,this.a=n}function Qje(e,n){this.b=e,this.a=n}function Jje(e,n){this.b=e,this.a=n}function Yn(e,n){this.f=e,this.g=n}function Xm(e,n){this.e=e,this.d=n}function e0(e,n){this.g=e,this.i=n}function DD(e,n){this.a=e,this.b=n}function Zje(e,n){this.a=e,this.f=n}function eEe(e,n){this.b=e,this.c=n}function Dan(e,n){this.a=e,this.b=n}function nEe(e,n){this.a=e,this.b=n}function $D(e,n){this.a=e,this.b=n}function tEe(e){QW(e.dc()),this.c=e}function dT(e){this.b=u(Nn(e),83)}function iEe(e){this.a=u(Nn(e),83)}function Ob(e){this.a=u(Nn(e),15)}function rEe(e){this.a=u(Nn(e),15)}function bT(e){this.b=u(Nn(e),47)}function wT(){this.q=new y.Date}function $l(){$l=U,Kue=new Mh}function Ym(){Ym=U,G3=new nr}function t5(e){return e.f.c+e.g.c}function f8(e,n){return e.b.Hc(n)}function cEe(e,n){return e.b.Ic(n)}function uEe(e,n){return e.b.Qc(n)}function sEe(e,n){return e.b.Hc(n)}function oEe(e,n){return e.c.uc(n)}function oa(e,n){return e.a._b(n)}function fEe(e,n){return kt(e.c,n)}function lEe(e,n){return vs(e.b,n)}function aEe(e,n){return e>n&&n0}function FD(e,n){return $c(e,n)<0}function o5(e,n){return e.a.get(n)}function zan(e,n){return n.split(e)}function xEe(e,n){return vs(e.e,n)}function XU(e){return nn(e),!1}function CT(e){Ye.call(this,e,21)}function Uan(e,n){sxe.call(this,e,n)}function MT(e,n){Yn.call(this,e,n)}function ND(e,n){Yn.call(this,e,n)}function YU(e){pL(),oSe.call(this,e)}function QU(e,n){aPe(e,e.length,n)}function b8(e,n){RPe(e,e.length,n)}function Wan(e,n,t){n.ud(e.a.Ge(t))}function Xan(e,n,t){n.we(e.a.Fe(t))}function Yan(e,n,t){n.td(e.a.Kb(t))}function Qan(e,n,t){e.Mb(t)&&n.td(t)}function f5(e,n,t){e.splice(n,0,t)}function Jan(e,n){return Nu(e.e,n)}function ST(e,n){this.d=e,this.e=n}function IEe(e,n){this.b=e,this.a=n}function OEe(e,n){this.b=e,this.a=n}function JU(e,n){this.b=e,this.a=n}function DEe(e,n){this.a=e,this.b=n}function $Ee(e,n){this.a=e,this.b=n}function LEe(e,n){this.a=e,this.b=n}function FEe(e,n){this.a=e,this.b=n}function i2(e,n){this.a=e,this.b=n}function ZU(e,n){this.b=e,this.a=n}function eW(e,n){this.b=e,this.a=n}function PT(e,n){Yn.call(this,e,n)}function AT(e,n){Yn.call(this,e,n)}function nW(e,n){Yn.call(this,e,n)}function tW(e,n){Yn.call(this,e,n)}function wg(e,n){Yn.call(this,e,n)}function _D(e,n){Yn.call(this,e,n)}function BD(e,n){Yn.call(this,e,n)}function RD(e,n){Yn.call(this,e,n)}function xT(e,n){Yn.call(this,e,n)}function iW(e,n){Yn.call(this,e,n)}function KD(e,n){Yn.call(this,e,n)}function w8(e,n){Yn.call(this,e,n)}function IT(e,n){Yn.call(this,e,n)}function qD(e,n){Yn.call(this,e,n)}function l5(e,n){Yn.call(this,e,n)}function rW(e,n){Yn.call(this,e,n)}function ui(e,n){Yn.call(this,e,n)}function OT(e,n){Yn.call(this,e,n)}function NEe(e,n){this.a=e,this.b=n}function _Ee(e,n){this.a=e,this.b=n}function BEe(e,n){this.a=e,this.b=n}function REe(e,n){this.a=e,this.b=n}function KEe(e,n){this.a=e,this.b=n}function qEe(e,n){this.a=e,this.b=n}function HEe(e,n){this.a=e,this.b=n}function VEe(e,n){this.a=e,this.b=n}function GEe(e,n){this.a=e,this.b=n}function cW(e,n){this.b=e,this.a=n}function zEe(e,n){this.b=e,this.a=n}function UEe(e,n){this.b=e,this.a=n}function WEe(e,n){this.b=e,this.a=n}function Zm(e,n){this.c=e,this.d=n}function XEe(e,n){this.e=e,this.d=n}function YEe(e,n){this.a=e,this.b=n}function QEe(e,n){this.b=n,this.c=e}function DT(e,n){Yn.call(this,e,n)}function g8(e,n){Yn.call(this,e,n)}function HD(e,n){Yn.call(this,e,n)}function a5(e,n){Yn.call(this,e,n)}function uW(e,n){Yn.call(this,e,n)}function VD(e,n){Yn.call(this,e,n)}function GD(e,n){Yn.call(this,e,n)}function p8(e,n){Yn.call(this,e,n)}function sW(e,n){Yn.call(this,e,n)}function zD(e,n){Yn.call(this,e,n)}function h5(e,n){Yn.call(this,e,n)}function oW(e,n){Yn.call(this,e,n)}function d5(e,n){Yn.call(this,e,n)}function b5(e,n){Yn.call(this,e,n)}function $b(e,n){Yn.call(this,e,n)}function UD(e,n){Yn.call(this,e,n)}function WD(e,n){Yn.call(this,e,n)}function fW(e,n){Yn.call(this,e,n)}function w5(e,n){Yn.call(this,e,n)}function XD(e,n){Yn.call(this,e,n)}function $T(e,n){Yn.call(this,e,n)}function m8(e,n){Yn.call(this,e,n)}function v8(e,n){Yn.call(this,e,n)}function r2(e,n){Yn.call(this,e,n)}function YD(e,n){Yn.call(this,e,n)}function lW(e,n){Yn.call(this,e,n)}function QD(e,n){Yn.call(this,e,n)}function JD(e,n){Yn.call(this,e,n)}function aW(e,n){Yn.call(this,e,n)}function ZD(e,n){Yn.call(this,e,n)}function e$(e,n){Yn.call(this,e,n)}function n$(e,n){Yn.call(this,e,n)}function t$(e,n){Yn.call(this,e,n)}function hW(e,n){Yn.call(this,e,n)}function JEe(e,n){this.b=e,this.a=n}function ZEe(e,n){this.a=e,this.b=n}function eTe(e,n){this.a=e,this.b=n}function nTe(e,n){this.a=e,this.b=n}function tTe(e,n){this.a=e,this.b=n}function dW(e,n){Yn.call(this,e,n)}function bW(e,n){Yn.call(this,e,n)}function iTe(e,n){this.b=e,this.d=n}function wW(e,n){Yn.call(this,e,n)}function gW(e,n){Yn.call(this,e,n)}function rTe(e,n){this.a=e,this.b=n}function cTe(e,n){this.a=e,this.b=n}function LT(e,n){Yn.call(this,e,n)}function g5(e,n){Yn.call(this,e,n)}function pW(e,n){Yn.call(this,e,n)}function mW(e,n){Yn.call(this,e,n)}function vW(e,n){Yn.call(this,e,n)}function i$(e,n){Yn.call(this,e,n)}function yW(e,n){Yn.call(this,e,n)}function r$(e,n){Yn.call(this,e,n)}function FT(e,n){Yn.call(this,e,n)}function c$(e,n){Yn.call(this,e,n)}function u$(e,n){Yn.call(this,e,n)}function y8(e,n){Yn.call(this,e,n)}function s$(e,n){Yn.call(this,e,n)}function kW(e,n){Yn.call(this,e,n)}function k8(e,n){Yn.call(this,e,n)}function jW(e,n){Yn.call(this,e,n)}function Zan(e,n){return Nu(e.c,n)}function ehn(e,n){return Nu(n.b,e)}function nhn(e,n){return-e.b.Je(n)}function EW(e,n){return Nu(e.g,n)}function j8(e,n){Yn.call(this,e,n)}function c2(e,n){Yn.call(this,e,n)}function uTe(e,n){this.a=e,this.b=n}function sTe(e,n){this.a=e,this.b=n}function je(e,n){this.a=e,this.b=n}function p5(e,n){Yn.call(this,e,n)}function m5(e,n){Yn.call(this,e,n)}function E8(e,n){Yn.call(this,e,n)}function o$(e,n){Yn.call(this,e,n)}function NT(e,n){Yn.call(this,e,n)}function v5(e,n){Yn.call(this,e,n)}function f$(e,n){Yn.call(this,e,n)}function _T(e,n){Yn.call(this,e,n)}function gg(e,n){Yn.call(this,e,n)}function T8(e,n){Yn.call(this,e,n)}function y5(e,n){Yn.call(this,e,n)}function k5(e,n){Yn.call(this,e,n)}function C8(e,n){Yn.call(this,e,n)}function BT(e,n){Yn.call(this,e,n)}function pg(e,n){Yn.call(this,e,n)}function RT(e,n){Yn.call(this,e,n)}function oTe(e,n){this.a=e,this.b=n}function fTe(e,n){this.a=e,this.b=n}function lTe(e,n){this.a=e,this.b=n}function aTe(e,n){this.a=e,this.b=n}function hTe(e,n){this.a=e,this.b=n}function dTe(e,n){this.a=e,this.b=n}function Gi(e,n){this.a=e,this.b=n}function KT(e,n){Yn.call(this,e,n)}function bTe(e,n){this.a=e,this.b=n}function wTe(e,n){this.a=e,this.b=n}function gTe(e,n){this.a=e,this.b=n}function pTe(e,n){this.a=e,this.b=n}function mTe(e,n){this.a=e,this.b=n}function vTe(e,n){this.a=e,this.b=n}function yTe(e,n){this.b=e,this.a=n}function kTe(e,n){this.b=e,this.a=n}function jTe(e,n){this.b=e,this.a=n}function ETe(e,n){this.b=e,this.a=n}function TTe(e,n){this.a=e,this.b=n}function CTe(e,n){this.a=e,this.b=n}function thn(e,n){OCn(e.a,u(n,56))}function MTe(e,n){Vvn(e.a,u(n,11))}function ihn(e,n){return sv(),n!=e}function STe(){return Jke(),new xXe}function PTe(){FL(),this.b=new Si}function ATe(){eP(),this.a=new Si}function xTe(){wQ(),TY.call(this)}function u2(e,n){Yn.call(this,e,n)}function ITe(e,n){this.a=e,this.b=n}function OTe(e,n){this.a=e,this.b=n}function qT(e,n){this.a=e,this.b=n}function DTe(e,n){this.a=e,this.b=n}function $Te(e,n){this.a=e,this.b=n}function LTe(e,n){this.a=e,this.b=n}function FTe(e,n){this.d=e,this.b=n}function TW(e,n){this.d=e,this.e=n}function NTe(e,n){this.f=e,this.c=n}function M8(e,n){this.b=e,this.c=n}function CW(e,n){this.i=e,this.g=n}function _Te(e,n){this.e=e,this.a=n}function BTe(e,n){this.a=e,this.b=n}function MW(e,n){e.i=null,VM(e,n)}function rhn(e,n){e&&jt(tE,e,n)}function RTe(e,n){return bN(e.a,n)}function HT(e){return B7(e.c,e.b)}function mc(e){return e?e.dd():null}function X(e){return e??null}function Lb(e){return typeof e===q2}function Fb(e){return typeof e===cie}function Ni(e){return typeof e===eB}function $h(e,n){return e.Hd().Xb(n)}function VT(e,n){return y4n(e.Kc(),n)}function t0(e,n){return $c(e,n)==0}function chn(e,n){return $c(e,n)>=0}function j5(e,n){return $c(e,n)!=0}function uhn(e){return""+(nn(e),e)}function S8(e,n){return e.substr(n)}function KTe(e){return rs(e),e.d.gc()}function l$(e){return tTn(e,e.c),e}function GT(e){return L5(e==null),e}function E5(e,n){return e.a+=""+n,e}function Lr(e,n){return e.a+=""+n,e}function T5(e,n){return e.a+=""+n,e}function Pc(e,n){return e.a+=""+n,e}function Qn(e,n){return e.a+=""+n,e}function SW(e,n){return e.a+=""+n,e}function qTe(e,n){ri(e,n,e.a,e.a.a)}function K1(e,n){ri(e,n,e.c.b,e.c)}function shn(e,n,t){Q_e(n,i_(e,t))}function ohn(e,n,t){Q_e(n,i_(e,t))}function fhn(e,n){n3n(new jn(e),n)}function HTe(e,n){e.q.setTime(v0(n))}function VTe(e,n){DY.call(this,e,n)}function GTe(e,n){DY.call(this,e,n)}function a$(e,n){DY.call(this,e,n)}function zTe(e){Wu(this),s6(this,e)}function PW(e){return Qe(e,0),null}function bf(e){return e.a=0,e.b=0,e}function UTe(e,n){return e.a=n.g+1,e}function lhn(e,n){return e.j[n.p]==2}function AW(e){return zwn(u(e,79))}function WTe(){WTe=U,TYe=Zn(yN())}function XTe(){XTe=U,KQe=Zn(IKe())}function YTe(){this.b=new n2(Zb(12))}function QTe(){this.b=0,this.a=!1}function JTe(){this.b=0,this.a=!1}function C5(e){this.a=e,tD.call(this)}function ZTe(e){this.a=e,tD.call(this)}function Ve(e,n){yi.call(this,e,n)}function h$(e,n){Kb.call(this,e,n)}function mg(e,n){CW.call(this,e,n)}function d$(e,n){Bv.call(this,e,n)}function eCe(e,n){P8.call(this,e,n)}function st(e,n){ET(),jt(GI,e,n)}function b$(e,n){return Ms(e.a,0,n)}function nCe(e,n){return e.a.a.a.cc(n)}function tCe(e,n){return X(e)===X(n)}function ahn(e,n){return gi(e.a,n.a)}function hhn(e,n){return mu(e.a,n.a)}function dhn(e,n){return NPe(e.a,n.a)}function ll(e,n){return e.indexOf(n)}function i0(e,n){return e==n?0:e?1:-1}function zT(e){return e<10?"0"+e:""+e}function bhn(e){return Nn(e),new C5(e)}function iCe(e){return fu(e.l,e.m,e.h)}function ev(e){return ci((nn(e),e))}function whn(e){return ci((nn(e),e))}function rCe(e,n){return mu(e.g,n.g)}function nc(e){return typeof e===cie}function ghn(e){return e==eb||e==$w}function phn(e){return e==eb||e==Dw}function xW(e){return tc(e.b.b,e,0)}function cCe(e){this.a=STe(),this.b=e}function uCe(e){this.a=STe(),this.b=e}function mhn(e,n){return se(e.a,n),n}function vhn(e,n){return se(e.c,n),e}function sCe(e,n){return Os(e.a,n),e}function yhn(e,n){return zo(),n.a+=e}function khn(e,n){return zo(),n.a+=e}function jhn(e,n){return zo(),n.c+=e}function IW(e,n){Cv(e,0,e.length,n)}function fa(){_z.call(this,new X1)}function oCe(){CC.call(this,0,0,0,0)}function s2(){Xs.call(this,0,0,0,0)}function Kr(e){this.a=e.a,this.b=e.b}function Lh(e){return e==Ao||e==cf}function nv(e){return e==Da||e==Oa}function fCe(e){return e==xp||e==Ap}function vg(e){return e!=el&&e!=j1}function gs(e){return e.Lg()&&e.Mg()}function lCe(e){return KC(u(e,118))}function UT(e){return Os(new Pi,e)}function aCe(e,n){return new Bv(n,e)}function Ehn(e,n){return new Bv(n,e)}function OW(e,n,t){FM(e,n),NM(e,t)}function WT(e,n,t){C0(e,n),T0(e,t)}function xf(e,n,t){Cu(e,n),Mu(e,t)}function XT(e,n,t){Av(e,n),Iv(e,t)}function YT(e,n,t){xv(e,n),Ov(e,t)}function w$(e,n){Gv(e,n),Dv(e,e.D)}function DW(e){NTe.call(this,e,!0)}function hCe(e,n,t){jX.call(this,e,n,t)}function Fh(e){n1(),T4n.call(this,e)}function dCe(){MT.call(this,"Head",1)}function bCe(){MT.call(this,"Tail",3)}function g$(e){e.c=V(pn,pe,1,0,5,1)}function wCe(e){e.a=V(pn,pe,1,8,5,1)}function gCe(e){Tu(e.xf(),new r9e(e))}function yg(e){return e!=null?Bt(e):0}function Thn(e,n){return ew(n,Df(e))}function Chn(e,n){return ew(n,Df(e))}function Mhn(e,n){return e[e.length]=n}function Shn(e,n){return e[e.length]=n}function $W(e){return Mbn(e.b.Kc(),e.a)}function Phn(e,n){return HM(wL(e.d),n)}function Ahn(e,n){return HM(wL(e.g),n)}function xhn(e,n){return HM(wL(e.j),n)}function Tr(e,n){yi.call(this,e.b,n)}function r0(e){CC.call(this,e,e,e,e)}function LW(e){return e.b&&N_(e),e.a}function FW(e){return e.b&&N_(e),e.c}function Ihn(e,n){Xf||(e.b=n)}function p$(e,n,t){return zt(e,n,t),t}function pCe(e,n,t){zt(e.c[n.g],n.g,t)}function Ohn(e,n,t){u(e.c,69).Xh(n,t)}function Dhn(e,n,t){xf(t,t.i+e,t.j+n)}function $hn(e,n){Bn(Bc(e.a),Ixe(n))}function Lhn(e,n){Bn(ts(e.a),Oxe(n))}function M5(e){gt(),Gd.call(this,e)}function Fhn(e){return e==null?0:Bt(e)}function mCe(){mCe=U,KH=new p6(FV)}function qn(){qn=U,new vCe,new oe}function vCe(){new Ln,new Ln,new Ln}function NW(){NW=U,nU(),Sue=new Ln}function If(){If=U,y.Math.log(2)}function Us(){Us=U,ra=(CEe(),$rn)}function Nhn(){throw I(new Ba(cXe))}function _hn(){throw I(new Ba(cXe))}function Bhn(){throw I(new Ba(uXe))}function Rhn(){throw I(new Ba(uXe))}function yCe(e){this.a=e,nY.call(this,e)}function m$(e){this.a=e,dT.call(this,e)}function v$(e){this.a=e,dT.call(this,e)}function Oi(e,n){Y$(e.c,e.c.length,n)}function fc(e){return e.an?1:0}function jCe(e,n){return $c(e,n)>0?e:n}function fu(e,n,t){return{l:e,m:n,h:t}}function Khn(e,n){e.a!=null&&MTe(n,e.a)}function ECe(e){e.a=new _a,e.c=new _a}function QT(e){this.b=e,this.a=new oe}function TCe(e){this.b=new fwe,this.a=e}function BW(e){IX.call(this),this.a=e}function CCe(){MT.call(this,"Range",2)}function MCe(){Dee(),this.a=new sk(noe)}function qhn(e,n){Nn(n),Cg(e).Jc(new bn)}function Hhn(e,n){return Ss(),n.n.b+=e}function Vhn(e,n,t){return jt(e.g,t,n)}function Ghn(e,n,t){return jt(e.k,t,n)}function zhn(e,n){return jt(e.a,n.a,n)}function kg(e,n,t){return ZZ(n,t,e.c)}function RW(e){return new je(e.c,e.d)}function Uhn(e){return new je(e.c,e.d)}function vc(e){return new je(e.a,e.b)}function SCe(e,n){return gIn(e.a,n,null)}function Whn(e){sr(e,null),Ki(e,null)}function PCe(e){_L(e,null),BL(e,null)}function ACe(){P8.call(this,null,null)}function xCe(){cC.call(this,null,null)}function KW(e){this.a=e,Ln.call(this)}function Xhn(e){this.b=(He(),new fD(e))}function JT(e){e.j=V(Rue,ie,310,0,0,1)}function Yhn(e,n,t){e.c.Vc(n,u(t,133))}function Qhn(e,n,t){e.c.ji(n,u(t,133))}function ICe(e,n){Dn(e),e.Gc(u(n,15))}function S5(e,n){return Oxn(e.c,e.b,n)}function Jhn(e,n){return new ZCe(e.Kc(),n)}function y$(e,n){return Q4n(e.Kc(),n)!=-1}function qW(e,n){return e.a.Bc(n)!=null}function ZT(e){return e.Ob()?e.Pb():null}function OCe(e){return mo(e,0,e.length)}function _(e,n){return e!=null&&TN(e,n)}function Zhn(e,n){e.q.setHours(n),F6(e,n)}function DCe(e,n){e.c&&(hY(n),cxe(n))}function e1n(e,n,t){u(e.Kb(t),164).Nb(n)}function n1n(e,n,t){return fIn(e,n,t),t}function $Ce(e,n,t){e.a=n^1502,e.b=t^DB}function k$(e,n,t){return e.a[n.g][t.g]}function Of(e,n){return e.a[n.c.p][n.p]}function t1n(e,n){return e.e[n.c.p][n.p]}function i1n(e,n){return e.c[n.c.p][n.p]}function r1n(e,n){return e.j[n.p]=dCn(n)}function c1n(e,n){return GQ(e.f,n.tg())}function u1n(e,n){return GQ(e.b,n.tg())}function s1n(e,n){return e.a0?n*n/e:n*n*100}function O1n(e,n){return e>0?n/(e*e):n*100}function D1n(e,n,t){return se(n,iNe(e,t))}function $1n(e,n,t){jM(),e.Xe(n)&&t.td(e)}function rv(e,n,t){var i;i=e.Zc(n),i.Rb(t)}function _b(e,n,t){return e.a+=n,e.b+=t,e}function L1n(e,n,t){return e.a*=n,e.b*=t,e}function I8(e,n,t){return e.a-=n,e.b-=t,e}function hX(e,n){return e.a=n.a,e.b=n.b,e}function oC(e){return e.a=-e.a,e.b=-e.b,e}function aMe(e){this.c=e,this.a=1,this.b=1}function hMe(e){this.c=e,Cu(e,0),Mu(e,0)}function dMe(e){Vt.call(this),i6(this,e)}function bMe(e){J_(),B7e(this),this.mf(e)}function wMe(e,n){s5(),P8.call(this,e,n)}function dX(e,n){qa(),cC.call(this,e,n)}function gMe(e,n){qa(),cC.call(this,e,n)}function pMe(e,n){qa(),dX.call(this,e,n)}function ps(e,n,t){ks.call(this,e,n,t,2)}function P$(e,n){Us(),TC.call(this,e,n)}function mMe(e,n){Us(),P$.call(this,e,n)}function bX(e,n){Us(),P$.call(this,e,n)}function vMe(e,n){Us(),bX.call(this,e,n)}function wX(e,n){Us(),TC.call(this,e,n)}function yMe(e,n){Us(),wX.call(this,e,n)}function kMe(e,n){Us(),TC.call(this,e,n)}function F1n(e,n){return e.c.Fc(u(n,133))}function gX(e,n,t){return hP(d7(e,n),t)}function N1n(e,n,t){return n.Qk(e.e,e.c,t)}function _1n(e,n,t){return n.Rk(e.e,e.c,t)}function A$(e,n){return Yh(e.e,u(n,49))}function B1n(e,n,t){w6(ts(e.a),n,Oxe(t))}function R1n(e,n,t){w6(Bc(e.a),n,Ixe(t))}function pX(e,n){n.$modCount=e.$modCount}function O5(){O5=U,t9=new Rt("root")}function cv(){cv=U,rE=new pke,new mke}function jMe(){this.a=new p0,this.b=new p0}function mX(){K$e.call(this),this.Bb|=yr}function EMe(){Yn.call(this,"GROW_TREE",0)}function K1n(e){return e==null?null:cOn(e)}function q1n(e){return e==null?null:djn(e)}function H1n(e){return e==null?null:rc(e)}function V1n(e){return e==null?null:rc(e)}function la(e){e.o==null&&KTn(e)}function ye(e){return L5(e==null||Lb(e)),e}function he(e){return L5(e==null||Fb(e)),e}function Vn(e){return L5(e==null||Ni(e)),e}function vX(e){this.q=new y.Date(v0(e))}function O8(e,n){this.c=e,Xm.call(this,e,n)}function fC(e,n){this.a=e,O8.call(this,e,n)}function G1n(e,n){this.d=e,Dye(this),this.b=n}function yX(e,n){uF.call(this,e),this.a=n}function kX(e,n){uF.call(this,e),this.a=n}function z1n(e){WZ.call(this,0,0),this.f=e}function jX(e,n,t){yM.call(this,e,n,t,null)}function TMe(e,n,t){yM.call(this,e,n,t,null)}function U1n(e,n,t){return e.ue(n,t)<=0?t:n}function W1n(e,n,t){return e.ue(n,t)<=0?n:t}function X1n(e,n){return u(k0(e.b,n),149)}function Y1n(e,n){return u(k0(e.c,n),229)}function x$(e){return u(ve(e.a,e.b),287)}function CMe(e){return new je(e.c,e.d+e.a)}function MMe(e){return Ss(),fCe(u(e,197))}function Bb(){Bb=U,xse=_e((Es(),_d))}function Q1n(e,n){n.a?FMn(e,n):j$(e.a,n.b)}function SMe(e,n){Xf||se(e.a,n)}function J1n(e,n){return a8(),_v(n.d.i,e)}function Z1n(e,n){return A2(),new Aqe(n,e)}function hl(e,n){return W8(n,Cie),e.f=n,e}function EX(e,n,t){return t=Ls(e,n,3,t),t}function TX(e,n,t){return t=Ls(e,n,6,t),t}function CX(e,n,t){return t=Ls(e,n,9,t),t}function D8(e,n,t){++e.j,e.Ki(),rF(e,n,t)}function PMe(e,n,t){++e.j,e.Hi(n,e.oi(n,t))}function AMe(e,n,t){var i;i=e.Zc(n),i.Rb(t)}function xMe(e,n,t){return Bte(e.c,e.b,n,t)}function MX(e,n){return(n&vt)%e.d.length}function yi(e,n){Rt.call(this,e),this.a=n}function SX(e,n){Wz.call(this,e),this.a=n}function I$(e,n){Wz.call(this,e),this.a=n}function IMe(e,n){this.c=e,j0.call(this,n)}function OMe(e,n){this.a=e,D7e.call(this,n)}function $8(e,n){this.a=e,D7e.call(this,n)}function DMe(e){this.a=(Is(e,kw),new tu(e))}function $Me(e){this.a=(Is(e,kw),new tu(e))}function L8(e){return!e.a&&(e.a=new xn),e.a}function LMe(e){return e>8?0:e+1}function edn(e,n){return cn(),e==n?0:e?1:-1}function PX(e,n,t){return d2(e,u(n,22),t)}function ndn(e,n,t){return e.apply(n,t)}function FMe(e,n,t){return e.a+=mo(n,0,t),e}function AX(e,n){var t;return t=e.e,e.e=n,t}function tdn(e,n){var t;t=e[OB],t.call(e,n)}function idn(e,n){var t;t=e[OB],t.call(e,n)}function Rb(e,n){e.a.Vc(e.b,n),++e.b,e.c=-1}function NMe(e){Wu(e.e),e.d.b=e.d,e.d.a=e.d}function F8(e){e.b?F8(e.b):e.f.c.zc(e.e,e.d)}function rdn(e,n,t){R1(),xye(e,n.Ce(e.a,t))}function cdn(e,n){return ID(vNe(e.a,n,!0))}function udn(e,n){return ID(yNe(e.a,n,!0))}function Go(e,n){return sT(new Array(n),e)}function O$(e){return String.fromCharCode(e)}function sdn(e){return e==null?null:e.message}function _Me(){this.a=new oe,this.b=new oe}function BMe(){this.a=new XG,this.b=new W7e}function RMe(){this.b=new tr,this.c=new oe}function xX(){this.d=new tr,this.e=new tr}function IX(){this.n=new tr,this.o=new tr}function lC(){this.n=new Qp,this.i=new s2}function KMe(){this.a=new y6e,this.b=new sme}function qMe(){this.a=new oe,this.d=new oe}function HMe(){this.b=new Si,this.a=new Si}function VMe(){this.b=new Ln,this.a=new Ln}function GMe(){this.b=new Cje,this.a=new fve}function zMe(){lC.call(this),this.a=new tr}function D5(e){O4n.call(this,e,(TM(),XK))}function OX(e,n,t,i){CC.call(this,e,n,t,i)}function odn(e,n,t){t!=null&&KM(n,LN(e,t))}function fdn(e,n,t){t!=null&&qM(n,LN(e,t))}function DX(e,n,t){return t=Ls(e,n,11,t),t}function Mt(e,n){return e.a+=n.a,e.b+=n.b,e}function _i(e,n){return e.a-=n.a,e.b-=n.b,e}function ldn(e,n){return e.n.a=(nn(n),n+10)}function adn(e,n){return e.n.a=(nn(n),n+10)}function hdn(e,n){return n==e||c3(QS(n),e)}function UMe(e,n){return jt(e.a,n,"")==null}function ddn(e,n){return a8(),!_v(n.d.i,e)}function bdn(e,n){Lh(e.f)?ITn(e,n):wkn(e,n)}function wdn(e,n){var t;return t=n.Hh(e.a),t}function Kb(e,n){Rr.call(this,hy+e+yd+n)}function l2(e,n,t,i){fe.call(this,e,n,t,i)}function $X(e,n,t,i){fe.call(this,e,n,t,i)}function WMe(e,n,t,i){$X.call(this,e,n,t,i)}function XMe(e,n,t,i){LC.call(this,e,n,t,i)}function D$(e,n,t,i){LC.call(this,e,n,t,i)}function LX(e,n,t,i){LC.call(this,e,n,t,i)}function YMe(e,n,t,i){D$.call(this,e,n,t,i)}function FX(e,n,t,i){D$.call(this,e,n,t,i)}function Xe(e,n,t,i){LX.call(this,e,n,t,i)}function QMe(e,n,t,i){FX.call(this,e,n,t,i)}function JMe(e,n,t,i){$Y.call(this,e,n,t,i)}function ZMe(e,n,t){this.a=e,oX.call(this,n,t)}function eSe(e,n,t){this.c=n,this.b=t,this.a=e}function gdn(e,n,t){return e.d=u(n.Kb(t),164)}function NX(e,n){return e.Aj().Nh().Kh(e,n)}function _X(e,n){return e.Aj().Nh().Ih(e,n)}function nSe(e,n){return nn(e),X(e)===X(n)}function Re(e,n){return nn(e),X(e)===X(n)}function $$(e,n){return ID(vNe(e.a,n,!1))}function L$(e,n){return ID(yNe(e.a,n,!1))}function pdn(e,n){return e.b.sd(new $Ee(e,n))}function mdn(e,n){return e.b.sd(new LEe(e,n))}function tSe(e,n){return e.b.sd(new FEe(e,n))}function BX(e,n,t){return e.lastIndexOf(n,t)}function vdn(e,n,t){return gi(e[n.b],e[t.b])}function ydn(e,n){return te(n,(be(),yj),e)}function kdn(e,n){return mu(n.a.d.p,e.a.d.p)}function jdn(e,n){return mu(e.a.d.p,n.a.d.p)}function Edn(e,n){return gi(e.c-e.s,n.c-n.s)}function iSe(e){return e.c?tc(e.c.a,e,0):-1}function Tdn(e){return e<100?null:new Ah(e)}function a2(e){return e==Nd||e==ia||e==Zc}function rSe(e,n){return _(n,15)&&lqe(e.c,n)}function Cdn(e,n){Xf||n&&(e.d=n)}function F$(e,n){var t;return t=n,!!oZ(e,t)}function RX(e,n){this.c=e,fL.call(this,e,n)}function cSe(e){this.c=e,a$.call(this,yP,0)}function uSe(e,n){xbn.call(this,e,e.length,n)}function Mdn(e,n,t){return u(e.c,69).lk(n,t)}function aC(e,n,t){return u(e.c,69).mk(n,t)}function Sdn(e,n,t){return N1n(e,u(n,332),t)}function KX(e,n,t){return _1n(e,u(n,332),t)}function Pdn(e,n,t){return rBe(e,u(n,332),t)}function sSe(e,n,t){return Mkn(e,u(n,332),t)}function $5(e,n){return n==null?null:rw(e.b,n)}function qX(e){return Fb(e)?(nn(e),e):e.ke()}function hC(e){return!isNaN(e)&&!isFinite(e)}function oSe(e){dl(),this.a=(He(),new Vm(e))}function N8(e){sv(),this.d=e,this.a=new ag}function Ws(e,n,t){this.a=e,this.b=n,this.c=t}function fSe(e,n,t){this.a=e,this.b=n,this.c=t}function lSe(e,n,t){this.d=e,this.b=t,this.a=n}function N$(e){ECe(this),go(this),pr(this,e)}function _u(e){g$(this),iY(this.c,0,e.Pc())}function aSe(e){ys(e.a),oDe(e.c,e.b),e.b=null}function hSe(e){this.a=e,$l(),Su(Date.now())}function dSe(){dSe=U,sse=new N,_A=new N}function _$(){_$=U,Jue=new ua,IXe=new Gs}function bSe(){bSe=U,Brn=V(pn,pe,1,0,5,1)}function wSe(){wSe=U,icn=V(pn,pe,1,0,5,1)}function HX(){HX=U,rcn=V(pn,pe,1,0,5,1)}function dl(){dl=U,new Qz((He(),He(),Sr))}function Adn(e){return TM(),Jn((vDe(),$Xe),e)}function xdn(e){return qf(),Jn((_Oe(),RXe),e)}function Idn(e){return ES(),Jn((GIe(),zXe),e)}function Odn(e){return AM(),Jn((zIe(),UXe),e)}function Ddn(e){return iP(),Jn((OLe(),WXe),e)}function $dn(e){return mf(),Jn((LOe(),QXe),e)}function Ldn(e){return Xu(),Jn((FOe(),ZXe),e)}function Fdn(e){return Eu(),Jn((NOe(),nYe),e)}function Ndn(e){return mP(),Jn((WTe(),TYe),e)}function _dn(e){return P0(),Jn((kDe(),MYe),e)}function Bdn(e){return L2(),Jn((jDe(),PYe),e)}function Rdn(e){return k6(),Jn((EDe(),IYe),e)}function Kdn(e){return pT(),Jn((EIe(),OYe),e)}function qdn(e){return xM(),Jn((UIe(),XYe),e)}function Hdn(e){return n6(),Jn((BOe(),gQe),e)}function Vdn(e){return mr(),Jn((ZDe(),yQe),e)}function Gdn(e){return Kv(),Jn((yDe(),CQe),e)}function zdn(e){return A0(),Jn((ROe(),IQe),e)}function VX(e,n){if(!e)throw I(new rn(n))}function Udn(e){return dn(),Jn((y$e(),LQe),e)}function GX(e){CC.call(this,e.d,e.c,e.a,e.b)}function B$(e){CC.call(this,e.d,e.c,e.a,e.b)}function zX(e,n,t){this.b=e,this.c=n,this.a=t}function dC(e,n,t){this.b=e,this.a=n,this.c=t}function gSe(e,n,t){this.a=e,this.b=n,this.c=t}function UX(e,n,t){this.a=e,this.b=n,this.c=t}function pSe(e,n,t){this.a=e,this.b=n,this.c=t}function WX(e,n,t){this.a=e,this.b=n,this.c=t}function mSe(e,n,t){this.b=e,this.a=n,this.c=t}function bC(e,n,t){this.e=n,this.b=e,this.d=t}function Wdn(e,n,t){return R1(),e.a.Od(n,t),n}function R$(e){var n;return n=new VO,n.e=e,n}function XX(e){var n;return n=new nke,n.b=e,n}function _8(){_8=U,QA=new Fge,JA=new Nge}function zo(){zo=U,XQe=new v2e,YQe=new y2e}function Xdn(e){return tS(),Jn((CDe(),VQe),e)}function Ydn(e){return Kf(),Jn((SDe(),ZQe),e)}function Qdn(e){return nP(),Jn((kLe(),sJe),e)}function Jdn(e){return N2(),Jn((E$e(),oJe),e)}function Zdn(e){return kM(),Jn((ZIe(),fJe),e)}function e0n(e){return P2(),Jn((KOe(),lJe),e)}function n0n(e){return Vg(),Jn((WDe(),nJe),e)}function t0n(e){return S0(),Jn((VOe(),uJe),e)}function i0n(e){return BM(),Jn((qOe(),aJe),e)}function r0n(e){return ld(),Jn((zDe(),hJe),e)}function c0n(e){return m7(),Jn((XIe(),dJe),e)}function u0n(e){return td(),Jn((HOe(),wJe),e)}function s0n(e){return GS(),Jn((S$e(),gJe),e)}function o0n(e){return l7(),Jn((YIe(),pJe),e)}function f0n(e){return Y7(),Jn((C$e(),mJe),e)}function l0n(e){return s3(),Jn((T$e(),vJe),e)}function a0n(e){return xr(),Jn((ULe(),yJe),e)}function h0n(e){return Rv(),Jn((zOe(),kJe),e)}function d0n(e){return ma(),Jn((GOe(),EJe),e)}function b0n(e){return lM(),Jn((eOe(),TJe),e)}function w0n(e){return to(),Jn((XDe(),CJe),e)}function g0n(e){return KS(),Jn((M$e(),Ren),e)}function p0n(e){return a6(),Jn((UOe(),Ken),e)}function m0n(e){return sw(),Jn((PDe(),qen),e)}function v0n(e){return Pr(),Jn((YOe(),Wen),e)}function y0n(e){return Wg(),Jn((yLe(),Ven),e)}function k0n(e){return ya(),Jn((XOe(),Gen),e)}function j0n(e){return b7(),Jn((JIe(),zen),e)}function E0n(e){return JM(),Jn((WOe(),Xen),e)}function T0n(e){return j6(),Jn((UDe(),Hen),e)}function C0n(e){return r7(),Jn((QIe(),Yen),e)}function M0n(e){return Uv(),Jn((JOe(),Qen),e)}function S0n(e){return YM(),Jn((ZOe(),Jen),e)}function P0n(e){return iS(),Jn((QOe(),Zen),e)}function A0n(e){return M0(),Jn((eDe(),hnn),e)}function x0n(e){return Z5(),Jn((tOe(),pnn),e)}function I0n(e){return wl(),Jn((iOe(),Tnn),e)}function O0n(e){return $f(),Jn((rOe(),Mnn),e)}function D0n(e){return wf(),Jn((nOe(),Knn),e)}function $0n(e){return g0(),Jn((cOe(),Wnn),e)}function L0n(e){return t3(),Jn((TDe(),Xnn),e)}function F0n(e){return P6(),Jn((P$e(),Qnn),e)}function N0n(e){return tM(),Jn((oOe(),atn),e)}function _0n(e){return UM(),Jn((sOe(),ptn),e)}function B0n(e){return uM(),Jn((uOe(),htn),e)}function R0n(e){return bS(),Jn((nDe(),vtn),e)}function K0n(e){return EM(),Jn((fOe(),ytn),e)}function q0n(e){return O7(),Jn((tDe(),ktn),e)}function H0n(e){return DS(),Jn((MDe(),Ftn),e)}function V0n(e){return QM(),Jn((rDe(),Ntn),e)}function G0n(e){return dS(),Jn((iDe(),_tn),e)}function z0n(e){return d3(),Jn((JDe(),rin),e)}function U0n(e){return _7(),Jn((cDe(),cin),e)}function W0n(e){return vT(),Jn((kIe(),uin),e)}function X0n(e){return yT(),Jn((yIe(),oin),e)}function Y0n(e){return c7(),Jn((aOe(),fin),e)}function Q0n(e){return J7(),Jn((YDe(),lin),e)}function J0n(e){return c5(),Jn((jIe(),Min),e)}function Z0n(e){return P7(),Jn((lOe(),Sin),e)}function ebn(e){return yf(),Jn((QDe(),Din),e)}function nbn(e){return rh(),Jn((jLe(),Lin),e)}function tbn(e){return Hl(),Jn((j$e(),Fin),e)}function ibn(e){return lw(),Jn((k$e(),qin),e)}function rbn(e){return Mr(),Jn((XTe(),KQe),e)}function cbn(e){return Lv(),Jn((WIe(),RQe),e)}function ubn(e){return Ar(),Jn((e$e(),irn),e)}function sbn(e){return Bf(),Jn((sDe(),rrn),e)}function obn(e){return Ea(),Jn((IDe(),crn),e)}function fbn(e){return HS(),Jn((x$e(),urn),e)}function lbn(e){return ka(),Jn((uDe(),orn),e)}function abn(e){return Ds(),Jn((xDe(),lrn),e)}function hbn(e){return bw(),Jn((ILe(),arn),e)}function dbn(e){return _g(),Jn((n$e(),hrn),e)}function bbn(e){return Hi(),Jn((g$e(),drn),e)}function wbn(e){return Yu(),Jn((A$e(),brn),e)}function gbn(e){return Es(),Jn((DDe(),yrn),e)}function pbn(e){return us(),Jn((WLe(),krn),e)}function mbn(e){return ae(),Jn((t$e(),wrn),e)}function vbn(e){return pS(),Jn((ODe(),jrn),e)}function ybn(e){return js(),Jn((ADe(),Crn),e)}function kbn(e){return l3(),Jn((ELe(),_rn),e)}function jbn(e,n){return nn(e),e+(nn(n),n)}function Ebn(e,n){return $l(),Bn(Q(e.a),n)}function Tbn(e,n){return $l(),Bn(Q(e.a),n)}function K$(e,n){this.c=e,this.a=n,this.b=n-e}function vSe(e,n,t){this.a=e,this.b=n,this.c=t}function YX(e,n,t){this.a=e,this.b=n,this.c=t}function QX(e,n,t){this.a=e,this.b=n,this.c=t}function ySe(e,n,t){this.a=e,this.b=n,this.c=t}function kSe(e,n,t){this.a=e,this.b=n,this.c=t}function Va(e,n,t){this.e=e,this.a=n,this.c=t}function jSe(e,n,t){Us(),fQ.call(this,e,n,t)}function q$(e,n,t){Us(),UY.call(this,e,n,t)}function JX(e,n,t){Us(),UY.call(this,e,n,t)}function ZX(e,n,t){Us(),UY.call(this,e,n,t)}function ESe(e,n,t){Us(),q$.call(this,e,n,t)}function eY(e,n,t){Us(),q$.call(this,e,n,t)}function TSe(e,n,t){Us(),eY.call(this,e,n,t)}function CSe(e,n,t){Us(),JX.call(this,e,n,t)}function MSe(e,n,t){Us(),ZX.call(this,e,n,t)}function B8(e,n){return Nn(e),Nn(n),new Uje(e,n)}function h2(e,n){return Nn(e),Nn(n),new BSe(e,n)}function Cbn(e,n){return Nn(e),Nn(n),new RSe(e,n)}function Mbn(e,n){return Nn(e),Nn(n),new Xje(e,n)}function u(e,n){return L5(e==null||TN(e,n)),e}function uv(e){var n;return n=new oe,pF(n,e),n}function Sbn(e){var n;return n=new Si,pF(n,e),n}function SSe(e){var n;return n=new uU,IF(n,e),n}function R8(e){var n;return n=new Vt,IF(n,e),n}function Pbn(e){return!e.e&&(e.e=new oe),e.e}function Abn(e){return!e.c&&(e.c=new Lm),e.c}function se(e,n){return e.c[e.c.length]=n,!0}function PSe(e,n){this.c=e,this.b=n,this.a=!1}function nY(e){this.d=e,Dye(this),this.b=kwn(e.d)}function ASe(){this.a=";,;",this.b="",this.c=""}function xbn(e,n,t){xPe.call(this,n,t),this.a=e}function xSe(e,n,t){this.b=e,VTe.call(this,n,t)}function tY(e,n,t){this.c=e,ST.call(this,n,t)}function iY(e,n,t){Cne(t,0,e,n,t.length,!1)}function Fl(e,n,t,i,r){e.b=n,e.c=t,e.d=i,e.a=r}function Ibn(e,n){n&&(e.b=n,e.a=(qh(n),n.a))}function rY(e,n,t,i,r){e.d=n,e.c=t,e.a=i,e.b=r}function cY(e){var n,t;n=e.b,t=e.c,e.b=t,e.c=n}function uY(e){var n,t;t=e.d,n=e.a,e.d=n,e.a=t}function sY(e){return Uh(Nwn(nc(e)?po(e):e))}function Obn(e,n){return mu(zSe(e.d),zSe(n.d))}function Dbn(e,n){return n==(ae(),un)?e.c:e.d}function sv(){sv=U,Mae=(ae(),un),iI=hn}function ISe(){this.b=ne(he(me((jf(),hq))))}function OSe(e){return R1(),V(pn,pe,1,e,5,1)}function $bn(e){return new je(e.c+e.b,e.d+e.a)}function Lbn(e,n){return mT(),mu(e.d.p,n.d.p)}function H$(e){return vn(e.b!=0),Zs(e,e.a.a)}function Fbn(e){return vn(e.b!=0),Zs(e,e.c.b)}function oY(e,n){if(!e)throw I(new Kke(n))}function wC(e,n){if(!e)throw I(new rn(n))}function fY(e,n,t){Zm.call(this,e,n),this.b=t}function K8(e,n,t){TW.call(this,e,n),this.c=t}function DSe(e,n,t){l$e.call(this,n,t),this.d=e}function lY(e){HX(),qE.call(this),this.th(e)}function $Se(e,n,t){this.a=e,mg.call(this,n,t)}function LSe(e,n,t){this.a=e,mg.call(this,n,t)}function gC(e,n,t){TW.call(this,e,n),this.c=t}function FSe(){jv(),ngn.call(this,(Oh(),Fo))}function NSe(e){return e!=null&&!lN(e,y9,k9)}function Nbn(e,n){return(zFe(e)<<4|zFe(n))&si}function _bn(e,n){return RC(),ON(e,n),new lAe(e,n)}function q1(e,n){var t;e.n&&(t=n,se(e.f,t))}function ov(e,n,t){var i;i=new Gb(t),pf(e,n,i)}function Bbn(e,n){var t;return t=e.c,PJ(e,n),t}function aY(e,n){return n<0?e.g=-1:e.g=n,e}function pC(e,n){return E3n(e),e.a*=n,e.b*=n,e}function _Se(e,n,t,i,r){e.c=n,e.d=t,e.b=i,e.a=r}function ut(e,n){return ri(e,n,e.c.b,e.c),!0}function hY(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function V$(e){this.b=e,this.a=f0(this.b.a).Ed()}function BSe(e,n){this.b=e,this.a=n,tD.call(this)}function RSe(e,n){this.a=e,this.b=n,tD.call(this)}function KSe(e,n){xPe.call(this,n,1040),this.a=e}function q8(e){return e==0||isNaN(e)?e:e<0?-1:1}function Rbn(e){return m2(),Vl(e)==Ut(Jh(e))}function Kbn(e){return m2(),Jh(e)==Ut(Vl(e))}function o0(e,n){return M6(e,new Zm(n.a,n.b))}function qbn(e){return!gr(e)&&e.c.i.c==e.d.i.c}function mC(e){var n;return n=e.n,e.a.b+n.d+n.a}function qSe(e){var n;return n=e.n,e.e.b+n.d+n.a}function dY(e){var n;return n=e.n,e.e.a+n.b+n.c}function HSe(e){return gt(),new Nl(0,e)}function Hbn(e){return e.a?e.a:TL(e)}function L5(e){if(!e)throw I(new Hm(null))}function VSe(){VSe=U,YV=(He(),new oD(CK))}function vC(){vC=U,new lee((vD(),NK),(yD(),FK))}function GSe(){GSe=U,Lue=V(br,ie,19,256,0,1)}function G$(e,n,t,i){BZ.call(this,e,n,t,i,0,0)}function Vbn(e,n,t){return jt(e.b,u(t.b,17),n)}function Gbn(e,n,t){return jt(e.b,u(t.b,17),n)}function zbn(e,n){return se(e,new je(n.a,n.b))}function Ubn(e,n){return e.c=n)throw I(new tU)}function Awn(e,n,t){return zt(n,0,pY(n[0],t[0])),n}function xwn(e,n,t){n.Ye(t,ne(he(kn(e.b,t)))*e.a)}function APe(e,n,t){return Yg(),Fv(e,n)&&Fv(e,t)}function R5(e){return Yu(),!e.Hc(La)&&!e.Hc(E1)}function DC(e){return new je(e.c+e.b/2,e.d+e.a/2)}function iL(e,n){return n.kh()?Yh(e.b,u(n,49)):n}function DY(e,n){this.e=e,this.d=n&64?n|ml:n}function xPe(e,n){this.c=0,this.d=e,this.b=n|64|ml}function $C(e){this.b=new tu(11),this.a=(Mg(),e)}function rL(e){this.b=null,this.a=(Mg(),e||Xue)}function IPe(e){this.a=e_e(e.a),this.b=new _u(e.b)}function OPe(e){this.b=e,o2.call(this,e),LCe(this)}function DPe(e){this.b=e,A8.call(this,e),FCe(this)}function Vb(e,n,t){this.a=e,l2.call(this,n,t,5,6)}function $Y(e,n,t,i){this.b=e,bi.call(this,n,t,i)}function Di(e,n,t,i,r){fF.call(this,e,n,t,i,r,-1)}function K5(e,n,t,i,r){o7.call(this,e,n,t,i,r,-1)}function fe(e,n,t,i){bi.call(this,e,n,t),this.b=i}function LC(e,n,t,i){K8.call(this,e,n,t),this.b=i}function $Pe(e){NTe.call(this,e,!1),this.a=!1}function LPe(e,n){this.b=e,gye.call(this,e.b),this.a=n}function FPe(e,n){zb(),Dan.call(this,e,fS(new ws(n)))}function FC(e,n){return gt(),new WY(e,n,0)}function cL(e,n){return gt(),new WY(6,e,n)}function Iwn(e,n){return Re(e.substr(0,n.length),n)}function vs(e,n){return Ni(n)?SL(e,n):!!Xr(e.f,n)}function Wi(e,n){for(nn(n);e.Ob();)n.td(e.Pb())}function Tg(e,n,t){n1(),this.e=e,this.d=n,this.a=t}function Ga(e,n,t,i){var r;r=e.i,r.i=n,r.a=t,r.b=i}function LY(e){var n;for(n=e;n.f;)n=n.f;return n}function w2(e){var n;return n=l6(e),vn(n!=null),n}function Own(e){var n;return n=p6n(e),vn(n!=null),n}function lv(e,n){var t;return t=e.a.gc(),zQ(n,t),t-n}function FY(e,n){var t;for(t=0;t0?y.Math.log(e/n):-100}function NPe(e,n){return $c(e,n)<0?-1:$c(e,n)>0?1:0}function KY(e,n,t){return PHe(e,u(n,46),u(t,167))}function _Pe(e,n){return u(IY(f0(e.a)).Xb(n),42).cd()}function Kwn(e,n){return l3n(n,e.length),new KSe(e,n)}function fL(e,n){this.d=e,jn.call(this,e),this.e=n}function l0(e){this.d=(nn(e),e),this.a=0,this.c=yP}function qY(e,n){Gd.call(this,1),this.a=e,this.b=n}function BPe(e,n){return e.c?BPe(e.c,n):se(e.b,n),e}function qwn(e,n,t){var i;return i=Jb(e,n),UL(e,n,t),i}function HY(e,n){var t;return t=e.slice(0,n),uJ(t,e)}function RPe(e,n,t){var i;for(i=0;i=e.g}function mL(e,n,t){var i;return i=AF(e,n,t),pte(e,i)}function g2(e,n){var t;t=e.a.length,Jb(e,t),UL(e,t,n)}function nAe(e,n){var t;t=console[e],t.call(console,n)}function tAe(e,n){var t;++e.j,t=e.Vi(),e.Ii(e.oi(t,n))}function egn(e,n,t){u(n.b,65),Tu(n.a,new YX(e,t,n))}function UY(e,n,t){YE.call(this,n),this.a=e,this.b=t}function WY(e,n,t){Gd.call(this,e),this.a=n,this.b=t}function XY(e,n,t){this.a=e,Wz.call(this,n),this.b=t}function iAe(e,n,t){this.a=e,CQ.call(this,8,n,null,t)}function ngn(e){this.a=(nn(et),et),this.b=e,new wU}function rAe(e){this.c=e,this.b=this.c.a,this.a=this.c.e}function YY(e){this.c=e,this.b=e.a.d.a,pX(e.a.e,this)}function ys(e){Nb(e.c!=-1),e.d.$c(e.c),e.b=e.c,e.c=-1}function V5(e){return y.Math.sqrt(e.a*e.a+e.b*e.b)}function h0(e,n){return fv(n,e.a.c.length),ve(e.a,n)}function bl(e,n){return X(e)===X(n)||e!=null&&kt(e,n)}function tgn(e){return 0>=e?new qU:q3n(e-1)}function ign(e){return rg?SL(rg,e):!1}function cAe(e){return e?e.dc():!e.Kc().Ob()}function ar(e){return!e.a&&e.c?e.c.b:e.a}function rgn(e){return!e.a&&(e.a=new bi(T1,e,4)),e.a}function d0(e){return!e.d&&(e.d=new bi($r,e,1)),e.d}function nn(e){if(e==null)throw I(new G4);return e}function G5(e){e.c?e.c.He():(e.d=!0,fMn(e))}function qh(e){e.c?qh(e.c):(ud(e),e.d=!0)}function uAe(e){eQ(e.a),e.b=V(pn,pe,1,e.b.length,5,1)}function cgn(e,n){return mu(n.j.c.length,e.j.c.length)}function ugn(e,n){e.c<0||e.b.b=0?e.Bh(t):Sne(e,n)}function sAe(e){var n,t;return n=e.c.i.c,t=e.d.i.c,n==t}function ogn(e){if(e.p!=4)throw I(new $u);return e.e}function fgn(e){if(e.p!=3)throw I(new $u);return e.e}function lgn(e){if(e.p!=6)throw I(new $u);return e.f}function agn(e){if(e.p!=6)throw I(new $u);return e.k}function hgn(e){if(e.p!=3)throw I(new $u);return e.j}function dgn(e){if(e.p!=4)throw I(new $u);return e.j}function QY(e){return!e.b&&(e.b=new QE(new mD)),e.b}function b0(e){return e.c==-2&&lln(e,Ikn(e.g,e.b)),e.c}function dv(e,n){var t;return t=dL("",e),t.n=n,t.i=1,t}function bgn(e,n){J$(u(n.b,65),e),Tu(n.a,new Rz(e))}function wgn(e,n){Bn((!e.a&&(e.a=new $8(e,e)),e.a),n)}function oAe(e,n){this.b=e,fL.call(this,e,n),LCe(this)}function fAe(e,n){this.b=e,RX.call(this,e,n),FCe(this)}function JY(e,n,t,i){e0.call(this,e,n),this.d=t,this.a=i}function BC(e,n,t,i){e0.call(this,e,t),this.a=n,this.f=i}function lAe(e,n){Xhn.call(this,H3n(Nn(e),Nn(n))),this.a=n}function aAe(){cne.call(this,jd,(bje(),hcn)),Nxn(this)}function hAe(){cne.call(this,Co,(Um(),Ade)),zAn(this)}function dAe(){Yn.call(this,"DELAUNAY_TRIANGULATION",0)}function ggn(e){return String.fromCharCode.apply(null,e)}function jt(e,n,t){return Ni(n)?qr(e,n,t):au(e.f,n,t)}function ZY(e){return He(),e?e.ve():(Mg(),Mg(),Que)}function pgn(e,n,t){return x2(),t.pg(e,u(n.cd(),146))}function bAe(e,n){return vC(),new lee(new XCe(e),new WCe(n))}function mgn(e){return Is(e,rB),IM(or(or(5,e),e/10|0))}function RC(){RC=U,aXe=new kD(D(O(Ed,1),kP,42,0,[]))}function wAe(e){return!e.d&&(e.d=new Nm(e.c.Cc())),e.d}function bv(e){return!e.a&&(e.a=new Xke(e.c.vc())),e.a}function gAe(e){return!e.b&&(e.b=new Vm(e.c.ec())),e.b}function Bl(e,n){for(;n-- >0;)e=e<<1|(e<0?1:0);return e}function Hc(e,n){return X(e)===X(n)||e!=null&&kt(e,n)}function vgn(e,n){return cn(),u(n.b,19).ai&&++i,i}function ha(e){var n,t;return t=(n=new zd,n),Pv(t,e),t}function EL(e){var n,t;return t=(n=new zd,n),one(t,e),t}function $gn(e,n){var t;return t=kn(e.f,n),BJ(n,t),null}function TL(e){var n;return n=G3n(e),n||null}function MAe(e){return!e.b&&(e.b=new fe(Ii,e,12,3)),e.b}function Lgn(e){return e!=null&&f8(zI,e.toLowerCase())}function Fgn(e,n){return gi(Bu(e)*ms(e),Bu(n)*ms(n))}function Ngn(e,n){return gi(Bu(e)*ms(e),Bu(n)*ms(n))}function _gn(e,n){return gi(e.d.c+e.d.b/2,n.d.c+n.d.b/2)}function Bgn(e,n){return gi(e.g.c+e.g.b/2,n.g.c+n.g.b/2)}function SAe(e,n,t){t.a?Mu(e,n.b-e.f/2):Cu(e,n.a-e.g/2)}function PAe(e,n,t,i){this.a=e,this.b=n,this.c=t,this.d=i}function AAe(e,n,t,i){this.a=e,this.b=n,this.c=t,this.d=i}function G1(e,n,t,i){this.e=e,this.a=n,this.c=t,this.d=i}function xAe(e,n,t,i){this.a=e,this.c=n,this.d=t,this.b=i}function IAe(e,n,t,i){Us(),EOe.call(this,n,t,i),this.a=e}function OAe(e,n,t,i){Us(),EOe.call(this,n,t,i),this.a=e}function DAe(e,n){this.a=e,G1n.call(this,e,u(e.d,15).Zc(n))}function CL(e){this.f=e,this.c=this.f.e,e.f>0&&G_e(this)}function $Ae(e,n,t,i){this.b=e,this.c=i,a$.call(this,n,t)}function LAe(e){return vn(e.b=0&&Re(e.substr(t,n.length),n)}function Hh(e,n,t,i,r,c,o){return new XL(e.e,n,t,i,r,c,o)}function JAe(e,n,t,i,r,c){this.a=e,jF.call(this,n,t,i,r,c)}function ZAe(e,n,t,i,r,c){this.a=e,jF.call(this,n,t,i,r,c)}function exe(e,n){this.g=e,this.d=D(O(Zl,1),uh,10,0,[n])}function za(e,n){this.e=e,this.a=pn,this.b=Eqe(n),this.c=n}function nxe(e,n){lC.call(this),bJ(this),this.a=e,this.c=n}function X8(e,n,t,i){zt(e.c[n.g],t.g,i),zt(e.c[t.g],n.g,i)}function xL(e,n,t,i){zt(e.c[n.g],n.g,t),zt(e.b[n.g],n.g,i)}function spn(){return r7(),D(O(pae,1),ce,376,0,[NH,Mj])}function opn(){return l7(),D(O(ffe,1),ce,479,0,[ofe,Cx])}function fpn(){return m7(),D(O(ufe,1),ce,419,0,[Ex,cfe])}function lpn(){return kM(),D(O(Joe,1),ce,422,0,[Qoe,_q])}function apn(){return lM(),D(O(jfe,1),ce,420,0,[Zq,kfe])}function hpn(){return b7(),D(O(dae,1),ce,421,0,[$H,LH])}function dpn(){return Z5(),D(O(gnn,1),ce,523,0,[Yy,Xy])}function bpn(){return wf(),D(O(Rnn,1),ce,520,0,[Ww,p1])}function wpn(){return wl(),D(O(Enn,1),ce,516,0,[hb,dh])}function gpn(){return $f(),D(O(Cnn,1),ce,515,0,[Od,Jf])}function ppn(){return g0(),D(O(Unn,1),ce,455,0,[m1,Ip])}function mpn(){return uM(),D(O(Kae,1),ce,425,0,[JH,Rae])}function vpn(){return tM(),D(O(Bae,1),ce,480,0,[QH,_ae])}function ypn(){return UM(),D(O(qae,1),ce,495,0,[dI,g4])}function kpn(){return EM(),D(O(Vae,1),ce,426,0,[Hae,tV])}function jpn(){return P7(),D(O(Uhe,1),ce,429,0,[jI,zhe])}function Epn(){return c7(),D(O(Che,1),ce,430,0,[aV,yI])}function Tpn(){return ES(),D(O(lse,1),ce,428,0,[JK,fse])}function Cpn(){return AM(),D(O(hse,1),ce,427,0,[ase,ZK])}function Mpn(){return xM(),D(O(Rse,1),ce,424,0,[lq,zA])}function Spn(){return Lv(),D(O(BQe,1),ce,511,0,[fj,Eq])}function QC(e,n,t,i){return t>=0?e.jh(n,t,i):e.Sg(null,t,i)}function IL(e){return e.b.b==0?e.a.$e():H$(e.b)}function Ppn(e){if(e.p!=5)throw I(new $u);return Fn(e.f)}function Apn(e){if(e.p!=5)throw I(new $u);return Fn(e.k)}function oQ(e){return X(e.a)===X((OF(),UV))&&xxn(e),e.a}function txe(e){this.a=u(Nn(e),271),this.b=(He(),new nX(e))}function ixe(e,n){Xfn(this,new je(e.a,e.b)),Yfn(this,R8(n))}function g0(){g0=U,m1=new gW(z2,0),Ip=new gW(U2,1)}function wl(){wl=U,hb=new bW(U2,0),dh=new bW(z2,1)}function p0(){Bln.call(this,new n2(Zb(12))),QW(!0),this.a=2}function OL(e,n,t){gt(),Gd.call(this,e),this.b=n,this.a=t}function fQ(e,n,t){Us(),YE.call(this,n),this.a=e,this.b=t}function rxe(e){lC.call(this),bJ(this),this.a=e,this.c=!0}function cxe(e){var n;n=e.c.d.b,e.b=n,e.a=e.c.d,n.a=e.c.d.b=e}function JC(e){var n;F3n(e.a),gCe(e.a),n=new zE(e.a),_Z(n)}function xpn(e,n){bqe(e,!0),Tu(e.e.wf(),new zX(e,!0,n))}function ZC(e,n){return _Ie(n),D3n(e,V($n,nt,25,n,15,1),n)}function Ipn(e,n){return m2(),e==Ut(Vl(n))||e==Ut(Jh(n))}function Vc(e,n){return n==null?mc(Xr(e.f,null)):o5(e.g,n)}function Opn(e){return e.b==0?null:(vn(e.b!=0),Zs(e,e.a.a))}function ci(e){return Math.max(Math.min(e,vt),-2147483648)|0}function Dpn(e,n){var t=qK[e.charCodeAt(0)];return t??e}function eM(e,n){return zC(e,"set1"),zC(n,"set2"),new nEe(e,n)}function $pn(e,n){var t;return t=P3n(e.f,n),Mt(oC(t),e.f.d)}function U5(e,n){var t,i;return t=n,i=new Tb,tVe(e,t,i),i.d}function DL(e,n,t,i){var r;r=new zMe,n.a[t.g]=r,d2(e.b,i,r)}function lQ(e,n,t){var i;i=e.Yg(n),i>=0?e.sh(i,t):Zne(e,n,t)}function Sg(e,n,t){iM(),e&&jt(VV,e,n),e&&jt(tE,e,t)}function uxe(e,n,t){this.i=new oe,this.b=e,this.g=n,this.a=t}function nM(e,n,t){this.c=new oe,this.e=e,this.f=n,this.b=t}function aQ(e,n,t){this.a=new oe,this.e=e,this.f=n,this.c=t}function sxe(e,n){JT(this),this.f=n,this.g=e,GC(this),this._d()}function Y8(e,n){var t;t=e.q.getHours(),e.q.setDate(n),F6(e,t)}function oxe(e,n){var t;for(Nn(n),t=e.a;t;t=t.c)n.Od(t.g,t.i)}function fxe(e){var n;return n=new lT(Zb(e.length)),tZ(n,e),n}function Lpn(e){function n(){}return n.prototype=e||{},new n}function Fpn(e,n){return _Le(e,n)?(F$e(e),!0):!1}function da(e,n){if(n==null)throw I(new G4);return Dyn(e,n)}function Npn(e){if(e.qe())return null;var n=e.n;return AA[n]}function Q8(e){return e.Db>>16!=3?null:u(e.Cb,33)}function Df(e){return e.Db>>16!=9?null:u(e.Cb,33)}function lxe(e){return e.Db>>16!=6?null:u(e.Cb,79)}function axe(e){return e.Db>>16!=7?null:u(e.Cb,235)}function hxe(e){return e.Db>>16!=7?null:u(e.Cb,160)}function Ut(e){return e.Db>>16!=11?null:u(e.Cb,33)}function dxe(e,n){var t;return t=e.Yg(n),t>=0?e.lh(t):o_(e,n)}function bxe(e,n){var t;return t=new gY(n),wBe(t,e),new _u(t)}function hQ(e){var n;return n=e.d,n=e.si(e.f),Bn(e,n),n.Ob()}function wxe(e,n){return e.b+=n.b,e.c+=n.c,e.d+=n.d,e.a+=n.a,e}function $L(e,n){return y.Math.abs(e)0}function gxe(){this.a=new fa,this.e=new Si,this.g=0,this.i=0}function pxe(e){this.a=e,this.b=V(dnn,ie,1944,e.e.length,0,2)}function LL(e,n,t){var i;i=rFe(e,n,t),e.b=new zM(i.c.length)}function $f(){$f=U,Od=new dW(KB,0),Jf=new dW("UP",1)}function tM(){tM=U,QH=new pW(Ize,0),_ae=new pW("FAN",1)}function iM(){iM=U,VV=new Ln,tE=new Ln,rhn(AXe,new U3e)}function Bpn(e){if(e.p!=0)throw I(new $u);return j5(e.f,0)}function Rpn(e){if(e.p!=0)throw I(new $u);return j5(e.k,0)}function mxe(e){return e.Db>>16!=3?null:u(e.Cb,147)}function mv(e){return e.Db>>16!=6?null:u(e.Cb,235)}function Ub(e){return e.Db>>16!=17?null:u(e.Cb,26)}function vxe(e,n){var t=e.a=e.a||[];return t[n]||(t[n]=e.le(n))}function Kpn(e,n){var t;return t=e.a.get(n),t??new Array}function qpn(e,n){var t;t=e.q.getHours(),e.q.setMonth(n),F6(e,t)}function qr(e,n,t){return n==null?au(e.f,null,t):x0(e.g,n,t)}function W5(e,n,t,i,r,c){return new pa(e.e,n,e.aj(),t,i,r,c)}function J8(e,n,t){return e.a=Ms(e.a,0,n)+(""+t)+S8(e.a,n),e}function Hpn(e,n,t){return se(e.a,(RC(),ON(n,t),new e0(n,t))),e}function dQ(e){return ZW(e.c),e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function yxe(e){return ZW(e.e),e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function Ki(e,n){e.d&&ju(e.d.e,e),e.d=n,e.d&&se(e.d.e,e)}function sr(e,n){e.c&&ju(e.c.g,e),e.c=n,e.c&&se(e.c.g,e)}function Hr(e,n){e.c&&ju(e.c.a,e),e.c=n,e.c&&se(e.c.a,e)}function lc(e,n){e.i&&ju(e.i.j,e),e.i=n,e.i&&se(e.i.j,e)}function kxe(e,n,t){this.a=n,this.c=e,this.b=(Nn(t),new _u(t))}function jxe(e,n,t){this.a=n,this.c=e,this.b=(Nn(t),new _u(t))}function Exe(e,n){this.a=e,this.c=vc(this.a),this.b=new YC(n)}function Vpn(e){var n;return ud(e),n=new Si,Lt(e,new Qye(n))}function Wb(e,n){if(e<0||e>n)throw I(new Rr(mie+e+vie+n))}function bQ(e,n){return dPe(e.a,n)?_Y(e,u(n,22).g,null):null}function Gpn(e){return JF(),cn(),u(e.a,81).d.e!=0}function Txe(){Txe=U,bXe=Zn((tT(),D(O(dXe,1),ce,538,0,[RK])))}function Cxe(){Cxe=U,enn=Uu(new Pi,(mr(),Jr),(Mr(),lj))}function wQ(){wQ=U,nnn=Uu(new Pi,(mr(),Jr),(Mr(),lj))}function Mxe(){Mxe=U,inn=Uu(new Pi,(mr(),Jr),(Mr(),lj))}function Sxe(){Sxe=U,mnn=mt(new Pi,(mr(),Jr),(Mr(),Py))}function Ss(){Ss=U,knn=mt(new Pi,(mr(),Jr),(Mr(),Py))}function Pxe(){Pxe=U,jnn=mt(new Pi,(mr(),Jr),(Mr(),Py))}function FL(){FL=U,Snn=mt(new Pi,(mr(),Jr),(Mr(),Py))}function Axe(){Axe=U,dtn=Uu(new Pi,(t3(),Jy),(P6(),qH))}function U1(e,n,t,i){this.c=e,this.d=i,_L(this,n),BL(this,t)}function y2(e){this.c=new Vt,this.b=e.b,this.d=e.c,this.a=e.a}function NL(e){this.a=y.Math.cos(e),this.b=y.Math.sin(e)}function _L(e,n){e.a&&ju(e.a.k,e),e.a=n,e.a&&se(e.a.k,e)}function BL(e,n){e.b&&ju(e.b.f,e),e.b=n,e.b&&se(e.b.f,e)}function xxe(e,n){egn(e,e.b,e.c),u(e.b.b,65),n&&u(n.b,65).b}function zpn(e,n){IZ(e,n),_(e.Cb,88)&&dw(ns(u(e.Cb,88)),2)}function RL(e,n){_(e.Cb,88)&&dw(ns(u(e.Cb,88)),4),iu(e,n)}function rM(e,n){_(e.Cb,179)&&(u(e.Cb,179).tb=null),iu(e,n)}function Gc(e,n){return Er(),gF(n)?new yC(n,e):new M8(n,e)}function Upn(e,n){var t,i;t=n.c,i=t!=null,i&&g2(e,new Gb(n.c))}function Ixe(e){var n,t;return t=(Um(),n=new zd,n),Pv(t,e),t}function Oxe(e){var n,t;return t=(Um(),n=new zd,n),Pv(t,e),t}function Dxe(e,n){var t;return t=new wo(e),n.c[n.c.length]=t,t}function $xe(e,n){var t;return t=u(rw(v2(e.a),n),14),t?t.gc():0}function Lxe(e){var n;return ud(e),n=(Mg(),Mg(),Yue),DM(e,n)}function Fxe(e){for(var n;;)if(n=e.Pb(),!e.Ob())return n}function gQ(e,n){Nln.call(this,new n2(Zb(e))),Is(n,XVe),this.a=n}function Rl(e,n,t){HFe(n,t,e.gc()),this.c=e,this.a=n,this.b=t-n}function Nxe(e,n,t){var i;HFe(n,t,e.c.length),i=t-n,RU(e.c,n,i)}function Wpn(e,n){$Ce(e,Fn(ji(_h(n,24),TP)),Fn(ji(n,TP)))}function Qe(e,n){if(e<0||e>=n)throw I(new Rr(mie+e+vie+n))}function Gn(e,n){if(e<0||e>=n)throw I(new PU(mie+e+vie+n))}function Ye(e,n){this.b=(nn(e),e),this.a=n&jw?n:n|64|ml}function _xe(e){wCe(this),X7e(this.a,eZ(y.Math.max(8,e))<<1)}function Lf(e){return hc(D(O(xi,1),ie,8,0,[e.i.n,e.n,e.a]))}function Xpn(){return qf(),D(O(os,1),ce,132,0,[use,_s,Iw])}function Ypn(){return mf(),D(O(Ow,1),ce,232,0,[jc,su,Ec])}function Qpn(){return Xu(),D(O(JXe,1),ce,461,0,[Al,l1,nf])}function Jpn(){return Eu(),D(O(eYe,1),ce,462,0,[Cf,a1,tf])}function Zpn(){return A0(),D(O(roe,1),ce,423,0,[gp,ioe,yq])}function e2n(){return n6(),D(O(eoe,1),ce,379,0,[bq,dq,wq])}function n2n(){return a6(),D(O(iae,1),ce,378,0,[PH,tae,Jx])}function t2n(){return P2(),D(O(efe,1),ce,314,0,[um,hj,Zoe])}function i2n(){return BM(),D(O(tfe,1),ce,337,0,[nfe,jx,Bq])}function r2n(){return td(),D(O(bJe,1),ce,450,0,[qq,t4,yp])}function c2n(){return S0(),D(O(Aq,1),ce,361,0,[tb,d1,nb])}function u2n(){return ma(),D(O(jJe,1),ce,303,0,[bj,jp,sm])}function s2n(){return Rv(),D(O(Jq,1),ce,292,0,[Yq,Qq,dj])}function o2n(){return Pr(),D(O(Uen,1),ce,452,0,[zy,Ju,ou])}function f2n(){return ya(),D(O(hae,1),ce,339,0,[g1,aae,DH])}function l2n(){return JM(),D(O(gae,1),ce,375,0,[bae,FH,wae])}function a2n(){return iS(),D(O(Eae,1),ce,377,0,[RH,b4,Uw])}function h2n(){return Uv(),D(O(vae,1),ce,336,0,[_H,mae,Uy])}function d2n(){return YM(),D(O(jae,1),ce,338,0,[kae,BH,yae])}function b2n(){return M0(),D(O(ann,1),ce,454,0,[Sj,Wy,tI])}function w2n(){return bS(),D(O(mtn,1),ce,442,0,[nV,ZH,eV])}function g2n(){return O7(),D(O(Uae,1),ce,380,0,[bI,Gae,zae])}function p2n(){return dS(),D(O(ahe,1),ce,381,0,[lhe,sV,fhe])}function m2n(){return QM(),D(O(she,1),ce,293,0,[uV,uhe,che])}function v2n(){return _7(),D(O(oV,1),ce,437,0,[pI,mI,vI])}function y2n(){return ka(),D(O(ede,1),ce,334,0,[OI,ph,a9])}function k2n(){return Bf(),D(O(q1e,1),ce,272,0,[v4,Qw,y4])}function j2n(e,n){return HTn(e,n,_(n,99)&&(u(n,18).Bb&yr)!=0)}function E2n(e,n,t){var i;return i=B6(e,n,!1),i.b<=n&&i.a<=t}function Bxe(e,n,t){var i;i=new Zme,i.b=n,i.a=t,++n.b,se(e.d,i)}function T2n(e,n){var t;return t=(nn(e),e).g,aX(!!t),nn(n),t(n)}function pQ(e,n){var t,i;return i=lv(e,n),t=e.a.Zc(i),new eEe(e,t)}function C2n(e){return e.Db>>16!=6?null:u(a_(e),235)}function M2n(e){if(e.p!=2)throw I(new $u);return Fn(e.f)&si}function S2n(e){if(e.p!=2)throw I(new $u);return Fn(e.k)&si}function P2n(e){return e.a==(jv(),YI)&&fln(e,cCn(e.g,e.b)),e.a}function k2(e){return e.d==(jv(),YI)&&aln(e,JSn(e.g,e.b)),e.d}function P(e){return vn(e.ai?1:0}function Rxe(e,n){var t,i;return t=aF(n),i=t,u(kn(e.c,i),19).a}function Kxe(e,n){var t;for(t=e+"";t.length0&&e.a[--e.d]==0;);e.a[e.d++]==0&&(e.e=0)}function uIe(e){return e.a?e.e.length==0?e.a.a:e.a.a+(""+e.e):e.c}function B2n(e){return!!e.a&&ts(e.a.a).i!=0&&!(e.b&&AN(e.b))}function R2n(e){return!!e.u&&Bc(e.u.a).i!=0&&!(e.n&&PN(e.n))}function sIe(e){return U$(e.e.Hd().gc()*e.c.Hd().gc(),16,new rye(e))}function K2n(e,n){return NPe(Su(e.q.getTime()),Su(n.q.getTime()))}function gl(e){return u(Hf(e,V(kq,iR,17,e.c.length,0,1)),474)}function Z8(e){return u(Hf(e,V(Zl,uh,10,e.c.length,0,1)),193)}function q2n(e){return Ss(),!gr(e)&&!(!gr(e)&&e.c.i.c==e.d.i.c)}function oIe(e,n,t){var i;i=(Nn(e),new _u(e)),m8n(new kxe(i,n,t))}function e7(e,n,t){var i;i=(Nn(e),new _u(e)),v8n(new jxe(i,n,t))}function fIe(e,n){var t;return t=1-n,e.a[t]=GM(e.a[t],t),GM(e,n)}function lIe(e,n){var t;e.e=new kU,t=gw(n),Oi(t,e.c),iqe(e,t,0)}function qi(e,n,t,i){var r;r=new sz,r.a=n,r.b=t,r.c=i,ut(e.a,r)}function de(e,n,t,i){var r;r=new sz,r.a=n,r.b=t,r.c=i,ut(e.b,r)}function Wo(e){var n,t,i;return n=new VPe,t=x_(n,e),SIn(n),i=t,i}function EQ(){var e,n,t;return n=(t=(e=new zd,e),t),se(Bde,n),n}function sM(e){return e.j.c=V(pn,pe,1,0,5,1),eQ(e.c),jgn(e.a),e}function Pg(e){return r5(),_(e.g,10)?u(e.g,10):null}function H2n(e){return Cg(e).dc()?!1:(qhn(e,new Mi),!0)}function V2n(e){if(!("stack"in e))try{throw e}catch{}return e}function n7(e,n){if(e<0||e>=n)throw I(new Rr(iEn(e,n)));return e}function aIe(e,n,t){if(e<0||nt)throw I(new Rr(Pjn(e,n,t)))}function VL(e,n){if(ki(e.a,n),n.d)throw I(new oc(pGe));n.d=e}function GL(e,n){if(n.$modCount!=e.$modCount)throw I(new zs)}function hIe(e,n){return _(n,42)?$N(e.a,u(n,42)):!1}function dIe(e,n){return _(n,42)?$N(e.a,u(n,42)):!1}function bIe(e,n){return _(n,42)?$N(e.a,u(n,42)):!1}function G2n(e,n){return e.a<=e.b?(n.ud(e.a++),!0):!1}function v0(e){var n;return nc(e)?(n=e,n==-0?0:n):e3n(e)}function oM(e){var n;return qh(e),n=new Dm,dg(e.a,new Xye(n)),n}function wIe(e){var n;return qh(e),n=new og,dg(e.a,new Wye(n)),n}function zi(e,n){this.a=e,K4.call(this,e),Wb(n,e.gc()),this.b=n}function TQ(e){this.e=e,this.b=this.e.a.entries(),this.a=new Array}function z2n(e){return U$(e.e.Hd().gc()*e.c.Hd().gc(),273,new iye(e))}function fM(e){return new tu((Is(e,rB),IM(or(or(5,e),e/10|0))))}function gIe(e){return u(Hf(e,V(FQe,WGe,11,e.c.length,0,1)),1943)}function U2n(e,n,t){return t.f.c.length>0?KY(e.a,n,t):KY(e.b,n,t)}function W2n(e,n,t){e.d&&ju(e.d.e,e),e.d=n,e.d&&qb(e.d.e,t,e)}function zL(e,n){KOn(n,e),uY(e.d),uY(u(M(e,(be(),Gx)),207))}function Y5(e,n){ROn(n,e),cY(e.d),cY(u(M(e,(be(),Gx)),207))}function y0(e,n){var t,i;return t=da(e,n),i=null,t&&(i=t.fe()),i}function vv(e,n){var t,i;return t=Jb(e,n),i=null,t&&(i=t.ie()),i}function Q5(e,n){var t,i;return t=da(e,n),i=null,t&&(i=t.ie()),i}function ba(e,n){var t,i;return t=da(e,n),i=null,t&&(i=wne(t)),i}function X2n(e,n,t){var i;return i=e3(t),uP(e.g,i,n),uP(e.i,n,t),n}function Y2n(e,n,t){var i;i=Tyn();try{return ndn(e,n,t)}finally{smn(i)}}function pIe(e){var n;n=e.Wg(),this.a=_(n,69)?u(n,69).Zh():n.Kc()}function Pi(){Ike.call(this),this.j.c=V(pn,pe,1,0,5,1),this.a=-1}function CQ(e,n,t,i){this.d=e,this.n=n,this.g=t,this.o=i,this.p=-1}function mIe(e,n,t,i){this.e=i,this.d=null,this.c=e,this.a=n,this.b=t}function MQ(e,n,t){this.d=new u8e(this),this.e=e,this.i=n,this.f=t}function lM(){lM=U,Zq=new fW(S3,0),kfe=new fW("TOP_LEFT",1)}function vIe(){vIe=U,Cae=bAe(le(1),le(4)),Tae=bAe(le(1),le(2))}function yIe(){yIe=U,oin=Zn((yT(),D(O(sin,1),ce,551,0,[lV])))}function kIe(){kIe=U,uin=Zn((vT(),D(O(The,1),ce,482,0,[fV])))}function jIe(){jIe=U,Min=Zn((c5(),D(O(Ghe,1),ce,530,0,[Dj])))}function EIe(){EIe=U,OYe=Zn((pT(),D(O(Dse,1),ce,481,0,[cq])))}function Q2n(){return P0(),D(O(CYe,1),ce,406,0,[ej,Zk,iq,rq])}function J2n(){return TM(),D(O(NA,1),ce,297,0,[XK,tse,ise,rse])}function Z2n(){return k6(),D(O(xYe,1),ce,394,0,[cj,qA,HA,uj])}function emn(){return L2(),D(O(SYe,1),ce,323,0,[tj,nj,ij,rj])}function nmn(){return Kv(),D(O(TQe,1),ce,405,0,[eb,$w,Dw,wp])}function tmn(){return tS(),D(O(HQe,1),ce,360,0,[Sq,wx,gx,aj])}function TIe(e,n,t,i){return _(t,54)?new lMe(e,n,t,i):new xY(e,n,t,i)}function imn(){return Kf(),D(O(JQe,1),ce,411,0,[cm,Q3,J3,Pq])}function rmn(e){var n;return e.j==(ae(),On)&&(n=zRe(e),Nu(n,hn))}function cmn(e,n){var t;t=n.a,sr(t,n.c.d),Ki(t,n.d.d),nw(t.a,e.n)}function CIe(e,n){return u(s0(IC(u(Tt(e.k,n),15).Oc(),pp)),113)}function MIe(e,n){return u(s0(OC(u(Tt(e.k,n),15).Oc(),pp)),113)}function umn(e){return new Ye(i4n(u(e.a.dd(),14).gc(),e.a.cd()),16)}function yv(e){return _(e,14)?u(e,14).dc():!e.Kc().Ob()}function j2(e){return r5(),_(e.g,145)?u(e.g,145):null}function SIe(e){if(e.e.g!=e.b)throw I(new zs);return!!e.c&&e.d>0}function rt(e){return vn(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function SQ(e,n){nn(n),zt(e.a,e.c,n),e.c=e.c+1&e.a.length-1,P_e(e)}function Vh(e,n){nn(n),e.b=e.b-1&e.a.length-1,zt(e.a,e.b,n),P_e(e)}function PIe(e,n){var t;for(t=e.j.c.length;t0&&Kc(e.g,0,n,0,e.i),n}function OIe(e,n){ET();var t;return t=u(kn(GI,e),55),!t||t.wj(n)}function vmn(e){if(e.p!=1)throw I(new $u);return Fn(e.f)<<24>>24}function ymn(e){if(e.p!=1)throw I(new $u);return Fn(e.k)<<24>>24}function kmn(e){if(e.p!=7)throw I(new $u);return Fn(e.k)<<16>>16}function jmn(e){if(e.p!=7)throw I(new $u);return Fn(e.f)<<16>>16}function wa(e){var n;for(n=0;e.Ob();)e.Pb(),n=or(n,1);return IM(n)}function DIe(e,n){var t;return t=new Ib,e.xd(t),t.a+="..",n.yd(t),t.a}function Emn(e,n,t){var i;i=u(kn(e.g,t),57),se(e.a.c,new Gi(n,i))}function Tmn(e,n,t){return tL(he(mc(Xr(e.f,n))),he(mc(Xr(e.f,t))))}function aM(e,n,t){return oP(e,n,t,_(n,99)&&(u(n,18).Bb&yr)!=0)}function Cmn(e,n,t){return g3(e,n,t,_(n,99)&&(u(n,18).Bb&yr)!=0)}function Mmn(e,n,t){return XTn(e,n,t,_(n,99)&&(u(n,18).Bb&yr)!=0)}function xQ(e,n){return e==(dn(),vi)&&n==vi?4:e==vi||n==vi?8:32}function $Ie(e,n){return X(n)===X(e)?"(this Map)":n==null?Au:rc(n)}function Smn(e,n){return u(n==null?mc(Xr(e.f,null)):o5(e.g,n),281)}function LIe(e,n,t){var i;return i=e3(t),jt(e.b,i,n),jt(e.c,n,t),n}function FIe(e,n){var t;for(t=n;t;)_b(e,t.i,t.j),t=Ut(t);return e}function IQ(e,n){var t;return t=U8(uv(new hF(e,n))),jC(new hF(e,n)),t}function Kl(e,n){Er();var t;return t=u(e,66).Mj(),sjn(t,n),t.Ok(n)}function Pmn(e,n,t,i,r){var c;c=eCn(r,t,i),se(n,Jjn(r,c)),Hkn(e,r,n)}function NIe(e,n,t){e.i=0,e.e=0,n!=t&&(oFe(e,n,t),sFe(e,n,t))}function OQ(e,n){var t;t=e.q.getHours(),e.q.setFullYear(n+r1),F6(e,t)}function Amn(e,n,t){if(t){var i=t.ee();e.a[n]=i(t)}else delete e.a[n]}function UL(e,n,t){if(t){var i=t.ee();t=i(t)}else t=void 0;e.a[n]=t}function _Ie(e){if(e<0)throw I(new Hke("Negative array size: "+e))}function Bc(e){return e.n||(ns(e),e.n=new pPe(e,$r,e),Wr(e)),e.n}function J5(e){return vn(e.a=0&&e.a[t]===n[t];t--);return t<0}function HIe(e,n){zv();var t;return t=e.j.g-n.j.g,t!=0?t:0}function VIe(e,n){return nn(n),e.a!=null?bwn(n.Kb(e.a)):FA}function hM(e){var n;return e?new gY(e):(n=new fa,IF(n,e),n)}function As(e,n){var t;return n.b.Kb(FDe(e,n.c.Ee(),(t=new Zye(n),t)))}function dM(e){Zee(),$Ce(this,Fn(ji(_h(e,24),TP)),Fn(ji(e,TP)))}function GIe(){GIe=U,zXe=Zn((ES(),D(O(lse,1),ce,428,0,[JK,fse])))}function zIe(){zIe=U,UXe=Zn((AM(),D(O(hse,1),ce,427,0,[ase,ZK])))}function UIe(){UIe=U,XYe=Zn((xM(),D(O(Rse,1),ce,424,0,[lq,zA])))}function WIe(){WIe=U,RQe=Zn((Lv(),D(O(BQe,1),ce,511,0,[fj,Eq])))}function XIe(){XIe=U,dJe=Zn((m7(),D(O(ufe,1),ce,419,0,[Ex,cfe])))}function YIe(){YIe=U,pJe=Zn((l7(),D(O(ffe,1),ce,479,0,[ofe,Cx])))}function QIe(){QIe=U,Yen=Zn((r7(),D(O(pae,1),ce,376,0,[NH,Mj])))}function JIe(){JIe=U,zen=Zn((b7(),D(O(dae,1),ce,421,0,[$H,LH])))}function ZIe(){ZIe=U,fJe=Zn((kM(),D(O(Joe,1),ce,422,0,[Qoe,_q])))}function eOe(){eOe=U,TJe=Zn((lM(),D(O(jfe,1),ce,420,0,[Zq,kfe])))}function nOe(){nOe=U,Knn=Zn((wf(),D(O(Rnn,1),ce,520,0,[Ww,p1])))}function tOe(){tOe=U,pnn=Zn((Z5(),D(O(gnn,1),ce,523,0,[Yy,Xy])))}function iOe(){iOe=U,Tnn=Zn((wl(),D(O(Enn,1),ce,516,0,[hb,dh])))}function rOe(){rOe=U,Mnn=Zn(($f(),D(O(Cnn,1),ce,515,0,[Od,Jf])))}function cOe(){cOe=U,Wnn=Zn((g0(),D(O(Unn,1),ce,455,0,[m1,Ip])))}function uOe(){uOe=U,htn=Zn((uM(),D(O(Kae,1),ce,425,0,[JH,Rae])))}function sOe(){sOe=U,ptn=Zn((UM(),D(O(qae,1),ce,495,0,[dI,g4])))}function oOe(){oOe=U,atn=Zn((tM(),D(O(Bae,1),ce,480,0,[QH,_ae])))}function fOe(){fOe=U,ytn=Zn((EM(),D(O(Vae,1),ce,426,0,[Hae,tV])))}function lOe(){lOe=U,Sin=Zn((P7(),D(O(Uhe,1),ce,429,0,[jI,zhe])))}function aOe(){aOe=U,fin=Zn((c7(),D(O(Che,1),ce,430,0,[aV,yI])))}function Z5(){Z5=U,Yy=new hW("UPPER",0),Xy=new hW("LOWER",1)}function Dmn(e,n){var t;t=new Jp,z1(t,"x",n.a),z1(t,"y",n.b),g2(e,t)}function $mn(e,n){var t;t=new Jp,z1(t,"x",n.a),z1(t,"y",n.b),g2(e,t)}function Lmn(e,n){var t,i;i=!1;do t=ZLe(e,n),i=i|t;while(t);return i}function LQ(e,n){var t,i;for(t=n,i=0;t>0;)i+=e.a[t],t-=t&-t;return i}function hOe(e,n){var t;for(t=n;t;)_b(e,-t.i,-t.j),t=Ut(t);return e}function Yi(e,n){var t,i;for(nn(n),i=e.Kc();i.Ob();)t=i.Pb(),n.td(t)}function dOe(e,n){var t;return t=n.cd(),new e0(t,e.e.pc(t,u(n.dd(),14)))}function ri(e,n,t,i){var r;r=new _a,r.c=n,r.b=t,r.a=i,i.b=t.a=r,++e.b}function Qs(e,n,t){var i;return i=(Qe(n,e.c.length),e.c[n]),e.c[n]=t,i}function Fmn(e,n,t){return u(n==null?au(e.f,null,t):x0(e.g,n,t),281)}function QL(e){return e.c&&e.d?mQ(e.c)+"->"+mQ(e.d):"e_"+c0(e)}function kv(e,n){return(ud(e),n5(new We(e,new cJ(n,e.a)))).sd(z3)}function Nmn(){return mr(),D(O(noe,1),ce,356,0,[xl,h1,du,Yc,Jr])}function _mn(){return ae(),D(O(kr,1),Lc,61,0,[gc,tn,hn,On,un])}function Bmn(e){return uT(),function(){return Y2n(e,this,arguments)}}function Rmn(){return Date.now?Date.now():new Date().getTime()}function gr(e){return!e.c||!e.d?!1:!!e.c.i&&e.c.i==e.d.i}function bOe(e){if(!e.c.Sb())throw I(new Sc);return e.a=!0,e.c.Ub()}function t7(e){e.i=0,b8(e.b,null),b8(e.c,null),e.a=null,e.e=null,++e.g}function FQ(e){Uan.call(this,e==null?Au:rc(e),_(e,78)?u(e,78):null)}function wOe(e){RVe(),B7e(this),this.a=new Vt,fZ(this,e),ut(this.a,e)}function gOe(){g$(this),this.b=new je(Jt,Jt),this.a=new je(hi,hi)}function pOe(e,n){this.c=0,this.b=n,GTe.call(this,e,17493),this.a=this.c}function JL(e){bM(),!Xf&&(this.c=e,this.e=!0,this.a=new oe)}function bM(){bM=U,Xf=!0,FXe=!1,NXe=!1,BXe=!1,_Xe=!1}function NQ(e,n){return _(n,149)?Re(e.c,u(n,149).c):!1}function _Q(e,n){var t;return t=0,e&&(t+=e.f.a/2),n&&(t+=n.f.a/2),t}function ZL(e,n){var t;return t=u(k0(e.d,n),23),t||u(k0(e.e,n),23)}function mOe(e){this.b=e,jn.call(this,e),this.a=u(en(this.b.a,4),126)}function vOe(e){this.b=e,f2.call(this,e),this.a=u(en(this.b.a,4),126)}function ns(e){return e.t||(e.t=new A7e(e),w6(new qke(e),0,e.t)),e.t}function Kmn(){return Ar(),D(O(f9,1),ce,103,0,[ea,cf,Ao,Oa,Da])}function qmn(){return _g(),D(O(d9,1),ce,249,0,[k1,Uj,nde,h9,tde])}function Hmn(){return yf(),D(O(gh,1),ce,175,0,[an,Li,Dl,Dd,wh])}function Vmn(){return J7(),D(O(Ahe,1),ce,316,0,[Mhe,hV,Phe,dV,She])}function Gmn(){return j6(),D(O(cae,1),ce,315,0,[rae,IH,OH,Vy,Gy])}function zmn(){return ld(),D(O(rfe,1),ce,335,0,[Rq,ife,Kq,Iy,xy])}function Umn(){return d3(),D(O(iin,1),ce,355,0,[Op,pm,r9,i9,c9])}function Wmn(){return Vg(),D(O(eJe,1),ce,363,0,[mx,yx,kx,vx,px])}function Xmn(){return to(),D(O(Lfe,1),ce,163,0,[vj,Fy,b1,Ny,_w])}function jv(){jv=U;var e,n;XI=(Um(),n=new ZE,n),YI=(e=new wD,e)}function yOe(e){var n;return e.c||(n=e.r,_(n,88)&&(e.c=u(n,26))),e.c}function Ymn(e){return e.e=3,e.d=e.Yb(),e.e!=2?(e.e=0,!0):!1}function eF(e){var n,t,i;return n=e&ss,t=e>>22&ss,i=e<0?Pa:0,fu(n,t,i)}function Qmn(e){var n,t,i,r;for(t=e,i=0,r=t.length;i0?mNe(e,n):RKe(e,-n)}function BQ(e,n){return n==0||e.e==0?e:n>0?RKe(e,n):mNe(e,-n)}function _n(e){if(Un(e))return e.c=e.a,e.a.Pb();throw I(new Sc)}function jOe(e){var n,t;return n=e.c.i,t=e.d.i,n.k==(dn(),fi)&&t.k==fi}function nF(e){var n;return n=new w0,Yr(n,e),te(n,(be(),Ur),null),n}function tF(e,n,t){var i;return i=e.Yg(n),i>=0?e._g(i,t,!0):_0(e,n,t)}function RQ(e,n,t,i){var r;for(r=0;rn)throw I(new Rr(jne(e,n,"index")));return e}function iF(e,n,t,i){var r;return r=V($n,nt,25,n,15,1),lkn(r,e,n,t,i),r}function Zmn(e,n){var t;t=e.q.getHours()+(n/60|0),e.q.setMinutes(n),F6(e,t)}function evn(e,n){return y.Math.min(Gh(n.a,e.d.d.c),Gh(n.b,e.d.d.c))}function C2(e,n){return Ni(n)?n==null?Bne(e.f,null):LLe(e.g,n):Bne(e.f,n)}function _f(e){this.c=e,this.a=new A(this.c.a),this.b=new A(this.c.b)}function wM(){this.e=new oe,this.c=new oe,this.d=new oe,this.b=new oe}function SOe(){this.g=new rU,this.b=new rU,this.a=new oe,this.k=new oe}function POe(e,n,t){this.a=e,this.c=n,this.d=t,se(n.e,this),se(t.b,this)}function AOe(e,n){VTe.call(this,n.rd(),n.qd()&-6),nn(e),this.a=e,this.b=n}function xOe(e,n){GTe.call(this,n.rd(),n.qd()&-6),nn(e),this.a=e,this.b=n}function UQ(e,n){a$.call(this,n.rd(),n.qd()&-6),nn(e),this.a=e,this.b=n}function gM(e,n,t){this.a=e,this.b=n,this.c=t,se(e.t,this),se(n.i,this)}function pM(){this.b=new Vt,this.a=new Vt,this.b=new Vt,this.a=new Vt}function mM(){mM=U,u9=new Rt("org.eclipse.elk.labels.labelManager")}function IOe(){IOe=U,zoe=new yi("separateLayerConnections",(tS(),Sq))}function wf(){wf=U,Ww=new wW("REGULAR",0),p1=new wW("CRITICAL",1)}function r7(){r7=U,NH=new aW("STACKED",0),Mj=new aW("SEQUENCED",1)}function c7(){c7=U,aV=new kW("FIXED",0),yI=new kW("CENTER_NODE",1)}function nvn(e,n){var t;return t=cIn(e,n),e.b=new zM(t.c.length),pxn(e,t)}function tvn(e,n,t){var i;return++e.e,--e.f,i=u(e.d[n].$c(t),133),i.dd()}function OOe(e){var n;return e.a||(n=e.r,_(n,148)&&(e.a=u(n,148))),e.a}function WQ(e){if(e.a){if(e.e)return WQ(e.e)}else return e;return null}function ivn(e,n){return e.pn.p?-1:0}function vM(e,n){return nn(n),e.c=0,"Initial capacity must not be negative")}function LOe(){LOe=U,QXe=Zn((mf(),D(O(Ow,1),ce,232,0,[jc,su,Ec])))}function FOe(){FOe=U,ZXe=Zn((Xu(),D(O(JXe,1),ce,461,0,[Al,l1,nf])))}function NOe(){NOe=U,nYe=Zn((Eu(),D(O(eYe,1),ce,462,0,[Cf,a1,tf])))}function _Oe(){_Oe=U,RXe=Zn((qf(),D(O(os,1),ce,132,0,[use,_s,Iw])))}function BOe(){BOe=U,gQe=Zn((n6(),D(O(eoe,1),ce,379,0,[bq,dq,wq])))}function ROe(){ROe=U,IQe=Zn((A0(),D(O(roe,1),ce,423,0,[gp,ioe,yq])))}function KOe(){KOe=U,lJe=Zn((P2(),D(O(efe,1),ce,314,0,[um,hj,Zoe])))}function qOe(){qOe=U,aJe=Zn((BM(),D(O(tfe,1),ce,337,0,[nfe,jx,Bq])))}function HOe(){HOe=U,wJe=Zn((td(),D(O(bJe,1),ce,450,0,[qq,t4,yp])))}function VOe(){VOe=U,uJe=Zn((S0(),D(O(Aq,1),ce,361,0,[tb,d1,nb])))}function GOe(){GOe=U,EJe=Zn((ma(),D(O(jJe,1),ce,303,0,[bj,jp,sm])))}function zOe(){zOe=U,kJe=Zn((Rv(),D(O(Jq,1),ce,292,0,[Yq,Qq,dj])))}function UOe(){UOe=U,Ken=Zn((a6(),D(O(iae,1),ce,378,0,[PH,tae,Jx])))}function WOe(){WOe=U,Xen=Zn((JM(),D(O(gae,1),ce,375,0,[bae,FH,wae])))}function XOe(){XOe=U,Gen=Zn((ya(),D(O(hae,1),ce,339,0,[g1,aae,DH])))}function YOe(){YOe=U,Wen=Zn((Pr(),D(O(Uen,1),ce,452,0,[zy,Ju,ou])))}function QOe(){QOe=U,Zen=Zn((iS(),D(O(Eae,1),ce,377,0,[RH,b4,Uw])))}function JOe(){JOe=U,Qen=Zn((Uv(),D(O(vae,1),ce,336,0,[_H,mae,Uy])))}function ZOe(){ZOe=U,Jen=Zn((YM(),D(O(jae,1),ce,338,0,[kae,BH,yae])))}function eDe(){eDe=U,hnn=Zn((M0(),D(O(ann,1),ce,454,0,[Sj,Wy,tI])))}function nDe(){nDe=U,vtn=Zn((bS(),D(O(mtn,1),ce,442,0,[nV,ZH,eV])))}function tDe(){tDe=U,ktn=Zn((O7(),D(O(Uae,1),ce,380,0,[bI,Gae,zae])))}function iDe(){iDe=U,_tn=Zn((dS(),D(O(ahe,1),ce,381,0,[lhe,sV,fhe])))}function rDe(){rDe=U,Ntn=Zn((QM(),D(O(she,1),ce,293,0,[uV,uhe,che])))}function cDe(){cDe=U,cin=Zn((_7(),D(O(oV,1),ce,437,0,[pI,mI,vI])))}function uDe(){uDe=U,orn=Zn((ka(),D(O(ede,1),ce,334,0,[OI,ph,a9])))}function sDe(){sDe=U,rrn=Zn((Bf(),D(O(q1e,1),ce,272,0,[v4,Qw,y4])))}function lvn(){return Hi(),D(O(ide,1),ce,98,0,[j1,el,j4,Nd,ia,Zc])}function Y1(e,n){return!e.o&&(e.o=new ks((cu(),C1),bb,e,0)),bN(e.o,n)}function avn(e){return!e.g&&(e.g=new RE),!e.g.d&&(e.g.d=new M7e(e)),e.g.d}function hvn(e){return!e.g&&(e.g=new RE),!e.g.a&&(e.g.a=new S7e(e)),e.g.a}function dvn(e){return!e.g&&(e.g=new RE),!e.g.b&&(e.g.b=new C7e(e)),e.g.b}function u7(e){return!e.g&&(e.g=new RE),!e.g.c&&(e.g.c=new P7e(e)),e.g.c}function bvn(e,n,t){var i,r;for(r=new Bv(n,e),i=0;it||n=0?e._g(t,!0,!0):_0(e,n,!0)}function Ivn(e,n){return gi(ne(he(M(e,(re(),ub)))),ne(he(M(n,ub))))}function bDe(){bDe=U,btn=$0($0(jT(new Pi,(t3(),Qy)),(P6(),sI)),HH)}function Ovn(e,n,t){var i;return i=rFe(e,n,t),e.b=new zM(i.c.length),lte(e,i)}function Dvn(e){if(e.b<=0)throw I(new Sc);return--e.b,e.a-=e.c.c,le(e.a)}function $vn(e){var n;if(!e.a)throw I(new mAe);return n=e.a,e.a=Ut(e.a),n}function Lvn(e){for(;!e.a;)if(!tSe(e.c,new Yye(e)))return!1;return!0}function S2(e){var n;return Nn(e),_(e,198)?(n=u(e,198),n):new wye(e)}function Fvn(e){jM(),u(e.We((ht(),Yw)),174).Fc((Yu(),Wj)),e.Ye(OV,null)}function jM(){jM=U,xin=new t3e,Oin=new i3e,Iin=y5n((ht(),OV),xin,v1,Oin)}function EM(){EM=U,Hae=new yW("LEAF_NUMBER",0),tV=new yW("NODE_SIZE",1)}function Nvn(e,n,t){e.a=n,e.c=t,e.b.a.$b(),go(e.d),e.e.a.c=V(pn,pe,1,0,5,1)}function lF(e){e.a=V($n,nt,25,e.b+1,15,1),e.c=V($n,nt,25,e.b,15,1),e.d=0}function _vn(e,n){e.a.ue(n.d,e.b)>0&&(se(e.c,new fY(n.c,n.d,e.d)),e.b=n.d)}function rJ(e,n){if(e.g==null||n>=e.i)throw I(new h$(n,e.i));return e.g[n]}function wDe(e,n,t){if(Vv(e,t),t!=null&&!e.wj(t))throw I(new hD);return t}function gDe(e){var n;if(e.Ek())for(n=e.i-1;n>=0;--n)K(e,n);return AQ(e)}function Bvn(e){var n,t;if(!e.b)return null;for(t=e.b;n=t.a[0];)t=n;return t}function Rvn(e,n){var t,i;return _Ie(n),t=(i=e.slice(0,n),uJ(i,e)),t.length=n,t}function Cv(e,n,t,i){var r;i=(Mg(),i||Xue),r=e.slice(n,t),Ene(r,e,n,t,-n,i)}function Js(e,n,t,i,r){return n<0?_0(e,t,i):u(t,66).Nj().Pj(e,e.yh(),n,i,r)}function Kvn(e){return _(e,172)?""+u(e,172).a:e==null?null:rc(e)}function qvn(e){return _(e,172)?""+u(e,172).a:e==null?null:rc(e)}function pDe(e,n){if(n.a)throw I(new oc(pGe));ki(e.a,n),n.a=e,!e.j&&(e.j=n)}function cJ(e,n){a$.call(this,n.rd(),n.qd()&-16449),nn(e),this.a=e,this.c=n}function mDe(e,n){var t,i;return i=n/e.c.Hd().gc()|0,t=n%e.c.Hd().gc(),M2(e,i,t)}function Xu(){Xu=U,Al=new BD(z2,0),l1=new BD(S3,1),nf=new BD(U2,2)}function TM(){TM=U,XK=new MT("All",0),tse=new dCe,ise=new CCe,rse=new bCe}function vDe(){vDe=U,$Xe=Zn((TM(),D(O(NA,1),ce,297,0,[XK,tse,ise,rse])))}function yDe(){yDe=U,CQe=Zn((Kv(),D(O(TQe,1),ce,405,0,[eb,$w,Dw,wp])))}function kDe(){kDe=U,MYe=Zn((P0(),D(O(CYe,1),ce,406,0,[ej,Zk,iq,rq])))}function jDe(){jDe=U,PYe=Zn((L2(),D(O(SYe,1),ce,323,0,[tj,nj,ij,rj])))}function EDe(){EDe=U,IYe=Zn((k6(),D(O(xYe,1),ce,394,0,[cj,qA,HA,uj])))}function TDe(){TDe=U,Xnn=Zn((t3(),D(O(Pae,1),ce,393,0,[uI,Qy,Aj,Jy])))}function CDe(){CDe=U,VQe=Zn((tS(),D(O(HQe,1),ce,360,0,[Sq,wx,gx,aj])))}function MDe(){MDe=U,Ftn=Zn((DS(),D(O(rhe,1),ce,340,0,[cV,the,ihe,nhe])))}function SDe(){SDe=U,ZQe=Zn((Kf(),D(O(JQe,1),ce,411,0,[cm,Q3,J3,Pq])))}function PDe(){PDe=U,qen=Zn((sw(),D(O(xH,1),ce,197,0,[Zx,AH,xp,Ap])))}function ADe(){ADe=U,Crn=Zn((js(),D(O(Trn,1),ce,396,0,[Hs,ade,lde,hde])))}function xDe(){xDe=U,lrn=Zn((Ds(),D(O(frn,1),ce,285,0,[zj,na,y1,Gj])))}function IDe(){IDe=U,crn=Zn((Ea(),D(O(FV,1),ce,218,0,[LV,Vj,k4,jm])))}function ODe(){ODe=U,jrn=Zn((pS(),D(O(fde,1),ce,311,0,[BV,ude,ode,sde])))}function DDe(){DDe=U,yrn=Zn((Es(),D(O(g9,1),ce,374,0,[Yj,_d,Xj,Jw])))}function $De(){$De=U,fP(),Ude=Jt,Scn=hi,Wde=new Q9(Jt),Pcn=new Q9(hi)}function l7(){l7=U,ofe=new oW(Aa,0),Cx=new oW("IMPROVE_STRAIGHTNESS",1)}function Hvn(e,n){return sv(),se(e,new Gi(n,le(n.e.c.length+n.g.c.length)))}function Vvn(e,n){return sv(),se(e,new Gi(n,le(n.e.c.length+n.g.c.length)))}function uJ(e,n){return w7(n)!=10&&D(is(n),n.hm,n.__elementTypeId$,w7(n),e),e}function ju(e,n){var t;return t=tc(e,n,0),t==-1?!1:(Ua(e,t),!0)}function LDe(e,n){var t;return t=u(C2(e.e,n),387),t?(hY(t),t.e):null}function Mv(e){var n;return nc(e)&&(n=0-e,!isNaN(n))?n:Uh(qv(e))}function tc(e,n,t){for(;t=0?PS(e,t,!0,!0):_0(e,n,!0)}function aJ(e,n){r5();var t,i;return t=j2(e),i=j2(n),!!t&&!!i&&!QNe(t.k,i.k)}function Uvn(e,n){Cu(e,n==null||hC((nn(n),n))||isNaN((nn(n),n))?0:(nn(n),n))}function Wvn(e,n){Mu(e,n==null||hC((nn(n),n))||isNaN((nn(n),n))?0:(nn(n),n))}function Xvn(e,n){C0(e,n==null||hC((nn(n),n))||isNaN((nn(n),n))?0:(nn(n),n))}function Yvn(e,n){T0(e,n==null||hC((nn(n),n))||isNaN((nn(n),n))?0:(nn(n),n))}function RDe(e){(this.q?this.q:(He(),He(),Jl)).Ac(e.q?e.q:(He(),He(),Jl))}function Qvn(e,n){return _(n,99)&&u(n,18).Bb&yr?new d$(n,e):new Bv(n,e)}function Jvn(e,n){return _(n,99)&&u(n,18).Bb&yr?new d$(n,e):new Bv(n,e)}function KDe(e,n){Ise=new NE,AYe=n,Ty=e,u(Ty.b,65),QQ(Ty,Ise,null),$He(Ty)}function wF(e,n,t){var i;return i=e.g[n],P5(e,n,e.oi(n,t)),e.gi(n,t,i),e.ci(),i}function PM(e,n){var t;return t=e.Xc(n),t>=0?(e.$c(t),!0):!1}function gF(e){var n;return e.d!=e.r&&(n=vo(e),e.e=!!n&&n.Cj()==jWe,e.d=n),e.e}function pF(e,n){var t;for(Nn(e),Nn(n),t=!1;n.Ob();)t=t|e.Fc(n.Pb());return t}function k0(e,n){var t;return t=u(kn(e.e,n),387),t?(DCe(e,t),t.e):null}function qDe(e){var n,t;return n=e/60|0,t=e%60,t==0?""+n:""+n+":"+(""+t)}function ac(e,n){var t,i;return ud(e),i=new UQ(n,e.a),t=new cSe(i),new We(e,t)}function Jb(e,n){var t=e.a[n],i=(FF(),VK)[typeof t];return i?i(t):wZ(typeof t)}function Zvn(e){switch(e.g){case 0:return vt;case 1:return-1;default:return 0}}function e3n(e){return Oee(e,(Sv(),xue))<0?-g1n(qv(e)):e.l+e.m*G2+e.h*bd}function w7(e){return e.__elementTypeCategory$==null?10:e.__elementTypeCategory$}function mF(e){var n;return n=e.b.c.length==0?null:ve(e.b,0),n!=null&&PF(e,0),n}function HDe(e,n){for(;n[0]=0;)++n[0]}function g7(e,n){this.e=n,this.a=FLe(e),this.a<54?this.f=v0(e):this.c=q7(e)}function VDe(e,n,t,i){gt(),Gd.call(this,26),this.c=e,this.a=n,this.d=t,this.b=i}function ql(e,n,t){var i,r;for(i=10,r=0;re.a[i]&&(i=t);return i}function u3n(e,n){var t;return t=I0(e.e.c,n.e.c),t==0?gi(e.e.d,n.e.d):t}function Ag(e,n){return n.e==0||e.e==0?V3:(f3(),v_(e,n))}function s3n(e,n){if(!e)throw I(new rn(lMn("Enum constant undefined: %s",n)))}function t6(){t6=U,PQe=new xwe,AQe=new Pwe,MQe=new Lwe,SQe=new Fwe,xQe=new Nwe}function AM(){AM=U,ase=new tW("BY_SIZE",0),ZK=new tW("BY_SIZE_AND_SHAPE",1)}function xM(){xM=U,lq=new iW("EADES",0),zA=new iW("FRUCHTERMAN_REINGOLD",1)}function m7(){m7=U,Ex=new sW("READING_DIRECTION",0),cfe=new sW("ROTATION",1)}function zDe(){zDe=U,hJe=Zn((ld(),D(O(rfe,1),ce,335,0,[Rq,ife,Kq,Iy,xy])))}function UDe(){UDe=U,Hen=Zn((j6(),D(O(cae,1),ce,315,0,[rae,IH,OH,Vy,Gy])))}function WDe(){WDe=U,nJe=Zn((Vg(),D(O(eJe,1),ce,363,0,[mx,yx,kx,vx,px])))}function XDe(){XDe=U,CJe=Zn((to(),D(O(Lfe,1),ce,163,0,[vj,Fy,b1,Ny,_w])))}function YDe(){YDe=U,lin=Zn((J7(),D(O(Ahe,1),ce,316,0,[Mhe,hV,Phe,dV,She])))}function QDe(){QDe=U,Din=Zn((yf(),D(O(gh,1),ce,175,0,[an,Li,Dl,Dd,wh])))}function JDe(){JDe=U,rin=Zn((d3(),D(O(iin,1),ce,355,0,[Op,pm,r9,i9,c9])))}function ZDe(){ZDe=U,yQe=Zn((mr(),D(O(noe,1),ce,356,0,[xl,h1,du,Yc,Jr])))}function e$e(){e$e=U,irn=Zn((Ar(),D(O(f9,1),ce,103,0,[ea,cf,Ao,Oa,Da])))}function n$e(){n$e=U,hrn=Zn((_g(),D(O(d9,1),ce,249,0,[k1,Uj,nde,h9,tde])))}function t$e(){t$e=U,wrn=Zn((ae(),D(O(kr,1),Lc,61,0,[gc,tn,hn,On,un])))}function vF(e,n){var t;return t=u(kn(e.a,n),134),t||(t=new WO,jt(e.a,n,t)),t}function i$e(e){var n;return n=u(M(e,(re(),ib)),305),n?n.a==e:!1}function r$e(e){var n;return n=u(M(e,(re(),ib)),305),n?n.i==e:!1}function c$e(e,n){return nn(n),OY(e),e.d.Ob()?(n.td(e.d.Pb()),!0):!1}function IM(e){return $c(e,vt)>0?vt:$c(e,rr)<0?rr:Fn(e)}function Zb(e){return e<3?(Is(e,ZVe),e+1):e=0&&n=-.01&&e.a<=zf&&(e.a=0),e.b>=-.01&&e.b<=zf&&(e.b=0),e}function s$e(e,n){return n==(_$(),_$(),IXe)?e.toLocaleLowerCase():e.toLowerCase()}function dJ(e){return(e.i&2?"interface ":e.i&1?"":"class ")+(la(e),e.o)}function Gr(e){var n,t;t=(n=new gD,n),Bn((!e.q&&(e.q=new fe(Lo,e,11,10)),e.q),t)}function o3n(e,n){var t;return t=n>0?n-1:n,ije(jan(O$e(aY(new qm,t),e.n),e.j),e.k)}function f3n(e,n,t,i){var r;e.j=-1,Fne(e,gne(e,n,t),(Er(),r=u(n,66).Mj(),r.Ok(i)))}function o$e(e){this.g=e,this.f=new oe,this.a=y.Math.min(this.g.c.c,this.g.d.c)}function f$e(e){this.b=new oe,this.a=new oe,this.c=new oe,this.d=new oe,this.e=e}function l$e(e,n){this.a=new Ln,this.e=new Ln,this.b=(a6(),Jx),this.c=e,this.b=n}function a$e(e,n,t){lC.call(this),bJ(this),this.a=e,this.c=t,this.b=n.d,this.f=n.e}function h$e(e){this.d=e,this.c=e.c.vc().Kc(),this.b=null,this.a=null,this.e=(tT(),RK)}function j0(e){if(e<0)throw I(new rn("Illegal Capacity: "+e));this.g=this.ri(e)}function l3n(e,n){if(0>e||e>n)throw I(new SU("fromIndex: 0, toIndex: "+e+wie+n))}function a3n(e){var n;if(e.a==e.b.a)throw I(new Sc);return n=e.a,e.c=n,e.a=e.a.e,n}function OM(e){var n;Nb(!!e.c),n=e.c.a,Zs(e.d,e.c),e.b==e.c?e.b=n:--e.a,e.c=null}function DM(e,n){var t;return ud(e),t=new $Ae(e,e.a.rd(),e.a.qd()|4,n),new We(e,t)}function h3n(e,n){var t,i;return t=u(rw(e.d,n),14),t?(i=n,e.e.pc(i,t)):null}function $M(e,n){var t,i;for(i=e.Kc();i.Ob();)t=u(i.Pb(),70),te(t,(re(),am),n)}function d3n(e){var n;return n=ne(he(M(e,(be(),ah)))),n<0&&(n=0,te(e,ah,n)),n}function b3n(e,n,t){var i;i=y.Math.max(0,e.b/2-.5),T6(t,i,1),se(n,new _Ee(t,i))}function w3n(e,n,t){var i;return i=e.a.e[u(n.a,10).p]-e.a.e[u(t.a,10).p],ci(q8(i))}function d$e(e,n,t,i,r,c){var o;o=nF(i),sr(o,r),Ki(o,c),Be(e.a,i,new dC(o,n,t.f))}function b$e(e,n){var t;if(t=ok(e.Tg(),n),!t)throw I(new rn(o1+n+iK));return t}function ew(e,n){var t;for(t=e;Ut(t);)if(t=Ut(t),t==n)return!0;return!1}function g3n(e,n){var t,i,r;for(i=n.a.cd(),t=u(n.a.dd(),14).gc(),r=0;r0&&(e.a/=n,e.b/=n),e}function xs(e){var n;return e.w?e.w:(n=C2n(e),n&&!n.kh()&&(e.w=n),n)}function T3n(e){var n;return e==null?null:(n=u(e,190),Ckn(n,n.length))}function K(e,n){if(e.g==null||n>=e.i)throw I(new h$(n,e.i));return e.li(n,e.g[n])}function C3n(e){var n,t;for(n=e.a.d.j,t=e.c.d.j;n!=t;)Qo(e.b,n),n=aS(n);Qo(e.b,n)}function M3n(e){var n;for(n=0;n=14&&n<=16))),e}function m$e(e,n,t){var i=function(){return e.apply(i,arguments)};return n.apply(i,t),i}function v$e(e,n,t){var i,r;i=n;do r=ne(e.p[i.p])+t,e.p[i.p]=r,i=e.a[i.p];while(i!=n)}function Pv(e,n){var t,i;i=e.a,t=u6n(e,n,null),i!=n&&!e.e&&(t=v3(e,n,t)),t&&t.Fi()}function wJ(e,n){return If(),Yo(i1),y.Math.abs(e-n)<=i1||e==n||isNaN(e)&&isNaN(n)}function gJ(e,n){return If(),Yo(i1),y.Math.abs(e-n)<=i1||e==n||isNaN(e)&&isNaN(n)}function A3n(e,n){return e1(),mu(e.b.c.length-e.e.c.length,n.b.c.length-n.e.c.length)}function xg(e,n){return San(c6(e,n,Fn(ir(Ul,Bl(Fn(ir(n==null?0:Bt(n),Wl)),15)))))}function y$e(){y$e=U,LQe=Zn((dn(),D(O(jq,1),ce,267,0,[vi,$i,fi,Qc,Ts,Yf])))}function k$e(){k$e=U,qin=Zn((lw(),D(O(EV,1),ce,291,0,[jV,Bj,_j,kV,Fj,Nj])))}function j$e(){j$e=U,Fin=Zn((Hl(),D(O(Jhe,1),ce,248,0,[vV,$j,Lj,CI,EI,TI])))}function E$e(){E$e=U,oJe=Zn((N2(),D(O(n4,1),ce,227,0,[e4,Ay,Z3,Lw,vp,mp])))}function T$e(){T$e=U,vJe=Zn((s3(),D(O(yfe,1),ce,275,0,[Oy,gfe,vfe,mfe,pfe,wfe])))}function C$e(){C$e=U,mJe=Zn((Y7(),D(O(bfe,1),ce,274,0,[Mx,afe,dfe,lfe,hfe,Wq])))}function M$e(){M$e=U,Ren=Zn((KS(),D(O(nae,1),ce,313,0,[SH,Zle,MH,Jle,eae,Qx])))}function S$e(){S$e=U,gJe=Zn((GS(),D(O(sfe,1),ce,276,0,[Vq,Hq,zq,Gq,Uq,Tx])))}function P$e(){P$e=U,Qnn=Zn((P6(),D(O(Ynn,1),ce,327,0,[sI,HH,GH,VH,zH,qH])))}function A$e(){A$e=U,brn=Zn((Yu(),D(O(DI,1),ce,273,0,[E1,La,Wj,w9,b9,Em])))}function x$e(){x$e=U,urn=Zn((HS(),D(O(W1e,1),ce,312,0,[NV,G1e,U1e,H1e,z1e,V1e])))}function x3n(){return bw(),D(O(Dr,1),ce,93,0,[uf,$a,sf,ff,ta,Io,Rs,of,xo])}function FM(e,n){var t;t=e.a,e.a=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,0,t,e.a))}function NM(e,n){var t;t=e.b,e.b=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,1,t,e.b))}function Av(e,n){var t;t=e.b,e.b=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,3,t,e.b))}function T0(e,n){var t;t=e.f,e.f=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,3,t,e.f))}function C0(e,n){var t;t=e.g,e.g=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,4,t,e.g))}function Cu(e,n){var t;t=e.i,e.i=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,5,t,e.i))}function Mu(e,n){var t;t=e.j,e.j=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,6,t,e.j))}function xv(e,n){var t;t=e.j,e.j=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,1,t,e.j))}function Iv(e,n){var t;t=e.c,e.c=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,4,t,e.c))}function Ov(e,n){var t;t=e.k,e.k=n,e.Db&4&&!(e.Db&1)&&yt(e,new Yb(e,2,t,e.k))}function kF(e,n){var t;t=e.d,e.d=n,e.Db&4&&!(e.Db&1)&&yt(e,new WL(e,2,t,e.d))}function Ya(e,n){var t;t=e.s,e.s=n,e.Db&4&&!(e.Db&1)&&yt(e,new WL(e,4,t,e.s))}function tw(e,n){var t;t=e.t,e.t=n,e.Db&4&&!(e.Db&1)&&yt(e,new WL(e,5,t,e.t))}function Dv(e,n){var t;t=e.F,e.F=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,5,t,n))}function v7(e,n){var t;return t=u(kn((ET(),GI),e),55),t?t.xj(n):V(pn,pe,1,n,5,1)}function va(e,n){var t,i;return t=n in e.a,t&&(i=da(e,n).he(),i)?i.a:null}function I3n(e,n){var t,i,r;return t=(i=(Jd(),r=new fz,r),n&&rte(i,n),i),CJ(t,e),t}function I$e(e,n,t){if(Vv(e,t),!e.Bk()&&t!=null&&!e.wj(t))throw I(new hD);return t}function O$e(e,n){return e.n=n,e.n?(e.f=new oe,e.e=new oe):(e.f=null,e.e=null),e}function zn(e,n,t,i,r,c){var o;return o=dL(e,n),$$e(t,o),o.i=r?8:0,o.f=i,o.e=r,o.g=c,o}function pJ(e,n,t,i,r){this.d=n,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=e,this.a=t}function mJ(e,n,t,i,r){this.d=n,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=e,this.a=t}function vJ(e,n,t,i,r){this.d=n,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=e,this.a=t}function yJ(e,n,t,i,r){this.d=n,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=e,this.a=t}function kJ(e,n,t,i,r){this.d=n,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=e,this.a=t}function D$e(e,n){var t,i,r,c;for(i=n,r=0,c=i.length;r=0),Iyn(e.d,e.c)<0&&(e.a=e.a-1&e.d.a.length-1,e.b=e.d.c),e.c=-1}function jJ(e){return e.a<54?e.f<0?-1:e.f>0?1:0:(!e.c&&(e.c=D7(e.f)),e.c).e}function Yo(e){if(!(e>=0))throw I(new rn("tolerance ("+e+") must be >= 0"));return e}function $v(){return pV||(pV=new jqe,Lg(pV,D(O(bp,1),pe,130,0,[new dz]))),pV}function Pr(){Pr=U,zy=new QD(X6,0),Ju=new QD("INPUT",1),ou=new QD("OUTPUT",2)}function BM(){BM=U,nfe=new GD("ARD",0),jx=new GD("MSD",1),Bq=new GD("MANUAL",2)}function M0(){M0=U,Sj=new t$("BARYCENTER",0),Wy=new t$(uze,1),tI=new t$(sze,2)}function y7(e,n){var t;if(t=e.gc(),n<0||n>t)throw I(new Kb(n,t));return new RX(e,n)}function N$e(e,n){var t;return _(n,42)?e.c.Mc(n):(t=bN(e,n),yS(e,n),t)}function Nr(e,n,t){return cd(e,n),iu(e,t),Ya(e,0),tw(e,1),eh(e,!0),Za(e,!0),e}function Is(e,n){if(e<0)throw I(new rn(n+" cannot be negative but was: "+e));return e}function _$e(e,n){var t,i;for(t=0,i=e.gc();t0?u(ve(t.a,i-1),10):null}function r6(e,n){var t;t=e.k,e.k=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,2,t,e.k))}function KM(e,n){var t;t=e.f,e.f=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,8,t,e.f))}function qM(e,n){var t;t=e.i,e.i=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,7,t,e.i))}function CJ(e,n){var t;t=e.a,e.a=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,8,t,e.a))}function MJ(e,n){var t;t=e.b,e.b=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,0,t,e.b))}function SJ(e,n){var t;t=e.b,e.b=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,0,t,e.b))}function PJ(e,n){var t;t=e.c,e.c=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,1,t,e.c))}function AJ(e,n){var t;t=e.c,e.c=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,1,t,e.c))}function EF(e,n){var t;t=e.c,e.c=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,4,t,e.c))}function xJ(e,n){var t;t=e.d,e.d=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,1,t,e.d))}function TF(e,n){var t;t=e.D,e.D=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,2,t,e.D))}function CF(e,n){e.r>0&&e.c0&&e.g!=0&&CF(e.i,n/e.r*e.i.d))}function R3n(e,n,t){var i;e.b=n,e.a=t,i=(e.a&512)==512?new Ske:new hz,e.c=tSn(i,e.b,e.a)}function U$e(e,n){return Ma(e.e,n)?(Er(),gF(n)?new yC(n,e):new M8(n,e)):new BTe(n,e)}function HM(e,n){return Man(u6(e.a,n,Fn(ir(Ul,Bl(Fn(ir(n==null?0:Bt(n),Wl)),15)))))}function K3n(e,n,t){return Qb(e,new Vye(n),new LO,new Gye(t),D(O(os,1),ce,132,0,[]))}function q3n(e){var n,t;return 0>e?new qU:(n=e+1,t=new pOe(n,e),new kX(null,t))}function H3n(e,n){He();var t;return t=new n2(1),Ni(e)?qr(t,e,n):au(t.f,e,n),new fD(t)}function V3n(e,n){var t,i;return t=e.o+e.p,i=n.o+n.p,tn?(n<<=1,n>0?n:V6):n}function MF(e){switch(JW(e.e!=3),e.e){case 2:return!1;case 0:return!0}return Ymn(e)}function X$e(e,n){var t;return _(n,8)?(t=u(n,8),e.a==t.a&&e.b==t.b):!1}function SF(e,n,t){var i,r,c;return c=n>>5,r=n&31,i=ji(Hb(e.n[t][c],Fn(aa(r,1))),3),i}function z3n(e,n){var t,i;for(i=n.vc().Kc();i.Ob();)t=u(i.Pb(),42),_S(e,t.cd(),t.dd())}function U3n(e,n){var t;t=new NE,u(n.b,65),u(n.b,65),u(n.b,65),Tu(n.a,new QX(e,t,n))}function IJ(e,n){var t;t=e.b,e.b=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,21,t,e.b))}function OJ(e,n){var t;t=e.d,e.d=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,11,t,e.d))}function VM(e,n){var t;t=e.j,e.j=n,e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,13,t,e.j))}function Y$e(e,n,t){var i,r,c;for(c=e.a.length-1,r=e.b,i=0;i>>31;i!=0&&(e[t]=i)}function i4n(e,n){He();var t,i;for(i=new oe,t=0;t0&&(this.g=this.ri(this.i+(this.i/8|0)+1),e.Qc(this.g))}function Qt(e,n){gC.call(this,ucn,e,n),this.b=this,this.a=hu(e.Tg(),Ge(this.e.Tg(),this.c))}function s6(e,n){var t,i;for(nn(n),i=n.vc().Kc();i.Ob();)t=u(i.Pb(),42),e.zc(t.cd(),t.dd())}function d4n(e,n,t){var i;for(i=t.Kc();i.Ob();)if(!aM(e,n,i.Pb()))return!1;return!0}function b4n(e,n,t,i,r){var c;return t&&(c=Kt(n.Tg(),e.c),r=t.gh(n,-1-(c==-1?i:c),null,r)),r}function w4n(e,n,t,i,r){var c;return t&&(c=Kt(n.Tg(),e.c),r=t.ih(n,-1-(c==-1?i:c),null,r)),r}function wLe(e){var n;if(e.b==-2){if(e.e==0)n=-1;else for(n=0;e.a[n]==0;n++);e.b=n}return e.b}function gLe(e){switch(e.g){case 2:return ae(),un;case 4:return ae(),hn;default:return e}}function pLe(e){switch(e.g){case 1:return ae(),On;case 3:return ae(),tn;default:return e}}function g4n(e){var n,t,i;return e.j==(ae(),tn)&&(n=zRe(e),t=Nu(n,hn),i=Nu(n,un),i||i&&t)}function p4n(e){var n,t;return n=u(e.e&&e.e(),9),t=u(HY(n,n.length),9),new Ws(n,t,n.length)}function m4n(e,n){In(n,cze,1),_Z(_an(new zE((i5(),new kL(e,!1,!1,new QG))))),Tn(n)}function k7(e,n){return cn(),Ni(e)?GQ(e,Vn(n)):Fb(e)?tL(e,he(n)):Lb(e)?jwn(e,ye(n)):e.wd(n)}function _J(e,n){n.q=e,e.d=y.Math.max(e.d,n.r),e.b+=n.d+(e.a.c.length==0?0:e.c),se(e.a,n)}function Fv(e,n){var t,i,r,c;return r=e.c,t=e.c+e.b,c=e.d,i=e.d+e.a,n.a>r&&n.ac&&n.b1||e.Ob())return++e.a,e.g=0,n=e.i,e.Ob(),n;throw I(new Sc)}function x4n(e){mCe();var n;return PEe(KH,e)||(n=new nve,n.a=e,PX(KH,e,n)),u(Fr(KH,e),635)}function po(e){var n,t,i,r;return r=e,i=0,r<0&&(r+=bd,i=Pa),t=ci(r/G2),n=ci(r-t*G2),fu(n,t,i)}function j7(e){var n,t,i;for(i=0,t=new t2(e.a);t.a>22),r=e.h+n.h+(i>>22),fu(t&ss,i&ss,r&Pa)}function NLe(e,n){var t,i,r;return t=e.l-n.l,i=e.m-n.m+(t>>22),r=e.h-n.h+(i>>22),fu(t&ss,i&ss,r&Pa)}function M7(e){var n;return e<128?(n=(JSe(),$ue)[e],!n&&(n=$ue[e]=new Pz(e)),n):new Pz(e)}function qt(e){var n;return _(e,78)?e:(n=e&&e.__java$exception,n||(n=new MFe(e),H7e(n)),n)}function S7(e){if(_(e,186))return u(e,118);if(e)return null;throw I(new Zp(OUe))}function _Le(e,n){if(n==null)return!1;for(;e.a!=e.b;)if(kt(n,oS(e)))return!0;return!1}function VJ(e){return e.a.Ob()?!0:e.a!=e.d?!1:(e.a=new TQ(e.e.f),e.a.Ob())}function wi(e,n){var t,i;return t=n.Pc(),i=t.length,i==0?!1:(iY(e.c,e.c.length,t),!0)}function G4n(e,n,t){var i,r;for(r=n.vc().Kc();r.Ob();)i=u(r.Pb(),42),e.yc(i.cd(),i.dd(),t);return e}function BLe(e,n){var t,i;for(i=new A(e.b);i.a=0,"Negative initial capacity"),wC(n>=0,"Non-positive load factor"),Wu(this)}function NF(e,n,t){return e>=128?!1:e<64?j5(ji(aa(1,e),t),0):j5(ji(aa(1,e-64),n),0)}function e5n(e,n){return!e||!n||e==n?!1:I0(e.b.c,n.b.c+n.b.b)<0&&I0(n.b.c,e.b.c+e.b.b)<0}function QLe(e){var n,t,i;return t=e.n,i=e.o,n=e.d,new Xs(t.a-n.b,t.b-n.d,i.a+(n.b+n.c),i.b+(n.d+n.a))}function n5n(e){var n,t,i,r;for(t=e.a,i=0,r=t.length;ii)throw I(new Kb(n,i));return e.hi()&&(t=bxe(e,t)),e.Vh(n,t)}function x7(e,n,t){return t==null?(!e.q&&(e.q=new Ln),C2(e.q,n)):(!e.q&&(e.q=new Ln),jt(e.q,n,t)),e}function te(e,n,t){return t==null?(!e.q&&(e.q=new Ln),C2(e.q,n)):(!e.q&&(e.q=new Ln),jt(e.q,n,t)),e}function JLe(e){var n,t;return t=new wM,Yr(t,e),te(t,(zh(),rm),e),n=new Ln,cAn(e,t,n),IIn(e,t,n),t}function r5n(e){Yg();var n,t,i;for(t=V(xi,ie,8,2,0,1),i=0,n=0;n<2;n++)i+=.5,t[n]=B9n(i,e);return t}function ZLe(e,n){var t,i,r,c;for(t=!1,i=e.a[n].length,c=0;c>=1);return n}function nFe(e){var n,t;return t=rk(e.h),t==32?(n=rk(e.m),n==32?rk(e.l)+32:n+20-10):t-12}function l6(e){var n;return n=e.a[e.b],n==null?null:(zt(e.a,e.b,null),e.b=e.b+1&e.a.length-1,n)}function tFe(e){var n,t;return n=e.t-e.k[e.o.p]*e.d+e.j[e.o.p]>e.f,t=e.u+e.e[e.o.p]*e.d>e.f*e.s*e.d,n||t}function rS(e,n,t){var i,r;return i=new sF(n,t),r=new Tb,e.b=UKe(e,e.b,i,r),r.b||++e.c,e.b.b=!1,r.d}function iFe(e,n,t){var i,r,c,o;for(o=d6(n,t),c=0,r=o.Kc();r.Ob();)i=u(r.Pb(),11),jt(e.c,i,le(c++))}function Wh(e){var n,t;for(t=new A(e.a.b);t.at&&(t=e[n]);return t}function rFe(e,n,t){var i;return i=new oe,ste(e,n,i,(ae(),hn),!0,!1),ste(e,t,i,un,!1,!1),i}function BF(e,n,t){var i,r,c,o;return c=null,o=n,r=y0(o,"labels"),i=new TTe(e,t),c=(ETn(i.a,i.b,r),r),c}function u5n(e,n,t,i){var r;return r=Wne(e,n,t,i),!r&&(r=s6n(e,t,i),r&&!Zg(e,n,r))?null:r}function s5n(e,n,t,i){var r;return r=Xne(e,n,t,i),!r&&(r=tN(e,t,i),r&&!Zg(e,n,r))?null:r}function cFe(e,n){var t;for(t=0;t1||n>=0&&e.b<3)}function I7(e){var n,t,i;for(n=new Lu,i=ct(e,0);i.b!=i.d.c;)t=u(rt(i),8),rv(n,0,new Kr(t));return n}function id(e){var n,t;for(t=new A(e.a.b);t.ai?1:0}function fZ(e,n){return AKe(e,n)?(Be(e.b,u(M(n,(re(),Fw)),21),n),ut(e.a,n),!0):!1}function v5n(e){var n,t;n=u(M(e,(re(),Qu)),10),n&&(t=n.c,ju(t.a,n),t.a.c.length==0&&ju(ar(n).b,t))}function aFe(e){return Xf?V(LXe,dGe,572,0,0,1):u(Hf(e.a,V(LXe,dGe,572,e.a.c.length,0,1)),842)}function y5n(e,n,t,i){return RC(),new kD(D(O(Ed,1),kP,42,0,[(ON(e,n),new e0(e,n)),(ON(t,i),new e0(t,i))]))}function $g(e,n,t){var i,r;return r=(i=new gD,i),Nr(r,n,t),Bn((!e.q&&(e.q=new fe(Lo,e,11,10)),e.q),r),r}function HF(e){var n,t,i,r;for(r=zan(Lrn,e),t=r.length,i=V(ge,ie,2,t,6,1),n=0;n=e.b.c.length||(lZ(e,2*n+1),t=2*n+2,t=0&&e[i]===n[i];i--);return i<0?0:FD(ji(e[i],Ir),ji(n[i],Ir))?-1:1}function k5n(e,n){var t,i;for(i=ct(e,0);i.b!=i.d.c;)t=u(rt(i),214),t.e.length>0&&(n.td(t),t.i&&w6n(t))}function GF(e,n){var t,i;return i=u(en(e.a,4),126),t=V(GV,yK,415,n,0,1),i!=null&&Kc(i,0,t,0,i.length),t}function dFe(e,n){var t;return t=new j_((e.f&256)!=0,e.i,e.a,e.d,(e.f&16)!=0,e.j,e.g,n),e.e!=null||(t.c=e),t}function j5n(e,n){var t,i;for(i=e.Zb().Cc().Kc();i.Ob();)if(t=u(i.Pb(),14),t.Hc(n))return!0;return!1}function zF(e,n,t,i,r){var c,o;for(o=t;o<=r;o++)for(c=n;c<=i;c++)if(Rg(e,c,o))return!0;return!1}function bFe(e,n,t){var i,r,c,o;for(nn(t),o=!1,c=e.Zc(n),r=t.Kc();r.Ob();)i=r.Pb(),c.Rb(i),o=!0;return o}function E5n(e,n){var t;return e===n?!0:_(n,83)?(t=u(n,83),hne(f0(e),t.vc())):!1}function wFe(e,n,t){var i,r;for(r=t.Kc();r.Ob();)if(i=u(r.Pb(),42),e.re(n,i.dd()))return!0;return!1}function gFe(e,n,t){return e.d[n.p][t.p]||(v9n(e,n,t),e.d[n.p][t.p]=!0,e.d[t.p][n.p]=!0),e.a[n.p][t.p]}function Vv(e,n){if(!e.ai()&&n==null)throw I(new rn("The 'no null' constraint is violated"));return n}function Gv(e,n){e.D==null&&e.B!=null&&(e.D=e.B,e.B=null),TF(e,n==null?null:(nn(n),n)),e.C&&e.yk(null)}function T5n(e,n){var t;return!e||e==n||!Ai(n,(re(),cb))?!1:(t=u(M(n,(re(),cb)),10),t!=e)}function UF(e){switch(e.i){case 2:return!0;case 1:return!1;case-1:++e.c;default:return e.pl()}}function pFe(e){switch(e.i){case-2:return!0;case-1:return!1;case 1:--e.c;default:return e.ql()}}function mFe(e){sxe.call(this,"The given string does not match the expected format for individual spacings.",e)}function js(){js=U,Hs=new KT("ELK",0),ade=new KT("JSON",1),lde=new KT("DOT",2),hde=new KT("SVG",3)}function O7(){O7=U,bI=new r$(Aa,0),Gae=new r$("RADIAL_COMPACTION",1),zae=new r$("WEDGE_COMPACTION",2)}function qf(){qf=U,use=new ND("CONCURRENT",0),_s=new ND("IDENTITY_FINISH",1),Iw=new ND("UNORDERED",2)}function WF(){WF=U,Lse=(pT(),cq),$se=new Ve(xie,Lse),DYe=new Rt(Iie),$Ye=new Rt(Oie),LYe=new Rt(Die)}function zv(){zv=U,Woe=new Tpe,Xoe=new Cpe,UQe=new Mpe,zQe=new Spe,GQe=new Ppe,Uoe=(nn(GQe),new Om)}function Uv(){Uv=U,_H=new ZD("CONSERVATIVE",0),mae=new ZD("CONSERVATIVE_SOFT",1),Uy=new ZD("SLOPPY",2)}function cS(){cS=U,Z1e=new r0(15),srn=new Tr((ht(),Ld),Z1e),l9=ym,X1e=Vin,Y1e=$d,J1e=Fp,Q1e=PI}function XF(e,n,t){var i,r,c;for(i=new Vt,c=ct(t,0);c.b!=c.d.c;)r=u(rt(c),8),ut(i,new Kr(r));bFe(e,n,i)}function C5n(e){var n,t,i;for(n=0,i=V(xi,ie,8,e.b,0,1),t=ct(e,0);t.b!=t.d.c;)i[n++]=u(rt(t),8);return i}function hZ(e){var n;return n=(!e.a&&(e.a=new fe(Fa,e,9,5)),e.a),n.i!=0?Han(u(K(n,0),678)):null}function M5n(e,n){var t;return t=or(e,n),FD(KL(e,n),0)|chn(KL(e,t),0)?t:or(yP,KL(Hb(t,63),1))}function S5n(e,n){var t;t=me((hN(),Yx))!=null&&n.wg()!=null?ne(he(n.wg()))/ne(he(me(Yx))):1,jt(e.b,n,t)}function P5n(e,n){var t,i;return t=u(e.d.Bc(n),14),t?(i=e.e.hc(),i.Gc(t),e.e.d-=t.gc(),t.$b(),i):null}function dZ(e,n){var t,i;if(i=e.c[n],i!=0)for(e.c[n]=0,e.d-=i,t=n+1;t0)return fv(n-1,e.a.c.length),Ua(e.a,n-1);throw I(new G7e)}function A5n(e,n,t){if(n<0)throw I(new Rr(qze+n));nn)throw I(new rn(CP+e+bGe+n));if(e<0||n>t)throw I(new SU(CP+e+pie+n+wie+t))}function kFe(e){if(!e.a||!(e.a.i&8))throw I(new ec("Enumeration class expected for layout option "+e.f))}function iw(e){var n;++e.j,e.i==0?e.g=null:e.ieA?e-t>eA:t-e>eA}function QF(e,n){return!e||n&&!e.j||_(e,124)&&u(e,124).a.b==0?0:e.Re()}function sS(e,n){return!e||n&&!e.k||_(e,124)&&u(e,124).a.a==0?0:e.Se()}function D7(e){return n1(),e<0?e!=-1?new oee(-1,-e):UK:e<=10?Wue[ci(e)]:new oee(1,e)}function wZ(e){throw FF(),I(new _ke("Unexpected typeof result '"+e+"'; please report this bug to the GWT team"))}function MFe(e){Vke(),JT(this),GC(this),this.e=e,BKe(this,e),this.g=e==null?Au:rc(e),this.a="",this.b=e,this.a=""}function gZ(){this.a=new Gve,this.f=new D8e(this),this.b=new $8e(this),this.i=new L8e(this),this.e=new F8e(this)}function SFe(){_ln.call(this,new ZQ(Zb(16))),Is(2,XVe),this.b=2,this.a=new JY(null,null,0,null),t8(this.a,this.a)}function a6(){a6=U,PH=new XD("DUMMY_NODE_OVER",0),tae=new XD("DUMMY_NODE_UNDER",1),Jx=new XD("EQUAL",2)}function JF(){JF=U,pq=fxe(D(O(f9,1),ce,103,0,[(Ar(),Ao),cf])),mq=fxe(D(O(f9,1),ce,103,0,[Da,Oa]))}function ZF(e){return(ae(),Iu).Hc(e.j)?ne(he(M(e,(re(),s4)))):hc(D(O(xi,1),ie,8,0,[e.i.n,e.n,e.a])).b}function $5n(e){var n,t,i,r;for(i=e.b.a,t=i.a.ec().Kc();t.Ob();)n=u(t.Pb(),561),r=new vKe(n,e.e,e.f),se(e.g,r)}function cd(e,n){var t,i,r;i=e.nk(n,null),r=null,n&&(r=(Um(),t=new zd,t),Pv(r,e.r)),i=Vf(e,r,i),i&&i.Fi()}function L5n(e,n){var t,i;for(i=cs(e.d,1)!=0,t=!0;t;)t=!1,t=n.c.Tf(n.e,i),t=t|fk(e,n,i,!1),i=!i;$J(e)}function pZ(e,n){var t,i,r;return i=!1,t=n.q.d,n.dr&&(Z_e(n.q,r),i=t!=n.q.d)),i}function PFe(e,n){var t,i,r,c,o,f,l,a;return l=n.i,a=n.j,i=e.f,r=i.i,c=i.j,o=l-r,f=a-c,t=y.Math.sqrt(o*o+f*f),t}function mZ(e,n){var t,i;return i=kS(e),i||(t=(G_(),eRe(n)),i=new F7e(t),Bn(i.Vk(),e)),i}function $7(e,n){var t,i;return t=u(e.c.Bc(n),14),t?(i=e.hc(),i.Gc(t),e.d-=t.gc(),t.$b(),e.mc(i)):e.jc()}function AFe(e,n){var t;for(t=0;t=e.c.b:e.a<=e.c.b))throw I(new Sc);return n=e.a,e.a+=e.c.c,++e.b,le(n)}function _5n(e){var n;return n=new o$e(e),e7(e.a,xQe,new ws(D(O(oj,1),pe,369,0,[n]))),n.d&&se(n.f,n.d),n.f}function eN(e){var n;return n=new BW(e.a),Yr(n,e),te(n,(re(),Et),e),n.o.a=e.g,n.o.b=e.f,n.n.a=e.i,n.n.b=e.j,n}function B5n(e,n,t,i){var r,c;for(c=e.Kc();c.Ob();)r=u(c.Pb(),70),r.n.a=n.a+(i.a-r.o.a)/2,r.n.b=n.b,n.b+=r.o.b+t}function R5n(e,n,t){var i,r;for(r=n.a.a.ec().Kc();r.Ob();)if(i=u(r.Pb(),57),qAe(e,i,t))return!0;return!1}function K5n(e){var n,t;for(t=new A(e.r);t.a=0?n:-n;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return n<0?1/r:r}function G5n(e,n){var t,i,r;for(r=1,t=e,i=n>=0?n:-n;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return n<0?1/r:r}function FFe(e){var n,t;if(e!=null)for(t=0;t0&&(t=u(ve(e.a,e.a.c.length-1),570),fZ(t,n))||se(e.a,new wOe(n))}function Y5n(e){zo();var n,t;n=e.d.c-e.e.c,t=u(e.g,145),Tu(t.b,new q9e(n)),Tu(t.c,new H9e(n)),Yi(t.i,new V9e(n))}function RFe(e){var n;return n=new Ph,n.a+="VerticalSegment ",Pc(n,e.e),n.a+=" ",Qn(n,XW(new AD,new A(e.k))),n.a}function Q5n(e){var n;return n=u(k0(e.c.c,""),229),n||(n=new y2(zm(Gm(new Up,""),"Other")),od(e.c.c,"",n)),n}function h6(e){var n;return e.Db&64?Jo(e):(n=new bo(Jo(e)),n.a+=" (name: ",Lr(n,e.zb),n.a+=")",n.a)}function EZ(e,n,t){var i,r;return r=e.sb,e.sb=n,e.Db&4&&!(e.Db&1)&&(i=new Di(e,1,4,r,n),t?t.Ei(i):t=i),t}function nN(e,n){var t,i,r;for(t=0,r=dc(e,n).Kc();r.Ob();)i=u(r.Pb(),11),t+=M(i,(re(),Qu))!=null?1:0;return t}function Fg(e,n,t){var i,r,c;for(i=0,c=ct(e,0);c.b!=c.d.c&&(r=ne(he(rt(c))),!(r>t));)r>=n&&++i;return i}function J5n(e,n,t){var i,r;return i=new pa(e.e,3,13,null,(r=n.c,r||(Ke(),tl)),nh(e,n),!1),t?t.Ei(i):t=i,t}function Z5n(e,n,t){var i,r;return i=new pa(e.e,4,13,(r=n.c,r||(Ke(),tl)),null,nh(e,n),!1),t?t.Ei(i):t=i,t}function TZ(e,n,t){var i,r;return r=e.r,e.r=n,e.Db&4&&!(e.Db&1)&&(i=new Di(e,1,8,r,e.r),t?t.Ei(i):t=i),t}function Ja(e,n){var t,i;return t=u(n,676),i=t.vk(),!i&&t.wk(i=_(n,88)?new FTe(e,u(n,26)):new iIe(e,u(n,148))),i}function L7(e,n,t){var i;e.qi(e.i+1),i=e.oi(n,t),n!=e.i&&Kc(e.g,n,e.g,n+1,e.i-n),zt(e.g,n,i),++e.i,e.bi(n,t),e.ci()}function e6n(e,n){var t;return n.a&&(t=n.a.a.length,e.a?Qn(e.a,e.b):e.a=new Cs(e.d),cIe(e.a,n.a,n.d.length,t)),e}function n6n(e,n){var t,i,r,c;if(n.vi(e.a),c=u(en(e.a,8),1936),c!=null)for(t=c,i=0,r=t.length;it)throw I(new Rr(CP+e+pie+n+", size: "+t));if(e>n)throw I(new rn(CP+e+bGe+n))}function no(e,n,t){if(n<0)Sne(e,t);else{if(!t.Ij())throw I(new rn(o1+t.ne()+fy));u(t,66).Nj().Vj(e,e.yh(),n)}}function r6n(e,n,t,i,r,c,o,f){var l;for(l=t;c=i||n=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e>=48&&e<=57?e-48:0}function UFe(e){var n;return e.Db&64?Jo(e):(n=new bo(Jo(e)),n.a+=" (source: ",Lr(n,e.d),n.a+=")",n.a)}function u6n(e,n,t){var i,r;return r=e.a,e.a=n,e.Db&4&&!(e.Db&1)&&(i=new Di(e,1,5,r,e.a),t?Uee(t,i):t=i),t}function Za(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,2,t,n))}function MZ(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,8,t,n))}function lS(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,8,t,n))}function eh(e,n){var t;t=(e.Bb&512)!=0,n?e.Bb|=512:e.Bb&=-513,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,3,t,n))}function SZ(e,n){var t;t=(e.Bb&512)!=0,n?e.Bb|=512:e.Bb&=-513,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,9,t,n))}function b6(e,n){var t;return e.b==-1&&e.a&&(t=e.a.Gj(),e.b=t?e.c.Xg(e.a.aj(),t):Kt(e.c.Tg(),e.a)),e.c.Og(e.b,n)}function le(e){var n,t;return e>-129&&e<128?(n=e+128,t=(GSe(),Lue)[n],!t&&(t=Lue[n]=new Az(e)),t):new Az(e)}function Wv(e){var n,t;return e>-129&&e<128?(n=e+128,t=(QSe(),Bue)[n],!t&&(t=Bue[n]=new Iz(e)),t):new Iz(e)}function PZ(e){var n,t;return n=e.k,n==(dn(),fi)?(t=u(M(e,(re(),Tc)),61),t==(ae(),tn)||t==On):!1}function s6n(e,n,t){var i,r,c;return c=(r=a3(e.b,n),r),c&&(i=u(hP(d7(e,c),""),26),i)?Wne(e,i,n,t):null}function tN(e,n,t){var i,r,c;return c=(r=a3(e.b,n),r),c&&(i=u(hP(d7(e,c),""),26),i)?Xne(e,i,n,t):null}function WFe(e,n){var t,i;for(i=new jn(e);i.e!=i.i.gc();)if(t=u(Sn(i),138),X(n)===X(t))return!0;return!1}function w6(e,n,t){var i;if(i=e.gc(),n>i)throw I(new Kb(n,i));if(e.hi()&&e.Hc(t))throw I(new rn(Vk));e.Xh(n,t)}function o6n(e,n){var t;if(t=xg(e.i,n),t==null)throw I(new ol("Node did not exist in input."));return BJ(n,t),null}function f6n(e,n){var t;if(t=ok(e,n),_(t,322))return u(t,34);throw I(new rn(o1+n+"' is not a valid attribute"))}function l6n(e,n,t){var i,r;for(r=_(n,99)&&u(n,18).Bb&yr?new d$(n,e):new Bv(n,e),i=0;in?1:e==n?e==0?gi(1/e,1/n):0:isNaN(e)?isNaN(n)?0:1:-1}function v6n(e,n){In(n,"Sort end labels",1),ti(Lt(ac(new We(null,new Ye(e.b,16)),new gge),new pge),new mge),Tn(n)}function g6(e,n,t){var i,r;return e.ej()?(r=e.fj(),i=f_(e,n,t),e.$i(e.Zi(7,le(t),i,n,r)),i):f_(e,n,t)}function iN(e,n){var t,i,r;e.d==null?(++e.e,--e.f):(r=n.cd(),t=n.Sh(),i=(t&vt)%e.d.length,tvn(e,i,hKe(e,i,t,r)))}function Xv(e,n){var t;t=(e.Bb&ef)!=0,n?e.Bb|=ef:e.Bb&=-1025,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,10,t,n))}function Yv(e,n){var t;t=(e.Bb&jw)!=0,n?e.Bb|=jw:e.Bb&=-4097,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,12,t,n))}function Qv(e,n){var t;t=(e.Bb&Vu)!=0,n?e.Bb|=Vu:e.Bb&=-8193,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,15,t,n))}function Jv(e,n){var t;t=(e.Bb&xw)!=0,n?e.Bb|=xw:e.Bb&=-2049,e.Db&4&&!(e.Db&1)&&yt(e,new Xo(e,1,11,t,n))}function y6n(e,n){var t;return t=gi(e.b.c,n.b.c),t!=0||(t=gi(e.a.a,n.a.a),t!=0)?t:gi(e.a.b,n.a.b)}function k6n(e,n){var t;if(t=kn(e.k,n),t==null)throw I(new ol("Port did not exist in input."));return BJ(n,t),null}function j6n(e){var n,t;for(t=pKe(xs(e)).Kc();t.Ob();)if(n=Vn(t.Pb()),L6(e,n))return xmn((MEe(),Urn),n);return null}function E6n(e,n){var t,i,r,c,o;for(o=hu(e.e.Tg(),n),c=0,t=u(e.g,119),r=0;r>10)+Sk&si,n[1]=(e&1023)+56320&si,mo(n,0,n.length)}function hS(e){var n,t;return t=u(M(e,(be(),Bs)),103),t==(Ar(),ea)?(n=ne(he(M(e,Lx))),n>=1?cf:Oa):t}function M6n(e){switch(u(M(e,(be(),Ia)),218).g){case 1:return new ime;case 3:return new ome;default:return new tme}}function ud(e){if(e.c)ud(e.c);else if(e.d)throw I(new ec("Stream already terminated, can't be modified or used"))}function uN(e){var n;return e.Db&64?Jo(e):(n=new bo(Jo(e)),n.a+=" (identifier: ",Lr(n,e.k),n.a+=")",n.a)}function JFe(e,n,t){var i,r;return i=(Jd(),r=new _E,r),FM(i,n),NM(i,t),e&&Bn((!e.a&&(e.a=new bi(Do,e,5)),e.a),i),i}function sN(e,n,t,i){var r,c;return nn(i),nn(t),r=e.xc(n),c=r==null?t:dEe(u(r,15),u(t,14)),c==null?e.Bc(n):e.zc(n,c),c}function _e(e){var n,t,i,r;return t=(n=u(df((i=e.gm,r=i.f,r==Xn?i:r)),9),new Ws(n,u(Go(n,n.length),9),0)),Qo(t,e),t}function S6n(e,n,t){var i,r;for(r=e.a.ec().Kc();r.Ob();)if(i=u(r.Pb(),10),C7(t,u(ve(n,i.p),14)))return i;return null}function P6n(e,n,t){var i;try{o5n(e,n,t)}catch(r){throw r=qt(r),_(r,597)?(i=r,I(new FQ(i))):I(r)}return n}function Qh(e,n){var t;return nc(e)&&nc(n)&&(t=e-n,Mk>1,e.k=t-1>>1}function oN(){Zee();var e,n,t;t=TDn+++Date.now(),e=ci(y.Math.floor(t*Ak))&TP,n=ci(t-e*bie),this.a=e^1502,this.b=n^DB}function ja(e){var n,t,i;for(n=new oe,i=new A(e.j);i.a34028234663852886e22?Jt:n<-34028234663852886e22?hi:n}function ZFe(e){return e-=e>>1&1431655765,e=(e>>2&858993459)+(e&858993459),e=(e>>4)+e&252645135,e+=e>>8,e+=e>>16,e&63}function eNe(e){var n,t,i,r;for(n=new $Me(e.Hd().gc()),r=0,i=S2(e.Hd().Kc());i.Ob();)t=i.Pb(),Hpn(n,t,le(r++));return bjn(n.a)}function $6n(e,n){var t,i,r;for(r=new Ln,i=n.vc().Kc();i.Ob();)t=u(i.Pb(),42),jt(r,t.cd(),C4n(e,u(t.dd(),15)));return r}function $Z(e,n){e.n.c.length==0&&se(e.n,new nM(e.s,e.t,e.i)),se(e.b,n),gee(u(ve(e.n,e.n.c.length-1),211),n),lHe(e,n)}function Ng(e){return(e.c!=e.b.b||e.i!=e.g.b)&&(e.a.c=V(pn,pe,1,0,5,1),wi(e.a,e.b),wi(e.a,e.g),e.c=e.b.b,e.i=e.g.b),e.a}function fN(e,n){var t,i,r;for(r=0,i=u(n.Kb(e),20).Kc();i.Ob();)t=u(i.Pb(),17),ke(ye(M(t,(re(),Qf))))||++r;return r}function L6n(e,n){var t,i,r;i=Pg(n),r=ne(he(uw(i,(be(),rf)))),t=y.Math.max(0,r/2-.5),T6(n,t,1),se(e,new zEe(n,t))}function to(){to=U,vj=new v8(Aa,0),Fy=new v8("FIRST",1),b1=new v8(oze,2),Ny=new v8("LAST",3),_w=new v8(fze,4)}function Ea(){Ea=U,LV=new NT(X6,0),Vj=new NT("POLYLINE",1),k4=new NT("ORTHOGONAL",2),jm=new NT("SPLINES",3)}function dS(){dS=U,lhe=new u$("ASPECT_RATIO_DRIVEN",0),sV=new u$("MAX_SCALE_DRIVEN",1),fhe=new u$("AREA_DRIVEN",2)}function _7(){_7=U,pI=new s$("P1_STRUCTURE",0),mI=new s$("P2_PROCESSING_ORDER",1),vI=new s$("P3_EXECUTION",2)}function bS(){bS=U,nV=new i$("OVERLAP_REMOVAL",0),ZH=new i$("COMPACTION",1),eV=new i$("GRAPH_SIZE_CALCULATION",2)}function I0(e,n){return If(),Yo(i1),y.Math.abs(e-n)<=i1||e==n||isNaN(e)&&isNaN(n)?0:en?1:i0(isNaN(e),isNaN(n))}function nNe(e,n){var t,i;for(t=ct(e,0);t.b!=t.d.c;){if(i=r8(he(rt(t))),i==n)return;if(i>n){HL(t);break}}V8(t,n)}function Ne(e,n){var t,i,r,c,o;if(t=n.f,od(e.c.d,t,n),n.g!=null)for(r=n.g,c=0,o=r.length;cn&&i.ue(e[c-1],e[c])>0;--c)o=e[c],zt(e,c,e[c-1]),zt(e,c-1,o)}function io(e,n,t,i){if(n<0)Zne(e,t,i);else{if(!t.Ij())throw I(new rn(o1+t.ne()+fy));u(t,66).Nj().Tj(e,e.yh(),n,i)}}function wS(e,n){if(n==e.d)return e.e;if(n==e.e)return e.d;throw I(new rn("Node "+n+" not part of edge "+e))}function N6n(e,n){switch(n.g){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function tNe(e,n){switch(n.g){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function LZ(e,n,t,i){switch(n){case 3:return e.f;case 4:return e.g;case 5:return e.i;case 6:return e.j}return CZ(e,n,t,i)}function _6n(e){return e.k!=(dn(),vi)?!1:kv(new We(null,new l0(new En(Cn(pi(e).a.Kc(),new J)))),new V2e)}function B6n(e){return e.e==null?e:(!e.c&&(e.c=new j_((e.f&256)!=0,e.i,e.a,e.d,(e.f&16)!=0,e.j,e.g,null)),e.c)}function R6n(e,n){return e.h==Ck&&e.m==0&&e.l==0?(n&&(f1=fu(0,0,0)),iCe((Sv(),Aue))):(n&&(f1=fu(e.l,e.m,e.h)),fu(0,0,0))}function rc(e){var n;return Array.isArray(e)&&e.im===ai?xh(is(e))+"@"+(n=Bt(e)>>>0,n.toString(16)):e.toString()}function p6(e){var n;this.a=(n=u(e.e&&e.e(),9),new Ws(n,u(Go(n,n.length),9),0)),this.b=V(pn,pe,1,this.a.a.length,5,1)}function K6n(e){var n,t,i;for(this.a=new fa,i=new A(e);i.a0&&(Gn(n-1,e.length),e.charCodeAt(n-1)==58)&&!lN(e,y9,k9))}function lN(e,n,t){var i,r;for(i=0,r=e.length;i=r)return n.c+t;return n.c+n.b.gc()}function z6n(e,n){cv();var t,i,r,c;for(i=gDe(e),r=n,Cv(i,0,i.length,r),t=0;t0&&(i+=r,++t);return t>1&&(i+=e.d*(t-1)),i}function NZ(e){var n,t,i;for(i=new Ra,i.a+="[",n=0,t=e.gc();n0&&this.b>0&&mY(this.c,this.b,this.a)}function RZ(e){hN(),this.c=Nf(D(O(qDn,1),pe,831,0,[_en])),this.b=new Ln,this.a=e,jt(this.b,Yx,1),Tu(Ben,new G8e(this))}function iNe(e,n){var t;return e.d?vs(e.b,n)?u(kn(e.b,n),51):(t=n.Kf(),jt(e.b,n,t),t):n.Kf()}function KZ(e,n){var t;return X(e)===X(n)?!0:_(n,91)?(t=u(n,91),e.e==t.e&&e.d==t.d&&Omn(e,t.a)):!1}function O2(e){switch(ae(),e.g){case 4:return tn;case 1:return hn;case 3:return On;case 2:return un;default:return gc}}function qZ(e,n){switch(n){case 3:return e.f!=0;case 4:return e.g!=0;case 5:return e.i!=0;case 6:return e.j!=0}return KJ(e,n)}function J6n(e){switch(e.g){case 0:return new _ve;case 1:return new Bve;default:throw I(new rn(qR+(e.f!=null?e.f:""+e.g)))}}function rNe(e){switch(e.g){case 0:return new Nve;case 1:return new Rve;default:throw I(new rn(rR+(e.f!=null?e.f:""+e.g)))}}function cNe(e){switch(e.g){case 0:return new yU;case 1:return new gke;default:throw I(new rn(rA+(e.f!=null?e.f:""+e.g)))}}function Z6n(e){switch(e.g){case 1:return new Ive;case 2:return new jMe;default:throw I(new rn(qR+(e.f!=null?e.f:""+e.g)))}}function eyn(e){var n,t;if(e.b)return e.b;for(t=Xf?null:e.d;t;){if(n=Xf?null:t.b,n)return n;t=Xf?null:t.d}return Jm(),cse}function nyn(e){var n,t,i;return e.e==0?0:(n=e.d<<5,t=e.a[e.d-1],e.e<0&&(i=wLe(e),i==e.d-1&&(--t,t=t|0)),n-=rk(t),n)}function tyn(e){var n,t,i;return e<$A.length?$A[e]:(t=e>>5,n=e&31,i=V($n,nt,25,t+1,15,1),i[t]=1<3;)r*=10,--c;e=(e+(r>>1))/r|0}return i.i=e,!0}function ryn(e){return JF(),cn(),!!(tNe(u(e.a,81).j,u(e.b,103))||u(e.a,81).d.e!=0&&tNe(u(e.a,81).j,u(e.b,103)))}function cyn(e){jM(),u(e.We((ht(),v1)),174).Hc((us(),FI))&&(u(e.We(Yw),174).Fc((Yu(),Em)),u(e.We(v1),174).Mc(FI))}function sNe(e,n){var t,i;if(n){for(t=0;t=0;--i)for(n=t[i],r=0;r>1,this.k=n-1>>1}function ayn(e,n){In(n,"End label post-processing",1),ti(Lt(ac(new We(null,new Ye(e.b,16)),new oge),new fge),new lge),Tn(n)}function hyn(e,n,t){var i,r;return i=ne(e.p[n.i.p])+ne(e.d[n.i.p])+n.n.b+n.a.b,r=ne(e.p[t.i.p])+ne(e.d[t.i.p])+t.n.b+t.a.b,r-i}function dyn(e,n,t){var i,r;for(i=ji(t,Ir),r=0;$c(i,0)!=0&&r0&&(Gn(0,n.length),n.charCodeAt(0)==43)?n.substr(1):n))}function wyn(e){var n;return e==null?null:new Fh((n=Wc(e,!0),n.length>0&&(Gn(0,n.length),n.charCodeAt(0)==43)?n.substr(1):n))}function XZ(e,n){var t;return e.i>0&&(n.lengthe.i&&zt(n,e.i,null),n}function ru(e,n,t){var i,r,c;return e.ej()?(i=e.i,c=e.fj(),L7(e,i,n),r=e.Zi(3,null,n,i,c),t?t.Ei(r):t=r):L7(e,e.i,n),t}function gyn(e,n,t){var i,r;return i=new pa(e.e,4,10,(r=n.c,_(r,88)?u(r,26):(Ke(),No)),null,nh(e,n),!1),t?t.Ei(i):t=i,t}function pyn(e,n,t){var i,r;return i=new pa(e.e,3,10,null,(r=n.c,_(r,88)?u(r,26):(Ke(),No)),nh(e,n),!1),t?t.Ei(i):t=i,t}function lNe(e){Bb();var n;return n=new Kr(u(e.e.We((ht(),Fp)),8)),e.B.Hc((us(),E4))&&(n.a<=0&&(n.a=20),n.b<=0&&(n.b=20)),n}function aNe(e){sw();var n;return(e.q?e.q:(He(),He(),Jl))._b((be(),ob))?n=u(M(e,ob),197):n=u(M(ar(e),Ky),197),n}function uw(e,n){var t,i;return i=null,Ai(e,(be(),Wx))&&(t=u(M(e,Wx),94),t.Xe(n)&&(i=t.We(n))),i==null&&(i=M(ar(e),n)),i}function hNe(e,n){var t,i,r;return _(n,42)?(t=u(n,42),i=t.cd(),r=rw(e.Rc(),i),bl(r,t.dd())&&(r!=null||e.Rc()._b(i))):!1}function bN(e,n){var t,i,r;return e.f>0?(e.qj(),i=n==null?0:Bt(n),r=(i&vt)%e.d.length,t=hKe(e,r,i,n),t!=-1):!1}function vf(e,n){var t,i,r;return e.f>0&&(e.qj(),i=n==null?0:Bt(n),r=(i&vt)%e.d.length,t=Dne(e,r,i,n),t)?t.dd():null}function B7(e,n){var t,i,r,c;for(c=hu(e.e.Tg(),n),t=u(e.g,119),r=0;r1?Ff(aa(n.a[1],32),ji(n.a[0],Ir)):ji(n.a[0],Ir),v0(ir(n.e,t))))}function R7(e,n){var t;return nc(e)&&nc(n)&&(t=e%n,Mk>5,n&=31,r=e.d+t+(n==0?0:1),i=V($n,nt,25,r,15,1),mkn(i,e.a,t,n),c=new Tg(e.e,r,i),X5(c),c}function QZ(e,n,t){var i,r;i=u(Vc(M4,n),117),r=u(Vc(S9,n),117),t?(qr(M4,e,i),qr(S9,e,r)):(qr(S9,e,i),qr(M4,e,r))}function vNe(e,n,t){var i,r,c;for(r=null,c=e.b;c;){if(i=e.a.ue(n,c.d),t&&i==0)return c;i>=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function yNe(e,n,t){var i,r,c;for(r=null,c=e.b;c;){if(i=e.a.ue(n,c.d),t&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function jyn(e,n,t,i){var r,c,o;return r=!1,iIn(e.f,t,i)&&(Uyn(e.f,e.a[n][t],e.a[n][i]),c=e.a[n],o=c[i],c[i]=c[t],c[t]=o,r=!0),r}function JZ(e,n,t,i,r){var c,o,f;for(o=r;n.b!=n.c;)c=u(w2(n),10),f=u(dc(c,i).Xb(0),11),e.d[f.p]=o++,t.c[t.c.length]=f;return o}function ZZ(e,n,t){var i,r,c,o,f;return o=e.k,f=n.k,i=t[o.g][f.g],r=he(uw(e,i)),c=he(uw(n,i)),y.Math.max((nn(r),r),(nn(c),c))}function Eyn(e,n,t){var i,r,c,o;for(i=t/e.c.length,r=0,o=new A(e);o.a2e3&&(pXe=e,IA=y.setTimeout(xan,10))),xA++==0?(r3n((CU(),Mue)),!0):!1}function Cyn(e,n){var t,i,r;for(i=new En(Cn(pi(e).a.Kc(),new J));Un(i);)if(t=u(_n(i),17),r=t.d.i,r.c==n)return!1;return!0}function eee(e,n){var t,i;if(_(n,245)){i=u(n,245);try{return t=e.vd(i),t==0}catch(r){if(r=qt(r),!_(r,205))throw I(r)}}return!1}function Myn(){return Error.stackTraceLimit>0?(y.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function Syn(e,n){return If(),If(),Yo(i1),(y.Math.abs(e-n)<=i1||e==n||isNaN(e)&&isNaN(n)?0:en?1:i0(isNaN(e),isNaN(n)))>0}function nee(e,n){return If(),If(),Yo(i1),(y.Math.abs(e-n)<=i1||e==n||isNaN(e)&&isNaN(n)?0:en?1:i0(isNaN(e),isNaN(n)))<0}function ENe(e,n){return If(),If(),Yo(i1),(y.Math.abs(e-n)<=i1||e==n||isNaN(e)&&isNaN(n)?0:en?1:i0(isNaN(e),isNaN(n)))<=0}function gN(e,n){for(var t=0;!n[t]||n[t]=="";)t++;for(var i=n[t++];tPB)return t.fh();if(i=t.Zg(),i||t==e)break}return i}function tee(e){return iM(),_(e,156)?u(kn(tE,AXe),288).vg(e):vs(tE,is(e))?u(kn(tE,is(e)),288).vg(e):null}function Ayn(e){if(jS(L3,e))return cn(),q3;if(jS(eK,e))return cn(),Td;throw I(new rn("Expecting true or false"))}function xyn(e,n){if(n.c==e)return n.d;if(n.d==e)return n.c;throw I(new rn("Input edge is not connected to the input port."))}function ANe(e,n){return e.e>n.e?1:e.en.d?e.e:e.d=48&&e<48+y.Math.min(10,10)?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function INe(e,n){var t;return X(n)===X(e)?!0:!_(n,21)||(t=u(n,21),t.gc()!=e.gc())?!1:e.Ic(t)}function Iyn(e,n){var t,i,r,c;return i=e.a.length-1,t=n-e.b&i,c=e.c-n&i,r=e.c-e.b&i,sMe(t=c?(x5n(e,n),-1):(I5n(e,n),1)}function Oyn(e,n){var t,i;for(t=(Gn(n,e.length),e.charCodeAt(n)),i=n+1;in.e?1:e.fn.f?1:Bt(e)-Bt(n)}function jS(e,n){return nn(e),n==null?!1:Re(e,n)?!0:e.length==n.length&&Re(e.toLowerCase(),n.toLowerCase())}function Kyn(e,n){var t,i,r,c;for(i=0,r=n.gc();i0&&$c(e,128)<0?(n=Fn(e)+128,t=(YSe(),Fue)[n],!t&&(t=Fue[n]=new xz(e)),t):new xz(e)}function DNe(e,n){var t,i;return t=n.Hh(e.a),t&&(i=Vn(vf((!t.b&&(t.b=new ps((Ke(),jr),Cc,t)),t.b),at)),i!=null)?i:n.ne()}function qyn(e,n){var t,i;return t=n.Hh(e.a),t&&(i=Vn(vf((!t.b&&(t.b=new ps((Ke(),jr),Cc,t)),t.b),at)),i!=null)?i:n.ne()}function Hyn(e,n){FL();var t,i;for(i=new En(Cn(ja(e).a.Kc(),new J));Un(i);)if(t=u(_n(i),17),t.d.i==n||t.c.i==n)return t;return null}function cee(e,n,t){this.c=e,this.f=new oe,this.e=new tr,this.j=new bY,this.n=new bY,this.b=n,this.g=new Xs(n.c,n.d,n.b,n.a),this.a=t}function pN(e){var n,t,i,r;for(this.a=new fa,this.d=new Si,this.e=0,t=e,i=0,r=t.length;i0):!1}function FNe(e){var n;X(Te(e,(ht(),Dp)))===X((ka(),OI))&&(Ut(e)?(n=u(Te(Ut(e),Dp),334),_r(e,Dp,n)):_r(e,Dp,a9))}function Uyn(e,n,t){var i,r;JN(e.e,n,t,(ae(),un)),JN(e.i,n,t,hn),e.a&&(r=u(M(n,(re(),Et)),11),i=u(M(t,Et),11),qL(e.g,r,i))}function NNe(e,n,t){var i,r,c;i=n.c.p,c=n.p,e.b[i][c]=new exe(e,n),t&&(e.a[i][c]=new s8e(n),r=u(M(n,(re(),cb)),10),r&&Be(e.d,r,n))}function _Ne(e,n){var t,i,r;if(se(GA,e),n.Fc(e),t=u(kn(fq,e),21),t)for(r=t.Kc();r.Ob();)i=u(r.Pb(),33),tc(GA,i,0)!=-1||_Ne(i,n)}function Wyn(e,n,t){var i;(FXe?(eyn(e),!0):NXe||BXe?(Jm(),!0):_Xe&&(Jm(),!1))&&(i=new hSe(n),i.b=t,Qkn(e,i))}function mN(e,n){var t;t=!e.A.Hc((Es(),_d))||e.q==(Hi(),Zc),e.u.Hc((Yu(),La))?t?gOn(e,n):bVe(e,n):e.u.Hc(E1)&&(t?LIn(e,n):PVe(e,n))}function n3(e,n){var t,i;if(++e.j,n!=null&&(t=(i=e.a.Cb,_(i,97)?u(i,97).Jg():null),HEn(n,t))){D2(e.a,4,t);return}D2(e.a,4,u(n,126))}function BNe(e,n,t){return new Xs(y.Math.min(e.a,n.a)-t/2,y.Math.min(e.b,n.b)-t/2,y.Math.abs(e.a-n.a)+t,y.Math.abs(e.b-n.b)+t)}function Xyn(e,n){var t,i;return t=mu(e.a.c.p,n.a.c.p),t!=0?t:(i=mu(e.a.d.i.p,n.a.d.i.p),i!=0?i:mu(n.a.d.p,e.a.d.p))}function Yyn(e,n,t){var i,r,c,o;return c=n.j,o=t.j,c!=o?c.g-o.g:(i=e.f[n.p],r=e.f[t.p],i==0&&r==0?0:i==0?-1:r==0?1:gi(i,r))}function RNe(e,n,t){var i,r,c;if(!t[n.d])for(t[n.d]=!0,r=new A(Ng(n));r.a=r)return r;for(n=n>0?n:0;ni&&zt(n,i,null),n}function qNe(e,n){var t,i;for(i=e.a.length,n.lengthi&&zt(n,i,null),n}function od(e,n,t){var i,r,c;return r=u(kn(e.e,n),387),r?(c=AX(r,t),DCe(e,r),c):(i=new tY(e,n,t),jt(e.e,n,i),cxe(i),null)}function Zyn(e){var n;if(e==null)return null;if(n=UTn(Wc(e,!0)),n==null)throw I(new MD("Invalid hexBinary value: '"+e+"'"));return n}function q7(e){return n1(),$c(e,0)<0?$c(e,-1)!=0?new Vee(-1,Mv(e)):UK:$c(e,10)<=0?Wue[Fn(e)]:new Vee(1,e)}function yN(){return mP(),D(O(EYe,1),ce,159,0,[kYe,yYe,jYe,hYe,aYe,dYe,gYe,wYe,bYe,vYe,mYe,pYe,fYe,oYe,lYe,uYe,cYe,sYe,iYe,tYe,rYe,tq])}function HNe(e){var n;this.d=new oe,this.j=new tr,this.g=new tr,n=e.g.b,this.f=u(M(ar(n),(be(),Bs)),103),this.e=ne(he(CS(n,zw)))}function VNe(e){this.b=new oe,this.e=new oe,this.d=e,this.a=!n5(Lt(new We(null,new l0(new _f(e.b))),new q4(new G2e))).sd((R1(),z3))}function yf(){yf=U,an=new j8("PARENTS",0),Li=new j8("NODES",1),Dl=new j8("EDGES",2),Dd=new j8("PORTS",3),wh=new j8("LABELS",4)}function _g(){_g=U,k1=new T8("DISTRIBUTED",0),Uj=new T8("JUSTIFIED",1),nde=new T8("BEGIN",2),h9=new T8(S3,3),tde=new T8("END",4)}function e9n(e){var n;switch(n=e.yi(null),n){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function kN(e){switch(e.g){case 1:return Ar(),Da;case 4:return Ar(),Ao;case 2:return Ar(),cf;case 3:return Ar(),Oa}return Ar(),ea}function n9n(e,n,t){var i;switch(i=t.q.getFullYear()-r1+r1,i<0&&(i=-i),n){case 1:e.a+=i;break;case 2:ql(e,i%100,2);break;default:ql(e,i,n)}}function ct(e,n){var t,i;if(Wb(n,e.b),n>=e.b>>1)for(i=e.c,t=e.b;t>n;--t)i=i.b;else for(i=e.a.a,t=0;t=64&&n<128&&(r=Ff(r,aa(1,n-64)));return r}function CS(e,n){var t,i;return i=null,Ai(e,(ht(),km))&&(t=u(M(e,km),94),t.Xe(n)&&(i=t.We(n))),i==null&&ar(e)&&(i=M(ar(e),n)),i}function UNe(e,n){var t,i,r;r=n.d.i,i=r.k,!(i==(dn(),vi)||i==Yf)&&(t=new En(Cn(pi(r).a.Kc(),new J)),Un(t)&&jt(e.k,n,u(_n(t),17)))}function jN(e,n){var t,i,r;return i=Ge(e.Tg(),n),t=n-e.Ah(),t<0?(r=e.Yg(i),r>=0?e.lh(r):o_(e,i)):t<0?o_(e,i):u(i,66).Nj().Sj(e,e.yh(),t)}function me(e){var n;if(_(e.a,4)){if(n=tee(e.a),n==null)throw I(new ec(Vze+e.b+"'. "+Hze+(la(iE),iE.k)+Fce));return n}else return e.a}function r9n(e){var n;if(e==null)return null;if(n=TOn(Wc(e,!0)),n==null)throw I(new MD("Invalid base64Binary value: '"+e+"'"));return n}function Sn(e){var n;try{return n=e.i.Xb(e.e),e.mj(),e.g=e.e++,n}catch(t){throw t=qt(t),_(t,73)?(e.mj(),I(new Sc)):I(t)}}function EN(e){var n;try{return n=e.c.ki(e.e),e.mj(),e.g=e.e++,n}catch(t){throw t=qt(t),_(t,73)?(e.mj(),I(new Sc)):I(t)}}function y6(){y6=U,_se=(ht(),$1e),sq=h1e,FYe=vm,Nse=Ld,RYe=(NS(),gse),BYe=bse,KYe=mse,_Ye=dse,NYe=(WF(),$se),uq=DYe,Fse=$Ye,VA=LYe}function MS(e){switch(GU(),this.c=new oe,this.d=e,e.g){case 0:case 2:this.a=ZY(toe),this.b=Jt;break;case 3:case 1:this.a=toe,this.b=hi}}function WNe(e,n,t){var i,r;if(e.c)Cu(e.c,e.c.i+n),Mu(e.c,e.c.j+t);else for(r=new A(e.b);r.a0&&(se(e.b,new PSe(n.a,t)),i=n.a.length,0i&&(n.a+=OCe(V(lo,vl,25,-i,15,1))))}function XNe(e,n){var t,i,r;for(t=e.o,r=u(u(Tt(e.r,n),21),84).Kc();r.Ob();)i=u(r.Pb(),111),i.e.a=s8n(i,t.a),i.e.b=t.b*ne(he(i.b.We(KA)))}function u9n(e,n){var t,i,r,c;return r=e.k,t=ne(he(M(e,(re(),ub)))),c=n.k,i=ne(he(M(n,ub))),c!=(dn(),fi)?-1:r!=fi?1:t==i?0:t=0?e.hh(n,t,i):(e.eh()&&(i=(r=e.Vg(),r>=0?e.Qg(i):e.eh().ih(e,-1-r,null,i))),e.Sg(n,t,i))}function see(e,n){switch(n){case 7:!e.e&&(e.e=new Xe(Ii,e,7,4)),Dn(e.e);return;case 8:!e.d&&(e.d=new Xe(Ii,e,8,5)),Dn(e.d);return}UZ(e,n)}function kf(e,n){var t;t=e.Zc(n);try{return t.Pb()}catch(i){throw i=qt(i),_(i,109)?I(new Rr("Can't get element "+n)):I(i)}}function oee(e,n){this.e=e,n=0&&(t.d=e.t);break;case 3:e.t>=0&&(t.a=e.t)}e.C&&(t.b=e.C.b,t.c=e.C.c)}function L2(){L2=U,tj=new AT(SP,0),nj=new AT(qB,1),ij=new AT(HB,2),rj=new AT(VB,3),tj.a=!1,nj.a=!0,ij.a=!1,rj.a=!0}function k6(){k6=U,cj=new PT(SP,0),qA=new PT(qB,1),HA=new PT(HB,2),uj=new PT(VB,3),cj.a=!1,qA.a=!0,HA.a=!1,uj.a=!0}function a9n(e){var n;n=e.a;do n=u(_n(new En(Cn(ic(n).a.Kc(),new J))),17).c.i,n.k==(dn(),$i)&&e.b.Fc(n);while(n.k==(dn(),$i));e.b=Z1(e.b)}function h9n(e){var n,t,i;for(i=e.c.a,e.p=(Nn(i),new _u(i)),t=new A(i);t.at.b)return!0}return!1}function TN(e,n){return Ni(e)?!!lXe[n]:e.hm?!!e.hm[n]:Fb(e)?!!fXe[n]:Lb(e)?!!oXe[n]:!1}function _r(e,n,t){return t==null?(!e.o&&(e.o=new ks((cu(),C1),bb,e,0)),yS(e.o,n)):(!e.o&&(e.o=new ks((cu(),C1),bb,e,0)),_S(e.o,n,t)),e}function g9n(e,n,t,i){var r,c;c=n.Xe((ht(),Lp))?u(n.We(Lp),21):e.j,r=c6n(c),r!=(mP(),tq)&&(t&&!iee(r)||dne(WTn(e,r,i),n))}function PS(e,n,t,i){var r,c,o;return c=Ge(e.Tg(),n),r=n-e.Ah(),r<0?(o=e.Yg(c),o>=0?e._g(o,t,!0):_0(e,c,t)):u(c,66).Nj().Pj(e,e.yh(),r,t,i)}function p9n(e,n,t,i){var r,c,o;t.mh(n)&&(Er(),gF(n)?(r=u(t.ah(n),153),Kyn(e,r)):(c=(o=n,o?u(i,49).xh(o):null),c&&vln(t.ah(n),c)))}function m9n(e){switch(e.g){case 1:return P0(),ej;case 3:return P0(),Zk;case 2:return P0(),rq;case 4:return P0(),iq;default:return null}}function fee(e){switch(typeof e){case eB:return th(e);case cie:return ci(e);case q2:return cn(),e?1231:1237;default:return e==null?0:c0(e)}}function v9n(e,n,t){if(e.e)switch(e.b){case 1:Wgn(e.c,n,t);break;case 0:Xgn(e.c,n,t)}else NIe(e.c,n,t);e.a[n.p][t.p]=e.c.i,e.a[t.p][n.p]=e.c.e}function e_e(e){var n,t;if(e==null)return null;for(t=V(Zl,ie,193,e.length,0,2),n=0;n=0)return r;if(e.Fk()){for(i=0;i=r)throw I(new Kb(n,r));if(e.hi()&&(i=e.Xc(t),i>=0&&i!=n))throw I(new rn(Vk));return e.mi(n,t)}function lee(e,n){if(this.a=u(Nn(e),245),this.b=u(Nn(n),245),e.vd(n)>0||e==(yD(),FK)||n==(vD(),NK))throw I(new rn("Invalid range: "+DIe(e,n)))}function n_e(e){var n,t;for(this.b=new oe,this.c=e,this.a=!1,t=new A(e.a);t.a0),(n&-n)==n)return ci(n*cs(e,31)*4656612873077393e-25);do t=cs(e,31),i=t%n;while(t-i+(n-1)<0);return ci(i)}function th(e){dSe();var n,t,i;return t=":"+e,i=_A[t],i!=null?ci((nn(i),i)):(i=sse[t],n=i==null?aMn(e):ci((nn(i),i)),Rgn(),_A[t]=n,n)}function i_e(e,n,t){In(t,"Compound graph preprocessor",1),e.a=new p0,fVe(e,n,null),JAn(e,n),$Cn(e),te(n,(re(),Mfe),e.a),e.a=null,Wu(e.b),Tn(t)}function j9n(e,n,t){switch(t.g){case 1:e.a=n.a/2,e.b=0;break;case 2:e.a=n.a,e.b=n.b/2;break;case 3:e.a=n.a/2,e.b=n.b;break;case 4:e.a=0,e.b=n.b/2}}function E9n(e){var n,t,i;for(i=u(Tt(e.a,(Vg(),yx)),15).Kc();i.Ob();)t=u(i.Pb(),101),n=Eee(t),av(e,t,n[0],(S0(),nb),0),av(e,t,n[1],tb,1)}function T9n(e){var n,t,i;for(i=u(Tt(e.a,(Vg(),kx)),15).Kc();i.Ob();)t=u(i.Pb(),101),n=Eee(t),av(e,t,n[0],(S0(),nb),0),av(e,t,n[1],tb,1)}function CN(e){switch(e.g){case 0:return null;case 1:return new iLe;case 2:return new kU;default:throw I(new rn(qR+(e.f!=null?e.f:""+e.g)))}}function H7(e,n,t){var i,r;for(z4n(e,n-e.s,t-e.t),r=new A(e.n);r.a1&&(c=k9n(e,n)),c}function MN(e){var n;return e.f&&e.f.kh()&&(n=u(e.f,49),e.f=u(Yh(e,n),82),e.f!=n&&e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,9,8,n,e.f))),e.f}function SN(e){var n;return e.i&&e.i.kh()&&(n=u(e.i,49),e.i=u(Yh(e,n),82),e.i!=n&&e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,9,7,n,e.i))),e.i}function Cr(e){var n;return e.b&&e.b.Db&64&&(n=e.b,e.b=u(Yh(e,n),18),e.b!=n&&e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,9,21,n,e.b))),e.b}function IS(e,n){var t,i,r;e.d==null?(++e.e,++e.f):(i=n.Sh(),KCn(e,e.f+1),r=(i&vt)%e.d.length,t=e.d[r],!t&&(t=e.d[r]=e.uj()),t.Fc(n),++e.f)}function dee(e,n,t){var i;return n.Kj()?!1:n.Zj()!=-2?(i=n.zj(),i==null?t==null:kt(i,t)):n.Hj()==e.e.Tg()&&t==null}function OS(){var e;Is(16,ZVe),e=W$e(16),this.b=V(BK,Ek,317,e,0,1),this.c=V(BK,Ek,317,e,0,1),this.a=null,this.e=null,this.i=0,this.f=e-1,this.g=0}function Ta(e){IX.call(this),this.k=(dn(),vi),this.j=(Is(6,kw),new tu(6)),this.b=(Is(2,kw),new tu(2)),this.d=new bD,this.f=new hU,this.a=e}function M9n(e){var n,t;e.c.length<=1||(n=nqe(e,(ae(),On)),HBe(e,u(n.a,19).a,u(n.b,19).a),t=nqe(e,un),HBe(e,u(t.a,19).a,u(t.b,19).a))}function j6(){j6=U,rae=new m8("SIMPLE",0),IH=new m8(uR,1),OH=new m8("LINEAR_SEGMENTS",2),Vy=new m8("BRANDES_KOEPF",3),Gy=new m8(Cze,4)}function bee(e,n,t){a2(u(M(n,(be(),ei)),98))||(oJ(e,n,ih(n,t)),oJ(e,n,ih(n,(ae(),On))),oJ(e,n,ih(n,tn)),He(),Oi(n.j,new c8e(e)))}function r_e(e,n,t,i){var r,c,o;for(r=u(Tt(i?e.a:e.b,n),21),o=r.Kc();o.Ob();)if(c=u(o.Pb(),33),tP(e,t,c))return!0;return!1}function PN(e){var n,t;for(t=new jn(e);t.e!=t.i.gc();)if(n=u(Sn(t),87),n.e||(!n.d&&(n.d=new bi($r,n,1)),n.d).i!=0)return!0;return!1}function AN(e){var n,t;for(t=new jn(e);t.e!=t.i.gc();)if(n=u(Sn(t),87),n.e||(!n.d&&(n.d=new bi($r,n,1)),n.d).i!=0)return!0;return!1}function S9n(e){var n,t,i;for(n=0,i=new A(e.c.a);i.a102?-1:e<=57?e-48:e<65?-1:e<=70?e-65+10:e<97?-1:e-97+10}function ON(e,n){if(e==null)throw I(new Zp("null key in entry: null="+n));if(n==null)throw I(new Zp("null value in entry: "+e+"=null"))}function P9n(e,n){for(var t,i;e.Ob();)if(!n.Ob()||(t=e.Pb(),i=n.Pb(),!(X(t)===X(i)||t!=null&&kt(t,i))))return!1;return!n.Ob()}function u_e(e,n){var t;return t=D(O(Ri,1),Br,25,15,[QF(e.a[0],n),QF(e.a[1],n),QF(e.a[2],n)]),e.d&&(t[0]=y.Math.max(t[0],t[2]),t[2]=t[0]),t}function s_e(e,n){var t;return t=D(O(Ri,1),Br,25,15,[sS(e.a[0],n),sS(e.a[1],n),sS(e.a[2],n)]),e.d&&(t[0]=y.Math.max(t[0],t[2]),t[2]=t[0]),t}function ld(){ld=U,Rq=new p8("GREEDY",0),ife=new p8(aze,1),Kq=new p8(uR,2),Iy=new p8("MODEL_ORDER",3),xy=new p8("GREEDY_MODEL_ORDER",4)}function o_e(e,n){var t,i,r;for(e.b[n.g]=1,i=ct(n.d,0);i.b!=i.d.c;)t=u(rt(i),188),r=t.c,e.b[r.g]==1?ut(e.a,t):e.b[r.g]==2?e.b[r.g]=1:o_e(e,r)}function A9n(e,n){var t,i,r;for(r=new tu(n.gc()),i=n.Kc();i.Ob();)t=u(i.Pb(),286),t.c==t.f?o3(e,t,t.c):Sjn(e,t)||(r.c[r.c.length]=t);return r}function x9n(e,n,t){var i,r,c,o,f;for(f=e.r+n,e.r+=n,e.d+=t,i=t/e.n.c.length,r=0,o=new A(e.n);o.ac&&zt(n,c,null),n}function V9n(e,n){var t,i;if(i=e.gc(),n==null){for(t=0;t0&&(l+=r),a[h]=o,o+=f*(l+i)}function g_e(e){var n,t,i;for(i=e.f,e.n=V(Ri,Br,25,i,15,1),e.d=V(Ri,Br,25,i,15,1),n=0;n0?e.c:0),++r;e.b=i,e.d=c}function Q9n(e,n){var t,i,r,c,o;for(i=0,r=0,t=0,o=new A(n);o.a0?e.g:0),++t;e.c=r,e.d=i}function k_e(e,n){var t;return t=D(O(Ri,1),Br,25,15,[hee(e,(mf(),jc),n),hee(e,su,n),hee(e,Ec,n)]),e.f&&(t[0]=y.Math.max(t[0],t[2]),t[2]=t[0]),t}function J9n(e,n,t){var i;try{cP(e,n+e.j,t+e.k,!1,!0)}catch(r){throw r=qt(r),_(r,73)?(i=r,I(new Rr(i.g+AP+n+vr+t+")."))):I(r)}}function Z9n(e,n,t){var i;try{cP(e,n+e.j,t+e.k,!0,!1)}catch(r){throw r=qt(r),_(r,73)?(i=r,I(new Rr(i.g+AP+n+vr+t+")."))):I(r)}}function j_e(e){var n;Ai(e,(be(),sb))&&(n=u(M(e,sb),21),n.Hc((bw(),uf))?(n.Mc(uf),n.Fc(sf)):n.Hc(sf)&&(n.Mc(sf),n.Fc(uf)))}function E_e(e){var n;Ai(e,(be(),sb))&&(n=u(M(e,sb),21),n.Hc((bw(),ff))?(n.Mc(ff),n.Fc(Io)):n.Hc(Io)&&(n.Mc(Io),n.Fc(ff)))}function e8n(e,n,t){In(t,"Self-Loop ordering",1),ti(yu(Lt(Lt(ac(new We(null,new Ye(n.b,16)),new Ipe),new Ope),new Dpe),new $pe),new D9e(e)),Tn(t)}function G7(e,n,t,i){var r,c;for(r=n;r0&&(r.b+=n),r}function LS(e,n){var t,i,r;for(r=new tr,i=e.Kc();i.Ob();)t=u(i.Pb(),37),$6(t,0,r.b),r.b+=t.f.b+n,r.a=y.Math.max(r.a,t.f.a);return r.a>0&&(r.a+=n),r}function C_e(e){var n,t,i;for(i=vt,t=new A(e.a);t.a>16==6?e.Cb.ih(e,5,Sf,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||e.zh()),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function c8n(e){pv();var n=e.e;if(n&&n.stack){var t=n.stack,i=n+`
+`;return t.substring(0,i.length)==i&&(t=t.substring(i.length)),t.split(`
+`)}return[]}function u8n(e){var n;return n=(q$e(),jXe),n[e>>>28]|n[e>>24&15]<<4|n[e>>20&15]<<8|n[e>>16&15]<<12|n[e>>12&15]<<16|n[e>>8&15]<<20|n[e>>4&15]<<24|n[e&15]<<28}function P_e(e){var n,t,i;e.b==e.c&&(i=e.a.length,t=eZ(y.Math.max(8,i))<<1,e.b!=0?(n=Go(e.a,t),Y$e(e,n,i),e.a=n,e.b=0):X7e(e.a,t),e.c=i)}function s8n(e,n){var t;return t=e.b,t.Xe((ht(),fs))?t.Hf()==(ae(),un)?-t.rf().a-ne(he(t.We(fs))):n+ne(he(t.We(fs))):t.Hf()==(ae(),un)?-t.rf().a:n}function z7(e){var n;return e.b.c.length!=0&&u(ve(e.b,0),70).a?u(ve(e.b,0),70).a:(n=TL(e),n??""+(e.c?tc(e.c.a,e,0):-1))}function FS(e){var n;return e.f.c.length!=0&&u(ve(e.f,0),70).a?u(ve(e.f,0),70).a:(n=TL(e),n??""+(e.i?tc(e.i.j,e,0):-1))}function o8n(e,n){var t,i;if(n<0||n>=e.gc())return null;for(t=n;t0?e.c:0),r=y.Math.max(r,n.d),++i;e.e=c,e.b=r}function l8n(e){var n,t;if(!e.b)for(e.b=fM(u(e.f,118).Ag().i),t=new jn(u(e.f,118).Ag());t.e!=t.i.gc();)n=u(Sn(t),137),se(e.b,new CD(n));return e.b}function a8n(e,n){var t,i,r;if(n.dc())return cv(),cv(),rE;for(t=new IMe(e,n.gc()),r=new jn(e);r.e!=r.i.gc();)i=Sn(r),n.Hc(i)&&Bn(t,i);return t}function kee(e,n,t,i){return n==0?i?(!e.o&&(e.o=new ks((cu(),C1),bb,e,0)),e.o):(!e.o&&(e.o=new ks((cu(),C1),bb,e,0)),u7(e.o)):PS(e,n,t,i)}function RN(e){var n,t;if(e.rb)for(n=0,t=e.rb.i;n>22),r+=i>>22,r<0)?!1:(e.l=t&ss,e.m=i&ss,e.h=r&Pa,!0)}function w8n(e,n,t,i,r,c,o){var f,l;return!(n.Ae()&&(l=e.a.ue(t,i),l<0||!r&&l==0)||n.Be()&&(f=e.a.ue(t,c),f>0||!o&&f==0))}function g8n(e,n){zv();var t;if(t=e.j.g-n.j.g,t!=0)return 0;switch(e.j.g){case 2:return fN(n,Xoe)-fN(e,Xoe);case 4:return fN(e,Woe)-fN(n,Woe)}return 0}function p8n(e){switch(e.g){case 0:return Hq;case 1:return Vq;case 2:return Gq;case 3:return zq;case 4:return Tx;case 5:return Uq;default:return null}}function zr(e,n,t){var i,r;return i=(r=new pD,cd(r,n),iu(r,t),Bn((!e.c&&(e.c=new fe(wb,e,12,10)),e.c),r),r),Ya(i,0),tw(i,1),eh(i,!0),Za(i,!0),i}function F2(e,n){var t,i;if(n>=e.i)throw I(new h$(n,e.i));return++e.j,t=e.g[n],i=e.i-n-1,i>0&&Kc(e.g,n+1,e.g,n,i),zt(e.g,--e.i,null),e.fi(n,t),e.ci(),t}function A_e(e,n){var t,i;return e.Db>>16==17?e.Cb.ih(e,21,$o,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||e.zh()),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function m8n(e){var n,t,i,r;for(He(),Oi(e.c,e.a),r=new A(e.c);r.at.a.c.length))throw I(new rn("index must be >= 0 and <= layer node count"));e.c&&ju(e.c.a,e),e.c=t,t&&qb(t.a,n,e)}function $_e(e,n){var t,i,r;for(i=new En(Cn(ja(e).a.Kc(),new J));Un(i);)return t=u(_n(i),17),r=u(n.Kb(t),10),new HE(Nn(r.n.b+r.o.b/2));return U4(),U4(),LK}function L_e(e,n){this.c=new Ln,this.a=e,this.b=n,this.d=u(M(e,(re(),Cp)),304),X(M(e,(be(),$le)))===X((l7(),Cx))?this.e=new hke:this.e=new ake}function T8n(e,n){var t,i,r,c;for(c=0,i=new A(e);i.a>16==6?e.Cb.ih(e,6,Ii,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(cu(),_I)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function See(e,n){var t,i;return e.Db>>16==7?e.Cb.ih(e,1,Zj,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(cu(),bde)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function Pee(e,n){var t,i;return e.Db>>16==9?e.Cb.ih(e,9,Xt,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(cu(),gde)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function N_e(e,n){var t,i;return e.Db>>16==5?e.Cb.ih(e,9,UI,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(Ke(),vh)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function Aee(e,n){var t,i;return e.Db>>16==3?e.Cb.ih(e,0,nE,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(Ke(),mh)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function __e(e,n){var t,i;return e.Db>>16==7?e.Cb.ih(e,6,Sf,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(Ke(),kh)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function B_e(){this.a=new G3e,this.g=new OS,this.j=new OS,this.b=new Ln,this.d=new OS,this.i=new OS,this.k=new Ln,this.c=new Ln,this.e=new Ln,this.f=new Ln}function P8n(e,n,t){var i,r,c;for(t<0&&(t=0),c=e.i,r=t;rPB)return i3(e,i);if(i==e)return!0}}return!1}function x8n(e){switch(iC(),e.q.g){case 5:ERe(e,(ae(),tn)),ERe(e,On);break;case 4:mKe(e,(ae(),tn)),mKe(e,On);break;default:mVe(e,(ae(),tn)),mVe(e,On)}}function I8n(e){switch(iC(),e.q.g){case 5:_Re(e,(ae(),hn)),_Re(e,un);break;case 4:XNe(e,(ae(),hn)),XNe(e,un);break;default:vVe(e,(ae(),hn)),vVe(e,un)}}function O8n(e){var n,t;n=u(M(e,(jf(),iQe)),19),n?(t=n.a,t==0?te(e,(zh(),XA),new oN):te(e,(zh(),XA),new dM(t))):te(e,(zh(),XA),new dM(1))}function D8n(e,n){var t;switch(t=e.i,n.g){case 1:return-(e.n.b+e.o.b);case 2:return e.n.a-t.o.a;case 3:return e.n.b-t.o.b;case 4:return-(e.n.a+e.o.a)}return 0}function $8n(e,n){switch(e.g){case 0:return n==(to(),b1)?wx:gx;case 1:return n==(to(),b1)?wx:aj;case 2:return n==(to(),b1)?aj:gx;default:return aj}}function W7(e,n){var t,i,r;for(ju(e.a,n),e.e-=n.r+(e.a.c.length==0?0:e.c),r=wce,i=new A(e.a);i.a>16==3?e.Cb.ih(e,12,Xt,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(cu(),dde)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function Iee(e,n){var t,i;return e.Db>>16==11?e.Cb.ih(e,10,Xt,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(cu(),wde)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function R_e(e,n){var t,i;return e.Db>>16==10?e.Cb.ih(e,11,$o,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(Ke(),yh)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function K_e(e,n){var t,i;return e.Db>>16==10?e.Cb.ih(e,12,Lo,n):(i=Cr(u(Ge((t=u(en(e,16),26),t||(Ke(),ig)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,n))}function vo(e){var n;return!(e.Bb&1)&&e.r&&e.r.kh()&&(n=u(e.r,49),e.r=u(Yh(e,n),138),e.r!=n&&e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,9,8,n,e.r))),e.r}function qN(e,n,t){var i;return i=D(O(Ri,1),Br,25,15,[tne(e,(mf(),jc),n,t),tne(e,su,n,t),tne(e,Ec,n,t)]),e.f&&(i[0]=y.Math.max(i[0],i[2]),i[2]=i[0]),i}function L8n(e,n){var t,i,r;if(r=A9n(e,n),r.c.length!=0)for(Oi(r,new ipe),t=r.c.length,i=0;i>19,a=n.h>>19,l!=a?a-l:(r=e.h,f=n.h,r!=f?r-f:(i=e.m,o=n.m,i!=o?i-o:(t=e.l,c=n.l,t-c)))}function NS(){NS=U,vse=(iP(),eq),mse=new Ve(yie,vse),pse=(AM(),ZK),gse=new Ve(kie,pse),wse=(ES(),JK),bse=new Ve(jie,wse),dse=new Ve(Eie,(cn(),!0))}function T6(e,n,t){var i,r;i=n*t,_(e.g,145)?(r=j2(e),r.f.d?r.f.a||(e.d.a+=i+zf):(e.d.d-=i+zf,e.d.a+=i+zf)):_(e.g,10)&&(e.d.d-=i,e.d.a+=2*i)}function q_e(e,n,t){var i,r,c,o,f;for(r=e[t.g],f=new A(n.d);f.a0?e.g:0),++t;n.b=i,n.e=r}function H_e(e){var n,t,i;if(i=e.b,aEe(e.i,i.length)){for(t=i.length*2,e.b=V(BK,Ek,317,t,0,1),e.c=V(BK,Ek,317,t,0,1),e.f=t-1,e.i=0,n=e.a;n;n=n.c)nk(e,n,n);++e.g}}function H8n(e,n,t,i){var r,c,o,f;for(r=0;ro&&(f=o/i),r>c&&(l=c/r),al(e,y.Math.min(f,l)),e}function G8n(){fP();var e,n;try{if(n=u(qee((Oh(),Fo),N3),2014),n)return n}catch(t){if(t=qt(t),_(t,102))e=t,AY((qn(),e));else throw I(t)}return new K3e}function z8n(){$De();var e,n;try{if(n=u(qee((Oh(),Fo),jd),2024),n)return n}catch(t){if(t=qt(t),_(t,102))e=t,AY((qn(),e));else throw I(t)}return new u5e}function U8n(){fP();var e,n;try{if(n=u(qee((Oh(),Fo),Co),1941),n)return n}catch(t){if(t=qt(t),_(t,102))e=t,AY((qn(),e));else throw I(t)}return new d4e}function W8n(e,n,t){var i,r;return r=e.e,e.e=n,e.Db&4&&!(e.Db&1)&&(i=new Di(e,1,4,r,n),t?t.Ei(i):t=i),r!=n&&(n?t=v3(e,YS(e,n),t):t=v3(e,e.a,t)),t}function V_e(){wT.call(this),this.e=-1,this.a=!1,this.p=rr,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=rr}function X8n(e,n){var t,i,r;if(i=e.b.d.d,e.a||(i+=e.b.d.a),r=n.b.d.d,n.a||(r+=n.b.d.a),t=gi(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Y8n(e,n){var t,i,r;if(i=e.b.b.d,e.a||(i+=e.b.b.a),r=n.b.b.d,n.a||(r+=n.b.b.a),t=gi(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Q8n(e,n){var t,i,r;if(i=e.b.g.d,e.a||(i+=e.b.g.a),r=n.b.g.d,n.a||(r+=n.b.g.a),t=gi(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Dee(){Dee=U,pQe=Uu(mt(mt(mt(new Pi,(mr(),Yc),(Mr(),$oe)),Yc,Loe),Jr,Foe),Jr,Eoe),vQe=mt(mt(new Pi,Yc,goe),Yc,Toe),mQe=Uu(new Pi,Jr,Moe)}function J8n(e){var n,t,i,r,c;for(n=u(M(e,(re(),Ly)),83),c=e.n,i=n.Cc().Kc();i.Ob();)t=u(i.Pb(),306),r=t.i,r.c+=c.a,r.d+=c.b,t.c?uqe(t):sqe(t);te(e,Ly,null)}function Z8n(e,n,t){var i,r;switch(r=e.b,i=r.d,n.g){case 1:return-i.d-t;case 2:return r.o.a+i.c+t;case 3:return r.o.b+i.a+t;case 4:return-i.b-t;default:return-1}}function e7n(e){var n,t,i,r,c;if(i=0,r=A3,e.b)for(n=0;n<360;n++)t=n*.017453292519943295,Ete(e,e.d,0,0,sp,t),c=e.b.ig(e.d),c0&&(o=(c&vt)%e.d.length,r=Dne(e,o,c,n),r)?(f=r.ed(t),f):(i=e.tj(c,n,t),e.c.Fc(i),null)}function Fee(e,n){var t,i,r,c;switch(Ja(e,n)._k()){case 3:case 2:{for(t=Jg(n),r=0,c=t.i;r=0;i--)if(Re(e[i].d,n)||Re(e[i].d,t)){e.length>=i+1&&e.splice(0,i+1);break}return e}function X7(e,n){var t;return nc(e)&&nc(n)&&(t=e/n,Mk0&&(e.b+=2,e.a+=i):(e.b+=1,e.a+=y.Math.min(i,r))}function Q_e(e,n){var t,i;if(i=!1,Ni(n)&&(i=!0,g2(e,new Gb(Vn(n)))),i||_(n,236)&&(i=!0,g2(e,(t=qX(u(n,236)),new VE(t)))),!i)throw I(new ED(Qce))}function m7n(e,n,t,i){var r,c,o;return r=new pa(e.e,1,10,(o=n.c,_(o,88)?u(o,26):(Ke(),No)),(c=t.c,_(c,88)?u(c,26):(Ke(),No)),nh(e,n),!1),i?i.Ei(r):i=r,i}function Bee(e){var n,t;switch(u(M(ar(e),(be(),Mle)),420).g){case 0:return n=e.n,t=e.o,new je(n.a+t.a/2,n.b+t.b/2);case 1:return new Kr(e.n);default:return null}}function Y7(){Y7=U,Mx=new d5(Aa,0),afe=new d5("LEFTUP",1),dfe=new d5("RIGHTUP",2),lfe=new d5("LEFTDOWN",3),hfe=new d5("RIGHTDOWN",4),Wq=new d5("BALANCED",5)}function v7n(e,n,t){var i,r,c;if(i=gi(e.a[n.p],e.a[t.p]),i==0){if(r=u(M(n,(re(),lm)),15),c=u(M(t,lm),15),r.Hc(t))return-1;if(c.Hc(n))return 1}return i}function y7n(e){switch(e.g){case 1:return new Dve;case 2:return new $ve;case 3:return new Ove;case 0:return null;default:throw I(new rn(qR+(e.f!=null?e.f:""+e.g)))}}function Ree(e,n,t){switch(n){case 1:!e.n&&(e.n=new fe(uc,e,1,7)),Dn(e.n),!e.n&&(e.n=new fe(uc,e,1,7)),Yt(e.n,u(t,14));return;case 2:r6(e,Vn(t));return}uZ(e,n,t)}function Kee(e,n,t){switch(n){case 3:T0(e,ne(he(t)));return;case 4:C0(e,ne(he(t)));return;case 5:Cu(e,ne(he(t)));return;case 6:Mu(e,ne(he(t)));return}Ree(e,n,t)}function BS(e,n,t){var i,r,c;c=(i=new pD,i),r=Vf(c,n,null),r&&r.Fi(),iu(c,t),Bn((!e.c&&(e.c=new fe(wb,e,12,10)),e.c),c),Ya(c,0),tw(c,1),eh(c,!0),Za(c,!0)}function qee(e,n){var t,i,r;return t=o5(e.g,n),_(t,235)?(r=u(t,235),r.Qh()==null,r.Nh()):_(t,498)?(i=u(t,1938),r=i.b,r):null}function k7n(e,n,t,i){var r,c;return Nn(n),Nn(t),c=u($5(e.d,n),19),BDe(!!c,"Row %s not in %s",n,e.e),r=u($5(e.b,t),19),BDe(!!r,"Column %s not in %s",t,e.c),VLe(e,c.a,r.a,i)}function J_e(e,n,t,i,r,c,o){var f,l,a,h,w;if(h=r[c],a=c==o-1,f=a?i:0,w=v_e(f,h),i!=10&&D(O(e,o-c),n[c],t[c],f,w),!a)for(++c,l=0;l1||f==-1?(c=u(l,15),r.Wb(Pyn(e,c))):r.Wb(x_(e,u(l,56)))))}function P7n(e,n,t,i){Bje();var r=$K;function c(){for(var o=0;oBR)return t;r>-1e-6&&++t}return t}function Gee(e,n){var t;n!=e.b?(t=null,e.b&&(t=QC(e.b,e,-4,t)),n&&(t=$2(n,e,-4,t)),t=$Fe(e,n,t),t&&t.Fi()):e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,3,n,n))}function nBe(e,n){var t;n!=e.f?(t=null,e.f&&(t=QC(e.f,e,-1,t)),n&&(t=$2(n,e,-1,t)),t=LFe(e,n,t),t&&t.Fi()):e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,0,n,n))}function tBe(e){var n,t,i;if(e==null)return null;if(t=u(e,15),t.dc())return"";for(i=new Ra,n=t.Kc();n.Ob();)Lr(i,(Pt(),Vn(n.Pb()))),i.a+=" ";return b$(i,i.a.length-1)}function iBe(e){var n,t,i;if(e==null)return null;if(t=u(e,15),t.dc())return"";for(i=new Ra,n=t.Kc();n.Ob();)Lr(i,(Pt(),Vn(n.Pb()))),i.a+=" ";return b$(i,i.a.length-1)}function F7n(e,n,t){var i,r;return i=e.c[n.c.p][n.p],r=e.c[t.c.p][t.p],i.a!=null&&r.a!=null?tL(i.a,r.a):i.a!=null?-1:r.a!=null?1:0}function N7n(e,n){var t,i,r,c,o,f;if(n)for(c=n.a.length,t=new V1(c),f=(t.b-t.a)*t.c<0?(Dh(),x1):new Nh(t);f.Ob();)o=u(f.Pb(),19),r=vv(n,o.a),i=new r7e(e),Mgn(i.a,r)}function _7n(e,n){var t,i,r,c,o,f;if(n)for(c=n.a.length,t=new V1(c),f=(t.b-t.a)*t.c<0?(Dh(),x1):new Nh(t);f.Ob();)o=u(f.Pb(),19),r=vv(n,o.a),i=new X8e(e),Cgn(i.a,r)}function B7n(e){var n;if(e!=null&&e.length>0&&Xi(e,e.length-1)==33)try{return n=eRe(Ms(e,0,e.length-1)),n.e==null}catch(t){if(t=qt(t),!_(t,32))throw I(t)}return!1}function rBe(e,n,t){var i,r,c;return i=n.ak(),c=n.dd(),r=i.$j()?Hh(e,3,i,null,c,g3(e,i,c,_(i,99)&&(u(i,18).Bb&yr)!=0),!0):Hh(e,1,i,i.zj(),c,-1,!0),t?t.Ei(r):t=r,t}function R7n(){var e,n,t;for(n=0,e=0;e<1;e++){if(t=Nne((Gn(e,1),"X".charCodeAt(e))),t==0)throw I(new Hn("Unknown Option: "+"X".substr(e)));n|=t}return n}function K7n(e,n,t){var i,r,c;switch(i=ar(n),r=hS(i),c=new Rc,lc(c,n),t.g){case 1:Ei(c,N7(O2(r)));break;case 2:Ei(c,O2(r))}return te(c,(be(),Hw),he(M(e,Hw))),c}function zee(e){var n,t;return n=u(_n(new En(Cn(ic(e.a).a.Kc(),new J))),17),t=u(_n(new En(Cn(pi(e.a).a.Kc(),new J))),17),ke(ye(M(n,(re(),Qf))))||ke(ye(M(t,Qf)))}function Vg(){Vg=U,mx=new g8("ONE_SIDE",0),yx=new g8("TWO_SIDES_CORNER",1),kx=new g8("TWO_SIDES_OPPOSING",2),vx=new g8("THREE_SIDES",3),px=new g8("FOUR_SIDES",4)}function zN(e,n,t,i,r){var c,o;c=u(As(Lt(n.Oc(),new Z2e),Q1(new Af,new nu,new Ro,D(O(os,1),ce,132,0,[(qf(),_s)]))),15),o=u(ed(e.b,t,i),15),r==0?o.Wc(0,c):o.Gc(c)}function q7n(e,n){var t,i,r,c,o;for(c=new A(n.a);c.a0&&x_e(this,this.c-1,(ae(),hn)),this.c0&&e[0].length>0&&(this.c=ke(ye(M(ar(e[0][0]),(re(),Pfe))))),this.a=V(snn,ie,2018,e.length,0,2),this.b=V(onn,ie,2019,e.length,0,2),this.d=new SFe}function U7n(e){return e.c.length==0?!1:(Qe(0,e.c.length),u(e.c[0],17)).c.i.k==(dn(),$i)?!0:kv(yu(new We(null,new Ye(e,16)),new Ome),new Dme)}function W7n(e,n,t){return In(t,"Tree layout",1),sM(e.b),_l(e.b,(t3(),uI),uI),_l(e.b,Qy,Qy),_l(e.b,Aj,Aj),_l(e.b,Jy,Jy),e.a=dP(e.b,n),EMn(e,n,zc(t,1)),Tn(t),n}function uBe(e,n){var t,i,r,c,o,f,l;for(f=gw(n),c=n.f,l=n.g,o=y.Math.sqrt(c*c+l*l),r=0,i=new A(f);i.a=0?(t=X7(e,EP),i=R7(e,EP)):(n=Hb(e,1),t=X7(n,5e8),i=R7(n,5e8),i=or(aa(i,1),ji(e,1))),Ff(aa(i,32),ji(t,Ir))}function fBe(e,n,t){var i,r;switch(i=(vn(n.b!=0),u(Zs(n,n.a.a),8)),t.g){case 0:i.b=0;break;case 2:i.b=e.f;break;case 3:i.a=0;break;default:i.a=e.g}return r=ct(n,0),V8(r,i),n}function lBe(e,n,t,i){var r,c,o,f,l;switch(l=e.b,c=n.d,o=c.j,f=uee(o,l.d[o.g],t),r=Mt(vc(c.n),c.a),c.j.g){case 1:case 3:f.a+=r.a;break;case 2:case 4:f.b+=r.b}ri(i,f,i.c.b,i.c)}function ukn(e,n,t){var i,r,c,o;for(o=tc(e.e,n,0),c=new lU,c.b=t,i=new zi(e.e,o);i.b1;n>>=1)n&1&&(i=Ag(i,t)),t.d==1?t=Ag(t,t):t=new $Ne(Hqe(t.a,t.d,V($n,nt,25,t.d<<1,15,1)));return i=Ag(i,t),i}function Zee(){Zee=U;var e,n,t,i;for(ese=V(Ri,Br,25,25,15,1),nse=V(Ri,Br,25,33,15,1),i=152587890625e-16,n=32;n>=0;n--)nse[n]=i,i*=.5;for(t=1,e=24;e>=0;e--)ese[e]=t,t*=.5}function hkn(e){var n,t;if(ke(ye(Te(e,(be(),qw))))){for(t=new En(Cn(Ca(e).a.Kc(),new J));Un(t);)if(n=u(_n(t),79),N0(n)&&ke(ye(Te(n,Pd))))return!0}return!1}function aBe(e,n){var t,i,r;ki(e.f,n)&&(n.b=e,i=n.c,tc(e.j,i,0)!=-1||se(e.j,i),r=n.d,tc(e.j,r,0)!=-1||se(e.j,r),t=n.a.b,t.c.length!=0&&(!e.i&&(e.i=new HNe(e)),P4n(e.i,t)))}function dkn(e){var n,t,i,r,c;return t=e.c.d,i=t.j,r=e.d.d,c=r.j,i==c?t.p=0&&Re(e.substr(n,3),"GMT")||n>=0&&Re(e.substr(n,3),"UTC"))&&(t[0]=n+3),Mte(e,t,i)}function wkn(e,n){var t,i,r,c,o;for(c=e.g.a,o=e.g.b,i=new A(e.d);i.at;c--)e[c]|=n[c-t-1]>>>o,e[c-1]=n[c-t-1]<=e.f)break;c.c[c.c.length]=t}return c}function nne(e){var n,t,i,r;for(n=null,r=new A(e.wf());r.a0&&Kc(e.g,n,e.g,n+i,f),o=t.Kc(),e.i+=i,r=0;rc&&Iwn(a,s$e(t[f],Jue))&&(r=f,c=l);return r>=0&&(i[0]=n+c),r}function jkn(e,n){var t;if(t=rCe(e.b.Hf(),n.b.Hf()),t!=0)return t;switch(e.b.Hf().g){case 1:case 2:return mu(e.b.sf(),n.b.sf());case 3:case 4:return mu(n.b.sf(),e.b.sf())}return 0}function Ekn(e){var n,t,i;for(i=e.e.c.length,e.a=H1($n,[ie,nt],[48,25],15,[i,i],2),t=new A(e.c);t.a>4&15,c=e[i]&15,o[r++]=pde[t],o[r++]=pde[c];return mo(o,0,o.length)}function Mkn(e,n,t){var i,r,c;return i=n.ak(),c=n.dd(),r=i.$j()?Hh(e,4,i,c,null,g3(e,i,c,_(i,99)&&(u(i,18).Bb&yr)!=0),!0):Hh(e,i.Kj()?2:1,i,c,i.zj(),-1,!0),t?t.Ei(r):t=r,t}function Pu(e){var n,t;return e>=yr?(n=Sk+(e-yr>>10&1023)&si,t=56320+(e-yr&1023)&si,String.fromCharCode(n)+(""+String.fromCharCode(t))):String.fromCharCode(e&si)}function Skn(e,n){Bb();var t,i,r,c;return r=u(u(Tt(e.r,n),21),84),r.gc()>=2?(i=u(r.Kc().Pb(),111),t=e.u.Hc((Yu(),w9)),c=e.u.Hc(Em),!i.a&&!t&&(r.gc()==2||c)):!1}function bBe(e,n,t,i,r){var c,o,f;for(c=QKe(e,n,t,i,r),f=!1;!c;)WS(e,r,!0),f=!0,c=QKe(e,n,t,i,r);f&&WS(e,r,!1),o=LF(r),o.c.length!=0&&(e.d&&e.d.lg(o),bBe(e,r,t,i,o))}function HS(){HS=U,NV=new v5(Aa,0),G1e=new v5("DIRECTED",1),U1e=new v5("UNDIRECTED",2),H1e=new v5("ASSOCIATION",3),z1e=new v5("GENERALIZATION",4),V1e=new v5("DEPENDENCY",5)}function Pkn(e,n){var t;if(!Df(e))throw I(new ec(fUe));switch(t=Df(e),n.g){case 1:return-(e.j+e.f);case 2:return e.i-t.g;case 3:return e.j-t.f;case 4:return-(e.i+e.g)}return 0}function u3(e,n){var t,i;for(nn(n),i=e.b.c.length,se(e.b,n);i>0;){if(t=i,i=(i-1)/2|0,e.a.ue(ve(e.b,i),n)<=0)return Qs(e.b,t,n),!0;Qs(e.b,t,ve(e.b,i))}return Qs(e.b,i,n),!0}function tne(e,n,t,i){var r,c;if(r=0,t)r=sS(e.a[t.g][n.g],i);else for(c=0;c=f)}function ine(e,n,t,i){var r;if(r=!1,Ni(i)&&(r=!0,ov(n,t,Vn(i))),r||Lb(i)&&(r=!0,ine(e,n,t,i)),r||_(i,236)&&(r=!0,z1(n,t,u(i,236))),!r)throw I(new ED(Qce))}function xkn(e,n){var t,i,r;if(t=n.Hh(e.a),t&&(r=vf((!t.b&&(t.b=new ps((Ke(),jr),Cc,t)),t.b),To),r!=null)){for(i=1;i<(Ku(),Kde).length;++i)if(Re(Kde[i],r))return i}return 0}function Ikn(e,n){var t,i,r;if(t=n.Hh(e.a),t&&(r=vf((!t.b&&(t.b=new ps((Ke(),jr),Cc,t)),t.b),To),r!=null)){for(i=1;i<(Ku(),qde).length;++i)if(Re(qde[i],r))return i}return 0}function wBe(e,n){var t,i,r,c;if(nn(n),c=e.a.gc(),c0?1:0;c.a[r]!=t;)c=c.a[r],r=e.a.ue(t.d,c.d)>0?1:0;c.a[r]=i,i.b=t.b,i.a[0]=t.a[0],i.a[1]=t.a[1],t.a[0]=null,t.a[1]=null}function $kn(e){Yu();var n,t;return n=Ft(La,D(O(DI,1),ce,273,0,[E1])),!(j7(eM(n,e))>1||(t=Ft(w9,D(O(DI,1),ce,273,0,[b9,Em])),j7(eM(t,e))>1))}function cne(e,n){var t;t=Vc((Oh(),Fo),e),_(t,498)?qr(Fo,e,new $Te(this,n)):qr(Fo,e,this),ZN(this,n),n==(Um(),Ade)?(this.wb=u(this,1939),u(n,1941)):this.wb=(Kh(),Je)}function Lkn(e){var n,t,i;if(e==null)return null;for(n=null,t=0;t=ch?"error":i>=900?"warn":i>=800?"info":"log"),nAe(t,e.a),e.b&&cte(n,t,e.b,"Exception: ",!0))}function M(e,n){var t,i;return i=(!e.q&&(e.q=new Ln),kn(e.q,n)),i??(t=n.wg(),_(t,4)&&(t==null?(!e.q&&(e.q=new Ln),C2(e.q,n)):(!e.q&&(e.q=new Ln),jt(e.q,n,t))),t)}function mr(){mr=U,xl=new w8("P1_CYCLE_BREAKING",0),h1=new w8("P2_LAYERING",1),du=new w8("P3_NODE_ORDERING",2),Yc=new w8("P4_NODE_PLACEMENT",3),Jr=new w8("P5_EDGE_ROUTING",4)}function vBe(e,n){var t,i,r,c,o;for(r=n==1?mq:pq,i=r.a.ec().Kc();i.Ob();)for(t=u(i.Pb(),103),o=u(Tt(e.f.c,t),21).Kc();o.Ob();)c=u(o.Pb(),46),ju(e.b.b,c.b),ju(e.b.a,u(c.b,81).d)}function Fkn(e,n){t6();var t;if(e.c==n.c){if(e.b==n.b||s4n(e.b,n.b)){if(t=ghn(e.b)?1:-1,e.a&&!n.a)return t;if(!e.a&&n.a)return-t}return mu(e.b.g,n.b.g)}else return gi(e.c,n.c)}function Nkn(e,n){var t;In(n,"Hierarchical port position processing",1),t=e.b,t.c.length>0&&_qe((Qe(0,t.c.length),u(t.c[0],29)),e),t.c.length>1&&_qe(u(ve(t,t.c.length-1),29),e),Tn(n)}function yBe(e,n){var t,i,r;if(sne(e,n))return!0;for(i=new A(n);i.a=r||n<0)throw I(new Rr(bK+n+yd+r));if(t>=r||t<0)throw I(new Rr(wK+t+yd+r));return n!=t?i=(c=e.Ti(t),e.Hi(n,c),c):i=e.Oi(t),i}function EBe(e){var n,t,i;if(i=e,e)for(n=0,t=e.Ug();t;t=t.Ug()){if(++n>PB)return EBe(t);if(i=t,t==e)throw I(new ec("There is a cycle in the containment hierarchy of "+e))}return i}function Zh(e){var n,t,i;for(i=new nd(vr,"[","]"),t=e.Kc();t.Ob();)n=t.Pb(),ga(i,X(n)===X(e)?"(this Collection)":n==null?Au:rc(n));return i.a?i.e.length==0?i.a.a:i.a.a+(""+i.e):i.c}function sne(e,n){var t,i;if(i=!1,n.gc()<2)return!1;for(t=0;ti&&(Gn(n-1,e.length),e.charCodeAt(n-1)<=32);)--n;return i>0||n1&&(e.j.b+=e.e)):(e.j.a+=t.a,e.j.b=y.Math.max(e.j.b,t.b),e.d.c.length>1&&(e.j.a+=e.e))}function e1(){e1=U,iJe=D(O(kr,1),Lc,61,0,[(ae(),tn),hn,On]),tJe=D(O(kr,1),Lc,61,0,[hn,On,un]),rJe=D(O(kr,1),Lc,61,0,[On,un,tn]),cJe=D(O(kr,1),Lc,61,0,[un,tn,hn])}function Bkn(e,n,t,i){var r,c,o,f,l,a,h;if(o=e.c.d,f=e.d.d,o.j!=f.j)for(h=e.b,r=o.j,l=null;r!=f.j;)l=n==0?aS(r):xZ(r),c=uee(r,h.d[r.g],t),a=uee(l,h.d[l.g],t),ut(i,Mt(c,a)),r=l}function Rkn(e,n,t,i){var r,c,o,f,l;return o=I_e(e.a,n,t),f=u(o.a,19).a,c=u(o.b,19).a,i&&(l=u(M(n,(re(),Qu)),10),r=u(M(t,Qu),10),l&&r&&(NIe(e.b,l,r),f+=e.b.i,c+=e.b.e)),f>c}function CBe(e){var n,t,i,r,c,o,f,l,a;for(this.a=e_e(e),this.b=new oe,t=e,i=0,r=t.length;ix$(e.d).c?(e.i+=e.g.c,wN(e.d)):x$(e.d).c>x$(e.g).c?(e.e+=e.d.c,wN(e.g)):(e.i+=tPe(e.g),e.e+=tPe(e.d),wN(e.g),wN(e.d))}function Hkn(e,n,t){var i,r,c,o;for(c=n.q,o=n.r,new U1((wf(),p1),n,c,1),new U1(p1,c,o,1),r=new A(t);r.af&&(l=f/i),r>c&&(a=c/r),o=y.Math.min(l,a),e.a+=o*(n.a-e.a),e.b+=o*(n.b-e.b)}function Ukn(e,n,t,i,r){var c,o;for(o=!1,c=u(ve(t.b,0),33);oAn(e,n,c,i,r)&&(o=!0,M7n(t,c),t.b.c.length!=0);)c=u(ve(t.b,0),33);return t.b.c.length==0&&W7(t.j,t),o&&$S(n.q),o}function Wkn(e,n){Yg();var t,i,r,c;if(n.b<2)return!1;for(c=ct(n,0),t=u(rt(c),8),i=t;c.b!=c.d.c;){if(r=u(rt(c),8),m_(e,i,r))return!0;i=r}return!!m_(e,i,t)}function fne(e,n,t,i){var r,c;return t==0?(!e.o&&(e.o=new ks((cu(),C1),bb,e,0)),aC(e.o,n,i)):(c=u(Ge((r=u(en(e,16),26),r||e.zh()),t),66),c.Nj().Rj(e,lu(e),t-yn(e.zh()),n,i))}function ZN(e,n){var t;n!=e.sb?(t=null,e.sb&&(t=u(e.sb,49).ih(e,1,m9,t)),n&&(t=u(n,49).gh(e,1,m9,t)),t=EZ(e,n,t),t&&t.Fi()):e.Db&4&&!(e.Db&1)&&yt(e,new Di(e,1,4,n,n))}function Xkn(e,n){var t,i,r,c;if(n)r=va(n,"x"),t=new n7e(e),Av(t.a,(nn(r),r)),c=va(n,"y"),i=new t7e(e),Iv(i.a,(nn(c),c));else throw I(new ol("All edge sections need an end point."))}function Ykn(e,n){var t,i,r,c;if(n)r=va(n,"x"),t=new J8e(e),xv(t.a,(nn(r),r)),c=va(n,"y"),i=new Z8e(e),Ov(i.a,(nn(c),c));else throw I(new ol("All edge sections need a start point."))}function Qkn(e,n){var t,i,r,c,o,f,l;for(i=aFe(e),c=0,f=i.length;c>22-n,r=e.h<>22-n):n<44?(t=0,i=e.l<>44-n):(t=0,i=0,r=e.l<e)throw I(new rn("k must be smaller than n"));return n==0||n==e?1:e==0?0:Nee(e)/(Nee(n)*Nee(e-n))}function lne(e,n){var t,i,r,c;for(t=new DW(e);t.g==null&&!t.c?hQ(t):t.g==null||t.i!=0&&u(t.g[t.i-1],47).Ob();)if(c=u(XS(t),56),_(c,160))for(i=u(c,160),r=0;r>4],n[t*2+1]=JI[c&15];return mo(n,0,n.length)}function bjn(e){RC();var n,t,i;switch(i=e.c.length,i){case 0:return aXe;case 1:return n=u(wRe(new A(e)),42),_bn(n.cd(),n.dd());default:return t=u(Hf(e,V(Ed,kP,42,e.c.length,0,1)),165),new kD(t)}}function wjn(e){var n,t,i,r,c,o;for(n=new ag,t=new ag,Vh(n,e),Vh(t,e);t.b!=t.c;)for(r=u(w2(t),37),o=new A(r.a);o.a0&&ak(e,t,n),r):QEn(e,n,t)}function DBe(e,n,t){var i,r,c,o;if(n.b!=0){for(i=new Vt,o=ct(n,0);o.b!=o.d.c;)c=u(rt(o),86),pr(i,zJ(c)),r=c.e,r.a=u(M(c,(Ac(),YH)),19).a,r.b=u(M(c,xae),19).a;DBe(e,i,zc(t,i.b/e.a|0))}}function $Be(e,n){var t,i,r,c,o;if(e.e<=n||E2n(e,e.g,n))return e.g;for(c=e.r,i=e.g,o=e.r,r=(c-i)/2+i;i+11&&(e.e.b+=e.a)):(e.e.a+=t.a,e.e.b=y.Math.max(e.e.b,t.b),e.d.c.length>1&&(e.e.a+=e.a))}function yjn(e){var n,t,i,r;switch(r=e.i,n=r.b,i=r.j,t=r.g,r.a.g){case 0:t.a=(e.g.b.o.a-i.a)/2;break;case 1:t.a=n.d.n.a+n.d.a.a;break;case 2:t.a=n.d.n.a+n.d.a.a-i.a;break;case 3:t.b=n.d.n.b+n.d.a.b}}function LBe(e,n,t,i,r){if(ii&&(e.a=i),e.br&&(e.b=r),e}function kjn(e){if(_(e,149))return YCn(u(e,149));if(_(e,229))return U6n(u(e,229));if(_(e,23))return ejn(u(e,23));throw I(new rn(Jce+Zh(new ws(D(O(pn,1),pe,1,5,[e])))))}function jjn(e,n,t,i,r){var c,o,f;for(c=!0,o=0;o>>r|t[o+i+1]<>>r,++o}return c}function bne(e,n,t,i){var r,c,o;if(n.k==(dn(),$i)){for(c=new En(Cn(ic(n).a.Kc(),new J));Un(c);)if(r=u(_n(c),17),o=r.c.i.k,o==$i&&e.c.a[r.c.i.c.p]==i&&e.c.a[n.c.p]==t)return!0}return!1}function Ejn(e,n){var t,i,r,c;return n&=63,t=e.h&Pa,n<22?(c=t>>>n,r=e.m>>n|t<<22-n,i=e.l>>n|e.m<<22-n):n<44?(c=0,r=t>>>n-22,i=e.m>>n-22|e.h<<44-n):(c=0,r=0,i=t>>>n-44),fu(i&ss,r&ss,c&Pa)}function FBe(e,n,t,i){var r;this.b=i,this.e=e==(M0(),Wy),r=n[t],this.d=H1(as,[ie,Yl],[177,25],16,[r.length,r.length],2),this.a=H1($n,[ie,nt],[48,25],15,[r.length,r.length],2),this.c=new Yee(n,t)}function Tjn(e){var n,t,i;for(e.k=new gQ((ae(),D(O(kr,1),Lc,61,0,[gc,tn,hn,On,un])).length,e.j.c.length),i=new A(e.j);i.a=t)return o3(e,n,i.p),!0;return!1}function _Be(e){var n;return e.Db&64?e_(e):(n=new Cs(Kce),!e.a||Qn(Qn((n.a+=' "',n),e.a),'"'),Qn(Zd(Qn(Zd(Qn(Zd(Qn(Zd((n.a+=" (",n),e.i),","),e.j)," | "),e.g),","),e.f),")"),n.a)}function BBe(e,n,t){var i,r,c,o,f;for(f=hu(e.e.Tg(),n),r=u(e.g,119),i=0,o=0;ot?jne(e,t,"start index"):n<0||n>t?jne(n,t,"end index"):D6("end index (%s) must not be less than start index (%s)",D(O(pn,1),pe,1,5,[le(n),le(e)]))}function KBe(e,n){var t,i,r,c;for(i=0,r=e.length;i0&&qBe(e,c,t));n.p=0}function Pe(e){var n;this.c=new Vt,this.f=e.e,this.e=e.d,this.i=e.g,this.d=e.c,this.b=e.b,this.k=e.j,this.a=e.a,e.i?this.j=e.i:this.j=(n=u(df(gh),9),new Ws(n,u(Go(n,n.length),9),0)),this.g=e.f}function xjn(e){var n,t,i,r;for(n=Rh(Qn(new Cs("Predicates."),"and"),40),t=!0,r=new K4(e);r.b0?f[o-1]:V(Zl,uh,10,0,0,1),r=f[o],a=o=0?e.Bh(r):Sne(e,i);else throw I(new rn(o1+i.ne()+fy));else throw I(new rn(yUe+n+kUe));else no(e,t,i)}function wne(e){var n,t;if(t=null,n=!1,_(e,204)&&(n=!0,t=u(e,204).a),n||_(e,258)&&(n=!0,t=""+u(e,258).a),n||_(e,483)&&(n=!0,t=""+u(e,483).a),!n)throw I(new ED(Qce));return t}function zBe(e,n){var t,i;if(e.f){for(;n.Ob();)if(t=u(n.Pb(),72),i=t.ak(),_(i,99)&&u(i,18).Bb&xc&&(!e.e||i.Gj()!=T4||i.aj()!=0)&&t.dd()!=null)return n.Ub(),!0;return!1}else return n.Ob()}function UBe(e,n){var t,i;if(e.f){for(;n.Sb();)if(t=u(n.Ub(),72),i=t.ak(),_(i,99)&&u(i,18).Bb&xc&&(!e.e||i.Gj()!=T4||i.aj()!=0)&&t.dd()!=null)return n.Pb(),!0;return!1}else return n.Sb()}function gne(e,n,t){var i,r,c,o,f,l;for(l=hu(e.e.Tg(),n),i=0,f=e.i,r=u(e.g,119),o=0;o1&&(n.c[n.c.length]=c))}function $jn(e){var n,t,i,r;for(t=new Vt,pr(t,e.o),i=new aU;t.b!=0;)n=u(t.b==0?null:(vn(t.b!=0),Zs(t,t.a.a)),508),r=MVe(e,n,!0),r&&se(i.a,n);for(;i.a.c.length!=0;)n=u(vFe(i),508),MVe(e,n,!1)}function rh(){rh=U,Xhe=new c2(X6,0),ur=new c2("BOOLEAN",1),Ic=new c2("INT",2),p4=new c2("STRING",3),Zr=new c2("DOUBLE",4),ni=new c2("ENUM",5),mm=new c2("ENUMSET",6),Zf=new c2("OBJECT",7)}function S6(e,n){var t,i,r,c,o;i=y.Math.min(e.c,n.c),c=y.Math.min(e.d,n.d),r=y.Math.max(e.c+e.b,n.c+n.b),o=y.Math.max(e.d+e.a,n.d+n.a),r=(r/2|0))for(this.e=i?i.c:null,this.d=r;t++0;)dQ(this);this.b=n,this.a=null}function Njn(e,n){var t,i;n.a?uMn(e,n):(t=u(L$(e.b,n.b),57),t&&t==e.a[n.b.f]&&t.a&&t.a!=n.b.a&&t.c.Fc(n.b),i=u($$(e.b,n.b),57),i&&e.a[i.f]==n.b&&i.a&&i.a!=n.b.a&&n.b.c.Fc(i),j$(e.b,n.b))}function XBe(e,n){var t,i;if(t=u(Fr(e.b,n),124),u(u(Tt(e.r,n),21),84).dc()){t.n.b=0,t.n.c=0;return}t.n.b=e.C.b,t.n.c=e.C.c,e.A.Hc((Es(),_d))&&vqe(e,n),i=d9n(e,n),y_(e,n)==(_g(),k1)&&(i+=2*e.w),t.a.a=i}function YBe(e,n){var t,i;if(t=u(Fr(e.b,n),124),u(u(Tt(e.r,n),21),84).dc()){t.n.d=0,t.n.a=0;return}t.n.d=e.C.d,t.n.a=e.C.a,e.A.Hc((Es(),_d))&&yqe(e,n),i=b9n(e,n),y_(e,n)==(_g(),k1)&&(i+=2*e.w),t.a.b=i}function _jn(e,n){var t,i,r,c;for(c=new oe,i=new A(n);i.at.a&&(i.Hc((lw(),Fj))?r=(n.a-t.a)/2:i.Hc(Nj)&&(r=n.a-t.a)),n.b>t.b&&(i.Hc((lw(),Bj))?c=(n.b-t.b)/2:i.Hc(_j)&&(c=n.b-t.b)),rne(e,r,c)}function rRe(e,n,t,i,r,c,o,f,l,a,h,w,k){_(e.Cb,88)&&dw(ns(u(e.Cb,88)),4),iu(e,t),e.f=o,Yv(e,f),Jv(e,l),Xv(e,a),Qv(e,h),eh(e,w),Zv(e,k),Za(e,!0),Ya(e,r),e.ok(c),cd(e,n),i!=null&&(e.i=null,VM(e,i))}function cRe(e){var n,t;if(e.f){for(;e.n>0;){if(n=u(e.k.Xb(e.n-1),72),t=n.ak(),_(t,99)&&u(t,18).Bb&xc&&(!e.e||t.Gj()!=T4||t.aj()!=0)&&n.dd()!=null)return!0;--e.n}return!1}else return e.n>0}function jne(e,n,t){if(e<0)return D6(HVe,D(O(pn,1),pe,1,5,[t,le(e)]));if(n<0)throw I(new rn(VVe+n));return D6("%s (%s) must not be greater than size (%s)",D(O(pn,1),pe,1,5,[t,le(e),le(n)]))}function Ene(e,n,t,i,r,c){var o,f,l,a;if(o=i-t,o<7){F6n(n,t,i,c);return}if(l=t+r,f=i+r,a=l+(f-l>>1),Ene(n,e,l,a,-r,c),Ene(n,e,a,f,-r,c),c.ue(e[a-1],e[a])<=0){for(;t=0?e.sh(c,t):Zne(e,r,t);else throw I(new rn(o1+r.ne()+fy));else throw I(new rn(yUe+n+kUe));else io(e,i,r,t)}function uRe(e){var n,t,i,r;if(t=u(e,49).qh(),t)try{if(i=null,n=a3((Oh(),Fo),qqe(B6n(t))),n&&(r=n.rh(),r&&(i=r.Wk(Uln(t.e)))),i&&i!=e)return uRe(i)}catch(c){if(c=qt(c),!_(c,60))throw I(c)}return e}function au(e,n,t){var i,r,c,o;if(o=n==null?0:e.b.se(n),r=(i=e.a.get(o),i??new Array),r.length==0)e.a.set(o,r);else if(c=jFe(e,n,r),c)return c.ed(t);return zt(r,r.length,new ST(n,t)),++e.c,XC(e.b),null}function sRe(e,n){var t,i;return sM(e.a),_l(e.a,(UM(),dI),dI),_l(e.a,g4,g4),i=new Pi,mt(i,g4,(bS(),nV)),X(Te(n,(ow(),rV)))!==X((O7(),bI))&&mt(i,g4,ZH),mt(i,g4,eV),sCe(e.a,i),t=dP(e.a,n),t}function oRe(e){if(!e)return Gke(),yXe;var n=e.valueOf?e.valueOf():e;if(n!==e){var t=VK[typeof n];return t?t(n):wZ(typeof n)}else return e instanceof Array||e instanceof y.Array?new yz(e):new X9(e)}function fRe(e,n,t){var i,r,c;switch(c=e.o,i=u(Fr(e.p,t),244),r=i.i,r.b=ik(i),r.a=tk(i),r.b=y.Math.max(r.b,c.a),r.b>c.a&&!n&&(r.b=c.a),r.c=-(r.b-c.a)/2,t.g){case 1:r.d=-r.a;break;case 3:r.d=c.b}D_(i),$_(i)}function lRe(e,n,t){var i,r,c;switch(c=e.o,i=u(Fr(e.p,t),244),r=i.i,r.b=ik(i),r.a=tk(i),r.a=y.Math.max(r.a,c.b),r.a>c.b&&!n&&(r.a=c.b),r.d=-(r.a-c.b)/2,t.g){case 4:r.c=-r.b;break;case 2:r.c=c.a}D_(i),$_(i)}function Zjn(e,n){var t,i,r,c,o;if(!n.dc()){if(r=u(n.Xb(0),128),n.gc()==1){NKe(e,r,r,1,0,n);return}for(t=1;t