UNPKG

w-mousekey

Version:

An operator for mouse and keyboard in nodejs.

8 lines (7 loc) 6.25 kB
/*! * action v1.0.7 * (c) 2018-2021 yuda-lyu(semisphere) * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("path"),require("child_process"),require("util"),require("fs"),require("screenshot-desktop"),require("sharp"),require("@u4/opencv4nodejs")):"function"==typeof define&&define.amd?define(["path","child_process","util","fs","screenshot-desktop","sharp","@u4/opencv4nodejs"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).action=e(t.path,t.child_process,t.util,t.fs)}(this,function(t,e,r,n){"use strict";var o=Array.isArray,i="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,a=i||u||Function("return this")(),c=a.Symbol,s=Object.prototype,l=s.hasOwnProperty,f=s.toString,p=c?c.toStringTag:void 0;var h=Object.prototype.toString;var _=c?c.toStringTag:void 0;function y(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":_&&_ in Object(t)?function(t){var e=l.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=f.call(t);return n&&(e?t[p]=r:delete t[p]),o}(t):function(t){return h.call(t)}(t)}function d(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==y(t)}var v=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b=/^\w*$/;function g(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var j,O=a["__core-js_shared__"],m=(j=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"";var w=Function.prototype.toString;var $=/^\[object .+?Constructor\]$/,S=Function.prototype,z=Object.prototype,k=S.toString,A=z.hasOwnProperty,x=RegExp("^"+k.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function q(t){if(!g(t)||(e=t,m&&m in e))return!1;var e,r=function(t){if(!g(t))return!1;var e=y(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?x:$;return r.test(function(t){if(null!=t){try{return w.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function F(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return q(r)?r:void 0}var P=F(Object,"create");var T=Object.prototype.hasOwnProperty;var E=Object.prototype.hasOwnProperty;function C(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function H(t,e){return t===e||t!=t&&e!=e}function R(t,e){for(var r=t.length;r--;)if(H(t[r][0],e))return r;return-1}C.prototype.clear=function(){this.__data__=P?P(null):{},this.size=0},C.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},C.prototype.get=function(t){var e=this.__data__;if(P){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return T.call(e,t)?e[t]:void 0},C.prototype.has=function(t){var e=this.__data__;return P?void 0!==e[t]:E.call(e,t)},C.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=P&&void 0===e?"__lodash_hash_undefined__":e,this};var D=Array.prototype.splice;function G(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}G.prototype.clear=function(){this.__data__=[],this.size=0},G.prototype.delete=function(t){var e=this.__data__,r=R(e,t);return!(r<0)&&(r==e.length-1?e.pop():D.call(e,r,1),--this.size,!0)},G.prototype.get=function(t){var e=this.__data__,r=R(e,t);return r<0?void 0:e[r][1]},G.prototype.has=function(t){return R(this.__data__,t)>-1},G.prototype.set=function(t,e){var r=this.__data__,n=R(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var I=F(a,"Map");function L(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function M(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}M.prototype.clear=function(){this.size=0,this.__data__={hash:new C,map:new(I||G),string:new C}},M.prototype.delete=function(t){var e=L(this,t).delete(t);return this.size-=e?1:0,e},M.prototype.get=function(t){return L(this,t).get(t)},M.prototype.has=function(t){return L(this,t).has(t)},M.prototype.set=function(t,e){var r=L(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function N(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(N.Cache||M),r}N.Cache=M;var U,B,J,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q=/\\(\\)?/g,V=(U=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(K,function(t,r,n,o){e.push(n?o.replace(Q,"$1"):r||t)}),e},B=N(U,function(t){return 500===J.size&&J.clear(),t}),J=B.cache,B),W=V;var X=c?c.prototype:void 0,Y=X?X.toString:void 0;function Z(t){if("string"==typeof t)return t;if(o(t))return function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}(t,Z)+"";if(d(t))return Y?Y.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function tt(t,e){return o(t)?t:function(t,e){if(o(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!d(t))||b.test(t)||!v.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:W(function(t){return null==t?"":Z(t)}(t))}function et(t){if("string"==typeof t||d(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function rt(t,e,r){var n=null==t?void 0:function(t,e){for(var r=0,n=(e=tt(e,t)).length;null!=t&&r<n;)t=t[et(e[r++])];return r&&r==n?t:void 0}(t,e);return void 0===n?r:n}function nt(t){return function(t,e={}){let r=rt(e,"fs");return!!r.existsSync(t)&&!r.lstatSync(t).isDirectory()&&!r.lstatSync(t).isSymbolicLink()}(t,{fs:n})}r.promisify(e.execFile);let ot=t.resolve(),it="AutoHotkey64.exe";{let t=`${ot}/node_modules/w-mousekey/AutoHotkey_2.0.19/`;if(nt(`${`${ot}/AutoHotkey_2.0.19/`}${it}`));else if(!nt(`${t}${it}`))throw new Error("can not find folder for AutoHotkey")}return(t,e,r,n,o)=>{}}); //# sourceMappingURL=action.umd.js.map