From efbd5c257337925590cafd048da264444bd36831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=89=E5=B9=B4=E4=BB=A5=E5=A4=96?= <987153776@qq.com> Date: Thu, 16 Jul 2020 21:30:33 +0800 Subject: [PATCH] =?UTF-8?q?2.0.11=20=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 +++++++- README-CN.md | 15 ++++++++++----- README.md | 15 ++++++++++----- dist/js/app.js | 2 +- lib/vue-picture-cut.common.js | 24 +++++++++++++++++++++++- lib/vue-picture-cut.umd.js | 24 +++++++++++++++++++++++- lib/vue-picture-cut.umd.min.js | 4 ++-- package.json | 2 +- src/lib/views/Utils.ts | 22 +++++++++++++++++++++- 9 files changed, 98 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1501460..5dd69f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,13 @@ #### :rocket: New Features * `Utils`工具类 - * 新增`reset(): void`方法来重置图片状态。 + * 新增`rotateTo (angle: number, animation = false): void`方法来旋转图片到指定角度。 + +## 2.0.10 (2020-07-16) + +#### :rocket: New Features +* `Utils`工具类 +* 新增`reset(): void`方法来重置图片状态。 ## 2.0.9 (2020-07-15) diff --git a/README-CN.md b/README-CN.md index d39ebe2..0767239 100644 --- a/README-CN.md +++ b/README-CN.md @@ -587,25 +587,30 @@ createAnimation会返回一个Animation对象 **参数 angle**:逆时针角度 **参数 animation**:是否进行动画 -7. `setFlipV(animation?: boolean): void` +7. `rotateTo (angle: number, animation = false): void` +**描述**:图片旋转指定角度 +**参数 angle**:逆时针角度 +**参数 animation**:是否进行动画 + +8. `setFlipV(animation?: boolean): void` **描述**:图片垂直翻转 **参数 animation**:是否进行动画 -8. `setFlipH(animation?: boolean): void` +9. `setFlipH(animation?: boolean): void` **描述**:图片水平翻转 **参数 animation**:是否进行动画 -9. `setFlip (sV: boolean, sH: boolean, animation?: boolean): void` +10. `setFlip (sV: boolean, sH: boolean, animation?: boolean): void` **描述**:图片翻转 **参数 sV**:垂直,true (翻转),false (原始)。 **参数 sH**:水平,true (翻转),false (原始)。 **参数 animation**:是否进行动画 -10. `scale(zoom: number): void` +11. `scale(zoom: number): void` **描述**:图片缩放 **参数 zoom**:缩放系数 -11. `reset(): void` +12. `reset(): void` **描述**:重置图片状态 diff --git a/README.md b/README.md index df83087..7939672 100644 --- a/README.md +++ b/README.md @@ -529,25 +529,30 @@ ParamsInterface is an array containing four number types. **param angle**:Counterclockwise angle. **param animation**:Do you want to show animation. -7. `setFlipV(animation?: boolean): void` +7. `rotateTo (angle: number, animation = false): void` +**describe**:Rotate the picture at a specified angle. +**param angle**:Counterclockwise angle. +**param animation**:Do you want to show animation. + +8. `setFlipV(animation?: boolean): void` **describe**:Picture vertical flip **param animation**:Do you want to show animation. -8. `setFlipH(animation?: boolean): void` +9. `setFlipH(animation?: boolean): void` **describe**:Picture flip horizontally **param animation**:Do you want to show animation. -9. `setFlip (sV: boolean, sH: boolean, animation?: boolean): void` +10. `setFlip (sV: boolean, sH: boolean, animation?: boolean): void` **describe**:Pictures flipping. **param sV**:Vertical,true (flipping),false (original)。 **param sH**:Vorizontal,true (flipping),false (original)。 **param animation**:Do you want to show animation. -10. `scale(zoom: number): void` +11. `scale(zoom: number): void` **describe**:Picture zoom. **param zoom**:The scale of the scaled size to the current size. -11. `reset(): void` +12. `reset(): void` **describe**:Reset picture status. ### 3、Custom extension diff --git a/dist/js/app.js b/dist/js/app.js index f650381..c0e5167 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -1 +1 @@ -(function(t){function e(e){for(var o,s,r=e[0],c=e[1],h=e[2],l=0,v=[];l0&&void 0!==arguments[0])||arguments[0];if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMask");e&&(e.isRound=t)}}},{key:"setMaskSize",value:function(t,e){if(this.photoRoot){var i=this.photoRoot.getEventList("PhotoMask");null===i||void 0===i||i.reset(t,e)}}},{key:"setMaskSizeToOriginal",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMain");t&&this.setMaskSize(t.imgRect.w,t.imgRect.h)}}},{key:"setMaskResize",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMask");null===e||void 0===e||e.setResize(t)}}},{key:"rotate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.photoRoot&&t%360!==0){var i=this.photoRoot.getEventList("PhotoMain");null===i||void 0===i||i.setAngle(i.showRect.r+t,e)}}},{key:"setFlipV",value:function(t){if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMain");null===e||void 0===e||e.setFlipV(1===e.showRect.sV,t)}}},{key:"setFlipH",value:function(t){if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMain");null===e||void 0===e||e.setFlipH(1===e.showRect.sH,t)}}},{key:"setFlip",value:function(t,e,i){if(this.photoRoot){var o=this.photoRoot.getEventList("PhotoMain");null===o||void 0===o||o.setFlip(t,e,i)}}},{key:"scale",value:function(t){var e=this.photoRoot.getEventList("PhotoMain");null===e||void 0===e||e.scale(t)}}]),t}();function f(t){return new m(t)}var g=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.config=d,t.language="EN",t.src="./demo.jpg",t.blob=null,t.base64=null,t.pictureCut=null,t.form={backgroundColor:void 0,maskColor:void 0,maskBorderColor:void 0,menuTheme:"default",isRound:!0,resize:!0,rotateControl:!0,zoom:.96,initAngle:void 0,width:4,height:5,maxPixel:void 0,encoderOptions:.8,format:"image/jpeg"},t}return Object(r["a"])(i,[{key:"mounted",value:function(){this.pictureCut=this.$refs["pictureCut"],this.utils=window.utils=f(this.pictureCut)}},{key:"inputChange",value:function(t){return this.src=URL.createObjectURL(t),!1}},{key:"cutChange",value:function(t){var e=t.blob,i=t.base64;this.blob=e,this.base64=i}},{key:"reset",value:function(){this.utils.reset()}},{key:"mskOption",get:function(){return{width:this.form.width||1,height:this.form.height||1,isRound:this.form.isRound,resize:this.form.resize,color:this.form.maskColor,borderColor:this.form.maskBorderColor}}},{key:"newSrc",get:function(){return this.blob?URL.createObjectURL(this.blob):""}}]),i}(l["h"]);g=Object(u["a"])([l["a"]],g);var p=g,y=p,w=(i("5c0b"),i("2877")),b=Object(w["a"])(y,n,a,!1,null,null,null),k=b.exports,R=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"vue-picture-cut",class:{_default:!t.backgroundColor},style:{"background-color":t.backgroundColor||"#fff"}},[i("div",{ref:"main",staticClass:"vue-picture-cut_main",class:[t.menuPosition],style:t.mainPosition},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"vue-picture-cut_main-loading"},[t._v("loading...")]),i("vue-picture-cut-canvas",{attrs:{loading:t.loading,angle:t.initAngle},on:{"update:loading":function(e){t.loading=e}}}),t._t("default",[i("vue-picture-cut-mask",t._b({},"vue-picture-cut-mask",t.mskOption,!1))])],2),i("div",{directives:[{name:"show",rawName:"v-show",value:t.thickness>0,expression:"thickness > 0"}],staticClass:"vue-picture-cut_menu-box",class:[t.menuPosition],style:t.memuPosition},[t._t("menu",[i("div",{staticClass:"vue-picture-cut_default-menu"},[t.rotateControl?i("div",{staticClass:"vue-picture-cut_slider"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.sliderAngle,expression:"sliderAngle"}],attrs:{type:"range",min:-180,max:180},domProps:{value:t.sliderAngle},on:{__r:function(e){t.sliderAngle=e.target.value}}}),i("div",{staticClass:"vue-picture-cut_slider-box"},[i("div",{staticClass:"vue-picture-cut_slider-box-bar",style:{left:100*t.sliderAngle/361+50+"%"}},[i("div",{staticClass:"vue-picture-cut_slider-box-tips"},[t._v(" "+t._s(t.sliderAngle)+"° ")])])])]):t._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:t.src,expression:"src"}],staticClass:"vue-picture-cut_button",on:{click:t.sureCut}},[t._v("ok")])])])],2)])},_=[],x=(i("a9e3"),i("4160"),i("a630"),i("d81d"),i("4ec9"),i("159b"),i("b85c")),O=(i("a15b"),i("c19f"),i("b0c0"),i("ac1f"),i("1276"),i("5cc6"),i("9a8c"),i("a975"),i("735e"),i("c1ac"),i("d139"),i("3a7b"),i("d5d6"),i("82f8"),i("e91f"),i("60bd"),i("5f96"),i("3280"),i("3fcc"),i("ca91"),i("25a1"),i("cd26"),i("3c5d"),i("2954"),i("649e"),i("219c"),i("170b"),i("b39a"),i("72f7"),document.createElement("canvas"));O.style.display="none";var j=O.getContext("2d");function C(t,e,i,o,n){var a=.5*o,s=.5*n,r=.5522848,c=a*r,h=s*r;t.moveTo(e-a,i),t.bezierCurveTo(e-a,i-h,e-c,i-s,e,i-s),t.bezierCurveTo(e+c,i-s,e+a,i-h,e+a,i),t.bezierCurveTo(e+a,i+h,e+c,i+s,e,i+s),t.bezierCurveTo(e-c,i+s,e-a,i+h,e-a,i)}function E(t,e,i){var o=Math.sin(i*Math.PI/180),n=Math.cos(i*Math.PI/180),a=Math.pow(t,2)*Math.pow(o,2)+Math.pow(e,2)*Math.pow(n,2),s=2*(Math.pow(t,2)-Math.pow(e,2))*o*n,r=Math.pow(t,2)*Math.pow(n,2)+Math.pow(e,2)*Math.pow(o,2),c=-Math.pow(t,2)*Math.pow(e,2);return{A:a,B:s,C:r,F:c}}function M(t,e,i,o){var n=Math.pow(e,2)-4*t*i,a=Math.sqrt(4*i*o/n),s=Math.sqrt(4*t*o/n);return{x:-Math.abs(a),y:-Math.abs(s),w:2*Math.abs(a),h:2*Math.abs(s)}}function P(t,e,i){var o=Math.sqrt(t*t+e*e),n=Math.atan2(t,e),a=i*Math.PI/180+n;return{x:o*Math.sin(a),y:o*Math.cos(a)}}function S(t,e){var i=new Uint8Array(t),o=i.length,n=new Array(o);while(o--)n[o]=String.fromCharCode(i[o]);var a=n.join(""),s=window.btoa(a);return"data:"+e+";base64,"+s}function L(t){return new Promise((function(e,i){var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType="blob",o.onload=function(){if(200===this.status){var t=o.response,n=new FileReader;n.addEventListener("loadend",(function(o){o.target?"string"===typeof o.target.result?e(o.target.result):null!==o.target.result?S(o.target.result,t.type):i():i()})),n.readAsDataURL(t)}else i()},o.onerror=function(t){i(t)},o.send()}))}var T={rotatePoint:P,loadCrossDomainImg:L,cloneJSON:function(t){return JSON.parse(JSON.stringify(t))},loadImg:function(t){return new Promise((function(e,i){var o=new Image;o.addEventListener("load",(function(){e&&e(o)})),o.addEventListener("error",(function(){i&&i(o)})),o.src=t}))},clipBy:function(t,e,i,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.8,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"image/jpeg",s=arguments.length>6?arguments[6]:void 0,r=o.x,c=o.y,h=o.w,u=o.h,l=o.r,v=o.sH,d=o.sV;return O.width=e,O.height=i,j.clearRect(0,0,e,i),j.save(),j.translate(e/2,i/2),"image/jpeg"!==a&&"image/jpg"!==a||(j.fillStyle="#fff",j.fillRect(-e/2,-i/2,e,i)),s&&s(j,e,i),l/360&&j.rotate(-l*Math.PI/180),j.translate(r+h/2,c+u/2),j.scale(v,d),j.drawImage(t,0,0,t.width,t.height,-h/2,-u/2,h,u),j.scale(v,d),j.translate(-r-h/2-e/2,-c-u/2-i/2),j.restore(),O.toDataURL(a,n)},clipByRound:function(t,e,i,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.8,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"image/jpeg";return this.clipBy(t,e,i,o,n,a,(function(t){t.beginPath(),C(t,0,0,e,i),t.clip(),t.closePath()}))},clipByMax:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(t.width>e||t.height>e){var o=t.width/t.height,n=t.width,a=t.height;t.width>e&&(n=e,a=n/o),t.height>e&&(a=e,n=a*o);var s={x:-n/2,y:-a/2,w:n,h:a,r:0,sV:1,sH:1},r=this.clipBy(t,n,a,s,i);return{src:r,file:this.base64ToBlob(r)}}},base64ToBlob:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image/jpeg";if(!window.atob)return null;for(var i=window.atob(t.split(",")[1]),o=new ArrayBuffer(i.length),n=new Uint8Array(o),a=0,s=i.length;a1&&void 0!==arguments[1]?arguments[1]:1.5;this.root=t,this.width=t.offsetWidth,this.height=t.offsetHeight,this.drawWidth=Math.floor(this.width*e),this.drawHeight=Math.floor(this.height*e),this.magnification=e,this.core={x:Math.floor(this.drawWidth/2),y:Math.floor(this.drawHeight/2)},this._eventInit()}},{key:"addEventList",value:function(t){this.eventList.set(t.className,t)}},{key:"getEventList",value:function(t){var e=this.eventList.get(t);return e||null}},{key:"deleteEventList",value:function(t){this.eventList.delete(t)}},{key:"setPriority",value:function(t){this.priorityEvent||(this.priorityEvent=t)}},{key:"getPriority",value:function(){return this.priorityEvent?this.priorityEvent:null}},{key:"deletePriority",value:function(t){this.priorityEvent&&this.priorityEvent.className===t&&(this.priorityEvent=null)}},{key:"_eventInit",value:function(){var t=this;this.root.addEventListener("touchstart",(function(e){var i=e||window.event;i.preventDefault();var o=i.changedTouches;t._touchStart(o)}),!1),this.root.addEventListener("touchend",(function(e){var i=e||window.event;i.preventDefault();var o=i.changedTouches;t._touchEnd(o)}),!1),this.root.addEventListener("touchmove",(function(e){var i=e||window.event;i.preventDefault();var o=i.changedTouches;t._touchMove(o)}),!1),this.root.addEventListener("mousedown",(function(e){var i=e||window.event;i.preventDefault(),t._mouseDown(i)}),!1),this.root.addEventListener("mouseup",(function(e){var i=e||window.event;i.preventDefault(),t._mouseUp(i)}),!1),this.root.addEventListener("mouseleave",(function(e){var i=e||window.event;i.preventDefault(),t._mouseUp(i)}),!1),this.root.addEventListener("mousemove",(function(e){var i=e||window.event;i.preventDefault(),t._mouseMove(i)}),!1),this.root.addEventListener("mousewheel",(function(e){var i=e||window.event;i.preventDefault();var o=i.wheelDelta||i.detail;t._mouseWheel(o,{x:i.offsetX*t.magnification-t.core.x,y:i.offsetY*t.magnification-t.core.y})}),!1)}},{key:"_touchStart",value:function(t){var e=this,i=Array.from(t).map((function(t){return e._getTouchePoint(t)}));if(this.priorityEvent)this.priorityEvent.touchStart(T.cloneJSON(i));else{var o,n=[],a=Object(x["a"])(this.eventList.values());try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.touchStart(T.cloneJSON(i)),this.priorityEvent)break;n.push(s)}}catch(r){a.e(r)}finally{a.f()}this.priorityEvent&&n.forEach((function(t){return t.touchEnd(T.cloneJSON(i))}))}}},{key:"_touchEnd",value:function(t){var e=this,i=Array.from(t).map((function(t){return e._getTouchePoint(t)}));this.priorityEvent?this.priorityEvent.touchEnd(T.cloneJSON(i)):this.eventList.forEach((function(t){return t.touchEnd(T.cloneJSON(i))}))}},{key:"_touchMove",value:function(t){var e=this,i=Array.from(t).map((function(t){return e._getTouchePoint(t)}));this.priorityEvent?this.priorityEvent.touchMove(T.cloneJSON(i)):this.eventList.forEach((function(t){return t.touchMove(T.cloneJSON(i))}))}},{key:"_mouseDown",value:function(t){var e=[this._getMousePoint(t)];if(this.priorityEvent)this.priorityEvent.touchStart(T.cloneJSON(e));else{var i,o=[],n=Object(x["a"])(this.eventList.values());try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.touchStart(T.cloneJSON(e)),this.priorityEvent)break;o.push(a)}}catch(s){n.e(s)}finally{n.f()}this.priorityEvent&&o.forEach((function(t){return t.touchEnd(T.cloneJSON(e))}))}}},{key:"_mouseUp",value:function(t){var e=[this._getMousePoint(t)];this.priorityEvent?this.priorityEvent.touchEnd(T.cloneJSON(e)):this.eventList.forEach((function(t){return t.touchEnd(T.cloneJSON(e))}))}},{key:"_mouseMove",value:function(t){var e=[this._getMousePoint(t)];this.priorityEvent?this.priorityEvent.touchMove(T.cloneJSON(e)):this.eventList.forEach((function(t){return t.touchMove(T.cloneJSON(e))}))}},{key:"_mouseWheel",value:function(t,e){var i=this;clearTimeout(this.wheelTimeOut);var o=Date.now(),n=o-this.wheelTime>400&&!this.wheelstatus;n&&(this.wheelstatus=!0,this._wheelStart(t,e)),this.wheelTime=o,this.wheelTimeOut=setTimeout((function(){i.wheelstatus=!1,i._wheelEnd(t,e)}),400),n||this._wheelChange(t,e)}},{key:"_wheelStart",value:function(t,e){if(this.priorityEvent)this.priorityEvent.wheelStart(t,T.cloneJSON(e));else{var i,o=[],n=Object(x["a"])(this.eventList.values());try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.wheelStart(t,T.cloneJSON(e)),this.priorityEvent)break;o.push(a)}}catch(s){n.e(s)}finally{n.f()}this.priorityEvent&&o.forEach((function(i){return i.wheelEnd(t,T.cloneJSON(e))}))}}},{key:"_wheelChange",value:function(t,e){this.priorityEvent?this.priorityEvent.wheelChange(t,T.cloneJSON(e)):this.eventList.forEach((function(i){return i.wheelChange(t,T.cloneJSON(e))}))}},{key:"_wheelEnd",value:function(t,e){this.priorityEvent?this.priorityEvent.wheelEnd(t,T.cloneJSON(e)):this.eventList.forEach((function(i){return i.wheelEnd(t,T.cloneJSON(e))}))}},{key:"_getTouchePoint",value:function(t){var e=this._getClientPosition(this.root,{x:0,y:0});return{x:(t.pageX-e.x)*this.magnification-this.core.x,y:(t.pageY-e.y)*this.magnification-this.core.y,id:t.identifier}}},{key:"_getMousePoint",value:function(t){return{x:t.offsetX*this.magnification-this.core.x,y:t.offsetY*this.magnification-this.core.y,id:0}}},{key:"_getClientPosition",value:function(t,e){return e.x+=t.offsetLeft,e.y+=t.offsetTop,"HTML"===t.tagName||null===t.offsetParent?e:this._getClientPosition(t.offsetParent,e)}},{key:"cursor",set:function(t){this.root.style.cursor=t}}]),t}(),z=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("canvas",{staticClass:"vue-picture-cut_canvas"})},H=[],A=(i("cb29"),i("4de4"),i("c975"),i("3835")),N=i("5530"),V=(i("25f0"),function(t){return Object.prototype.toString.call(t)}),I=function(){function t(){Object(s["a"])(this,t),this.pStart={x:0,y:0},this.pEnd={x:1,y:1},this.pCrt1={x:0,y:0},this.pCrt2={x:0,y:0},this.setOptByString("ease")}return Object(r["a"])(t,[{key:"setOpt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ease";if("[object Array]"===V(t)&&t.length>=4){var e=t;return this.setOptByArr(e[0],e[1],e[2],e[3])}return"[object String]"===V(t)?this.setOptByString(t):this.setOptByString("ease")}},{key:"setOptByString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ease",i=t.BEZIER[e];return void 0===i&&(i=t.BEZIER.ease),this.setOptByArr(i[0],i[1],i[2],i[3])}},{key:"setOptByArr",value:function(t,e,i,o){return this.pCrt1={x:t,y:e},this.pCrt2={x:i,y:o},this}},{key:"getPoint",value:function(t){var e=[1,t,t*t,t*t*t],i=[[1,0,0,0],[-3,3,0,0],[3,-6,3,0],[-1,3,-3,1]],o=[[this.pStart.x,this.pStart.y],[this.pCrt1.x,this.pCrt1.y],[this.pCrt2.x,this.pCrt2.y],[this.pEnd.x,this.pEnd.y]],n=[e[0]*i[0][0]+e[1]*i[1][0]+e[2]*i[2][0]+e[3]*i[3][0],e[0]*i[0][1]+e[1]*i[1][1]+e[2]*i[2][1]+e[3]*i[3][1],e[0]*i[0][2]+e[1]*i[1][2]+e[2]*i[2][2]+e[3]*i[3][2],e[0]*i[0][3]+e[1]*i[1][3]+e[2]*i[2][3]+e[3]*i[3][3]],a=[n[0]*o[0][0]+n[1]*o[1][0]+n[2]*o[2][0]+n[3]*o[3][0],n[0]*o[0][1]+n[1]*o[1][1]+n[2]*o[2][1]+n[3]*o[3][1]],s={x:a[0],y:a[1]};return s.y}}]),t}();I.BEZIER={linear:[0,0,1,1],ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},function(){for(var t=0,e=["webkit","moz"],i=0;i0&&void 0!==arguments[0]&&arguments[0];this.id>0&&cancelAnimationFrame(this.id),this.id=0,t&&this.end()}}]),t}();function q(t){return new J(t)}var $=function(){function t(e,i){Object(s["a"])(this,t),this.className="PhotoMain",this.imgRect={x:0,y:0,w:0,h:0},this.showRect={x:0,y:0,w:0,h:0,r:0,sV:1,sH:1},this.moveRect={minX:null,minY:null,maxX:null,maxY:null},this.touchList=[],this.status=null,this.touchstartPoint={x:0,y:0},this.touchstartEvent=T.doubleTouche({x:0,y:0,id:0}),this.animation=void 0,this.scaleTimer=null,this.loadImgEd=new Map,e.width=i.drawWidth,e.height=i.drawHeight,i.addEventList(this),this.root=i,this.canvas=e,this.ctx=e.getContext("2d"),this.ctx.translate(this.root.core.x,this.root.core.y)}return Object(r["a"])(t,[{key:"setSrc",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.showRect.r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.clear(),this.src=t,this.loadingEvent&&this.loadingEvent(!0),T.loadImg(t).then((function(t){o||(e.originalImg=t);var n=T.clipByMax(t,1500);if(n)e.setSrc(n.src,i,++o);else{if(e.img=t,e._initRect(),e.showRect.r=i,e.moveRect.minX&&e.moveRect.minY){e.loadImgEd.forEach((function(t){t&&t()}));var a=e.showRect,s=a.x,r=a.y,c=a.w,h=a.h,u=a.r,l=a.sV,v=a.sH,d=e._checkRange({x:s,y:r,w:c,h:h,r:u,sV:l,sH:v});e.showRect={x:s+d[0],y:r+d[1],w:c+d[2],h:h+d[3],r:u,sV:l,sH:v}}else e._initMoveRange();e._draw(e.imgRect,e.showRect),e.showRect.r=i,e.loadingEvent&&e.loadingEvent(!1)}}),(function(){e.loadingEvent&&e.loadingEvent(!1)}))}},{key:"reset",value:function(){if(this.img){if(this._initRect(),this.showRect.r=0,this.showRect.sV=1,this.showRect.sH=1,this.moveRect.minX&&this.moveRect.minY){this.loadImgEd.forEach((function(t){t&&t()}));var t=this.showRect,e=t.x,i=t.y,o=t.w,n=t.h,a=t.r,s=t.sV,r=t.sH,c=this._checkRange({x:e,y:i,w:o,h:n,r:a,sV:s,sH:r});this.showRect={x:e+c[0],y:i+c[1],w:o+c[2],h:n+c[3],r:a,sV:s,sH:r}}else this._initMoveRange();this._draw(this.imgRect,this.showRect)}}},{key:"setMoveRange",value:function(t,e,i,o,n,a){if(this._initMoveRange(t,e,i,o),!this.img)return[0,0,0,0];if(n&&a){var s=this.showRect,r=s.x,c=s.y,h=s.w,u=s.h,l=s.r,v=s.sV,d=s.sH,m=n.x-r,f=n.y-c,g=h*a-h,p=u*a-u,y=this._checkRange(Object(N["a"])(Object(N["a"])({},n),{},{w:h*a,h:u*a,r:l,sV:v,sH:d}));return[m+y[0],f+y[1],g+y[2],p+y[3]]}var w=this._checkRange(),b=Object(A["a"])(w,4),k=b[0],R=b[1],_=b[2],x=b[3];return[k,R,_,x]}},{key:"setAngle",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.img?(i&&this.animation&&this.animation.abort(),this.loadImgEd.forEach((function(o){o&&o({showRect:Object(N["a"])(Object(N["a"])({},e.showRect),{},{r:t})},i)}))):this.showRect.r=t}},{key:"setFlip",value:function(t,e){var i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===this.showRect.sH,a=-1===this.showRect.sV;n===e&&a===t||this.img&&(o?(null===(i=this.animation)||void 0===i||i.abort(),this.doAnimation(0,0,0,0,0,t,e)):(this.showRect.sV=t?-1:1,this.showRect.sH=e?-1:1,this._draw(this.imgRect,this.showRect)))}},{key:"setFlipV",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=-1===this.showRect.sV;o!==t&&(this.img&&(i?(null===(e=this.animation)||void 0===e||e.abort(),this.doAnimation(0,0,0,0,0,t)):(this.showRect.sV=t?-1:1,this._draw(this.imgRect,this.showRect))))}},{key:"setFlipH",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=-1===this.showRect.sH;o!==t&&(this.img&&(i?(null===(e=this.animation)||void 0===e||e.abort(),this.doAnimation(0,0,0,0,0,void 0,t)):(this.showRect.sH=t?-1:1,this._draw(this.imgRect,this.showRect))))}},{key:"scale",value:function(t){var e,i=this;if(this.img&&!(t<0)&&1!==t){null!==this.scaleTimer&&clearTimeout(this.scaleTimer),null===(e=this.animation)||void 0===e||e.abort(),this.touchstartPoint={x:0,y:0};var o=this._changePointByCanvas(this.showRect);this._scaleByZoom(t,o),this._draw(this.imgRect,this.showRect),this.scaleTimer=setTimeout((function(){var t=i._checkRange(),e=Object(A["a"])(t,4),o=e[0],n=e[1],a=e[2],s=e[3];i.doAnimation(o,n,a,s,0)}),500)}}},{key:"onLoading",value:function(t){this.loadingEvent=t}},{key:"setShowRect",value:function(t){this.img&&(this.showRect=t,this._draw(this.imgRect,this.showRect))}},{key:"_changePointByCanvas",value:function(t){var e=this.showRect.r;return T.rotatePoint(t.x,t.y,e)}},{key:"_changePointByImage",value:function(t){var e=this.showRect.r;return T.rotatePoint(t.x,t.y,-e)}},{key:"_initRect",value:function(){var t=this.img;if(t){var e=this.root.drawWidth,i=this.root.drawHeight,o=t.width/e,n=t.height/i,a=o0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null===t||null===e||null===i||null===o){var n=this.imgRect,a=n.w,s=n.h;if(0===a)return;var r=this.root.drawWidth,c=this.root.drawHeight,h=r/c,u=a/s;if(h>u){var l=c*u,v=c;t=-l/2,e=-v/2}else{var d=r,m=r/u;t=-d/2,e=-m/2}i=-t,o=-e,this.moveRect={minX:t,minY:e,maxX:i,maxY:o}}else this.moveRect={minX:t,minY:e,maxX:i,maxY:o}}},{key:"_draw",value:function(t,e){if(this.clear(),this.img){var i=e.x,o=e.y,n=e.w,a=e.h,s=e.r,r=e.sV,c=e.sH,h=this.ctx;if(h.save(),h.rotate(-s*Math.PI/180),h.translate(i,o),h.scale(c,r),h.drawImage(this.img,t.x,t.y,t.w,t.h,-n/2,-a/2,n,a),h.scale(-c,-r),h.translate(-i,-o),this.root.debug){h.strokeStyle="#0f0",h.lineWidth=2;for(var u=0;u2){var e=this.touchList.map((function(t){return t.id}));t=t.filter((function(t){return e.indexOf(t.id)>-1})),2===t.length&&this._touchMove2(t[0],t[1])}}},{key:"touchStart",value:function(t){var e;if(this.img){null===(e=this.animation)||void 0===e||e.abort();var i=t[0];this.touchList.length?1===this.touchList.length&&this.touchList[0].id!==i.id&&(this.touchList.push(i),this._touchStart2(this.touchList[0],this.touchList[1])):(this.touchList.push(i),this._touchStart1(i))}}},{key:"wheelStart",value:function(t,e){this.img&&(this.status="scale",this.wheelChange(t,e))}},{key:"wheelChange",value:function(t,e){var i;if(this.img){null===(i=this.animation)||void 0===i||i.abort(),this.touchstartEvent=T.doubleTouche(e);var o=this.touchstartEvent.core,n=this._changePointByImage(o);this.touchstartPoint=this._getPointerLocation(n),this.root.setPriority(this),t=1+5e-4*t,t=t>1.08?1.08:t<.92593?.92593:t,this._scaleByZoom(t,e),this._draw(this.imgRect,this.showRect)}}},{key:"wheelEnd",value:function(){if(this.img){this.status=null,this.touchstartEvent=T.doubleTouche({x:0,y:0,id:0}),this.touchstartPoint={x:0,y:0};var t=this._checkRange(),e=Object(A["a"])(t,4),i=e[0],o=e[1],n=e[2],a=e[3];this.doAnimation(i,o,n,a,0),this.root.deletePriority(this.className)}}},{key:"_touchStart1",value:function(t){this.status="move",this.touchstartEvent=T.doubleTouche(t);var e=this._changePointByImage(t);this.touchstartPoint=this._getPointerLocation(e)}},{key:"_touchStart2",value:function(t,e){var i=this.showRect,o=i.sV,n=i.sH;this.status="scale",this.touchstartEvent=!o&&n||o&&!n?T.doubleTouche(e,t):T.doubleTouche(t,e);var a=this.touchstartEvent.core,s=this._changePointByImage(a);this.touchstartPoint=this._getPointerLocation(s),this.root.setPriority(this)}},{key:"_touchMove1",value:function(t){"move"===this.status&&(this.root.setPriority(this),this.touchList[0]=t,this._move(t),this._draw(this.imgRect,this.showRect))}},{key:"_touchMove2",value:function(t,e){if("scale"===this.status){this.touchList=[t,e];var i=T.doubleTouche(t,e);this._scaleByLocation(i),this._draw(this.imgRect,this.showRect)}}},{key:"_getPointerLocation",value:function(t){return{x:t.x-this.showRect.x,y:t.y-this.showRect.y}}},{key:"_move",value:function(t){var e=this.touchstartPoint,i=this._changePointByImage(t);this.showRect.x=i.x-e.x,this.showRect.y=i.y-e.y}},{key:"_scaleByLocation",value:function(t){var e=t.length/this.touchstartEvent.length;e=e<.9091?.9091:e,e=e>1.1?1.1:e,this._scaleByZoom(e,t.core),this.touchstartEvent=t}},{key:"_scaleByZoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.touchstartPoint;this.touchstartPoint={x:o.x*t,y:o.y*t},o=this.touchstartPoint;var n=this.showRect,a=n.w,s=n.h,r=n.r,c=n.sV,h=n.sH,u=this._changePointByImage(e);this.showRect={x:u.x-o.x,y:u.y-o.y,w:a*t,h:s*t,r:r+i,sV:c,sH:h}}},{key:"_checkRange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showRect,e=t.x,i=t.y,o=t.w,n=t.h;e-=o/2,i-=n/2;var a=this.moveRect,s=a.minX,r=a.minY,c=a.maxX,h=a.maxY;s=s||0,r=r||0,c=c||0,h=h||0;var u=e,l=i,v=o,d=n,m=this._getPohtoByRangeLocation([e,i,o,n]),f=o/n;m[4]<=0&&(v=c-s,d=v/f,u=e+(o-v)/2,l=i+(n-d)/2),m=this._getPohtoByRangeLocation([u,l,v,d]),m[5]<=0&&(d=h-r,v=d*f,u=e+(o-v)/2,l=i+(n-d)/2),m=this._getPohtoByRangeLocation([u,l,v,d]),m[0]>0&&(u-=m[0]),m[1]>0&&(l-=m[1]),m[2]<0&&(u-=m[2]),m[3]<0&&(l-=m[3]);var g=v-o,p=d-n;return[u-e+g/2,l-i+p/2,g,p]}},{key:"_getPohtoByRangeLocation",value:function(t){var e=this.showRect,i=e.x,o=e.y,n=e.w,a=e.h,s=this.moveRect,r=s.minX,c=s.minY,h=s.maxX,u=s.maxY;return t&&(i=t[0],o=t[1],n=t[2],a=t[3]),[i-(r||0),o-(c||0),i+n-(h||0),o+a-(u||0),n-(h||0)+(r||0),a-(u||0)+(c||0)]}},{key:"doAnimation",value:function(t,e,i,o,n,a,s,r){var c=this;if(t||e||i||o||n||void 0!==a||void 0!==s){var h=this.showRect,u=h.x,l=h.y,v=h.w,d=h.h,m=h.r,f=h.sV,g=h.sH;a=void 0===a?-1===f:a,s=void 0===s?-1===g:s,this.showRect={x:u+t,y:l+e,w:v+i,h:d+o,r:m+n,sV:a?-1:1,sH:s?-1:1};var p=this.showRect.sV-f,y=this.showRect.sH-g;(t||e||i||o||n||y||p)&&(this.animation=q({duration:300,timing:"ease-in-out",change:function(a){c._showRect={x:u+a*t,y:l+a*e,w:v+a*i,h:d+a*o,r:m+a*n,sV:f+a*p,sH:g+a*y},c._draw(c.imgRect,c._showRect)},end:function(){c._showRect&&(c.showRect=c._showRect,c._showRect=void 0),r&&r()}}).start())}}}]),t}(),X=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.photoMain=null,t}return Object(r["a"])(i,[{key:"watchAngle",value:function(t){this.photoMain&&void 0!==t&&this.photoMain.setAngle(t,!0)}},{key:"mounted",value:function(){var t=this;setTimeout((function(){t.photoMain=new $(t.$el,t.photoRoot),t.photoMain.onLoading((function(e){t._loading=e}))}),0)}}]),i}(l["h"]);Object(u["a"])([Object(l["c"])({from:"vuePictureCut",default:"photoRoot"})],X.prototype,"photoRoot",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],X.prototype,"angle",void 0),Object(u["a"])([Object(l["e"])("loading",{type:Boolean,default:!1})],X.prototype,"_loading",void 0),Object(u["a"])([Object(l["i"])("angle")],X.prototype,"watchAngle",null),X=Object(u["a"])([l["a"]],X);var W=X,Y=W,D=Object(w["a"])(Y,z,H,!1,null,null,null),Z=D.exports,U=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("svg",{staticClass:"vue-picture-cut_mask",attrs:{preserveAspectRatio:"none",viewBox:t.viewBox}},[i("path",{staticClass:"cls-1",attrs:{fill:t.color||"rgba(0,0,0,.5)",d:"M0,0 H"+t.drawWidth+" V"+t.drawHeight+" H0 V0 Z "+t.round}}),t.thisResize||!t.thisRound?i("rect",t._b({staticClass:"cls-3",style:{"stroke-dasharray":t.border,stroke:t.thisRound?"rgba(255,255,255,.7)":t.borderColor||"#ff5500"}},"rect",t.rect,!1)):t._e(),t.thisRound?i("path",{staticClass:"cls-2",attrs:{stroke:t.borderColor||"#ff5500",d:t.round}}):t._e(),t.thisResize?i("path",{staticClass:"cls-4",attrs:{d:t.TLHorn}}):t._e(),t.thisResize?i("path",{staticClass:"cls-4",attrs:{d:t.TRHorn}}):t._e(),t.thisResize?i("path",{staticClass:"cls-4",attrs:{d:t.BLHorn}}):t._e(),t.thisResize?i("path",{staticClass:"cls-4",attrs:{d:t.BRHorn}}):t._e()])},G=[],K=(i("99af"),i("7db0"),new Map([["Top Left","nw-resize"],["Top Right","ne-resize"],["Bottom Left","sw-resize"],["Bottom Right","se-resize"],["Top","n-resize"],["Left","w-resize"],["Right","e-resize"],["Bottom","s-resize"]])),Q=function(){function t(e,i,o,n,a){var r=this;Object(s["a"])(this,t),this.className="PhotoMask",this._isRound=!1,this.touche=null,this.touchePosition=void 0,this.animation=void 0,e.addEventList(this),this.root=e,this.width=i||1,this.height=o||1,this.resize=n,this.faultTolerant=8*e.magnification;var c=this.maskRect=this._getMaskRect();this._draw=a,a(this.maskRect,!1,this);var h=this.root.getEventList("PhotoMain");h&&(h.loadImgEd.set(this.className,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return r._reset(h,t,e)})),h.setMoveRange(c.x,c.y,c.x+c.w,c.y+c.h))}return Object(r["a"])(t,[{key:"_reset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Object.assign({},t,e),n=this._getMaskRect(),a=o.showRect,s=this._isRound?T.getEllipseRectByRect(n.w,n.h,a.r):T.getRectByRect(n.w,n.h,a.r),r=t.setMoveRange(s.x,s.y,s.x+s.w,s.y+s.h),c=Object(A["a"])(r,4),h=c[0],u=c[1],l=c[2],v=c[3];i?t.doAnimation(h,u,l,v,a.r-t.showRect.r):t.setShowRect({x:a.x+h,y:a.y+u,w:a.w+l,h:a.h+v,r:a.r,sV:a.sV,sH:a.sH})}},{key:"reset",value:function(t,e){this.width=t||1,this.height=e||1;var i=this._getMaskRect(),o=i.x-this.maskRect.x,n=i.y-this.maskRect.y,a=i.w-this.maskRect.w,s=i.h-this.maskRect.h,r=this.root.getEventList("PhotoMain");if(r){var c=r.showRect,h=i.w/this.maskRect.w,u=T.rotatePoint(this.maskRect.x+this.maskRect.w/2,this.maskRect.y+this.maskRect.h/2,-c.r),l={x:(c.x-u.x)*h,y:(c.y-u.y)*h},v=this._isRound?T.getEllipseRectByRect(i.w,i.h,c.r):T.getRectByRect(i.w,i.h,c.r),d=r.setMoveRange(v.x,v.y,v.x+v.w,v.y+v.h,l,h),m=Object(A["a"])(d,4),f=m[0],g=m[1],p=m[2],y=m[3];r.doAnimation(f,g,p,y,0)}this._animation(o,n,a,s)}},{key:"setResize",value:function(t){t||this.touchEnd(),this.resize=t,this._draw(this.maskRect,!1,this)}},{key:"getResize",value:function(){return this.resize}},{key:"clip",value:function(t,e,i){var o=this.root.getEventList("PhotoMain");if(!o||!o.originalImg||!o.img)return null;var n,a=o.originalImg,s=o.showRect,r=this.maskRect;if(t){var c=r.w/r.h;n=c<1?t*c/r.w:t/r.w}else n=a.width/s.w;var h=Math.round(r.w*n),u=Math.round(r.h*n),l={x:(s.x-s.w/2)*n,y:(s.y-s.h/2)*n,w:s.w*n,h:s.h*n,r:s.r,sV:s.sV,sH:s.sH},v=this._isRound?T.clipByRound(a,h,u,l,e,i):T.clipBy(a,h,u,l,e,i);return{src:v,file:T.base64ToBlob(v)}}},{key:"_getMaskRect",value:function(){var t,e,i=this.width/this.height,o=this.root.drawWidth/this.root.drawHeight;return i=a-i-o&&t<=a+i&&e>=s-i-o&&e<=s+i?"Top Left":t>=a+r-i-o&&t<=a+r+i&&e>=s-i-o&&e<=s+i?"Top Right":t>=a-i-o&&t<=a+i&&e>=s+c-i-o&&e<=s+c+i?"Bottom Left":t>=a+r-i-o&&t<=a+r+i&&e>=s+c-i-o&&e<=s+c+i?"Bottom Right":t>=a&&t<=a+r&&e>=s-i-o&&e<=s+i?"Top":t>=a-i-o&&t<=a+i&&e>=s&&e<=s+c?"Left":t>=a+r-i-o&&t<=a+r+i&&e>=s&&e<=s+c?"Right":t>=a&&t<=a+r&&e>=s+c-i-o&&e<=s+c+i?"Bottom":void 0}},{key:"touchStart",value:function(t){if(this.resize&&null===this.touche){var e=t[0];this.touchePosition=this._isHover(e.x,e.y),this.touchePosition&&(this.root.setPriority(this),this.touche=e,this._draw(this.maskRect,!0,this))}}},{key:"touchEnd",value:function(){null!==this.touche&&this.touchePosition&&(this.touche=null,this.maskRect.w<0&&(this.maskRect.x+=this.maskRect.w,this.maskRect.w*=-1),this.maskRect.h<0&&(this.maskRect.y+=this.maskRect.h,this.maskRect.h*=-1),this.reset(this.maskRect.w,this.maskRect.h),this.root.deletePriority(this.className),this.touchePosition=void 0,this._draw(this.maskRect,!1,this),this.root.cursor="default")}},{key:"touchMove",value:function(t){var e=this;if(this.resize&&null!==this.touche&&this.touchePosition){var i=this.touche.id,o=t.find((function(t){return t.id===i}));o&&(this.touchePosition.split(" ").forEach((function(t){switch(t){case"Top":e._moveTop(o);break;case"Bottom":e._moveBottom(o);break;case"Left":e._moveLeft(o);break;case"Right":e._moveRight(o);break}})),this.touche=o,this._draw(this.maskRect,!0,this))}else if(this.resize){var n=this._isHover(t[0].x,t[0].y);this.root.cursor=n&&K.get(n)||"move"}}},{key:"wheelStart",value:function(){}},{key:"wheelEnd",value:function(){}},{key:"wheelChange",value:function(){}},{key:"_moveTop",value:function(t){var e=t.y-this.touche.y;this.maskRect.y+=e,this.maskRect.h-=e}},{key:"_moveBottom",value:function(t){var e=t.y-this.touche.y;this.maskRect.h+=e}},{key:"_moveLeft",value:function(t){var e=t.x-this.touche.x;this.maskRect.x+=e,this.maskRect.w-=e}},{key:"_moveRight",value:function(t){var e=t.x-this.touche.x;this.maskRect.w+=e}},{key:"isRound",get:function(){return this._isRound},set:function(t){this._isRound=t,this._draw(this.maskRect,!1,this),this.reset(this.maskRect.w,this.maskRect.h)}}]),t}(),tt=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.mask=null,t.viewBox="0 0 0 0",t.drawWidth=0,t.drawHeight=0,t.round="M0,150 V+150 a150,150 0 1 0 0,-1",t.rect={x:0,y:0,width:0,height:0},t.border="10, 5",t.thisRound=!1,t.thisResize=!0,t}return Object(r["a"])(i,[{key:"watchWidth",value:function(t){this.mask&&this.mask.reset(t,this.height)}},{key:"watchHeight",value:function(t){this.mask&&this.mask.reset(this.width,t)}},{key:"watchIsRound",value:function(t){this.mask&&(this.mask.isRound=t)}},{key:"watchResize",value:function(t){this.mask&&this.mask.setResize(t)}},{key:"watchThisRound",value:function(t){this.mask&&this.mask.isRound!==t&&(this.mask.isRound=t)}},{key:"watchThisResize",value:function(t){this.mask&&this.mask.getResize()!==t&&this.mask.setResize(t)}},{key:"mounted",value:function(){var t=this;this.thisRound=this.isRound,this.thisResize=this.resize,setTimeout((function(){t.viewBox="0 0 ".concat(t.photoRoot.drawWidth," ").concat(t.photoRoot.drawHeight),t.drawWidth=t.photoRoot.drawWidth,t.drawHeight=t.photoRoot.drawHeight,t.mask=new Q(t.photoRoot,t.width,t.height,t.resize,(function(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0;t.setPathOption(e,i,o)})),t.mask.isRound=t.isRound}),0)}},{key:"setPathOption",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;this.thisRound=i.isRound,this.thisResize=i.getResize();var o=t.x,n=t.y,a=t.w,s=t.h;o+=this.photoRoot.core.x,n+=this.photoRoot.core.y,a<0&&(o+=a,a*=-1),s<0&&(n+=s,s*=-1);var r=a/2,c=s/2;this.thisRound?this.round="M".concat(o,",").concat(n+c," a").concat(r,",").concat(c," 0 1 0 0,-1"):this.round="M".concat(o,",").concat(n," H").concat(a+o," V").concat(s+n," H").concat(o," V").concat(n),this.rect={x:o,y:n,width:a,height:s},this.border=e?"10, 0":"10, 5"}},{key:"TLHorn",get:function(){var t=this.rect.x,e=this.rect.y;return"M".concat(t,",").concat(e," H").concat(t," V").concat(e+15," H").concat(t-5," V").concat(e+15," H").concat(t-5," V").concat(e-5," H").concat(t+15," V").concat(e-5," H").concat(t+15," V").concat(e," Z")}},{key:"TRHorn",get:function(){var t=this.rect.x+this.rect.width,e=this.rect.y;return"M".concat(t,",").concat(e," H").concat(t," V").concat(e+15," H").concat(t+5," V").concat(e+15," H").concat(t+5," V").concat(e-5," H").concat(t-15," V").concat(e-5," H").concat(t-15," V").concat(e," Z")}},{key:"BLHorn",get:function(){var t=this.rect.x,e=this.rect.y+this.rect.height;return"M".concat(t,",").concat(e," H").concat(t," V").concat(e-15," H").concat(t-5," V").concat(e-15," H").concat(t-5," V").concat(e+5," H").concat(t+15," V").concat(e+5," H").concat(t+15," V").concat(e," Z")}},{key:"BRHorn",get:function(){var t=this.rect.x+this.rect.width,e=this.rect.y+this.rect.height;return"M".concat(t,",").concat(e," H").concat(t," V").concat(e-15," H").concat(t+5," V").concat(e-15," H").concat(t+5," V").concat(e+5," H").concat(t-15," V").concat(e+5," H").concat(t-15," V").concat(e," Z")}}]),i}(l["h"]);Object(u["a"])([Object(l["c"])({from:"vuePictureCut",default:"photoRoot"})],tt.prototype,"photoRoot",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"rgba(0,0,0,.5)"})],tt.prototype,"color",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"#ff5500"})],tt.prototype,"borderColor",void 0),Object(u["a"])([Object(l["d"])({type:Number,default:1})],tt.prototype,"width",void 0),Object(u["a"])([Object(l["d"])({type:Number,default:1})],tt.prototype,"height",void 0),Object(u["a"])([Object(l["d"])({type:Boolean,default:!1})],tt.prototype,"isRound",void 0),Object(u["a"])([Object(l["d"])({type:Boolean,default:!0})],tt.prototype,"resize",void 0),Object(u["a"])([Object(l["i"])("width")],tt.prototype,"watchWidth",null),Object(u["a"])([Object(l["i"])("height")],tt.prototype,"watchHeight",null),Object(u["a"])([Object(l["i"])("isRound")],tt.prototype,"watchIsRound",null),Object(u["a"])([Object(l["i"])("resize")],tt.prototype,"watchResize",null),Object(u["a"])([Object(l["i"])("thisRound")],tt.prototype,"watchThisRound",null),Object(u["a"])([Object(l["i"])("thisResize")],tt.prototype,"watchThisResize",null),tt=Object(u["a"])([l["a"]],tt);var et=tt,it=et,ot=(i("ce31"),Object(w["a"])(it,U,G,!1,null,"4688c320",null)),nt=ot.exports,at=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.loading=!1,t.hasMenu=!1,t.sliderAngle=0,t.photoRoot=new B,t.vuePictureCut=t.photoRoot,t}return Object(r["a"])(i,[{key:"watchSrc",value:function(t){t&&this.setImg()}},{key:"watchInitAngle",value:function(t){if(void 0!==t){var e=this.photoRoot.getEventList("PhotoMain");if(e){var i=(e.showRect.r+t)%360;this.sliderAngle=i>180?i-360:i<-180?i+360:i}}}},{key:"watchSliderAngle",value:function(t){var e=this.photoRoot.getEventList("PhotoMain");e&&e.setAngle(parseInt(t))}},{key:"created",value:function(){this.watchInitAngle(this.initAngle),this.$slots.menu&&(this.hasMenu=!0)}},{key:"mounted",value:function(){var t=this;this.photoRoot.init(this.main,this.magnification),setTimeout((function(){t.setImg()}),0)}},{key:"onChangeEvent",value:function(t,e){return{blob:t,base64:e}}},{key:"setImg",value:function(){var t=this.photoRoot.getEventList("PhotoMain"),e=this.src;e&&t&&t.setSrc(e,this.initAngle),void 0!==this.initAngle&&(this.sliderAngle=this.initAngle%180)}},{key:"sureCut",value:function(){var t=this.photoRoot.getEventList("PhotoMask");if(t){var e=t.clip(this.maxPixel,this.encoderOptions,this.format);e&&this.onChangeEvent(e.file,e.src)}}},{key:"scale",value:function(t){var e=this.photoRoot.getEventList("PhotoMain");null===e||void 0===e||e.scale(t)}},{key:"thickness",get:function(){return void 0===this.menuThickness||this.menuThickness<0?this.hasMenu?120:50:this.menuThickness}},{key:"mainPosition",get:function(){var t=this.thickness+"px",e={top:"0",left:"0",right:"0",bottom:"0"};return"top"===this.menuPosition?e.top=t:"left"===this.menuPosition?e.left=t:"right"===this.menuPosition?e.right=t:e.bottom=t,e}},{key:"memuPosition",get:function(){var t=this.thickness+"px";return"top"===this.menuPosition?{top:"0",left:"0",right:"0",height:t}:"left"===this.menuPosition?{top:"0",left:"0",bottom:"0",width:t}:"right"===this.menuPosition?{top:"0",right:"0",bottom:"0",width:t}:{left:"0",right:"0",bottom:"0",height:t}}}]),i}(l["h"]);Object(u["a"])([Object(l["d"])({type:String,required:!1})],at.prototype,"backgroundColor",void 0),Object(u["a"])([Object(l["d"])({type:Number,default:1.5})],at.prototype,"magnification",void 0),Object(u["a"])([Object(l["d"])({type:String,default:null})],at.prototype,"src",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],at.prototype,"initAngle",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],at.prototype,"maxPixel",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],at.prototype,"encoderOptions",void 0),Object(u["a"])([Object(l["d"])({type:String,required:!1})],at.prototype,"format",void 0),Object(u["a"])([Object(l["d"])({type:Object,default:function(){return{width:1,height:1,isRound:!1,resize:!0}}})],at.prototype,"mskOption",void 0),Object(u["a"])([Object(l["d"])({type:Boolean,required:!1})],at.prototype,"rotateControl",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],at.prototype,"menuThickness",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"bottom"})],at.prototype,"menuPosition",void 0),Object(u["a"])([Object(l["g"])()],at.prototype,"main",void 0),Object(u["a"])([Object(l["f"])()],at.prototype,"vuePictureCut",void 0),Object(u["a"])([Object(l["i"])("src")],at.prototype,"watchSrc",null),Object(u["a"])([Object(l["i"])("initAngle")],at.prototype,"watchInitAngle",null),Object(u["a"])([Object(l["i"])("sliderAngle")],at.prototype,"watchSliderAngle",null),Object(u["a"])([Object(l["b"])("on-change")],at.prototype,"onChangeEvent",null),at=Object(u["a"])([Object(l["a"])({components:{VuePictureCutCanvas:Z,VuePictureCutMask:nt}})],at);var st=at,rt=st,ct=(i("f08b"),Object(w["a"])(rt,R,_,!1,null,null,null)),ht=ct.exports,ut=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"vue-picture-cut-menu dark-theme",class:[["default","dark","gray"].indexOf(t.theme)>-1?t.theme+"-theme":"default-theme"]},[i("div",{staticClass:"vue-picture-cut-menu_slider"},[i("div",{staticClass:"vue-picture-cut-menu_slider-box"},[i("span",[t._v(t._s(t.menuRotateName))]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.sliderAngle,expression:"sliderAngle"}],attrs:{type:"range",min:-180,max:180},domProps:{value:t.sliderAngle},on:{__r:function(e){t.sliderAngle=e.target.value}}}),i("div",{staticClass:"vue-picture-cut-menu_slider-box-bar"},[i("div",{staticClass:"vue-picture-cut-menu_slider-box-button",style:{left:100*t.sliderAngle/361+50+"%"}},[i("div",{staticClass:"vue-picture-cut-menu_slider-box-tips"},[t._v(" "+t._s(t.sliderAngle)+"° ")])])])])]),i("div",{staticClass:"vue-picture-cut-menu_box"},[i("div",{staticClass:"vue-picture-cut-menu_box-content"},[i("div",{staticClass:"vue-picture-cut-menu_box-list",staticStyle:{width:"558px"}},[i("div",{staticClass:"vue-picture-cut-menu_box-item v-p-icon_flip-v",on:{click:t.setFlipV}}),i("div",{staticClass:"vue-picture-cut-menu_box-item v-p-icon_flip-h",on:{click:t.setFlipH}}),i("span"),i("div",{staticClass:"vue-picture-cut-menu_box-item v-p-icon_rotate-left",on:{click:function(e){return t.rotate(90,!0)}}}),i("div",{staticClass:"vue-picture-cut-menu_box-item v-p-icon_rotate-right",on:{click:function(e){return t.rotate(-90,!0)}}}),i("span"),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:t.setMaskResize}},[i("div",{staticClass:"__mask"},[t._v(t._s(t.sizeAutoName))])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:t.setMaskSizeToOriginal}},[i("div",{staticClass:"__mask"},[t._v(t._s(t.sizeRawName))])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(1,1)}}},[i("div",{staticClass:"__mask"},[t._v("1:1")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(4,3)}}},[i("div",{staticClass:"__mask _5_4"},[t._v("4:3")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(3,4)}}},[i("div",{staticClass:"__mask _4_5"},[t._v("3:4")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(16,9)}}},[i("div",{staticClass:"__mask _5_4"},[t._v("16:9")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(9,16)}}},[i("div",{staticClass:"__mask _4_5"},[t._v("9:16")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(3,2)}}},[i("div",{staticClass:"__mask _5_4"},[t._v("3:2")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(2,3)}}},[i("div",{staticClass:"__mask _4_5"},[t._v("2:3")])])])])]),i("div",{staticClass:"vue-picture-cut-menu_confirm",staticStyle:{"max-width":"558px"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.cancel,expression:"cancel"}],staticClass:"__cancel",on:{click:t.onCancelEvent}},[t._v(t._s(t.cancelName))]),i("div",{staticClass:"__sure",class:{__center:!t.cancel},on:{click:t.sureCut}},[t._v(t._s(t.confirmName))])])])},lt=[],vt=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.sliderAngle=0,t}return Object(r["a"])(i,[{key:"watchSliderAngle",value:function(t){if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMain");e&&e.setAngle(parseInt(t))}}},{key:"onChangeEvent",value:function(t,e){return{blob:t,base64:e}}},{key:"onCancelEvent",value:function(){}},{key:"sureCut",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMask");if(t){var e=t.clip(this.maxPixel,this.encoderOptions,this.format);e&&this.onChangeEvent(e.file,e.src)}}}},{key:"setMaskSize",value:function(t,e){if(this.photoRoot){var i=this.photoRoot.getEventList("PhotoMask");i&&(i.reset(t,e),i.setResize(!1))}}},{key:"setMaskSizeToOriginal",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMain");t&&this.setMaskSize(t.imgRect.w,t.imgRect.h)}}},{key:"setMaskResize",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMask");e&&e.setResize(t)}}},{key:"rotate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.photoRoot&&t%360!==0){var i=this.photoRoot.getEventList("PhotoMain");if(i){var o=(i.showRect.r+t)%360;this.sliderAngle=o>180?o-360:o<-180?o+360:o,i.setAngle(i.showRect.r+t,e)}}}},{key:"setFlipV",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMain");t&&t.setFlipV(1===t.showRect.sV,!0)}}},{key:"setFlipH",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMain");t&&t.setFlipH(1===t.showRect.sH,!0)}}},{key:"photoRoot",get:function(){return this.root?this.root.photoRoot:this.pRoot}}]),i}(l["h"]);Object(u["a"])([Object(l["c"])({from:"vuePictureCut",default:"photoRoot"})],vt.prototype,"pRoot",void 0),Object(u["a"])([Object(l["d"])({type:Object,required:!1})],vt.prototype,"root",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"default"})],vt.prototype,"theme",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],vt.prototype,"maxPixel",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],vt.prototype,"encoderOptions",void 0),Object(u["a"])([Object(l["d"])({type:String,required:!1})],vt.prototype,"format",void 0),Object(u["a"])([Object(l["d"])({type:Boolean,default:!0})],vt.prototype,"cancel",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"Cancel"})],vt.prototype,"cancelName",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"Ok"})],vt.prototype,"confirmName",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"auto"})],vt.prototype,"sizeAutoName",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"raw"})],vt.prototype,"sizeRawName",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"Rotate"})],vt.prototype,"menuRotateName",void 0),Object(u["a"])([Object(l["i"])("sliderAngle")],vt.prototype,"watchSliderAngle",null),Object(u["a"])([Object(l["b"])("on-change")],vt.prototype,"onChangeEvent",null),Object(u["a"])([Object(l["b"])("on-cancel")],vt.prototype,"onCancelEvent",null),vt=Object(u["a"])([l["a"]],vt);var dt=vt,mt=dt,ft=(i("57f5"),Object(w["a"])(mt,ut,lt,!1,null,null,null)),gt=ft.exports,pt={install:function(t){t.component("vue-picture-cut",ht),t.component("vue-picture-cut-mask",nt),t.component("vue-picture-cut-menu",gt)}},yt=i("5c96"),wt=i.n(yt);i("0fae");o["default"].config.productionTip=!1,o["default"].use(pt),o["default"].use(wt.a,{size:"mini"}),new o["default"]({el:"#app",render:function(t){return t(k)}}).$mount("#app")},ce31:function(t,e,i){"use strict";var o=i("6429"),n=i.n(o);n.a},f08b:function(t,e,i){"use strict";var o=i("3aa3"),n=i.n(o);n.a}}); \ No newline at end of file +(function(t){function e(e){for(var o,s,r=e[0],c=e[1],h=e[2],l=0,v=[];l0&&void 0!==arguments[0])||arguments[0];if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMask");e&&(e.isRound=t)}}},{key:"setMaskSize",value:function(t,e){if(this.photoRoot){var i=this.photoRoot.getEventList("PhotoMask");null===i||void 0===i||i.reset(t,e)}}},{key:"setMaskSizeToOriginal",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMain");t&&this.setMaskSize(t.imgRect.w,t.imgRect.h)}}},{key:"setMaskResize",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMask");null===e||void 0===e||e.setResize(t)}}},{key:"rotate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.photoRoot&&t%360!==0){var i=this.photoRoot.getEventList("PhotoMain");null===i||void 0===i||i.setAngle(i.showRect.r+t,e)}}},{key:"rotateTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.photoRoot){var i=this.photoRoot.getEventList("PhotoMain");i&&i.showRect.r+t%360&&i.setAngle(t,e)}}},{key:"setFlipV",value:function(t){if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMain");null===e||void 0===e||e.setFlipV(1===e.showRect.sV,t)}}},{key:"setFlipH",value:function(t){if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMain");null===e||void 0===e||e.setFlipH(1===e.showRect.sH,t)}}},{key:"setFlip",value:function(t,e,i){if(this.photoRoot){var o=this.photoRoot.getEventList("PhotoMain");null===o||void 0===o||o.setFlip(t,e,i)}}},{key:"scale",value:function(t){var e=this.photoRoot.getEventList("PhotoMain");null===e||void 0===e||e.scale(t)}}]),t}());function f(t){if(t&&t.photoRoot)return new m(t);throw new Error("createUtils需要一个为VuePictureCut实例的参数,但是当前得到的是".concat(t,'!\n\n "createUtils" requires an argument for the "VuePictureCut" instance, but the current result is ').concat(t,"!"))}var g=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.config=d,t.language="EN",t.src="./demo.jpg",t.blob=null,t.base64=null,t.pictureCut=null,t.form={backgroundColor:void 0,maskColor:void 0,maskBorderColor:void 0,menuTheme:"default",isRound:!0,resize:!0,rotateControl:!0,zoom:.96,initAngle:void 0,width:4,height:5,maxPixel:void 0,encoderOptions:.8,format:"image/jpeg"},t}return Object(r["a"])(i,[{key:"mounted",value:function(){this.pictureCut=this.$refs["pictureCut"],this.utils=window.utils=f(this.pictureCut)}},{key:"inputChange",value:function(t){return this.src=URL.createObjectURL(t),!1}},{key:"cutChange",value:function(t){var e=t.blob,i=t.base64;this.blob=e,this.base64=i}},{key:"reset",value:function(){this.utils.reset()}},{key:"mskOption",get:function(){return{width:this.form.width||1,height:this.form.height||1,isRound:this.form.isRound,resize:this.form.resize,color:this.form.maskColor,borderColor:this.form.maskBorderColor}}},{key:"newSrc",get:function(){return this.blob?URL.createObjectURL(this.blob):""}}]),i}(l["h"]);g=Object(u["a"])([l["a"]],g);var p=g,y=p,w=(i("5c0b"),i("2877")),b=Object(w["a"])(y,n,a,!1,null,null,null),k=b.exports,R=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"vue-picture-cut",class:{_default:!t.backgroundColor},style:{"background-color":t.backgroundColor||"#fff"}},[i("div",{ref:"main",staticClass:"vue-picture-cut_main",class:[t.menuPosition],style:t.mainPosition},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"vue-picture-cut_main-loading"},[t._v("loading...")]),i("vue-picture-cut-canvas",{attrs:{loading:t.loading,angle:t.initAngle},on:{"update:loading":function(e){t.loading=e}}}),t._t("default",[i("vue-picture-cut-mask",t._b({},"vue-picture-cut-mask",t.mskOption,!1))])],2),i("div",{directives:[{name:"show",rawName:"v-show",value:t.thickness>0,expression:"thickness > 0"}],staticClass:"vue-picture-cut_menu-box",class:[t.menuPosition],style:t.memuPosition},[t._t("menu",[i("div",{staticClass:"vue-picture-cut_default-menu"},[t.rotateControl?i("div",{staticClass:"vue-picture-cut_slider"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.sliderAngle,expression:"sliderAngle"}],attrs:{type:"range",min:-180,max:180},domProps:{value:t.sliderAngle},on:{__r:function(e){t.sliderAngle=e.target.value}}}),i("div",{staticClass:"vue-picture-cut_slider-box"},[i("div",{staticClass:"vue-picture-cut_slider-box-bar",style:{left:100*t.sliderAngle/361+50+"%"}},[i("div",{staticClass:"vue-picture-cut_slider-box-tips"},[t._v(" "+t._s(t.sliderAngle)+"° ")])])])]):t._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:t.src,expression:"src"}],staticClass:"vue-picture-cut_button",on:{click:t.sureCut}},[t._v("ok")])])])],2)])},_=[],x=(i("a9e3"),i("4160"),i("a630"),i("d81d"),i("4ec9"),i("159b"),i("b85c")),O=(i("a15b"),i("c19f"),i("b0c0"),i("ac1f"),i("1276"),i("5cc6"),i("9a8c"),i("a975"),i("735e"),i("c1ac"),i("d139"),i("3a7b"),i("d5d6"),i("82f8"),i("e91f"),i("60bd"),i("5f96"),i("3280"),i("3fcc"),i("ca91"),i("25a1"),i("cd26"),i("3c5d"),i("2954"),i("649e"),i("219c"),i("170b"),i("b39a"),i("72f7"),document.createElement("canvas"));O.style.display="none";var j=O.getContext("2d");function C(t,e,i,o,n){var a=.5*o,s=.5*n,r=.5522848,c=a*r,h=s*r;t.moveTo(e-a,i),t.bezierCurveTo(e-a,i-h,e-c,i-s,e,i-s),t.bezierCurveTo(e+c,i-s,e+a,i-h,e+a,i),t.bezierCurveTo(e+a,i+h,e+c,i+s,e,i+s),t.bezierCurveTo(e-c,i+s,e-a,i+h,e-a,i)}function E(t,e,i){var o=Math.sin(i*Math.PI/180),n=Math.cos(i*Math.PI/180),a=Math.pow(t,2)*Math.pow(o,2)+Math.pow(e,2)*Math.pow(n,2),s=2*(Math.pow(t,2)-Math.pow(e,2))*o*n,r=Math.pow(t,2)*Math.pow(n,2)+Math.pow(e,2)*Math.pow(o,2),c=-Math.pow(t,2)*Math.pow(e,2);return{A:a,B:s,C:r,F:c}}function M(t,e,i,o){var n=Math.pow(e,2)-4*t*i,a=Math.sqrt(4*i*o/n),s=Math.sqrt(4*t*o/n);return{x:-Math.abs(a),y:-Math.abs(s),w:2*Math.abs(a),h:2*Math.abs(s)}}function P(t,e,i){var o=Math.sqrt(t*t+e*e),n=Math.atan2(t,e),a=i*Math.PI/180+n;return{x:o*Math.sin(a),y:o*Math.cos(a)}}function S(t,e){var i=new Uint8Array(t),o=i.length,n=new Array(o);while(o--)n[o]=String.fromCharCode(i[o]);var a=n.join(""),s=window.btoa(a);return"data:"+e+";base64,"+s}function L(t){return new Promise((function(e,i){var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType="blob",o.onload=function(){if(200===this.status){var t=o.response,n=new FileReader;n.addEventListener("loadend",(function(o){o.target?"string"===typeof o.target.result?e(o.target.result):null!==o.target.result?S(o.target.result,t.type):i():i()})),n.readAsDataURL(t)}else i()},o.onerror=function(t){i(t)},o.send()}))}var T={rotatePoint:P,loadCrossDomainImg:L,cloneJSON:function(t){return JSON.parse(JSON.stringify(t))},loadImg:function(t){return new Promise((function(e,i){var o=new Image;o.addEventListener("load",(function(){e&&e(o)})),o.addEventListener("error",(function(){i&&i(o)})),o.src=t}))},clipBy:function(t,e,i,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.8,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"image/jpeg",s=arguments.length>6?arguments[6]:void 0,r=o.x,c=o.y,h=o.w,u=o.h,l=o.r,v=o.sH,d=o.sV;return O.width=e,O.height=i,j.clearRect(0,0,e,i),j.save(),j.translate(e/2,i/2),"image/jpeg"!==a&&"image/jpg"!==a||(j.fillStyle="#fff",j.fillRect(-e/2,-i/2,e,i)),s&&s(j,e,i),l/360&&j.rotate(-l*Math.PI/180),j.translate(r+h/2,c+u/2),j.scale(v,d),j.drawImage(t,0,0,t.width,t.height,-h/2,-u/2,h,u),j.scale(v,d),j.translate(-r-h/2-e/2,-c-u/2-i/2),j.restore(),O.toDataURL(a,n)},clipByRound:function(t,e,i,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.8,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"image/jpeg";return this.clipBy(t,e,i,o,n,a,(function(t){t.beginPath(),C(t,0,0,e,i),t.clip(),t.closePath()}))},clipByMax:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(t.width>e||t.height>e){var o=t.width/t.height,n=t.width,a=t.height;t.width>e&&(n=e,a=n/o),t.height>e&&(a=e,n=a*o);var s={x:-n/2,y:-a/2,w:n,h:a,r:0,sV:1,sH:1},r=this.clipBy(t,n,a,s,i);return{src:r,file:this.base64ToBlob(r)}}},base64ToBlob:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image/jpeg";if(!window.atob)return null;for(var i=window.atob(t.split(",")[1]),o=new ArrayBuffer(i.length),n=new Uint8Array(o),a=0,s=i.length;a1&&void 0!==arguments[1]?arguments[1]:1.5;this.root=t,this.width=t.offsetWidth,this.height=t.offsetHeight,this.drawWidth=Math.floor(this.width*e),this.drawHeight=Math.floor(this.height*e),this.magnification=e,this.core={x:Math.floor(this.drawWidth/2),y:Math.floor(this.drawHeight/2)},this._eventInit()}},{key:"addEventList",value:function(t){this.eventList.set(t.className,t)}},{key:"getEventList",value:function(t){var e=this.eventList.get(t);return e||null}},{key:"deleteEventList",value:function(t){this.eventList.delete(t)}},{key:"setPriority",value:function(t){this.priorityEvent||(this.priorityEvent=t)}},{key:"getPriority",value:function(){return this.priorityEvent?this.priorityEvent:null}},{key:"deletePriority",value:function(t){this.priorityEvent&&this.priorityEvent.className===t&&(this.priorityEvent=null)}},{key:"_eventInit",value:function(){var t=this;this.root.addEventListener("touchstart",(function(e){var i=e||window.event;i.preventDefault();var o=i.changedTouches;t._touchStart(o)}),!1),this.root.addEventListener("touchend",(function(e){var i=e||window.event;i.preventDefault();var o=i.changedTouches;t._touchEnd(o)}),!1),this.root.addEventListener("touchmove",(function(e){var i=e||window.event;i.preventDefault();var o=i.changedTouches;t._touchMove(o)}),!1),this.root.addEventListener("mousedown",(function(e){var i=e||window.event;i.preventDefault(),t._mouseDown(i)}),!1),this.root.addEventListener("mouseup",(function(e){var i=e||window.event;i.preventDefault(),t._mouseUp(i)}),!1),this.root.addEventListener("mouseleave",(function(e){var i=e||window.event;i.preventDefault(),t._mouseUp(i)}),!1),this.root.addEventListener("mousemove",(function(e){var i=e||window.event;i.preventDefault(),t._mouseMove(i)}),!1),this.root.addEventListener("mousewheel",(function(e){var i=e||window.event;i.preventDefault();var o=i.wheelDelta||i.detail;t._mouseWheel(o,{x:i.offsetX*t.magnification-t.core.x,y:i.offsetY*t.magnification-t.core.y})}),!1)}},{key:"_touchStart",value:function(t){var e=this,i=Array.from(t).map((function(t){return e._getTouchePoint(t)}));if(this.priorityEvent)this.priorityEvent.touchStart(T.cloneJSON(i));else{var o,n=[],a=Object(x["a"])(this.eventList.values());try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.touchStart(T.cloneJSON(i)),this.priorityEvent)break;n.push(s)}}catch(r){a.e(r)}finally{a.f()}this.priorityEvent&&n.forEach((function(t){return t.touchEnd(T.cloneJSON(i))}))}}},{key:"_touchEnd",value:function(t){var e=this,i=Array.from(t).map((function(t){return e._getTouchePoint(t)}));this.priorityEvent?this.priorityEvent.touchEnd(T.cloneJSON(i)):this.eventList.forEach((function(t){return t.touchEnd(T.cloneJSON(i))}))}},{key:"_touchMove",value:function(t){var e=this,i=Array.from(t).map((function(t){return e._getTouchePoint(t)}));this.priorityEvent?this.priorityEvent.touchMove(T.cloneJSON(i)):this.eventList.forEach((function(t){return t.touchMove(T.cloneJSON(i))}))}},{key:"_mouseDown",value:function(t){var e=[this._getMousePoint(t)];if(this.priorityEvent)this.priorityEvent.touchStart(T.cloneJSON(e));else{var i,o=[],n=Object(x["a"])(this.eventList.values());try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.touchStart(T.cloneJSON(e)),this.priorityEvent)break;o.push(a)}}catch(s){n.e(s)}finally{n.f()}this.priorityEvent&&o.forEach((function(t){return t.touchEnd(T.cloneJSON(e))}))}}},{key:"_mouseUp",value:function(t){var e=[this._getMousePoint(t)];this.priorityEvent?this.priorityEvent.touchEnd(T.cloneJSON(e)):this.eventList.forEach((function(t){return t.touchEnd(T.cloneJSON(e))}))}},{key:"_mouseMove",value:function(t){var e=[this._getMousePoint(t)];this.priorityEvent?this.priorityEvent.touchMove(T.cloneJSON(e)):this.eventList.forEach((function(t){return t.touchMove(T.cloneJSON(e))}))}},{key:"_mouseWheel",value:function(t,e){var i=this;clearTimeout(this.wheelTimeOut);var o=Date.now(),n=o-this.wheelTime>400&&!this.wheelstatus;n&&(this.wheelstatus=!0,this._wheelStart(t,e)),this.wheelTime=o,this.wheelTimeOut=setTimeout((function(){i.wheelstatus=!1,i._wheelEnd(t,e)}),400),n||this._wheelChange(t,e)}},{key:"_wheelStart",value:function(t,e){if(this.priorityEvent)this.priorityEvent.wheelStart(t,T.cloneJSON(e));else{var i,o=[],n=Object(x["a"])(this.eventList.values());try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.wheelStart(t,T.cloneJSON(e)),this.priorityEvent)break;o.push(a)}}catch(s){n.e(s)}finally{n.f()}this.priorityEvent&&o.forEach((function(i){return i.wheelEnd(t,T.cloneJSON(e))}))}}},{key:"_wheelChange",value:function(t,e){this.priorityEvent?this.priorityEvent.wheelChange(t,T.cloneJSON(e)):this.eventList.forEach((function(i){return i.wheelChange(t,T.cloneJSON(e))}))}},{key:"_wheelEnd",value:function(t,e){this.priorityEvent?this.priorityEvent.wheelEnd(t,T.cloneJSON(e)):this.eventList.forEach((function(i){return i.wheelEnd(t,T.cloneJSON(e))}))}},{key:"_getTouchePoint",value:function(t){var e=this._getClientPosition(this.root,{x:0,y:0});return{x:(t.pageX-e.x)*this.magnification-this.core.x,y:(t.pageY-e.y)*this.magnification-this.core.y,id:t.identifier}}},{key:"_getMousePoint",value:function(t){return{x:t.offsetX*this.magnification-this.core.x,y:t.offsetY*this.magnification-this.core.y,id:0}}},{key:"_getClientPosition",value:function(t,e){return e.x+=t.offsetLeft,e.y+=t.offsetTop,"HTML"===t.tagName||null===t.offsetParent?e:this._getClientPosition(t.offsetParent,e)}},{key:"cursor",set:function(t){this.root.style.cursor=t}}]),t}(),z=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("canvas",{staticClass:"vue-picture-cut_canvas"})},H=[],A=(i("cb29"),i("4de4"),i("c975"),i("3835")),V=i("5530"),N=(i("25f0"),function(t){return Object.prototype.toString.call(t)}),I=function(){function t(){Object(s["a"])(this,t),this.pStart={x:0,y:0},this.pEnd={x:1,y:1},this.pCrt1={x:0,y:0},this.pCrt2={x:0,y:0},this.setOptByString("ease")}return Object(r["a"])(t,[{key:"setOpt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ease";if("[object Array]"===N(t)&&t.length>=4){var e=t;return this.setOptByArr(e[0],e[1],e[2],e[3])}return"[object String]"===N(t)?this.setOptByString(t):this.setOptByString("ease")}},{key:"setOptByString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ease",i=t.BEZIER[e];return void 0===i&&(i=t.BEZIER.ease),this.setOptByArr(i[0],i[1],i[2],i[3])}},{key:"setOptByArr",value:function(t,e,i,o){return this.pCrt1={x:t,y:e},this.pCrt2={x:i,y:o},this}},{key:"getPoint",value:function(t){var e=[1,t,t*t,t*t*t],i=[[1,0,0,0],[-3,3,0,0],[3,-6,3,0],[-1,3,-3,1]],o=[[this.pStart.x,this.pStart.y],[this.pCrt1.x,this.pCrt1.y],[this.pCrt2.x,this.pCrt2.y],[this.pEnd.x,this.pEnd.y]],n=[e[0]*i[0][0]+e[1]*i[1][0]+e[2]*i[2][0]+e[3]*i[3][0],e[0]*i[0][1]+e[1]*i[1][1]+e[2]*i[2][1]+e[3]*i[3][1],e[0]*i[0][2]+e[1]*i[1][2]+e[2]*i[2][2]+e[3]*i[3][2],e[0]*i[0][3]+e[1]*i[1][3]+e[2]*i[2][3]+e[3]*i[3][3]],a=[n[0]*o[0][0]+n[1]*o[1][0]+n[2]*o[2][0]+n[3]*o[3][0],n[0]*o[0][1]+n[1]*o[1][1]+n[2]*o[2][1]+n[3]*o[3][1]],s={x:a[0],y:a[1]};return s.y}}]),t}();I.BEZIER={linear:[0,0,1,1],ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},function(){for(var t=0,e=["webkit","moz"],i=0;i0&&void 0!==arguments[0]&&arguments[0];this.id>0&&cancelAnimationFrame(this.id),this.id=0,t&&this.end()}}]),t}();function q(t){return new J(t)}var $=function(){function t(e,i){Object(s["a"])(this,t),this.className="PhotoMain",this.imgRect={x:0,y:0,w:0,h:0},this.showRect={x:0,y:0,w:0,h:0,r:0,sV:1,sH:1},this.moveRect={minX:null,minY:null,maxX:null,maxY:null},this.touchList=[],this.status=null,this.touchstartPoint={x:0,y:0},this.touchstartEvent=T.doubleTouche({x:0,y:0,id:0}),this.animation=void 0,this.scaleTimer=null,this.loadImgEd=new Map,e.width=i.drawWidth,e.height=i.drawHeight,i.addEventList(this),this.root=i,this.canvas=e,this.ctx=e.getContext("2d"),this.ctx.translate(this.root.core.x,this.root.core.y)}return Object(r["a"])(t,[{key:"setSrc",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.showRect.r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.clear(),this.src=t,this.loadingEvent&&this.loadingEvent(!0),T.loadImg(t).then((function(t){o||(e.originalImg=t);var n=T.clipByMax(t,1500);if(n)e.setSrc(n.src,i,++o);else{if(e.img=t,e._initRect(),e.showRect.r=i,e.moveRect.minX&&e.moveRect.minY){e.loadImgEd.forEach((function(t){t&&t()}));var a=e.showRect,s=a.x,r=a.y,c=a.w,h=a.h,u=a.r,l=a.sV,v=a.sH,d=e._checkRange({x:s,y:r,w:c,h:h,r:u,sV:l,sH:v});e.showRect={x:s+d[0],y:r+d[1],w:c+d[2],h:h+d[3],r:u,sV:l,sH:v}}else e._initMoveRange();e._draw(e.imgRect,e.showRect),e.showRect.r=i,e.loadingEvent&&e.loadingEvent(!1)}}),(function(){e.loadingEvent&&e.loadingEvent(!1)}))}},{key:"reset",value:function(){if(this.img){if(this._initRect(),this.showRect.r=0,this.showRect.sV=1,this.showRect.sH=1,this.moveRect.minX&&this.moveRect.minY){this.loadImgEd.forEach((function(t){t&&t()}));var t=this.showRect,e=t.x,i=t.y,o=t.w,n=t.h,a=t.r,s=t.sV,r=t.sH,c=this._checkRange({x:e,y:i,w:o,h:n,r:a,sV:s,sH:r});this.showRect={x:e+c[0],y:i+c[1],w:o+c[2],h:n+c[3],r:a,sV:s,sH:r}}else this._initMoveRange();this._draw(this.imgRect,this.showRect)}}},{key:"setMoveRange",value:function(t,e,i,o,n,a){if(this._initMoveRange(t,e,i,o),!this.img)return[0,0,0,0];if(n&&a){var s=this.showRect,r=s.x,c=s.y,h=s.w,u=s.h,l=s.r,v=s.sV,d=s.sH,m=n.x-r,f=n.y-c,g=h*a-h,p=u*a-u,y=this._checkRange(Object(V["a"])(Object(V["a"])({},n),{},{w:h*a,h:u*a,r:l,sV:v,sH:d}));return[m+y[0],f+y[1],g+y[2],p+y[3]]}var w=this._checkRange(),b=Object(A["a"])(w,4),k=b[0],R=b[1],_=b[2],x=b[3];return[k,R,_,x]}},{key:"setAngle",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.img?(i&&this.animation&&this.animation.abort(),this.loadImgEd.forEach((function(o){o&&o({showRect:Object(V["a"])(Object(V["a"])({},e.showRect),{},{r:t})},i)}))):this.showRect.r=t}},{key:"setFlip",value:function(t,e){var i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===this.showRect.sH,a=-1===this.showRect.sV;n===e&&a===t||this.img&&(o?(null===(i=this.animation)||void 0===i||i.abort(),this.doAnimation(0,0,0,0,0,t,e)):(this.showRect.sV=t?-1:1,this.showRect.sH=e?-1:1,this._draw(this.imgRect,this.showRect)))}},{key:"setFlipV",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=-1===this.showRect.sV;o!==t&&(this.img&&(i?(null===(e=this.animation)||void 0===e||e.abort(),this.doAnimation(0,0,0,0,0,t)):(this.showRect.sV=t?-1:1,this._draw(this.imgRect,this.showRect))))}},{key:"setFlipH",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=-1===this.showRect.sH;o!==t&&(this.img&&(i?(null===(e=this.animation)||void 0===e||e.abort(),this.doAnimation(0,0,0,0,0,void 0,t)):(this.showRect.sH=t?-1:1,this._draw(this.imgRect,this.showRect))))}},{key:"scale",value:function(t){var e,i=this;if(this.img&&!(t<0)&&1!==t){null!==this.scaleTimer&&clearTimeout(this.scaleTimer),null===(e=this.animation)||void 0===e||e.abort(),this.touchstartPoint={x:0,y:0};var o=this._changePointByCanvas(this.showRect);this._scaleByZoom(t,o),this._draw(this.imgRect,this.showRect),this.scaleTimer=setTimeout((function(){var t=i._checkRange(),e=Object(A["a"])(t,4),o=e[0],n=e[1],a=e[2],s=e[3];i.doAnimation(o,n,a,s,0)}),500)}}},{key:"onLoading",value:function(t){this.loadingEvent=t}},{key:"setShowRect",value:function(t){this.img&&(this.showRect=t,this._draw(this.imgRect,this.showRect))}},{key:"_changePointByCanvas",value:function(t){var e=this.showRect.r;return T.rotatePoint(t.x,t.y,e)}},{key:"_changePointByImage",value:function(t){var e=this.showRect.r;return T.rotatePoint(t.x,t.y,-e)}},{key:"_initRect",value:function(){var t=this.img;if(t){var e=this.root.drawWidth,i=this.root.drawHeight,o=t.width/e,n=t.height/i,a=o0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null===t||null===e||null===i||null===o){var n=this.imgRect,a=n.w,s=n.h;if(0===a)return;var r=this.root.drawWidth,c=this.root.drawHeight,h=r/c,u=a/s;if(h>u){var l=c*u,v=c;t=-l/2,e=-v/2}else{var d=r,m=r/u;t=-d/2,e=-m/2}i=-t,o=-e,this.moveRect={minX:t,minY:e,maxX:i,maxY:o}}else this.moveRect={minX:t,minY:e,maxX:i,maxY:o}}},{key:"_draw",value:function(t,e){if(this.clear(),this.img){var i=e.x,o=e.y,n=e.w,a=e.h,s=e.r,r=e.sV,c=e.sH,h=this.ctx;if(h.save(),h.rotate(-s*Math.PI/180),h.translate(i,o),h.scale(c,r),h.drawImage(this.img,t.x,t.y,t.w,t.h,-n/2,-a/2,n,a),h.scale(-c,-r),h.translate(-i,-o),this.root.debug){h.strokeStyle="#0f0",h.lineWidth=2;for(var u=0;u2){var e=this.touchList.map((function(t){return t.id}));t=t.filter((function(t){return e.indexOf(t.id)>-1})),2===t.length&&this._touchMove2(t[0],t[1])}}},{key:"touchStart",value:function(t){var e;if(this.img){null===(e=this.animation)||void 0===e||e.abort();var i=t[0];this.touchList.length?1===this.touchList.length&&this.touchList[0].id!==i.id&&(this.touchList.push(i),this._touchStart2(this.touchList[0],this.touchList[1])):(this.touchList.push(i),this._touchStart1(i))}}},{key:"wheelStart",value:function(t,e){this.img&&(this.status="scale",this.wheelChange(t,e))}},{key:"wheelChange",value:function(t,e){var i;if(this.img){null===(i=this.animation)||void 0===i||i.abort(),this.touchstartEvent=T.doubleTouche(e);var o=this.touchstartEvent.core,n=this._changePointByImage(o);this.touchstartPoint=this._getPointerLocation(n),this.root.setPriority(this),t=1+5e-4*t,t=t>1.08?1.08:t<.92593?.92593:t,this._scaleByZoom(t,e),this._draw(this.imgRect,this.showRect)}}},{key:"wheelEnd",value:function(){if(this.img){this.status=null,this.touchstartEvent=T.doubleTouche({x:0,y:0,id:0}),this.touchstartPoint={x:0,y:0};var t=this._checkRange(),e=Object(A["a"])(t,4),i=e[0],o=e[1],n=e[2],a=e[3];this.doAnimation(i,o,n,a,0),this.root.deletePriority(this.className)}}},{key:"_touchStart1",value:function(t){this.status="move",this.touchstartEvent=T.doubleTouche(t);var e=this._changePointByImage(t);this.touchstartPoint=this._getPointerLocation(e)}},{key:"_touchStart2",value:function(t,e){var i=this.showRect,o=i.sV,n=i.sH;this.status="scale",this.touchstartEvent=!o&&n||o&&!n?T.doubleTouche(e,t):T.doubleTouche(t,e);var a=this.touchstartEvent.core,s=this._changePointByImage(a);this.touchstartPoint=this._getPointerLocation(s),this.root.setPriority(this)}},{key:"_touchMove1",value:function(t){"move"===this.status&&(this.root.setPriority(this),this.touchList[0]=t,this._move(t),this._draw(this.imgRect,this.showRect))}},{key:"_touchMove2",value:function(t,e){if("scale"===this.status){this.touchList=[t,e];var i=T.doubleTouche(t,e);this._scaleByLocation(i),this._draw(this.imgRect,this.showRect)}}},{key:"_getPointerLocation",value:function(t){return{x:t.x-this.showRect.x,y:t.y-this.showRect.y}}},{key:"_move",value:function(t){var e=this.touchstartPoint,i=this._changePointByImage(t);this.showRect.x=i.x-e.x,this.showRect.y=i.y-e.y}},{key:"_scaleByLocation",value:function(t){var e=t.length/this.touchstartEvent.length;e=e<.9091?.9091:e,e=e>1.1?1.1:e,this._scaleByZoom(e,t.core),this.touchstartEvent=t}},{key:"_scaleByZoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.touchstartPoint;this.touchstartPoint={x:o.x*t,y:o.y*t},o=this.touchstartPoint;var n=this.showRect,a=n.w,s=n.h,r=n.r,c=n.sV,h=n.sH,u=this._changePointByImage(e);this.showRect={x:u.x-o.x,y:u.y-o.y,w:a*t,h:s*t,r:r+i,sV:c,sH:h}}},{key:"_checkRange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showRect,e=t.x,i=t.y,o=t.w,n=t.h;e-=o/2,i-=n/2;var a=this.moveRect,s=a.minX,r=a.minY,c=a.maxX,h=a.maxY;s=s||0,r=r||0,c=c||0,h=h||0;var u=e,l=i,v=o,d=n,m=this._getPohtoByRangeLocation([e,i,o,n]),f=o/n;m[4]<=0&&(v=c-s,d=v/f,u=e+(o-v)/2,l=i+(n-d)/2),m=this._getPohtoByRangeLocation([u,l,v,d]),m[5]<=0&&(d=h-r,v=d*f,u=e+(o-v)/2,l=i+(n-d)/2),m=this._getPohtoByRangeLocation([u,l,v,d]),m[0]>0&&(u-=m[0]),m[1]>0&&(l-=m[1]),m[2]<0&&(u-=m[2]),m[3]<0&&(l-=m[3]);var g=v-o,p=d-n;return[u-e+g/2,l-i+p/2,g,p]}},{key:"_getPohtoByRangeLocation",value:function(t){var e=this.showRect,i=e.x,o=e.y,n=e.w,a=e.h,s=this.moveRect,r=s.minX,c=s.minY,h=s.maxX,u=s.maxY;return t&&(i=t[0],o=t[1],n=t[2],a=t[3]),[i-(r||0),o-(c||0),i+n-(h||0),o+a-(u||0),n-(h||0)+(r||0),a-(u||0)+(c||0)]}},{key:"doAnimation",value:function(t,e,i,o,n,a,s,r){var c=this;if(t||e||i||o||n||void 0!==a||void 0!==s){var h=this.showRect,u=h.x,l=h.y,v=h.w,d=h.h,m=h.r,f=h.sV,g=h.sH;a=void 0===a?-1===f:a,s=void 0===s?-1===g:s,this.showRect={x:u+t,y:l+e,w:v+i,h:d+o,r:m+n,sV:a?-1:1,sH:s?-1:1};var p=this.showRect.sV-f,y=this.showRect.sH-g;(t||e||i||o||n||y||p)&&(this.animation=q({duration:300,timing:"ease-in-out",change:function(a){c._showRect={x:u+a*t,y:l+a*e,w:v+a*i,h:d+a*o,r:m+a*n,sV:f+a*p,sH:g+a*y},c._draw(c.imgRect,c._showRect)},end:function(){c._showRect&&(c.showRect=c._showRect,c._showRect=void 0),r&&r()}}).start())}}}]),t}(),X=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.photoMain=null,t}return Object(r["a"])(i,[{key:"watchAngle",value:function(t){this.photoMain&&void 0!==t&&this.photoMain.setAngle(t,!0)}},{key:"mounted",value:function(){var t=this;setTimeout((function(){t.photoMain=new $(t.$el,t.photoRoot),t.photoMain.onLoading((function(e){t._loading=e}))}),0)}}]),i}(l["h"]);Object(u["a"])([Object(l["c"])({from:"vuePictureCut",default:"photoRoot"})],X.prototype,"photoRoot",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],X.prototype,"angle",void 0),Object(u["a"])([Object(l["e"])("loading",{type:Boolean,default:!1})],X.prototype,"_loading",void 0),Object(u["a"])([Object(l["i"])("angle")],X.prototype,"watchAngle",null),X=Object(u["a"])([l["a"]],X);var W=X,Y=W,D=Object(w["a"])(Y,z,H,!1,null,null,null),U=D.exports,Z=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("svg",{staticClass:"vue-picture-cut_mask",attrs:{preserveAspectRatio:"none",viewBox:t.viewBox}},[i("path",{staticClass:"cls-1",attrs:{fill:t.color||"rgba(0,0,0,.5)",d:"M0,0 H"+t.drawWidth+" V"+t.drawHeight+" H0 V0 Z "+t.round}}),t.thisResize||!t.thisRound?i("rect",t._b({staticClass:"cls-3",style:{"stroke-dasharray":t.border,stroke:t.thisRound?"rgba(255,255,255,.7)":t.borderColor||"#ff5500"}},"rect",t.rect,!1)):t._e(),t.thisRound?i("path",{staticClass:"cls-2",attrs:{stroke:t.borderColor||"#ff5500",d:t.round}}):t._e(),t.thisResize?i("path",{staticClass:"cls-4",attrs:{d:t.TLHorn}}):t._e(),t.thisResize?i("path",{staticClass:"cls-4",attrs:{d:t.TRHorn}}):t._e(),t.thisResize?i("path",{staticClass:"cls-4",attrs:{d:t.BLHorn}}):t._e(),t.thisResize?i("path",{staticClass:"cls-4",attrs:{d:t.BRHorn}}):t._e()])},G=[],K=(i("7db0"),new Map([["Top Left","nw-resize"],["Top Right","ne-resize"],["Bottom Left","sw-resize"],["Bottom Right","se-resize"],["Top","n-resize"],["Left","w-resize"],["Right","e-resize"],["Bottom","s-resize"]])),Q=function(){function t(e,i,o,n,a){var r=this;Object(s["a"])(this,t),this.className="PhotoMask",this._isRound=!1,this.touche=null,this.touchePosition=void 0,this.animation=void 0,e.addEventList(this),this.root=e,this.width=i||1,this.height=o||1,this.resize=n,this.faultTolerant=8*e.magnification;var c=this.maskRect=this._getMaskRect();this._draw=a,a(this.maskRect,!1,this);var h=this.root.getEventList("PhotoMain");h&&(h.loadImgEd.set(this.className,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return r._reset(h,t,e)})),h.setMoveRange(c.x,c.y,c.x+c.w,c.y+c.h))}return Object(r["a"])(t,[{key:"_reset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Object.assign({},t,e),n=this._getMaskRect(),a=o.showRect,s=this._isRound?T.getEllipseRectByRect(n.w,n.h,a.r):T.getRectByRect(n.w,n.h,a.r),r=t.setMoveRange(s.x,s.y,s.x+s.w,s.y+s.h),c=Object(A["a"])(r,4),h=c[0],u=c[1],l=c[2],v=c[3];i?t.doAnimation(h,u,l,v,a.r-t.showRect.r):t.setShowRect({x:a.x+h,y:a.y+u,w:a.w+l,h:a.h+v,r:a.r,sV:a.sV,sH:a.sH})}},{key:"reset",value:function(t,e){this.width=t||1,this.height=e||1;var i=this._getMaskRect(),o=i.x-this.maskRect.x,n=i.y-this.maskRect.y,a=i.w-this.maskRect.w,s=i.h-this.maskRect.h,r=this.root.getEventList("PhotoMain");if(r){var c=r.showRect,h=i.w/this.maskRect.w,u=T.rotatePoint(this.maskRect.x+this.maskRect.w/2,this.maskRect.y+this.maskRect.h/2,-c.r),l={x:(c.x-u.x)*h,y:(c.y-u.y)*h},v=this._isRound?T.getEllipseRectByRect(i.w,i.h,c.r):T.getRectByRect(i.w,i.h,c.r),d=r.setMoveRange(v.x,v.y,v.x+v.w,v.y+v.h,l,h),m=Object(A["a"])(d,4),f=m[0],g=m[1],p=m[2],y=m[3];r.doAnimation(f,g,p,y,0)}this._animation(o,n,a,s)}},{key:"setResize",value:function(t){t||this.touchEnd(),this.resize=t,this._draw(this.maskRect,!1,this)}},{key:"getResize",value:function(){return this.resize}},{key:"clip",value:function(t,e,i){var o=this.root.getEventList("PhotoMain");if(!o||!o.originalImg||!o.img)return null;var n,a=o.originalImg,s=o.showRect,r=this.maskRect;if(t){var c=r.w/r.h;n=c<1?t*c/r.w:t/r.w}else n=a.width/s.w;var h=Math.round(r.w*n),u=Math.round(r.h*n),l={x:(s.x-s.w/2)*n,y:(s.y-s.h/2)*n,w:s.w*n,h:s.h*n,r:s.r,sV:s.sV,sH:s.sH},v=this._isRound?T.clipByRound(a,h,u,l,e,i):T.clipBy(a,h,u,l,e,i);return{src:v,file:T.base64ToBlob(v)}}},{key:"_getMaskRect",value:function(){var t,e,i=this.width/this.height,o=this.root.drawWidth/this.root.drawHeight;return i=a-i-o&&t<=a+i&&e>=s-i-o&&e<=s+i?"Top Left":t>=a+r-i-o&&t<=a+r+i&&e>=s-i-o&&e<=s+i?"Top Right":t>=a-i-o&&t<=a+i&&e>=s+c-i-o&&e<=s+c+i?"Bottom Left":t>=a+r-i-o&&t<=a+r+i&&e>=s+c-i-o&&e<=s+c+i?"Bottom Right":t>=a&&t<=a+r&&e>=s-i-o&&e<=s+i?"Top":t>=a-i-o&&t<=a+i&&e>=s&&e<=s+c?"Left":t>=a+r-i-o&&t<=a+r+i&&e>=s&&e<=s+c?"Right":t>=a&&t<=a+r&&e>=s+c-i-o&&e<=s+c+i?"Bottom":void 0}},{key:"touchStart",value:function(t){if(this.resize&&null===this.touche){var e=t[0];this.touchePosition=this._isHover(e.x,e.y),this.touchePosition&&(this.root.setPriority(this),this.touche=e,this._draw(this.maskRect,!0,this))}}},{key:"touchEnd",value:function(){null!==this.touche&&this.touchePosition&&(this.touche=null,this.maskRect.w<0&&(this.maskRect.x+=this.maskRect.w,this.maskRect.w*=-1),this.maskRect.h<0&&(this.maskRect.y+=this.maskRect.h,this.maskRect.h*=-1),this.reset(this.maskRect.w,this.maskRect.h),this.root.deletePriority(this.className),this.touchePosition=void 0,this._draw(this.maskRect,!1,this),this.root.cursor="default")}},{key:"touchMove",value:function(t){var e=this;if(this.resize&&null!==this.touche&&this.touchePosition){var i=this.touche.id,o=t.find((function(t){return t.id===i}));o&&(this.touchePosition.split(" ").forEach((function(t){switch(t){case"Top":e._moveTop(o);break;case"Bottom":e._moveBottom(o);break;case"Left":e._moveLeft(o);break;case"Right":e._moveRight(o);break}})),this.touche=o,this._draw(this.maskRect,!0,this))}else if(this.resize){var n=this._isHover(t[0].x,t[0].y);this.root.cursor=n&&K.get(n)||"move"}}},{key:"wheelStart",value:function(){}},{key:"wheelEnd",value:function(){}},{key:"wheelChange",value:function(){}},{key:"_moveTop",value:function(t){var e=t.y-this.touche.y;this.maskRect.y+=e,this.maskRect.h-=e}},{key:"_moveBottom",value:function(t){var e=t.y-this.touche.y;this.maskRect.h+=e}},{key:"_moveLeft",value:function(t){var e=t.x-this.touche.x;this.maskRect.x+=e,this.maskRect.w-=e}},{key:"_moveRight",value:function(t){var e=t.x-this.touche.x;this.maskRect.w+=e}},{key:"isRound",get:function(){return this._isRound},set:function(t){this._isRound=t,this._draw(this.maskRect,!1,this),this.reset(this.maskRect.w,this.maskRect.h)}}]),t}(),tt=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.mask=null,t.viewBox="0 0 0 0",t.drawWidth=0,t.drawHeight=0,t.round="M0,150 V+150 a150,150 0 1 0 0,-1",t.rect={x:0,y:0,width:0,height:0},t.border="10, 5",t.thisRound=!1,t.thisResize=!0,t}return Object(r["a"])(i,[{key:"watchWidth",value:function(t){this.mask&&this.mask.reset(t,this.height)}},{key:"watchHeight",value:function(t){this.mask&&this.mask.reset(this.width,t)}},{key:"watchIsRound",value:function(t){this.mask&&(this.mask.isRound=t)}},{key:"watchResize",value:function(t){this.mask&&this.mask.setResize(t)}},{key:"watchThisRound",value:function(t){this.mask&&this.mask.isRound!==t&&(this.mask.isRound=t)}},{key:"watchThisResize",value:function(t){this.mask&&this.mask.getResize()!==t&&this.mask.setResize(t)}},{key:"mounted",value:function(){var t=this;this.thisRound=this.isRound,this.thisResize=this.resize,setTimeout((function(){t.viewBox="0 0 ".concat(t.photoRoot.drawWidth," ").concat(t.photoRoot.drawHeight),t.drawWidth=t.photoRoot.drawWidth,t.drawHeight=t.photoRoot.drawHeight,t.mask=new Q(t.photoRoot,t.width,t.height,t.resize,(function(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0;t.setPathOption(e,i,o)})),t.mask.isRound=t.isRound}),0)}},{key:"setPathOption",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;this.thisRound=i.isRound,this.thisResize=i.getResize();var o=t.x,n=t.y,a=t.w,s=t.h;o+=this.photoRoot.core.x,n+=this.photoRoot.core.y,a<0&&(o+=a,a*=-1),s<0&&(n+=s,s*=-1);var r=a/2,c=s/2;this.thisRound?this.round="M".concat(o,",").concat(n+c," a").concat(r,",").concat(c," 0 1 0 0,-1"):this.round="M".concat(o,",").concat(n," H").concat(a+o," V").concat(s+n," H").concat(o," V").concat(n),this.rect={x:o,y:n,width:a,height:s},this.border=e?"10, 0":"10, 5"}},{key:"TLHorn",get:function(){var t=this.rect.x,e=this.rect.y;return"M".concat(t,",").concat(e," H").concat(t," V").concat(e+15," H").concat(t-5," V").concat(e+15," H").concat(t-5," V").concat(e-5," H").concat(t+15," V").concat(e-5," H").concat(t+15," V").concat(e," Z")}},{key:"TRHorn",get:function(){var t=this.rect.x+this.rect.width,e=this.rect.y;return"M".concat(t,",").concat(e," H").concat(t," V").concat(e+15," H").concat(t+5," V").concat(e+15," H").concat(t+5," V").concat(e-5," H").concat(t-15," V").concat(e-5," H").concat(t-15," V").concat(e," Z")}},{key:"BLHorn",get:function(){var t=this.rect.x,e=this.rect.y+this.rect.height;return"M".concat(t,",").concat(e," H").concat(t," V").concat(e-15," H").concat(t-5," V").concat(e-15," H").concat(t-5," V").concat(e+5," H").concat(t+15," V").concat(e+5," H").concat(t+15," V").concat(e," Z")}},{key:"BRHorn",get:function(){var t=this.rect.x+this.rect.width,e=this.rect.y+this.rect.height;return"M".concat(t,",").concat(e," H").concat(t," V").concat(e-15," H").concat(t+5," V").concat(e-15," H").concat(t+5," V").concat(e+5," H").concat(t-15," V").concat(e+5," H").concat(t-15," V").concat(e," Z")}}]),i}(l["h"]);Object(u["a"])([Object(l["c"])({from:"vuePictureCut",default:"photoRoot"})],tt.prototype,"photoRoot",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"rgba(0,0,0,.5)"})],tt.prototype,"color",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"#ff5500"})],tt.prototype,"borderColor",void 0),Object(u["a"])([Object(l["d"])({type:Number,default:1})],tt.prototype,"width",void 0),Object(u["a"])([Object(l["d"])({type:Number,default:1})],tt.prototype,"height",void 0),Object(u["a"])([Object(l["d"])({type:Boolean,default:!1})],tt.prototype,"isRound",void 0),Object(u["a"])([Object(l["d"])({type:Boolean,default:!0})],tt.prototype,"resize",void 0),Object(u["a"])([Object(l["i"])("width")],tt.prototype,"watchWidth",null),Object(u["a"])([Object(l["i"])("height")],tt.prototype,"watchHeight",null),Object(u["a"])([Object(l["i"])("isRound")],tt.prototype,"watchIsRound",null),Object(u["a"])([Object(l["i"])("resize")],tt.prototype,"watchResize",null),Object(u["a"])([Object(l["i"])("thisRound")],tt.prototype,"watchThisRound",null),Object(u["a"])([Object(l["i"])("thisResize")],tt.prototype,"watchThisResize",null),tt=Object(u["a"])([l["a"]],tt);var et=tt,it=et,ot=(i("ce31"),Object(w["a"])(it,Z,G,!1,null,"4688c320",null)),nt=ot.exports,at=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.loading=!1,t.hasMenu=!1,t.sliderAngle=0,t.photoRoot=new B,t.vuePictureCut=t.photoRoot,t}return Object(r["a"])(i,[{key:"watchSrc",value:function(t){t&&this.setImg()}},{key:"watchInitAngle",value:function(t){if(void 0!==t){var e=this.photoRoot.getEventList("PhotoMain");if(e){var i=(e.showRect.r+t)%360;this.sliderAngle=i>180?i-360:i<-180?i+360:i}}}},{key:"watchSliderAngle",value:function(t){var e=this.photoRoot.getEventList("PhotoMain");e&&e.setAngle(parseInt(t))}},{key:"created",value:function(){this.watchInitAngle(this.initAngle),this.$slots.menu&&(this.hasMenu=!0)}},{key:"mounted",value:function(){var t=this;this.photoRoot.init(this.main,this.magnification),setTimeout((function(){t.setImg()}),0)}},{key:"onChangeEvent",value:function(t,e){return{blob:t,base64:e}}},{key:"setImg",value:function(){var t=this.photoRoot.getEventList("PhotoMain"),e=this.src;e&&t&&t.setSrc(e,this.initAngle),void 0!==this.initAngle&&(this.sliderAngle=this.initAngle%180)}},{key:"sureCut",value:function(){var t=this.photoRoot.getEventList("PhotoMask");if(t){var e=t.clip(this.maxPixel,this.encoderOptions,this.format);e&&this.onChangeEvent(e.file,e.src)}}},{key:"scale",value:function(t){var e=this.photoRoot.getEventList("PhotoMain");null===e||void 0===e||e.scale(t)}},{key:"thickness",get:function(){return void 0===this.menuThickness||this.menuThickness<0?this.hasMenu?120:50:this.menuThickness}},{key:"mainPosition",get:function(){var t=this.thickness+"px",e={top:"0",left:"0",right:"0",bottom:"0"};return"top"===this.menuPosition?e.top=t:"left"===this.menuPosition?e.left=t:"right"===this.menuPosition?e.right=t:e.bottom=t,e}},{key:"memuPosition",get:function(){var t=this.thickness+"px";return"top"===this.menuPosition?{top:"0",left:"0",right:"0",height:t}:"left"===this.menuPosition?{top:"0",left:"0",bottom:"0",width:t}:"right"===this.menuPosition?{top:"0",right:"0",bottom:"0",width:t}:{left:"0",right:"0",bottom:"0",height:t}}}]),i}(l["h"]);Object(u["a"])([Object(l["d"])({type:String,required:!1})],at.prototype,"backgroundColor",void 0),Object(u["a"])([Object(l["d"])({type:Number,default:1.5})],at.prototype,"magnification",void 0),Object(u["a"])([Object(l["d"])({type:String,default:null})],at.prototype,"src",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],at.prototype,"initAngle",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],at.prototype,"maxPixel",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],at.prototype,"encoderOptions",void 0),Object(u["a"])([Object(l["d"])({type:String,required:!1})],at.prototype,"format",void 0),Object(u["a"])([Object(l["d"])({type:Object,default:function(){return{width:1,height:1,isRound:!1,resize:!0}}})],at.prototype,"mskOption",void 0),Object(u["a"])([Object(l["d"])({type:Boolean,required:!1})],at.prototype,"rotateControl",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],at.prototype,"menuThickness",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"bottom"})],at.prototype,"menuPosition",void 0),Object(u["a"])([Object(l["g"])()],at.prototype,"main",void 0),Object(u["a"])([Object(l["f"])()],at.prototype,"vuePictureCut",void 0),Object(u["a"])([Object(l["i"])("src")],at.prototype,"watchSrc",null),Object(u["a"])([Object(l["i"])("initAngle")],at.prototype,"watchInitAngle",null),Object(u["a"])([Object(l["i"])("sliderAngle")],at.prototype,"watchSliderAngle",null),Object(u["a"])([Object(l["b"])("on-change")],at.prototype,"onChangeEvent",null),at=Object(u["a"])([Object(l["a"])({components:{VuePictureCutCanvas:U,VuePictureCutMask:nt}})],at);var st=at,rt=st,ct=(i("f08b"),Object(w["a"])(rt,R,_,!1,null,null,null)),ht=ct.exports,ut=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"vue-picture-cut-menu dark-theme",class:[["default","dark","gray"].indexOf(t.theme)>-1?t.theme+"-theme":"default-theme"]},[i("div",{staticClass:"vue-picture-cut-menu_slider"},[i("div",{staticClass:"vue-picture-cut-menu_slider-box"},[i("span",[t._v(t._s(t.menuRotateName))]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.sliderAngle,expression:"sliderAngle"}],attrs:{type:"range",min:-180,max:180},domProps:{value:t.sliderAngle},on:{__r:function(e){t.sliderAngle=e.target.value}}}),i("div",{staticClass:"vue-picture-cut-menu_slider-box-bar"},[i("div",{staticClass:"vue-picture-cut-menu_slider-box-button",style:{left:100*t.sliderAngle/361+50+"%"}},[i("div",{staticClass:"vue-picture-cut-menu_slider-box-tips"},[t._v(" "+t._s(t.sliderAngle)+"° ")])])])])]),i("div",{staticClass:"vue-picture-cut-menu_box"},[i("div",{staticClass:"vue-picture-cut-menu_box-content"},[i("div",{staticClass:"vue-picture-cut-menu_box-list",staticStyle:{width:"558px"}},[i("div",{staticClass:"vue-picture-cut-menu_box-item v-p-icon_flip-v",on:{click:t.setFlipV}}),i("div",{staticClass:"vue-picture-cut-menu_box-item v-p-icon_flip-h",on:{click:t.setFlipH}}),i("span"),i("div",{staticClass:"vue-picture-cut-menu_box-item v-p-icon_rotate-left",on:{click:function(e){return t.rotate(90,!0)}}}),i("div",{staticClass:"vue-picture-cut-menu_box-item v-p-icon_rotate-right",on:{click:function(e){return t.rotate(-90,!0)}}}),i("span"),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:t.setMaskResize}},[i("div",{staticClass:"__mask"},[t._v(t._s(t.sizeAutoName))])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:t.setMaskSizeToOriginal}},[i("div",{staticClass:"__mask"},[t._v(t._s(t.sizeRawName))])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(1,1)}}},[i("div",{staticClass:"__mask"},[t._v("1:1")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(4,3)}}},[i("div",{staticClass:"__mask _5_4"},[t._v("4:3")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(3,4)}}},[i("div",{staticClass:"__mask _4_5"},[t._v("3:4")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(16,9)}}},[i("div",{staticClass:"__mask _5_4"},[t._v("16:9")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(9,16)}}},[i("div",{staticClass:"__mask _4_5"},[t._v("9:16")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(3,2)}}},[i("div",{staticClass:"__mask _5_4"},[t._v("3:2")])]),i("div",{staticClass:"vue-picture-cut-menu_box-item __mask",on:{click:function(e){return t.setMaskSize(2,3)}}},[i("div",{staticClass:"__mask _4_5"},[t._v("2:3")])])])])]),i("div",{staticClass:"vue-picture-cut-menu_confirm",staticStyle:{"max-width":"558px"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.cancel,expression:"cancel"}],staticClass:"__cancel",on:{click:t.onCancelEvent}},[t._v(t._s(t.cancelName))]),i("div",{staticClass:"__sure",class:{__center:!t.cancel},on:{click:t.sureCut}},[t._v(t._s(t.confirmName))])])])},lt=[],vt=function(t){Object(c["a"])(i,t);var e=Object(h["a"])(i);function i(){var t;return Object(s["a"])(this,i),t=e.apply(this,arguments),t.sliderAngle=0,t}return Object(r["a"])(i,[{key:"watchSliderAngle",value:function(t){if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMain");e&&e.setAngle(parseInt(t))}}},{key:"onChangeEvent",value:function(t,e){return{blob:t,base64:e}}},{key:"onCancelEvent",value:function(){}},{key:"sureCut",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMask");if(t){var e=t.clip(this.maxPixel,this.encoderOptions,this.format);e&&this.onChangeEvent(e.file,e.src)}}}},{key:"setMaskSize",value:function(t,e){if(this.photoRoot){var i=this.photoRoot.getEventList("PhotoMask");i&&(i.reset(t,e),i.setResize(!1))}}},{key:"setMaskSizeToOriginal",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMain");t&&this.setMaskSize(t.imgRect.w,t.imgRect.h)}}},{key:"setMaskResize",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.photoRoot){var e=this.photoRoot.getEventList("PhotoMask");e&&e.setResize(t)}}},{key:"rotate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.photoRoot&&t%360!==0){var i=this.photoRoot.getEventList("PhotoMain");if(i){var o=(i.showRect.r+t)%360;this.sliderAngle=o>180?o-360:o<-180?o+360:o,i.setAngle(i.showRect.r+t,e)}}}},{key:"setFlipV",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMain");t&&t.setFlipV(1===t.showRect.sV,!0)}}},{key:"setFlipH",value:function(){if(this.photoRoot){var t=this.photoRoot.getEventList("PhotoMain");t&&t.setFlipH(1===t.showRect.sH,!0)}}},{key:"photoRoot",get:function(){return this.root?this.root.photoRoot:this.pRoot}}]),i}(l["h"]);Object(u["a"])([Object(l["c"])({from:"vuePictureCut",default:"photoRoot"})],vt.prototype,"pRoot",void 0),Object(u["a"])([Object(l["d"])({type:Object,required:!1})],vt.prototype,"root",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"default"})],vt.prototype,"theme",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],vt.prototype,"maxPixel",void 0),Object(u["a"])([Object(l["d"])({type:Number,required:!1})],vt.prototype,"encoderOptions",void 0),Object(u["a"])([Object(l["d"])({type:String,required:!1})],vt.prototype,"format",void 0),Object(u["a"])([Object(l["d"])({type:Boolean,default:!0})],vt.prototype,"cancel",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"Cancel"})],vt.prototype,"cancelName",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"Ok"})],vt.prototype,"confirmName",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"auto"})],vt.prototype,"sizeAutoName",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"raw"})],vt.prototype,"sizeRawName",void 0),Object(u["a"])([Object(l["d"])({type:String,default:"Rotate"})],vt.prototype,"menuRotateName",void 0),Object(u["a"])([Object(l["i"])("sliderAngle")],vt.prototype,"watchSliderAngle",null),Object(u["a"])([Object(l["b"])("on-change")],vt.prototype,"onChangeEvent",null),Object(u["a"])([Object(l["b"])("on-cancel")],vt.prototype,"onCancelEvent",null),vt=Object(u["a"])([l["a"]],vt);var dt=vt,mt=dt,ft=(i("57f5"),Object(w["a"])(mt,ut,lt,!1,null,null,null)),gt=ft.exports,pt={install:function(t){t.component("vue-picture-cut",ht),t.component("vue-picture-cut-mask",nt),t.component("vue-picture-cut-menu",gt)}},yt=i("5c96"),wt=i.n(yt);i("0fae");o["default"].config.productionTip=!1,o["default"].use(pt),o["default"].use(wt.a,{size:"mini"}),new o["default"]({el:"#app",render:function(t){return t(k)}}).$mount("#app")},ce31:function(t,e,i){"use strict";var o=i("6429"),n=i.n(o);n.a},f08b:function(t,e,i){"use strict";var o=i("3aa3"),n=i.n(o);n.a}}); \ No newline at end of file diff --git a/lib/vue-picture-cut.common.js b/lib/vue-picture-cut.common.js index 7cb9184..6bccab3 100644 --- a/lib/vue-picture-cut.common.js +++ b/lib/vue-picture-cut.common.js @@ -11253,6 +11253,7 @@ var vue_picture_cut_menu_component = normalizeComponent( + /** * 二次包装工具类 * 简化api,方便自定义菜单等 @@ -11364,6 +11365,23 @@ var Utils_Utils = /*#__PURE__*/function () { var main = this.photoRoot.getEventList('PhotoMain'); main === null || main === void 0 ? void 0 : main.setAngle(main.showRect.r + angle, animation); } + /** + * 图片旋转到指定角度 + * @param angle 逆时针角度 + * @param animation 是否动画 + */ + + }, { + key: "rotateTo", + value: function rotateTo(angle) { + var animation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (!this.photoRoot) return; + var main = this.photoRoot.getEventList('PhotoMain'); + + if (main && main.showRect.r + angle % 360) { + main.setAngle(angle, animation); + } + } /** * 设置图片垂直翻转 * @param animation 是否动画 @@ -11418,7 +11436,11 @@ var Utils_Utils = /*#__PURE__*/function () { return Utils; }(); function createUtils(cut) { - return new Utils_Utils(cut); + if (!cut || !cut.photoRoot) { + throw new Error("createUtils\u9700\u8981\u4E00\u4E2A\u4E3AVuePictureCut\u5B9E\u4F8B\u7684\u53C2\u6570\uFF0C\u4F46\u662F\u5F53\u524D\u5F97\u5230\u7684\u662F".concat(cut, "!\n\n \"createUtils\" requires an argument for the \"VuePictureCut\" instance, but the current result is ").concat(cut, "!")); + } else { + return new Utils_Utils(cut); + } } // CONCATENATED MODULE: ./src/lib/index.ts diff --git a/lib/vue-picture-cut.umd.js b/lib/vue-picture-cut.umd.js index b5add04..2635bed 100644 --- a/lib/vue-picture-cut.umd.js +++ b/lib/vue-picture-cut.umd.js @@ -11262,6 +11262,7 @@ var vue_picture_cut_menu_component = normalizeComponent( + /** * 二次包装工具类 * 简化api,方便自定义菜单等 @@ -11373,6 +11374,23 @@ var Utils_Utils = /*#__PURE__*/function () { var main = this.photoRoot.getEventList('PhotoMain'); main === null || main === void 0 ? void 0 : main.setAngle(main.showRect.r + angle, animation); } + /** + * 图片旋转到指定角度 + * @param angle 逆时针角度 + * @param animation 是否动画 + */ + + }, { + key: "rotateTo", + value: function rotateTo(angle) { + var animation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (!this.photoRoot) return; + var main = this.photoRoot.getEventList('PhotoMain'); + + if (main && main.showRect.r + angle % 360) { + main.setAngle(angle, animation); + } + } /** * 设置图片垂直翻转 * @param animation 是否动画 @@ -11427,7 +11445,11 @@ var Utils_Utils = /*#__PURE__*/function () { return Utils; }(); function createUtils(cut) { - return new Utils_Utils(cut); + if (!cut || !cut.photoRoot) { + throw new Error("createUtils\u9700\u8981\u4E00\u4E2A\u4E3AVuePictureCut\u5B9E\u4F8B\u7684\u53C2\u6570\uFF0C\u4F46\u662F\u5F53\u524D\u5F97\u5230\u7684\u662F".concat(cut, "!\n\n \"createUtils\" requires an argument for the \"VuePictureCut\" instance, but the current result is ").concat(cut, "!")); + } else { + return new Utils_Utils(cut); + } } // CONCATENATED MODULE: ./src/lib/index.ts diff --git a/lib/vue-picture-cut.umd.min.js b/lib/vue-picture-cut.umd.min.js index d87a52b..7bb5339 100644 --- a/lib/vue-picture-cut.umd.min.js +++ b/lib/vue-picture-cut.umd.min.js @@ -1,4 +1,4 @@ -(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-picture-cut"]=e(require("vue")):t["vue-picture-cut"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"00ee":function(t,e,n){var r=n("b622"),i=r("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"0538":function(t,e,n){"use strict";var r=n("1c0b"),i=n("861d"),o=[].slice,a={},c=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i1||"".split(/.?/).length?function(t,n){var r=String(a(this)),o=void 0===n?p:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,o);var c,s,u,f=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,y=new RegExp(t.source,l+"g");while(c=h.call(y,r)){if(s=y.lastIndex,s>v&&(f.push(r.slice(v,c.index)),c.length>1&&c.index=o))break;y.lastIndex===c.index&&y.lastIndex++}return v===r.length?!u&&y.test("")||f.push(""):f.push(r.slice(v)),f.length>o?f.slice(0,o):f}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=a(this),o=void 0==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var a=n(r,t,this,i,r!==e);if(a.done)return a.value;var h=o(t),l=String(this),d=c(h,RegExp),g=h.unicode,m=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(y?"y":"g"),b=new d(y?h:"^(?:"+h.source+")",m),w=void 0===i?p:i>>>0;if(0===w)return[];if(0===l.length)return null===f(b,l)?[l]:[];var x=0,R=0,_=[];while(R2?arguments[2]:void 0,h=a((void 0===f?c:i(f,c))-u,c-s),l=1;u0)u in n?n[s]=n[u]:delete n[s],s+=l,u+=l;return n}},"14c3":function(t,e,n){var r=n("c6b6"),i=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"159b":function(t,e,n){var r=n("da84"),i=n("fdbc"),o=n("17c2"),a=n("9112");for(var c in i){var s=r[c],u=s&&s.prototype;if(u&&u.forEach!==o)try{a(u,"forEach",o)}catch(f){u.forEach=o}}},"170b":function(t,e,n){"use strict";var r=n("ebb5"),i=n("50c4"),o=n("23cb"),a=n("4840"),c=r.aTypedArray,s=r.exportTypedArrayMethod;s("subarray",(function(t,e){var n=c(this),r=n.length,s=o(t,r);return new(a(n,n.constructor))(n.buffer,n.byteOffset+s*n.BYTES_PER_ELEMENT,i((void 0===e?r:o(e,r))-s))}))},"17c2":function(t,e,n){"use strict";var r=n("b727").forEach,i=n("a640"),o=n("ae40"),a=i("forEach"),c=o("forEach");t.exports=a&&c?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},"182d":function(t,e,n){var r=n("f8cd");t.exports=function(t,e){var n=r(t);if(n%e)throw RangeError("Wrong offset");return n}},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var r=n("b622"),i=r("iterator"),o=!1;try{var a=0,c={next:function(){return{done:!!a++}},return:function(){o=!0}};c[i]=function(){return this},Array.from(c,(function(){throw 2}))}catch(s){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(s){}return n}},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var r=n("d039"),i=n("b622"),o=n("2d00"),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[],n=e.constructor={};return n[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"219c":function(t,e,n){"use strict";var r=n("ebb5"),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=[].sort;o("sort",(function(t){return a.call(i(this),t)}))},2266:function(t,e,n){var r=n("825a"),i=n("e95a"),o=n("50c4"),a=n("0366"),c=n("35a1"),s=n("9bdd"),u=function(t,e){this.stopped=t,this.result=e},f=t.exports=function(t,e,n,f,h){var l,d,v,p,y,g,m,b=a(e,n,f?2:1);if(h)l=t;else{if(d=c(t),"function"!=typeof d)throw TypeError("Target is not iterable");if(i(d)){for(v=0,p=o(t.length);p>v;v++)if(y=f?b(r(m=t[v])[0],m[1]):b(t[v]),y&&y instanceof u)return y;return new u(!1)}l=d.call(t)}g=l.next;while(!(m=g.call(l)).done)if(y=s(l,b,m.value,f),"object"==typeof y&&y&&y instanceof u)return y;return new u(!1)};f.stop=function(t){return new u(!0,t)}},"23cb":function(t,e,n){var r=n("a691"),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},"23e7":function(t,e,n){var r=n("da84"),i=n("06cf").f,o=n("9112"),a=n("6eeb"),c=n("ce4e"),s=n("e893"),u=n("94ca");t.exports=function(t,e){var n,f,h,l,d,v,p=t.target,y=t.global,g=t.stat;if(f=y?r:g?r[p]||c(p,{}):(r[p]||{}).prototype,f)for(h in e){if(d=e[h],t.noTargetGet?(v=i(f,h),l=v&&v.value):l=f[h],n=u(y?h:p+(g?".":"#")+h,t.forced),!n&&void 0!==l){if(typeof d===typeof l)continue;s(d,l)}(t.sham||l&&l.sham)&&o(d,"sham",!0),a(f,h,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),i=n("7839"),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},"25a1":function(t,e,n){"use strict";var r=n("ebb5"),i=n("d58f").right,o=r.aTypedArray,a=r.exportTypedArrayMethod;a("reduceRight",(function(t){return i(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},"25f0":function(t,e,n){"use strict";var r=n("6eeb"),i=n("825a"),o=n("d039"),a=n("ad6d"),c="toString",s=RegExp.prototype,u=s[c],f=o((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),h=u.name!=c;(f||h)&&r(RegExp.prototype,c,(function(){var t=i(this),e=String(t.source),n=t.flags,r=String(void 0===n&&t instanceof RegExp&&!("flags"in s)?a.call(t):n);return"/"+e+"/"+r}),{unsafe:!0})},2626:function(t,e,n){"use strict";var r=n("d066"),i=n("9bf2"),o=n("b622"),a=n("83ab"),c=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},2954:function(t,e,n){"use strict";var r=n("ebb5"),i=n("4840"),o=n("d039"),a=r.aTypedArray,c=r.aTypedArrayConstructor,s=r.exportTypedArrayMethod,u=[].slice,f=o((function(){new Int8Array(1).slice()}));s("slice",(function(t,e){var n=u.call(a(this),t,e),r=i(this,this.constructor),o=0,s=n.length,f=new(c(r))(s);while(s>o)f[o]=n[o++];return f}),f)},"2d00":function(t,e,n){var r,i,o=n("da84"),a=n("342f"),c=o.process,s=c&&c.versions,u=s&&s.v8;u?(r=u.split("."),i=r[0]+r[1]):a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(i=r[1]))),t.exports=i&&+i},3280:function(t,e,n){"use strict";var r=n("ebb5"),i=n("e58c"),o=r.aTypedArray,a=r.exportTypedArrayMethod;a("lastIndexOf",(function(t){return i.apply(o(this),arguments)}))},3410:function(t,e,n){var r=n("23e7"),i=n("d039"),o=n("7b0b"),a=n("e163"),c=n("e177"),s=i((function(){a(1)}));r({target:"Object",stat:!0,forced:s,sham:!c},{getPrototypeOf:function(t){return a(o(t))}})},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"35a1":function(t,e,n){var r=n("f5df"),i=n("3f8c"),o=n("b622"),a=o("iterator");t.exports=function(t){if(void 0!=t)return t[a]||t["@@iterator"]||i[r(t)]}},"37e8":function(t,e,n){var r=n("83ab"),i=n("9bf2"),o=n("825a"),a=n("df75");t.exports=r?Object.defineProperties:function(t,e){o(t);var n,r=a(e),c=r.length,s=0;while(c>s)i.f(t,n=r[s++],e[n]);return t}},"3a7b":function(t,e,n){"use strict";var r=n("ebb5"),i=n("b727").findIndex,o=r.aTypedArray,a=r.exportTypedArrayMethod;a("findIndex",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},"3aa3":function(t,e,n){},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3c5d":function(t,e,n){"use strict";var r=n("ebb5"),i=n("50c4"),o=n("182d"),a=n("7b0b"),c=n("d039"),s=r.aTypedArray,u=r.exportTypedArrayMethod,f=c((function(){new Int8Array(1).set({})}));u("set",(function(t){s(this);var e=o(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=a(t),c=i(r.length),u=0;if(c+e>n)throw RangeError("Wrong length");while(u=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},"3fcc":function(t,e,n){"use strict";var r=n("ebb5"),i=n("b727").map,o=n("4840"),a=r.aTypedArray,c=r.aTypedArrayConstructor,s=r.exportTypedArrayMethod;s("map",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(c(o(t,t.constructor)))(e)}))}))},4160:function(t,e,n){"use strict";var r=n("23e7"),i=n("17c2");r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),i=n("c6b6"),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),i=n("7c73"),o=n("9bf2"),a=r("unscopables"),c=Array.prototype;void 0==c[a]&&o.f(c,a,{configurable:!0,value:i(null)}),t.exports=function(t){c[a][t]=!0}},"44e7":function(t,e,n){var r=n("861d"),i=n("c6b6"),o=n("b622"),a=o("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==i(t))}},4840:function(t,e,n){var r=n("825a"),i=n("1c0b"),o=n("b622"),a=o("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||void 0==(n=r(o)[a])?e:i(n)}},4930:function(t,e,n){var r=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"4ae1":function(t,e,n){var r=n("23e7"),i=n("d066"),o=n("1c0b"),a=n("825a"),c=n("861d"),s=n("7c73"),u=n("0538"),f=n("d039"),h=i("Reflect","construct"),l=f((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),d=!f((function(){h((function(){}))})),v=l||d;r({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(d&&!l)return h(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var i=n.prototype,f=s(c(i)?i:Object.prototype),v=Function.apply.call(t,f,e);return c(v)?v:f}})},"4d64":function(t,e,n){var r=n("fc6a"),i=n("50c4"),o=n("23cb"),a=function(t){return function(e,n,a){var c,s=r(e),u=i(s.length),f=o(a,u);if(t&&n!=n){while(u>f)if(c=s[f++],c!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").filter,o=n("1dde"),a=n("ae40"),c=o("filter"),s=a("filter");r({target:"Array",proto:!0,forced:!c||!s},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,e,n){"use strict";var r=n("0366"),i=n("7b0b"),o=n("9bdd"),a=n("e95a"),c=n("50c4"),s=n("8418"),u=n("35a1");t.exports=function(t){var e,n,f,h,l,d,v=i(t),p="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,m=void 0!==g,b=u(v),w=0;if(m&&(g=r(g,y>2?arguments[2]:void 0,2)),void 0==b||p==Array&&a(b))for(e=c(v.length),n=new p(e);e>w;w++)d=m?g(v[w],w):v[w],s(n,w,d);else for(h=b.call(v),l=h.next,n=new p;!(f=l.call(h)).done;w++)d=m?o(h,g,[f.value,w],!0):f.value,s(n,w,d);return n.length=w,n}},"4ec9":function(t,e,n){"use strict";var r=n("6d61"),i=n("6566");t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},"50c4":function(t,e,n){var r=n("a691"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"55c6":function(t,e,n){},5692:function(t,e,n){var r=n("c430"),i=n("c6cd");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),i=n("241c"),o=n("7418"),a=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},"57f5":function(t,e,n){"use strict";var r=n("55c6"),i=n.n(r);i.a},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("1d80"),i=n("5899"),o="["+i+"]",a=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(c,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5cc6":function(t,e,n){var r=n("74e8");r("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},"5f96":function(t,e,n){"use strict";var r=n("ebb5"),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=[].join;o("join",(function(t){return a.apply(i(this),arguments)}))},"60bd":function(t,e,n){"use strict";var r=n("da84"),i=n("ebb5"),o=n("e260"),a=n("b622"),c=a("iterator"),s=r.Uint8Array,u=o.values,f=o.keys,h=o.entries,l=i.aTypedArray,d=i.exportTypedArrayMethod,v=s&&s.prototype[c],p=!!v&&("values"==v.name||void 0==v.name),y=function(){return u.call(l(this))};d("entries",(function(){return h.call(l(this))})),d("keys",(function(){return f.call(l(this))})),d("values",y,!p),d(c,y,!p)},"621a":function(t,e,n){"use strict";var r=n("da84"),i=n("83ab"),o=n("a981"),a=n("9112"),c=n("e2cc"),s=n("d039"),u=n("19aa"),f=n("a691"),h=n("50c4"),l=n("0b25"),d=n("77a7"),v=n("e163"),p=n("d2bb"),y=n("241c").f,g=n("9bf2").f,m=n("81d5"),b=n("d44e"),w=n("69f3"),x=w.get,R=w.set,_="ArrayBuffer",k="DataView",E="prototype",S="Wrong length",A="Wrong index",O=r[_],P=O,T=r[k],M=T&&T[E],C=Object.prototype,j=r.RangeError,L=d.pack,I=d.unpack,N=function(t){return[255&t]},B=function(t){return[255&t,t>>8&255]},H=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},V=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},z=function(t){return L(t,23,4)},F=function(t){return L(t,52,8)},D=function(t,e){g(t[E],e,{get:function(){return x(this)[e]}})},U=function(t,e,n,r){var i=l(n),o=x(t);if(i+e>o.byteLength)throw j(A);var a=x(o.buffer).bytes,c=i+o.byteOffset,s=a.slice(c,c+e);return r?s:s.reverse()},W=function(t,e,n,r,i,o){var a=l(n),c=x(t);if(a+e>c.byteLength)throw j(A);for(var s=x(c.buffer).bytes,u=a+c.byteOffset,f=r(+i),h=0;hq;)(Y=X[q++])in P||a(P,Y,O[Y]);$.constructor=P}p&&v(M)!==C&&p(M,C);var J=new T(new P(2)),G=M.setInt8;J.setInt8(0,2147483648),J.setInt8(1,2147483649),!J.getInt8(0)&&J.getInt8(1)||c(M,{setInt8:function(t,e){G.call(this,t,e<<24>>24)},setUint8:function(t,e){G.call(this,t,e<<24>>24)}},{unsafe:!0})}else P=function(t){u(this,P,_);var e=l(t);R(this,{bytes:m.call(new Array(e),0),byteLength:e}),i||(this.byteLength=e)},T=function(t,e,n){u(this,T,k),u(t,P,k);var r=x(t).byteLength,o=f(e);if(o<0||o>r)throw j("Wrong offset");if(n=void 0===n?r-o:h(n),o+n>r)throw j(S);R(this,{buffer:t,byteLength:n,byteOffset:o}),i||(this.buffer=t,this.byteLength=n,this.byteOffset=o)},i&&(D(P,"byteLength"),D(T,"buffer"),D(T,"byteLength"),D(T,"byteOffset")),c(T[E],{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var e=U(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=U(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return V(U(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return V(U(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return I(U(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return I(U(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){W(this,1,t,N,e)},setUint8:function(t,e){W(this,1,t,N,e)},setInt16:function(t,e){W(this,2,t,B,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){W(this,2,t,B,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){W(this,4,t,H,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){W(this,4,t,H,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){W(this,4,t,z,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){W(this,8,t,F,e,arguments.length>2?arguments[2]:void 0)}});b(P,_),b(T,k),t.exports={ArrayBuffer:P,DataView:T}},6429:function(t,e,n){},"649e":function(t,e,n){"use strict";var r=n("ebb5"),i=n("b727").some,o=r.aTypedArray,a=r.exportTypedArrayMethod;a("some",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6547:function(t,e,n){var r=n("a691"),i=n("1d80"),o=function(t){return function(e,n){var o,a,c=String(i(e)),s=r(n),u=c.length;return s<0||s>=u?t?"":void 0:(o=c.charCodeAt(s),o<55296||o>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?t?c.charAt(s):o:t?c.slice(s,s+2):a-56320+(o-55296<<10)+65536)}};t.exports={codeAt:o(!1),charAt:o(!0)}},6566:function(t,e,n){"use strict";var r=n("9bf2").f,i=n("7c73"),o=n("e2cc"),a=n("0366"),c=n("19aa"),s=n("2266"),u=n("7dd0"),f=n("2626"),h=n("83ab"),l=n("f183").fastKey,d=n("69f3"),v=d.set,p=d.getterFor;t.exports={getConstructor:function(t,e,n,u){var f=t((function(t,r){c(t,f,e),v(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),h||(t.size=0),void 0!=r&&s(r,t[u],t,n)})),d=p(e),y=function(t,e,n){var r,i,o=d(t),a=g(t,e);return a?a.value=n:(o.last=a={index:i=l(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),h?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},g=function(t,e){var n,r=d(t),i=l(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return o(f.prototype,{clear:function(){var t=this,e=d(t),n=e.index,r=e.first;while(r)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;e.first=e.last=void 0,h?e.size=0:t.size=0},delete:function(t){var e=this,n=d(e),r=g(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),h?n.size--:e.size--}return!!r},forEach:function(t){var e,n=d(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);while(e=e?e.next:n.first){r(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!g(this,t)}}),o(f.prototype,n?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),h&&r(f.prototype,"size",{get:function(){return d(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",i=p(e),o=p(r);u(t,e,(function(t,e){v(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){var t=o(this),e=t.kind,n=t.last;while(n&&n.removed)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),f(e)}}},"65f0":function(t,e,n){var r=n("861d"),i=n("e8b5"),o=n("b622"),a=o("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?r(n)&&(n=n[a],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"69f3":function(t,e,n){var r,i,o,a=n("7f9a"),c=n("da84"),s=n("861d"),u=n("9112"),f=n("5135"),h=n("f772"),l=n("d012"),d=c.WeakMap,v=function(t){return o(t)?i(t):r(t,{})},p=function(t){return function(e){var n;if(!s(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(a){var y=new d,g=y.get,m=y.has,b=y.set;r=function(t,e){return b.call(y,t,e),e},i=function(t){return g.call(y,t)||{}},o=function(t){return m.call(y,t)}}else{var w=h("state");l[w]=!0,r=function(t,e){return u(t,w,e),e},i=function(t){return f(t,w)?t[w]:{}},o=function(t){return f(t,w)}}t.exports={set:r,get:i,has:o,enforce:v,getterFor:p}},"6d61":function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("94ca"),a=n("6eeb"),c=n("f183"),s=n("2266"),u=n("19aa"),f=n("861d"),h=n("d039"),l=n("1c7e"),d=n("d44e"),v=n("7156");t.exports=function(t,e,n){var p=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),g=p?"set":"add",m=i[t],b=m&&m.prototype,w=m,x={},R=function(t){var e=b[t];a(b,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(o(t,"function"!=typeof m||!(y||b.forEach&&!h((function(){(new m).entries().next()})))))w=n.getConstructor(e,t,p,g),c.REQUIRED=!0;else if(o(t,!0)){var _=new w,k=_[g](y?{}:-0,1)!=_,E=h((function(){_.has(1)})),S=l((function(t){new m(t)})),A=!y&&h((function(){var t=new m,e=5;while(e--)t[g](e,e);return!t.has(-0)}));S||(w=e((function(e,n){u(e,w,t);var r=v(new m,e,w);return void 0!=n&&s(n,r[g],r,p),r})),w.prototype=b,b.constructor=w),(E||A)&&(R("delete"),R("has"),p&&R("get")),(A||k)&&R(g),y&&b.clear&&delete b.clear}return x[t]=w,r({global:!0,forced:w!=m},x),d(w,t),y||n.setStrong(w,t,p),w}},"6eeb":function(t,e,n){var r=n("da84"),i=n("9112"),o=n("5135"),a=n("ce4e"),c=n("8925"),s=n("69f3"),u=s.get,f=s.enforce,h=String(String).split("String");(t.exports=function(t,e,n,c){var s=!!c&&!!c.unsafe,u=!!c&&!!c.enumerable,l=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),f(n).source=h.join("string"==typeof e?e:"")),t!==r?(s?!l&&t[e]&&(u=!0):delete t[e],u?t[e]=n:i(t,e,n)):u?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||c(this)}))},7156:function(t,e,n){var r=n("861d"),i=n("d2bb");t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},"72f7":function(t,e,n){"use strict";var r=n("ebb5").exportTypedArrayMethod,i=n("d039"),o=n("da84"),a=o.Uint8Array,c=a&&a.prototype||{},s=[].toString,u=[].join;i((function(){s.call({})}))&&(s=function(){return u.call(this)});var f=c.toString!=s;r("toString",s,f)},"735e":function(t,e,n){"use strict";var r=n("ebb5"),i=n("81d5"),o=r.aTypedArray,a=r.exportTypedArrayMethod;a("fill",(function(t){return i.apply(o(this),arguments)}))},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),i=n("5135"),o=n("e538"),a=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},"74e8":function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("83ab"),a=n("8aa7"),c=n("ebb5"),s=n("621a"),u=n("19aa"),f=n("5c6c"),h=n("9112"),l=n("50c4"),d=n("0b25"),v=n("182d"),p=n("c04e"),y=n("5135"),g=n("f5df"),m=n("861d"),b=n("7c73"),w=n("d2bb"),x=n("241c").f,R=n("a078"),_=n("b727").forEach,k=n("2626"),E=n("9bf2"),S=n("06cf"),A=n("69f3"),O=n("7156"),P=A.get,T=A.set,M=E.f,C=S.f,j=Math.round,L=i.RangeError,I=s.ArrayBuffer,N=s.DataView,B=c.NATIVE_ARRAY_BUFFER_VIEWS,H=c.TYPED_ARRAY_TAG,V=c.TypedArray,z=c.TypedArrayPrototype,F=c.aTypedArrayConstructor,D=c.isTypedArray,U="BYTES_PER_ELEMENT",W="Wrong length",Y=function(t,e){var n=0,r=e.length,i=new(F(t))(r);while(r>n)i[n]=e[n++];return i},$=function(t,e){M(t,e,{get:function(){return P(this)[e]}})},X=function(t){var e;return t instanceof I||"ArrayBuffer"==(e=g(t))||"SharedArrayBuffer"==e},q=function(t,e){return D(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},J=function(t,e){return q(t,e=p(e,!0))?f(2,t[e]):C(t,e)},G=function(t,e,n){return!(q(t,e=p(e,!0))&&m(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?M(t,e,n):(t[e]=n.value,t)};o?(B||(S.f=J,E.f=G,$(z,"buffer"),$(z,"byteOffset"),$(z,"byteLength"),$(z,"length")),r({target:"Object",stat:!0,forced:!B},{getOwnPropertyDescriptor:J,defineProperty:G}),t.exports=function(t,e,n){var o=t.match(/\d+$/)[0]/8,c=t+(n?"Clamped":"")+"Array",s="get"+t,f="set"+t,p=i[c],y=p,g=y&&y.prototype,E={},S=function(t,e){var n=P(t);return n.view[s](e*o+n.byteOffset,!0)},A=function(t,e,r){var i=P(t);n&&(r=(r=j(r))<0?0:r>255?255:255&r),i.view[f](e*o+i.byteOffset,r,!0)},C=function(t,e){M(t,e,{get:function(){return S(this,e)},set:function(t){return A(this,e,t)},enumerable:!0})};B?a&&(y=e((function(t,e,n,r){return u(t,y,c),O(function(){return m(e)?X(e)?void 0!==r?new p(e,v(n,o),r):void 0!==n?new p(e,v(n,o)):new p(e):D(e)?Y(y,e):R.call(y,e):new p(d(e))}(),t,y)})),w&&w(y,V),_(x(p),(function(t){t in y||h(y,t,p[t])})),y.prototype=g):(y=e((function(t,e,n,r){u(t,y,c);var i,a,s,f=0,h=0;if(m(e)){if(!X(e))return D(e)?Y(y,e):R.call(y,e);i=e,h=v(n,o);var p=e.byteLength;if(void 0===r){if(p%o)throw L(W);if(a=p-h,a<0)throw L(W)}else if(a=l(r)*o,a+h>p)throw L(W);s=a/o}else s=d(e),a=s*o,i=new I(a);T(t,{buffer:i,byteOffset:h,byteLength:a,length:s,view:new N(i)});while(f>1,y=23===e?i(2,-24)-i(2,-77):0,g=t<0||0===t&&1/t<0?1:0,m=0;for(t=r(t),t!=t||t===n?(f=t!=t?1:0,u=v):(u=o(a(t)/c),t*(h=i(2,-u))<1&&(u--,h*=2),t+=u+p>=1?y/h:y*i(2,1-p),t*h>=2&&(u++,h/=2),u+p>=v?(f=0,u=v):u+p>=1?(f=(t*h-1)*i(2,e),u+=p):(f=t*i(2,p-1)*i(2,e),u=0));e>=8;l[m++]=255&f,f/=256,e-=8);for(u=u<0;l[m++]=255&u,u/=256,d-=8);return l[--m]|=128*g,l},u=function(t,e){var r,o=t.length,a=8*o-e-1,c=(1<>1,u=a-7,f=o-1,h=t[f--],l=127&h;for(h>>=7;u>0;l=256*l+t[f],f--,u-=8);for(r=l&(1<<-u)-1,l>>=-u,u+=e;u>0;r=256*r+t[f],f--,u-=8);if(0===l)l=1-s;else{if(l===c)return r?NaN:h?-n:n;r+=i(2,e),l-=s}return(h?-1:1)*r*i(2,l-e)};t.exports={pack:s,unpack:u}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,i=n("825a"),o=n("37e8"),a=n("7839"),c=n("d012"),s=n("1be4"),u=n("cc12"),f=n("f772"),h=">",l="<",d="prototype",v="script",p=f("IE_PROTO"),y=function(){},g=function(t){return l+v+h+t+l+"/"+v+h},m=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){var t,e=u("iframe"),n="java"+v+":";return e.style.display="none",s.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(g("document.F=Object")),t.close(),t.F},w=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}w=r?m(r):b();var t=a.length;while(t--)delete w[d][a[t]];return w()};c[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(y[d]=i(t),n=new y,y[d]=null,n[p]=t):n=w(),void 0===e?n:o(n,e)}},"7db0":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").find,o=n("44d2"),a=n("ae40"),c="find",s=!0,u=a(c);c in[]&&Array(1)[c]((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!u},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(c)},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),i=n("9ed3"),o=n("e163"),a=n("d2bb"),c=n("d44e"),s=n("9112"),u=n("6eeb"),f=n("b622"),h=n("c430"),l=n("3f8c"),d=n("ae93"),v=d.IteratorPrototype,p=d.BUGGY_SAFARI_ITERATORS,y=f("iterator"),g="keys",m="values",b="entries",w=function(){return this};t.exports=function(t,e,n,f,d,x,R){i(n,e,f);var _,k,E,S=function(t){if(t===d&&M)return M;if(!p&&t in P)return P[t];switch(t){case g:return function(){return new n(this,t)};case m:return function(){return new n(this,t)};case b:return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",O=!1,P=t.prototype,T=P[y]||P["@@iterator"]||d&&P[d],M=!p&&T||S(d),C="Array"==e&&P.entries||T;if(C&&(_=o(C.call(new t)),v!==Object.prototype&&_.next&&(h||o(_)===v||(a?a(_,v):"function"!=typeof _[y]&&s(_,y,w)),c(_,A,!0,!0),h&&(l[A]=w))),d==m&&T&&T.name!==m&&(O=!0,M=function(){return T.call(this)}),h&&!R||P[y]===M||s(P,y,M),l[e]=M,d)if(k={values:S(m),keys:x?M:S(g),entries:S(b)},R)for(E in k)(p||O||!(E in P))&&u(P,E,k[E]);else r({target:e,proto:!0,forced:p||O},k);return k}},"7f9a":function(t,e,n){var r=n("da84"),i=n("8925"),o=r.WeakMap;t.exports="function"===typeof o&&/native code/.test(i(o))},"81d5":function(t,e,n){"use strict";var r=n("7b0b"),i=n("23cb"),o=n("50c4");t.exports=function(t){var e=r(this),n=o(e.length),a=arguments.length,c=i(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,u=void 0===s?n:i(s,n);while(u>c)e[c++]=t;return e}},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"82f8":function(t,e,n){"use strict";var r=n("ebb5"),i=n("4d64").includes,o=r.aTypedArray,a=r.exportTypedArrayMethod;a("includes",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("c04e"),i=n("9bf2"),o=n("5c6c");t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,n){var r,i,o;(function(n,a){i=[],r=a,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,c=o.exec(d.stack)||a.exec(d.stack),s=c&&c[1]||!1,u=c&&c[2]||!1,f=document.location.href.replace(document.location.hash,""),h=document.getElementsByTagName("script");s===f&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*