(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{76520:function(t,e,n){"use strict";var r=n(22988),i=n(23950),o=n(2265),a=n(44839),s=n(26259),u=n(48024),c=n(69281),h=n(34990),l=n(8344),d=n(57437);let f=["className","raised"],p=t=>{let{classes:e}=t;return(0,s.Z)({root:["root"]},l.y,e)},v=(0,u.ZP)(h.Z,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),m=o.forwardRef(function(t,e){let n=(0,c.Z)({props:t,name:"MuiCard"}),{className:o,raised:s=!1}=n,u=(0,i.Z)(n,f),h=(0,r.Z)({},n,{raised:s}),l=p(h);return(0,d.jsx)(v,(0,r.Z)({className:(0,a.Z)(l.root,o),elevation:s?8:void 0,ref:e,ownerState:h},u))});e.Z=m},8344:function(t,e,n){"use strict";n.d(e,{y:function(){return o}});var r=n(34535),i=n(87542);function o(t){return(0,i.ZP)("MuiCard",t)}let a=(0,r.Z)("MuiCard",["root"]);e.Z=a},28549:function(t,e,n){"use strict";n.d(e,{Z:function(){return x}});var r=n(23950),i=n(22988),o=n(2265),a=n(44839),s=n(26259),u=n(69281),c=n(48024),h=n(42347),l=n(12272),d=n(99633),f=n(37920),p=n(34535),v=n(87542);function m(t){return(0,v.ZP)("MuiFormControl",t)}(0,p.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var y=n(57437);let _=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],g=t=>{let{classes:e,margin:n,fullWidth:r}=t,i={root:["root","none"!==n&&"margin".concat((0,l.Z)(n)),r&&"fullWidth"]};return(0,s.Z)(i,m,e)},w=(0,c.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return(0,i.Z)({},e.root,e["margin".concat((0,l.Z)(n.margin))],n.fullWidth&&e.fullWidth)}})(t=>{let{ownerState:e}=t;return(0,i.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})});var x=o.forwardRef(function(t,e){let n;let s=(0,u.Z)({props:t,name:"MuiFormControl"}),{children:c,className:l,color:p="primary",component:v="div",disabled:m=!1,error:x=!1,focused:M,fullWidth:b=!1,hiddenLabel:D=!1,margin:$="none",required:P=!1,size:S="medium",variant:O="outlined"}=s,C=(0,r.Z)(s,_),E=(0,i.Z)({},s,{color:p,component:v,disabled:m,error:x,fullWidth:b,hiddenLabel:D,margin:$,required:P,size:S,variant:O}),k=g(E),[T,W]=o.useState(()=>{let t=!1;return c&&o.Children.forEach(c,e=>{if(!(0,d.Z)(e,["Input","Select"]))return;let n=(0,d.Z)(e,["Select"])?e.props.input:e;n&&(0,h.B7)(n.props)&&(t=!0)}),t}),[L,Z]=o.useState(()=>{let t=!1;return c&&o.Children.forEach(c,e=>{(0,d.Z)(e,["Input","Select"])&&((0,h.vd)(e.props,!0)||(0,h.vd)(e.props.inputProps,!0))&&(t=!0)}),t}),[R,z]=o.useState(!1);m&&R&&z(!1);let j=void 0===M||m?R:M,F=o.useMemo(()=>({adornedStart:T,setAdornedStart:W,color:p,disabled:m,error:x,filled:L,focused:j,fullWidth:b,hiddenLabel:D,size:S,onBlur:()=>{z(!1)},onEmpty:()=>{Z(!1)},onFilled:()=>{Z(!0)},onFocus:()=>{z(!0)},registerEffect:n,required:P,variant:O}),[T,p,m,x,L,j,b,D,n,P,S,O]);return(0,y.jsx)(f.Z.Provider,{value:F,children:(0,y.jsx)(w,(0,i.Z)({as:v,ownerState:E,className:(0,a.Z)(k.root,l),ref:e},C,{children:c}))})})},42347:function(t,e,n){"use strict";function r(t){return null!=t&&!(Array.isArray(t)&&0===t.length)}function i(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t&&(r(t.value)&&""!==t.value||e&&r(t.defaultValue)&&""!==t.defaultValue)}function o(t){return t.startAdornment}n.d(e,{B7:function(){return o},vd:function(){return i}})},62737:function(t){var e;e=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",i="week",o="month",a="quarter",s="year",u="date",c="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,l=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},f="en",p={};p[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||"th")+"]"}};var v="$isDayjsObject",m=function(t){return t instanceof w||!(!t||!t[v])},y=function t(e,n,r){var i;if(!e)return f;if("string"==typeof e){var o=e.toLowerCase();p[o]&&(i=o),n&&(p[o]=n,i=o);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var s=e.name;p[s]=e,i=s}return!r&&i&&(f=i),i||!r&&f},_=function(t,e){if(m(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new w(n)},g={s:d,z:function(t){var e=-t.utcOffset(),n=Math.abs(e);return(e<=0?"+":"-")+d(Math.floor(n/60),2,"0")+":"+d(n%60,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,o),a=n-i<0,s=e.clone().add(r+(a?-1:1),o);return+(-(r+(n-i)/(a?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return({M:o,y:s,w:i,d:"day",D:u,h:r,m:n,s:e,ms:t,Q:a})[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}};g.l=y,g.i=m,g.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var w=function(){function d(t){this.$L=y(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[v]=!0}var f=d.prototype;return f.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(g.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.init()},f.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},f.$utils=function(){return g},f.isValid=function(){return this.$d.toString()!==c},f.isSame=function(t,e){var n=_(t);return this.startOf(e)<=n&&n<=this.endOf(e)},f.isAfter=function(t,e){return _(t)<this.startOf(e)},f.isBefore=function(t,e){return this.endOf(e)<_(t)},f.$g=function(t,e,n){return g.u(t)?this[e]:this.set(n,t)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(t,a){var c=this,h=!!g.u(a)||a,l=g.p(t),d=function(t,e){var n=g.w(c.$u?Date.UTC(c.$y,e,t):new Date(c.$y,e,t),c);return h?n:n.endOf("day")},f=function(t,e){return g.w(c.toDate()[t].apply(c.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(e)),c)},p=this.$W,v=this.$M,m=this.$D,y="set"+(this.$u?"UTC":"");switch(l){case s:return h?d(1,0):d(31,11);case o:return h?d(1,v):d(0,v+1);case i:var _=this.$locale().weekStart||0,w=(p<_?p+7:p)-_;return d(h?m-w:m+(6-w),v);case"day":case u:return f(y+"Hours",0);case r:return f(y+"Minutes",1);case n:return f(y+"Seconds",2);case e:return f(y+"Milliseconds",3);default:return this.clone()}},f.endOf=function(t){return this.startOf(t,!1)},f.$set=function(i,a){var c,h=g.p(i),l="set"+(this.$u?"UTC":""),d=((c={}).day=l+"Date",c[u]=l+"Date",c[o]=l+"Month",c[s]=l+"FullYear",c[r]=l+"Hours",c[n]=l+"Minutes",c[e]=l+"Seconds",c[t]=l+"Milliseconds",c)[h],f="day"===h?this.$D+(a-this.$W):a;if(h===o||h===s){var p=this.clone().set(u,1);p.$d[d](f),p.init(),this.$d=p.set(u,Math.min(this.$D,p.daysInMonth())).$d}else d&&this.$d[d](f);return this.init(),this},f.set=function(t,e){return this.clone().$set(t,e)},f.get=function(t){return this[g.p(t)]()},f.add=function(t,a){var u,c=this;t=Number(t);var h=g.p(a),l=function(e){var n=_(c);return g.w(n.date(n.date()+Math.round(e*t)),c)};if(h===o)return this.set(o,this.$M+t);if(h===s)return this.set(s,this.$y+t);if("day"===h)return l(1);if(h===i)return l(7);var d=((u={})[n]=6e4,u[r]=36e5,u[e]=1e3,u)[h]||1,f=this.$d.getTime()+t*d;return g.w(f,this)},f.subtract=function(t,e){return this.add(-1*t,e)},f.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||c;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=g.z(this),o=this.$H,a=this.$m,s=this.$M,u=n.weekdays,h=n.months,d=n.meridiem,f=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},p=function(t){return g.s(o%12||12,t,"0")},v=d||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(l,function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return g.s(e.$y,4,"0");case"M":return s+1;case"MM":return g.s(s+1,2,"0");case"MMM":return f(n.monthsShort,s,h,3);case"MMMM":return f(h,s);case"D":return e.$D;case"DD":return g.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(n.weekdaysMin,e.$W,u,2);case"ddd":return f(n.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(o);case"HH":return g.s(o,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return v(o,a,!0);case"A":return v(o,a,!1);case"m":return String(a);case"mm":return g.s(a,2,"0");case"s":return String(e.$s);case"ss":return g.s(e.$s,2,"0");case"SSS":return g.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(t,u,c){var h,l=this,d=g.p(u),f=_(t),p=(f.utcOffset()-this.utcOffset())*6e4,v=this-f,m=function(){return g.m(l,f)};switch(d){case s:h=m()/12;break;case o:h=m();break;case a:h=m()/3;break;case i:h=(v-p)/6048e5;break;case"day":h=(v-p)/864e5;break;case r:h=v/36e5;break;case n:h=v/6e4;break;case e:h=v/1e3;break;default:h=v}return c?h:g.a(h)},f.daysInMonth=function(){return this.endOf(o).$D},f.$locale=function(){return p[this.$L]},f.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=y(t,e,!0);return r&&(n.$L=r),n},f.clone=function(){return g.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},d}(),x=w.prototype;return _.prototype=x,[["$ms",t],["$s",e],["$m",n],["$H",r],["$W","day"],["$M",o],["$y",s],["$D",u]].forEach(function(t){x[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),_.extend=function(t,e){return t.$i||(t(e,w,_),t.$i=!0),_},_.locale=y,_.isDayjs=m,_.unix=function(t){return _(1e3*t)},_.en=p[f],_.Ls=p,_.p={},_},t.exports=e()},58064:function(t,e,n){"use strict";Object.defineProperty(e,"$",{enumerable:!0,get:function(){return i}});let r=n(74590);function i(t){let{createServerReference:e}=n(6671);return e(t,r.callServer)}},75269:function(t,e,n){var r;r=function(t,e,n,r){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&("object"==typeof e||"function"==typeof e)?e:t}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=r(n(1)),u=n(2),c=r(u),h=r(n(3)),l=r(n(4)),d=function(t){function e(){var t,n,r;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),r._sigPad=null,r._excludeOurProps=function(){var t=r.props;return t.canvasProps,t.clearOnResize,function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["canvasProps","clearOnResize"])},r.getCanvas=function(){return r._canvas},r.getTrimmedCanvas=function(){var t=document.createElement("canvas");return t.width=r._canvas.width,t.height=r._canvas.height,t.getContext("2d").drawImage(r._canvas,0,0),(0,l.default)(t)},r.getSignaturePad=function(){return r._sigPad},r._checkClearOnResize=function(){r.props.clearOnResize&&r._resizeCanvas()},r._resizeCanvas=function(){var t=r.props.canvasProps||{},e=t.width,n=t.height;if(!e||!n){var i=r._canvas,o=Math.max(window.devicePixelRatio||1,1);e||(i.width=i.offsetWidth*o),n||(i.height=i.offsetHeight*o),i.getContext("2d").scale(o,o),r.clear()}},r.on=function(){return window.addEventListener("resize",r._checkClearOnResize),r._sigPad.on()},r.off=function(){return window.removeEventListener("resize",r._checkClearOnResize),r._sigPad.off()},r.clear=function(){return r._sigPad.clear()},r.isEmpty=function(){return r._sigPad.isEmpty()},r.fromDataURL=function(t,e){return r._sigPad.fromDataURL(t,e)},r.toDataURL=function(t,e){return r._sigPad.toDataURL(t,e)},r.fromData=function(t){return r._sigPad.fromData(t)},r.toData=function(){return r._sigPad.toData()},i(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),a(e,[{key:"componentDidMount",value:function(){this._sigPad=new h.default(this._canvas,this._excludeOurProps()),this._resizeCanvas(),this.on()}},{key:"componentWillUnmount",value:function(){this.off()}},{key:"componentDidUpdate",value:function(){Object.assign(this._sigPad,this._excludeOurProps())}},{key:"render",value:function(){var t=this,e=this.props.canvasProps;return c.default.createElement("canvas",o({ref:function(e){t._canvas=e}},e))}}]),e}(u.Component);d.propTypes={velocityFilterWeight:s.default.number,minWidth:s.default.number,maxWidth:s.default.number,minDistance:s.default.number,dotSize:s.default.oneOfType([s.default.number,s.default.func]),penColor:s.default.string,throttle:s.default.number,onEnd:s.default.func,onBegin:s.default.func,canvasProps:s.default.object,clearOnResize:s.default.bool},d.defaultProps={clearOnResize:!0},e.default=d},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e){t.exports=r}])},t.exports=r(n(41448),n(2265),n(93261),n(53085))},52527:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(2265),i={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function o(t){var e=function(t){if("number"==typeof t)return{value:t,unit:"px"};var e,n=(t.match(/^[0-9.]*/)||"").toString();e=n.includes(".")?parseFloat(n):parseInt(n,10);var r=(t.match(/[^0-9]*$/)||"").toString();return i[r]?{value:e,unit:r}:(console.warn("React Spinners: ".concat(t," is not a valid css value. Defaulting to ").concat(e,"px.")),{value:e,unit:"px"})}(t);return"".concat(e.value).concat(e.unit)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},u=function(t,e,n){var r="react-spinners-".concat(t,"-").concat(n);if("undefined"==typeof window||!window.document)return r;var i=document.createElement("style");document.head.appendChild(i);var o=i.sheet,a="\n    @keyframes ".concat(r," {\n      ").concat(e,"\n    }\n  ");return o&&o.insertRule(a,0),r}("PulseLoader","0% {transform: scale(1); opacity: 1} 45% {transform: scale(0.1); opacity: 0.7} 80% {transform: scale(1); opacity: 1}","pulse"),c=function(t){var e=t.loading,n=t.color,i=void 0===n?"#000000":n,c=t.speedMultiplier,h=void 0===c?1:c,l=t.cssOverride,d=t.size,f=void 0===d?15:d,p=t.margin,v=void 0===p?2:p,m=s(t,["loading","color","speedMultiplier","cssOverride","size","margin"]),y=a({display:"inherit"},void 0===l?{}:l),_=function(t){return{backgroundColor:i,width:o(f),height:o(f),margin:o(v),borderRadius:"100%",display:"inline-block",animation:"".concat(u," ").concat(.75/h,"s ").concat(.12*t/h,"s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"),animationFillMode:"both"}};return void 0===e||e?r.createElement("span",a({style:y},m),r.createElement("span",{style:_(1)}),r.createElement("span",{style:_(2)}),r.createElement("span",{style:_(3)})):null}},53085:function(t){var e;e=function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){"use strict";function n(t,e,n,r){return({red:r[4*(n*e+t)],green:r[4*(n*e+t)+1],blue:r[4*(n*e+t)+2],alpha:r[4*(n*e+t)+3]}).alpha}function r(t,e,r,i){for(var o=t?1:-1,a=t?0:r-1,s=a;t?s<r:s>-1;s+=o)for(var u=0;u<e;u++)if(n(u,s,e,i))return s;return null}function i(t,e,r,i){for(var o=t?1:-1,a=t?0:e-1,s=a;t?s<e:s>-1;s+=o)for(var u=0;u<r;u++)if(n(s,u,e,i))return s;return null}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.getContext("2d"),n=t.width,o=t.height,a=e.getImageData(0,0,n,o).data,s=r(!0,n,o,a),u=r(!1,n,o,a),c=i(!0,n,o,a),h=i(!1,n,o,a)-c+1,l=u-s+1,d=e.getImageData(c,s,h,l);return t.width=h,t.height=l,e.clearRect(0,0,h,l),e.putImageData(d,0,0),t}}])},t.exports=e()},93261:function(t,e,n){"use strict";function r(t,e,n){this.x=t,this.y=e,this.time=n||new Date().getTime()}function i(t,e,n,r){this.startPoint=t,this.control1=e,this.control2=n,this.endPoint=r}function o(t,e){var n,r,i,a,s,u,c,h,l,d=this,f=e||{};(this.velocityFilterWeight=f.velocityFilterWeight||.7,this.minWidth=f.minWidth||.5,this.maxWidth=f.maxWidth||2.5,this.throttle="throttle"in f?f.throttle:16,this.minDistance="minDistance"in f?f.minDistance:5,this.throttle)?this._strokeMoveUpdate=(n=o.prototype._strokeUpdate,r=this.throttle,c=null,h=0,i||(i={}),l=function(){h=!1===i.leading?0:Date.now(),c=null,u=n.apply(a,s),c||(a=s=null)},function(){var t=Date.now();h||!1!==i.leading||(h=t);var e=r-(t-h);return a=this,s=arguments,e<=0||e>r?(c&&(clearTimeout(c),c=null),h=t,u=n.apply(a,s),c||(a=s=null)):c||!1===i.trailing||(c=setTimeout(l,e)),u}):this._strokeMoveUpdate=o.prototype._strokeUpdate,this.dotSize=f.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=f.penColor||"black",this.backgroundColor=f.backgroundColor||"rgba(0,0,0,0)",this.onBegin=f.onBegin,this.onEnd=f.onEnd,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(d._mouseButtonDown=!0,d._strokeBegin(t))},this._handleMouseMove=function(t){d._mouseButtonDown&&d._strokeMoveUpdate(t)},this._handleMouseUp=function(t){1===t.which&&d._mouseButtonDown&&(d._mouseButtonDown=!1,d._strokeEnd(t))},this._handleTouchStart=function(t){if(1===t.targetTouches.length){var e=t.changedTouches[0];d._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];d._strokeMoveUpdate(e)},this._handleTouchEnd=function(t){t.target===d._canvas&&(t.preventDefault(),d._strokeEnd(t))},this.on()}n.r(e),r.prototype.velocityFrom=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):1},r.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},r.prototype.equals=function(t){return this.x===t.x&&this.y===t.y&&this.time===t.time},i.prototype.length=function(){for(var t=0,e=void 0,n=void 0,r=0;r<=10;r+=1){var i=r/10,o=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(r>0){var s=o-e,u=a-n;t+=Math.sqrt(s*s+u*u)}e=o,n=a}return t},i.prototype._point=function(t,e,n,r,i){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*r*(1-t)*t*t+i*t*t*t},o.prototype.clear=function(){var t=this._ctx,e=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(),this._isEmpty=!0},o.prototype.fromDataURL=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new Image,i=n.ratio||window.devicePixelRatio||1,o=n.width||this._canvas.width/i,a=n.height||this._canvas.height/i;this._reset(),r.src=t,r.onload=function(){e._ctx.drawImage(r,0,0,o,a)},this._isEmpty=!1},o.prototype.toDataURL=function(t){var e;if("image/svg+xml"===t)return this._toSVG();for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(e=this._canvas).toDataURL.apply(e,[t].concat(r))},o.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},o.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},o.prototype.isEmpty=function(){return this._isEmpty},o.prototype._strokeBegin=function(t){this._data.push([]),this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},o.prototype._strokeUpdate=function(t){var e=t.clientX,n=t.clientY,r=this._createPoint(e,n),i=this._data[this._data.length-1],o=i&&i[i.length-1],a=o&&r.distanceTo(o)<this.minDistance;if(!(o&&a)){var s=this._addPoint(r),u=s.curve,c=s.widths;u&&c&&this._drawCurve(u,c.start,c.end),this._data[this._data.length-1].push({x:r.x,y:r.y,time:r.time,color:this.penColor})}},o.prototype._strokeEnd=function(t){var e=this.points.length>2,n=this.points[0];if(!e&&n&&this._drawDot(n),n){var r=this._data[this._data.length-1],i=r[r.length-1];n.equals(i)||r.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}"function"==typeof this.onEnd&&this.onEnd(t)},o.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},o.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},o.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},o.prototype._createPoint=function(t,e,n){var i=this._canvas.getBoundingClientRect();return new r(t-i.left,e-i.top,n||new Date().getTime())},o.prototype._addPoint=function(t){var e=this.points;if(e.push(t),e.length>2){3===e.length&&e.unshift(e[0]);var n=this._calculateCurveControlPoints(e[0],e[1],e[2]).c2,r=this._calculateCurveControlPoints(e[1],e[2],e[3]).c1,o=new i(e[1],n,r,e[2]),a=this._calculateCurveWidths(o);return e.shift(),{curve:o,widths:a}}return{}},o.prototype._calculateCurveControlPoints=function(t,e,n){var i=t.x-e.x,o=t.y-e.y,a=e.x-n.x,s=e.y-n.y,u={x:(t.x+e.x)/2,y:(t.y+e.y)/2},c={x:(e.x+n.x)/2,y:(e.y+n.y)/2},h=Math.sqrt(a*a+s*s),l=u.x-c.x,d=u.y-c.y,f=h/(Math.sqrt(i*i+o*o)+h),p={x:c.x+l*f,y:c.y+d*f},v=e.x-p.x,m=e.y-p.y;return{c1:new r(u.x+v,u.y+m),c2:new r(c.x+v,c.y+m)}},o.prototype._calculateCurveWidths=function(t){var e=t.startPoint,n=t.endPoint,r={start:null,end:null},i=this.velocityFilterWeight*n.velocityFrom(e)+(1-this.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(i);return r.start=this._lastWidth,r.end=o,this._lastVelocity=i,this._lastWidth=o,r},o.prototype._strokeWidth=function(t){return Math.max(this.maxWidth/(t+1),this.minWidth)},o.prototype._drawPoint=function(t,e,n){var r=this._ctx;r.moveTo(t,e),r.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1},o.prototype._drawCurve=function(t,e,n){var r=this._ctx,i=n-e,o=Math.floor(t.length());r.beginPath();for(var a=0;a<o;a+=1){var s=a/o,u=s*s,c=u*s,h=1-s,l=h*h,d=l*h,f=d*t.startPoint.x;f+=3*l*s*t.control1.x+3*h*u*t.control2.x+c*t.endPoint.x;var p=d*t.startPoint.y;p+=3*l*s*t.control1.y+3*h*u*t.control2.y+c*t.endPoint.y;var v=e+c*i;this._drawPoint(f,p,v)}r.closePath(),r.fill()},o.prototype._drawDot=function(t){var e=this._ctx,n="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,n),e.closePath(),e.fill()},o.prototype._fromData=function(t,e,n){for(var i=0;i<t.length;i+=1){var o=t[i];if(o.length>1)for(var a=0;a<o.length;a+=1){var s=o[a],u=new r(s.x,s.y,s.time),c=s.color;if(0===a)this.penColor=c,this._reset(),this._addPoint(u);else if(a!==o.length-1){var h=this._addPoint(u),l=h.curve,d=h.widths;l&&d&&e(l,d,c)}}else this._reset(),n(o[0])}},o.prototype._toSVG=function(){var t=this,e=this._data,n=this._canvas,r=Math.max(window.devicePixelRatio||1,1),i=n.width/r,o=n.height/r,a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"width",n.width),a.setAttributeNS(null,"height",n.height),this._fromData(e,function(t,e,n){var r=document.createElement("path");if(!isNaN(t.control1.x)&&!isNaN(t.control1.y)&&!isNaN(t.control2.x)&&!isNaN(t.control2.y)){var i="M "+t.startPoint.x.toFixed(3)+","+t.startPoint.y.toFixed(3)+" "+("C "+t.control1.x.toFixed(3))+","+t.control1.y.toFixed(3)+" "+t.control2.x.toFixed(3)+","+t.control2.y.toFixed(3)+" "+t.endPoint.x.toFixed(3)+","+t.endPoint.y.toFixed(3);r.setAttribute("d",i),r.setAttribute("stroke-width",(2.25*e.end).toFixed(3)),r.setAttribute("stroke",n),r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),a.appendChild(r)}},function(e){var n=document.createElement("circle"),r="function"==typeof t.dotSize?t.dotSize():t.dotSize;n.setAttribute("r",r),n.setAttribute("cx",e.x),n.setAttribute("cy",e.y),n.setAttribute("fill",e.color),a.appendChild(n)});var s=a.innerHTML;if(void 0===s){var u=document.createElement("dummy"),c=a.childNodes;u.innerHTML="";for(var h=0;h<c.length;h+=1)u.appendChild(c[h].cloneNode(!0));s=u.innerHTML}return"data:image/svg+xml;base64,"+btoa('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+i+" "+o+'" width="'+i+'" height="'+o+'">'+s+"</svg>")},o.prototype.fromData=function(t){var e=this;this.clear(),this._fromData(t,function(t,n){return e._drawCurve(t,n.start,n.end)},function(t){return e._drawDot(t)}),this._data=t},o.prototype.toData=function(){return this._data},e.default=o}}]);