"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[2753,4524,4644,6171,365],{6992:function(e,t,r){r.d(t,{Ns:function(){return n},UH:function(){return i},W2:function(){return l},d:function(){return c},gP:function(){return o},lq:function(){return s}});var a=r(22017);function n(e,t){switch(t){case"init":e.selection=!0,e.selectionColor="rgba(0, 0, 0, 0.2)",e.selectionBorderColor="rgba(255, 255, 255, 0.3)",e.skipTargetFind=!1;break;default:e.selectionColor="transparent",e.selectionBorderColor="transparent",e.skipTargetFind=!0;break}}function i(e,t,r,a){let n,i=t.absolutePointer;switch(e){case"rect":let e=Math.min(i.y),t=Math.min(i.x);n=new fabric.Rect({top:e,left:t,fill:"rgba(0, 0, 0, 0.2)",rx:5,ry:5});break;case"line":n=new fabric.Line([i.x,i.y,i.x,i.y],{stroke:"rgba(0, 0, 0, 0.2)",strokeLineCap:"round",strokeWidth:Number(r)});break;case"circle":n=new fabric.Circle({top:i.y,left:i.x,radius:0,fill:"rgba(0, 0, 0, 0.2)"});break;case"triangle":n=new fabric.Triangle({top:i.y,left:i.x,width:0,height:0,fill:"rgba(0, 0, 0, 0.2)"});break;case"ellipse":n=new fabric.Ellipse({top:i.y,left:i.x,rx:0,ry:0,fill:"rgba(0, 0, 0, 0.2)"});break;case"fold":n=new fabric.Polyline([{x:i.x,y:i.y},{x:i.x,y:i.y}],{fill:"transparent",stroke:"rgba(0, 0, 0, 0.2)",objectCaching:!1,strokeWidth:Number(r),selection:!1});break}return n}function s(e){let t=e.absolutePointer,r=new fabric.Rect({width:20,height:20,fill:"rgba(0, 0, 0, 0.2)",rx:5,ry:5});var a=new fabric.Path("M2 10 L8 16 L18 4",{left:2.5,top:2.5,stroke:"white",strokeWidth:2,fill:"transparent"}),n=new fabric.Group([r,a],{top:t.y-40,left:t.x-10,width:20,height:20,hasControls:!1,hasBorders:!1,selectable:!1,hoverCursor:"pointer"});return n}function o(e,t,r,a,n){const i=t.absolutePointer;let s,o,l,c,f,b,y;switch(e){case"line":r.set("x2",i.x),r.set("y2",i.y);break;case"rect":s=Math.abs(a.x-i.x),o=Math.abs(a.y-i.y),l=i.y>a.y?a.y:i.y,c=i.x>a.x?a.x:i.x,r.set("width",s),r.set("height",o),r.set("top",l),r.set("left",c);break;case"circle":f=Math.min(Math.abs(a.x-i.x),Math.abs(a.y-i.y))/2,l=i.y>a.y?a.y:a.y-2*f,c=i.x>a.x?a.x:a.x-2*f,r.set("radius",f),r.set("top",l),r.set("left",c);break;case"triangle":s=Math.abs(a.x-i.x),o=Math.abs(a.y-i.y),l=i.y>a.y?a.y:i.y,c=i.x>a.x?a.x:i.x,r.set("width",s),r.set("height",o),r.set("top",l),r.set("left",c);break;case"ellipse":b=Math.abs(a.x-i.x)/2,n.indexOf("ShiftLeft")>-1?(y=Math.abs(a.y-i.y)/2,b>y?y=b:b=y):y=Math.abs(a.y-i.y)/2,o=s,l=i.y>a.y?a.y:a.y-2*y,c=i.x>a.x?a.x:a.x-2*b,r.set("rx",b),r.set("ry",y),r.set("top",l),r.set("left",c);break;case"fold":let e=r.points;e[e.length-1].x=i.x,e[e.length-1].y=i.y;break}}async function l(e){let t;return await new Promise(((r,a)=>{t=new Image,t.src=e,t.onload=()=>{t.width=200,t.height=200,r(),t.remove()}})),t}function c(e){const t=a;let r=document.createElement("img");function n(e){return function(t,r,a,n,i){var s=this.cornerSize;t.save(),t.translate(r,a),t.rotate(fabric.util.degreesToRadians(i.angle)),t.drawImage(e,-s/3,-s/3,s/1.5,s/1.5),t.restore()}}r.src=t,fabric.Object.prototype.controls.deleteControl=new fabric.Control({x:.5,y:-.5,offsetY:-16,offsetX:16,cursorStyle:"pointer",mouseUpHandler:e,render:n(r),cornerSize:24})}},22017:function(e,t,r){e.exports=r.p+"img/cuowu.156f9f3d.svg"}}]);