Comparing version 1.5.10 to 1.5.11
@@ -112,3 +112,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
exports.text = (selector) => { | ||
exports.text = selector => { | ||
var DOM = $(selector)[0]; | ||
@@ -122,3 +122,3 @@ if (DOM) { | ||
} | ||
return DOM.textContent; | ||
return DOM.textContent.trim(); | ||
} | ||
@@ -125,0 +125,0 @@ return false; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LC=e():t.LC=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return new Function("$,o,d,c,t,v,m,gen",t)}var o=n(12),a=o.style,s=o.attr,u=o.count,i=o.text,c=o.visible,p=o.match,h=o.randString,l=o.$;e.expression=function(t,e){var n=r(t);return n(e,a,s,u,i,c,p,h)},e.setContext=n(6).setContextGetter,e.$=l},,function(t,e){t.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},,,,function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.get=function(){return document},e.setContextGetter=function(t){if("function"!=typeof t)throw new Error("Context getter must be a function not a "+("undefined"==typeof t?"undefined":n(t))+".");e.get=t}},,,,function(t,e,n){var r=n(2),o=function(){return[{type:r.RANGE,from:48,to:57}]},a=function(){return[{type:r.CHAR,value:95},{type:r.RANGE,from:97,to:122},{type:r.RANGE,from:65,to:90}].concat(o())},s=function(){return[{type:r.CHAR,value:9},{type:r.CHAR,value:10},{type:r.CHAR,value:11},{type:r.CHAR,value:12},{type:r.CHAR,value:13},{type:r.CHAR,value:32},{type:r.CHAR,value:160},{type:r.CHAR,value:5760},{type:r.CHAR,value:6158},{type:r.CHAR,value:8192},{type:r.CHAR,value:8193},{type:r.CHAR,value:8194},{type:r.CHAR,value:8195},{type:r.CHAR,value:8196},{type:r.CHAR,value:8197},{type:r.CHAR,value:8198},{type:r.CHAR,value:8199},{type:r.CHAR,value:8200},{type:r.CHAR,value:8201},{type:r.CHAR,value:8202},{type:r.CHAR,value:8232},{type:r.CHAR,value:8233},{type:r.CHAR,value:8239},{type:r.CHAR,value:8287},{type:r.CHAR,value:12288},{type:r.CHAR,value:65279}]},u=function(){return[{type:r.CHAR,value:10},{type:r.CHAR,value:13},{type:r.CHAR,value:8232},{type:r.CHAR,value:8233}]};e.words=function(){return{type:r.SET,set:a(),not:!1}},e.notWords=function(){return{type:r.SET,set:a(),not:!0}},e.ints=function(){return{type:r.SET,set:o(),not:!1}},e.notInts=function(){return{type:r.SET,set:o(),not:!0}},e.whitespace=function(){return{type:r.SET,set:s(),not:!1}},e.notWhitespace=function(){return{type:r.SET,set:s(),not:!0}},e.anyChar=function(){return{type:r.SET,set:u(),not:!0}}},,function(t,e,n){"use strict";var r=n(25),o=r.randexp,a=n(6).get,s=function(t){var e=arguments.length<=1||void 0===arguments[1]?a():arguments[1],n=e.querySelectorAll(t);return Array.prototype.slice.call(n)},u=e.$=n(24)(s);e.randString=function(t){return o(t)},e.count=function(t){return u(t).length},e.attr=function(t,e){var n,r=u(t)[0];return r&&(n=r.getAttribute(e,2)),n?n:!1},e.style=function(t,e){var n,r=u(t)[0];if(r&&(n=getComputedStyle(r,null).getPropertyValue(e)),!n)throw new Error("Invalid attribute name to css.");return n},e.text=function(t){var e=u(t)[0];return e?e.value?"checkbox"===e.type||"radio"===e.type?e.checked:e.value:e.textContent:!1},e.visible=function(t){var e=u(t)[0];return e?!(e.offsetHeight*e.offsetWidth===0):!1},e.match=function(t,e){return"string"!=typeof t?!1:"undefined"==typeof e||e instanceof RegExp?e.test?e.test(t):!1:-1!==t.indexOf(e)}},,,,,,,,,,,function(t,e){function n(t,e){this.low=t,this.high=e,this.length=1+e-t}function r(t,e){return this instanceof r?(this.ranges=[],this.length=0,void 0!==t&&this.add(t,e),void 0):new r(t,e)}function o(t){t.length=t.ranges.reduce(function(t,e){return t+e.length},0)}n.prototype.overlaps=function(t){return!(this.high<t.low||this.low>t.high)},n.prototype.touches=function(t){return!(this.high+1<t.low||this.low-1>t.high)},n.prototype.add=function(t){return this.touches(t)&&new n(Math.min(this.low,t.low),Math.max(this.high,t.high))},n.prototype.subtract=function(t){return this.overlaps(t)?t.low<=this.low&&t.high>=this.high?[]:t.low>this.low&&t.high<this.high?[new n(this.low,t.low-1),new n(t.high+1,this.high)]:t.low<=this.low?[new n(t.high+1,this.high)]:[new n(this.low,t.low-1)]:!1},n.prototype.toString=function(){return this.low==this.high?this.low.toString():this.low+"-"+this.high},n.prototype.clone=function(){return new n(this.low,this.high)},r.prototype.add=function(t,e){function a(t){for(var e=[],n=0;n<s.ranges.length&&!t.touches(s.ranges[n]);)e.push(s.ranges[n].clone()),n++;for(;n<s.ranges.length&&t.touches(s.ranges[n]);)t=t.add(s.ranges[n]),n++;for(e.push(t);n<s.ranges.length;)e.push(s.ranges[n].clone()),n++;s.ranges=e,o(s)}var s=this;return t instanceof r?t.ranges.forEach(a):t instanceof n?a(t):(void 0===e&&(e=t),a(new n(t,e))),this},r.prototype.subtract=function(t,e){function a(t){for(var e=[],n=0;n<s.ranges.length&&!t.overlaps(s.ranges[n]);)e.push(s.ranges[n].clone()),n++;for(;n<s.ranges.length&&t.overlaps(s.ranges[n]);)e=e.concat(s.ranges[n].subtract(t)),n++;for(;n<s.ranges.length;)e.push(s.ranges[n].clone()),n++;s.ranges=e,o(s)}var s=this;return t instanceof r?t.ranges.forEach(a):t instanceof n?a(t):(void 0===e&&(e=t),a(new n(t,e))),this},r.prototype.index=function(t){for(var e=0;e<this.ranges.length&&this.ranges[e].length<=t;)t-=this.ranges[e].length,e++;return e>=this.ranges.length?null:this.ranges[e].low+t},r.prototype.toString=function(){return"[ "+this.ranges.join(", ")+" ]"},r.prototype.clone=function(){return new r(this)},t.exports=r},function(t,e){!function(){"use strict";function e(t){function e(e,n){function r(n){t(e[s],n).forEach(function(t){"IFRAME"===t.tagName&&c.push(t.contentWindow.document)})}var o,a=[],s=0,u=e.pop(),i=e.length,c=[];for(r(n),s+=1;i>s&&c.length;)o=c,c=[],o.forEach(r),s+=1;return s===i&&c.forEach(function(e){a=a.concat(t(u,e))}),a}function n(n,r){var o=[],a=n.split(",");return a.forEach(function(n){var a,s=n.split("<");s.length<1||(a=1===s.length?t(s[0],r):e(s,r),a.forEach(function(t){-1===o.indexOf(t)&&o.push(t)}))}),o}if("undefined"==typeof t)throw new Error("[lc2-sizzle]: Sizzle is not found!");return n}"undefined"!=typeof t&&t.exports?t.exports=e:window.$=e(Sizzle)}()},function(t,e,n){function r(t){return t+(t>=97&&122>=t?-32:t>=65&&90>=t?32:0)}function o(){return!this.randInt(0,1)}function a(t){return t instanceof p?t.index(this.randInt(0,t.length-1)):t[this.randInt(0,t.length-1)]}function s(t){if(t.type===c.types.CHAR)return new p(t.value);if(t.type===c.types.RANGE)return new p(t.from,t.to);for(var e=new p,n=0;n<t.set.length;n++){var o=s.call(this,t.set[n]);if(e.add(o),this.ignoreCase)for(var a=0;a<o.length;a++){var u=o.index(a),i=r(u);u!==i&&e.add(i)}}return t.not?this.defaultRange.clone().subtract(e):e}function u(t,e){"number"==typeof e.max&&(t.max=e.max),e.defaultRange instanceof p&&(t.defaultRange=e.defaultRange),"function"==typeof e.randInt&&(t.randInt=e.randInt)}function i(t,e){var n,u,c,p,l;switch(t.type){case h.ROOT:case h.GROUP:if(t.followedBy||t.notFollowedBy)return"";for(t.remember&&void 0===t.groupNumber&&(t.groupNumber=e.push(null)-1),n=t.options?a.call(this,t.options):t.stack,u="",p=0,l=n.length;l>p;p++)u+=i.call(this,n[p],e);return t.remember&&(e[t.groupNumber]=u),u;case h.POSITION:return"";case h.SET:var f=s.call(this,t);return f.length?String.fromCharCode(a.call(this,f)):"";case h.REPETITION:for(c=this.randInt(t.min,t.max===1/0?t.min+this.max:t.max),u="",p=0;c>p;p++)u+=i.call(this,t.value,e);return u;case h.REFERENCE:return e[t.value-1]||"";case h.CHAR:var g=this.ignoreCase&&o.call(this)?r(t.value):t.value;return String.fromCharCode(g)}}var c=n(26),p=n(23),h=c.types,l=t.exports=function(t,e){if(this.defaultRange=this.defaultRange.clone(),t instanceof RegExp)this.ignoreCase=t.ignoreCase,this.multiline=t.multiline,u(this,t),t=t.source;else{if("string"!=typeof t)throw new Error("Expected a regexp or string");this.ignoreCase=e&&-1!==e.indexOf("i"),this.multiline=e&&-1!==e.indexOf("m")}this.tokens=c(t)};l.prototype.max=100,l.prototype.gen=function(){return i.call(this,this.tokens,[])},l.randexp=function(t,e){var n;return void 0===t._randexp?(n=new l(t,e),t._randexp=n):n=t._randexp,u(n,t),n.gen()},l.sugar=function(){RegExp.prototype.gen=function(){return l.randexp(this)}},l.prototype.defaultRange=new p(32,126),l.prototype.randInt=function(t,e){return t+Math.floor(Math.random()*(1+e-t))}},function(t,e,n){var r=n(28),o=n(2),a=n(10),s=n(27);t.exports=function(t){var e,n,u=0,i={type:o.ROOT,stack:[]},c=i,p=i.stack,h=[],l=function(e){r.error(t,"Nothing to repeat at column "+(e-1))},f=r.strToChars(t);for(e=f.length;e>u;)switch(n=f[u++]){case"\\":switch(n=f[u++]){case"b":p.push(s.wordBoundary());break;case"B":p.push(s.nonWordBoundary());break;case"w":p.push(a.words());break;case"W":p.push(a.notWords());break;case"d":p.push(a.ints());break;case"D":p.push(a.notInts());break;case"s":p.push(a.whitespace());break;case"S":p.push(a.notWhitespace());break;default:/\d/.test(n)?p.push({type:o.REFERENCE,value:parseInt(n,10)}):p.push({type:o.CHAR,value:n.charCodeAt(0)})}break;case"^":p.push(s.begin());break;case"$":p.push(s.end());break;case"[":var g;"^"===f[u]?(g=!0,u++):g=!1;var d=r.tokenizeClass(f.slice(u),t);u+=d[1],p.push({type:o.SET,set:d[0],not:g});break;case".":p.push(a.anyChar());break;case"(":var y={type:o.GROUP,stack:[],remember:!0};n=f[u],"?"===n&&(n=f[u+1],u+=2,"="===n?y.followedBy=!0:"!"===n?y.notFollowedBy=!0:":"!==n&&r.error(t,"Invalid group, character '"+n+"' after '?' at column "+(u-1)),y.remember=!1),p.push(y),h.push(c),c=y,p=y.stack;break;case")":0===h.length&&r.error(t,"Unmatched ) at column "+(u-1)),c=h.pop(),p=c.options?c.options[c.options.length-1]:c.stack;break;case"|":c.options||(c.options=[c.stack],delete c.stack);var v=[];c.options.push(v),p=v;break;case"{":var R,C,m=/^(\d+)(,(\d+)?)?\}/.exec(f.slice(u));null!==m?(0===p.length&&l(u),R=parseInt(m[1],10),C=m[2]?m[3]?parseInt(m[3],10):1/0:R,u+=m[0].length,p.push({type:o.REPETITION,min:R,max:C,value:p.pop()})):p.push({type:o.CHAR,value:123});break;case"?":0===p.length&&l(u),p.push({type:o.REPETITION,min:0,max:1,value:p.pop()});break;case"+":0===p.length&&l(u),p.push({type:o.REPETITION,min:1,max:1/0,value:p.pop()});break;case"*":0===p.length&&l(u),p.push({type:o.REPETITION,min:0,max:1/0,value:p.pop()});break;default:p.push({type:o.CHAR,value:n.charCodeAt(0)})}return 0!==h.length&&r.error(t,"Unterminated group"),i},t.exports.types=o},function(t,e,n){var r=n(2);e.wordBoundary=function(){return{type:r.POSITION,value:"b"}},e.nonWordBoundary=function(){return{type:r.POSITION,value:"B"}},e.begin=function(){return{type:r.POSITION,value:"^"}},e.end=function(){return{type:r.POSITION,value:"$"}}},function(t,e,n){var r=n(2),o=n(10),a="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",s={0:0,t:9,n:10,v:11,f:12,r:13};e.strToChars=function(t){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g;return t=t.replace(e,function(t,e,n,r,o,u,i,c){if(n)return t;var p=e?8:r?parseInt(r,16):o?parseInt(o,16):u?parseInt(u,8):i?a.indexOf(i):s[c],h=String.fromCharCode(p);return/[\[\]{}\^$.|?*+()]/.test(h)&&(h="\\"+h),h})},e.tokenizeClass=function(t,n){for(var a,s,u=[],i=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g;null!=(a=i.exec(t));)if(a[1])u.push(o.words());else if(a[2])u.push(o.ints());else if(a[3])u.push(o.whitespace());else if(a[4])u.push(o.notWords());else if(a[5])u.push(o.notInts());else if(a[6])u.push(o.notWhitespace());else if(a[7])u.push({type:r.RANGE,from:(a[8]||a[9]).charCodeAt(0),to:a[10].charCodeAt(0)});else{if(!(s=a[12]))return[u,i.lastIndex];u.push({type:r.CHAR,value:s.charCodeAt(0)})}e.error(n,"Unterminated character class")},e.error=function(t,e){throw new SyntaxError("Invalid regular expression: /"+t+"/: "+e)}}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LC=e():t.LC=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return new Function("$,o,d,c,t,v,m,gen",t)}var o=n(13),a=o.style,s=o.attr,u=o.count,i=o.text,c=o.visible,p=o.match,h=o.randString,l=o.$;e.expression=function(t,e){var n=r(t);return n(e,a,s,u,i,c,p,h)},e.setContext=n(7).setContextGetter,e.$=l},,function(t,e){t.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},,,,,function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.get=function(){return document},e.setContextGetter=function(t){if("function"!=typeof t)throw new Error("Context getter must be a function not a "+("undefined"==typeof t?"undefined":n(t))+".");e.get=t}},,,,function(t,e,n){var r=n(2),o=function(){return[{type:r.RANGE,from:48,to:57}]},a=function(){return[{type:r.CHAR,value:95},{type:r.RANGE,from:97,to:122},{type:r.RANGE,from:65,to:90}].concat(o())},s=function(){return[{type:r.CHAR,value:9},{type:r.CHAR,value:10},{type:r.CHAR,value:11},{type:r.CHAR,value:12},{type:r.CHAR,value:13},{type:r.CHAR,value:32},{type:r.CHAR,value:160},{type:r.CHAR,value:5760},{type:r.CHAR,value:6158},{type:r.CHAR,value:8192},{type:r.CHAR,value:8193},{type:r.CHAR,value:8194},{type:r.CHAR,value:8195},{type:r.CHAR,value:8196},{type:r.CHAR,value:8197},{type:r.CHAR,value:8198},{type:r.CHAR,value:8199},{type:r.CHAR,value:8200},{type:r.CHAR,value:8201},{type:r.CHAR,value:8202},{type:r.CHAR,value:8232},{type:r.CHAR,value:8233},{type:r.CHAR,value:8239},{type:r.CHAR,value:8287},{type:r.CHAR,value:12288},{type:r.CHAR,value:65279}]},u=function(){return[{type:r.CHAR,value:10},{type:r.CHAR,value:13},{type:r.CHAR,value:8232},{type:r.CHAR,value:8233}]};e.words=function(){return{type:r.SET,set:a(),not:!1}},e.notWords=function(){return{type:r.SET,set:a(),not:!0}},e.ints=function(){return{type:r.SET,set:o(),not:!1}},e.notInts=function(){return{type:r.SET,set:o(),not:!0}},e.whitespace=function(){return{type:r.SET,set:s(),not:!1}},e.notWhitespace=function(){return{type:r.SET,set:s(),not:!0}},e.anyChar=function(){return{type:r.SET,set:u(),not:!0}}},,function(t,e,n){"use strict";var r=n(27),o=r.randexp,a=n(7).get,s=function(t){var e=arguments.length<=1||void 0===arguments[1]?a():arguments[1],n=e.querySelectorAll(t);return Array.prototype.slice.call(n)},u=e.$=n(25)(s);e.randString=function(t){return o(t)},e.count=function(t){return u(t).length},e.attr=function(t,e){var n,r=u(t)[0];return r&&(n=r.getAttribute(e,2)),n?n:!1},e.style=function(t,e){var n,r=u(t)[0];if(r&&(n=getComputedStyle(r,null).getPropertyValue(e)),!n)throw new Error("Invalid attribute name to css.");return n},e.text=function(t){var e=u(t)[0];return e?e.value?"checkbox"===e.type||"radio"===e.type?e.checked:e.value:e.textContent.trim():!1},e.visible=function(t){var e=u(t)[0];return e?!(e.offsetHeight*e.offsetWidth===0):!1},e.match=function(t,e){return"string"!=typeof t?!1:"undefined"==typeof e||e instanceof RegExp?e.test?e.test(t):!1:-1!==t.indexOf(e)}},,,,,,,,,,,function(t,e){function n(t,e){this.low=t,this.high=e,this.length=1+e-t}function r(t,e){return this instanceof r?(this.ranges=[],this.length=0,void 0!==t&&this.add(t,e),void 0):new r(t,e)}function o(t){t.length=t.ranges.reduce(function(t,e){return t+e.length},0)}n.prototype.overlaps=function(t){return!(this.high<t.low||this.low>t.high)},n.prototype.touches=function(t){return!(this.high+1<t.low||this.low-1>t.high)},n.prototype.add=function(t){return this.touches(t)&&new n(Math.min(this.low,t.low),Math.max(this.high,t.high))},n.prototype.subtract=function(t){return this.overlaps(t)?t.low<=this.low&&t.high>=this.high?[]:t.low>this.low&&t.high<this.high?[new n(this.low,t.low-1),new n(t.high+1,this.high)]:t.low<=this.low?[new n(t.high+1,this.high)]:[new n(this.low,t.low-1)]:!1},n.prototype.toString=function(){return this.low==this.high?this.low.toString():this.low+"-"+this.high},n.prototype.clone=function(){return new n(this.low,this.high)},r.prototype.add=function(t,e){function a(t){for(var e=[],n=0;n<s.ranges.length&&!t.touches(s.ranges[n]);)e.push(s.ranges[n].clone()),n++;for(;n<s.ranges.length&&t.touches(s.ranges[n]);)t=t.add(s.ranges[n]),n++;for(e.push(t);n<s.ranges.length;)e.push(s.ranges[n].clone()),n++;s.ranges=e,o(s)}var s=this;return t instanceof r?t.ranges.forEach(a):t instanceof n?a(t):(void 0===e&&(e=t),a(new n(t,e))),this},r.prototype.subtract=function(t,e){function a(t){for(var e=[],n=0;n<s.ranges.length&&!t.overlaps(s.ranges[n]);)e.push(s.ranges[n].clone()),n++;for(;n<s.ranges.length&&t.overlaps(s.ranges[n]);)e=e.concat(s.ranges[n].subtract(t)),n++;for(;n<s.ranges.length;)e.push(s.ranges[n].clone()),n++;s.ranges=e,o(s)}var s=this;return t instanceof r?t.ranges.forEach(a):t instanceof n?a(t):(void 0===e&&(e=t),a(new n(t,e))),this},r.prototype.index=function(t){for(var e=0;e<this.ranges.length&&this.ranges[e].length<=t;)t-=this.ranges[e].length,e++;return e>=this.ranges.length?null:this.ranges[e].low+t},r.prototype.toString=function(){return"[ "+this.ranges.join(", ")+" ]"},r.prototype.clone=function(){return new r(this)},t.exports=r},function(t,e){!function(){"use strict";function e(t){function e(e,n){function r(n){t(e[s],n).forEach(function(t){"IFRAME"===t.tagName&&c.push(t.contentWindow.document)})}var o,a=[],s=0,u=e.pop(),i=e.length,c=[];for(r(n),s+=1;i>s&&c.length;)o=c,c=[],o.forEach(r),s+=1;return s===i&&c.forEach(function(e){a=a.concat(t(u,e))}),a}function n(n,r){var o=[],a=n.split(",");return a.forEach(function(n){var a,s=n.split("<");s.length<1||(a=1===s.length?t(s[0],r):e(s,r),a.forEach(function(t){-1===o.indexOf(t)&&o.push(t)}))}),o}if("undefined"==typeof t)throw new Error("[lc2-sizzle]: Sizzle is not found!");return n}"undefined"!=typeof t&&t.exports?t.exports=e:window.$=e(Sizzle)}()},,function(t,e,n){function r(t){return t+(t>=97&&122>=t?-32:t>=65&&90>=t?32:0)}function o(){return!this.randInt(0,1)}function a(t){return t instanceof p?t.index(this.randInt(0,t.length-1)):t[this.randInt(0,t.length-1)]}function s(t){if(t.type===c.types.CHAR)return new p(t.value);if(t.type===c.types.RANGE)return new p(t.from,t.to);for(var e=new p,n=0;n<t.set.length;n++){var o=s.call(this,t.set[n]);if(e.add(o),this.ignoreCase)for(var a=0;a<o.length;a++){var u=o.index(a),i=r(u);u!==i&&e.add(i)}}return t.not?this.defaultRange.clone().subtract(e):e}function u(t,e){"number"==typeof e.max&&(t.max=e.max),e.defaultRange instanceof p&&(t.defaultRange=e.defaultRange),"function"==typeof e.randInt&&(t.randInt=e.randInt)}function i(t,e){var n,u,c,p,l;switch(t.type){case h.ROOT:case h.GROUP:if(t.followedBy||t.notFollowedBy)return"";for(t.remember&&void 0===t.groupNumber&&(t.groupNumber=e.push(null)-1),n=t.options?a.call(this,t.options):t.stack,u="",p=0,l=n.length;l>p;p++)u+=i.call(this,n[p],e);return t.remember&&(e[t.groupNumber]=u),u;case h.POSITION:return"";case h.SET:var f=s.call(this,t);return f.length?String.fromCharCode(a.call(this,f)):"";case h.REPETITION:for(c=this.randInt(t.min,t.max===1/0?t.min+this.max:t.max),u="",p=0;c>p;p++)u+=i.call(this,t.value,e);return u;case h.REFERENCE:return e[t.value-1]||"";case h.CHAR:var g=this.ignoreCase&&o.call(this)?r(t.value):t.value;return String.fromCharCode(g)}}var c=n(28),p=n(24),h=c.types,l=t.exports=function(t,e){if(this.defaultRange=this.defaultRange.clone(),t instanceof RegExp)this.ignoreCase=t.ignoreCase,this.multiline=t.multiline,u(this,t),t=t.source;else{if("string"!=typeof t)throw new Error("Expected a regexp or string");this.ignoreCase=e&&-1!==e.indexOf("i"),this.multiline=e&&-1!==e.indexOf("m")}this.tokens=c(t)};l.prototype.max=100,l.prototype.gen=function(){return i.call(this,this.tokens,[])},l.randexp=function(t,e){var n;return void 0===t._randexp?(n=new l(t,e),t._randexp=n):n=t._randexp,u(n,t),n.gen()},l.sugar=function(){RegExp.prototype.gen=function(){return l.randexp(this)}},l.prototype.defaultRange=new p(32,126),l.prototype.randInt=function(t,e){return t+Math.floor(Math.random()*(1+e-t))}},function(t,e,n){var r=n(30),o=n(2),a=n(11),s=n(29);t.exports=function(t){var e,n,u=0,i={type:o.ROOT,stack:[]},c=i,p=i.stack,h=[],l=function(e){r.error(t,"Nothing to repeat at column "+(e-1))},f=r.strToChars(t);for(e=f.length;e>u;)switch(n=f[u++]){case"\\":switch(n=f[u++]){case"b":p.push(s.wordBoundary());break;case"B":p.push(s.nonWordBoundary());break;case"w":p.push(a.words());break;case"W":p.push(a.notWords());break;case"d":p.push(a.ints());break;case"D":p.push(a.notInts());break;case"s":p.push(a.whitespace());break;case"S":p.push(a.notWhitespace());break;default:/\d/.test(n)?p.push({type:o.REFERENCE,value:parseInt(n,10)}):p.push({type:o.CHAR,value:n.charCodeAt(0)})}break;case"^":p.push(s.begin());break;case"$":p.push(s.end());break;case"[":var g;"^"===f[u]?(g=!0,u++):g=!1;var d=r.tokenizeClass(f.slice(u),t);u+=d[1],p.push({type:o.SET,set:d[0],not:g});break;case".":p.push(a.anyChar());break;case"(":var y={type:o.GROUP,stack:[],remember:!0};n=f[u],"?"===n&&(n=f[u+1],u+=2,"="===n?y.followedBy=!0:"!"===n?y.notFollowedBy=!0:":"!==n&&r.error(t,"Invalid group, character '"+n+"' after '?' at column "+(u-1)),y.remember=!1),p.push(y),h.push(c),c=y,p=y.stack;break;case")":0===h.length&&r.error(t,"Unmatched ) at column "+(u-1)),c=h.pop(),p=c.options?c.options[c.options.length-1]:c.stack;break;case"|":c.options||(c.options=[c.stack],delete c.stack);var v=[];c.options.push(v),p=v;break;case"{":var R,C,m=/^(\d+)(,(\d+)?)?\}/.exec(f.slice(u));null!==m?(0===p.length&&l(u),R=parseInt(m[1],10),C=m[2]?m[3]?parseInt(m[3],10):1/0:R,u+=m[0].length,p.push({type:o.REPETITION,min:R,max:C,value:p.pop()})):p.push({type:o.CHAR,value:123});break;case"?":0===p.length&&l(u),p.push({type:o.REPETITION,min:0,max:1,value:p.pop()});break;case"+":0===p.length&&l(u),p.push({type:o.REPETITION,min:1,max:1/0,value:p.pop()});break;case"*":0===p.length&&l(u),p.push({type:o.REPETITION,min:0,max:1/0,value:p.pop()});break;default:p.push({type:o.CHAR,value:n.charCodeAt(0)})}return 0!==h.length&&r.error(t,"Unterminated group"),i},t.exports.types=o},function(t,e,n){var r=n(2);e.wordBoundary=function(){return{type:r.POSITION,value:"b"}},e.nonWordBoundary=function(){return{type:r.POSITION,value:"B"}},e.begin=function(){return{type:r.POSITION,value:"^"}},e.end=function(){return{type:r.POSITION,value:"$"}}},function(t,e,n){var r=n(2),o=n(11),a="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",s={0:0,t:9,n:10,v:11,f:12,r:13};e.strToChars=function(t){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g;return t=t.replace(e,function(t,e,n,r,o,u,i,c){if(n)return t;var p=e?8:r?parseInt(r,16):o?parseInt(o,16):u?parseInt(u,8):i?a.indexOf(i):s[c],h=String.fromCharCode(p);return/[\[\]{}\^$.|?*+()]/.test(h)&&(h="\\"+h),h})},e.tokenizeClass=function(t,n){for(var a,s,u=[],i=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g;null!=(a=i.exec(t));)if(a[1])u.push(o.words());else if(a[2])u.push(o.ints());else if(a[3])u.push(o.whitespace());else if(a[4])u.push(o.notWords());else if(a[5])u.push(o.notInts());else if(a[6])u.push(o.notWhitespace());else if(a[7])u.push({type:r.RANGE,from:(a[8]||a[9]).charCodeAt(0),to:a[10].charCodeAt(0)});else{if(!(s=a[12]))return[u,i.lastIndex];u.push({type:r.CHAR,value:s.charCodeAt(0)})}e.error(n,"Unterminated character class")},e.error=function(t,e){throw new SyntaxError("Invalid regular expression: /"+t+"/: "+e)}}])}); |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LC=e():t.LC=e()}(this,function(){return function(t){function e(s){if(i[s])return i[s].exports;var r=i[s]={exports:{},id:s,loaded:!1};return t[s].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";var s=i(14),r={Case:i(11),Instruction:i(3),type:i(4).type,parse:s.parse,parseAt:s.parseFragment};"undefined"!=typeof t&&t.exports?t.exports=r:window.LC=r},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){return new n(t,{beforeGen:!0,binop:e})}function r(t,e){e=e||{},e.keyword=t,u[t]=h["_"+t]=new n(t,e)}var n=function c(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];i(this,c),this.label=t,this.keyword=e.keyword,this.beforeGen=Boolean(e.beforeGen),this.beforeExpr=Boolean(e.beforeExpr),this.isAssign=Boolean(e.isAssign),this.prefix=Boolean(e.prefix),this.postfix=Boolean(e.postfix),this.binop=e.binop||null,this.macro=Boolean(e.macro)},o={beforeGen:!0},a={macro:!0},h={num:new n("num"),regexp:new n("regexp"),string:new n("string"),name:new n("name"),eof:new n("eof"),bracketL:new n("[",o),bracketR:new n("]"),braceL:new n("{",o),braceR:new n("}"),parenL:new n("(",o),parenR:new n(")"),comma:new n(",",o),semi:new n(";",o),colon:new n(":",o),tagNumL:new n("CountExpr",o),tagAtL:new n("TextExpr",o),tagFacL:new n("VisibilityExpr",o),tagR:new n("/>"),eq:new n("=",{beforeGen:!0,isAssign:!0}),assign:new n("_=",{beforeGen:!0,isAssign:!0}),incDec:new n("++/--",{prefix:!0,postfix:!0}),prefix:new n("prefix",{beforeGen:!0,prefix:!0}),logicalOR:s("||",1),logicalAND:s("&&",2),equality:s("==/!=",6),relational:s("</>",7),plusMin:new n("+/-",{beforeGen:!0,binop:9,prefix:!0}),modulo:s("%",10),star:s("*",10),slash:s("/",10),match:new n("~~",{beforeExpr:!0,binop:6})},u={};r("in"),r("by",o),r("to",o),r("click",o),r("input",o),r("rclick",o),r("dblclick",o),r("movein",o),r("moveout",o),r("scroll",o),r("select",o),r("TIMES",a),r("INTERVAL",a),r("SCREEN",a),r("AUTOWAIT",a),r("AUTOCAPTURE",a),r("wait",o),r("assert",o),r("log",o),r("console",o),r("var"),r("process"),r("return",o),r("true"),r("false"),r("jumpto"),r("refresh"),r("check"),r("uncheck"),t.exports={TokenType:n,types:h,keywordTypes:u}},,function(t,e,i){"use strict";var s=[],r=i(9).EventEmitter,n=new r,o=function(t,e){function i(t){this.$body=t.BODY,this.$line=t.LINE}var r=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if(1===arguments.length){var o=s[t];if(!o)throw new Error("TYPE:"+t+" instruction is not existed.");return o}if(s[t]&&!r)throw new Error("The instruction factory: TYPE="+t+" is existed.");return s[t]=i,i.prototype.$type=t,i.prototype.execute=function(t){if(!t)throw new Error("No case instance specified.");var i="INS["+this.$type+"]";return n.emit(i,this.$body,t,this.$line),e.call(this,t)},i.prototype.body=function(t){return this.$body[t]},i};o.createInstance=function(t,e){return new s[t]({body:e})},o.setupGuest=function(){var t=arguments.length<=0||void 0===arguments[0]?function(){}:arguments[0];n.removeAllListeners(),t(n)},t.exports=o},function(t,e,i){"use strict";var s=i(3),r={CALL:0,RETURN:1,EXPRESSION:16,WAIT:17,TRIGGER:18,ASSERT:19,JUMPTO:20,REFRESH:21,LOG:32,PROCESS:255},n=r.CALL,o=r.RETURN,a=r.EXPRESSION,h=r.WAIT,u=r.TRIGGER,c=r.ASSERT,p=r.JUMPTO,f=r.REFRESH,l=r.LOG;s(n,function(t){var e=this.body("identifier");t.$pushScope(e)}),s(o,function(t){t.$popScope()}),s(a,function(){return function(){}}),s(h,function(){return function(){}}),s(u,function(){return function(){}}),s(c,function(){return function(){}}),s(p,function(){return function(){}}),s(f,function(){return function(){}}),s(l,function(){return function(){}}),e.type=r,e.callMain=new(s(n))({BODY:{identifier:"main"}}),e.ret=new(s(o))({BODY:{}})},function(t,e){"use strict";function i(t){return 65>t?36===t:91>t?!0:97>t?95===t:123>t}function s(t){return 48>t?36===t:58>t?!0:65>t?!1:91>t?!0:97>t?95===t:123>t}var r=["in","by","to"],n=["click","input","rclick","dblclick","movein","moveout","scroll","select","check","uncheck","jumpto","refresh"],o=["TIMES","INTERVAL","SCREEN","AUTOWAIT","AUTOCAPTURE"],a=["wait","assert","log","console","var","process","return","true","false"].concat(r).concat(n),h=new RegExp("^("+a.join("|")+")$"),u=new RegExp("^("+o.join("|")+")$");t.exports={keywordRegexp:h,macroRegexp:u,isIdentifierStart:i,isIdentifierChar:s}},,function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var i=1,s=0;;){c.lastIndex=s;var r=c.exec(t);if(!(r&&r.index<e))return new p(i,e-s);++i,s=r.index+r[0].length}}function n(t,e,i){var s=t.split(c)[e.line-1],r=s.substr(0,e.column),n=h(r),u=o(n),p=a(i,n);return"\n"+s+"\n"+u+"\n"+p}function o(t){var e=" ".repeat(t)+"↑";return e+"\n"+e}function a(t,e){if(t.length/2>e)return t;for(var i=-1,s=e-Math.floor(t.length/2),r="";++i<s;)r+=" ";return r+=t}function h(t){for(var e=t.length,i=0,s=0,r="";e>s;s++)switch(r=t.charCodeAt(s)){case 9:i+=4;break;default:i+=1}return i}var u=function(){function t(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(e,i,s){return i&&t(e.prototype,i),s&&t(e,s),e}}(),c=i(8).lineBreakG,p=function(){function t(e,i){s(this,t),this.line=e,this.column=i}return u(t,[{key:"offset",value:function(e){return new t(this.line,this.column+e)}}]),t}();t.exports={getLineInfo:r,empowerErrMsg:n,Position:p}},function(t,e){"use strict";var i=/\r\n?|\n|\u2028|\u2029/;t.exports={lineBreak:i,lineBreakG:new RegExp(i.source,"g"),isNewLine:function(t){return 10===t||13===t||8232===t||8233===t}}},function(t,e){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function s(t){return"function"==typeof t}function r(t){return"number"==typeof t}function n(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!r(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,i,r,a,h,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(i=this._events[t],o(i))return!1;if(s(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),i.apply(this,a)}else if(n(i))for(a=Array.prototype.slice.call(arguments,1),u=i.slice(),r=u.length,h=0;r>h;h++)u[h].apply(this,a);return!0},i.prototype.addListener=function(t,e){var r;if(!s(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,s(e.listener)?e.listener:e),this._events[t]?n(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,n(this._events[t])&&!this._events[t].warned&&(r=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}if(!s(e))throw TypeError("listener must be a function");var r=!1;return i.listener=e,this.on(t,i),this},i.prototype.removeListener=function(t,e){var i,r,o,a;if(!s(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(i=this._events[t],o=i.length,r=-1,i===e||s(i.listener)&&i.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(n(i)){for(a=o;a-- >0;)if(i[a]===e||i[a].listener&&i[a].listener===e){r=a;break}if(0>r)return this;1===i.length?(i.length=0,delete this._events[t]):i.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[t],s(i))this.removeListener(t,i);else if(i)for(;i.length;)this.removeListener(t,i[i.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?s(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(s(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},,function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(){function t(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(e,i,s){return i&&t(e.prototype,i),s&&t(e,s),e}}(),a=i(9),h=i(3),u=i(4),c=u.callMain,p=u.ret,f=function(){},l=function(t){function e(){s(this,e);var t=r(this,Object.getPrototypeOf(e).call(this));return t.$$executionTree=null,t.$$config={times:1,interval:1e3,screen:null,autocapture:!1,autowait:!1},t.$$state="ready",t.$$exceptionFlag=!1,t.$$currentLoop=0,t.$$vars={},t.$$blockStack=[],t.$$scopeStack=[],t.$$instructionBuffer=null,t.$$tempInstruction=void 0,t.$$continueBuffer=null,t.on("$$block",function(){if("blocked"===t.state)throw new Error("The last instruction has not been executed.");t.state="blocked"}),t.on("$continue",function(e){if("running"===t.state)throw new Error("Look forward to a new instruction.");(t.$$continueBuffer||f)(e),t.$$exceptionFlag?(t.$clearScope().$exit(!1),t.$$exceptionFlag=!1):t.$$blockStack.length?t.$$run():t.$exit()}),t.on("$error",function(){t.$$exceptionFlag=!0,t.$$continueBuffer=null,t.emit("$continue")}),t}return n(e,t),o(e,[{key:"link",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1],i={process:{},config:{}},s=t.PROCESSES;return Object.keys(s).forEach(function(t){var e=i.process[t]=[],r=s[t];r.BODY.segment.forEach(function(t){var i=h(t.TYPE);e.push(new i(t))})}),Object.assign(this.$$config,t.CONFIG),this.$$executionTree=i,e(this),this}},{key:"config",value:function(t,e){if(!this.$$config.hasOwnProperty(t))throw new Error("Invalid configuration item: "+t+".");return e&&(this.$$config[t]=e),this.$$config[t]}},{key:"$$reset",value:function(){return this.$$currentLoop=0,this.$$vars={},this.$$blockStack=[],this.$$scopeStack=[],this.$$instructionBuffer=null,this.$tempInstruction=null,this}},{key:"$$bootstrap",value:function(){var t=this;return this.emit("bootstrap"),this.$$reset(),this.state="running",this.$$tempInstruction=c,setTimeout(function(){return t.$$run()},this.config("interval")),this}},{key:"$$popInstruction",value:function(){var t=this.$$tempInstruction,e=this.$currentBlock;return t?(this.$$tempInstruction=null,t):e?(this.$$instructionBuffer=e.segment[e.counter++],this.$$instructionBuffer):p}},{key:"$$run",value:function(){if("ready"!==this.state){this.state="running";var t=this.$$popInstruction();return this.$$continueBuffer=t.execute(this),this.emit("run",t),this.emit("$$block"),this.$$continueBuffer||this.emit("$continue"),this}}},{key:"$pushBlock",value:function(t){return this.$$blockStack.push({counter:0,segment:t}),this}},{key:"$popBlock",value:function(){return this.$$blockStack.pop(),this}},{key:"$pushScope",value:function(t){return this.$$scopeStack.push({blockIndex:this.$$blockStack.length}),this.$pushBlock(this.$$executionTree.process[t]),this}},{key:"$popScope",value:function(){return this.$$blockStack.length=this.$$scopeStack.pop().blockIndex,this}},{key:"$clearScope",value:function(){for(;this.$$scopeStack.length;)this.$popScope();return this}},{key:"$exit",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];return this.emit("end-loop",e),(this.$$currentLoop+=1)<this.config("times")?setTimeout(function(){t.$$tempInstruction=c,t.$$run()},this.config("interval")):(this.state="ready",this.emit("end")),this}},{key:"start",value:function(){return this.$$bootstrap(),this}},{key:"pause",value:function(){return this.state="ready",this}},{key:"resume",value:function(){return this.state="running",this.$$run(),this}},{key:"stop",value:function(){return this.pause().$$reset(),this}},{key:"state",get:function(){return this.$$state},set:function(t){var e=["ready","running","blocked"];if(-1===e.indexOf(t))throw new Error("Invalid symbol:"+t+", must be "+e.join(", ")+".");return this.$$state=t,t}},{key:"$currentBlock",get:function(){var t=this.$$blockStack.length-1;return this.$$blockStack[t]}},{key:"$currentLoop",get:function(){return this.$$currentLoop}},{key:"line",get:function(){return this.$$instructionBuffer.$line}}]),e}(a);t.exports=l},,function(t,e,i){"use strict";var s=i(1).types;t.exports=function(t){var e=t.prototype;e.parseExpression=function(){var t=this.parseMaybeAssign();if(this.type===s.comma){var e={type:"SequenceExpr"};for(e.expressions=[t];this.eat(s.comma);){var i=this.parseMaybeAssign();e.expressions.push(i)}return e}return t},e.parseMaybeAssign=function(){var t=this.parseMaybeConditional();if(this.type.isAssign){var e={type:"AssignmentExpr",left:t,operator:this.value};return this.next(),e.right=this.parseMaybeAssign(),e}return t},e.parseMaybeConditional=function(){return this.parseExprOps()},e.parseExprOps=function(){var t=this.start,e=this.parseMaybeUnary(!1);return this.parseExprOp(e,t,-1)},e.parseExprOp=function(t,e,i){var s=this.type.binop;if(null!=s&&s>i){var r=this.type,n=this.value;this.next();var o=this.start,a=this.parseExprOp(this.parseMaybeUnary(!1),o,s),h=this.buildBinary(e,t,a,n,r);return this.parseExprOp(h,e,i)}return t},e.buildBinary=function(t,e,i,r,n){var o={left:e,operator:r,right:i};return n===s.logicalAND||n===s.logicalOR?o.type="LogicalExpr":n===s.match?o.type="MatchExpr":o.type="BinaryExpr",o},e.parseMaybeUnary=function(){var t;if(this.type.prefix){var e={},i=this.type===s.incDec;e.operator=this.value,e.prefix=!0,this.next(),e.argument=this.parseMaybeUnary(!1),e.type=i?"UpdateExpr":"UnaryExpr",t=e}else for(t=this.parseExprSubscripts();this.type.postfix;){var r={};r.operator=this.value,r.prefix=!1,r.argument=t,this.next(),r.type="UpdateExpr",t=r}return t},e.parseExprSubscripts=function(){var t=this.parseExprAtom();return this.parseSubscripts(t)},e.parseSubscripts=function(t){for(;;){if(this.eat(s.parenL)){var e={type:"CallExpr",callee:t};return this.expect(s.parenR),e}return t}},e.parseExprAtom=function(){var t;switch(this.type){case s.name:return this.parseIndent(this.type!==s.name);case s.regexp:var e=this.value;return t=this.parseLiteral("regexp"),t.regexp=e,t;case s.num:case s.string:return this.parseLiteral("literal",this.value);case s._true:case s._false:return this.parseLiteral("literal",this.value);case s.objectAt:case s.dict:return this.parseExtLiteral(this.type);case s.parenL:return this.parseParenExpression();case s.tagAtL:case s.tagNumL:case s.tagFacL:return this.parseTagExpression();case s.bracketL:return this.parseElmAttr();case s.braceL:return this.parseElmStyle();default:this.inTag?this.raise(this.lastTokStart,"(missing `/` before `>` ?) Unexpected token"):this.unexpected()}},e.parseLiteral=function(t,e){var i={type:t,value:e,raw:this.input.slice(this.start,this.end)};return this.next(),i},e.parseExtLiteral=function(t){var e={type:t.label,value:this.value};return this.next(),e},e.parseParenExpression=function(){this.expect(s.parenL);var t=this.parseExpression();return this.expect(s.parenR),{type:"ParenthesizedExpr",expression:t}},e.parseTagExpression=function(){var t={type:this.type.label};return this.inTag=!0,this.next(),t.val=this.parseExpression(),this.expect(s.tagR),this.inTag=!1,t},e.parseIndent=function(){var t;return this.type===s.name?t=this.value:this.unexpected(),this.next(),{type:"Identifier",name:t}},e.parseElmAttr=function(){var t={type:"Attribute"};return this.next(),t.val=this.parseMaybeAssign(),this.expect(s.colon),t.key=this.type===s.string||s.number?this.parseExprAtom():this.parseIndent(),this.expect(s.bracketR),t},e.parseElmStyle=function(){var t={type:"Style"};return this.next(),t.val=this.parseMaybeAssign(),this.expect(s.colon),t.key=this.type===s.string||s.number?this.parseExprAtom():this.parseIndent(),this.expect(s.braceR),t}}},function(t,e,i){"use strict";var s=i(19);t.exports={parse:function(t,e){return new s(e,t).parse()},tokenizer:function(t,e){return new s(e,t)},parseFragment:function(t,e){var i=new s(e,t);return i.nextToken(),i.parseStatement()},keywordRegexp:i(5).keywordRegexp}},function(t,e,i){"use strict";var s=i(7),r=s.getLineInfo,n=s.empowerErrMsg;t.exports=function(t){var e=t.prototype;e.raise=function(t,e){var i=r(this.input,t);e+=" ("+i.line+":"+i.column+")";var s=this.options.left,o=this.options.right;e=s||o?s+e+o:n(this.input,i,e);var a=new SyntaxError(e);throw a.pos=t,a.loc=i,a.raisedAt=this.pos,a}}},function(t,e,i){"use strict";var s=i(1).types;t.exports=function(t){var e=t.prototype;e.parseBindingList=function(t,e,i){for(var r=[],n=!0;!this.eat(t);)if(n?n=!1:this.expect(s.comma),e&&this.type===s.comma)r.push(null);else{if(i)break;var o=this.parseIndent();r.push(o)}return r}}},function(t,e){"use strict";function i(t){var e={};for(var i in r)e[i]=t&&s(t,i)?t[i]:r[i];return e}var s=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r={insertReturn:!0,onComment:function(){},left:"",right:"",plugins:{}};t.exports={defaultOptions:r,getOptions:i}},function(t,e,i){"use strict";var s=i(1).types;t.exports=function(t){var e=t.prototype;e.eat=function(t){return this.type===t?(this.next(),!0):!1},e.semicolon=function(){this.eat(s.semi)||this.expected(s.semi)},e.expect=function(t){this.eat(t)||this.expected(t)},e.unexpected=function(){var t=arguments.length<=0||void 0===arguments[0]?this.start:arguments[0];this.raise(t,"Unexpected token")},e.expected=function(t){this.raise(this.lastTokEnd,'Expect a "'+t.label+'" after')},e.UID=function(t){return t+this.nextID++}}},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(e,i,s){return i&&t(e.prototype,i),s&&t(e,s),e}}(),n=i(17).getOptions,o=i(5),a=o.keywordRegexp,h=o.macroRegexp,u=i(1).types,c=function(){function t(e,i){s(this,t),this.options=n(e),this.keywords=a,this.macros=h,this.input=String(i),this.pos=0,this.type=u.eof,this.value=null,this.start=this.end=this.pos,this.lastTokStart=this.lastTokEnd=this.pos,this.exprAllowed=!1,this.genAllowed=!1,this.labels=[],this.conf={},this.keys={},this.nextID=0,this.pcs={},this.pcsTable={},this.inTag=!1}return r(t,[{key:"parse",value:function(){this.nextToken();var t={CONFIG:this.conf,DATA_KEYS:this.keys,PROCESSES:this.pcs};return this.parseTopLevel(t)}}]),t}();i(15)(c),i(21)(c),i(20)(c),i(18)(c),i(13)(c),i(16)(c),t.exports=c},function(t,e,i){"use strict";var s=i(1).types,r=i(7).getLineInfo,n=i(22),o=i(4).type;t.exports=function(t){var e=t.prototype;e.parseTopLevel=function(t){var e=this.pcsTable;for(e.main={pos:0};this.type!==s.eof;)this.parseStructure();for(var i in e)e[i]&&this.raise(e[i].pos,"Invalid process call at");return t},e.parseStructure=function(){var t=this.type;return t.macro?this.parseSet():t===s._process?this.parseProcess():void this.raise(this.start,"Expect a macro or process")},e.parseSet=function(){var t=this.type;t.macro||this.unexpected();var e=t.label.toLowerCase();this.writeConfig(e),this.next()},e.writeConfig=function(t){var e=void 0,i=this.conf;i[t]&&this.raise(this.start,this.type.keyword+" was defined already");var s=void 0,r=void 0,n=this.value.split(",");switch(t){case"screen":2!==n.length&&this.raise("Invalid arguments"),s=~~parseInt(n[0],10),r=~~parseInt(n[1],10),e={width:s,height:r};break;case"autoscroll":case"autocapture":case"autowait":e=!0;break;default:e=parseInt(this.value,10)}i[t]=e},e.parseProcess=function(){var t={LINE:r(this.input,this.start),TYPE:o.PROCESS,BODY:{}},e=this.pcs,i=this.pcsTable;this.next();var s=this.parseIndent().name;e[s]&&this.raise(this.start,s+" process was defined already"),e[s]=t,i[s]=!1,this.parsePcParam(t),this.parsePcBlock(t)},e.parsePcParam=function(t){this.eat(s.parenL)&&(t.BODY.params=this.parseBindingList(s.parenR,!1,!1))},e.parsePcBlock=function(t){var e=this.parseBlock();e.push({LINE:-1,TYPE:o.RETURN}),t.BODY.segment=e},e.parseBlock=function(){this.expect(s.braceL);for(var t=[];!this.eat(s.braceR);){var e=this.parseStatement(!0);t.push(e)}return t},e.parseStatement=function(){var t=this.type,e=this.startNode();switch(t){case s._click:case s._rclick:case s._dblclick:case s._movein:case s._moveout:return this.parseMouseAction(e,t.keyword);case s._select:return this.parseSelectAction(e);case s._scroll:return this.parseScrollAction(e,t.keyword);case s._input:return this.parseInputAction(e,t.keyword);case s._check:case s._uncheck:return this.parseCheck(e,t.keyword);case s._return:return this.parseReturnStatement(e);case s._wait:return this.parseWaitStatement(e);case s._assert:return this.parseAssertStatement(e);case s._log:case s._console:return this.parseLogStatement(e,o.LOG);case s._jumpto:return this.parseGotoStatement(e);case s._refresh:return this.parseRefreshStatement(e);case s._var:return this.parseVarStatement(e);case s.name:return this.parseExprStatement(e);default:return this.parseEvaluation(e)}},e.parseReturnStatement=function(t){return this.next(),this.eat(s.semi),this.finishNode(t,o.RETURN)},e.parseVarStatement=function(t){return this.next(),this.parseVar(t),t.BODY.exp=n(t.BODY.raw),this.semicolon(),this.finishNode(t,o.EXPRESSION)},e.parseVar=function(t){for(var e=[];;){var i={};if(i.id=this.parseIndent().name,this.eat(s.eq)?i.init=this.parseMaybeAssign():i.init=null,e.push(i),!this.eat(s.comma))break}t.BODY.raw={declarations:e,type:"varDecl"}},e.parseExprStatement=function(t){var e=this.parseExpression();if(this.semicolon(),"CallExpr"===e.type){var i=e.callee.name;return this.pcsTable[i]!==!1&&(this.pcsTable[i]={pos:this.lastTokStart}),t.BODY.identifier=i,this.finishNode(t,o.CALL)}var s=n(e);return t.BODY.raw=e,t.BODY.exp=s,this.finishNode(t,o.EXPRESSION)},e.parseEvaluation=function(t){var e=this.parseExpression();this.semicolon();var i=n(e);return t.BODY.raw=e,t.BODY.exp=i,this.finishNode(t,o.EXPRESSION)},e.parseWaitStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.delay=n(t.BODY.raw),this.semicolon(),this.finishNode(t,o.WAIT)},e.parseMouseAction=function(t,e){if(this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=n(t.BODY.raw),t.BODY.action=e,this.eat(s._to)){var i=void 0,r=void 0;i=this.parseMaybeAssign(),this.expect(s.comma),r=this.parseMaybeAssign(),t.BODY.posX=i,t.BODY.posY=r}return this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseScrollAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=n(t.BODY.raw),this.expect(s._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=n(t.BODY.raw1),t.BODY.action=e,this.finishNode(t,o.TRIGGER)},e.parseSelectAction=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=n(t.BODY.raw),this.expect(s._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=n(t.BODY.raw1),t.BODY.action="select",this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseInputAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=n(t.BODY.raw),this.expect(s._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=n(t.BODY.raw1),t.BODY.action=e,this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseCheck=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=n(t.BODY.raw),t.BODY.action=e,this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseAssertStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.exp=n(t.BODY.raw),this.eat(s._in)&&(this.type===s.num?t.BODY.timeout=this.value:this.unexpected(),this.next()),this.semicolon(),t.BODY.key=this.UID("#"),this.keys[t.BODY.key]=!!t.BODY.timeout,this.finishNode(t,o.ASSERT)},e.parseGotoStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.url=n(t.BODY.raw),this.semicolon(),this.finishNode(t,o.JUMPTO)},e.parseRefreshStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,o.REFRESH)},e.parseLogStatement=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.msg=n(t.BODY.raw),this.semicolon(),this.finishNode(t,e)},e.startNode=function(){return{LINE:r(this.input,this.start).line,TYPE:0,BODY:{},start:this.start,end:0}},e.finishNode=function(t,e){return t.TYPE=e,t.end=this.lastTokEnd,t}}},function(t,e,i){"use strict";var s=i(5),r=s.isIdentifierStart,n=s.isIdentifierChar,o=i(1).types,a=i(1).keywordTypes,h=i(8),u=h.isNewLine,c=h.lineBreak;t.exports=function(t){var e=t.prototype;e.next=function(){this.lastTokEnd=this.end,this.lastTokStart=this.start,this.nextToken()},e.nextToken=function(){return this.skipSpace(),this.start=this.pos,this.pos>=this.input.length?this.finishToken(o.eof):void this.readToken(this.fullCharCodeAtPos())},e.readToken=function(t){return r(t)?this.readWord():this.getTokenFromCode(t)},e.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(55295>=t||t>=57344)return t;var e=this.input.charCodeAt(this.pos+1);return(t<<10)+e-56613888},e.skipBlockComment=function(){var t=this.pos,e=this.input.indexOf("*/",this.pos+=2);-1===e&&this.raise(this.pos-2,"unterminated comment"),this.pos=e+2,this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,e),t,this.pos)},e.skipLineComment=function(t){for(var e=this.pos,i=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.pos,i=this.input.charCodeAt(this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+=t,this.pos),e,this.pos)},e.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&14>t))break t;++this.pos}}},e.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed||this.genAllowed?(++this.pos,this.readRegexp(this.genAllowed)):61===t?this.finishOp(o.assign,2):62===t?this.finishOp(o.tagR,2):this.finishOp(o.slash,1)},e.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,s=42===t?o.star:o.modulo;return 61===e?this.finishOp(o.assign,i+1):this.finishOp(s,i)},e.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(124===t?o.logicalOR:o.logicalAND,2):void this.raise(this.pos,"bitwise operator is not allowed")},e.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(o.incDec,2):61===e?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)},e.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;if(e===t&&this.raise(this.pos,"bitwise operator is not allowed"),60===t){if(35===e)return this.finishOp(o.tagNumL,2);if(64===e)return this.finishOp(o.tagAtL,2);if(33===e)return this.finishOp(o.tagFacL,2)}return 61===e&&(i=2),this.finishOp(o.relational,i)},e.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 126===e&&33===t?this.finishOp(o.match,2):61===e?this.finishOp(o.equality,61===this.input.charCodeAt(this.pos+2)?3:2):this.finishOp(61===t?o.eq:o.prefix,1)},e.getTokenFromCode=function(t){switch(t){case 35:return++this.pos,this.readMacro();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:var e=this.input.charCodeAt(this.pos+1);return 126!==e&&this.raise(this.pos,"bitwise operator is not allowed"),this.finishOp(o.match,2);default:this.raise(this.pos,'Unexpected character "'+this.input[this.pos]+'"')}},e.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+=e);return this.finishToken(t,i)},e.finishToken=function(t,e){this.end=this.pos,this.type=t,this.value=e,this.genAllowed=t.beforeGen,this.exprAllowed=t.beforeExpr},e.readRegexp=function(t){for(var e=void 0,i=void 0,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(c.test(r)&&this.raise(s,"Unterminated regular expression"),e)e=!1;else{if("["===r)i=!0;else if("]"===r&&i)i=!1;else if("/"===r&&!i)break;e="\\"===r}++this.pos}var n=this.input.slice(s,this.pos);++this.pos;var a=this.readWord1();if(a){var h=/^[gim]*$/;h.test(a)||this.raise(s,"Invalid regular expression flag")}var u={pattern:n,flags:a,isGenerate:t};return this.finishToken(o.regexp,u)},e.readInt=function(t,e){for(var i=this.pos,s=0,r=0,n=null==e?1/0:e;n>r;++r){var o=this.fullCharCodeAtPos(),a=void 0;if(a=o>=97?o-97+10:o>=65?o-65+10:o>=48&&57>=o?o-48:1/0,a>=t)break;++this.pos,s=s*t+a}return this.pos===i||null!=e&&this.pos-i!==e?null:s},e.readNumber=function(t){var e=this.pos,i=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid Number");var s=this.fullCharCodeAtPos();46===s&&(++this.pos,this.readInt(10),i=!0,s=this.fullCharCodeAtPos()),69!==s&&101!==s||(s=this.input.charCodeAt(++this.pos),43!==s&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),i=!0),r(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=this.input.slice(e,this.pos),a=void 0;return a=i?parseFloat(n):parseInt(n,10),this.finishToken(o.num,a)},e.readString=function(t){ | ||
for(var e="",i=this.start,s=++this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated string");var r=this.fullCharCodeAtPos();if(r===t)break;92===r?(e+=this.input.slice(s,this.pos),e+=this.readEscapedChar(),s=this.pos):(u(r)&&this.raise(i,"Unterminated string"),++this.pos)}return e+=this.input.slice(s,this.pos++),this.finishToken(o.string,e)},e.readEscapedChar=function(){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 116:return" ";case 98:return"\b";case 118:return"\x0B";case 102:return"\f";case 13:10===this.fullCharCodeAtPos()&&++this.pos;case 10:return"";default:return String.fromCharCode(t)}},e.readWord1=function(){for(var t="",e=this.pos;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(!n(i))break;++this.pos}return t+=this.input.slice(e,this.pos)},e.readWord=function(){var t=this.readWord1(),e=this.keywords.test(t)?a[t]:o.name;return this.finishToken(e,t)},e.readMacro=function(){var t=this.pos,e=this.readWord1();this.macros.test(e)||this.raise(t,"invalid macros");for(var i=a[e],s=this.pos,r=this.fullCharCodeAtPos();this.pos<this.input.length&&10!==r&&13!==r&&8232!==r&&8233!==r;)++this.pos,r=this.input.charCodeAt(this.pos);var n=this.input.slice(s,this.pos).trim();return this.finishToken(i,n)}}},function(t,e){"use strict";var i={varDecl:function(t,e){var i="",s=!0;return t.declarations.forEach(function(t){t.init&&(s||(i+=","),i+="$."+t.id+" = "+e(t.init),s=!1)}),"("+i+")"},SequenceExpr:function(t,e){var i="",s=!0;return t.expressions.forEach(function(t){s||(i+=","),i+=e(t),s=!1}),"("+i+")"},literal:function(t){return t.raw},regexp:function(t){if(t.regexp.isGenerate){var e=t.regexp;return"gen(/"+e.pattern+"/"+e.flags+")"}return"("+t.raw+")"},Identifier:function(t){return"$."+t.name},LogicalExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},BinaryExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},MatchExpr:function(t,e){var i="";return"~~"===t.operator&&(i+="!"),i+"!m("+e(t.left)+","+e(t.right)+")"},UpdateExpr:function(t){var e="$."+t.argument;return t.prefix?t.operator+e:e+t.operator},UnaryExpr:function(t,e){return t.operator+"("+e(t.argument)+")"},AssignmentExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},ParenthesizedExpr:function(t,e){return"("+e(t.expression)+")"},Attribute:function(t,e){var i=e(t.val);return"d("+e(t.key)+","+i+")"},Style:function(t,e){var i=e(t.val);return"o("+e(t.key)+","+i+")"},TextExpr:function(t,e){var i="String("+e(t.val)+")";return"t("+i+")"},CountExpr:function(t,e){var i="String("+e(t.val)+")";return"c("+i+")"},VisibilityExpr:function(t,e){var i="String("+e(t.val)+")";return"v("+i+")"}};t.exports=function(t){var e=function s(t){var e=t.type;return i[e](t,s)}(t).replace("\\","\\\\");return"return "+e+";"}}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LC=e():t.LC=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";var n=i(15),r={Case:i(12),Instruction:i(3),type:i(4).type,parse:n.parse,parseAt:n.parseFragment};"undefined"!=typeof t&&t.exports?t.exports=r:window.LC=r},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){return new s(t,{beforeGen:!0,binop:e})}function r(t,e){e=e||{},e.keyword=t,u[t]=h["_"+t]=new s(t,e)}var s=function c(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];i(this,c),this.label=t,this.keyword=e.keyword,this.beforeGen=Boolean(e.beforeGen),this.beforeExpr=Boolean(e.beforeExpr),this.isAssign=Boolean(e.isAssign),this.prefix=Boolean(e.prefix),this.postfix=Boolean(e.postfix),this.binop=e.binop||null,this.macro=Boolean(e.macro)},o={beforeGen:!0},a={macro:!0},h={num:new s("num"),regexp:new s("regexp"),string:new s("string"),name:new s("name"),eof:new s("eof"),bracketL:new s("[",o),bracketR:new s("]"),braceL:new s("{",o),braceR:new s("}"),parenL:new s("(",o),parenR:new s(")"),comma:new s(",",o),semi:new s(";",o),colon:new s(":",o),tagNumL:new s("CountExpr",o),tagAtL:new s("TextExpr",o),tagFacL:new s("VisibilityExpr",o),tagR:new s("/>"),pipe:new s("|"),eq:new s("=",{beforeGen:!0,isAssign:!0}),assign:new s("_=",{beforeGen:!0,isAssign:!0}),incDec:new s("++/--",{prefix:!0,postfix:!0}),prefix:new s("prefix",{beforeGen:!0,prefix:!0}),logicalOR:n("||",1),logicalAND:n("&&",2),equality:n("==/!=",6),relational:n("</>",7),plusMin:new s("+/-",{beforeGen:!0,binop:9,prefix:!0}),modulo:n("%",10),star:n("*",10),slash:n("/",10),match:new s("~~",{beforeExpr:!0,binop:6})},u={};r("in"),r("by",o),r("to",o),r("click",o),r("input",o),r("rclick",o),r("dblclick",o),r("movein",o),r("moveout",o),r("scroll",o),r("select",o),r("TIMES",a),r("INTERVAL",a),r("SCREEN",a),r("AUTOWAIT",a),r("AUTOCAPTURE",a),r("wait",o),r("assert",o),r("log",o),r("console",o),r("var"),r("process"),r("return",o),r("true"),r("false"),r("if"),r("else"),r("while"),r("jumpto"),r("refresh"),r("check"),r("uncheck"),t.exports={TokenType:s,types:h,keywordTypes:u}},,function(t,e,i){"use strict";var n=[],r=i(10).EventEmitter,s=new r,o=function(t,e){function i(t){this.$body=t.BODY,this.$line=t.LINE}var r=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if(1===arguments.length){var o=n[t];if(!o)throw new Error("TYPE:"+t+" instruction is not existed.");return o}if(n[t]&&!r)throw new Error("The instruction factory: TYPE="+t+" is existed.");return n[t]=i,i.prototype.$type=t,i.prototype.execute=function(t){if(!t)throw new Error("No case instance specified.");var i="INS["+this.$type+"]";return s.emit(i,this.$body,t,this.$line),e.call(this,t)},i.prototype.body=function(t){return this.$body[t]},i};o.createInstance=function(t,e){return new n[t]({body:e})},o.setupGuest=function(){var t=arguments.length<=0||void 0===arguments[0]?function(){}:arguments[0];s.removeAllListeners(),t(s)},t.exports=o},function(t,e,i){"use strict";var n=i(3),r={CALL:0,RETURN:1,EXPRESSION:16,WAIT:17,TRIGGER:18,ASSERT:19,JUMPTO:20,REFRESH:21,LOG:32,PROCESS:255},s=r.CALL,o=r.RETURN,a=r.EXPRESSION,h=r.WAIT,u=r.TRIGGER,c=r.ASSERT,p=r.JUMPTO,l=r.REFRESH,f=r.LOG;n(s,function(t){var e=this.body("identifier");t.$pushScope(e)}),n(o,function(t){t.$popScope()}),n(a,function(){return function(){}}),n(h,function(){return function(){}}),n(u,function(){return function(){}}),n(c,function(){return function(){}}),n(p,function(){return function(){}}),n(l,function(){return function(){}}),n(f,function(){return function(){}}),e.type=r,e.callMain=new(n(s))({BODY:{identifier:"main"}}),e.ret=new(n(o))({BODY:{}})},function(t,e){"use strict";function i(t){return 65>t?36===t:91>t?!0:97>t?95===t:123>t}function n(t){return 48>t?36===t:58>t?!0:65>t?!1:91>t?!0:97>t?95===t:123>t}var r=["in","by","to"],s=["click","input","rclick","dblclick","movein","moveout","scroll","select","check","uncheck","jumpto","refresh"],o=["TIMES","INTERVAL","SCREEN","AUTOWAIT","AUTOCAPTURE"],a=["wait","assert","log","console","var","process","return","true","false","if","else","while"].concat(r).concat(s),h=new RegExp("^("+a.join("|")+")$"),u=new RegExp("^("+o.join("|")+")$");t.exports={keywordRegexp:h,macroRegexp:u,isIdentifierStart:i,isIdentifierChar:n}},function(t,e,i){(function(t,n){function r(t,e){this._id=t,this._clearFn=e}var s=i(26).nextTick,o=Function.prototype.apply,a=Array.prototype.slice,h={},u=0;e.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var i=u++,n=arguments.length<2?!1:a.call(arguments,1);return h[i]=!0,s(function(){h[i]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(i))}),i},e.clearImmediate="function"==typeof n?n:function(t){delete h[t]}}).call(e,i(6).setImmediate,i(6).clearImmediate)},,function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var i=1,n=0;;){c.lastIndex=n;var r=c.exec(t);if(!(r&&r.index<e))return new p(i,e-n);++i,n=r.index+r[0].length}}function s(t,e,i){var n=t.split(c)[e.line-1],r=n.substr(0,e.column),s=h(r),u=o(s),p=a(i,s);return"\n"+n+"\n"+u+"\n"+p}function o(t){var e=" ".repeat(t)+"↑";return e+"\n"+e}function a(t,e){if(t.length/2>e)return t;for(var i=-1,n=e-Math.floor(t.length/2),r="";++i<n;)r+=" ";return r+=t}function h(t){for(var e=t.length,i=0,n=0,r="";e>n;n++)switch(r=t.charCodeAt(n)){case 9:i+=4;break;default:i+=1}return i}var u=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),c=i(9).lineBreakG,p=function(){function t(e,i){n(this,t),this.line=e,this.column=i}return u(t,[{key:"offset",value:function(e){return new t(this.line,this.column+e)}}]),t}();t.exports={getLineInfo:r,empowerErrMsg:s,Position:p}},function(t,e){"use strict";var i=/\r\n?|\n|\u2028|\u2029/;t.exports={lineBreak:i,lineBreakG:new RegExp(i.source,"g"),isNewLine:function(t){return 10===t||13===t||8232===t||8233===t}}},function(t,e){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function r(t){return"number"==typeof t}function s(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!r(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,i,r,a,h,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(i=this._events[t],o(i))return!1;if(n(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),i.apply(this,a)}else if(s(i))for(a=Array.prototype.slice.call(arguments,1),u=i.slice(),r=u.length,h=0;r>h;h++)u[h].apply(this,a);return!0},i.prototype.addListener=function(t,e){var r;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?s(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,s(this._events[t])&&!this._events[t].warned&&(r=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var r=!1;return i.listener=e,this.on(t,i),this},i.prototype.removeListener=function(t,e){var i,r,o,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(i=this._events[t],o=i.length,r=-1,i===e||n(i.listener)&&i.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(s(i)){for(a=o;a-- >0;)if(i[a]===e||i[a].listener&&i[a].listener===e){r=a;break}if(0>r)return this;1===i.length?(i.length=0,delete this._events[t]):i.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[t],n(i))this.removeListener(t,i);else if(i)for(;i.length;)this.removeListener(t,i[i.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},,function(t,e,i){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),a=i(10),h=i(3),u=i(4),c=u.callMain,p=u.ret,l=function(){},f=function(t){function i(){n(this,i);var t=r(this,Object.getPrototypeOf(i).call(this));return t.$$executionTree=null,t.$$config={times:1,interval:1e3,screen:null,autocapture:!1,autowait:!1},t.$$state="ready",t.$$exceptionFlag=!1,t.$$currentLoop=0,t.$$vars={},t.$$blockStack=[],t.$$scopeStack=[],t.$$instructionBuffer=null,t.$$tempInstruction=void 0,t.$$continueBuffer=null,t.on("$$block",function(){if("blocked"===t.state)throw new Error("The last instruction has not been executed.");t.state="blocked"}),t.on("$continue",function(e){if("running"===t.state)throw new Error("Look forward to a new instruction.");(t.$$continueBuffer||l)(e),t.$$exceptionFlag?(t.$clearScope().$exit(!1),t.$$exceptionFlag=!1):t.$$blockStack.length?t.$$run():t.$exit()}),t.on("$error",function(){t.$$exceptionFlag=!0,t.$$continueBuffer=null,t.emit("$continue")}),t}return s(i,t),o(i,[{key:"link",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1],i={process:{},config:{}},n=t.PROCESSES;return Object.keys(n).forEach(function(t){var e=i.process[t]=[],r=n[t];r.BODY.segment.forEach(function(t){var i=h(t.TYPE);e.push(new i(t))})}),Object.assign(this.$$config,t.CONFIG),this.$$executionTree=i,e(this),this}},{key:"config",value:function(t,e){if(!this.$$config.hasOwnProperty(t))throw new Error("Invalid configuration item: "+t+".");return e&&(this.$$config[t]=e),this.$$config[t]}},{key:"$$reset",value:function(){return this.$$currentLoop=0,this.$$vars={},this.$$blockStack=[],this.$$scopeStack=[],this.$$instructionBuffer=null,this.$tempInstruction=null,this}},{key:"$$bootstrap",value:function(){var t=this;return this.emit("bootstrap"),this.$$reset(),this.state="running",this.$$tempInstruction=c,setTimeout(function(){return t.$$run()},this.config("interval")),this}},{key:"$$popInstruction",value:function(){var t=this.$$tempInstruction,e=this.$currentBlock;return t?(this.$$tempInstruction=null,t):e?(this.$$instructionBuffer=e.segment[e.counter++],this.$$instructionBuffer):p}},{key:"$$run",value:function(){if("ready"!==this.state){this.state="running";var t=this.$$popInstruction();return this.$$continueBuffer=t.execute(this),this.emit("run",t),this.emit("$$block"),this.$$continueBuffer||this.emit("$continue"),this}}},{key:"$pushBlock",value:function(t){return this.$$blockStack.push({counter:0,segment:t}),this}},{key:"$popBlock",value:function(){return this.$$blockStack.pop(),this}},{key:"$pushScope",value:function(t){return this.$$scopeStack.push({blockIndex:this.$$blockStack.length}),this.$pushBlock(this.$$executionTree.process[t]),this}},{key:"$popScope",value:function(){return this.$$blockStack.length=this.$$scopeStack.pop().blockIndex,this}},{key:"$clearScope",value:function(){for(;this.$$scopeStack.length;)this.$popScope();return this}},{key:"$exit",value:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];return e(function(){return t.emit("end-loop",i)}),(this.$$currentLoop+=1)<this.config("times")?setTimeout(function(){t.$$tempInstruction=c,t.$$run()},this.config("interval")):(this.state="ready",e(function(){return t.emit("end")})),this}},{key:"start",value:function(){return this.$$bootstrap(),this}},{key:"pause",value:function(){return this.state="ready",this}},{key:"resume",value:function(){return this.state="running",this.$$run(),this}},{key:"stop",value:function(){return this.pause().$$reset(),this}},{key:"state",get:function(){return this.$$state},set:function(t){var e=["ready","running","blocked"];if(-1===e.indexOf(t))throw new Error("Invalid symbol:"+t+", must be "+e.join(", ")+".");return this.$$state=t,t}},{key:"$currentBlock",get:function(){var t=this.$$blockStack.length-1;return this.$$blockStack[t]}},{key:"$currentLoop",get:function(){return this.$$currentLoop}},{key:"line",get:function(){return this.$$instructionBuffer.$line}}]),i}(a);t.exports=f}).call(e,i(6).setImmediate)},,function(t,e,i){"use strict";var n=i(1).types;t.exports=function(t){var e=t.prototype;e.parseExpression=function(){var t=this.parseMaybeAssign();if(this.type===n.comma){var e={type:"SequenceExpr"};for(e.expressions=[t];this.eat(n.comma);){var i=this.parseMaybeAssign();e.expressions.push(i)}return e}return t},e.parseMaybeAssign=function(){var t=this.parseMaybeConditional();if(this.type.isAssign){var e={type:"AssignmentExpr",left:t,operator:this.value};return this.next(),e.right=this.parseMaybeAssign(),e}return t},e.parseMaybeConditional=function(){return this.parseExprOps()},e.parseExprOps=function(){var t=this.start,e=this.parseMaybeUnary(!1);return this.parseExprOp(e,t,-1)},e.parseExprOp=function(t,e,i){var n=this.type.binop;if(null!=n&&n>i){var r=this.type,s=this.value;this.next();var o=this.start,a=this.parseExprOp(this.parseMaybeUnary(!1),o,n),h=this.buildBinary(e,t,a,s,r);return this.parseExprOp(h,e,i)}return t},e.buildBinary=function(t,e,i,r,s){var o={left:e,operator:r,right:i};return s===n.logicalAND||s===n.logicalOR?o.type="LogicalExpr":s===n.match?o.type="MatchExpr":o.type="BinaryExpr",o},e.parseMaybeUnary=function(){var t;if(this.type.prefix){var e={},i=this.type===n.incDec;e.operator=this.value,e.prefix=!0,this.next(),e.argument=this.parseMaybeUnary(!1),e.type=i?"UpdateExpr":"UnaryExpr",t=e}else for(t=this.parseExprSubscripts();this.type.postfix;){var r={};r.operator=this.value,r.prefix=!1,r.argument=t,this.next(),r.type="UpdateExpr",t=r}return t},e.parseExprSubscripts=function(){var t=this.parseExprAtom();return this.parseSubscripts(t)},e.parseSubscripts=function(t){for(;;){if(this.eat(n.parenL)){var e={type:"CallExpr",callee:t};return this.expect(n.parenR),e}if(!this.eat(n.pipe))return t;var i={type:"FilterExpr",object:t,filter:this.parseIndent().name};this.expect(n.parenL),i.params=this.parseExprList(n.parenR,!1,!1),t=i}},e.parseExprAtom=function(){var t;switch(this.type){case n.name:return this.parseIndent(this.type!==n.name);case n.regexp:var e=this.value;return t=this.parseLiteral("regexp"),t.regexp=e,t;case n.num:case n.string:return this.parseLiteral("literal",this.value);case n._true:case n._false:return this.parseLiteral("literal",this.value);case n.objectAt:case n.dict:return this.parseExtLiteral(this.type);case n.parenL:return this.parseParenExpression();case n.tagAtL:case n.tagNumL:case n.tagFacL:return this.parseTagExpression();case n.bracketL:return this.parseElmAttr();case n.braceL:return this.parseElmStyle();default:this.inTag?this.raise(this.lastTokStart,"(missing `/` before `>` ?) Unexpected token"):this.unexpected()}},e.parseLiteral=function(t,e){var i={type:t,value:e,raw:this.input.slice(this.start,this.end)};return this.next(),i},e.parseExtLiteral=function(t){var e={type:t.label,value:this.value};return this.next(),e},e.parseParenExpression=function(){this.expect(n.parenL);var t=this.parseExpression();return this.expect(n.parenR),{type:"ParenthesizedExpr",expression:t}},e.parseTagExpression=function(){var t={type:this.type.label};return this.inTag=!0,this.next(),t.val=this.parseExpression(),this.expect(n.tagR),this.inTag=!1,t},e.parseExprList=function(t,e,i){for(var r=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(n.comma),e&&this.type===n.comma)r.push(null);else{var o=this.parseMaybeAssign();r.push(o)}return r},e.parseIndent=function(){var t;return this.type===n.name?t=this.value:this.unexpected(),this.next(),{type:"Identifier",name:t}},e.parseElmAttr=function(){var t={type:"Attribute"};return this.next(),t.val=this.parseMaybeAssign(),this.expect(n.colon),t.key=this.type===n.string||n.number?this.parseExprAtom():this.parseIndent(),this.expect(n.bracketR),t},e.parseElmStyle=function(){var t={type:"Style"};return this.next(),t.val=this.parseMaybeAssign(),this.expect(n.colon),t.key=this.type===n.string||n.number?this.parseExprAtom():this.parseIndent(),this.expect(n.braceR),t}}},function(t,e,i){"use strict";var n=i(20);t.exports={parse:function(t,e){return new n(e,t).parse()},tokenizer:function(t,e){return new n(e,t)},parseFragment:function(t,e){var i=new n(e,t);return i.nextToken(),i.parseStatement()},keywordRegexp:i(5).keywordRegexp}},function(t,e,i){"use strict";var n=i(8),r=n.getLineInfo,s=n.empowerErrMsg;t.exports=function(t){var e=t.prototype;e.raise=function(t,e){var i=r(this.input,t);e+=" ("+i.line+":"+i.column+")";var n=this.options.left,o=this.options.right;e=n||o?n+e+o:s(this.input,i,e);var a=new SyntaxError(e);throw a.pos=t,a.loc=i,a.raisedAt=this.pos,a}}},function(t,e,i){"use strict";var n=i(1).types;t.exports=function(t){var e=t.prototype;e.parseBindingList=function(t,e,i){for(var r=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(n.comma),e&&this.type===n.comma)r.push(null);else{if(i)break;var o=this.parseIndent();r.push(o)}return r}}},function(t,e){"use strict";function i(t){var e={};for(var i in r)e[i]=t&&n(t,i)?t[i]:r[i];return e}var n=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r={insertReturn:!0,onComment:function(){},left:"",right:"",plugins:{}};t.exports={defaultOptions:r,getOptions:i}},function(t,e,i){"use strict";var n=i(1).types;t.exports=function(t){var e=t.prototype;e.eat=function(t){return this.type===t?(this.next(),!0):!1},e.semicolon=function(){this.eat(n.semi)||this.expected(n.semi)},e.expect=function(t){this.eat(t)||this.expected(t)},e.unexpected=function(){var t=arguments.length<=0||void 0===arguments[0]?this.start:arguments[0];this.raise(t,"Unexpected token")},e.expected=function(t){this.raise(this.lastTokEnd,'Expect a "'+t.label+'" after')},e.UID=function(t){return t+this.nextID++}}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),s=i(18).getOptions,o=i(5),a=o.keywordRegexp,h=o.macroRegexp,u=i(1).types,c=function(){function t(e,i){n(this,t),this.options=s(e),this.keywords=a,this.macros=h,this.input=String(i),this.pos=0,this.type=u.eof,this.value=null,this.start=this.end=this.pos,this.lastTokStart=this.lastTokEnd=this.pos,this.exprAllowed=!1,this.genAllowed=!1,this.labels=[],this.conf={},this.keys={},this.nextID=0,this.pcs={},this.pcsTable={},this.inTag=!1}return r(t,[{key:"parse",value:function(){this.nextToken();var t={CONFIG:this.conf,DATA_KEYS:this.keys,PROCESSES:this.pcs};return this.parseTopLevel(t)}}]),t}();i(16)(c),i(22)(c),i(21)(c),i(19)(c),i(14)(c),i(17)(c),t.exports=c},function(t,e,i){"use strict";var n=i(1).types,r=i(8).getLineInfo,s=i(23),o=i(4).type;t.exports=function(t){var e=t.prototype;e.parseTopLevel=function(t){var e=this.pcsTable;for(e.main={pos:0};this.type!==n.eof;)this.parseStructure();for(var i in e)e[i]&&this.raise(e[i].pos,"Invalid process call at");return t},e.parseStructure=function(){var t=this.type;return t.macro?this.parseSet():t===n._process?this.parseProcess():void this.raise(this.start,"Expect a macro or process")},e.parseSet=function(){var t=this.type;t.macro||this.unexpected();var e=t.label.toLowerCase();this.writeConfig(e),this.next()},e.writeConfig=function(t){var e=void 0,i=this.conf;i[t]&&this.raise(this.start,this.type.keyword+" was defined already");var n=void 0,r=void 0,s=this.value.split(",");switch(t){case"screen":2!==s.length&&this.raise("Invalid arguments"),n=~~parseInt(s[0],10),r=~~parseInt(s[1],10),e={width:n,height:r};break;case"autoscroll":case"autocapture":case"autowait":e=!0;break;default:e=parseInt(this.value,10)}i[t]=e},e.parseProcess=function(){var t={LINE:r(this.input,this.start),TYPE:o.PROCESS,BODY:{}},e=this.pcs,i=this.pcsTable;this.next();var n=this.parseIndent().name;e[n]&&this.raise(this.start,n+" process was defined already"),e[n]=t,i[n]=!1,this.parsePcParam(t),this.parsePcBlock(t)},e.parsePcParam=function(t){this.eat(n.parenL)&&(t.BODY.params=this.parseBindingList(n.parenR,!1,!1))},e.parsePcBlock=function(t){var e=this.parseBlock();e.push({LINE:-1,TYPE:o.RETURN}),t.BODY.segment=e},e.parseBlock=function(){this.expect(n.braceL);for(var t=[];!this.eat(n.braceR);){var e=this.parseStatement(!0);t.push(e)}return t},e.parseStatement=function(){var t=this.type,e=this.startNode();switch(t){case n._click:case n._rclick:case n._dblclick:case n._movein:case n._moveout:return this.parseMouseAction(e,t.keyword);case n._select:return this.parseSelectAction(e);case n._scroll:return this.parseScrollAction(e,t.keyword);case n._input:return this.parseInputAction(e,t.keyword);case n._check:case n._uncheck:return this.parseCheck(e,t.keyword);case n._return:return this.parseReturnStatement(e);case n._wait:return this.parseWaitStatement(e);case n._assert:return this.parseAssertStatement(e);case n._log:case n._console:return this.parseLogStatement(e,o.LOG);case n._jumpto:return this.parseGotoStatement(e);case n._refresh:return this.parseRefreshStatement(e);case n._var:return this.parseVarStatement(e);case n.name:return this.parseExprStatement(e);case n._if:return this.parseIfStatement(e);case n._while:return this.parseWhileStatement(e);case n.braceL:return this.parseBlock();default:return this.parseEvaluation(e)}},e.parseReturnStatement=function(t){return this.next(),this.eat(n.semi),this.finishNode(t,o.RETURN)},e.parseVarStatement=function(t){return this.next(),this.parseVar(t),t.BODY.exp=s(t.BODY.raw),this.semicolon(),this.finishNode(t,o.EXPRESSION)},e.parseVar=function(t){for(var e=[];;){var i={};if(i.id=this.parseIndent().name,this.eat(n.eq)?i.init=this.parseMaybeAssign():i.init=null,e.push(i),!this.eat(n.comma))break}t.BODY.raw={declarations:e,type:"varDecl"}},e.parseExprStatement=function(t){var e=this.parseExpression();if(this.semicolon(),"CallExpr"===e.type){var i=e.callee.name;return this.pcsTable[i]!==!1&&(this.pcsTable[i]={pos:this.lastTokStart}),t.BODY.identifier=i,this.finishNode(t,o.CALL)}var n=s(e);return t.BODY.raw=e,t.BODY.exp=n,this.finishNode(t,o.EXPRESSION)},e.parseEvaluation=function(t){var e=this.parseExpression();this.semicolon();var i=s(e);return t.BODY.raw=e,t.BODY.exp=i,this.finishNode(t,o.EXPRESSION)},e.parseWaitStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.delay=s(t.BODY.raw),this.semicolon(),this.finishNode(t,o.WAIT)},e.parseMouseAction=function(t,e){if(this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=s(t.BODY.raw),t.BODY.action=e,this.eat(n._to)){var i=void 0,r=void 0;i=this.parseMaybeAssign(),this.expect(n.comma),r=this.parseMaybeAssign(),t.BODY.posX=i,t.BODY.posY=r}return this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseScrollAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=s(t.BODY.raw),this.expect(n._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=s(t.BODY.raw1),t.BODY.action=e,this.finishNode(t,o.TRIGGER)},e.parseSelectAction=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=s(t.BODY.raw),this.expect(n._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=s(t.BODY.raw1),t.BODY.action="select",this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseInputAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=s(t.BODY.raw),this.expect(n._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=s(t.BODY.raw1),t.BODY.action=e,this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseCheck=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=s(t.BODY.raw),t.BODY.action=e,this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseAssertStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.exp=s(t.BODY.raw),this.eat(n._in)&&(this.type===n.num?t.BODY.timeout=this.value:this.unexpected(),this.next()),this.semicolon(),t.BODY.key=this.UID("#"),this.keys[t.BODY.key]=!!t.BODY.timeout,this.finishNode(t,o.ASSERT)},e.parseGotoStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.url=s(t.BODY.raw),this.semicolon(),this.finishNode(t,o.JUMPTO)},e.parseRefreshStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,o.REFRESH)},e.parseLogStatement=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.msg=s(t.BODY.raw),this.semicolon(),this.finishNode(t,e)},e.parseIfStatement=function(t){return this.next(),t.test=this.parseExpression(),t.consequent=this.parseBlock(),t.alternate=this.eat(n._else)?this.parseStatement():null,this.finishNode(t,"If")},e.parseWhileStatement=function(t){return this.next(),t.test=this.parseExpression(),t.body=this.parseStatement(),this.finishNode(t,"While")},e.startNode=function(){return{LINE:r(this.input,this.start).line,TYPE:0,BODY:{},start:this.start,end:0}},e.finishNode=function(t,e){return t.TYPE=e,t.end=this.lastTokEnd,t}}},function(t,e,i){"use strict";var n=i(5),r=n.isIdentifierStart,s=n.isIdentifierChar,o=i(1).types,a=i(1).keywordTypes,h=i(9),u=h.isNewLine,c=h.lineBreak;t.exports=function(t){var e=t.prototype;e.next=function(){this.lastTokEnd=this.end,this.lastTokStart=this.start,this.nextToken()},e.nextToken=function(){return this.skipSpace(),this.start=this.pos,this.pos>=this.input.length?this.finishToken(o.eof):void this.readToken(this.fullCharCodeAtPos())},e.readToken=function(t){return r(t)?this.readWord():this.getTokenFromCode(t)},e.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(55295>=t||t>=57344)return t;var e=this.input.charCodeAt(this.pos+1);return(t<<10)+e-56613888},e.skipBlockComment=function(){var t=this.pos,e=this.input.indexOf("*/",this.pos+=2);-1===e&&this.raise(this.pos-2,"unterminated comment"),this.pos=e+2,this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,e),t,this.pos)},e.skipLineComment=function(t){for(var e=this.pos,i=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.pos,i=this.input.charCodeAt(this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+=t,this.pos),e,this.pos)},e.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&14>t))break t;++this.pos}}},e.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed||this.genAllowed?(++this.pos,this.readRegexp(this.genAllowed)):61===t?this.finishOp(o.assign,2):62===t?this.finishOp(o.tagR,2):this.finishOp(o.slash,1)},e.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,n=42===t?o.star:o.modulo;return 61===e?this.finishOp(o.assign,i+1):this.finishOp(n,i)},e.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(124===t?o.logicalOR:o.logicalAND,2):124===t?this.finishOp(o.pipe,1):void this.raise(this.pos,"bitwise operator is not allowed")},e.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(o.incDec,2):61===e?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)},e.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;if(e===t&&this.raise(this.pos,"bitwise operator is not allowed"),60===t){if(35===e)return this.finishOp(o.tagNumL,2);if(64===e)return this.finishOp(o.tagAtL,2);if(33===e)return this.finishOp(o.tagFacL,2)}return 61===e&&(i=2),this.finishOp(o.relational,i)},e.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 126===e&&33===t?this.finishOp(o.match,2):61===e?this.finishOp(o.equality,61===this.input.charCodeAt(this.pos+2)?3:2):this.finishOp(61===t?o.eq:o.prefix,1)},e.getTokenFromCode=function(t){switch(t){case 35:return++this.pos,this.readMacro();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash(); | ||
case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:var e=this.input.charCodeAt(this.pos+1);return 126!==e&&this.raise(this.pos,"bitwise operator is not allowed"),this.finishOp(o.match,2);default:this.raise(this.pos,'Unexpected character "'+this.input[this.pos]+'"')}},e.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+=e);return this.finishToken(t,i)},e.finishToken=function(t,e){this.end=this.pos,this.type=t,this.value=e,this.genAllowed=t.beforeGen,this.exprAllowed=t.beforeExpr},e.readRegexp=function(t){for(var e=void 0,i=void 0,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(c.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)i=!0;else if("]"===r&&i)i=!1;else if("/"===r&&!i)break;e="\\"===r}++this.pos}var s=this.input.slice(n,this.pos);++this.pos;var a=this.readWord1();if(a){var h=/^[gim]*$/;h.test(a)||this.raise(n,"Invalid regular expression flag")}var u={pattern:s,flags:a,isGenerate:t};return this.finishToken(o.regexp,u)},e.readInt=function(t,e){for(var i=this.pos,n=0,r=0,s=null==e?1/0:e;s>r;++r){var o=this.fullCharCodeAtPos(),a=void 0;if(a=o>=97?o-97+10:o>=65?o-65+10:o>=48&&57>=o?o-48:1/0,a>=t)break;++this.pos,n=n*t+a}return this.pos===i||null!=e&&this.pos-i!==e?null:n},e.readNumber=function(t){var e=this.pos,i=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid Number");var n=this.fullCharCodeAtPos();46===n&&(++this.pos,this.readInt(10),i=!0,n=this.fullCharCodeAtPos()),69!==n&&101!==n||(n=this.input.charCodeAt(++this.pos),43!==n&&45!==n||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),i=!0),r(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=this.input.slice(e,this.pos),a=void 0;return a=i?parseFloat(s):parseInt(s,10),this.finishToken(o.num,a)},e.readString=function(t){for(var e="",i=this.start,n=++this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated string");var r=this.fullCharCodeAtPos();if(r===t)break;92===r?(e+=this.input.slice(n,this.pos),e+=this.readEscapedChar(),n=this.pos):(u(r)&&this.raise(i,"Unterminated string"),++this.pos)}return e+=this.input.slice(n,this.pos++),this.finishToken(o.string,e)},e.readEscapedChar=function(){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 116:return" ";case 98:return"\b";case 118:return"\x0B";case 102:return"\f";case 13:10===this.fullCharCodeAtPos()&&++this.pos;case 10:return"";default:return String.fromCharCode(t)}},e.readWord1=function(){for(var t="",e=this.pos;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(!s(i))break;++this.pos}return t+=this.input.slice(e,this.pos)},e.readWord=function(){var t=this.readWord1(),e=this.keywords.test(t)?a[t]:o.name;return this.finishToken(e,t)},e.readMacro=function(){var t=this.pos,e=this.readWord1();this.macros.test(e)||this.raise(t,"invalid macros");for(var i=a[e],n=this.pos,r=this.fullCharCodeAtPos();this.pos<this.input.length&&10!==r&&13!==r&&8232!==r&&8233!==r;)++this.pos,r=this.input.charCodeAt(this.pos);var s=this.input.slice(n,this.pos).trim();return this.finishToken(i,s)}}},function(t,e){"use strict";var i={varDecl:function(t,e){var i="",n=!0;return t.declarations.forEach(function(t){t.init&&(n||(i+=","),i+="$."+t.id+" = "+e(t.init),n=!1)}),"("+i+")"},SequenceExpr:function(t,e){var i="",n=!0;return t.expressions.forEach(function(t){n||(i+=","),i+=e(t),n=!1}),"("+i+")"},FilterExpr:function(t,e){var i=e(t.object);return t.params.forEach(function(t){i+=","+e(t)}),"f."+t.filter+"("+i+")"},literal:function(t){return t.raw.replace(/\\/g,"\\\\")},regexp:function(t){if(t.regexp.isGenerate){var e=t.regexp;return"gen(/"+e.pattern+"/"+e.flags+")"}return"("+t.raw+")"},Identifier:function(t){return"$."+t.name},LogicalExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},BinaryExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},MatchExpr:function(t,e){var i="";return"~~"===t.operator&&(i+="!"),i+"!m("+e(t.left)+","+e(t.right)+")"},UpdateExpr:function(t){var e="$."+t.argument;return t.prefix?t.operator+e:e+t.operator},UnaryExpr:function(t,e){return t.operator+"("+e(t.argument)+")"},AssignmentExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},ParenthesizedExpr:function(t,e){return"("+e(t.expression)+")"},Attribute:function(t,e){var i=e(t.val);return"d("+e(t.key)+","+i+")"},Style:function(t,e){var i=e(t.val);return"o("+e(t.key)+","+i+")"},TextExpr:function(t,e){var i="String("+e(t.val)+")";return"t("+i+")"},CountExpr:function(t,e){var i="String("+e(t.val)+")";return"c("+i+")"},VisibilityExpr:function(t,e){var i="String("+e(t.val)+")";return"v("+i+")"}};t.exports=function(t){var e=function n(t){var e=t.type;return i[e](t,n)}(t);return"return "+e+";"}},,,function(t,e){function i(){u&&o&&(u=!1,o.length?h=o.concat(h):c=-1,h.length&&n())}function n(){if(!u){var t=setTimeout(i);u=!0;for(var e=h.length;e;){for(o=h,h=[];++c<e;)o&&o[c].run();c=-1,e=h.length}o=null,u=!1,clearTimeout(t)}}function r(t,e){this.fun=t,this.array=e}function s(){}var o,a=t.exports={},h=[],u=!1,c=-1;a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];h.push(new r(t,e)),1!==h.length||u||setTimeout(n,0)},r.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=s,a.addListener=s,a.once=s,a.off=s,a.removeListener=s,a.removeAllListeners=s,a.emit=s,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}}])}); |
{ | ||
"name": "lc2", | ||
"version": "1.5.10", | ||
"version": "1.5.11", | ||
"description": "browser automation library", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -38,3 +38,3 @@ const {randexp} = require('randexp'); | ||
exports.text = (selector) => { | ||
exports.text = selector => { | ||
var DOM = $(selector)[0]; | ||
@@ -48,3 +48,3 @@ if (DOM) { | ||
} | ||
return DOM.textContent; | ||
return DOM.textContent.trim(); | ||
} | ||
@@ -51,0 +51,0 @@ return false; |
Sorry, the diff of this file is too big to display
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
234956
28
5154
1
344