From 07c49aecab3442cd9aa14957d36a6fd6bd46967c Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Thu, 22 Sep 2016 19:16:34 +0200 Subject: [PATCH] fix outputLimit option --- CHANGELOG | 1 + Makefile | 2 +- README.md | 16 ++++++++-------- bower.json | 2 +- ...nal-0.11.8.css => jquery.terminal-0.11.9.css} | 4 ++-- ....8.min.css => jquery.terminal-0.11.9.min.css} | 4 ++-- css/jquery.terminal.css | 4 ++-- css/jquery.terminal.min.css | 4 ++-- ...minal-0.11.8.js => jquery.terminal-0.11.9.js} | 8 ++++---- ...11.8.min.js => jquery.terminal-0.11.9.min.js} | 8 ++++---- js/jquery.terminal-src.js | 2 +- js/jquery.terminal.js | 8 ++++---- js/jquery.terminal.min.js | 8 ++++---- package.json | 4 ++-- terminal.jquery.json | 2 +- 15 files changed, 39 insertions(+), 38 deletions(-) rename css/{jquery.terminal-0.11.8.css => jquery.terminal-0.11.9.css} (99%) rename css/{jquery.terminal-0.11.8.min.css => jquery.terminal-0.11.9.min.css} (98%) rename js/{jquery.terminal-0.11.8.js => jquery.terminal-0.11.9.js} (99%) rename js/{jquery.terminal-0.11.8.min.js => jquery.terminal-0.11.9.min.js} (86%) diff --git a/CHANGELOG b/CHANGELOG index ee157fcbf..0e780fe5a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +0.11.9 fix outputLimit option 0.11.8 add scrollOnEcho option 0.11.7 fix History::last 0.11.6 fix flush new API method $.terminal.last_id diff --git a/Makefile b/Makefile index 2587e67bc..277331296 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=0.11.8 +VERSION=0.11.9 COMPRESS=uglifyjs SED=sed CP=cp diff --git a/README.md b/README.md index da08c7ef3..c392d75c2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - \/ /____/ version 0.11.8 + \/ /____/ version 0.11.9 ``` http://terminal.jcubic.pl @@ -61,27 +61,27 @@ or npm: npm install --save jquery.terminal ``` -Include js/jquery.terminal-0.11.8.min.js and css/jquery.terminal-0.11.8.css +Include js/jquery.terminal-0.11.9.min.js and css/jquery.terminal-0.11.9.css You can also include js/jquery.mousewheel-min.js ```html - + - + ``` You can also grab the files from CDN: ```html - - + + ``` or ```html - - + + ``` And you're good to go. diff --git a/bower.json b/bower.json index 5df7129fc..574f80b74 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jquery.terminal", - "version": "0.11.8", + "version": "0.11.9", "main": [ "js/jquery.terminal.min.js", "js/jquery.mousewheel-min.js", diff --git a/css/jquery.terminal-0.11.8.css b/css/jquery.terminal-0.11.9.css similarity index 99% rename from css/jquery.terminal-0.11.8.css rename to css/jquery.terminal-0.11.9.css index e945c3dc0..3191e9be9 100644 --- a/css/jquery.terminal-0.11.8.css +++ b/css/jquery.terminal-0.11.9.css @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 0.11.8 + * \/ /____/ version 0.11.9 * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. @@ -12,7 +12,7 @@ * Copyright (c) 2011-2016 Jakub Jankiewicz * Released under the MIT license * - * Date: Thu, 22 Sep 2016 08:55:25 +0000 + * Date: Thu, 22 Sep 2016 17:16:21 +0000 */ .terminal .terminal-output .format, .cmd .format, .cmd .prompt, .cmd .prompt div, .terminal .terminal-output div div{ diff --git a/css/jquery.terminal-0.11.8.min.css b/css/jquery.terminal-0.11.9.min.css similarity index 98% rename from css/jquery.terminal-0.11.8.min.css rename to css/jquery.terminal-0.11.9.min.css index 7ebd10b62..9fd38ec73 100644 --- a/css/jquery.terminal-0.11.8.min.css +++ b/css/jquery.terminal-0.11.9.min.css @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 0.11.8 + * \/ /____/ version 0.11.9 * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. @@ -12,5 +12,5 @@ * Copyright (c) 2011-2016 Jakub Jankiewicz * Released under the MIT license * - * Date: Thu, 22 Sep 2016 08:55:25 +0000 + * Date: Thu, 22 Sep 2016 17:16:21 +0000 */.terminal .terminal-output .format,.cmd .format,.cmd .prompt,.cmd .prompt div,.terminal .terminal-output div div{display:inline-block}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre,.cmd{margin:0}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{line-height:1.2em}.cmd .clipboard{position:absolute;left:-16px;top:0;width:10px;height:16px;background:transparent;border:0;color:transparent;outline:0;padding:0;resize:none;z-index:0;overflow:hidden}.terminal .error{color:red}.terminal{padding:10px;position:relative;overflow:auto}.cmd{padding:0;height:1.3em;position:relative}.terminal .inverted,.cmd .inverted,.cmd .cursor.blink{background-color:#aaa;color:#000}.cmd .cursor.blink{-webkit-animation:terminal-blink 1s infinite steps(1,start);-moz-animation:terminal-blink 1s infinite steps(1,start);-ms-animation:terminal-blink 1s infinite steps(1,start);animation:terminal-blink 1s infinite steps(1,start)}@-webkit-keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-ms-keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-moz-keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}.terminal .terminal-output div div,.cmd .prompt{display:block;line-height:14px;height:auto}.cmd .prompt{float:left}.terminal,.cmd{font-family:monospace;color:#aaa;background-color:#000;font-size:12px;line-height:14px}.terminal-output>div{min-height:14px}.terminal-output>div>div *{word-wrap:break-word}.terminal .terminal-output div span{display:inline-block}.cmd span{float:left}.terminal-output span,.terminal-output a,.cmd div,.cmd span,.terminal td,.terminal pre,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{-webkit-touch-callout:initial;-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:initial}.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@-moz-document url-prefix(){.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:initial;-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:initial}}.terminal table{border-collapse:collapse}.terminal td{border:1px solid #aaa}.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.cmd div::-moz-selection,.cmd>span::-moz-selection,.cmd .prompt span::-moz-selection{background-color:#aaa;color:#000}.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.cmd div::selection,.cmd>span::selection,.cmd .prompt span::selection{background-color:#aaa;color:#000}.terminal .terminal-output div.error,.terminal .terminal-output div.error div{color:red}.tilda{position:fixed;top:0;left:0;width:100%;z-index:1100}.clear{clear:both}.terminal a{color:#0f60ff}.terminal a:hover{color:red} \ No newline at end of file diff --git a/css/jquery.terminal.css b/css/jquery.terminal.css index e945c3dc0..3191e9be9 100644 --- a/css/jquery.terminal.css +++ b/css/jquery.terminal.css @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 0.11.8 + * \/ /____/ version 0.11.9 * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. @@ -12,7 +12,7 @@ * Copyright (c) 2011-2016 Jakub Jankiewicz * Released under the MIT license * - * Date: Thu, 22 Sep 2016 08:55:25 +0000 + * Date: Thu, 22 Sep 2016 17:16:21 +0000 */ .terminal .terminal-output .format, .cmd .format, .cmd .prompt, .cmd .prompt div, .terminal .terminal-output div div{ diff --git a/css/jquery.terminal.min.css b/css/jquery.terminal.min.css index 7ebd10b62..9fd38ec73 100644 --- a/css/jquery.terminal.min.css +++ b/css/jquery.terminal.min.css @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 0.11.8 + * \/ /____/ version 0.11.9 * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. @@ -12,5 +12,5 @@ * Copyright (c) 2011-2016 Jakub Jankiewicz * Released under the MIT license * - * Date: Thu, 22 Sep 2016 08:55:25 +0000 + * Date: Thu, 22 Sep 2016 17:16:21 +0000 */.terminal .terminal-output .format,.cmd .format,.cmd .prompt,.cmd .prompt div,.terminal .terminal-output div div{display:inline-block}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre,.cmd{margin:0}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{line-height:1.2em}.cmd .clipboard{position:absolute;left:-16px;top:0;width:10px;height:16px;background:transparent;border:0;color:transparent;outline:0;padding:0;resize:none;z-index:0;overflow:hidden}.terminal .error{color:red}.terminal{padding:10px;position:relative;overflow:auto}.cmd{padding:0;height:1.3em;position:relative}.terminal .inverted,.cmd .inverted,.cmd .cursor.blink{background-color:#aaa;color:#000}.cmd .cursor.blink{-webkit-animation:terminal-blink 1s infinite steps(1,start);-moz-animation:terminal-blink 1s infinite steps(1,start);-ms-animation:terminal-blink 1s infinite steps(1,start);animation:terminal-blink 1s infinite steps(1,start)}@-webkit-keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-ms-keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-moz-keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}.terminal .terminal-output div div,.cmd .prompt{display:block;line-height:14px;height:auto}.cmd .prompt{float:left}.terminal,.cmd{font-family:monospace;color:#aaa;background-color:#000;font-size:12px;line-height:14px}.terminal-output>div{min-height:14px}.terminal-output>div>div *{word-wrap:break-word}.terminal .terminal-output div span{display:inline-block}.cmd span{float:left}.terminal-output span,.terminal-output a,.cmd div,.cmd span,.terminal td,.terminal pre,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{-webkit-touch-callout:initial;-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:initial}.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@-moz-document url-prefix(){.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:initial;-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:initial}}.terminal table{border-collapse:collapse}.terminal td{border:1px solid #aaa}.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.cmd div::-moz-selection,.cmd>span::-moz-selection,.cmd .prompt span::-moz-selection{background-color:#aaa;color:#000}.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.cmd div::selection,.cmd>span::selection,.cmd .prompt span::selection{background-color:#aaa;color:#000}.terminal .terminal-output div.error,.terminal .terminal-output div.error div{color:red}.tilda{position:fixed;top:0;left:0;width:100%;z-index:1100}.clear{clear:both}.terminal a{color:#0f60ff}.terminal a:hover{color:red} \ No newline at end of file diff --git a/js/jquery.terminal-0.11.8.js b/js/jquery.terminal-0.11.9.js similarity index 99% rename from js/jquery.terminal-0.11.8.js rename to js/jquery.terminal-0.11.9.js index 64e4bad12..0f49e16a8 100644 --- a/js/jquery.terminal-0.11.8.js +++ b/js/jquery.terminal-0.11.9.js @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 0.11.8 + * \/ /____/ version 0.11.9 * * This file is part of jQuery Terminal. http://terminal.jcubic.pl * @@ -31,7 +31,7 @@ * Copyright (c) 2007-2013 Alexandru Marasteanu * licensed under 3 clause BSD license * - * Date: Thu, 22 Sep 2016 08:55:22 +0000 + * Date: Thu, 22 Sep 2016 17:16:17 +0000 */ /* TODO: @@ -1975,7 +1975,7 @@ var format_last_re = /\[\[[!gbiuso]*;[^;]*;[^\]]*\]?$/i; var format_exec_re = /(\[\[(?:[^\]]|\\\])*\]\])/; $.terminal = { - version: '0.11.8', + version: '0.11.9', // colors from http://www.w3.org/wiki/CSS/Properties/color/keywords color_names: [ 'black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', @@ -4540,7 +4540,7 @@ settings.outputLimit; var $lines = output.find('div div'); if ($lines.length > limit) { - var max = lines.length-limit+1; + var max = $lines.length-limit+1; var for_remove = $lines.slice(0, max); // you can't get parent if you remove the // element so we first get the parent diff --git a/js/jquery.terminal-0.11.8.min.js b/js/jquery.terminal-0.11.9.min.js similarity index 86% rename from js/jquery.terminal-0.11.8.min.js rename to js/jquery.terminal-0.11.9.min.js index 239637b12..6df4decaa 100644 --- a/js/jquery.terminal-0.11.8.min.js +++ b/js/jquery.terminal-0.11.9.min.js @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 0.11.8 + * \/ /____/ version 0.11.9 * * This file is part of jQuery Terminal. http://terminal.jcubic.pl * @@ -31,7 +31,7 @@ * Copyright (c) 2007-2013 Alexandru Marasteanu * licensed under 3 clause BSD license * - * Date: Thu, 22 Sep 2016 08:55:22 +0000 + * Date: Thu, 22 Sep 2016 17:16:17 +0000 */ -(function(e){var n=function(){if(!n.cache.hasOwnProperty(arguments[0])){n.cache[arguments[0]]=n.parse(arguments[0])}return n.format.call(null,n.cache[arguments[0]],arguments)};n.format=function(e,r){var o=1,a=e.length,s="",l,f=[],c,u,h,p,m,g;for(c=0;c>>0;break;case"x":l=l.toString(16);break;case"X":l=l.toString(16).toUpperCase();break}l=/[def]/.test(h[8])&&h[3]&&l>=0?"+"+l:l;m=h[4]?h[4]=="0"?"0":h[4].charAt(1):" ";g=h[6]-String(l).length;p=h[6]?i(m,g):"";f.push(h[5]?l+p:p+l)}}return f.join("")};n.cache={};n.parse=function(e){var n=e,r=[],t=[],i=0;while(n){if((r=/^[^\x25]+/.exec(n))!==null){t.push(r[0])}else if((r=/^\x25{2}/.exec(n))!==null){t.push("%")}else if((r=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n))!==null){if(r[2]){i|=1;var o=[],a=r[2],s=[];if((s=/^([a-z_][a-z_\d]*)/i.exec(a))!==null){o.push(s[1]);while((a=a.substring(s[0].length))!==""){if((s=/^\.([a-z_][a-z_\d]*)/i.exec(a))!==null){o.push(s[1])}else if((s=/^\[(\d+)\]/.exec(a))!==null){o.push(s[1])}else{throw"[sprintf] huh?"}}}else{throw"[sprintf] huh?"}r[2]=o}else{i|=2}if(i===3){throw"[sprintf] mixing positional and named placeholders is not (yet) supported"}t.push(r)}else{throw"[sprintf] huh?"}n=n.substring(r[0].length)}return t};var r=function(e,r,t){t=r.slice(0);t.splice(0,0,e);return n.apply(null,t)};function t(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(e,n){for(var r=[];n>0;r[--n]=e){}return r.join("")}e.sprintf=n;e.vsprintf=r})(typeof global!="undefined"?global:window);(function(e,n){"use strict";e.omap=function(n,r){var t={};e.each(n,function(e,i){t[e]=r.call(n,e,i)});return t};var r={clone_object:function(n){var r={};if(typeof n=="object"){if(e.isArray(n)){return this.clone_array(n)}else if(n===null){return n}else{for(var t in n){if(e.isArray(n[t])){r[t]=this.clone_array(n[t])}else if(typeof n[t]=="object"){r[t]=this.clone_object(n[t])}else{r[t]=n[t]}}}}return r},clone_array:function(n){if(!e.isFunction(Array.prototype.map)){throw new Error("You'r browser don't support ES5 array map "+"use es5-shim")}return n.slice(0).map(function(e){if(typeof e=="object"){return this.clone_object(e)}else{return e}}.bind(this))}};var t=function(e){return r.clone_object(e)};var i=function(){var e="test",n=window.localStorage;try{n.setItem(e,"1");n.removeItem(e);return true}catch(r){return false}};var o=i();function a(e,n){var r;if(typeof e==="string"&&typeof n==="string"){localStorage[e]=n;return true}else if(typeof e==="object"&&typeof n==="undefined"){for(r in e){if(e.hasOwnProperty(r)){localStorage[r]=e[r]}}return true}return false}function s(e,n){var r,t,i;r=new Date;r.setTime(r.getTime()+31536e6);t="; expires="+r.toGMTString();if(typeof e==="string"&&typeof n==="string"){document.cookie=e+"="+n+t+"; path=/";return true}else if(typeof e==="object"&&typeof n==="undefined"){for(i in e){if(e.hasOwnProperty(i)){document.cookie=i+"="+e[i]+t+"; path=/"}}return true}return false}function l(e){return localStorage[e]}function f(e){var n,r,t,i;n=e+"=";r=document.cookie.split(";");for(t=0;ti&&i!==0||t.call(e,a)===false){h.timer.remove(e,r,t)}s.inProgress=false};s.$timerID=t.$timerID;if(!e.$timers[r][t.$timerID]){e.$timers[r][t.$timerID]=window.setInterval(s,n)}if(!this.global[r]){this.global[r]=[]}this.global[r].push(e)},remove:function(e,n,r){var t=e.$timers,i;if(t){if(!n){for(var o in t){if(t.hasOwnProperty(o)){this.remove(e,o,r)}}}else if(t[n]){if(r){if(r.$timerID){window.clearInterval(t[n][r.$timerID]);delete t[n][r.$timerID]}}else{for(var a in t[n]){if(t[n].hasOwnProperty(a)){window.clearInterval(t[n][a]);delete t[n][a]}}}for(i in t[n]){if(t[n].hasOwnProperty(i)){break}}if(!i){i=null;delete t[n]}}for(i in t){if(t.hasOwnProperty(i)){break}}if(!i){e.$timers=null}}}}});if(/(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())){h(window).one("unload",function(){var e=h.timer.global;for(var n in e){if(e.hasOwnProperty(n)){var r=e[n],t=r.length;while(--t){h.timer.remove(r[t],n)}}}})}(function(e){if(!String.prototype.split.toString().match(/\[native/)){return}var n=String.prototype.split,r=/()??/.exec("")[1]===e,t;t=function(t,i,o){if(Object.prototype.toString.call(i)!=="[object RegExp]"){return n.call(t,i,o)}var a=[],s=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),l=0,f,c,u,h;i=new RegExp(i.source,s+"g");t+="";if(!r){f=new RegExp("^"+i.source+"$(?!\\s)",s)}o=o===e?-1>>>0:o>>>0;while(c=i.exec(t)){u=c.index+c[0].length;if(u>l){a.push(t.slice(l,c.index));if(!r&&c.length>1){c[0].replace(f,function(){for(var n=1;n1&&c.index=o){break}}if(i.lastIndex===c.index){i.lastIndex++}}if(l===t.length){if(h||!i.test("")){a.push("")}}else{a.push(t.slice(l))}return a.length>o?a.slice(0,o):a};String.prototype.split=function(e,n){return t(this,e,n)};return t})();e.fn.caret=function(e){var n=this[0];var r=n.contentEditable==="true";if(arguments.length==0){if(window.getSelection){if(r){n.focus();var t=window.getSelection().getRangeAt(0),i=t.cloneRange();i.selectNodeContents(n);i.setEnd(t.endContainer,t.endOffset);return i.toString().length}return n.selectionStart}if(document.selection){n.focus();if(r){var t=document.selection.createRange(),i=document.body.createTextRange();i.moveToElementText(n);i.setEndPoint("EndToEnd",t);return i.text.length}var e=0,o=n.createTextRange(),i=document.selection.createRange().duplicate(),a=i.getBookmark();o.moveToBookmark(a);while(o.moveStart("character",-1)!==0)e++;return e}return 0}if(e==-1)e=this[r?"text":"val"]().length;if(window.getSelection){if(r){n.focus();window.getSelection().collapse(n.firstChild,e)}else n.setSelectionRange(e,e)}else if(document.body.createTextRange){var o=document.body.createTextRange();o.moveToElementText(n);o.moveStart("character",e);o.collapse(true);o.select()}if(!r)n.focus();return e};function p(e,n){var r=[];var t=e.length;if(tr.length){if(n){break}e=0;n=true}}return r[e]}},append:function(e){r.push(e)}})}function g(n){var r=n instanceof Array?n:n?[n]:[];e.extend(this,{data:function(){return r},map:function(n){return e.map(r,n)},size:function(){return r.length},pop:function(){if(r.length===0){return null}else{var e=r[r.length-1];r=r.slice(0,r.length-1);return e}},push:function(e){r=r.concat([e]);return e},top:function(){return r.length>0?r[r.length-1]:null},clone:function(){return new g(r.slice(0))}})}e.json_stringify=function(r,t){var i="",o;t=t===n?1:t;var a=typeof r;switch(a){case"function":i+=r;break;case"boolean":i+=r?"true":"false";break;case"object":if(r===null){i+="null"}else if(r instanceof Array){i+="[";var s=r.length;for(o=0;o1?",":"";if(t===1){i=i.replace(/,([\]}])/g,"$1")}return i.replace(/([\[{]),/g,"$1")};function d(n,r){var t=true;var i="";if(typeof n==="string"&&n!==""){i=n+"_"}i+="commands";var o=e.Storage.get(i);o=o?e.parseJSON(o):[];var a=o.length-1;e.extend(this,{append:function(n){if(t){if(o[o.length-1]!==n){o.push(n);if(r&&o.length>r){o=o.slice(-r)}a=o.length-1;e.Storage.set(i,e.json_stringify(o))}}},data:function(){return o},reset:function(){a=o.length-1},last:function(){return o[o.length-1]},end:function(){return a===o.length-1},position:function(){return a},current:function(){return o[a]},next:function(){if(a0){--a}if(e!==-1){return o[a]}},clear:function(){o=[];this.purge()},enabled:function(){return t},enable:function(){t=true},purge:function(){e.Storage.remove(i)},disable:function(){t=false}})}var v=function(){var e=document.createElement("div");e.setAttribute("onpaste","return;");return typeof e.onpaste=="function"}();var y=true;e.fn.cmd=function(r){var t=this;var i=t.data("cmd");if(i){return i}t.addClass("cmd");t.append(''+' ');var o=e("