PageSourceSearch

https://cdn.bandy.ai/prod/_next/static/chunks/10425.940d25bd3aa7b452.js

js bandy.ai collected 2026-10-04 05:04:38 UTC 203,056 bytes, 8 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[10425],{2894:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSV=void 0;let r=i(73409),a=i(91941),n=i(54990);e.HSV=function(t){let e=t.data,i=e.length,r=Math.pow(2,this.value()),a=Math.pow(2,this.saturation()),n=Math.abs(this.hue()+360)%360,s=r*a*Math.cos(n*Math.PI/180),o=r*a*Math.sin(n*Math.PI/180),h=.299*r+.701*s+.167*o,l=.587*r-.587*s+.33*o,d=.114*r-.114*s-.497*o,c=.299*r-.299*s-.328*o,u=.587*r+.413*s+.035*o,g=.114*r-.114*s+.293*o,f=.299*r-.3*s+1.25*o,p=.587*r-.586*s-1.05*o,m=.114*r+.886*s-.2*o;for(let t=0;t<i;t+=4){let i=e[t+0],r=e[t+1],a=e[t+2],n=e[t+3];e[t+0]=h*i+l*r+d*a,e[t+1]=c*i+u*r+g*a,e[t+2]=f*i+p*r+m*a,e[t+3]=n}},r.Factory.addGetterSetter(a.Node,"hue",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"saturation",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"value",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},4395:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Transformer=void 0;let r=i(94001),a=i(73409),n=i(91941),s=i(32598),o=i(54086),h=i(79004),l=i(14498),d=i(54990),c=i(14498),u="tr-konva",g=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${u}`).join(" "),f="nodesRect",p=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],m={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},y="ontouchstart"in l.Konva._global,_=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function v(t,e,i){let r=i.x+(t.x-i.x)*Math.cos(e)-(t.y-i.y)*Math.sin(e),a=i.y+(t.x-i.x)*Math.sin(e)+(t.y-i.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:r,y:a}}let b=0;class x extends h.Group{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(g,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return r.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return u+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();let e=t.filter(t=>!t.isAncestorOf(this)||(r.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1));return this._nodes=t=e,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(t=>{let e=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()};if(t._attrsAffectingSize.length){let i=t._attrsAffectingSize.map(t=>t+"Change."+this._getEventNamespace()).join(" ");t.on(i,e)}t.on(p.map(t=>t+`.${this._getEventNamespace()}`).join(" "),e),t.on(`absoluteTransformChange.${this._getEventNamespace()}`,e),this._proxyDrag(t)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,i=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(i,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,i=>{if(!e)return;let r=t.getAbsolutePosition(),a=r.x-e.x,n=r.y-e.y;this.nodes().forEach(e=>{if(e===t||e.isDragging())return;let r=e.getAbsolutePosition();e.setAbsolutePosition({x:r.x+a,y:r.y+n}),e.startDrag(i)}),e=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}
1detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(f),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(f,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),i){let r=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=t.getAbsoluteScale(i),n=t.getAbsolutePosition(i),s=r.x*a.x-t.offsetX()*a.x,o=r.y*a.y-t.offsetY()*a.y,h=(l.Konva.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return v({x:n.x+s*Math.cos(h)+o*Math.sin(-h),y:n.y+o*Math.cos(h)+s*Math.sin(h),width:r.width*a.x,height:r.height*a.y,rotation:h},-l.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};let t=[];this.nodes().map(e=>{let i=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=[{x:i.x,y:i.y},{x:i.x+i.width,y:i.y},{x:i.x+i.width,y:i.y+i.height},{x:i.x,y:i.y+i.height}],a=e.getAbsoluteTransform();r.forEach(function(e){let i=a.point(e);t.push(i)})});let e=new r.Transform;e.rotate(-l.Konva.getAngle(this.rotation()));let i=1/0,a=1/0,n=-1/0,s=-1/0;t.forEach(function(t){let r=e.point(t);void 0===i&&(i=n=r.x,a=s=r.y),i=Math.min(i,r.x),a=Math.min(a,r.y),n=Math.max(n,r.x),s=Math.max(s,r.y)}),e.invert();let o=e.point({x:i,y:a});return{x:o.x,y:o.y,width:n-i,height:s-a,rotation:l.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),_.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){let e=new o.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:y?10:"auto"}),i=this;e.on("mousedown touchstart",function(t){i._handleMouseDown(t)}),e.on("dragstart",t=>{e.stopDrag(),t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),e.on("mouseenter",()=>{let i=function(t,e,i){if("rotater"===t)return i;e+=r.Util.degToRad(m[t]||0);let a=(r.Util.radToDeg(e)%360+360)%360;return r.Util._inRange(a,337.5,360)||r.Util._inRange(a,0,22.5)?"ns-resize":r.Util._inRange(a,22.5,67.5)?"nesw-resize":r.Util._inRange(a,67.5,112.5)?"ew-resize":r.Util._inRange(a,112.5,157.5)?"nwse-resize":r.Util._inRange(a,157.5,202.5)?"ns-resize":r.Util._inRange(a,202.5,247.5)?"nesw-resize":r.Util._inRange(a,247.5,292.5)?"ew-resize":r.Util._inRange(a,292.5,337.5)?"nwse-resize":(r.Util.error("Transformer has unknown angle for cursor detection: "+a),"pointer")}(t,l.Konva.getAngle(this.rotation()),this.rotateAnchorCursor());e.getStage().content&&(e.getStage().content.style.cursor=i),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){let t=new s.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(t,e){let i=e.getParent(),a=i.padding();t.beginPath(),t.rect(-a,-a,e.width()+2*a,e.height()+2*a),t.moveTo(e.width()/2,-a),i.rotateEnabled()&&i.rotateLineVisible()&&t.lineTo(e.width()/2,-i.rotateAnchorOffset()*r.Util._sign(e.height())-a),t.fillStrokeShape(e)},hitFunc:(t,e)=>{if(!this.shouldOverdrawWholeArea())return;let i=this.padding();t.beginPath(),t.rect(-i,-i,e.width()+2*i,e.height()+2*i),t.fillStrokeShape(e)}});this.add(t),this._proxyDrag(t),t.on("dragstart",t=>{t.cancelBubble=!0}),t.on("dragmove",t=>{t.cancelBubble=!0}),t.on("dragend",t=>{t.cancelBubble=!0}),this.on("dragmove",t=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];let e=this._getNodeRect(),i=e.width,r=e.height,a=Math.sqrt(Math.pow(i,2)+Math.pow(r,2));this.sin=Math.abs(r/a),this.cos=Math.abs(i/a),"undefined"!=typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;let n=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-n.x,y:s.y-n.y},b++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}
1),this._nodes.forEach(e=>{e._fire("transformstart",{evt:t.evt,target:e})})}_handleMouseMove(t){let e,i,r,a,n=this.findOne("."+this._movingAnchorName),s=n.getStage();s.setPointersPositions(t);let o=s.getPointerPosition(),h={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y},d=n.getAbsolutePosition();this.anchorDragBoundFunc()&&(h=this.anchorDragBoundFunc()(d,h,t)),n.setAbsolutePosition(h);let c=n.getAbsolutePosition();if(d.x===c.x&&d.y===c.y)return;if("rotater"===this._movingAnchorName){let r=this._getNodeRect();e=n.x()-r.width/2;let a=Math.atan2(-(i=-n.y()+r.height/2),e)+Math.PI/2;r.height<0&&(a-=Math.PI);let s=l.Konva.getAngle(this.rotation())+a,o=l.Konva.getAngle(this.rotationSnapTolerance()),h=function(t,e,i){let r=e;for(let a=0;a<t.length;a++){let n=l.Konva.getAngle(t[a]),s=Math.abs(n-e)%(2*Math.PI);Math.min(s,2*Math.PI-s)<i&&(r=n)}return r}(this.rotationSnaps(),s,o)-r.rotation,d=function(t,e){let i={x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)};return v(t,e,i)}(r,h);this._fitNodesInto(d,t);return}let u=this.shiftBehavior();a="inverted"===u?this.keepRatio()&&!t.shiftKey:"none"===u?this.keepRatio():this.keepRatio()||t.shiftKey;let g=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(a){let t=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(t.x-n.x(),2)+Math.pow(t.y-n.y(),2));let a=this.findOne(".top-left").x()>t.x?-1:1,s=this.findOne(".top-left").y()>t.y?-1:1;e=r*this.cos*a,i=r*this.sin*s,this.findOne(".top-left").x(t.x-e),this.findOne(".top-left").y(t.y-i)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(n.y());else if("top-right"===this._movingAnchorName){if(a){let t=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(n.x()-t.x,2)+Math.pow(t.y-n.y(),2));let a=this.findOne(".top-right").x()<t.x?-1:1,s=this.findOne(".top-right").y()>t.y?-1:1;e=r*this.cos*a,i=r*this.sin*s,this.findOne(".top-right").x(t.x+e),this.findOne(".top-right").y(t.y-i)}var f=n.position();this.findOne(".top-left").y(f.y),this.findOne(".bottom-right").x(f.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(n.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(n.x());else if("bottom-left"===this._movingAnchorName){if(a){let t=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(t.x-n.x(),2)+Math.pow(n.y()-t.y,2));let a=t.x<n.x()?-1:1,s=n.y()<t.y?-1:1;e=r*this.cos*a,i=r*this.sin*s,n.x(t.x-e),n.y(t.y+i)}f=n.position(),this.findOne(".top-left").x(f.x),this.findOne(".bottom-right").y(f.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(n.y());else if("bottom-right"===this._movingAnchorName){if(a){let t=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};r=Math.sqrt(Math.pow(n.x()-t.x,2)+Math.pow(n.y()-t.y,2));let a=this.findOne(".bottom-right").x()<t.x?-1:1,s=this.findOne(".bottom-right").y()<t.y?-1:1;e=r*this.cos*a,i=r*this.sin*s,this.findOne(".bottom-right").x(t.x+e),this.findOne(".bottom-right").y(t.y+i)}}else console.error(Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(g=this.centeredScaling()||t.altKey){let t=this.findOne(".top-left"),e=this.findOne(".bottom-right"),i=t.x(),r=t.y(),a=this.getWidth()-e.x(),n=this.getHeight()-e.y();e.move({x:-i,y:-r}),t.move({x:a,y:n})}let p=this.findOne(".top-left").getAbsolutePosition();e=p.x,i=p.y;let m=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),y=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:i,width:m,height:y,rotation:l.Konva.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var e;if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));let i=this.getNode();b--,this._fire("transformend",{evt:t,target:i}),null==(e=this.getLayer())||e.batchDraw(),i&&this._nodes.forEac
1h(e=>{var i;e._fire("transformend",{evt:t,target:e}),null==(i=e.getLayer())||i.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,e){let i=this._getNodeRect();if(r.Util._inRange(t.width,-(2*this.padding())-1,1)||r.Util._inRange(t.height,-(2*this.padding())-1,1))return void this.update();let a=new r.Transform;if(a.rotate(l.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){let e=a.point({x:-(2*this.padding()),y:0});t.x+=e.x,t.y+=e.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){let e=a.point({x:2*this.padding(),y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.width+=2*this.padding()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){let e=a.point({x:0,y:-(2*this.padding())});t.x+=e.x,t.y+=e.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){let e=a.point({x:0,y:2*this.padding()});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}if(this.boundBoxFunc()){let e=this.boundBoxFunc()(i,t);e?t=e:r.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}let n=new r.Transform;n.translate(i.x,i.y),n.rotate(i.rotation),n.scale(i.width/1e7,i.height/1e7);let s=new r.Transform,o=t.width/1e7,h=t.height/1e7;!1===this.flipEnabled()?(s.translate(t.x,t.y),s.rotate(t.rotation),s.translate(t.width<0?t.width:0,t.height<0?t.height:0),s.scale(Math.abs(o),Math.abs(h))):(s.translate(t.x,t.y),s.rotate(t.rotation),s.scale(o,h));let d=s.multiply(n.invert());this._nodes.forEach(t=>{var e;let i=t.getParent().getAbsoluteTransform(),a=t.getTransform().copy();a.translate(t.offsetX(),t.offsetY());let n=new r.Transform;n.multiply(i.copy().invert()).multiply(d).multiply(i).multiply(a);let s=n.decompose();t.setAttrs(s),null==(e=t.getLayer())||e.batchDraw()}),this.rotation(r.Util._getRotation(t.rotation)),this._nodes.forEach(t=>{this._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var t;let e=this._getNodeRect();this.rotation(r.Util._getRotation(e.rotation));let i=e.width,a=e.height,n=this.enabledAnchors(),s=this.resizeEnabled(),o=this.padding(),h=this.anchorSize(),l=this.find("._anchor");l.forEach(t=>{t.setAttrs({width:h,height:h,offsetX:h/2,offsetY:h/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:h/2+o,offsetY:h/2+o,visible:s&&n.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:i/2,y:0,offsetY:h/2+o,visible:s&&n.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:i,y:0,offsetX:h/2-o,offsetY:h/2+o,visible:s&&n.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:a/2,offsetX:h/2+o,visible:s&&n.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:i,y:a/2,offsetX:h/2-o,visible:s&&n.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:a,offsetX:h/2+o,offsetY:h/2-o,visible:s&&n.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:i/2,y:a,offsetY:h/2-o,visible:s&&n.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:i,y:a,offsetX:h/2-o,offsetY:h/2-o,visible:s&&n.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:i/2,y:-this.rotateAnchorOffset()*r.Util._sign(a)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:i,height:a,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});let d=this.anchorStyleFunc();d&&l.forEach(t=>{d(t)}),null==(t=this.getLayer())||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();let t=this.findOne("."+this._movingAnchorName);
1t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),h.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return n.Node.prototype.toObject.call(this)}clone(t){return n.Node.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}e.Transformer=x,x.isTransforming=()=>b>0,x.prototype.className="Transformer",(0,c._registerNode)(x),a.Factory.addGetterSetter(x,"enabledAnchors",_,function(t){return t instanceof Array||r.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(t){-1===_.indexOf(t)&&r.Util.warn("Unknown anchor name: "+t+". Available names are: "+_.join(", "))}),t||[]}),a.Factory.addGetterSetter(x,"flipEnabled",!0,(0,d.getBooleanValidator)()),a.Factory.addGetterSetter(x,"resizeEnabled",!0),a.Factory.addGetterSetter(x,"anchorSize",10,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(x,"rotateEnabled",!0),a.Factory.addGetterSetter(x,"rotateLineVisible",!0),a.Factory.addGetterSetter(x,"rotationSnaps",[]),a.Factory.addGetterSetter(x,"rotateAnchorOffset",50,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(x,"rotateAnchorCursor","crosshair"),a.Factory.addGetterSetter(x,"rotationSnapTolerance",5,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(x,"borderEnabled",!0),a.Factory.addGetterSetter(x,"anchorStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(x,"anchorStrokeWidth",1,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(x,"anchorFill","white"),a.Factory.addGetterSetter(x,"anchorCornerRadius",0,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(x,"borderStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(x,"borderStrokeWidth",1,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(x,"borderDash"),a.Factory.addGetterSetter(x,"keepRatio",!0),a.Factory.addGetterSetter(x,"shiftBehavior","default"),a.Factory.addGetterSetter(x,"centeredScaling",!1),a.Factory.addGetterSetter(x,"ignoreStroke",!1),a.Factory.addGetterSetter(x,"padding",0,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(x,"nodes"),a.Factory.addGetterSetter(x,"node"),a.Factory.addGetterSetter(x,"boundBoxFunc"),a.Factory.addGetterSetter(x,"anchorDragBoundFunc"),a.Factory.addGetterSetter(x,"anchorStyleFunc"),a.Factory.addGetterSetter(x,"shouldOverdrawWholeArea",!1),a.Factory.addGetterSetter(x,"useSingleNodeRotation",!0),a.Factory.backCompat(x,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledH
1andlers:"enabledAnchors"})},4581:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Image=void 0;let r=i(94001),a=i(73409),n=i(32598),s=i(14498),o=i(54990);class h extends n.Shape{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",t=>{this._removeImageLoad(t.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let t=this.image();t&&t.complete||(!t||4!==t.readyState)&&t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){let t=!!this.cornerRadius(),e=this.hasShadow();return!!t&&!!e||super._useBufferCanvas(!0)}_sceneFunc(t){let e,i=this.getWidth(),a=this.getHeight(),n=this.cornerRadius(),s=this.attrs.image;if(s){let t=this.attrs.cropWidth,r=this.attrs.cropHeight;e=t&&r?[s,this.cropX(),this.cropY(),t,r,0,0,i,a]:[s,0,0,i,a]}(this.hasFill()||this.hasStroke()||n)&&(t.beginPath(),n?r.Util.drawRoundedRectPath(t,i,a,n):t.rect(0,0,i,a),t.closePath(),t.fillStrokeShape(this)),s&&(n&&t.clip(),t.drawImage.apply(t,e))}_hitFunc(t){let e=this.width(),i=this.height(),a=this.cornerRadius();t.beginPath(),a?r.Util.drawRoundedRectPath(t,e,i,a):t.rect(0,0,e,i),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!=(t=this.attrs.width)?t:null==(e=this.image())?void 0:e.width}getHeight(){var t,e;return null!=(t=this.attrs.height)?t:null==(e=this.image())?void 0:e.height}static fromURL(t,e,i=null){let a=r.Util.createImageElement();a.onload=function(){e(new h({image:a}))},a.onerror=i,a.crossOrigin="Anonymous",a.src=t}}e.Image=h,h.prototype.className="Image",(0,s._registerNode)(h),a.Factory.addGetterSetter(h,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4)),a.Factory.addGetterSetter(h,"image"),a.Factory.addComponentsGetterSetter(h,"crop",["x","y","width","height"]),a.Factory.addGetterSetter(h,"cropX",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(h,"cropY",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(h,"cropWidth",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(h,"cropHeight",0,(0,o.getNumberValidator)())},6369:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sprite=void 0;let r=i(73409),a=i(32598),n=i(49229),s=i(54990),o=i(14498);class h extends a.Shape{constructor(t){super(t),this._updated=!0,this.anim=new n.Animation(()=>{let t=this._updated;return this._updated=!1,t}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){let e=this.animation(),i=this.frameIndex(),r=4*i,a=this.animations()[e],n=this.frameOffsets(),s=a[r+0],o=a[r+1],h=a[r+2],l=a[r+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,h,l),t.closePath(),t.fillStrokeShape(this)),d)if(n){let r=n[e],a=2*i;t.drawImage(d,s,o,h,l,r[a+0],r[a+1],h,l)}else t.drawImage(d,s,o,h,l,0,0,h,l)}_hitFunc(t){let e=this.animation(),i=this.frameIndex(),r=4*i,a=this.animations()[e],n=this.frameOffsets(),s=a[r+2],o=a[r+3];if(t.beginPath(),n){let r=n[e],a=2*i;t.rect(r[a+0],r[a+1],s,o)}else t.rect(0,0,s,o);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){let t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;let t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){let t=this.frameIndex(),e=this.animation();t<this.animations()[e].length/4-1?this.frameIndex(t+1):this.frameIndex(0)}}e.Sprite=h,h.prototype.className="Sprite",(0,o._registerNode)(h),r.Factory.addGetterSetter(h,"animation"),r.Factory.addGetterSetter(h,"animations"),r.Factory.addGetterSetter(h,"frameOffsets"),r.Factory.addGetterSetter(h,"image"),r.Factory.addGetterSetter(h,"frameIndex",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"frameRate",17,(0,s.getNumberValidator)()),r.Factory.backCompat(h,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"})},6452:(t,e,i)=>{var r=i(81706),a=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(a,""):t}},13133:(t,e,i)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Arrow=void 0;let r=i(73409),a=i(50134),n=i(54990),s=i(14498),o=i(51071);class h extends a.Line{_sceneFunc(t){let e,i;super._sceneFunc(t);let r=2*Math.PI,a=this.points(),n=a,s=0!==this.tension()&&a.length>4;s&&(n=this.getTensionPoints());let h=this.pointerLength(),l=a.length;if(s){let t=[n[n.length-4],n[n.length-3],n[n.length-2],n[n.length-1],a[l-2],a[l-1]],r=o.Path.calcLength(n[n.length-4],n[n.length-3],"C",t),s=o.Path.getPointOnQuadraticBezier(Math.min(1,1-h/r),t[0],t[1],t[2],t[3],t[4],t[5]);e=a[l-2]-s.x,i=a[l-1]-s.y}else e=a[l-2]-a[l-4],i=a[l-1]-a[l-3];let d=(Math.atan2(i,e)+r)%r,c=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(a[l-2],a[l-1]),t.rotate(d),t.moveTo(0,0),t.lineTo(-h,c/2),t.lineTo(-h,-c/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(a[0],a[1]),s?(e=(n[0]+n[2])/2-a[0],i=(n[1]+n[3])/2-a[1]):(e=a[2]-a[0],i=a[3]-a[1]),t.rotate((Math.atan2(-i,-e)+r)%r),t.moveTo(0,0),t.lineTo(-h,c/2),t.lineTo(-h,-c/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){let e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){let t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x,y:t.y-e,width:t.width,height:t.height+2*e}}}e.Arrow=h,h.prototype.className="Arrow",(0,s._registerNode)(h),r.Factory.addGetterSetter(h,"pointerLength",10,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(h,"pointerWidth",10,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(h,"pointerAtBeginning",!1),r.Factory.addGetterSetter(h,"pointerAtEnding",!0)},13168:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;let r=i(73409),a=i(91941),n=i(54990);class s extends a.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){let e=this.children||[];return t?e.filter(t):e}hasChildren(){return this.getChildren().length>0}
1removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(0===t.length)return this;if(t.length>1){for(let e=0;e<t.length;e++)this.add(t[e]);return this}let e=t[0];return e.getParent()?e.moveTo(this):(this._validateAdd(e),e.index=this.getChildren().length,e.parent=this,e._clearCaches(),this.getChildren().push(e),this._fire("add",{child:e}),this._requestDraw()),this}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){let e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){let i=[];return this._descendants(r=>{let a=r._isMatch(t);return a&&i.push(r),!!a&&!!e}),i}_descendants(t){for(let e of this.getChildren())if(t(e)||e.hasChildren()&&e._descendants(t))return!0;return!1}toObject(){let t=a.Node.prototype.toObject.call(this);
1return t.children=[],this.getChildren().forEach(e=>{t.children.push(e.toObject())}),t}isAncestorOf(t){let e=t.getParent();for(;e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){let e=a.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(t){e.add(t.clone())}),e}getAllIntersections(t){let e=[];return this.find("Shape").forEach(i=>{i.isVisible()&&i.intersects(t)&&e.push(i)}),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),this.isCached()||null==(e=this.children)||e.forEach(function(e){e._clearSelfAndDescendantCache(t)})}_setChildrenIndices(){var t;null==(t=this.children)||t.forEach(function(t,e){t.index=e}),this._requestDraw()}drawScene(t,e,i){let r=this.getLayer(),a=t||r&&r.getCanvas(),n=a&&a.getContext(),s=this._getCanvasCache(),o=s&&s.scene,h=a&&a.isCache;if(!this.isVisible()&&!h)return this;if(o){n.save();let t=this.getAbsoluteTransform(e).getMatrix();n.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedSceneCanvas(n),n.restore()}else this._drawChildren("drawScene",a,e,i);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;let i=this.getLayer(),r=t||i&&i.hitCanvas,a=r&&r.getContext(),n=this._getCanvasCache();if(n&&n.hit){a.save();let t=this.getAbsoluteTransform(e).getMatrix();a.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",r,e);return this}_drawChildren(t,e,i,r){var a;let n=e&&e.getContext(),s=this.clipWidth(),o=this.clipHeight(),h=this.clipFunc(),l="number"==typeof s&&"number"==typeof o||h,d=i===this;if(l){let t;n.save();let e=this.getAbsoluteTransform(i),r=e.getMatrix();if(n.transform(r[0],r[1],r[2],r[3],r[4],r[5]),n.beginPath(),h)t=h.call(this,n,this);else{let t=this.clipX(),e=this.clipY();n.rect(t||0,e||0,s,o)}n.clip.apply(n,t),r=e.copy().invert().getMatrix(),n.transform(r[0],r[1],r[2],r[3],r[4],r[5])}let c=!d&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;c&&(n.save(),n._applyGlobalCompositeOperation(this)),null==(a=this.children)||a.forEach(function(a){a[t](e,i,r)}),c&&n.restore(),l&&n.restore()}getClientRect(t={}){var e;let i,r,a,n,s=t.skipTransform,o=t.relativeTo,h={x:1/0,y:1/0,width:0,height:0},l=this;null==(e=this.children)||e.forEach(function(e){if(!e.visible())return;let s=e.getClientRect({relativeTo:l,skipShadow:t.skipShadow,skipStroke:t.skipStroke});(0!==s.width||0!==s.height)&&(void 0===i?(i=s.x,r=s.y,a=s.x+s.width,n=s.y+s.height):(i=Math.min(i,s.x),r=Math.min(r,s.y),a=Math.max(a,s.x+s.width),n=Math.max(n,s.y+s.height)))});let d=this.find("Shape"),c=!1;for(let t=0;t<d.length;t++)if(d[t]._isVisible(this)){c=!0;break}return(h=c&&void 0!==i?{x:i,y:r,width:a-i,height:n-r}:{x:0,y:0,width:0,height:0},s)?h:this._transformedRect(h,o)}}e.Container=s,r.Factory.addComponentsGetterSetter(s,"clip",["x","y","width","height"]),r.Factory.addGetterSetter(s,"clipX",void 0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(s,"clipY",void 0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(s,"clipWidth",void 0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(s,"clipHeight",void 0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(s,"clipFunc")},14498:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;let r=Math.PI/180;e.glob=void 0!==i.g?i.g:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{},e.Konva={_global:e.glob,version:"9.3.22",isBrowser:"undefined"!=typeof window&&("[object Window]"===({}).toString.call(window)||"[object global]"===({}).toString.call(window)),isUnminified:/param/.test((function(t){}).toString()),dblClickWindow:400,getAngle:t=>e.Konva.angleDeg?t*r:t,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>e.Konva.DD.isDragging,isTransforming(){var t;return null==(t=e.Konva.Transformer)?void 0:t.isTransforming()},isDragReady:()=>!!e.Konva.DD.node,releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(t){e.glob.Konva=t}},e._registerNode=t=>{e.Konva[t.prototype.getClassName()]=t},e.Konva._injectGlobal(e.Konva)},14872:(t,e,i)=>{var r=i(80873),a=i(15301),n=i(81642),s=r?r.toStringTag:void 0;
1t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?a(t):n(t)}},15301:(t,e,i)=>{var r=i(80873),a=Object.prototype,n=a.hasOwnProperty,s=a.toString,o=r?r.toStringTag:void 0;t.exports=function(t){var e=n.call(t,o),i=t[o];try{t[o]=void 0;var r=!0}catch(t){}var a=s.call(t);return r&&(e?t[o]=i:delete t[o]),a}},17646:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Posterize=void 0;let r=i(73409),a=i(91941),n=i(54990);e.Posterize=function(t){let e=Math.round(254*this.levels())+1,i=t.data,r=i.length,a=255/e;for(let t=0;t<r;t+=1)i[t]=Math.floor(i[t]/a)*a},r.Factory.addGetterSetter(a.Node,"levels",.5,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},18372:(t,e,i)=>{var r=i(96810);t.exports=function(t,e,i){let a=r.useRef("loading"),n=r.useRef(),[s,o]=r.useState(0),h=r.useRef(),l=r.useRef(),d=r.useRef();return(h.current!==t||l.current!==e||d.current!==i)&&(a.current="loading",n.current=void 0,h.current=t,l.current=e,d.current=i),r.useLayoutEffect(function(){if(t){var r=document.createElement("img");return r.addEventListener("load",s),r.addEventListener("error",h),e&&(r.crossOrigin=e),i&&(r.referrerPolicy=i),r.src=t,function(){r.removeEventListener("load",s),r.removeEventListener("error",h)}}function s(){r.decode().catch(()=>{}).finally(()=>{a.current="loaded",n.current=r,o(Math.random())})}function h(){a.current="failed",n.current=void 0,o(Math.random())}},[t,e,i]),[n.current,a.current]}},22274:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var r=i(59381);Object.defineProperty(e,"Konva",{enumerable:!0,get:function(){return r.Konva}}),t.exports=i(59381).Konva},22465:(t,e,i)=>{"use strict";let r;Object.defineProperty(e,"__esModule",{value:!0}),e.HitCanvas=e.SceneCanvas=e.Canvas=void 0;let a=i(94001),n=i(74492),s=i(14498);class o{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;let e=(t||{}).pixelRatio||s.Konva.pixelRatio||function(){if(r)return r;let t=a.Util.createCanvasElement(),e=t.getContext("2d");return r=(s.Konva._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),a.Util.releaseCanvas(t),r}();this.pixelRatio=e,this._canvas=a.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){let e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";let e=this.pixelRatio;this.getContext()._context.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";let e=this.pixelRatio;this.getContext()._context.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return a.Util.error("Unable to get data URL. "+t.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}e.Canvas=o;class h extends o{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new n.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}e.SceneCanvas=h;class l extends o{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new n.HitContext(this),this.setSize(t.width,t.height)}}e.HitCanvas=l},26067:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Contrast=void 0;let r=i(73409),a=i(91941),n=i(54990);e.Contrast=function(t){let e=Math.pow((this.contrast()+100)/100,2),i=t.data,r=i.length,a=150,n=150,s=150;for(let t=0;t<r;t+=4)a=i[t],n=i[t+1],s=i[t+2],a/=255,a-=.5,a*=e,a+=.5,a*=255,n/=255,n-=.5,n*=e,n+=.5,n*=255,s/=255,s-=.5,s*=e,s+=.5,s*=255,a=a<0?0:a>255?255:a,n=n<0?0:n>255?255:n,s=s<0?0:s>255?255:s,i[t]=a,i[t+1]=n,i[t+2]=s},r.Factory.addGetterSetter(a.Node,"contrast",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},27445:(t,e,i)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Enhance=void 0;let r=i(73409),a=i(91941),n=i(54990);function s(t,e,i,r,a){let n=i-e,s=a-r;if(0===n)return r+s/2;if(0===s)return r;let o=(t-e)/n;return s*o+r}e.Enhance=function(t){let e,i,r,a,n,o,h=t.data,l=h.length,d=h[0],c=d,u,g=h[1],f=g,p,m=h[2],y=m,_,v=this.enhance();if(0!==v){for(let t=0;t<l;t+=4)(u=h[t+0])<d?d=u:u>c&&(c=u),(p=h[t+1])<g?g=p:p>f&&(f=p),(_=h[t+2])<m?m=_:_>y&&(y=_);if(c===d&&(c=255,d=0),f===g&&(f=255,g=0),y===m&&(y=255,m=0),v>0)e=c+v*(255-c),i=d-v*(d-0),r=f+v*(255-f),a=g-v*(g-0),n=y+v*(255-y),o=m-v*(m-0);else{let t=(c+d)*.5;e=c+v*(c-t),i=d+v*(d-t);let s=(f+g)*.5;r=f+v*(f-s),a=g+v*(g-s);let h=(y+m)*.5;n=y+v*(y-h),o=m+v*(m-h)}for(let t=0;t<l;t+=4)h[t+0]=s(h[t+0],d,c,i,e),h[t+1]=s(h[t+1],g,f,a,r),h[t+2]=s(h[t+2],m,y,o,n)}},r.Factory.addGetterSetter(a.Node,"enhance",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},29428:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Arc=void 0;let r=i(73409),a=i(32598),n=i(14498),s=i(54990),o=i(14498);class h extends a.Shape{_sceneFunc(t){let e=n.Konva.getAngle(this.angle()),i=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,i),t.arc(0,0,this.innerRadius(),e,0,!i),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){let t=this.innerRadius(),e=this.outerRadius(),i=this.clockwise(),r=n.Konva.getAngle(i?360-this.angle():this.angle()),a=Math.cos(Math.min(r,Math.PI)),s=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),o=Math.sin(Math.min(r,Math.PI/2)),h=a*(a>0?t:e),l=s*(s>0?t:e),d=o*(o>0?e:t);return{x:h,y:i?-1*d:l,width:e-h,height:d-l}}}e.Arc=h,h.prototype._centroid=!0,h.prototype.className="Arc",h.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],(0,o._registerNode)(h),r.Factory.addGetterSetter(h,"innerRadius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"outerRadius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"angle",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"clockwise",!1,(0,s.getBooleanValidator)())},29688:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Star=void 0;let r=i(73409),a=i(32598),n=i(54990),s=i(14498);class o extends a.Shape{_sceneFunc(t){let e=this.innerRadius(),i=this.outerRadius(),r=this.numPoints();t.beginPath(),t.moveTo(0,0-i);for(let a=1;a<2*r;a++){let n=a%2==0?i:e,s=n*Math.sin(a*Math.PI/r),o=-1*n*Math.cos(a*Math.PI/r);t.lineTo(s,o)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}e.Star=o,o.prototype.className="Star",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"numPoints",5,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(o,"innerRadius",0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(o,"outerRadius",0,(0,n.getNumberValidator)())},30287:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;let r=i(59381),a=i(29428),n=i(13133),s=i(69512),o=i(76974),h=i(4581),l=i(95566),d=i(50134),c=i(51071),u=i(54086),g=i(44766),f=i(37694),p=i(6369),m=i(29688),y=i(60663),_=i(41584),v=i(4395),b=i(88552),x=i(93812),S=i(39606),C=i(26067),w=i(55906),P=i(27445),k=i(74912),T=i(75620),A=i(2894),M=i(30441),F=i(32872),R=i(62029),D=i(88709),E=i(67985),G=i(17646),N=i(63360),O=i(43143),L=i(87053),I=i(85204),U=i(84084);e.Konva=r.Konva.Util._assign(r.Konva,{Arc:a.Arc,Arrow:n.Arrow,Circle:s.Circle,Ellipse:o.Ellipse,Image:h.Image,Label:l.Label,Tag:l.Tag,Line:d.Line,Path:c.Path,Rect:u.Rect,RegularPolygon:g.RegularPolygon,Ring:f.Ring,Sprite:p.Sprite,Star:m.Star,Text:y.Text,TextPath:_.TextPath,Transformer:v.Transformer,Wedge:b.Wedge,Filters:{Blur:x.Blur,Brighten:S.Brighten,Contrast:C.Contrast,Emboss:w.Emboss,Enhance:P.Enhance,Grayscale:k.Grayscale,HSL:T.HSL,HSV:A.HSV,Invert:M.Invert,Kaleidoscope:F.Kaleidoscope,Mask:R.Mask,Noise:D.Noise,Pixelate:E.Pixelate,Posterize:G.Posterize,RGB:N.RGB,RGBA:O.RGBA,Sepia:L.Sepia,Solarize:I.Solarize,Threshold:U.Threshold}})},30441:(t,e)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Invert=void 0,e.Invert=function(t){let e=t.data,i=e.length;for(let t=0;t<i;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]}},31568:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;let r=i(94001),a=i(49229),n=i(91941),s=i(14498),o={node:1,duration:1,easing:1,onFinish:1,yoyo:1},h=["fill","stroke","shadowColor"],l=0;class d{constructor(t,e,i,r,a,n,s){this.prop=t,this.propFunc=e,this.begin=r,this._pos=r,this.duration=n,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=i,this._change=a-this.begin,this.pause()}fire(t){let e=this[t];e&&e()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){let t=this.getTimer()-this._startTime;2===this.state?this.setTime(t):3===this.state&&this.setTime(this.duration-t)}pause(){this.state=1,this.fire("onPause")}getTimer(){return new Date().getTime()}}class c{constructor(t){let i,n,h=this,u=t.node,g=u._id,f=t.easing||e.Easings.Linear,p=!!t.yoyo;i=void 0===t.duration?.3:0===t.duration?.001:t.duration,this.node=u,this._id=l++;let m=u.getLayer()||(u instanceof s.Konva.Stage?u.getLayers():null);for(n in m||r.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new a.Animation(function(){h.tween.onEnterFrame()},m),this.tween=new d(n,function(t){h._tweenFunc(t)},f,0,1,1e3*i,p),this._addListeners(),c.attrs[g]||(c.attrs[g]={}),c.attrs[g][this._id]||(c.attrs[g][this._id]={}),c.tweens[g]||(c.tweens[g]={}),t)void 0===o[n]&&this._addAttr(n,t[n]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,e){let i,a,n,s,o,l=this.node,d=l._id,u=c.tweens[d][t];u&&delete c.attrs[d][u][t];let g=l.getAttr(t);if(r.Util._isArray(e))if(i=[],a=Math.max(e.length,g.length),"points"===t&&e.length!==g.length&&(e.length>g.length?(s=g,g=r.Util._prepareArrayForTween(g,e,l.closed())):(n=e,e=r.Util._prepareArrayForTween(e,g,l.closed()))),0===t.indexOf("fill"))for(let t=0;t<a;t++)if(t%2==0)i.push(e[t]-g[t]);else{let a=r.Util.colorToRGBA(g[t]);o=r.Util.colorToRGBA(e[t]),g[t]=a,i.push({r:o.r-a.r,g:o.g-a.g,b:o.b-a.b,a:o.a-a.a})}else for(let t=0;t<a;t++)i.push(e[t]-g[t]);else -1!==h.indexOf(t)?(g=r.Util.colorToRGBA(g),i={r:(o=r.Util.colorToRGBA(e)).r-g.r,g:o.g-g.g,b:o.b-g.b,a:o.a-g.a}):i=e-g;c.attrs[d][this._id][t]={start:g,diff:i,end:e,trueEnd:n,trueStart:s},c.tweens[d][t]=this._id}_tweenFunc(t){let e,i,a,n,s,o,l,d,u=this.node,g=c.attrs[u._id][this._id];for(e in g){if(a=(i=g[e]).start,n=i.diff,d=i.end,r.Util._isArray(a))if(s=[],l=Math.max(a.length,d.length),0===e.indexOf("fill"))for(o=0;o<l;o++)o%2==0?s.push((a[o]||0)+n[o]*t):s.push("rgba("+Math.round(a[o].r+n[o].r*t)+","+Math.round(a[o].g+n[o].g*t)+","+Math.round(a[o].b+n[o].b*t)+","+(a[o].a+n[o].a*t)+")");else for(o=0;o<l;o++)s.push((a[o]||0)+n[o]*t);else s=-1!==h.indexOf(e)?"rgba("+Math.round(a.r+n.r*t)+","+Math.round(a.g+n.g*t)+","+Math.round(a.b+n.b*t)+","+(a.a+n.a*t)+")":a+n*t;u.setAttr(e,s)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{let t=this.node,e=c.attrs[t._id][this._id];e.points&&e.points.trueEnd&&t.setAttr("points",e.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{let t=this.node,e=c.attrs[t._id][this._id];e.points&&e.points.trueStart&&t.points(e.points.trueStart),this.onReset&&this.onReset()}
1,this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(1e3*t),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){let t=this.node._id,e=this._id,i=c.tweens[t];for(let e in this.pause(),this.anim&&this.anim.stop(),i)delete c.tweens[t][e];delete c.attrs[t][e],c.tweens[t]&&(0===Object.keys(c.tweens[t]).length&&delete c.tweens[t],0===Object.keys(c.attrs[t]).length&&delete c.attrs[t])}}e.Tween=c,c.attrs={},c.tweens={},n.Node.prototype.to=function(t){let e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new c(t).play()},e.Easings={BackEaseIn:(t,e,i,r)=>i*(t/=r)*t*(2.70158*t-1.70158)+e,BackEaseOut:(t,e,i,r)=>i*((t=t/r-1)*t*(2.70158*t+1.70158)+1)+e,BackEaseInOut(t,e,i,r){let a=1.70158;return(t/=r/2)<1?i/2*(t*t*(((a*=1.525)+1)*t-a))+e:i/2*((t-=2)*t*(((a*=1.525)+1)*t+a)+2)+e},ElasticEaseIn(t,e,i,r,a,n){let s=0;return 0===t?e:1==(t/=r)?e+i:(n||(n=.3*r),!a||a<Math.abs(i)?(a=i,s=n/4):s=n/(2*Math.PI)*Math.asin(i/a),-(a*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t*r-s)/n))+e)},ElasticEaseOut(t,e,i,r,a,n){let s=0;return 0===t?e:1==(t/=r)?e+i:(n||(n=.3*r),!a||a<Math.abs(i)?(a=i,s=n/4):s=n/(2*Math.PI)*Math.asin(i/a),a*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t*r-s)/n)+i+e)},ElasticEaseInOut(t,e,i,r,a,n){let s=0;return 0===t?e:2==(t/=r/2)?e+i:(n||(n=.3*1.5*r),!a||a<Math.abs(i)?(a=i,s=n/4):s=n/(2*Math.PI)*Math.asin(i/a),t<1)?-.5*(a*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t*r-s)/n))+e:a*Math.pow(2,-10*(t-=1))*Math.sin(2*Math.PI*(t*r-s)/n)*.5+i+e},BounceEaseOut:(t,e,i,r)=>(t/=r)<1/2.75?7.5625*t*t*i+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e,BounceEaseIn:(t,i,r,a)=>r-e.Easings.BounceEaseOut(a-t,0,r,a)+i,BounceEaseInOut:(t,i,r,a)=>t<a/2?.5*e.Easings.BounceEaseIn(2*t,0,r,a)+i:.5*e.Easings.BounceEaseOut(2*t-a,0,r,a)+.5*r+i,EaseIn:(t,e,i,r)=>i*(t/=r)*t+e,EaseOut:(t,e,i,r)=>-i*(t/=r)*(t-2)+e,EaseInOut:(t,e,i,r)=>(t/=r/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e,StrongEaseIn:(t,e,i,r)=>i*(t/=r)*t*t*t*t+e,StrongEaseOut:(t,e,i,r)=>i*((t=t/r-1)*t*t*t*t+1)+e,StrongEaseInOut:(t,e,i,r)=>(t/=r/2)<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e,Linear:(t,e,i,r)=>i*t/r+e}},32598:(t,e,i)=>{"use strict";let r;Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;let a=i(14498),n=i(94001),s=i(73409),o=i(91941),h=i(54990),l=i(14498),d=i(78267),c="hasShadow",u="shadowRGBA",g="patternImage",f="linearGradient",p="radialGradient";function m(){return r||(r=n.Util.createCanvasElement().getContext("2d"))}e.shapes={};class y extends o.Node{constructor(t){let i;for(super(t);!(i=n.Util.getRandomColor())||i in e.shapes;);this.colorKey=i,e.shapes[i]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(g,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let t=m().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(t&&t.setTransform){let e=new n.Transform;e.translate(this.fillPatternX(),this.fillPatternY()),e.rotate(a.Konva.getAngle(this.fillPatternRotation())),e.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),e.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let i=e.getMatrix(),r="undefined"==typeof DOMMatrix?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);t.setTransform(r)}return t}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){let t=this.fillLinearGradientColorStops();if(t){let e=m(),i=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),a=e.createLinearGradient(i.x,i.y,r.x,r.y);for(let e=0;e<t.length;e+=2)a.addColorStop(t[e],t[e+1]);return a}}_getRadialGradient(){return this._getCache(p,this.__getRadialGradient)}__getRadialGradient(){let t=this.fillRadialGradientColorStops();if(t){let e=m(),i=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),a=e.createRadialGradient(i.x,i.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius());for(let e=0;e<t.length;e+=2)a.addColorStop(t[e],t[e+1]);return a}}getShadowRGBA(){return this._getCache(u,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;let t=n.Util.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}
1hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){let t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){let e=this.getStage();if(!e)return!1;let i=e.bufferHitCanvas;return i.getContext().clear(),this.drawHit(i,void 0,!0),i.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return o.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;if(!(null==(e=this.attrs.perfectDrawEnabled)||e))return!1;let i=t||this.hasFill(),r=this.hasStroke(),a=1!==this.getAbsoluteOpacity();if(i&&r&&a)return!0;let n=this.hasShadow(),s=this.shadowForStrokeEnabled();return!!i&&!!r&&!!n&&!!s}setStrokeHitEnabled(t){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){let t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let e=!1,i=this.getParent();for(;i;){if(i.isCached()){e=!0;break}i=i.getParent()}let r=t.skipTransform,a=t.relativeTo||e&&this.getStage()||void 0,n=this.getSelfRect(),s=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,o=n.width+s,h=n.height+s,l=!t.skipShadow&&this.hasShadow(),d=l?this.shadowOffsetX():0,c=l?this.shadowOffsetY():0,u=o+Math.abs(d),g=h+Math.abs(c),f=l&&this.shadowBlur()||0,p={width:u+2*f,height:g+2*f,x:-(s/2+f)+Math.min(d,0)+n.x,y:-(s/2+f)+Math.min(c,0)+n.y};return r?p:this._transformedRect(p,a)}drawScene(t,e,i){let r,a=this.getLayer(),n=(t||a.getCanvas()).getContext(),s=this._getCanvasCache(),o=this.getSceneFunc(),h=this.hasShadow(),l=e===this;if(!this.isVisible()&&!l)return this;if(s){n.save();let t=this.getAbsoluteTransform(e).getMatrix();return n.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedSceneCanvas(n),n.restore(),this}if(!o)return this;if(n.save(),this._useBufferCanvas()&&1){r=this.getStage();let t=i||r.bufferCanvas,a=t.getContext();a.clear(),a.save(),a._applyLineJoin(this);let s=this.getAbsoluteTransform(e).getMatrix();a.transform(s[0],s[1],s[2],s[3],s[4],s[5]),o.call(this,a,this),a.restore();let l=t.pixelRatio;h&&n._applyShadow(this),n._applyOpacity(this),n._applyGlobalCompositeOperation(this),n.drawImage(t._canvas,t.x||0,t.y||0,t.width/l,t.height/l)}else{if(n._applyLineJoin(this),!l){let t=this.getAbsoluteTransform(e).getMatrix();n.transform(t[0],t[1],t[2],t[3],t[4],t[5]),n._applyOpacity(this),n._applyGlobalCompositeOperation(this)}h&&n._applyShadow(this),o.call(this,n,this)}return n.restore(),this}drawHit(t,e,i=!1){if(!this.shouldDrawHit(e,i))return this;let r=this.getLayer(),a=t||r.hitCanvas,s=a&&a.getContext(),o=this.hitFunc()||this.sceneFunc(),h=this._getCanvasCache(),l=h&&h.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),l){s.save();let t=this.getAbsoluteTransform(e).getMatrix();return s.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedHitCanvas(s),s.restore(),this}if(!o)return this;if(s.save(),s._applyLineJoin(this),this!==e){let t=this.getAbsoluteTransform(e).getMatrix();s.transform(t[0],t[1],t[2],t[3],t[4],t[5])}return o.call(this,s,this),s.restore(),this}drawHitFromCache(t=0){let e=this._getCanvasCache(),i=this._getCachedSceneCanvas(),r=e.hit,a=r.getContext(),s=r.getWidth(),o=r.getHeight();a.clear(),a.drawImage(i._canvas,0,0,s,o);try{let e=a.getImageData(0,0,s,o),i=e.data,r=i.length,h=n.Util._hexToRgb(this.colorKey);for(let e=0;e<r;e+=4)i[e+3]>t?(i[e]=h.r,i[e+1]=h.g,i[e+2]=h.b,i[e+3]=255):i[e+3]=0;a.putImageData(e,0,0)}
1catch(t){n.Util.error("Unable to draw hit graph from cached scene canvas. "+t.message)}return this}hasPointerCapture(t){return d.hasPointerCapture(t,this)}setPointerCapture(t){d.setPointerCapture(t,this)}releaseCapture(t){d.releaseCapture(t,this)}}e.Shape=y,y.prototype._fillFunc=function(t){let e=this.attrs.fillRule;e?t.fill(e):t.fill()},y.prototype._strokeFunc=function(t){t.stroke()},y.prototype._fillFuncHit=function(t){let e=this.attrs.fillRule;e?t.fill(e):t.fill()},y.prototype._strokeFuncHit=function(t){t.stroke()},y.prototype._centroid=!1,y.prototype.nodeType="Shape",(0,l._registerNode)(y),y.prototype.eventListeners={},y.prototype.on.call(y.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(c)}),y.prototype.on.call(y.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(u)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",function(){this._clearCache(g)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",function(){this._clearCache(f)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",function(){this._clearCache(p)}),s.Factory.addGetterSetter(y,"stroke",void 0,(0,h.getStringOrGradientValidator)()),s.Factory.addGetterSetter(y,"strokeWidth",2,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"fillAfterStrokeEnabled",!1),s.Factory.addGetterSetter(y,"hitStrokeWidth","auto",(0,h.getNumberOrAutoValidator)()),s.Factory.addGetterSetter(y,"strokeHitEnabled",!0,(0,h.getBooleanValidator)()),s.Factory.addGetterSetter(y,"perfectDrawEnabled",!0,(0,h.getBooleanValidator)()),s.Factory.addGetterSetter(y,"shadowForStrokeEnabled",!0,(0,h.getBooleanValidator)()),s.Factory.addGetterSetter(y,"lineJoin"),s.Factory.addGetterSetter(y,"lineCap"),s.Factory.addGetterSetter(y,"sceneFunc"),s.Factory.addGetterSetter(y,"hitFunc"),s.Factory.addGetterSetter(y,"dash"),s.Factory.addGetterSetter(y,"dashOffset",0,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"shadowColor",void 0,(0,h.getStringValidator)()),s.Factory.addGetterSetter(y,"shadowBlur",0,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"shadowOpacity",1,(0,h.getNumberValidator)()),s.Factory.addComponentsGetterSetter(y,"shadowOffset",["x","y"]),s.Factory.addGetterSetter(y,"shadowOffsetX",0,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"shadowOffsetY",0,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"fillPatternImage"),s.Factory.addGetterSetter(y,"fill",void 0,(0,h.getStringOrGradientValidator)()),s.Factory.addGetterSetter(y,"fillPatternX",0,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"fillPatternY",0,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"fillLinearGradientColorStops"),s.Factory.addGetterSetter(y,"strokeLinearGradientColorStops"),s.Factory.addGetterSetter(y,"fillRadialGradientStartRadius",0),s.Factory.addGetterSetter(y,"fillRadialGradientEndRadius",0),s.Factory.addGetterSetter(y,"fillRadialGradientColorStops"),s.Factory.addGetterSetter(y,"fillPatternRepeat","repeat"),s.Factory.addGetterSetter(y,"fillEnabled",!0),s.Factory.addGetterSetter(y,"strokeEnabled",!0),s.Factory.addGetterSetter(y,"shadowEnabled",!0),s.Factory.addGetterSetter(y,"dashEnabled",!0),s.Factory.addGetterSetter(y,"strokeScaleEnabled",!0),s.Factory.addGetterSetter(y,"fillPriority","color"),s.Factory.addComponentsGetterSetter(y,"fillPatternOffset",["x","y"]),s.Factory.addGetterSetter(y,"fillPatternOffsetX",0,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"fillPatternOffsetY",0,(0,h.getNumberValidator)()),s.Factory.addComponentsGetterSetter(y,"fillPatternScale",["x","y"]),s.Factory.addGetterSetter(y,"fillPatternScaleX",1,(0,h.getNumberValidator)()),s.Factory.addGetterSetter(y,"fillPatternScaleY",1,(0,h.getNumberValidator)()),s.Factory.addComponentsGetterSetter(y,"fillLinearGradientStartPoint",["x","y"]),s.Factory.addComponentsGetterSetter(y,"strokeLinearGradientStartPoint",["x","y"]),s.Factory.addGetterSetter(y,"fillLinearGradientStartPointX",0),s.Factory.addGetterSetter(y,"strokeLinearGradientStartPointX",0),s.Factory.addGetterSetter(y,"fillLinearGradientStartPointY",0),s.Factory.addGetterSetter(y,"strokeLinearGradientStartPointY",0),s.Factory.addComponentsGetterSetter(y,"fillLinearGradientEndPoint",["x","y"]),s.Factory.addComponentsGetterSetter(y,"strokeLinearGradientEndPoint",["x","y"]),s.Factory.addGetterSetter(y,"fillLinearGradientEndPointX",0),s.Factory.addGetterSetter(y,"strokeLinearGradientEndPointX",0),s.Factory.addGetterSetter(y,"fillLinearGradientEndPointY",0),s.Factory.addGetterSetter(y,"strokeLinearGradientEndPointY",0),s.Factory.addComponentsGetterSetter(y,"fillRadialGradientStartPoint",["x","y"]),s.Factory.addGetterSetter(y,"fillRadialGradientStartPointX",0),s.Factory.addGetterSetter(y,"fillRadialGradientStartPointY",0),s.Factory.addComponentsGetterSetter(y,"fillRadialGradientEndPoint",["x","y"]),s.Factory.addGetterSetter(y,"fillRadialGradientEndPointX",0),s.Factory.addGetterSetter(y,"fillRadialGradientEndPointY",0),s.Factory.addGetterSetter(y,"fillPatternRotation",0),s.Factory.addGetterSetter(y,"fillRule",void 0,(0,h.getStringValidator)()),s.Factory.backCompat(y,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})},32872:(t,e,i)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Kaleidoscope=void 0;let r=i(73409),a=i(91941),n=i(94001),s=i(54990),o=function(t,e,i){let r=t.data,a=e.data,n=t.width,s=t.height,o=i.polarCenterX||n/2,h=i.polarCenterY||s/2,l=Math.sqrt(o*o+h*h),d=n-o,c=s-h,u=Math.sqrt(d*d+c*c);l=u>l?u:l;let g=360/n*Math.PI/180;for(let t=0;t<n;t+=1){let e=Math.sin(t*g),i=Math.cos(t*g);for(let u=0;u<s;u+=1){d=Math.floor(o+l*u/s*i);let g=((c=Math.floor(h+l*u/s*e))*n+d)*4,f=r[g+0],p=r[g+1],m=r[g+2],y=r[g+3];a[(g=(t+u*n)*4)+0]=f,a[g+1]=p,a[g+2]=m,a[g+3]=y}}},h=function(t,e,i){let r,a=t.data,n=e.data,s=t.width,o=t.height,h=i.polarCenterX||s/2,l=i.polarCenterY||o/2,d=Math.sqrt(h*h+l*l),c=s-h,u=o-l,g=Math.sqrt(c*c+u*u);d=g>d?g:d;let f=i.polarRotation||0;for(c=0;c<s;c+=1)for(u=0;u<o;u+=1){let t=c-h,e=u-l,i=Math.sqrt(t*t+e*e)*o/d,g=(180*Math.atan2(e,t)/Math.PI+360+f)%360;r=Math.floor(g=g*s/360);let p=(Math.floor(i)*s+r)*4,m=a[p+0],y=a[p+1],_=a[p+2],v=a[p+3];n[(p=(u*s+c)*4)+0]=m,n[p+1]=y,n[p+2]=_,n[p+3]=v}};e.Kaleidoscope=function(t){let e,i,r,a,s,l,d,c,u,g,f=t.width,p=t.height,m=Math.round(this.kaleidoscopePower()),y=Math.floor(Math.round(this.kaleidoscopeAngle())%360*f/360);if(m<1)return;let _=n.Util.createCanvasElement();_.width=f,_.height=p;let v=_.getContext("2d").getImageData(0,0,f,p);n.Util.releaseCanvas(_),o(t,v,{polarCenterX:f/2,polarCenterY:p/2});let b=f/Math.pow(2,m);for(;b<=8;)b*=2,m-=1;let x=b=Math.ceil(b),S=0,C=x,w=1;for(y+b>f&&(S=x,C=0,w=-1),i=0;i<p;i+=1)for(e=S;e!==C;e+=w)r=Math.round(e+y)%f,u=(f*i+r)*4,s=v.data[u+0],l=v.data[u+1],d=v.data[u+2],c=v.data[u+3],g=(f*i+e)*4,v.data[g+0]=s,v.data[g+1]=l,v.data[g+2]=d,v.data[g+3]=c;for(i=0;i<p;i+=1)for(a=0,x=Math.floor(b);a<m;a+=1){for(e=0;e<x+1;e+=1)u=(f*i+e)*4,s=v.data[u+0],l=v.data[u+1],d=v.data[u+2],c=v.data[u+3],g=(f*i+2*x-e-1)*4,v.data[g+0]=s,v.data[g+1]=l,v.data[g+2]=d,v.data[g+3]=c;x*=2}h(v,t,{polarRotation:0})},r.Factory.addGetterSetter(a.Node,"kaleidoscopePower",2,(0,s.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"kaleidoscopeAngle",0,(0,s.getNumberValidator)(),r.Factory.afterSetFilter)},33185:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;let r=i(94001),a=i(73409),n=i(13168),s=i(14498),o=i(22465),h=i(64921),l=i(14498),d=i(78267),c="mouseleave",u="mouseover",g="mouseenter",f="mousemove",p="mousedown",m="mouseup",y="pointermove",_="pointerdown",v="pointerup",b="pointercancel",x="pointerout",S="pointerleave",C="pointerover",w="pointerenter",P="contextmenu",k="touchstart",T="touchend",A="touchmove",M="touchcancel",F="wheel",R=[[g,"_pointerenter"],[p,"_pointerdown"],[f,"_pointermove"],[m,"_pointerup"],[c,"_pointerleave"],[k,"_pointerdown"],[A,"_pointermove"],[T,"_pointerup"],[M,"_pointercancel"],[u,"_pointerover"],[F,"_wheel"],[P,"_contextmenu"],[_,"_pointerdown"],[y,"_pointermove"],[v,"_pointerup"],[b,"_pointercancel"],[S,"_pointerleave"],["lostpointercapture","_lostpointercapture"]],D={mouse:{[x]:"mouseout",[S]:c,[C]:u,[w]:g,[y]:f,[_]:p,[v]:m,[b]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[x]:"touchout",[S]:"touchleave",[C]:"touchover",[w]:"touchenter",[y]:A,[_]:k,[v]:T,[b]:M,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[x]:x,[S]:S,[C]:C,[w]:w,[y]:y,[_]:_,[v]:v,[b]:b,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},E=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",G=t=>{let e=E(t);return"pointer"===e?s.Konva.pointerEventsEnabled&&D.pointer:"touch"===e?D.touch:"mouse"===e?D.mouse:void 0};function N(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&r.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}e.stages=[];
1class O extends n.Container{constructor(t){super(N(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{N(this.attrs)}),this._checkVisibility()}_validateAdd(t){let e="Layer"===t.getType(),i="FastLayer"===t.getType();e||i||r.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;let t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if("string"==typeof t){let e;if("."===t.charAt(0)){let e=t.slice(1);t=document.getElementsByClassName(e)[0]}else e="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(e);if(!t)throw"Can not find container in document with id "+e}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){let t=this.children,e=t.length;for(let i=0;i<e;i++)t[i].clear();return this}clone(t){return t||(t={}),t.container="undefined"!=typeof document&&document.createElement("div"),n.Container.prototype.clone.call(this,t)}destroy(){super.destroy();let t=this.content;t&&r.Util._isInDocument(t)&&this.container().removeChild(t);let i=e.stages.indexOf(this);return i>-1&&e.stages.splice(i,1),r.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){let t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(r.Util.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}_getPointerById(t){return this._pointerPositions.find(e=>e.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){(t=t||{}).x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();let e=new o.SceneCanvas({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),i=e.getContext()._context,r=this.children;return(t.x||t.y)&&i.translate(-1*t.x,-1*t.y),r.forEach(function(e){if(!e.isVisible())return;let r=e._toKonvaCanvas(t);i.drawImage(r._canvas,t.x,t.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}),e}getIntersection(t){if(!t)return null;let e=this.children,i=e.length-1;for(let r=i;r>=0;r--){let i=e[r].getIntersection(t);if(i)return i}return null}_resizeDOM(){let t=this.width(),e=this.height();this.content&&(this.content.style.width=t+"px",this.content.style.height=e+"px"),this.bufferCanvas.setSize(t,e),this.bufferHitCanvas.setSize(t,e),this.children.forEach(i=>{i.setSize({width:t,height:e}),i.draw()})}add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}super.add(t);let e=this.children.length;return e>5&&r.Util.warn("The stage has "+e+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),s.Konva.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return d.hasPointerCapture(t,this)}setPointerCapture(t){d.setPointerCapture(t,this)}releaseCapture(t){d.releaseCapture(t,this)}getLayers(){return this.children}_bindContentEvents(){s.Konva.isBrowser&&R.forEach(([t,e])=>{this.content.addEventListener(t,t=>{this[e](t)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);let e=G(t.type);e&&this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);let e=G(t.type);e&&this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}_pointerleave(t){let e=G(t.type),i=E(t.type);if(!e)return;this.setPointersPositions(t);let r=this._getTargetShape(i),a=!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled;r&&a?(r._fireAndBubble(e.pointerout,{evt:t}),r._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[i+"targetShape"]=null):a&&(this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(e.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){let e=G(t.type),i=E(t.type);if(!e)return;this.setPointersPositions(t);let r=!1;this._changedPointerPositions.forEach(a=>{let n=this.getIntersection(a);if(h.DD.justDragged=!1,s.Konva["_"+i+"ListenClick"]=!0,!n||!n.isListening()){this[i+"ClickStartShape"]=void 0;return}s.Konva.capturePointerEventsEnabled&&n.setPointerCapture(a.id),this[i+"ClickStartShape"]=n,n._fireAndBubble(e.pointerdown,{evt:t,pointerId:a.id}),r=!0;let o=t.type.indexOf("touch")>=0;n.preventDefault()&&t.cancelable&&o&&t.preventDefault()}),r||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){let e=G(t.type),i=E(t.type);if(!e||(s.Konva.isDragging()&&h.DD.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t),!(!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled)))return;let r={},a=!1,n=this._getTargetShape(i);this._changedPointerPositions.forEach(s=>{let o=d.getCapturedShape(s.id)||this.getIntersection(s),h=s.id,l={evt:t,pointerId:h},c=n!==o;if(c&&n&&(n._fireAndBubble(e.pointerout,{...l},o),n._fireAndBubble(e.pointerleave,{...l},o)),o){if(r[o._id])return;r[o._id]=!0}o&&o.isListening()?(a=!0,c&&(o._fireAndBubble(e.pointerover,{...l},n),o._fireAndBubble(e.pointerenter,{...l},n),this[i+"targetShape"]=o),o._fireAndBubble(e.pointermove,{...l})):n&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[i+"targetShape"]=null)}),a||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){let e=G(t.type),i=E(t.type);if(!e)return;this.setPointersPositions(t);let r=this[i+"ClickStartShape"],a=this[i+"ClickEndShape"],n={},o=!1;this._changedPointerPositions.forEach(l=>{let c=d.getCapturedShape(l.id)||this.getIntersection(l);if(c){if(c.releaseCapture(l.id),n[c._id])return;n[c._id]=!0}let u=l.id,g={evt:t,pointerId:u},f=!1;s.Konva["_"+i+"InDblClickWindow"]?(f=!0,clearTimeout(this[i+"DblTimeout"])):h.DD.justDragged||(s.Konva["_"+i+"InDblClickWindow"]=!0,clearTimeout(this[i+"DblTimeout"])),this[i+"DblTimeout"]=setTimeout(function(){s.Konva["_"+i+"InDblClickWindow"]=!1}
1,s.Konva.dblClickWindow),c&&c.isListening()?(o=!0,this[i+"ClickEndShape"]=c,c._fireAndBubble(e.pointerup,{...g}),s.Konva["_"+i+"ListenClick"]&&r&&r===c&&(c._fireAndBubble(e.pointerclick,{...g}),f&&a&&a===c&&c._fireAndBubble(e.pointerdblclick,{...g}))):(this[i+"ClickEndShape"]=null,s.Konva["_"+i+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:u}),f&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:u}))}),o||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),s.Konva["_"+i+"ListenClick"]=!1,t.cancelable&&"touch"!==i&&"pointer"!==i&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);let e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(P,{evt:t}):this._fire(P,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);let e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(F,{evt:t}):this._fire(F,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);let e=d.getCapturedShape(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(v,d.createEvent(t)),d.releaseCapture(t.pointerId)}_lostpointercapture(t){d.releaseCapture(t.pointerId)}setPointersPositions(t){let e=this._getContentPosition(),i=null,a=null;void 0!==(t=t||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,t=>{this._pointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,t=>{this._changedPointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})})):(i=(t.clientX-e.left)/e.scaleX,a=(t.clientY-e.top)/e.scaleY,this.pointerPos={x:i,y:a},this._pointerPositions=[{x:i,y:a,id:r.Util._getFirstPointerId(t)}],this._changedPointerPositions=[{x:i,y:a,id:r.Util._getFirstPointerId(t)}])}_setPointerPosition(t){r.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};let t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!s.Konva.isBrowser)return;let t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return r.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}
1batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}e.Stage=O,O.prototype.nodeType="Stage",(0,l._registerNode)(O),a.Factory.addGetterSetter(O,"container"),s.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(t=>{t.batchDraw()})})},33696:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},37694:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ring=void 0;let r=i(73409),a=i(32598),n=i(54990),s=i(14498),o=2*Math.PI;class h extends a.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,o,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),o,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}e.Ring=h,h.prototype.className="Ring",h.prototype._centroid=!0,h.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(h),r.Factory.addGetterSetter(h,"innerRadius",0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(h,"outerRadius",0,(0,n.getNumberValidator)())},39606:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Brighten=void 0;let r=i(73409),a=i(91941),n=i(54990);e.Brighten=function(t){let e=255*this.brightness(),i=t.data,r=i.length;for(let t=0;t<r;t+=4)i[t]+=e,i[t+1]+=e,i[t+2]+=e},r.Factory.addGetterSetter(a.Node,"brightness",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},41473:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Layer=void 0;let r=i(94001),a=i(13168),n=i(91941),s=i(73409),o=i(22465),h=i(54990),l=i(32598),d=i(14498),c=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],u=c.length;
1class g extends a.Container{constructor(t){super(t),this.canvas=new o.SceneCanvas,this.hitCanvas=new o.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);let e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){n.Node.prototype.moveToTop.call(this);let t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!n.Node.prototype.moveUp.call(this))return!1;let t=this.getStage();return!!t&&!!t.content&&(t.content.removeChild(this.getNativeCanvasElement()),this.index<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[this.index+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(n.Node.prototype.moveDown.call(this)){let t=this.getStage();if(t){let e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(n.Node.prototype.moveToBottom.call(this)){let t=this.getStage();if(t){let e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){let t=this.getNativeCanvasElement();return n.Node.prototype.remove.call(this),t&&t.parentNode&&r.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){let e=t.getType();"Group"!==e&&"Shape"!==e&&r.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return(t=t||{}).width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=void 0!==t.x?t.x:this.x(),t.y=void 0!==t.y?t.y:this.y(),n.Node.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){r.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){r.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,r.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let e=1,i=!1;for(;;){for(let r=0;r<u;r++){let a=c[r],n=this._getIntersection({x:t.x+a.x*e,y:t.y+a.y*e}),s=n.shape;if(s)return s;if(i=!!n.antialiased,!n.antialiased)break}if(!i)return null;e+=1}}_getIntersection(t){let e=this.hitCanvas.pixelRatio,i=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,a=i[3];if(255===a){let t=r.Util._rgbToHex(i[0],i[1],i[2]),e=l.shapes["#"+t];return e?{shape:e}:{antialiased:!0}}return a>0?{antialiased:!0}:{}}drawScene(t,e,i){let r=this.getLayer(),n=t||r&&r.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&n.getContext().clear(),a.Container.prototype.drawScene.call(this,n,e,i),this._fire("draw",{node:this}),this}drawHit(t,e){let i=this.getLayer(),r=t||i&&i.hitCanvas;return i&&i.clearBeforeDraw()&&i.getHitCanvas().getContext().clear(),a.Container.prototype.drawHit.call(this,r,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;let t=this.parent;this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return r.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}e.Layer=g,g.prototype.nodeType="Layer",(0,d._registerNode)(g),s.Factory.addGetterSetter(g,"imageSmoothingEnabled",!0),s.Factory.addGetterSetter(g,"clearBeforeDraw",!0),s.Factory.addGetterSetter(g,"hitGraphEnabled",!0,(0,h.getBooleanValidator)())},41584:(t,e,i)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.TextPath=void 0;let r=i(94001),a=i(73409),n=i(32598),s=i(51071),o=i(60663),h=i(54990),l=i(14498),d="normal";function c(t){t.fillText(this.partialText,0,0)}function u(t){t.strokeText(this.partialText,0,0)}class g extends n.Shape{constructor(t){super(t),this.dummyCanvas=r.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return s.Path.getPathLength(this.dataArray)}_getPointAtLength(t){return!this.attrs.data||t-1>this.pathLength?null:s.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=s.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();let e=this.textDecoration(),i=this.fill(),r=this.fontSize(),a=this.glyphInfo;"underline"===e&&t.beginPath();for(let i=0;i<a.length;i++){t.save();let n=a[i].p0;t.translate(n.x,n.y),t.rotate(a[i].rotation),this.partialText=a[i].text,t.fillStrokeShape(this),"underline"===e&&(0===i&&t.moveTo(0,r/2+1),t.lineTo(r,r/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=i,t.lineWidth=r/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();let e=this.glyphInfo;if(e.length>=1){let i=e[0].p0;t.moveTo(i.x,i.y)}for(let i=0;i<e.length;i++){let r=e[i].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return r.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return o.Text.prototype.setText.call(this,t)}_getContextFont(){return o.Text.prototype._getContextFont.call(this)}_getTextSize(t){let e=this.dummyCanvas.getContext("2d");e.save(),e.font=this._getContextFont();let i=e.measureText(t);return e.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){let{width:t,height:e}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=e,this.glyphInfo=[],!this.attrs.data)return null;let i=this.letterSpacing(),r=this.align(),a=this.kerningFunc(),n=Math.max(this.textWidth+((this.attrs.text||"").length-1)*i,0),h=0;"center"===r&&(h=Math.max(0,this.pathLength/2-n/2)),"right"===r&&(h=Math.max(0,this.pathLength-n));let l=(0,o.stringToArray)(this.text()),d=h;for(let t=0;t<l.length;t++){let e=this._getPointAtLength(d);if(!e)return;let o=this._getTextSize(l[t]).width+i;if(" "===l[t]&&"justify"===r){let t=this.text().split(" ").length-1;o+=(this.pathLength-n)/t}let h=this._getPointAtLength(d+o);if(!h)return;let c=s.Path.getLineLength(e.x,e.y,h.x,h.y),u=0;if(a)try{u=a(l[t-1],l[t])*this.fontSize()}catch(t){u=0}e.x+=u,h.x+=u,this.textWidth+=u;let g=s.Path.getPointOnLine(u+c/2,e.x,e.y,h.x,h.y),f=Math.atan2(h.y-e.y,h.x-e.x);this.glyphInfo.push({transposeX:g.x,transposeY:g.y,text:l[t],rotation:f,p0:e,p1:h}),d+=o}}getSelfRect(){let t,e;if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};let i=[];this.glyphInfo.forEach(function(t){i.push(t.p0.x),i.push(t.p0.y),i.push(t.p1.x),i.push(t.p1.y)});let r=i[0]||0,a=i[0]||0,n=i[1]||0,s=i[1]||0;for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],r=Math.min(r,t),a=Math.max(a,t),n=Math.min(n,e),s=Math.max(s,e);let o=this.fontSize();return{x:r-o/2,y:n-o/2,width:a-r+o,height:s-n+o}}destroy(){return r.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}e.TextPath=g,g.prototype._fillFunc=c,g.prototype._strokeFunc=u,g.prototype._fillFuncHit=c,g.prototype._strokeFuncHit=u,g.prototype.className="TextPath",g.prototype._attrsAffectingSize=["text","fontSize","data"],(0,l._registerNode)(g),a.Factory.addGetterSetter(g,"data"),a.Factory.addGetterSetter(g,"fontFamily","Arial"),a.Factory.addGetterSetter(g,"fontSize",12,(0,h.getNumberValidator)()),a.Factory.addGetterSetter(g,"fontStyle",d),a.Factory.addGetterSetter(g,"align","left"),a.Factory.addGetterSetter(g,"letterSpacing",0,(0,h.getNumberValidator)()),a.Factory.addGetterSetter(g,"textBaseline","middle"),a.Factory.addGetterSetter(g,"fontVariant",d),a.Factory.addGetterSetter(g,"text",""),a.Factory.addGetterSetter(g,"textDecoration",""),a.Factory.addGetterSetter(g,"kerningFunc",void 0)},43143:(t,e,i)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA=void 0;let r=i(73409),a=i(91941),n=i(54990);e.RGBA=function(t){let e=t.data,i=e.length,r=this.red(),a=this.green(),n=this.blue(),s=this.alpha();for(let t=0;t<i;t+=4){let i=1-s;e[t]=r*s+e[t]*i,e[t+1]=a*s+e[t+1]*i,e[t+2]=n*s+e[t+2]*i}},r.Factory.addGetterSetter(a.Node,"red",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(a.Node,"green",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(a.Node,"blue",0,n.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"alpha",1,function(t){return(this._filterUpToDate=!1,t>1)?1:t<0?0:t})},44328:(t,e,i)=>{var r=i(6452),a=i(99759),n=i(97768),s=0/0,o=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(n(t))return s;if(a(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=a(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var i=h.test(t);return i||l.test(t)?d(t.slice(2),i?2:8):o.test(t)?s:+t}},44766:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegularPolygon=void 0;let r=i(73409),a=i(32598),n=i(54990),s=i(14498);class o extends a.Shape{_sceneFunc(t){let e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(let i=1;i<e.length;i++)t.lineTo(e[i].x,e[i].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){let t=this.attrs.sides,e=this.attrs.radius||0,i=[];for(let r=0;r<t;r++)i.push({x:e*Math.sin(2*r*Math.PI/t),y:-1*e*Math.cos(2*r*Math.PI/t)});return i}getSelfRect(){let t=this._getPoints(),e=t[0].x,i=t[0].y,r=t[0].x,a=t[0].y;return t.forEach(t=>{e=Math.min(e,t.x),i=Math.max(i,t.x),r=Math.min(r,t.y),a=Math.max(a,t.y)}),{x:e,y:r,width:i-e,height:a-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}e.RegularPolygon=o,o.prototype.className="RegularPolygon",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"radius",0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(o,"sides",0,(0,n.getNumberValidator)())},49229:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Animation=void 0;let r=i(14498),a=i(94001),n=r.glob.performance&&r.glob.performance.now?function(){return r.glob.performance.now()}:function(){return new Date().getTime()};class s{constructor(t,e){this.id=s.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:n(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){let e=[];return t&&(e=Array.isArray(t)?t:[t]),this.layers=e,this}getLayers(){return this.layers}addLayer(t){let e=this.layers,i=e.length;for(let r=0;r<i;r++)if(e[r]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){let t=s.animations,e=t.length;for(let i=0;i<e;i++)if(t[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=n(),s._addAnimation(this),this}stop(){return s._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){let e=t.id,i=this.animations,r=i.length;for(let t=0;t<r;t++)if(i[t].id===e){this.animations.splice(t,1);break}}static _runFrames(){let t={},e=this.animations;for(let i=0;i<e.length;i++){let r=e[i],a=r.layers,s=r.func;r._updateFrameObject(n());let o=a.length;if(!s||!1!==s.call(r,r.frame))for(let e=0;e<o;e++){let i=a[e];void 0!==i._id&&(t[i._id]=i)}}for(let e in t)t.hasOwnProperty(e)&&t[e].batchDraw()}static _animationLoop(){s.animations.length?(s._runFrames(),a.Util.requestAnimFrame(s._animationLoop)):s.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,a.Util.requestAnimFrame(this._animationLoop))}}e.Animation=s,s.animations=[],s.animIdCounter=0,s.animRunning=!1},50134:(t,e,i)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Line=void 0;let r=i(73409),a=i(14498),n=i(32598),s=i(54990);function o(t,e,i,r,a,n,s){let o=Math.sqrt(Math.pow(i-t,2)+Math.pow(r-e,2)),h=Math.sqrt(Math.pow(a-i,2)+Math.pow(n-r,2)),l=s*o/(o+h),d=s*h/(o+h);return[i-l*(a-t),r-l*(n-e),i+d*(a-t),r+d*(n-e)]}function h(t,e){let i=t.length,r=[];for(let a=2;a<i-2;a+=2){let i=o(t[a-2],t[a-1],t[a],t[a+1],t[a+2],t[a+3],e);isNaN(i[0])||(r.push(i[0]),r.push(i[1]),r.push(t[a]),r.push(t[a+1]),r.push(i[2]),r.push(i[3]))}return r}class l extends n.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){let e=this.points(),i=e.length,r=this.tension(),a=this.closed(),n=this.bezier();if(!i)return;let s=0;if(t.beginPath(),t.moveTo(e[0],e[1]),0!==r&&i>4){let r=this.getTensionPoints(),n=r.length;for(s=4*!a,a||t.quadraticCurveTo(r[0],r[1],r[2],r[3]);s<n-2;)t.bezierCurveTo(r[s++],r[s++],r[s++],r[s++],r[s++],r[s++]);a||t.quadraticCurveTo(r[n-2],r[n-1],e[i-2],e[i-1])}else if(n)for(s=2;s<i;)t.bezierCurveTo(e[s++],e[s++],e[s++],e[s++],e[s++],e[s++]);else for(s=2;s<i;s+=2)t.lineTo(e[s],e[s+1]);a?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():h(this.points(),this.tension())}_getTensionPointsClosed(){let t=this.points(),e=t.length,i=this.tension(),r=o(t[e-2],t[e-1],t[0],t[1],t[2],t[3],i),a=o(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],i),n=h(t,i);return[r[2],r[3]].concat(n).concat([a[0],a[1],t[e-2],t[e-1],a[2],a[3],r[0],r[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t,e,i=this.points();if(i.length<4)return{x:i[0]||0,y:i[1]||0,width:0,height:0};let r=(i=0!==this.tension()?[i[0],i[1],...this._getTensionPoints(),i[i.length-2],i[i.length-1]]:this.points())[0],a=i[0],n=i[1],s=i[1];for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],r=Math.min(r,t),a=Math.max(a,t),n=Math.min(n,e),s=Math.max(s,e);return{x:r,y:n,width:a-r,height:s-n}}}e.Line=l,l.prototype.className="Line",l.prototype._attrsAffectingSize=["points","bezier","tension"],(0,a._registerNode)(l),r.Factory.addGetterSetter(l,"closed",!1),r.Factory.addGetterSetter(l,"bezier",!1),r.Factory.addGetterSetter(l,"tension",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(l,"points",[],(0,s.getNumberArrayValidator)())},51071:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Path=void 0;let r=i(73409),a=i(14498),n=i(32598),s=i(72763);class o extends n.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=o.parsePathData(this.data()),this.pathLength=o.getPathLength(this.dataArray)}_sceneFunc(t){let e=this.dataArray;t.beginPath();let i=!1;for(let r=0;r<e.length;r++){let a=e[r].command,n=e[r].points;switch(a){case"L":t.lineTo(n[0],n[1]);break;case"M":t.moveTo(n[0],n[1]);break;case"C":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"Q":t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case"A":let s=n[0],o=n[1],h=n[2],l=n[3],d=n[4],c=n[5],u=n[6],g=n[7],f=h>l?h:l,p=h>l?1:h/l,m=h>l?l/h:1;t.translate(s,o),t.rotate(u),t.scale(p,m),t.arc(0,0,f,d,d+c,1-g),t.scale(1/p,1/m),t.rotate(-u),t.translate(-s,-o);break;case"z":i=!0,t.closePath()}}i||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){let t,e,i=[];this.dataArray.forEach(function(t){if("A"===t.command){let e=t.points[4],r=t.points[5],a=t.points[4]+r,n=Math.PI/180;if(Math.abs(e-a)<n&&(n=Math.abs(e-a)),r<0)for(let r=e-n;r>a;r-=n){let e=o.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);i.push(e.x,e.y)}else for(let r=e+n;r<a;r+=n){let e=o.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);i.push(e.x,e.y)}}else if("C"===t.command)for(let e=0;e<=1;e+=.01){let r=o.getPointOnCubicBezier(e,t.start.x,t.start.y,t.points[0],t.points[1],t.points[2],t.points[3],t.points[4],t.points[5]);i.push(r.x,r.y)}else i=i.concat(t.points)});let r=i[0],a=i[0],n=i[1],s=i[1];for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],isNaN(t)||(r=Math.min(r,t),a=Math.max(a,t)),isNaN(e)||(n=Math.min(n,e),s=Math.max(s,e));return{x:r,y:n,width:a-r,height:s-n}}getLength(){return this.pathLength}getPointAtLength(t){return o.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,e,i,r){return Math.sqrt((i-t)*(i-t)+(r-e)*(r-e))}static getPathLength(t){let e=0;for(let i=0;i<t.length;++i)e+=t[i].pathLength;return e}static getPointAtLengthOfDataArray(t,e){let i,r=0,a=e.length;if(!a)return null;for(;r<a&&t>e[r].pathLength;)t-=e[r].pathLength,++r;if(r===a)return{x:(i=e[r-1].points.slice(-2))[0],y:i[1]};if(t<.01)return"M"===e[r].command?{x:(i=e[r].points.slice(0,2))[0],y:i[1]}:{x:e[r].start.x,y:e[r].start.y};let n=e[r],h=n.points;switch(n.command){case"L":return o.getPointOnLine(t,n.start.x,n.start.y,h[0],h[1]);case"C":return o.getPointOnCubicBezier((0,s.t2length)(t,o.getPathLength(e),t=>(0,s.getCubicArcLength)([n.start.x,h[0],h[2],h[4]],[n.start.y,h[1],h[3],h[5]],t)),n.start.x,n.start.y,h[0],h[1],h[2],h[3],h[4],h[5]);case"Q":return o.getPointOnQuadraticBezier((0,s.t2length)(t,o.getPathLength(e),t=>(0,s.getQuadraticArcLength)([n.start.x,h[0],h[2]],[n.start.y,h[1],h[3]],t)),n.start.x,n.start.y,h[0],h[1],h[2],h[3]);case"A":let l=h[0],d=h[1],c=h[2],u=h[3],g=h[5],f=h[6],p=h[4];return p+=g*t/n.pathLength,o.getPointOnEllipticalArc(l,d,c,u,p,f)}return null}static getPointOnLine(t,e,i,r,a,n,s){n=null!=n?n:e,s=null!=s?s:i;let o=this.getLineLength(e,i,r,a);if(o<1e-10)return{x:e,y:i};if(r===e)return{x:n,y:s+(a>i?t:-t)};
1let h=(a-i)/(r-e),l=Math.sqrt(t*t/(1+h*h))*(r<e?-1:1);if(1e-10>Math.abs(s-i-h*(n-e)))return{x:n+l,y:s+h*l};let d=((n-e)*(r-e)+(s-i)*(a-i))/(o*o),c=e+d*(r-e),u=i+d*(a-i),g=this.getLineLength(n,s,c,u),f=Math.sqrt(t*t-g*g),p=Math.sqrt(f*f/(1+h*h))*(r<e?-1:1);return{x:c+p,y:u+h*p}}static getPointOnCubicBezier(t,e,i,r,a,n,s,o,h){function l(t){return 3*t*(1-t)*(1-t)}return{x:t*t*t*o+3*t*t*(1-t)*n+r*l(t)+(1-t)*(1-t)*(1-t)*e,y:t*t*t*h+3*t*t*(1-t)*s+a*l(t)+(1-t)*(1-t)*(1-t)*i}}static getPointOnQuadraticBezier(t,e,i,r,a,n,s){return{x:t*t*n+2*t*(1-t)*r+(1-t)*(1-t)*e,y:t*t*s+2*t*(1-t)*a+(1-t)*(1-t)*i}}static getPointOnEllipticalArc(t,e,i,r,a,n){let s=Math.cos(n),o=Math.sin(n),h={x:i*Math.cos(a),y:r*Math.sin(a)};return{x:t+(h.x*s-h.y*o),y:e+(h.x*o+h.y*s)}}static parsePathData(t){let e;if(!t)return[];let i=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(RegExp(" ","g"),",");for(let t=0;t<r.length;t++)i=i.replace(RegExp(r[t],"g"),"|"+r[t]);let a=i.split("|"),n=[],s=[],o=0,h=0,l=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(let t=1;t<a.length;t++){let i=a[t],r=i.charAt(0);for(i=i.slice(1),s.length=0;e=l.exec(i);)s.push(e[0]);let d=[];for(let t=0,e=s.length;t<e;t++){if("00"===s[t]){d.push(0,0);continue}let e=parseFloat(s[t]);isNaN(e)?d.push(0):d.push(e)}for(;d.length>0;){let t,e,i,a,s,l,c,u,g,f;if(isNaN(d[0]))break;let p="",m=[],y=o,_=h;switch(r){case"l":o+=d.shift(),h+=d.shift(),p="L",m.push(o,h);break;case"L":o=d.shift(),h=d.shift(),m.push(o,h);break;case"m":let v=d.shift(),b=d.shift();if(o+=v,h+=b,p="M",n.length>2&&"z"===n[n.length-1].command){for(let t=n.length-2;t>=0;t--)if("M"===n[t].command){o=n[t].points[0]+v,h=n[t].points[1]+b;break}}m.push(o,h),r="l";break;case"M":o=d.shift(),h=d.shift(),p="M",m.push(o,h),r="L";break;case"h":o+=d.shift(),p="L",m.push(o,h);break;case"H":o=d.shift(),p="L",m.push(o,h);break;case"v":h+=d.shift(),p="L",m.push(o,h);break;case"V":h=d.shift(),p="L",m.push(o,h);break;case"C":m.push(d.shift(),d.shift(),d.shift(),d.shift()),o=d.shift(),h=d.shift(),m.push(o,h);break;case"c":m.push(o+d.shift(),h+d.shift(),o+d.shift(),h+d.shift()),o+=d.shift(),h+=d.shift(),p="C",m.push(o,h);break;case"S":e=o,i=h,"C"===(t=n[n.length-1]).command&&(e=o+(o-t.points[2]),i=h+(h-t.points[3])),m.push(e,i,d.shift(),d.shift()),o=d.shift(),h=d.shift(),p="C",m.push(o,h);break;case"s":e=o,i=h,"C"===(t=n[n.length-1]).command&&(e=o+(o-t.points[2]),i=h+(h-t.points[3])),m.push(e,i,o+d.shift(),h+d.shift()),o+=d.shift(),h+=d.shift(),p="C",m.push(o,h);break;case"Q":m.push(d.shift(),d.shift()),o=d.shift(),h=d.shift(),m.push(o,h);break;case"q":m.push(o+d.shift(),h+d.shift()),o+=d.shift(),h+=d.shift(),p="Q",m.push(o,h);break;case"T":e=o,i=h,"Q"===(t=n[n.length-1]).command&&(e=o+(o-t.points[0]),i=h+(h-t.points[1])),o=d.shift(),h=d.shift(),p="Q",m.push(e,i,o,h);break;case"t":e=o,i=h,"Q"===(t=n[n.length-1]).command&&(e=o+(o-t.points[0]),i=h+(h-t.points[1])),o+=d.shift(),h+=d.shift(),p="Q",m.push(e,i,o,h);break;case"A":a=d.shift(),s=d.shift(),l=d.shift(),c=d.shift(),u=d.shift(),g=o,f=h,o=d.shift(),h=d.shift(),p="A",m=this.convertEndpointToCenterParameterization(g,f,o,h,c,u,a,s,l);break;case"a":a=d.shift(),s=d.shift(),l=d.shift(),c=d.shift(),u=d.shift(),g=o,f=h,o+=d.shift(),h+=d.shift(),p="A",m=this.convertEndpointToCenterParameterization(g,f,o,h,c,u,a,s,l)}n.push({command:p||r,points:m,start:{x:y,y:_},pathLength:this.calcLength(y,_,p||r,m)})}("z"===r||"Z"===r)&&n.push({command:"z",points:[],start:void 0,pathLength:0})}return n}static calcLength(t,e,i,r){let a,n,h,l;switch(i){case"L":return o.getLineLength(t,e,r[0],r[1]);case"C":return(0,s.getCubicArcLength)([t,r[0],r[2],r[4]],[e,r[1],r[3],r[5]],1);case"Q":return(0,s.getQuadraticArcLength)([t,r[0],r[2]],[e,r[1],r[3]],1);case"A":a=0;let d=r[4],c=r[5],u=r[4]+c,g=Math.PI/180;if(Math.abs(d-u)<g&&(g=Math.abs(d-u)),n=o.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],d,0),c<0)for(l=d-g;l>u;l-=g)h=o.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),a+=o.getLineLength(n.x,n.y,h.x,h.y),n=h;else for(l=d+g;l<u;l+=g)h=o.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),a+=o.getLineLength(n.x,n.y,h.x,h.y),n=h;return h=o.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],u,0),a+=o.getLineLength(n.x,n.y,h.x,h.y)}return 0}
1static convertEndpointToCenterParameterization(t,e,i,r,a,n,s,o,h){let l=Math.PI/180*h,d=Math.cos(l)*(t-i)/2+Math.sin(l)*(e-r)/2,c=-1*Math.sin(l)*(t-i)/2+Math.cos(l)*(e-r)/2,u=d*d/(s*s)+c*c/(o*o);u>1&&(s*=Math.sqrt(u),o*=Math.sqrt(u));let g=Math.sqrt((s*s*(o*o)-s*s*(c*c)-o*o*(d*d))/(s*s*(c*c)+o*o*(d*d)));a===n&&(g*=-1),isNaN(g)&&(g=0);let f=g*s*c/o,p=-(g*o)*d/s,m=(t+i)/2+Math.cos(l)*f-Math.sin(l)*p,y=(e+r)/2+Math.sin(l)*f+Math.cos(l)*p,_=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},v=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(_(t)*_(e))},b=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(v(t,e))},x=b([1,0],[(d-f)/s,(c-p)/o]),S=[(d-f)/s,(c-p)/o],C=[(-1*d-f)/s,(-1*c-p)/o],w=b(S,C);return -1>=v(S,C)&&(w=Math.PI),v(S,C)>=1&&(w=0),0===n&&w>0&&(w-=2*Math.PI),1===n&&w<0&&(w+=2*Math.PI),[m,y,s,o,x,w,l,n]}}e.Path=o,o.prototype.className="Path",o.prototype._attrsAffectingSize=["data"],(0,a._registerNode)(o),r.Factory.addGetterSetter(o,"data")},52099:(t,e,i)=>{"use strict";t.exports=i(76206)},54086:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rect=void 0;let r=i(73409),a=i(32598),n=i(14498),s=i(94001),o=i(54990);class h extends a.Shape{_sceneFunc(t){let e=this.cornerRadius(),i=this.width(),r=this.height();t.beginPath(),e?s.Util.drawRoundedRectPath(t,i,r,e):t.rect(0,0,i,r),t.closePath(),t.fillStrokeShape(this)}}e.Rect=h,h.prototype.className="Rect",(0,n._registerNode)(h),r.Factory.addGetterSetter(h,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4))},54990:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBComponent=function(t){return t>255?255:t<0?0:Math.round(t)},e.alphaComponent=function(t){return t>1?1:t<1e-4?1e-4:t},e.getNumberValidator=function(){if(r.Konva.isUnminified)return function(t,e){return a.Util._isNumber(t)||a.Util.warn(n(t)+' is a not val
1id value for "'+e+'" attribute. The value should be a number.'),t}},e.getNumberOrArrayOfNumbersValidator=function(t){if(r.Konva.isUnminified)return function(e,i){let r=a.Util._isNumber(e),s=a.Util._isArray(e)&&e.length==t;return r||s||a.Util.warn(n(e)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+t+")"),e}},e.getNumberOrAutoValidator=function(){if(r.Konva.isUnminified)return function(t,e){let i=a.Util._isNumber(t),r="auto"===t;return i||r||a.Util.warn(n(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}},e.getStringValidator=function(){if(r.Konva.isUnminified)return function(t,e){return a.Util._isString(t)||a.Util.warn(n(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}},e.getStringOrGradientValidator=function(){if(r.Konva.isUnminified)return function(t,e){let i=a.Util._isString(t),r="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;return i||r||a.Util.warn(n(t)+' is a not val
1id value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}},e.getFunctionValidator=function(){if(r.Konva.isUnminified)return function(t,e){return a.Util._isFunction(t)||a.Util.warn(n(t)+' is a not valid value for "'+e+'" attribute. The value should be a function.'),t}},e.getNumberArrayValidator=function(){if(r.Konva.isUnminified)return function(t,e){let i=Int8Array?Object.getPrototypeOf(Int8Array):null;return i&&t instanceof i||(a.Util._isArray(t)?t.forEach(function(t){a.Util._isNumber(t)||a.Util.warn('"'+e+'" attribute has non numeric element '+t+". Make sure that all elements are numbers.")}):a.Util.warn(n(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}},e.getBooleanValidator=function(){if(r.Konva.isUnminified)return function(t,e){return!0!==t&&!1!==t&&a.Util.warn(n(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}},e.getComponentValidator=function(t){if(r.Konva.isUnminified)return function(e,i){return null==e||a.Util.isObject(e)||a.Util.warn(n(e)+' is a not val
1id value for "'+i+'" attribute. The value should be an object with properties '+t),e}};let r=i(14498),a=i(94001);function n(t){return a.Util._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)||a.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}},55906:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emboss=void 0;let r=i(73409),a=i(91941),n=i(94001),s=i(54990);e.Emboss=function(t){let e=10*this.embossStrength(),i=255*this.embossWhiteLevel(),r=this.embossDirection(),a=this.embossBlend(),s=t.data,o=t.width,h=t.height,l=4*o,d=0,c=0,u=h;switch(r){case"top-left":d=-1,c=-1;break;case"top":d=-1,c=0;break;case"top-right":d=-1,c=1;break;case"right":d=0,c=1;break;case"bottom-right":d=1,c=1;break;case"bottom":d=1,c=0;break;case"bottom-left":d=1,c=-1;break;case"left":d=0,c=-1;break;default:n.Util.error("Unknown emboss direction: "+r)}do{let t=(u-1)*l,r=d;u+r<1&&(r=0),u+r>h&&(r=0);let n=(u-1+r)*o*4,g=o;do{let r=t+(g-1)*4,h=c;g+h<1&&(h=0),g+h>o&&(h=0);let l=n+(g-1+h)*4,d=s[r]-s[l],u=s[r+1]-s[l+1],f=s[r+2]-s[l+2],p=d,m=p>0?p:-p,y=f>0?f:-f;if((u>0?u:-u)>m&&(p=u),y>m&&(p=f),p*=e,a){let t=s[r]+p,e=s[r+1]+p,i=s[r+2]+p;s[r]=t>255?255:t<0?0:t,s[r+1]=e>255?255:e<0?0:e,s[r+2]=i>255?255:i<0?0:i}else{let t=i-p;t<0?t=0:t>255&&(t=255),s[r]=s[r+1]=s[r+2]=t}}while(--g)}while(--u)},r.Factory.addGetterSetter(a.Node,"embossStrength",.5,(0,s.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossWhiteLevel",.5,(0,s.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossDirection","top-left",void 0,r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossBlend",!1,void 0,r.Factory.afterSetFilter)},59381:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;let r=i(14498),a=i(94001),n=i(91941),s=i(13168),o=i(33185),h=i(41473),l=i(70008),d=i(79004),c=i(64921),u=i(32598),g=i(49229),f=i(31568),p=i(74492),m=i(22465);e.Konva=a.Util._assign(r.Konva,{Util:a.Util,Transform:a.Transform,Node:n.Node,Container:s.Container,Stage:o.Stage,stages:o.stages,Layer:h.Layer,FastLayer:l.FastLayer,Group:d.Group,DD:c.DD,Shape:u.Shape,shapes:u.shapes,Animation:g.Animation,Tween:f.Tween,Easings:f.Easings,Context:p.Context,Canvas:m.Canvas}),e.default=e.Konva},60663:(t,e,i)=>{"use strict";let r;Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0,e.stringToArray=d;let a=i(94001),n=i(73409),s=i(32598),o=i(14498),h=i(54990),l=i(14498);function d(t){return[...t].reduce((t,e,i,r)=>{if(/\p{Emoji}/u.test(e)){let a=r[i+1];a&&/\p{Emoji_Modifier}|\u200D/u.test(a)?(t.push(e+a),r[i+1]=""):t.push(e)}else/\p{Regional_Indicator}{2}/u.test(e+(r[i+1]||""))?t.push(e+r[i+1]):i>0&&/\p{Mn}|\p{Me}|\p{Mc}/u.test(e)?t[t.length-1]+=e:e&&t.push(e);return t},[])}let c="auto",u="inherit",g="justify",f="left",p="middle",m="normal",y="none",_=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],v=_.length;function b(){return r||(r=a.Util.createCanvasElement().getContext("2d"))}class x extends s.Shape{constructor(t){super(function(t){return(t=t||{}).fillLinearGradientColorStops||t.fillRadialGradientColorStops||t.fillPatternImage||(t.fill=t.fill||"black"),t}(t)),this._partialTextX=0,this._partialTextY=0;for(let t=0;t<v;t++)this.on(_[t]+"Change.konva",this._setTextData);this._setTextData()}_sceneFunc(t){let e=this.textArr,i=e.length;if(!this.text())return;let r=this.padding(),a=this.fontSize(),n=this.lineHeight()*a,s=this.verticalAlign(),h=this.direction(),l=0,c=this.align(),m=this.getWidth(),y=this.letterSpacing(),_=this.fill(),v=this.textDecoration(),b=-1!==v.indexOf("underline"),x=-1!==v.indexOf("line-through"),S;h=h===u?t.direction:h;let C=n/2,w=p;if(o.Konva._fixTextRendering){let t=this.measureSize("M");w="alphabetic",C=(t.fontBoundingBoxAscent-t.fontBoundingBoxDescent)/2+n/2}for("rtl"===h&&t.setAttr("direction",h),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",w),t.setAttr("textAlign",f),s===p?l=(this.getHeight()-i*n-2*r)/2:"bottom"===s&&(l=this.getHeight()-i*n-2*r),t.translate(r,l+r),S=0;S<i;S++){let s=0,l=e[S],u=l.text,f=l.width,p=l.lastInParagraph;if(t.save(),"right"===c?s+=m-f-2*r:"center"===c&&(s+=(m-f-2*r)/2),b){t.save(),t.beginPath();let e=o.Konva._fixTextRendering?Math.round(a/4):Math.round(a/2),i=s,n=C+0+e;t.moveTo(i,n);let h=c!==g||p?f:m-2*r;t.lineTo(i+Math.round(h),n),t.lineWidth=a/15,t.strokeStyle=this._getLinearGradient()||_,t.stroke(),t.restore(
1)}if(x){t.save(),t.beginPath();let e=o.Konva._fixTextRendering?-Math.round(a/4):0;t.moveTo(s,C+0+e);let i=c!==g||p?f:m-2*r;t.lineTo(s+Math.round(i),C+0+e),t.lineWidth=a/15,t.strokeStyle=this._getLinearGradient()||_,t.stroke(),t.restore()}if("rtl"!==h&&(0!==y||c===g)){let e=u.split(" ").length-1,i=d(u);for(let a=0;a<i.length;a++){let n=i[a];" "!==n||p||c!==g||(s+=(m-2*r-f)/e),this._partialTextX=s,this._partialTextY=C+0,this._partialText=n,t.fillStrokeShape(this),s+=this.measureSize(n).width+y}}else 0!==y&&t.setAttr("letterSpacing",`${y}px`),this._partialTextX=s,this._partialTextY=C+0,this._partialText=u,t.fillStrokeShape(this);t.restore(),i>1&&(C+=n)}}_hitFunc(t){let e=this.getWidth(),i=this.getHeight();t.beginPath(),t.rect(0,0,e,i),t.closePath(),t.fillStrokeShape(this)}setText(t){let e=a.Util._isString(t)?t:null==t?"":t+"";return this._setAttr("text",e),this}getWidth(){return this.attrs.width===c||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===c||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return a.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e,i,r,a,n,s,o,h,l,d,c;let u=b(),g=this.fontSize(),f;u.save(),u.font=this._getContextFont(),f=u.measureText(t),u.restore();let p=g/100;return{actualBoundingBoxAscent:null!=(e=f.actualBoundingBoxAscent)?e:71.58203125*p,actualBoundingBoxDescent:null!=(i=f.actualBoundingBoxDescent)?i:0,actualBoundingBoxLeft:null!=(r=f.actualBoundingBoxLeft)?r:-7.421875*p,actualBoundingBoxRight:null!=(a=f.actualBoundingBoxRight)?a:75.732421875*p,alphabeticBaseline:null!=(n=f.alphabeticBaseline)?n:0,emHeightAscent:null!=(s=f.emHeightAscent)?s:100*p,emHeightDescent:null!=(o=f.emHeightDescent)?o:-20*p,fontBoundingBoxAscent:null!=(h=f.fontBoundingBoxAscent)?h:91*p,fontBoundingBoxDescent:null!=(l=f.fontBoundingBoxDescent)?l:21*p,hangingBaseline:null!=(d=f.hangingBaseline)?d:72.80000305175781*p,ideographicBaseline:null!=(c=f.ideographicBaseline)?c:-21*p,width:f.width,height:g}}_getContextFont(){return this.fontStyle()+" "+this.fontVariant()+" "+this.fontSize()+"px "+this.fontFamily().split(",").map(t=>{let e=(t=t.trim()).indexOf(" ")>=0,i=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!i&&(t=`"${t}"`),t}).join(", ")}_addTextLine(t){this.align()===g&&(t=t.trim());let e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){let e=this.letterSpacing(),i=t.length;return b().measureText(t).width+e*i}_setTextData(){let t=this.text().split("\n"),e=+this.fontSize(),i=0,r=this.lineHeight()*e,a=this.attrs.width,n=this.attrs.height,s=a!==c&&void 0!==a,o=n!==c&&void 0!==n,h=this.padding(),l=a-2*h,u=n-2*h,g=0,f=this.wrap(),p="char"!==f&&f!==y,m=this.ellipsis();this.textArr=[],b().font=this._getContextFont();let _=m?this._getTextWidth("…"):0;for(let e=0,a=t.length;e<a;++e){let n=t[e],h=this._getTextWidth(n);if(s&&h>l)for(;n.length>0;){let t=0,e=d(n).length,a="",s=0;for(;t<e;){let i=t+e>>>1,h=d(n).slice(0,i+1).join(""),c=this._getTextWidth(h);(m&&o&&g+r>u?c+_:c)<=l?(t=i+1,a=h,s=c):e=i}if(a){if(p){let e,i=d(n),r=d(a),o=i[r.length];(e=(" "===o||"-"===o)&&s<=l?r.length:Math.max(r.lastIndexOf(" "),r.lastIndexOf("-"))+1)>0&&(t=e,a=i.slice(0,t).join(""),s=this._getTextWidth(a))}if(a=a.trimRight(),this._addTextLine(a),i=Math.max(i,s),g+=r,this._shouldHandleEllipsis(g)){this._tryToAddEllipsisToLastLine();break}if((n=d(n).slice(t).join("").trimLeft()).length>0&&(h=this._getTextWidth(n))<=l){this._addTextLine(n),g+=r,i=Math.max(i,h);break}}else break}else this._addTextLine(n),g+=r,i=Math.max(i,h),this._shouldHandleEllipsis(g)&&e<a-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),o&&g+r>u)break}this.textHeight=e,this.textWidth=i}_shouldHandleEllipsis(t){let e=+this.fontSize(),i=this.lineHeight()*e,r=this.attrs.height,a=this.padding();return this.wrap()===y||r!==c&&void 0!==r&&t+i>r-2*a}_tryToAddEllipsisToLastLine(){let t=this.attrs.width,e=this.padding(),i=this.ellipsis(),r=this.textArr[this.textArr.length-1];r&&i&&(t!==c&&void 0!==t&&(this._getTextWidth(r.text+"…")<t-2*e||(r.text=r.text.slice(0,r.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(r.text
1+"…"))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){let t=-1!==this.textDecoration().indexOf("underline")||-1!==this.textDecoration().indexOf("line-through"),e=this.hasShadow();return!!t&&!!e||super._useBufferCanvas()}}e.Text=x,x.prototype._fillFunc=function(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)},x.prototype._strokeFunc=function(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)},x.prototype.className="Text",x.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,l._registerNode)(x),n.Factory.overWriteSetter(x,"width",(0,h.getNumberOrAutoValidator)()),n.Factory.overWriteSetter(x,"height",(0,h.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(x,"direction",u),n.Factory.addGetterSetter(x,"fontFamily","Arial"),n.Factory.addGetterSetter(x,"fontSize",12,(0,h.getNumberValidator)()),n.Factory.addGetterSetter(x,"fontStyle",m),n.Factory.addGetterSetter(x,"fontVariant",m),n.Factory.addGetterSetter(x,"padding",0,(0,h.getNumberValidator)()),n.Factory.addGetterSetter(x,"align",f),n.Factory.addGetterSetter(x,"verticalAlign","top"),n.Factory.addGetterSetter(x,"lineHeight",1,(0,h.getNumberValidator)()),n.Factory.addGetterSetter(x,"wrap","word"),n.Factory.addGetterSetter(x,"ellipsis",!1,(0,h.getBooleanValidator)()),n.Factory.addGetterSetter(x,"letterSpacing",0,(0,h.getNumberValidator)()),n.Factory.addGetterSetter(x,"text","",(0,h.getStringValidator)()),n.Factory.addGetterSetter(x,"textDecoration","")}
1,60980:(t,e,i)=>{var r=i(71605);t.exports=function(){return r.Date.now()}},62029:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mask=void 0;let r=i(73409),a=i(91941),n=i(54990);function s(t,e,i){let r=(i*t.width+e)*4,a=[];return a.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),a}function o(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}e.Mask=function(t){let e=function(t,e){let i=s(t,0,0),r=s(t,t.width-1,0),a=s(t,0,t.height-1),n=s(t,t.width-1,t.height-1),h=e||10;if(o(i,r)<h&&o(r,n)<h&&o(n,a)<h&&o(a,i)<h){let e=function(t){let e=[0,0,0];for(let i=0;i<t.length;i++)e[0]+=t[i][0],e[1]+=t[i][1],e[2]+=t[i][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}([r,i,n,a]),s=[];for(let i=0;i<t.width*t.height;i++){let r=o(e,[t.data[4*i],t.data[4*i+1],t.data[4*i+2]]);s[i]=r<h?0:255}return s}}(t,this.threshold());if(e){var i=e=function(t,e,i){let r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],a=Math.round(Math.sqrt(r.length)),n=Math.floor(a/2),s=[];for(let o=0;o<i;o++)for(let h=0;h<e;h++){let l=o*e+h,d=0;for(let s=0;s<a;s++)for(let l=0;l<a;l++){let c=o+s-n,u=h+l-n;if(c>=0&&c<i&&u>=0&&u<e){let i=c*e+u,n=r[s*a+l];d+=t[i]*n}}s[l]=d}return s}(e=function(t,e,i){let r=[1,1,1,1,1,1,1,1,1],a=Math.round(Math.sqrt(r.length)),n=Math.floor(a/2),s=[];for(let o=0;o<i;o++)for(let h=0;h<e;h++){let l=o*e+h,d=0;for(let s=0;s<a;s++)for(let l=0;l<a;l++){let c=o+s-n,u=h+l-n;if(c>=0&&c<i&&u>=0&&u<e){let i=c*e+u,n=r[s*a+l];d+=t[i]*n}}s[l]=255*(d>=1020)}return s}(e=function(t,e,i){let r=[1,1,1,1,0,1,1,1,1],a=Math.round(Math.sqrt(r.length)),n=Math.floor(a/2),s=[];for(let o=0;o<i;o++)for(let h=0;h<e;h++){let l=o*e+h,d=0;for(let s=0;s<a;s++)for(let l=0;l<a;l++){let c=o+s-n,u=h+l-n;if(c>=0&&c<i&&u>=0&&u<e){let i=c*e+u,n=r[s*a+l];d+=t[i]*n}}s[l]=255*(2040===d)}return s}(e,t.width,t.height),t.width,t.height),t.width,t.height);for(let e=0;e<t.width*t.height;e++)t.data[4*e+3]=i[e]}return t},r.Factory.addGetterSetter(a.Node,"threshold",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},62621:(t,e,i)=>{"use strict";i.d(e,{jl:()=>tB,YJ:()=>tI,_V:()=>tj,Wd:()=>tL,N1:()=>tV,rw:()=>tU,BI:()=>tz,Ge:()=>tH});var r={};i.r(r),i.d(r,{HostTransitionContext:()=>tM,NotPendingTransition:()=>tA,afterActiveInstanceBlur:()=>tc,appendChild:()=>X,appendChildToContainer:()=>q,appendInitialChild:()=>w,beforeActiveInstanceBlur:()=>td,cancelTimeout:()=>I,clearContainer:()=>to,commitMount:()=>te,commitTextUpdate:()=>tt,commitUpdate:()=>ti,createInstance:()=>P,createTextInstance:()=>k,detachDeletedInstance:()=>th,finalizeInitialChildren:()=>T,getChildHostContext:()=>O,getCurrentEventPriority:()=>tu,getCurrentUpdatePriority:()=>tm,getInstanceFromNode:()=>tl,getInstanceFromScope:()=>tf,getPublicInstance:()=>A,getRootHostContext:()=>N,hideInstance:()=>tr,hideTextInstance:()=>ta,idlePriority:()=>b.unstable_IdlePriority,insertBefore:()=>$,insertInContainerBefore:()=>Q,isPrimaryRenderer:()=>H,maySuspendCommit:()=>tC,noTimeout:()=>V,now:()=>b.unstable_now,preloadInstance:()=>tw,prepareForCommit:()=>M,preparePortalMount:()=>F,prepareScopeUpdate:()=>tg,prepareUpdate:()=>R,removeChild:()=>J,removeChildFromContainer:()=>Z,requestPostPaintCallback:()=>tS,resetAfterCommit:()=>D,resetFormInstance:()=>tF,resetTextContent:()=>E,resolveEventTimeStamp:()=>tx,resolveEventType:()=>tb,resolveUpdatePriority:()=>ty,run:()=>b.unstable_runWithPriority,scheduleMicrotask:()=>B,scheduleTimeout:()=>L,setCurrentUpdatePriority:()=>tp,shouldAttemptEagerTransition:()=>t_,shouldDeprioritizeSubtree:()=>G,shouldSetTextContent:()=>j,startSuspendingCommit:()=>tP,supportsHydration:()=>Y,supportsMicrotasks:()=>U,supportsMutation:()=>z,supportsPersistence:()=>W,suspendInstance:()=>tk,trackSchedulerEvent:()=>tv,unhideInstance:()=>tn,unhideTextInstance:()=>ts,waitForCommitToBeReady:()=>tT,warnsIfNotActing:()=>K}),i(98315);var a=i(96810),n=i(22274),s=i.n(n),o=i(68642),h=i.n(o),l=i(52099),d=i(14498);let c={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0},u=!1,g=!1,f=".react-konva-event",p=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
2Position of a node will be changed during drag&drop, so you should update state of the react app as well.
3Consider to add onDragMove or onDragEnd events.
4For more info see: https://github.com/konvajs/react-konva/issues/256
5`,m=`ReactKonva: You are using "zIndex" attribute for a Konva node.
6react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
7For more info see: https://github.com/konvajs/react-konva/issues/194
8`,y={};function _(t,e,i=y){if(!u&&"zIndex"in e&&(console.warn(m),u=!0),!g&&e.draggable){var r=void 0!==e.x||void 0!==e.y,a=e.onDragEnd||e.onDragMove;r&&!a&&(console.warn(p),g=!0)}for(var n in i)if(!c[n]){var s="on"===n.slice(0,2),o=i[n]!==e[n];if(s&&o){var h=n.substr(2).toLowerCase();"content"===h.substr(0,7)&&(h="content"+h.substr(7,1).toUpperCase()+h.substr(8)),t.off(h,i[n])}e.hasOwnProperty(n)||t.setAttr(n,void 0)}var l=e._useStrictMode,d={},b=!1;let x={};for(var n in e)if(!c[n]){var s="on"===n.slice(0,2),S=i[n]!==e[n];if(s&&S){var h=n.substr(2).toLowerCase();"content"===h.substr(0,7)&&(h="content"+h.substr(7,1).toUpperCase()+h.substr(8)),e[n]&&(x[h]=e[n])}!s&&(e[n]!==i[n]||l&&e[n]!==t.getAttr(n))&&(b=!0,d[n]=e[n])}for(var h in b&&(t.setAttrs(d),v(t)),x)t.off(h+f),t.on(h+f,x[h])}function v(t){if(!d.Konva.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}var b=i(8176);let x={},S={};s().Node.prototype._applyProps=_;let C=l.DefaultEventPriority;function w(t,e){if("string"==typeof e)return void console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`);t.add(e),v(t)}function P(t,e,i){let r=s()[t];r||(console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}"  If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=s().Group);let a={},n={};for(var o in e)"ref"!==o&&("on"===o.slice(0,2)?n[o]=e[o]:a[o]=e[o]);let h=new r(a);return _(h,n),h}function k(t,e,i){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function T(t,e,i){return!1}function A(t){return t}function M(){return null}function F(){return null}function R(t,e,i,r){return S}function D(){}function E(t){}function G(t,e){return!1}function N(){return x}function O(){return x}let L=setTimeout,I=clearTimeout,U=!0,B=t=>{t()},V=-1;function j(t,e){return!1}let H=!1,K=!1,z=!0,W=!1,Y=!1;function X(t,e){e.parent===t?e.moveToTop():t.add(e),v(t)}function q(t,e){e.parent===t?e.moveToTop():t.add(e),v(t)}function $(t,e,i){e._remove(),t.add(e),e.setZIndex(i.getZIndex()),v(t)}function Q(t,e,i){$(t,e,i)}function J(t,e){e.destroy(),e.off(f),v(t)}function Z(t,e){e.destroy(),e.off(f),v(t)}function tt(t,e,i){console.error(`Text components are not yet supported in ReactKonva. You text is: "${i}"`)}function te(t,e,i){}function ti(t,e,i,r){_(t,r,i)}function tr(t){t.hide(),v(t)}function ta(t){}function tn(t,e){(null==e.visible||e.visible)&&t.show()}function ts(t,e){}function to(t){}function th(){}function tl(){return null}function td(){}function tc(){}function tu(){return l.DefaultEventPriority}function tg(){}function tf(){return null}function tp(t){C=t}function tm(){return C}function ty(){return l.DiscreteEventPriority}function t_(){return!1}function tv(){}function tb(){return null}function tx(){return -1.1}function tS(){}function tC(){return!1}function tw(){return!0}function tP(){}function tk(){}function tT(){return null}let tA=null,tM=a.createContext(null);function tF(){}function tR(t){try{return Object.defineProperties(t,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(e){return t}}(()=>{var t,e;return"undefined"!=typeof window&&((null==(t=window.document)?void 0:t.createElement)||(null==(e=window.navigator)?void 0:e.product)==="ReactNative")}
8)()?a.useLayoutEffect:a.useEffect;let tD=tR(a.createContext(null));class tE extends a.Component{render(){return a.createElement(tD.Provider,{value:this._reactInternals},this.props.children)}}let tG=Symbol.for("react.context"),tN=t=>null!==t&&"object"==typeof t&&"$$typeof"in t&&t.$$typeof===tG;if(-1===a.version.indexOf("19"))throw Error("react-konva version 19 is only compatible with React 19. Make sure to have the last version of react-konva and react or downgrade react-konva to version 18.");let tO=t=>{let e=a.useRef(null),i=a.useRef(null),r=a.useRef(null),n=function(t){let e=a.useRef({});return a.useLayoutEffect(()=>{e.current=t}),a.useLayoutEffect(()=>()=>{e.current={}},[]),e.current}(t),o=function(){let t=function(){let t=function(){let t=a.useContext(tD);if(null===t)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let e=a.useId();return a.useMemo(()=>{for(let i of[t,null==t?void 0:t.alternate]){if(!i)continue;let t=function t(e,i,r){if(!e)return;if(!0===r(e))return e;let a=i?e.return:e.child;for(;a;){let e=t(a,i,r);if(e)return e;a=i?null:a.sibling}}(i,!1,t=>{let i=t.memoizedState;for(;i;){if(i.memoizedState===e)return!0;i=i.next}});if(t)return t}},[t,e])}(),[e]=a.useState(()=>new Map);e.clear();let i=t;for(;i;){let t=i.type;tN(t)&&t!==tD&&!e.has(t)&&e.set(t,a.use(tR(t))),i=i.return}return e}();return a.useMemo(()=>Array.from(t.keys()).reduce((e,i)=>r=>a.createElement(e,null,a.createElement(i.Provider,{...r,value:t.get(i)})),t=>a.createElement(tE,{...t})),[t])}(),h=a.useRef(null),d=e=>{let{forwardedRef:i}=t;i&&("function"==typeof i?i(e):i.current=e)},c=(()=>{let t=a.useRef(0);return a.useMemo(()=>{t.current++},[]),t.current>1})(),u=()=>{d(null),tK.updateContainer(null,r.current,null),i.current?.destroy(),i.current=null};return a.useLayoutEffect(()=>(h.current&&(clearTimeout(h.current),h.current=null),i.current?d(i.current):(i.current=new(s()).Stage({width:t.width,height:t.height,container:e.current}),d(i.current),r.current=tK.createContainer(i.current,l.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null),tK.updateContainer(a.createElement(o,{},t.children),r.current,null,()=>{})),()=>{c?h.current=setTimeout(u,0):u()}),[]),a.useLayoutEffect(()=>{d(i.current),_(i.current,t,n),tK.updateContainer(a.createElement(o,{},t.children),r.current,null)}),a.createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},tL="Layer",tI="Group",tU="Rect",tB="Circle",tV="Line",tj="Image",tH="Transformer",tK=h()(r),tz=a.forwardRef((t,e)=>a.createElement(tE,{},a.createElement(tO,{...t,forwardedRef:e})))},63360:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGB=void 0;let r=i(73409),a=i(91941),n=i(54990);e.RGB=function(t){let e=t.data,i=e.length,r=this.red(),a=this.green(),n=this.blue();for(let t=0;t<i;t+=4){let i=(.34*e[t]+.5*e[t+1]+.16*e[t+2])/255;e[t]=i*r,e[t+1]=i*a,e[t+2]=i*n,e[t+3]=e[t+3]}},r.Factory.addGetterSetter(a.Node,"red",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(a.Node,"green",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(a.Node,"blue",0,n.RGBComponent,r.Factory.afterSetFilter)},64921:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;let r=i(14498),a=i(94001);e.DD={get isDragging(){let t=!1;return e.DD._dragElements.forEach(e=>{"dragging"===e.dragStatus&&(t=!0)}),t},justDragged:!1,get node(){let t;return e.DD._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){let i=[];e.DD._dragElements.forEach((e,r)=>{let{node:n}=e,s=n.getStage();s.setPointersPositions(t),void 0===e.pointerId&&(e.pointerId=a.Util._getFirstPointerId(t));let o=s._changedPointerPositions.find(t=>t.id===e.pointerId);if(o){if("dragging"!==e.dragStatus){let i=n.dragDistance();if(Math.max(Math.abs(o.x-e.startPointerPos.x),Math.abs(o.y-e.startPointerPos.y))<i||(n.startDrag({evt:t}),!n.isDragging()))return}n._setDragPosition(t,e),i.push(n)}}
8),i.forEach(e=>{e.fire("dragmove",{type:"dragmove",target:e,evt:t},!0)})},_endDragBefore(t){let i=[];e.DD._dragElements.forEach(a=>{let{node:n}=a,s=n.getStage();if(t&&s.setPointersPositions(t),!s._changedPointerPositions.find(t=>t.id===a.pointerId))return;("dragging"===a.dragStatus||"stopped"===a.dragStatus)&&(e.DD.justDragged=!0,r.Konva._mouseListenClick=!1,r.Konva._touchListenClick=!1,r.Konva._pointerListenClick=!1,a.dragStatus="stopped");let o=a.node.getLayer()||a.node instanceof r.Konva.Stage&&a.node;o&&-1===i.indexOf(o)&&i.push(o)}),i.forEach(t=>{t.draw()})},_endDragAfter(t){e.DD._dragElements.forEach((i,r)=>{"stopped"===i.dragStatus&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:t},!0),"dragging"!==i.dragStatus&&e.DD._dragElements.delete(r)})}},r.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))},67985:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pixelate=void 0;let r=i(73409),a=i(94001),n=i(91941),s=i(54990);e.Pixelate=function(t){let e=Math.ceil(this.pixelSize()),i=t.width,r=t.height,n=Math.ceil(i/e),s=Math.ceil(r/e),o=t.data;if(e<=0)return void a.Util.error("pixelSize value can not be <= 0");for(let t=0;t<n;t+=1)for(let a=0;a<s;a+=1){let n=0,s=0,h=0,l=0,d=t*e,c=d+e,u=a*e,g=u+e,f=0;for(let t=d;t<c;t+=1)if(!(t>=i))for(let e=u;e<g;e+=1){if(e>=r)continue;let a=(i*e+t)*4;n+=o[a+0],s+=o[a+1],h+=o[a+2],l+=o[a+3],f+=1}n/=f,s/=f,h/=f,l/=f;for(let t=d;t<c;t+=1)if(!(t>=i))for(let e=u;e<g;e+=1){if(e>=r)continue;let a=(i*e+t)*4;o[a+0]=n,o[a+1]=s,o[a+2]=h,o[a+3]=l}}},r.Factory.addGetterSetter(n.Node,"pixelSize",8,(0,s.getNumberValidator)(),r.Factory.afterSetFilter)},68642:(t,e,i)=>{"use strict";t.exports=i(32022)},69512:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Circle=void 0;let r=i(73409),a=i(32598),n=i(54990),s=i(14498);class o extends a.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}e.Circle=o,o.prototype._centroid=!0,o.prototype.className="Circle",o.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"radius",0,(0,n.getNumberValidator)())},70008:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastLayer=void 0;let r=i(94001),a=i(41473),n=i(14498);class s extends a.Layer{constructor(t){super(t),this.listening(!1),r.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}e.FastLayer=s,s.prototype.nodeType="FastLayer",(0,n._registerNode)(s)},71605:(t,e,i)=>{var r=i(71608),a="object"==typeof self&&self&&self.Object===Object&&self;t.exports=r||a||Function("return this")()},71608:(t,e,i)=>{t.exports="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g},71855:(t,e,i)=>{var r=i(99759),a=i(60980),n=i(44328),s=Math.max,o=Math.min;t.exports=function(t,e,i){var h,l,d,c,u,g,f=0,p=!1,m=!1,y=!0;if("function"!=typeof t)throw TypeError("Expected a function");function _(e){var i=h,r=l;return h=l=void 0,f=e,c=t.apply(r,i)}function v(t){var i=t-g,r=t-f;return void 0===g||i>=e||i<0||m&&r>=d}function b(){var t,i,r,n=a();if(v(n))return x(n);u=setTimeout(b,(t=n-g,i=n-f,r=e-t,m?o(r,d-i):r))}function x(t){return(u=void 0,y&&h)?_(t):(h=l=void 0,c)}function S(){var t,i=a(),r=v(i);if(h=arguments,l=this,g=i,r){if(void 0===u)return f=t=g,u=setTimeout(b,e),p?_(t):c;if(m)return clearTimeout(u),u=setTimeout(b,e),_(g)}return void 0===u&&(u=setTimeout(b,e)),c}return e=n(e)||0,r(i)&&(p=!!i.leading,d=(m="maxWait"in i)?s(n(i.maxWait)||0,e):d,y="trailing"in i?!!i.trailing:y),S.cancel=function(){void 0!==u&&clearTimeout(u),f=0,h=g=l=u=void 0},S.flush=function(){return void 0===u?c:x(a())},S}},72652:(t,e,i)=>{"use strict";i.d(e,{lK:()=>a()}),i(96810),i(85614),i(62621),i(62795);var r=i(18372),a=i.n(r)},72763:(t,e)=>{"use strict";
8Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,
8-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.122555206
871147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]],e.getCubicArcLength=(t,r,a)=>{let n,s,o=a/2;n=0;for(let a=0;a<20;a++)s=o*e.tValues[20][a]+o,n+=e.cValues[20][a]*function(t,e,r){let a=i(1,r,t),n=i(1,r,e);return Math.sqrt(a*a+n*n)}(t,r,s);return o*n},e.getQuadraticArcLength=(t,e,i)=>{void 0===i&&(i=1);let r=t[0]-2*t[1]+t[2],a=e[0]-2*e[1]+e[2],n=2*t[1]-2*t[0],s=2*e[1]-2*e[0],o=4*(r*r+a*a);if(0===o)return i*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));let h=4*(r*n+a*s)/(2*o),l=i+h,d=(n*n+s*s)/o-h*h,c=l*l+d>0?Math.sqrt(l*l+d):0,u=h*h+d>0?Math.sqrt(h*h+d):0,g=h+Math.sqrt(h*h+d)!==0?d*Math.log(Math.abs((l+c)/(h+u))):0;return Math.sqrt(o)/2*(l*c-h*u+g)};let i=(t,r,a)=>{let n,s,o=a.length-1;if(0===o)return 0;if(0===t){s=0;for(let t=0;t<=o;t++)s+=e.binomialCoefficients[o][t]*Math.pow(1-r,o-t)*Math.pow(r,t)*a[t];return s}n=Array(o);for(let t=0;t<o;t++)n[t]=o*(a[t+1]-a[t]);return i(t-1,r,n)};e.t2length=(t,e,i)=>{let r=1,a=t/e,n=(t-i(a))/e,s=0;for(;r>.001;){let o=Math.abs(t-i(a+n))/e;if(o<r)r=o,a+=n;else{let s=Math.abs(t-i(a-n))/e;s<r?(r=s,a-=n):n/=2}if(++s>500)break}return a}},73409:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;let r=i(94001),a=i(54990);e.Factory={addGetterSetter(t,i,r,a,n){e.Factory.addGetter(t,i,r),e.Factory.addSetter(t,i,a,n),e.Factory.addOverloadedGetterSetter(t,i)},addGetter(t,e,i){let a="get"+r.Util._capitalize(e);t.prototype[a]=t.prototype[a]||function(){let t=this.attrs[e];return void 0===t?i:t}}
8,addSetter(t,i,a,n){let s="set"+r.Util._capitalize(i);t.prototype[s]||e.Factory.overWriteSetter(t,i,a,n)},overWriteSetter(t,e,i,a){let n="set"+r.Util._capitalize(e);t.prototype[n]=function(t){return i&&null!=t&&(t=i.call(this,t,e)),this._setAttr(e,t),a&&a.call(this),this}},addComponentsGetterSetter(t,i,n,s,o){let h=n.length,l=r.Util._capitalize,d="get"+l(i),c="set"+l(i);t.prototype[d]=function(){let t={};for(let e=0;e<h;e++){let r=n[e];t[r]=this.getAttr(i+l(r))}return t};let u=(0,a.getComponentValidator)(n);t.prototype[c]=function(t){let e=this.attrs[i];for(let e in s&&(t=s.call(this,t,i)),u&&u.call(this,t,i),t)t.hasOwnProperty(e)&&this._setAttr(i+l(e),t[e]);return t||n.forEach(t=>{this._setAttr(i+l(t),void 0)}),this._fireChangeEvent(i,e,t),o&&o.call(this),this},e.Factory.addOverloadedGetterSetter(t,i)},addOverloadedGetterSetter(t,e){let i=r.Util._capitalize(e),a="set"+i,n="get"+i;t.prototype[e]=function(){return arguments.length?(this[a](arguments[0]),this):this[n]()}},addDeprecatedGetterSetter(t,i,a,n){r.Util.error("Adding deprecated "+i);let s="get"+r.Util._capitalize(i),o=i+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[s]=function(){r.Util.error(o);let t=this.attrs[i];return void 0===t?a:t},e.Factory.addSetter(t,i,n,function(){r.Util.error(o)}),e.Factory.addOverloadedGetterSetter(t,i)},backCompat(t,e){r.Util.each(e,function(e,i){let a=t.prototype[i],n="get"+r.Util._capitalize(e),s="set"+r.Util._capitalize(e);function o(){a.apply(this,arguments),r.Util.error('"'+e+'" method is deprecated and will be removed soon. Use ""'+i+'" instead.')}t.prototype[e]=o,t.prototype[n]=o,t.prototype[s]=o})},afterSetFilter(){this._filterUpToDate=!1}}},74492:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HitContext=e.SceneContext=e.Context=void 0;let r=i(94001),a=i(14498),n=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class s{constructor(t){this.canvas=t,a.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,e){let i=this.traceArr,a=i.length,n="",s,o,h,l;for(s=0;s<a;s++)(h=(o=i[s]).method)?(l=o.args,n+=h,t?n+="()":r.Util._isArray(l[0])?n+="(["+l.join(",")+"])":(e&&(l=l.map(t=>"number"==typeof t?Math.floor(t):t)),n+="("+l.join(",")+")")):(n+=o.property,t||(n+="="+o.val)),n+=";";return n}clearTrace(){this.traceArr=[]}_trace(t){let e=this.traceArr;e.push(t),e.length>=100&&e.shift()}reset(){let t=this.getCanvas().getPixelRatio();this.setTransform(+t,0,0,+t,0,0)}getCanvas(){return this.canvas}clear(t){let e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){let e=t.attrs.lineCap;e&&this.setAttr("lineCap",e)}_applyOpacity(t){let e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){let e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,i,r,a,n){this._context.arc(t,e,i,r,a,n)}arcTo(t,e,i,r,a){this._context.arcTo(t,e,i,r,a)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,i,r,a,n){this._context.bezierCurveTo(t,e,i,r,a,n)}clearRect(t,e,i,r){this._context.clearRect(t,e,i,r)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,e){let i=arguments;return 2===i.length?this._context.createImageData(t,e):1===i.length?this._context.createImageData(t):void 0}createLinearGradient(t,e,i,r){return this._context.createLinearGradient(t,e,i,r)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,i,r,a,n){return this._context.createRadialGradient(t,e,i,r,a,n)}drawImage(t,e,i,r,a,n,s,o,h){let l=arguments,d=this._context;3===l.length?d.drawImage(t,e,i):5===l.length?d.drawImage(t,e,i,r,a):9===l.length&&d.drawImage(t,e,i,r,a,n,s,o,h)}ellipse(t,e,i,r,a,n,s,o){this._context.ellipse(t,e,i,r,a,n,s,o)}
8isPointInPath(t,e,i,r){return i?this._context.isPointInPath(i,t,e,r):this._context.isPointInPath(t,e,r)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,e,i,r){this._context.fillRect(t,e,i,r)}strokeRect(t,e,i,r){this._context.strokeRect(t,e,i,r)}fillText(t,e,i,r){r?this._context.fillText(t,e,i,r):this._context.fillText(t,e,i)}measureText(t){return this._context.measureText(t)}getImageData(t,e,i,r){return this._context.getImageData(t,e,i,r)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,i,r){this._context.rect(t,e,i,r)}roundRect(t,e,i,r,a){this._context.roundRect(t,e,i,r,a)}putImageData(t,e,i){this._context.putImageData(t,e,i)}quadraticCurveTo(t,e,i,r){this._context.quadraticCurveTo(t,e,i,r)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,e,i,r,a,n){this._context.setTransform(t,e,i,r,a,n)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,i,r){this._context.strokeText(t,e,i,r)}transform(t,e,i,r,a,n){this._context.transform(t,e,i,r,a,n)}translate(t,e){this._context.translate(t,e)}_enableTrace(){let t=this,e=n.length,i=this.setAttr,a,s,o=function(e){let i=t[e],a;t[e]=function(){return s=function(t){let e=[],i=t.length,a=r.Util;for(let r=0;r<i;r++){let i=t[r];a._isNumber(i)?i=Math.round(1e3*i)/1e3:a._isString(i)||(i+=""),e.push(i)}return e}(Array.prototype.slice.call(arguments,0)),a=i.apply(t,arguments),t._trace({method:e,args:s}),a}};for(a=0;a<e;a++)o(n[a]);t.setAttr=function(){i.apply(t,arguments);let e=arguments[0],r=arguments[1];("shadowOffsetX"===e||"shadowOffsetY"===e||"shadowBlur"===e)&&(r/=this.canvas.getPixelRatio()),t._trace({property:e,val:r})}}_applyGlobalCompositeOperation(t){let e=t.attrs.globalCompositeOperation;e&&"source-over"!==e&&this.setAttr("globalCompositeOperation",e)}}e.Context=s,["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"].forEach(function(t){Object.defineProperty(s.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class o extends s{constructor(t,{willReadFrequently:e=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:e})}_fillColor(t){let e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){let e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){let e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){let e=t.fill(),i=t.getFillPriority();if(e&&"color"===i)return void this._fillColor(t);let r=t.getFillPatternImage();if(r&&"pattern"===i)return void this._fillPattern(t);let a=t.getFillLinearGradientColorStops();if(a&&"linear-gradient"===i)return void this._fillLinearGradient(t);let n=t.getFillRadialGradientColorStops();if(n&&"radial-gradient"===i)return void this._fillRadialGradient(t);e?this._fillColor(t):r?this._fillPattern(t):a?this._fillLinearGradient(t):n&&this._fillRadialGradient(t)}_strokeLinearGradient(t){let e=t.getStrokeLinearGradientStartPoint(),i=t.getStrokeLinearGradientEndPoint(),r=t.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(e.x,e.y,i.x,i.y);if(r){for(let t=0;t<r.length;t+=2)a.addColorStop(r[t],r[t+1]);this.setAttr("strokeStyle",a)}}_stroke(t){let e=t.dash(),i=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!i){this.save();let t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),i||this.restore(
8)}}_applyShadow(t){var e,i,r;let a=null!=(e=t.getShadowRGBA())?e:"black",n=null!=(i=t.getShadowBlur())?i:5,s=null!=(r=t.getShadowOffset())?r:{x:0,y:0},o=t.getAbsoluteScale(),h=this.canvas.getPixelRatio(),l=o.x*h,d=o.y*h;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",n*Math.min(Math.abs(l),Math.abs(d))),this.setAttr("shadowOffsetX",s.x*l),this.setAttr("shadowOffsetY",s.y*d)}}e.SceneContext=o;class h extends s{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){let e=t.getStrokeScaleEnabled();if(!e){this.save();let t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(t);let i=t.hitStrokeWidth(),r="auto"===i?t.strokeWidth():i;this.setAttr("lineWidth",r),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}}e.HitContext=h},74912:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Grayscale=void 0,e.Grayscale=function(t){let e=t.data,i=e.length;for(let t=0;t<i;t+=4){let i=.34*e[t]+.5*e[t+1]+.16*e[t+2];e[t]=i,e[t+1]=i,e[t+2]=i}}},75620:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSL=void 0;let r=i(73409),a=i(91941),n=i(54990);r.Factory.addGetterSetter(a.Node,"hue",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"saturation",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"luminance",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter),e.HSL=function(t){let e,i,r,a,n=t.data,s=n.length,o=Math.pow(2,this.saturation()),h=Math.abs(this.hue()+360)%360,l=127*this.luminance(),d=o*Math.cos(h*Math.PI/180),c=o*Math.sin(h*Math.PI/180),u=.299+.701*d+.167*c,g=.587-.587*d+.33*c,f=.114-.114*d-.497*c,p=.299-.299*d-.328*c,m=.587+.413*d+.035*c,y=.114-.114*d+.293*c,_=.299-.3*d+1.25*c,v=.587-.586*d-1.05*c,b=.114+.886*d-.2*c;for(let t=0;t<s;t+=4)e=n[t+0],i=n[t+1],r=n[t+2],a=n[t+3],n[t+0]=u*e+g*i+f*r+l,n[t+1]=p*e+m*i+y*r+l,n[t+2]=_*e+v*i+b*r+l,n[t+3]=a}},76206:(t,e)=>{"use strict";e.ConcurrentRoot=1,e.DefaultEventPriority=32,e.DiscreteEventPriority=2},76974:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ellipse=void 0;let r=i(73409),a=i(32598),n=i(54990),s=i(14498);class o extends a.Shape{_sceneFunc(t){let e=this.radiusX(),i=this.radiusY();t.beginPath(),t.save(),e!==i&&t.scale(1,i/e),t.arc(0,0,e,0,2*Math.PI,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}e.Ellipse=o,o.prototype.className="Ellipse",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,s._registerNode)(o),r.Factory.addComponentsGetterSetter(o,"radius",["x","y"]),r.Factory.addGetterSetter(o,"radiusX",0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(o,"radiusY",0,(0,n.getNumberValidator)())},78267:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCapturedShape=function(t){return a.get(t)},e.createEvent=s,e.hasPointerCapture=function(t,e){return a.get(t)===e},e.setPointerCapture=function(t,e){o(t),e.getStage()&&(a.set(t,e),n&&e._fire("gotpointercapture",s(new PointerEvent("gotpointercapture"))))},e.releaseCapture=o;let r=i(14498),a=new Map,n=void 0!==r.Konva._global.PointerEvent;function s(t){return{evt:t,pointerId:t.pointerId}}function o(t,e){let i=a.get(t);if(!i)return;let r=i.getStage();r&&r.content,a.delete(t),n&&i._fire("lostpointercapture",s(new PointerEvent("lostpointercapture")))}},79004:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;let r=i(94001),a=i(13168),n=i(14498);class s extends a.Container{_validateAdd(t){let e=t.getType();"Group"!==e&&"Shape"!==e&&r.Util.throw("You may only add groups and shapes to groups.")}}e.Group=s,s.prototype.nodeType="Group",(0,n._registerNode)(s)},80873:(t,e,i)=>{t.exports=i(71605).Symbol},81642:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},81706:t=>{var e=/\s/;t.exports=function(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}},82008:(t,e,i)=>
8{var r=i(71855),a=i(99759);t.exports=function(t,e,i){var n=!0,s=!0;if("function"!=typeof t)throw TypeError("Expected a function");return a(i)&&(n="leading"in i?!!i.leading:n,s="trailing"in i?!!i.trailing:s),r(t,e,{leading:n,maxWait:e,trailing:s})}},84084:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Threshold=void 0;let r=i(73409),a=i(91941),n=i(54990);e.Threshold=function(t){let e=255*this.threshold(),i=t.data,r=i.length;for(let t=0;t<r;t+=1)i[t]=i[t]<e?0:255},r.Factory.addGetterSetter(a.Node,"threshold",.5,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},85204:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Solarize=void 0,e.Solarize=function(t){let e=t.data,i=t.width,r=t.height,a=4*i,n=r;do{let t=(n-1)*a,r=i;do{let i=t+(r-1)*4,a=e[i],n=e[i+1],s=e[i+2];a>127&&(a=255-a),n>127&&(n=255-n),s>127&&(s=255-s),e[i]=a,e[i+1]=n,e[i+2]=s}while(--r)}while(--n)}},87053:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sepia=void 0,e.Sepia=function(t){let e=t.data,i=e.length;for(let t=0;t<i;t+=4){let i=e[t+0],r=e[t+1],a=e[t+2];e[t+0]=Math.min(255,.393*i+.769*r+.189*a),e[t+1]=Math.min(255,.349*i+.686*r+.168*a),e[t+2]=Math.min(255,.272*i+.534*r+.131*a)}}},88552:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Wedge=void 0;let r=i(73409),a=i(32598),n=i(14498),s=i(54990),o=i(14498);class h extends a.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,n.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}e.Wedge=h,h.prototype.className="Wedge",h.prototype._centroid=!0,h.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(h),r.Factory.addGetterSetter(h,"radius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"angle",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"clockwise",!1),r.Factory.backCompat(h,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})},88709:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Noise=void 0;let r=i(73409),a=i(91941),n=i(54990);e.Noise=function(t){let e=255*this.noise(),i=t.data,r=i.length,a=e/2;for(let t=0;t<r;t+=4)i[t+0]+=a-2*a*Math.random(),i[t+1]+=a-2*a*Math.random(),i[t+2]+=a-2*a*Math.random()},r.Factory.addGetterSetter(a.Node,"noise",.2,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},91941:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;let r=i(22465),a=i(64921),n=i(73409),s=i(14498),o=i(94001),h=i(54990),l="absoluteOpacity",d="allEventListeners",c="absoluteTransform",u="absoluteScale",g="canvas",f="listening",p="Shape",m="stage",y="transform",_="visible",v=1;class b{constructor(t){this._id=v++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===y||t===c)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,e){let i=this._cache.get(t),r=t===y||t===c;return(void 0===i||r&&!0===i.dirty)&&(i=e.call(this),this._cache.set(t,i)),i}_calculate(t,e,i){if(!this._attachedDepsListeners.get(t)){let i=e.map(t=>t+"Change.konva").join(" ");this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,i)}_getCanvasCache(){return this._cache.get(g)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===c&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(g)){let{scene:t,filter:e,hit:i,buffer:r}=this._cache.get(g);o.Util.releaseCanvas(t,e,i,r),this._cache.delete(g)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){let e=t||{},i={};(void 0===e.x||void 0===e.y||void 0===e.width||void 0===e.height)&&(i=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let a=Math.ceil(e.width||i.width),n=Math.ceil(e.height||i.height),s=e.pixelRatio,h=void 0===e.x?Math.floor(i.x):e.x,d=void 0===e.y?Math.floor(i.y):e.y,c=e.offset||0,f=e.drawBorder||!1,p=e.hitCanvasPixelRatio||1;if(!a||!n)return void o.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");let m=+(Math.abs(Math.round(i.x)-h)>.5),y=+(Math.abs(Math.round(i.y)-d)>.5);a+=2*c+m,n+=2*c+y,h-=c,d-=c;let _=new r.SceneCanvas({pixelRatio:s,width:a,height:n}),v=new r.SceneCanvas({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),b=new r.HitCanvas({pixelRatio:p,width:a,height:n}),x=_.getContext(),S=b.getContext(),C=new r.SceneCanvas({width:_.width/_.pixelRatio+Math.abs(h),height:_.height/_.pixelRatio+Math.abs(d),pixelRatio:_.pixelRatio}),w=C.getContext();return b.isCache=!0,_.isCache=!0,this._cache.delete(g),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(_.getContext()._context.
8imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),x.save(),S.save(),w.save(),x.translate(-h,-d),S.translate(-h,-d),w.translate(-h,-d),C.x=h,C.y=d,this._isUnderCache=!0,this._clearSelfAndDescendantCache(l),this._clearSelfAndDescendantCache(u),this.drawScene(_,this,C),this.drawHit(b,this),this._isUnderCache=!1,x.restore(),S.restore(),f&&(x.save(),x.beginPath(),x.rect(0,0,a,n),x.closePath(),x.setAttr("strokeStyle","red"),x.setAttr("lineWidth",5),x.stroke(),x.restore()),this._cache.set(g,{scene:_,filter:v,hit:b,buffer:C,x:h,y:d}),this._requestDraw(),this}isCached(){return this._cache.has(g)}getClientRect(t){throw Error('abstract "getClientRect" method call')}_transformedRect(t,e){let i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],r=1/0,a=1/0,n=-1/0,s=-1/0,o=this.getAbsoluteTransform(e);return i.forEach(function(t){let e=o.point(t);void 0===r&&(r=n=e.x,a=s=e.y),r=Math.min(r,e.x),a=Math.min(a,e.y),n=Math.max(n,e.x),s=Math.max(s,e.y)}),{x:r,y:a,width:n-r,height:s-a}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);let e=this._getCanvasCache();t.translate(e.x,e.y);let i=this._getCachedSceneCanvas(),r=i.pixelRatio;t.drawImage(i._canvas,0,0,i.width/r,i.height/r),t.restore()}_drawCachedHitCanvas(t){let e=this._getCanvasCache(),i=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(i._canvas,0,0,i.width/i.pixelRatio,i.height/i.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),e=this._getCanvasCache(),i=e.scene,r=e.filter,a=r.getContext(),n,s,h,l;if(t){if(!this._filterUpToDate){let e=i.pixelRatio;r.setSize(i.width/i.pixelRatio,i.height/i.pixelRatio);try{for(n=t.length,a.clear(),a.drawImage(i._canvas,0,0,i.getWidth()/e,i.getHeight()/e),s=a.getImageData(0,0,r.getWidth(),r.getHeight()),h=0;h<n;h++){if(l=t[h],"function"!=typeof l){o.Util.error("Filter should be type of function, but got "+typeof l+" instead. Please check correct filters");continue}l.call(this,s),a.putImageData(s,0,0)}}catch(t){o.Util.error("Unable to apply filter. "+t.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return r}return i}on(t,e){if(this._cache&&this._cache.delete(d),3==arguments.length)return this._delegate.apply(this,arguments);let i=t.split(" ");for(let t=0;t<i.length;t++){let r=i[t].split("."),a=r[0],n=r[1]||"";this.eventListeners[a]||(this.eventListeners[a]=[]),this.eventListeners[a].push({name:n,handler:e})}return this}off(t,e){let i=(t||"").split(" "),r=i.length,a,n,s,o,h;if(this._cache&&this._cache.delete(d),!t)for(n in this.eventListeners)this._off(n);for(a=0;a<r;a++)if(o=(s=i[a].split("."))[0],h=s[1],o)this.eventListeners[o]&&this._off(o,h,e);else for(n in this.eventListeners)this._off(n,h,e);return this}dispatchEvent(t){let e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(t){e.call(this,t.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,i){let r=this;this.on(t,function(t){let a=t.target.findAncestors(e,!0,r);for(let e=0;e<a.length;e++)(t=o.Util.cloneObject(t)).currentTarget=a[e],i.call(a[e],t)})}
8remove(){return this.isDragging()&&this.stopDrag(),a.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(l),this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(m),this._clearSelfAndDescendantCache(_),this._clearSelfAndDescendantCache(f)}_remove(){this._clearCaches();let t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){let e="get"+o.Util._capitalize(t);return o.Util._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){let t=this.getParent(),e=[];for(;t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let e,i;if(!t)return this;for(e in t)"children"!==e&&(i="set"+o.Util._capitalize(e),o.Util._isFunction(this[i])?this[i](t[e]):this._setAttr(e,t[e]))}),this}isListening(){return this._getCache(f,this._isListening)}_isListening(t){if(!this.listening())return!1;let e=this.getParent();return!e||e===t||this===t||e._isListening(t)}isVisible(){return this._getCache(_,this._isVisible)}_isVisible(t){if(!this.visible())return!1;let e=this.getParent();return!e||e===t||this===t||e._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);let i=this.getLayer(),r=!1;a.DD._dragElements.forEach(t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType?r=!0:t.node.getLayer()===i&&(r=!0))});let n=!e&&!s.Konva.hitOnDragEnabled&&(r||s.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!n}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),e=this,i=0,r,a,n,s,o=this.getStage();return"Stage"!==e.nodeType&&o&&function o(h){for(n=0,r=[],a=h.length;n<a;n++)s=h[n],i++,s.nodeType!==p&&(r=r.concat(s.getChildren().slice())),s._id===e._id&&(n=a);r.length>0&&r[0].getDepth()<=t&&o(r)}(o.getChildren()),i}getDepth(){let t=0,e=this.parent;for(;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(y),this._clearSelfAndDescendantCache(c)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){let t=this.getStage();if(!t)return null;let e=t.getPointerPosition();if(!e)return null;let i=this.getAbsoluteTransform().copy();return i.invert(),i.point(e)}getAbsolutePosition(t){let e=!1,i=this.parent;for(;i;){if(i.isCached()){e=!0;break}i=i.parent}e&&!t&&(t=!0);let r=this.getAbsoluteTransform(t).getMatrix(),a=new o.Transform,n=this.offset();return a.m=r.slice(),a.translate(n.x,n.y),a.getTranslation()}setAbsolutePosition(t){let{x:e,y:i,...r}=this._clearTransform();this.attrs.x=e,this.attrs.y=i,this._clearCache(y);let a=this._getAbsoluteTransform().copy();return a.invert(),a.translate(t.x,t.y),t={x:this.attrs.x+a.getTranslation().x,y:this.attrs.y+a.getTranslation().y},this._setTransform(r),this.setPosition({x:t.x,y:t.y}),this._clearCache(y),this._clearSelfAndDescendantCache(c),this}_setTransform(t){let e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){let t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let e=t.x,i=t.y,r=this.x(),a=this.y();return void 0!==e&&(r+=e),void 0!==i&&(a+=i),this.setPosition({x:r,y:a}),this}_eachAncestorReverse(t,e){let i=[],r=this.getParent(),a,n;if(!e||e._id!==this._id){for(i.unshift(this);r&&(!e||r._id!==e._id);)i.unshift(r),r=r.parent;for(n=0,a=i.length;n<a;n++)t(i[n])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return o.Util.warn("Node has no parent. moveToTop function is ignored."),!1;let t=this.index;return t<this.parent.getChildren().length-1&&(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return o.Util.warn("Node has no parent. moveUp function is ignored."),!1;let t=this.index;return t<this.parent.getChildren().length-1&&(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return o.Util.warn("Node has no parent. moveDown function is ignored."),!1;let t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return o.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;let t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(t){if(!this.parent)return o.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&o.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");let e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(l,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t=this.getAttrs(),e,i,r,a,n={attrs:{},className:this.getClassName()};for(e in t)i=t[e],(!o.Util.isObject(i)||o.Util._isPlainObject(i)||o.Util._isArray(i))&&(r="function"==typeof this[e]&&this[e],delete t[e],a=r?r.call(this):null,t[e]=i,a!==i&&(n.attrs[e]=i));return o.Util._prepareToStringify(n)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,i){let r=[];e&&this._isMatch(t)&&r.push(this);let a=this.parent;for(;a&&a!==i;)a._isMatch(t)&&r.push(a),a=a.parent;return r}isAncestorOf(t){return!1}
8findAncestor(t,e,i){return this.findAncestors(t,e,i)[0]}_isMatch(t){if(!t)return!1;if("function"==typeof t)return t(this);let e=t.replace(/ /g,"").split(","),i=e.length,r,a;for(r=0;r<i;r++)if(a=e[r],o.Util.isValidSelector(a)||(o.Util.warn('Selector "'+a+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),o.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),o.Util.warn("Konva is awesome, right?")),"#"===a.charAt(0)){if(this.id()===a.slice(1))return!0}else if("."===a.charAt(0)){if(this.hasName(a.slice(1)))return!0}else if(this.className===a||this.nodeType===a)return!0;return!1}getLayer(){let t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(m,this._getStage)}_getStage(){let t=this.getParent();return t?t.getStage():null}fire(t,e={},i){return e.target=e.target||this,i?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(c,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let e;if(t)return e=new o.Transform,this._eachAncestorReverse(function(t){let i=t.transformsEnabled();"all"===i?e.multiply(t.getTransform()):"position"===i&&e.translate(t.x()-t.offsetX(),t.y()-t.offsetY())},t),e;{e=this._cache.get(c)||new o.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();let t=this.transformsEnabled();if("all"===t)e.multiply(this.getTransform());else if("position"===t){let t=this.attrs.x||0,i=this.attrs.y||0,r=this.attrs.offsetX||0,a=this.attrs.offsetY||0;e.translate(t-r,i-a)}return e.dirty=!1,e}}getAbsoluteScale(t){let e=this;for(;e;)e._isUnderCache&&(t=e),e=e.getParent();let i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(y,this._getTransform)}_getTransform(){var t,e;let i=this._cache.get(y)||new o.Transform;i.reset();let r=this.x(),a=this.y(),n=s.Konva.getAngle(this.rotation()),h=null!=(t=this.attrs.scaleX)?t:1,l=null!=(e=this.attrs.scaleY)?e:1,d=this.attrs.skewX||0,c=this.attrs.skewY||0,u=this.attrs.offsetX||0,g=this.attrs.offsetY||0;return(0!==r||0!==a)&&i.translate(r,a),0!==n&&i.rotate(n),(0!==d||0!==c)&&i.skew(d,c),(1!==h||1!==l)&&i.scale(h,l),(0!==u||0!==g)&&i.translate(-1*u,-1*g),i.dirty=!1,i}clone(t){let e=o.Util.cloneObject(this.attrs),i,r,a,n,s;for(i in t)e[i]=t[i];let h=new this.constructor(e);for(i in this.eventListeners)for(n=0,a=(r=this.eventListeners[i]).length;n<a;n++)0>(s=r[n]).name.indexOf("konva")&&(h.eventListeners[i]||(h.eventListeners[i]=[]),h.eventListeners[i].push(s));return h}_toKonvaCanvas(t){t=t||{};let e=this.getClientRect(),i=this.getStage(),a=void 0!==t.x?t.x:Math.floor(e.x),n=void 0!==t.y?t.y:Math.floor(e.y),s=t.pixelRatio||1,o=new r.SceneCanvas({width:t.width||Math.ceil(e.width)||(i?i.width():0),height:t.height||Math.ceil(e.height)||(i?i.height():0),pixelRatio:s}),h=o.getContext(),l=new r.SceneCanvas({width:o.width/o.pixelRatio+Math.abs(a),height:o.height/o.pixelRatio+Math.abs(n),pixelRatio:o.pixelRatio});return!1===t.imageSmoothingEnabled&&(h._context.imageSmoothingEnabled=!1),h.save(),(a||n)&&h.translate(-1*a,-1*n),this.drawScene(o,void 0,l),h.restore(
8),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){let e=(t=t||{}).mimeType||null,i=t.quality||null,r=this._toKonvaCanvas(t).toDataURL(e,i);return t.callback&&t.callback(r),r}toImage(t){return new Promise((e,i)=>{try{let i=null==t?void 0:t.callback;i&&delete t.callback,o.Util._urlToImage(this.toDataURL(t),function(t){e(t),null==i||i(t)})}catch(t){i(t)}})}toBlob(t){return new Promise((e,i)=>{try{let i=null==t?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(t=>{e(t),null==i||i(t)},null==t?void 0:t.mimeType,null==t?void 0:t.quality)}catch(t){i(t)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():s.Konva.dragDistance}_off(t,e,i){let r=this.eventListeners[t],a,n,s;for(a=0;a<r.length;a++)if(n=r[a].name,s=r[a].handler,("konva"!==n||"konva"===e)&&(!e||n===e)&&(!i||i===s)){if(r.splice(a,1),0===r.length){delete this.eventListeners[t];break}a--}}_fireChangeEvent(t,e,i){this._fire(t+"Change",{oldVal:e,newVal:i})}addName(t){if(!this.hasName(t)){let e=this.name();this.name(e?e+" "+t:t)}return this}hasName(t){if(!t)return!1;let e=this.name();return!!e&&-1!==(e||"").split(/\s/g).indexOf(t)}removeName(t){let e=(this.name()||"").split(/\s/g),i=e.indexOf(t);return -1!==i&&(e.splice(i,1),this.name(e.join(" "))),this}setAttr(t,e){let i=this["set"+o.Util._capitalize(t)];return o.Util._isFunction(i)?i.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(s.Konva.autoDrawEnabled){let t=this.getLayer()||this.getStage();null==t||t.batchDraw()}}_setAttr(t,e){let i=this.attrs[t];(i!==e||o.Util.isObject(e))&&(null==e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,i,e),this._requestDraw())}_setComponentAttr(t,e,i){let r;void 0!==i&&((r=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=i,this._fireChangeEvent(t,r,i))}_fireAndBubble(t,e,i){e&&this.nodeType===p&&(e.target=this);let r=["mouseenter","mouseleave","pointerenter","pointerleave","touchenter","touchleave"];if(!(-1!==r.indexOf(t)&&(i&&(this===i||this.isAncestorOf&&this.isAncestorOf(i))||"Stage"===this.nodeType&&!i))){this._fire(t,e);let a=-1!==r.indexOf(t)&&i&&i.isAncestorOf&&i.isAncestorOf(this)&&!i.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!a&&(i&&i.parent?this._fireAndBubble.call(this.parent,t,e,i):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){var e,i,r;let a=null!=(e=this._cache.get(d))?e:{},n=null==a?void 0:a[t];if(void 0===n){n=[];let e=Object.getPrototypeOf(this);for(;e;){let a=null!=(r=null==(i=e.eventListeners)?void 0:i[t])?r:[];n.push(...a),e=Object.getPrototypeOf(e)}a[t]=n,this._cache.set(d,a)}return n}_fire(t,e){(e=e||{}).currentTarget=this,e.type=t;let i=this._getProtoListeners(t);if(i)for(let t=0;t<i.length;t++)i[t].handler.call(this,e);let r=this.eventListeners[t];if(r)for(let t=0;t<r.length;t++)r[t].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){let e=t?t.pointerId:void 0,i=this.getStage(),r=this.getAbsolutePosition();if(!i)return;let n=i._getPointerById(e)||i._changedPointerPositions[0]||r;a.DD._dragElements.set(this._id,{node:this,startPointerPos:n,offset:{x:n.x-r.x,y:n.y-r.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){a.DD._dragElements.has(this._id)||this._createDragElement(t),a.DD._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){let i=this.getStage()._getPointerById(e.pointerId);if(!i)return;let r={x:i.x-e.offset.x,y:i.y-e.offset.y},a=this.dragBoundFunc();if(void 0!==a){let e=a.call(this,r,t);e?r=e:o.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}stopDrag(t){let e=a.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),a.DD._endDragBefore(t),a.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){let t=a.DD._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(void 0===t.evt.button||s.Konva.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let e=!1;
8a.DD._dragElements.forEach(t=>{this.isAncestorOf(t.node)&&(e=!0)}),e||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let t=a.DD._dragElements.get(this._id),e=t&&"dragging"===t.dragStatus,i=t&&"ready"===t.dragStatus;e?this.stopDrag():i&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){let e=this.getStage();if(!e)return!1;let i={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return o.Util.haveIntersection(i,this.getClientRect())}static create(t,e){return o.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){let i=b.prototype.getClassName.call(t),r=t.children,a,n,h;if(e&&(t.attrs.container=e),s.Konva[i]||(o.Util.warn('Can not find a node with class name "'+i+'". Fallback to "Shape".'),i="Shape"),a=new s.Konva[i](t.attrs),r)for(h=0,n=r.length;h<n;h++)a.add(b._createNode(r[h]));return a}}e.Node=b,b.prototype.nodeType="Node",b.prototype._attrsAffectingSize=[],b.prototype.eventListeners={},b.prototype.on.call(b.prototype,"xChange.konva yChange.konva scaleXChange.konva scaleYChange.konva skewXChange.konva skewYChange.konva rotationChange.konva offsetXChange.konva offsetYChange.konva transformsEnabledChange.konva",function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(y),this._clearSelfAndDescendantCache(c)}),b.prototype.on.call(b.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(_)}),b.prototype.on.call(b.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(f)}),b.prototype.on.call(b.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(l)});let x=n.Factory.addGetterSetter;x(b,"zIndex"),x(b,"absolutePosition"),x(b,"position"),x(b,"x",0,(0,h.getNumberValidator)()),x(b,"y",0,(0,h.getNumberValidator)()),x(b,"globalCompositeOperation","source-over",(0,h.getStringValidator)()),x(b,"opacity",1,(0,h.getNumberValidator)()),x(b,"name","",(0,h.getStringValidator)()),x(b,"id","",(0,h.getStringValidator)()),x(b,"rotation",0,(0,h.getNumberValidator)()),n.Factory.addComponentsGetterSetter(b,"scale",["x","y"]),x(b,"scaleX",1,(0,h.getNumberValidator)()),x(b,"scaleY",1,(0,h.getNumberValidator)()),n.Factory.addComponentsGetterSetter(b,"skew",["x","y"]),x(b,"skewX",0,(0,h.getNumberValidator)()),x(b,"skewY",0,(0,h.getNumberValidator)()),n.Factory.addComponentsGetterSetter(b,"offset",["x","y"]),x(b,"offsetX",0,(0,h.getNumberValidator)()),x(b,"offsetY",0,(0,h.getNumberValidator)()),x(b,"dragDistance",void 0,(0,h.getNumberValidator)()),x(b,"width",0,(0,h.getNumberValidator)()),x(b,"height",0,(0,h.getNumberValidator)()),x(b,"listening",!0,(0,h.getBooleanValidator)()),x(b,"preventDefault",!0,(0,h.getBooleanValidator)()),x(b,"filters",void 0,function(t){return this._filterUpToDate=!1,t}),x(b,"visible",!0,(0,h.getBooleanValidator)()),x(b,"transformsEnabled","all",(0,h.getStringValidator)()),x(b,"size"),x(b,"dragBoundFunc"),x(b,"draggable",!1,(0,h.getBooleanValidator)()),n.Factory.backCompat(b,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"})},92566:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var r=i(54193),a=i(82008),n=i.n(a),s=i(96810),o=i(9465),h=i(8452),l=i(18608),d=i(3415);let c=function(t,e){d.A&&!(0,l.Tn)(t)&&console.error("useThrottleFn expected parameter is a function, got ".concat(typeof t));var i,a=(0,o.A)(t),c=null!=(i=null==e?void 0:e.wait)?i:1e3,u=(0,s.useMemo)(function(){return n()(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return a.current.apply(a,(0,r.__spreadArray)([],(0,r.__read)(t),!1))},c,e)},[]);return(0,h.A)(function(){u.cancel()}),{run:u,cancel:u.cancel,flush:u.flush}}},93812:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Blur=void 0;let r=i(73409),a=i(91941),n=i(54990);function s(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}let o=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,39
86,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],h=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];e.Blur=function(t){let e=Math.round(this.blurRadius());e>0&&function(t,e){let i,r,a,n,l,d,c,u,g,f,p,m,y,_,v,b,x,S,C,w,P=t.data,k=t.width,T=t.height,A=e+e+1,M=k-1,F=T-1,R=e+1,D=R*(R+1)/2,E=new s,G=o[e],N=h[e],O=null,L=E,I=null,U=null;for(let t=1;t<A;t++)L=L.next=new s,t===R&&(O=L);L.next=E,a=r=0;for(let t=0;t<T;t++){m=y=_=v=n=l=d=c=0,u=R*(b=P[r]),g=R*(x=P[r+1]),f=R*(S=P[r+2]),p=R*(C=P[r+3]),n+=D*b,l+=D*x,d+=D*S,c+=D*C,L=E;for(let t=0;t<R;t++)L.r=b,L.g=x,L.b=S,L.a=C,L=L.next;for(let t=1;t<R;t++)i=r+((M<t?M:t)<<2),n+=(L.r=b=P[i])*(w=R-t),l+=(L.g=x=P[i+1])*w,d+=(L.b=S=P[i+2])*w,c+=(L.a=C=P[i+3])*w,m+=b,y+=x,_+=S,v+=C,L=L.next;I=E,U=O;for(let t=0;t<k;t++)P[r+3]=C=c*G>>N,0!==C?(C=255/C,P[r]=(n*G>>N)*C,P[r+1]=(l*G>>N)*C,P[r+2]=(d*G>>N)*C):P[r]=P[r+1]=P[r+2]=0,n-=u,l-=g,d-=f,c-=p,u-=I.r,g-=I.g,f-=I.b,p-=I.a,i=a+((i=t+e+1)<M?i:M)<<2,m+=I.r=P[i],y+=I.g=P[i+1],_+=I.b=P[i+2],v+=I.a=P[i+3],n+=m,l+=y,d+=_,c+=v,I=I.next,u+=b=U.r,g+=x=U.g,f+=S=U.b,p+=C=U.a,m-=b,y-=x,_-=S,v-=C,U=U.next,r+=4;a+=k}for(let t=0;t<k;t++){y=_=v=m=l=d=c=n=0,u=R*(b=P[r=t<<2]),g=R*(x=P[r+1]),f=R*(S=P[r+2]),p=R*(C=P[r+3]),n+=D*b,l+=D*x,d+=D*S,c+=D*C,L=E;for(let t=0;t<R;t++)L.r=b,L.g=x,L.b=S,L.a=C,L=L.next;let a=k;for(let i=1;i<=e;i++)r=a+t<<2,n+=(L.r=b=P[r])*(w=R-i),l+=(L.g=x=P[r+1])*w,d+=(L.b=S=P[r+2])*w,c+=(L.a=C=P[r+3])*w,m+=b,y+=x,_+=S,v+=C,L=L.next,i<F&&(a+=k);r=t,I=E,U=O;for(let e=0;e<T;e++)P[(i=r<<2)+3]=C=c*G>>N,C>0?(C=255/C,P[i]=(n*G>>N)*C,P[i+1]=(l*G>>N)*C,P[i+2]=(d*G>>N)*C):P[i]=P[i+1]=P[i+2]=0,n-=u,l-=g,d-=f,c-=p,u-=I.r,g-=I.g,f-=I.b,p-=I.a,i=t+((i=e+R)<F?i:F)*k<<2,n+=m+=I.r=P[i],l+=y+=I.g=P[i+1],d+=_+=I.b=P[i+2],c+=v+=I.a=P[i+3],I=I.next,u+=b=U.r,g+=x=U.g,f+=S=U.b,p+=C=U.a,m-=b,y-=x,_-=S,v-=C,U=U.next,r+=k}}(t,e)},r.Factory.addGetterSetter(a.Node,"blurRadius",0,(0,n.getNumberValidator)(),r.Factory.afterSetFilter)},94001:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;let r=i(14498);class a{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new a(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){let e=this.m;return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}}translate(t,e){return this.m[4]+=this.m[0]*t+this.m[2]*e,this.m[5]+=this.m[1]*t+this.m[3]*e,this}scale(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this}rotate(t){let e=Math.cos(t),i=Math.sin(t),r=this.m[0]*e+this.m[2]*i,a=this.m[1]*e+this.m[3]*i,n=-(this.m[0]*i)+this.m[2]*e,s=-(this.m[1]*i)+this.m[3]*e;return this.m[0]=r,this.m[1]=a,this.m[2]=n,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,e){let i=this.m[0]+this.m[2]*e,r=this.m[1]+this.m[3]*e,a=this.m[2]+this.m[0]*t,n=this.m[3]+this.m[1]*t;return this.m[0]=i,this.m[1]=r,this.m[2]=a,this.m[3]=n,this}multiply(t){let e=this.m[0]*t.m[0]+this.m[2]*t.m[1],i=this.m[1]*t.m[0]+this.m[3]*t.m[1],r=this.m[0]*t.m[2]+this.m[2]*t.m[3],a=this.m[1]*t.m[2]+this.m[3]*t.m[3],n=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=i,this.m[2]=r,this.m[3]=a,this.m[4]=n,this.m[5]=s,this}invert(){let t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,i=-this.m[1]*t,r=-this.m[2]*t,a=this.m[0]*t,n=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=i,this.m[2]=r,this.m[3]=a,this.m[4]=n,this.m[5]=s,this}getMatrix(){return this.m}decompose(){let t=this.m[0],i=this.m[1],r=this.m[2],a=this.m[3],n=this.m[4],s=this.m[5],o=t*a-i*r,h={x:n,y:s,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=i){let e=Math.sqrt(t*t+i*i);h.rotation=i>0?Math.acos(t/e):-Math.acos(t/e),h.scaleX=e,h.scaleY=o/e,h.skewX=(t*r+i*a
8)/o,h.skewY=0}else if(0!=r||0!=a){let e=Math.sqrt(r*r+a*a);h.rotation=Math.PI/2-(a>0?Math.acos(-r/e):-Math.acos(r/e)),h.scaleX=o/e,h.scaleY=e,h.skewX=0,h.skewY=(t*r+i*a)/o}return h.rotation=e.Util._getRotation(h.rotation),h}}e.Transform=a;let n=Math.PI/180,s=180/Math.PI,o="Konva error: ",h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},l=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,d=[],c="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(t){setTimeout(t,60)};e.Util={_isElement:t=>!!(t&&1==t.nodeType),_isFunction:t=>!!(t&&t.constructor&&t.call&&t.apply),_isPlainObject:t=>!!t&&t.constructor===Object,_isArray:t=>"[object Array]"===Object.prototype.toString.call(t),_isNumber:t=>"[object Number]"===Object.prototype.toString.call(t)&&!isNaN(t)&&isFinite(t),_isString:t=>"[object String]"===Object.prototype.toString.call(t),_isBoolean:t=>"[object Boolean]"===Object.prototype.toString.call(t),isObject:t=>t instanceof Object,isValidSelector(t){if("string"!=typeof t)return!1;let e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign:t=>0===t||t>
80?1:-1,requestAnimFrame(t){d.push(t),1===d.length&&c(function(){let t=d;d=[],t.forEach(function(t){t()})})},createCanvasElement(){let t=document.createElement("canvas");try{t.style=t.style||{}}catch(t){}return t},createImageElement:()=>document.createElement("img"),_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,i){let r=e.Util.createImageElement();r.onload=function(){i(r)},r.src=t},_rgbToHex:(t,e,i)=>(0x1000000+(t<<16)+(e<<8)+i).toString(16).slice(1),_hexToRgb(t){let e=parseInt(t=t.replace("#",""),16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor(){let t=(0xffffff*Math.random()|0).toString(16);for(;t.length<6;)t="0"+t;return"#"+t},getRGB(t){let e;return t in h?{r:(e=h[t])[0],g:e[1],b:e[2]}:"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?{r:parseInt((e=l.exec(t.replace(/ /g,"")))[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}:{r:0,g:0,b:0}},colorToRGBA:t=>(t=t||"black",e.Util._namedColorToRBA(t)||e.Util._hex3ColorToRGBA(t)||e.Util._hex4ColorToRGBA(t)||e.Util._hex6ColorToRGBA(t)||e.Util._hex8ColorToRGBA(t)||e.Util._rgbColorToRGBA(t)||e.Util._rgbaColorToRGBA(t)||e.Util._hslColorToRGBA(t)),_namedColorToRBA(t){let e=h[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(0===t.indexOf("rgb(")){let e=(t=t.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(0===t.indexOf("rgba(")){let e=(t=t.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map((t,e)=>"%"===t.slice(-1)?3===e?parseInt(t)/100:parseInt(t)/100*255:Number(t));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex8ColorToRGBA(t){if("#"===t[0]&&9===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:parseInt(t.slice(7,9),16)/255}},_hex6ColorToRGBA(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex4ColorToRGBA(t){if("#"===t[0]&&5===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:parseInt(t[4]+t[4],16)/255}},_hex3ColorToRGBA(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){let e,i,r,[a,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),s=Number(n[0])/360,o=Number(n[1])/100,h=Number(n[2])/100;if(0===o)return{r:Math.round(r=255*h),g:Math.round(r),b:Math.round(r),a:1};e=h<.5?h*(1+o):h+o-h*o;let l=2*h-e,d=[0,0,0];for(let t=0;t<3;t++)(i=s+-(1/3*(t-1)))<0&&i++,i>1&&i--,r=6*i<1?l+(e-l)*6*i:2*i<1?e:3*i<2?l+(e-l)*(2/3-i)*6:l,d[t]=255*r;return{r:Math.round(d[0]),g:Math.round(d[1]),b:Math.round(d[2]),a:1}}},haveIntersection:(t,e)=>!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y),cloneObject(t){let e={};for(let i in t)this._isPlainObject(t[i])?e[i]=this.cloneObject(t[i]):this._isArray(t[i])?e[i]=this.cloneArray(t[i]):e[i]=t[i];return e},cloneArray:t=>t.slice(0),degToRad:t=>t*n,radToDeg:t=>t*s,_degToRad:t=>(e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(t)),_radToDeg:t=>(e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(t)),_getRotation:t=>r.Konva.angleDeg?e.Util.radToDeg(t):t,_capitalize:t=>t.charAt(0).toUpperCase()+t.slice(1),throw(t){throw Error(o+t)},error(t){console.error(o+t)},warn(t){r.Konva.showWarnings&&console.warn("Konva warning: "+t)},each(t,e){for(let i in t)e(i,t[i])},_inRange:(t,e,i)=>e<=t&&t<i,_getProjectionToSegment(t,e,i,r,a,n){let s,o,h,l=(t-i)*(t-i)+(e-r)*(e-r);if(0==l)s=t,o=e,h=(a-i)*(a-i)+(n-r)*(n-r);else{let d=((a-t)*(i-t)+(n-e)*(r-e))/l;d<0?(s=t,o=e,h=(t-a)*(t-a)+(e-n)*(e-n)):d>1?(s=i,o=r,h=(i-a)*(i-a)+(r-n)*(r-n)):h=((s=t+d*(i-t))-a)*(s-a)+((o=e+d*(r-e))-n)*(o-n)}return[s,o,h]},_getProjectionToLine(t,i,r){let a=e.Util.cloneObject(t),n=Number.MAX_VALUE;return i.forEach(function(s,o){if(!r&&o===i.length-1)return;let h=i[(o+1)%i.length],l=e.Util._getProjectionToSegment(s.x,s.y,h.x,h.y,t.x,t.y),d=l[0],c=l[1],u=l[2];u<n&&(a.x=d,a.y=c,n=u)}),a},_prepareArrayForTween(t,i,r){let a=[],n=[];if(t.length>i.length){let e=i;i=t,t=e}for(let e=0;e<t.length;e+=2)a.push({x:t[e],y:t[e+1]});for(let t=0;t<i.length;t+=2)n.push({x:i[t],y:i[t+1]});let s=[];
8return n.forEach(function(t){let i=e.Util._getProjectionToLine(t,a,r);s.push(i.x),s.push(i.y)}),s},_prepareToStringify(t){let i;for(let r in t.visitedByCircularReferenceRemoval=!0,t)if(t.hasOwnProperty(r)&&t[r]&&"object"==typeof t[r]){if(i=Object.getOwnPropertyDescriptor(t,r),t[r].visitedByCircularReferenceRemoval||e.Util._isElement(t[r]))if(!i.configurable)return null;else delete t[r];else if(null===e.Util._prepareToStringify(t[r]))if(!i.configurable)return null;else delete t[r]}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(let i in e)t[i]=e[i];return t},_getFirstPointerId:t=>t.touches?t.changedTouches[0].identifier:t.pointerId||999,releaseCanvas(...t){r.Konva.releaseCanvasOnDestroy&&t.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(t,e,i,r){let a=0,n=0,s=0,o=0;"number"==typeof r?a=n=s=o=Math.min(r,e/2,i/2):(a=Math.min(r[0]||0,e/2,i/2),n=Math.min(r[1]||0,e/2,i/2),o=Math.min(r[2]||0,e/2,i/2),s=Math.min(r[3]||0,e/2,i/2)),t.moveTo(a,0),t.lineTo(e-n,0),t.arc(e-n,n,n,3*Math.PI/2,0,!1),t.lineTo(e,i-o),t.arc(e-o,i-o,o,0,Math.PI/2,!1),t.lineTo(s,i),t.arc(s,i-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,a),t.arc(a,a,a,Math.PI,3*Math.PI/2,!1)}}},95566:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tag=e.Label=void 0;let r=i(73409),a=i(32598),n=i(79004),s=i(54990),o=i(14498),h=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],l="right",d="down",c="left",u=h.length;class g extends n.Group{constructor(t){super(t),this.on("add.konva",function(t){this._addListeners(t.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let e=this,i,r=function(){e._sync()};for(i=0;i<u;i++)t.on(h[i]+"Change.konva",r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),e=this.getTag(),i,r,a,n,s,o,h;if(t&&e){switch(i=t.width(),r=t.height(),a=e.pointerDirection(),n=e.pointerWidth(),h=e.pointerHeight(),s=0,o=0,a){case"up":s=i/2,o=-1*h;break;case l:s=i+n,o=r/2;break;case d:s=i/2,o=r+h;break;case c:s=-1*n,o=r/2}e.setAttrs({x:-1*s,y:-1*o,width:i,height:r}),t.setAttrs({x:-1*s,y:-1*o})}}}e.Label=g,g.prototype.className="Label",(0,o._registerNode)(g);class f extends a.Shape{_sceneFunc(t){let e=this.width(),i=this.height(),r=this.pointerDirection(),a=this.pointerWidth(),n=this.pointerHeight(),s=this.cornerRadius(),o=0,h=0,u=0,g=0;"number"==typeof s?o=h=u=g=Math.min(s,e/2,i/2):(o=Math.min(s[0]||0,e/2,i/2),h=Math.min(s[1]||0,e/2,i/2),g=Math.min(s[2]||0,e/2,i/2),u=Math.min(s[3]||0,e/2,i/2)),t.beginPath(),t.moveTo(o,0),"up"===r&&(t.lineTo((e-a)/2,0),t.lineTo(e/2,-1*n),t.lineTo((e+a)/2,0)),t.lineTo(e-h,0),t.arc(e-h,h,h,3*Math.PI/2,0,!1),r===l&&(t.lineTo(e,(i-n)/2),t.lineTo(e+a,i/2),t.lineTo(e,(i+n)/2)),t.lineTo(e,i-g),t.arc(e-g,i-g,g,0,Math.PI/2,!1),r===d&&(t.lineTo((e+a)/2,i),t.lineTo(e/2,i+n),t.lineTo((e-a)/2,i)),t.lineTo(u,i),t.arc(u,i-u,u,Math.PI/2,Math.PI,!1),r===c&&(t.lineTo(0,(i+n)/2),t.lineTo(-1*a,i/2),t.lineTo(0,(i-n)/2)),t.lineTo(0,o),t.arc(o,o,o,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,e=0,i=this.pointerWidth(),r=this.pointerHeight(),a=this.pointerDirection(),n=this.width(),s=this.height();return"up"===a?(e-=r,s+=r):a===d?s+=r:a===c?(t-=1.5*i,n+=i):a===l&&(n+=1.5*i),{x:t,y:e,width:n,height:s}}}e.Tag=f,f.prototype.className="Tag",(0,o._registerNode)(f),r.Factory.addGetterSetter(f,"pointerDirection","none"),r.Factory.addGetterSetter(f,"pointerWidth",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(f,"pointerHeight",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(f,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4))},97768:(t,e,i)=>{var r=i(14872),a=i(33696);t.exports=function(t){return"symbol"==typeof t||a(t)&&"[object Symbol]"==r(t)}},98315:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.exports=i(30287).Konva},99759:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.