function ncp(n,r,i,t){function e(n){started++;if(w)if(w instanceof RegExp){if(!w.test(n))return g(!0)}else if("function"==typeof w&&!w(n))return g(!0);return u(n)}function f(n){return"function"==typeof setImmediate?setImmediate(n):process.nextTick(n)}function u(n){if(running>=limit)return f(function(){u(n)});running++;fs.lstat(n,function(r,i){var t={};if(r)return k(r);t.name=n;t.mode=i.mode;return i.isDirectory()?a(t):i.isFile()?o(t):i.isSymbolicLink()?l(n):void 0})}function o(n){var r=n.name.replace(S,b);h(r,function(i){if(i)return c(n,r);if(!q)return g();s(r,function(){c(n,r)});return void 0})}function c(n,r){var i=fs.createReadStream(n.name),t=fs.createWriteStream(r,{mode:n.mode});x?x(i,t,n):i.pipe(t);t.once(N,g)}function s(n,r){fs.unlink(n,function(n){return n?k(n):r()})}function a(n){var r=n.name.replace(S,b);h(r,function(i){if(i)return d(n,r);m(n.name);return void 0})}function d(n,r){fs.mkdir(r,n.mode,function(r){if(r)return k(r);m(n.name);return void 0})}function m(n){fs.readdir(n,function(r,i){if(r)return k(r);i.forEach(function(r){e(n+"/"+r)});return g()})}function l(n){var r=n.replace(S,b);fs.readlink(n,function(n,i){if(n)return k(n);p(i,r);return void 0})}function p(n,r){h(r,function(i){if(i)return v(n,r);fs.readlink(r,function(i,t){return i?k(i):t===n?g():s(r,function(){v(n,r)})});return void 0})}function v(n,r){fs.symlink(n,r,function(n){return n?k(n):g()})}function h(n,r){fs.lstat(n,function(n){return r(n?"ENOENT"===n.code?!0:!1:!1)})}function k(n){if(i.stopOnError)return y(n);!I&&i.errs?I=fs.createWriteStream(i.errs):I||(I=[]);"undefined"==typeof I.write?I.push(n):I.write(n.stack+"\n\n");return g()}function g(n){n||running--;finished++;return started===finished&&0===running&&void 0!==y?y(I?I:null):void 0}var y=t;if(!t){y=i;i={}}var E=process.cwd(),S=path.resolve(E,n),b=path.resolve(E,r),w=i.filter,x=i.transform,q=i.clobber!==!1,I=null,N=/^v0\.10\.\d+$/.test(process.version)?"finish":"close";started=0,finished=0,running=0,limit=i.limit||ncp.limit||16;limit=limit<1?1:limit>512?512:limit;e(S)}var fs=require("fs"),path=require("path");module.exports=ncp;ncp.ncp=ncp;