{"version":3,"file":"signature_pad.umd.min.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_pad.ts","../src/signature_event_target.ts","../src/throttle.ts"],"sourcesContent":[null,null,null,null,null],"names":["Point","constructor","x","y","pressure","time","isNaN","Error","this","Date","now","distanceTo","start","Math","sqrt","pow","equals","other","velocityFrom","Bezier","startPoint","control2","control1","endPoint","startWidth","endWidth","static","points","widths","c2","calculateControlPoints","c3","c1","end","s1","s2","s3","dx1","dy1","dx2","dy2","m1","m2","l1","l2","k","cm","tx","ty","length","px","py","i","t","cx","point","cy","xdiff","ydiff","SignaturePad","_et","EventTarget","error","document","addEventListener","type","listener","options","dispatchEvent","event","removeEventListener","callback","canvas","super","_handleMouseDown","buttons","_drawningStroke","_strokeBegin","_handleMouseMove","_strokeMoveUpdate","_handleMouseUp","_strokeEnd","_handleTouchStart","cancelable","preventDefault","targetTouches","touch","changedTouches","_handleTouchMove","_handleTouchEnd","target","_handlePointerStart","_handlePointerMove","_handlePointerEnd","velocityFilterWeight","minWidth","maxWidth","throttle","minDistance","dotSize","penColor","backgroundColor","fn","wait","result","storedContext","storedArgs","previous","timeout","later","apply","args","remaining","clearTimeout","window","setTimeout","prototype","_strokeUpdate","_ctx","getContext","clear","on","ctx","fillStyle","clearRect","width","height","fillRect","_data","_reset","_isEmpty","fromDataURL","dataUrl","Promise","resolve","reject","image","Image","ratio","devicePixelRatio","xOffset","yOffset","onload","drawImage","onerror","crossOrigin","src","toDataURL","encoderOptions","_toSVG","style","touchAction","msTouchAction","userSelect","isIOS","test","navigator","userAgent","PointerEvent","_handlePointerEvents","_handleMouseEvents","_handleTouchEvents","off","isEmpty","fromData","pointGroups","_fromData","_drawCurve","bind","_drawDot","concat","toData","CustomEvent","detail","newPointGroup","push","clientX","clientY","undefined","force","_createPoint","lastPointGroup","lastPoints","lastPoint","isLastPointTooClose","curve","_addPoint","_lastPoints","_lastVelocity","_lastWidth","rect","getBoundingClientRect","left","top","getTime","unshift","_calculateCurveWidths","fromPoints","shift","velocity","newWidth","_strokeWidth","max","_drawCurveSegment","moveTo","arc","PI","widthDelta","drawSteps","ceil","beginPath","tt","ttt","u","uu","uuu","min","closePath","fill","drawCurve","drawDot","group","j","basicPoint","maxX","maxY","svg","createElementNS","setAttribute","toString","path","createElement","attr","toFixed","appendChild","circle","size","header","body","innerHTML","dummy","nodes","childNodes","cloneNode","btoa"],"mappings":";;;;mPAQaA,EAMXC,YAAYC,EAAWC,EAAWC,EAAmBC,GACnD,GAAIC,MAAMJ,IAAMI,MAAMH,GACpB,MAAM,IAAII,MAAM,sBAAsBL,MAAMC,MAE9CK,KAAKN,GAAKA,EACVM,KAAKL,GAAKA,EACVK,KAAKJ,SAAWA,GAAY,EAC5BI,KAAKH,KAAOA,GAAQI,KAAKC,MAGpBC,WAAWC,GAChB,OAAOC,KAAKC,KACVD,KAAKE,IAAIP,KAAKN,EAAIU,EAAMV,EAAG,GAAKW,KAAKE,IAAIP,KAAKL,EAAIS,EAAMT,EAAG,IAIxDa,OAAOC,GACZ,OACET,KAAKN,IAAMe,EAAMf,GACjBM,KAAKL,IAAMc,EAAMd,GACjBK,KAAKJ,WAAaa,EAAMb,UACxBI,KAAKH,OAASY,EAAMZ,KAIjBa,aAAaN,GAClB,OAAOJ,KAAKH,OAASO,EAAMP,KACvBG,KAAKG,WAAWC,IAAUJ,KAAKH,KAAOO,EAAMP,MAC5C,SCxCKc,EA6CXlB,YACSmB,EACAC,EACAC,EACAC,EACAC,EACAC,GALAjB,KAAUY,WAAVA,EACAZ,KAAQa,SAARA,EACAb,KAAQc,SAARA,EACAd,KAAQe,SAARA,EACAf,KAAUgB,WAAVA,EACAhB,KAAQiB,SAARA,EAlDFC,kBACLC,EACAC,GAEA,MAAMC,EAAKrB,KAAKsB,uBAAuBH,EAAO,GAAIA,EAAO,GAAIA,EAAO,IAAIE,GAClEE,EAAKvB,KAAKsB,uBAAuBH,EAAO,GAAIA,EAAO,GAAIA,EAAO,IAAIK,GAExE,OAAO,IAAIb,EAA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