/* * image-clipper 0.4.4 * Node.js module for clipping & cropping JPEG, PNG, WebP images purely using the native Canvas APIs, excellent compatibility with the Browser & Electron & NW.js (Node-webkit), itself doesn't relies on any image processing libraries. * https://github.com/superRaytin/image-clipper * * Copyright 2015, Leon Shi * Released under the MIT license. */ !function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var f=n[a]={exports:{}};e[a][0].call(f.exports,function(t){var n=e[a][1][t];return r(n?n:t)},f,f.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;an?n:t0&&i.each(e,function(e,n){"undefined"!=typeof e&&(t[n]=e)})})},i.setter=function(t,e,n){var r=i.type(e);if("String"===r){if("undefined"==typeof t[e])throw new Error("Invalid configuration name.");if("undefined"==typeof n)throw new Error("Lack of a value corresponding to the name");"Object"===i.type(n)&&"Object"===i.type(t[e])?i.extend(t[e],n):t[e]=n}else{if("Object"!==r)throw new Error("Invalid arguments");n=e,i.extend(t,n)}},i.getImageFormat=function(t){var e=t.substr(t.lastIndexOf(".")+1,t.length);return e="jpg"===e?"jpeg":e,"image/"+e},i.upperCaseFirstLetter=function(t){return t.replace(t.charAt(0),function(t){return t.toUpperCase()})},e.exports=i}).call(this,t("pBGvAp"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{pBGvAp:6}],5:[function(t,e,n){},{}],6:[function(t,e,n){function i(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var i=n.shift();i()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.addListener=i,r.once=i,r.off=i,r.removeListener=i,r.removeAllListeners=i,r.emit=i,r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")}},{}]},{},[2]);