(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ed87050","chunk-6ed87050"],{"00ee":function(t,e,n){var i=n("b622"),r=i("toStringTag"),o={};o[r]="z",t.exports="[object z]"===String(o)},"0d26":function(t,e,n){var i=n("e330"),r=Error,o=i("".replace),a=function(t){return String(r(t).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(a);t.exports=function(t,e){if(c&&"string"==typeof t&&!r.prepareStackTrace)while(e--)t=o(t,s,"");return t}},"2ba4":function(t,e,n){var i=n("40d5"),r=Function.prototype,o=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?a.bind(o):function(){return a.apply(o,arguments)})},"3b58":function(t,e,n){!function(e,n){t.exports=n()}(window,(function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=25)}([function(t,e,n){var i=n(11);"string"==typeof i&&(i=[[t.i,i,""]]);var r={transform:void 0};n(3)(i,r),i.locals&&(t.exports=i.locals)},function(t,e,n){"use strict";function i(t,e,n,i,r,o,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):r&&(c=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),c)if(u.functional){u._injectStyles=c;var h=u.render;u.render=function(t,e){return c.call(e),h(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t){return s(t)||a(t)||o(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function a(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function s(t){if(Array.isArray(t))return c(t)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0}},gridY:{type:Number,default:50,validator:function(t){return t>=0}},parentW:{type:Number,default:0,validator:function(t){return t>=0}},parentH:{type:Number,default:0,validator:function(t){return t>=0}},w:{type:[String,Number],default:200,validator:function(t){return"string"==typeof t?"auto"===t:t>=0}},h:{type:[String,Number],default:200,validator:function(t){return"string"==typeof t?"auto"===t:t>=0}},minw:{type:Number,default:50,validator:function(t){return t>=0}},minh:{type:Number,default:50,validator:function(t){return t>=0}},x:{type:Number,default:0,validator:function(t){return"number"==typeof t}},y:{type:Number,default:0,validator:function(t){return"number"==typeof t}},z:{type:[String,Number],default:"auto",validator:function(t){return"string"==typeof t?"auto"===t:t>=0}},dragHandle:{type:String,default:null},dragCancel:{type:String,default:null},sticks:{type:Array,default:function(){return["tl","tm","tr","mr","br","bm","bl","ml"]}},axis:{type:String,default:"both",validator:function(t){return-1!==["x","y","both","none"].indexOf(t)}},contentClass:{type:String,required:!1,default:""}},data:function(){return{fixAspectRatio:null,active:null,zIndex:null,parentWidth:null,parentHeight:null,left:null,top:null,right:null,bottom:null,minHeight:null}},beforeCreate:function(){this.stickDrag=!1,this.bodyDrag=!1,this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}},this.currentStick=null},mounted:function(){var t=this;this.parentElement=this.$el.parentNode,this.parentWidth=this.parentW?this.parentW:this.parentElement.clientWidth,this.parentHeight=this.parentH?this.parentH:this.parentElement.clientHeight,this.left=this.x,this.top=this.y,this.right=this.parentWidth-("auto"===this.w?this.$refs.container.scrollWidth:this.w)-this.left,this.bottom=this.parentHeight-("auto"===this.h?this.$refs.container.scrollHeight:this.h)-this.top,this.domEvents=new Map([["mousemove",this.move],["mouseup",this.up],["mouseleave",this.up],["mousedown",this.deselect],["touchmove",this.move],["touchend",this.up],["touchcancel",this.up],["touchstart",this.up]]),u(this.domEvents),this.dragHandle&&i(this.$el.querySelectorAll(this.dragHandle)).forEach((function(e){e.setAttribute("data-drag-handle",t._uid)})),this.dragCancel&&i(this.$el.querySelectorAll(this.dragCancel)).forEach((function(e){e.setAttribute("data-drag-cancel",t._uid)}))},beforeDestroy:function(){h(this.domEvents)},methods:{deselect:function(){this.preventActiveBehavior||(this.active=!1)},move:function(t){if(this.stickDrag||this.bodyDrag){t.stopPropagation();var e=void 0!==t.pageX?t.pageX:t.touches[0].pageX,n=void 0!==t.pageY?t.pageY:t.touches[0].pageY,i=this.dimensionsBeforeMove,r={x:(i.pointerX-e)/this.parentScaleX,y:(i.pointerY-n)/this.parentScaleY};if(this.stickDrag&&this.stickMove(r),this.bodyDrag){if("x"===this.axis)r.y=0;else if("y"===this.axis)r.x=0;else if("none"===this.axis)return;this.bodyMove(r)}}},up:function(t){this.stickDrag?this.stickUp(t):this.bodyDrag&&this.bodyUp(t)},bodyDown:function(t){var e=t.target,n=t.button;if(this.preventActiveBehavior||(this.active=!0),(!n||0===n)&&(this.$emit("clicked",t),this.active&&!(this.dragHandle&&e.getAttribute("data-drag-handle")!==this._uid.toString()||this.dragCancel&&e.getAttribute("data-drag-cancel")===this._uid.toString()))){void 0!==t.stopPropagation&&t.stopPropagation(),void 0!==t.preventDefault&&t.preventDefault(),this.isDraggable&&(this.bodyDrag=!0);var i=void 0!==t.pageX?t.pageX:t.touches[0].pageX,r=void 0!==t.pageY?t.pageY:t.touches[0].pageY;this.saveDimensionsBeforeMove({pointerX:i,pointerY:r}),this.parentLimitation&&(this.limits=this.calcDragLimitation())}},bodyMove:function(t){var e=this.dimensionsBeforeMove,n=this.parentWidth,i=this.parentHeight,r=this.gridX,o=this.gridY,a=this.width,s=this.height,c=e.top-t.y,u=e.bottom+t.y,h=e.left-t.x,l=e.right+t.x;if(this.snapToGrid){var f=!0,d=!0,p=c-Math.floor(c/o)*o,m=i-u-Math.floor((i-u)/o)*o,v=h-Math.floor(h/r)*r,g=n-l-Math.floor((n-l)/r)*r;p>o/2&&(p-=o),m>o/2&&(m-=o),v>r/2&&(v-=r),g>r/2&&(g-=r),Math.abs(m)2&&void 0!==arguments[2]&&arguments[2];if(this.isResizable&&this.active||n){this.stickDrag=!0;var i=void 0!==e.pageX?e.pageX:e.touches[0].pageX,r=void 0!==e.pageY?e.pageY:e.touches[0].pageY;this.saveDimensionsBeforeMove({pointerX:i,pointerY:r}),this.currentStick=t,this.limits=this.calcResizeLimits()}},saveDimensionsBeforeMove:function(t){var e=t.pointerX,n=t.pointerY;this.dimensionsBeforeMove.pointerX=e,this.dimensionsBeforeMove.pointerY=n,this.dimensionsBeforeMove.left=this.left,this.dimensionsBeforeMove.right=this.right,this.dimensionsBeforeMove.top=this.top,this.dimensionsBeforeMove.bottom=this.bottom,this.dimensionsBeforeMove.width=this.width,this.dimensionsBeforeMove.height=this.height,this.aspectFactor=this.width/this.height},stickMove:function(t){var e=this.currentStick,n=this.dimensionsBeforeMove,i=this.gridY,r=this.gridX,o=this.snapToGrid,a=this.parentHeight,s=this.parentWidth,c=n.top,u=n.bottom,h=n.left,l=n.right;switch(e[0]){case"b":u=n.bottom+t.y,o&&(u=a-Math.round((a-u)/i)*i);break;case"t":c=n.top-t.y,o&&(c=Math.round(c/i)*i)}switch(e[1]){case"r":l=n.right+t.x,o&&(l=s-Math.round((s-l)/r)*r);break;case"l":h=n.left-t.x,o&&(h=Math.round(h/r)*r)}var f=this.rectCorrectionByLimit({newLeft:h,newRight:l,newTop:c,newBottom:u});if(h=f.newLeft,l=f.newRight,c=f.newTop,u=f.newBottom,this.aspectRatio){var d=this.rectCorrectionByAspectRatio({newLeft:h,newRight:l,newTop:c,newBottom:u});h=d.newLeft,l=d.newRight,c=d.newTop,u=d.newBottom}this.left=h,this.right=l,this.top=c,this.bottom=u,this.$emit("resizing",this.rect)},stickUp:function(){this.stickDrag=!1,this.dimensionsBeforeMove={pointerX:0,pointerY:0,x:0,y:0,w:0,h:0},this.limits={left:{min:null,max:null},right:{min:null,max:null},top:{min:null,max:null},bottom:{min:null,max:null}},this.$emit("resizing",this.rect),this.$emit("resizestop",this.rect)},calcDragLimitation:function(){var t=this.parentWidth,e=this.parentHeight;return{left:{min:0,max:t-this.width},right:{min:0,max:t-this.width},top:{min:0,max:e-this.height},bottom:{min:0,max:e-this.height}}},calcResizeLimits:function(){var t=this.aspectFactor,e=this.width,n=this.height,i=this.bottom,r=this.top,o=this.left,a=this.right,s=this.minh,c=this.minw,u=this.parentLimitation?0:null;this.aspectRatio&&(c/s>t?s=c/t:c=t*s);var h={left:{min:u,max:o+(e-c)},right:{min:u,max:a+(e-c)},top:{min:u,max:r+(n-s)},bottom:{min:u,max:i+(n-s)}};if(this.aspectRatio){var l={left:{min:o-Math.min(r,i)*t*2,max:o+(n-s)/2*t*2},right:{min:a-Math.min(r,i)*t*2,max:a+(n-s)/2*t*2},top:{min:r-Math.min(o,a)/t*2,max:r+(e-c)/2/t*2},bottom:{min:i-Math.min(o,a)/t*2,max:i+(e-c)/2/t*2}};"m"===this.currentStick[0]?(h.left={min:Math.max(h.left.min,l.left.min),max:Math.min(h.left.max,l.left.max)},h.right={min:Math.max(h.right.min,l.right.min),max:Math.min(h.right.max,l.right.max)}):"m"===this.currentStick[1]&&(h.top={min:Math.max(h.top.min,l.top.min),max:Math.min(h.top.max,l.top.max)},h.bottom={min:Math.max(h.bottom.min,l.bottom.min),max:Math.min(h.bottom.max,l.bottom.max)})}return h},sideCorrectionByLimit:function(t,e){var n=e;return null!==t.min&&ec?(h=c*l,"l"===s[1]?e=o-n-h:n=o-e-h):(l=h/c,"t"===s[0]?i=a-r-l:r=a-i-l);return{newLeft:e,newRight:n,newTop:i,newBottom:r}}},computed:{positionStyle:function(){return{top:this.top+"px",left:this.left+"px",zIndex:this.zIndex}},sizeStyle:function(){return{width:"auto"==this.w?"auto":this.width+"px",height:"auto"==this.h?"auto":this.height+"px"}},vdrStick:function(){var t=this;return function(e){var n={width:"".concat(t.stickSize/t.parentScaleX,"px"),height:"".concat(t.stickSize/t.parentScaleY,"px")};return n[d.y[e[0]]]="".concat(t.stickSize/t.parentScaleX/-2,"px"),n[d.x[e[1]]]="".concat(t.stickSize/t.parentScaleX/-2,"px"),n}},width:function(){return this.parentWidth-this.left-this.right},height:function(){return this.parentHeight-this.top-this.bottom},rect:function(){return{left:Math.round(this.left),top:Math.round(this.top),width:Math.round(this.width),height:Math.round(this.height)}}},watch:{active:function(t){t?this.$emit("activated"):this.$emit("deactivated")},isActive:{immediate:!0,handler:function(t){this.active=t}},z:{immediate:!0,handler:function(t){(t>=0||"auto"===t)&&(this.zIndex=t)}},x:{handler:function(t,e){var n=this;if(!this.stickDrag&&!this.bodyDrag&&t!==this.left){var i=e-t;this.bodyDown({pageX:this.left,pageY:this.top}),this.bodyMove({x:i,y:0}),this.$nextTick((function(){n.bodyUp()}))}}},y:{handler:function(t,e){var n=this;if(!this.stickDrag&&!this.bodyDrag&&t!==this.top){var i=e-t;this.bodyDown({pageX:this.left,pageY:this.top}),this.bodyMove({x:0,y:i}),this.$nextTick((function(){n.bodyUp()}))}}},w:{handler:function(t,e){var n=this;if(!this.stickDrag&&!this.bodyDrag&&t!==this.width){var i=e-t;this.stickDown("mr",{pageX:this.right,pageY:this.top+this.height/2},!0),this.stickMove({x:i,y:0}),this.$nextTick((function(){n.stickUp()}))}}},h:{handler:function(t,e){var n=this;if(!this.stickDrag&&!this.bodyDrag&&t!==this.height){var i=e-t;this.stickDown("bm",{pageX:this.left+this.width/2,pageY:this.bottom},!0),this.stickMove({x:0,y:i}),this.$nextTick((function(){n.stickUp()}))}}},parentW:function(t){this.right=t-this.width-this.left,this.parentWidth=t},parentH:function(t){this.bottom=t-this.height-this.top,this.parentHeight=t}}},m=p,v=(n(12),n(1)),g=Object(v.a)(m,l,f,!1,null,null,null);g.options.__file="src/components/vue-drag-resize.vue",e.a=g.exports},function(t,e,n){function i(t,e){for(var n=0;n=0&&y.splice(e,1)}function s(t){var e=document.createElement("style");return t.attrs.type="text/css",u(e,t.attrs),o(t,e),e}function c(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",u(e,t.attrs),o(t,e),e}function u(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function h(t,e){var n,i,r,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var u=b++;n=g||(g=s(e)),i=l.bind(null,n,u,!1),r=l.bind(null,n,u,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(e),i=d.bind(null,n,e),r=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),i=f.bind(null,n),r=function(){a(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}function l(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=x(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function f(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function d(t,e,n){var i=n.css,r=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||o)&&(i=w(i)),r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([i],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var p={},m=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}((function(){return window&&document&&document.all&&!window.atob})),v=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t.call(this,n)),e[n]}}((function(t){return document.querySelector(t)})),g=null,b=0,y=[],w=n(10);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=m()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=r(t,e);return i(n,e),function(t){for(var o=[],a=0;ae===t)}n.r(e),n.d(e,"canvastoDataURL",(function(){return a})),n.d(e,"canvastoFile",(function(){return s})),n.d(e,"dataURLtoFile",(function(){return u})),n.d(e,"dataURLtoImage",(function(){return h})),n.d(e,"downloadFile",(function(){return l})),n.d(e,"filetoDataURL",(function(){return f})),n.d(e,"imagetoCanvas",(function(){return p})),n.d(e,"urltoBlob",(function(){return m})),n.d(e,"urltoImage",(function(){return v})),n.d(e,"compress",(function(){return b})),n.d(e,"compressAccurately",(function(){return y})),n.d(e,"EImageType",(function(){return i})),function(t){t.PNG="image/png",t.JPEG="image/jpeg",t.GIF="image/gif"}(i||(i={}));var o=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))};function a(t,e=.92,n=i.JPEG){return o(this,void 0,void 0,(function*(){return r(n)||(n=i.JPEG),t.toDataURL(n,e)}))}function s(t,e=.92,n=i.JPEG){return new Promise(i=>t.toBlob(t=>i(t),n,e))}var c=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))};function u(t,e){return c(this,void 0,void 0,(function*(){const n=t.split(",");let i=n[0].match(/:(.*?);/)[1];const o=atob(n[1]);let a=o.length;const s=new Uint8Array(a);for(;a--;)s[a]=o.charCodeAt(a);return r(e)&&(i=e),new Blob([s],{type:i})}))}function h(t){return new Promise((e,n)=>{const i=new Image;i.onload=()=>e(i),i.onerror=()=>n(new Error("dataURLtoImage(): dataURL is illegal")),i.src=t})}function l(t,e){const n=document.createElement("a");n.href=window.URL.createObjectURL(t),n.download=e||Date.now().toString(36),document.body.appendChild(n);const i=document.createEvent("MouseEvents");i.initEvent("click",!1,!1),n.dispatchEvent(i),document.body.removeChild(n)}function f(t){return new Promise(e=>{const n=new FileReader;n.onloadend=t=>e(t.target.result),n.readAsDataURL(t)})}var d=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))};function p(t,e={}){return d(this,void 0,void 0,(function*(){const n=Object.assign({},e),i=document.createElement("canvas"),r=i.getContext("2d");let o,a;for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=Number(n[t]));if(n.scale){const e=n.scale>0&&n.scale<10?n.scale:1;a=t.width*e,o=t.height*e}else a=n.width||n.height*t.width/t.height||t.width,o=n.height||n.width*t.height/t.width||t.height;switch([5,6,7,8].some(t=>t===n.orientation)?(i.height=a,i.width=o):(i.height=o,i.width=a),n.orientation){case 3:r.rotate(180*Math.PI/180),r.drawImage(t,-i.width,-i.height,i.width,i.height);break;case 6:r.rotate(90*Math.PI/180),r.drawImage(t,0,-i.width,i.height,i.width);break;case 8:r.rotate(270*Math.PI/180),r.drawImage(t,-i.height,0,i.height,i.width);break;case 2:r.translate(i.width,0),r.scale(-1,1),r.drawImage(t,0,0,i.width,i.height);break;case 4:r.translate(i.width,0),r.scale(-1,1),r.rotate(180*Math.PI/180),r.drawImage(t,-i.width,-i.height,i.width,i.height);break;case 5:r.translate(i.width,0),r.scale(-1,1),r.rotate(90*Math.PI/180),r.drawImage(t,0,-i.width,i.height,i.width);break;case 7:r.translate(i.width,0),r.scale(-1,1),r.rotate(270*Math.PI/180),r.drawImage(t,-i.height,0,i.height,i.width);break;default:r.drawImage(t,0,0,i.width,i.height)}return i}))}function m(t){return fetch(t).then(t=>t.blob())}function v(t){return new Promise((e,n)=>{const i=new Image;i.onload=()=>e(i),i.onerror=()=>n(new Error("urltoImage(): Image failed to load, please check the image URL")),i.src=t})}var g=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))};function b(t,e={}){return g(this,void 0,void 0,(function*(){if(!(t instanceof Blob))throw new Error("compress(): First arg must be a Blob object or a File object.");if("object"!=typeof e&&(e=Object.assign({quality:e})),e.quality=Number(e.quality),Number.isNaN(e.quality))return t;const n=yield f(t);let o=n.split(",")[0].match(/:(.*?);/)[1],s=i.JPEG;r(e.type)&&(s=e.type,o=e.type);const c=yield h(n),l=yield p(c,Object.assign({},e)),d=yield a(l,e.quality,s),m=yield u(d,o);return m.size>t.size?t:m}))}function y(t,e={}){return g(this,void 0,void 0,(function*(){if(!(t instanceof Blob))throw new Error("compressAccurately(): First arg must be a Blob object or a File object.");if("object"!=typeof e&&(e=Object.assign({size:e})),e.size=Number(e.size),Number.isNaN(e.size))return t;if(1024*e.size>t.size)return t;e.accuracy=Number(e.accuracy),(!e.accuracy||e.accuracy<.8||e.accuracy>.99)&&(e.accuracy=.95);const n=e.size*(2-e.accuracy)*1024,o=1024*e.size,s=e.size*e.accuracy*1024,c=yield f(t);let l=c.split(",")[0].match(/:(.*?);/)[1],d=i.JPEG;r(e.type)&&(d=e.type,l=e.type);const m=yield h(c),v=yield p(m,Object.assign({},e));let g,b=.5;const y=[null,null];for(let t=1;t<=7;t++){g=yield a(v,b,d);const e=.75*g.length;if(7===t){(ne)&&(g=[g,...y].filter(t=>t).sort((t,e)=>Math.abs(.75*t.length-o)-Math.abs(.75*e.length-o))[0]);break}if(ne))break;y[0]=g,b+=Math.pow(.5,t+1)}}const w=yield u(g,l);return w.size>t.size?t:w}))}}])}))},d2bb:function(t,e,n){var i=n("7282"),r=n("825a"),o=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=i(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(a){}return function(n,i){return r(n),o(i),e?t(n,i):n.__proto__=i,n}}():void 0)},d9e2:function(t,e,n){var i=n("23e7"),r=n("da84"),o=n("2ba4"),a=n("e5cb"),s="WebAssembly",c=r[s],u=7!==Error("e",{cause:7}).cause,h=function(t,e){var n={};n[t]=a(t,e,u),i({global:!0,constructor:!0,arity:1,forced:u},n)},l=function(t,e){if(c&&c[t]){var n={};n[t]=a(s+"."+t,e,u),i({target:s,stat:!0,constructor:!0,arity:1,forced:u},n)}};h("Error",(function(t){return function(e){return o(t,this,arguments)}})),h("EvalError",(function(t){return function(e){return o(t,this,arguments)}})),h("RangeError",(function(t){return function(e){return o(t,this,arguments)}})),h("ReferenceError",(function(t){return function(e){return o(t,this,arguments)}})),h("SyntaxError",(function(t){return function(e){return o(t,this,arguments)}})),h("TypeError",(function(t){return function(e){return o(t,this,arguments)}})),h("URIError",(function(t){return function(e){return o(t,this,arguments)}})),l("CompileError",(function(t){return function(e){return o(t,this,arguments)}})),l("LinkError",(function(t){return function(e){return o(t,this,arguments)}})),l("RuntimeError",(function(t){return function(e){return o(t,this,arguments)}}))},e391:function(t,e,n){var i=n("577e");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},e5cb:function(t,e,n){"use strict";var i=n("d066"),r=n("1a2d"),o=n("9112"),a=n("3a9b"),s=n("d2bb"),c=n("e893"),u=n("aeb0"),h=n("7156"),l=n("e391"),f=n("ab36"),d=n("6f19"),p=n("83ab"),m=n("c430");t.exports=function(t,e,n,v){var g="stackTraceLimit",b=v?2:1,y=t.split("."),w=y[y.length-1],x=i.apply(null,y);if(x){var k=x.prototype;if(!m&&r(k,"cause")&&delete k.cause,!n)return x;var M=i("Error"),S=e((function(t,e){var n=l(v?e:t,void 0),i=v?new x(t):new x;return void 0!==n&&o(i,"message",n),d(i,S,i.stack,2),this&&a(k,this)&&h(i,this,S),arguments.length>b&&f(i,arguments[b]),i}));if(S.prototype=k,"Error"!==w?s?s(S,M):c(S,M,{name:!0}):p&&g in x&&(u(S,x,g),u(S,x,"prepareStackTrace")),c(S,x),!m)try{k.name!==w&&o(k,"name",w),k.constructor=S}catch(E){}return S}}},f5df:function(t,e,n){var i=n("00ee"),r=n("1626"),o=n("c6b6"),a=n("b622"),s=a("toStringTag"),c=Object,u="Arguments"==o(function(){return arguments}()),h=function(t,e){try{return t[e]}catch(n){}};t.exports=i?o:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=h(e=c(t),s))?n:u?o(e):"Object"==(i=o(e))&&r(e.callee)?"Arguments":i}}}]);