text: (window.webpackJsonp=window.webpackJsonp||[]).push([[68],{"2/Rp":function(e,t,n){"use strict";var a=n("QbLZ"),o=n.n(a),r=n("YEIV"),i=n.n(r),l=n("iCc5"),c=n.n(l),s=n("V7oC"),u=n.n(s),d=n("FYw3"),m=n.n(d),p=n("mRg0"),f=n.n(p),h=n("q1tI"),g=n("i8i4"),v=n("eHJ2"),y=n.n(v),C=n("g0mS"),b=n("CtXQ"),x=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&(n[a[o]]=e[a[o]])}return n},N=/^[\u4e00-\u9fa5]{2}$/,w=N.test.bind(N);var k=function(e){function t(e){c()(this,t);var n=m()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleClick=function(e){var t=n.props.onClick;t&&t(e)},n.state={loading:e.loading,hasTwoCNChar:!1},n}return f()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.fixTwoCNChar()}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props.loading,a=e.loading;n&&clearTimeout(this.delayTimeout),"boolean"!=typeof a&&a&&a.delay?this.delayTimeout=window.setTimeout((function(){return t.setState({loading:a})}),a.delay):this.setState({loading:a})}},{key:"componentDidUpdate",value:function(){this.fixTwoCNChar()}},{key:"componentWillUnmount",value:function(){this.delayTimeout&&clearTimeout(this.delayTimeout)}},{key:"fixTwoCNChar",value:function(){var e=Object(g.findDOMNode)(this),t=e.textContent||e.innerText;this.isNeedInserted()&&w(t)?this.state.hasTwoCNChar||this.setState({hasTwoCNChar:!0}):this.state.hasTwoCNChar&&this.setState({hasTwoCNChar:!1})}},{key:"isNeedInserted",value:function(){var e=this.props,t=e.icon,n=e.children;return 1===h.Children.count(n)&&!t}},{key:"render",value:function(){var e,t=this,n=this.props,a=n.type,r=n.shape,l=n.size,c=n.className,s=n.children,u=n.icon,d=n.prefixCls,m=n.ghost,p=(n.loading,n.block),f=x(n,["type","shape","size","className","children","icon","prefixCls","ghost","loading","block"]),g=this.state,v=g.loading,N=g.hasTwoCNChar,k="";switch(l){case"large":k="lg";break;case"small":k="sm"}var T=new Date,O=11===T.getMonth()&&25===T.getDate(),E=y()(d,c,(e={},i()(e,d+"-"+a,a),i()(e,d+"-"+r,r),i()(e,d+"-"+k,k),i()(e,d+"-icon-only",!s&&u),i()(e,d+"-loading",v),i()(e,d+"-background-ghost",m),i()(e,d+"-two-chinese-chars",N),i()(e,d+"-block",p),i()(e,"christmas",O),e)),P=v?"loading":u,S=P?h.createElement(b.a,{type:P}):null,I=s||0===s?h.Children.map(s,(function(e){return function(e,t){if(null!=e){var n=t?" ":"";return"string"!=typeof e&&"number"!=typeof e&&"string"==typeof e.type&&w(e.props.children)?h.cloneElement(e,{},e.props.children.split("").join(n)):"string"==typeof e?(w(e)&&(e=e.split("").join(n)),h.createElement("span",null,e)):e}}(e,t.isNeedInserted())})):null,L=O?"Ho Ho Ho!":f.title;if("href"in f)return h.createElement("a",o()({},f,{className:E,onClick:this.handleClick,title:L}),S,I);var _=f.htmlType,Y=x(f,["htmlType"]);return h.createElement(C.a,null,h.createElement("button",o()({},Y,{type:_||"button",className:E,onClick:this.handleClick,title:L}),S,I))}}]),t}(h.Component),T=k;k.__ANT_BUTTON=!0,k.defaultProps={prefixCls:"ant-btn",loading:!1,ghost:!1,block:!1};var O=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&(n[a[o]]=e[a[o]])}return n},E=function(e){var t=e.prefixCls,n=void 0===t?"ant-btn-group":t,a=e.size,r=e.className,l=O(e,["prefixCls","size","className"]),c="";switch(a){case"large":c="lg";break;case"small":c="sm"}var s=y()(n,i()({},n+"-"+c,c),r);return h.createElement("div",o()({},l,{className:s}))};T.Group=E;t.a=T},"61s2":function(e,t,n){"use strict";var a=n("QbLZ"),o=n.n(a),r=n("u7YQ"),i=n("RlXo"),l={lang:o()({placeholder:"Select date",rangePlaceholder:["Start date","End date"]},r.a),timePickerLocale:o()({},i.a)};t.a=l},H4fg:function(e,t,n){"use strict";t.a={items_per_page:"/ page",jump_to:"Goto",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"}},JgxH:function(e,t){this.libcanvas=this.exports=function(){var e={createCanvasBasedOnImg:function(t){var n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.pasteImg(n,t),n},pasteImg:function(e,t){e.getContext("2d").globalCompositeOperation="copy",e.getContext("2d").drawImage(t,0,0)},downloadablePng:function(e){return e.toDataURL("image/png").replace("image/png","image/octet-stream")},downloadAsPng:function(t){window.location.href=e.downloadablePng(t)},roundCanvas:function(t,n){e.cutRoundedRect(t.getContext("2d"),n,0,0,t.width,t.height)},cutRoundedRect:function(e,t,n,a,o,r){var i=n,l=a,c=n+o,s=a+r;e.globalCompositeOperation="destination-in",e.fillStyle="black",e.beginPath(),e.moveTo(i+t,l),e.lineTo(c-t,l),e.quadraticCurveTo(c,l,c,l+t),e.lineTo(c,s-t),e.quadraticCurveTo(c,s,c-t,s),e.lineTo(i+t,s),e.quadraticCurveTo(i,s,i,s-t),e.lineTo(i,l+t),e.quadraticCurveTo(i,l,i+t,l),e.fill()}};return e}()},"Kz+r":function(e,t,n){"use strict";var a=n("H4fg"),o=n("61s2"),r=n("RlXo"),i=o.a;t.a={locale:"en",Pagination:a.a,DatePicker:o.a,TimePicker:r.a,Calendar:i,Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],notFoundContent:"Not Found",searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items"},Select:{notFoundContent:"Not Found"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file"}}},PArb:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var a=n("QbLZ"),o=n.n(a),r=n("YEIV"),i=n.n(r),l=n("q1tI"),c=n("eHJ2"),s=n.n(c),u=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&(n[a[o]]=e[a[o]])}return n};function d(e){var t,n=e.prefixCls,a=void 0===n?"ant":n,r=e.type,c=void 0===r?"horizontal":r,d=e.orientation,m=void 0===d?"":d,p=e.className,f=e.children,h=e.dashed,g=u(e,["prefixCls","type","orientation","className","children","dashed"]),v=m.length>0?"-"+m:m,y=s()(p,a+"-divider",a+"-divider-"+c,(t={},i()(t,a+"-divider-with-text"+v,f),i()(t,a+"-divider-dashed",!!h),t));return l.createElement("div",o()({className:y},g),f&&l.createElement("span",{className:a+"-divider-inner-text"},f))}},RlXo:function(e,t,n){"use strict";t.a={placeholder:"Select time"}},XrHI:function(e,t,n){"use strict";t.a={id:"RoundImg",icon:"",name:"在线生成透明圆角图片",desc:"一个可以轻松的将任意图片生成圆角图片的工具，并且可以指定图片的圆角大小，另外，图片的大小完全不限制。",keywords:["圆角","图片","生成","大小","在线","任意","透明","轻松","指定","工具"],time:"2018-05-12",category:"IMAGE",author:"hustcc"}},YMnH:function(e,t,n){"use strict";var a=n("QbLZ"),o=n.n(a),r=n("iCc5"),i=n.n(r),l=n("V7oC"),c=n.n(l),s=n("FYw3"),u=n.n(s),d=n("mRg0"),m=n.n(d),p=n("q1tI"),f=n("17x9"),h=function(e){function t(){return i()(this,t),u()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m()(t,e),c()(t,[{key:"getLocale",value:function(){var e=this.props,t=e.componentName,n=e.defaultLocale,a=this.context.antLocale,r=a&&a[t];return o()({},"function"==typeof n?n():n,r||{})}},{key:"getLocaleCode",value:function(){var e=this.context.antLocale,t=e&&e.locale;return e&&e.exist&&!t?"en-us":t}},{key:"render",value:function(){return this.props.children(this.getLocale(),this.getLocaleCode())}}]),t}(p.Component);t.a=h,h.contextTypes={antLocale:f.object}},d9mm:function(e,t,n){},g0mS:function(e,t,n){"use strict";var a=n("iCc5"),o=n.n(a),r=n("V7oC"),i=n.n(r),l=n("FYw3"),c=n.n(l),s=n("mRg0"),u=n.n(s),d=n("q1tI"),m=n("i8i4"),p=n("/dDc"),f=void 0,h=function(e){function t(){o()(this,t);var e=c()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onClick=function(t,n){if(!(t.className.indexOf("-leave")>=0)){var a=e.props.insertExtraNode;e.extraNode=document.createElement("div");var o=e.extraNode;o.className="ant-click-animating-node";var r=e.getAttributeName();t.removeAttribute(r),t.setAttribute(r,"true"),f=f||document.createElement("style"),n&&"#ffffff"!==n&&"rgb(255, 255, 255)"!==n&&e.isNotGrey(n)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(n)&&"transparent"!==n&&(o.style.borderColor=n,f.innerHTML="[ant-click-animating-without-extra-node]:after { border-color: "+n+"; }",document.body.contains(f)||document.body.appendChild(f)),a&&t.appendChild(o),p.a.addEndEventListener(t,e.onTransitionEnd)}},e.bindAnimationEvent=function(t){if(t&&t.getAttribute&&!t.getAttribute("disabled")&&!(t.className.indexOf("disabled")>=0)){var n=function(n){if("INPUT"!==n.target.tagName){e.resetEffect(t);var a=getComputedStyle(t).getPropertyValue("border-top-color")||getComputedStyle(t).getPropertyValue("border-color")||getComputedStyle(t).getPropertyValue("background-color");e.clickWaveTimeoutId=window.setTimeout((function(){return e.onClick(t,a)}),0)}};return t.addEventListener("click",n,!0),{cancel:function(){t.removeEventListener("click",n,!0)}}}},e.onTransitionEnd=function(t){t&&"fadeEffect"===t.animationName&&e.resetEffect(t.target)},e}return u()(t,e),i()(t,[{key:"isNotGrey",value:function(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);return!(t&&t[1]&&t[2]&&t[3])||!(t[1]===t[2]&&t[2]===t[3])}},{key:"getAttributeName",value:function(){return this.props.insertExtraNode?"ant-click-animating":"ant-click-animating-without-extra-node"}},{key:"resetEffect",value:function(e){if(e&&e!==this.extraNode){var t=this.props.insertExtraNode,n=this.getAttributeName();e.removeAttribute(n),this.removeExtraStyleNode(),t&&this.extraNode&&e.contains(this.extraNode)&&e.removeChild(this.extraNode),p.a.removeEndEventListener(e,this.onTransitionEnd)}}},{key:"removeExtraStyleNode",value:function(){f&&(f.innerHTML="")}},{key:"componentDidMount",value:function(){this.instance=this.bindAnimationEvent(Object(m.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId)}},{key:"render",value:function(){return this.props.children}}]),t}(d.Component);t.a=h},lb2W:function(e,t,n){"use strict";n.r(t);var a=n("aArQ"),o=n("XrHI"),r=n("dI71"),i=n("q1tI"),l=n.n(i),c=n("Vl3Y"),s=n("8z0m"),u=n("2/Rp"),d=n("CtXQ"),m=n("fyUT"),p=n("PArb"),f=n("JgxH"),h=(n("d9mm"),c.a.Item),g={span:5},v={span:12},y=function(e){function t(t){var n;return(n=e.call(this,t)||this).round=function(){var e=n.state,t=e.file,a=e.size,o=new FileReader;o.onload=function(){var e=new Image;e.onload=function(){var t=f.libcanvas.createCanvasBasedOnImg(e);f.libcanvas.roundCanvas(t,a),n.setState({msg:"",base64:t.toDataURL()})},e.src=o.result},o.readAsDataURL(t)},n.beforeUpload=function(e){n.setState({file:e},n.round)},n.onSizeChange=function(e){n.setState({size:e},n.round)},n.state={size:50,file:null,base64:""},n}return Object(r.a)(t,e),t.prototype.render=function(){var e=this.state,t=e.file,n=e.size,a=e.base64;return l.a.createElement("div",{className:"atool-roundimg"},l.a.createElement(c.a,null,l.a.createElement(h,{label:"选择图片",labelCol:g,wrapperCol:v},l.a.createElement(s.a,{customRequest:function(){},beforeUpload:this.beforeUpload,fileList:t?[t]:[],accept:"image/*"},l.a.createElement(u.a,null,l.a.createElement(d.a,{type:"upload"})," 选择您要处理圆角的图片"))),l.a.createElement(h,{label:"圆角大小",labelCol:g,wrapperCol:v},l.a.createElement(m.a,{placeholder:"圆角大小",value:n,onChange:this.onSizeChange})),l.a.createElement(p.a,null,"圆角图片"),l.a.createElement("div",{className:"roundimg-result"},a&&l.a.createElement("img",{alt:"round result",src:a}))))},t}(i.PureComponent);t.default=Object(a.a)(y,o.a)},u7YQ:function(e,t,n){"use strict";t.a={today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}}}]);
  //# sourceMappingURL=component---src-pages-roundimg-js-30ac1f103c076284cfc3.js.map