var _ = undefined function empty(v) { if (v == undefined) return true; if (isString(v)) return v==''; if (isArray(v)) return v.length==0; if (isObject(v)) return Object.keys(v).length==0; return false } function isArray(o) { if (o==_ || o ==null) return false; else return typeof o == "array" || (typeof o == "object" && o.constructor === Array); } function isArrayArray(o) { if (o==_ || o ==null) return false; else return Utils.isArray(o) && Utils.isArray(o[0]); } function isArrayArrayArray(o) { if (o==_ || o ==null) return false; else return Utils.isArray(o) && Utils.isArray(o[0]) && Utils.isArray(o[0][0]); } function isMatrix(o) { if (o==_ || o ==null) return false; else return isArray(o) && isArray(o[0]); } function isBoolean (o) { return typeof o == "boolean" } function isBuffer (o) { if (o==_ || o ==null) return false; else return o instanceof Buffer; } function isEmpty(o) { for(var prop in o) { if (o[prop]!=undefined) return false; } return true; } function isFunction(o) { return typeof o == "function"; } function isObj(o) { return typeof o == "object"; } function isObject(o) { return typeof o == "object"; } function isRegex(o) { return o instanceof RegExp; } function isString(o) { return typeof o == "string" || (typeof o == "object" && o.constructor === String); } function isNumber(o) { return typeof o == "number" || (typeof o == "object" && o.constructor === Number); } function isTypedArray(o) { return Utils.isObject(o) && o.buffer instanceof ArrayBuffer } function isVector(o,noarray) { if (o==_ || o ==null) return false; else return (!noarray && Utils.isArray(o)) || (Math.VectorTA && Math.VectorTA.isVector(o)) || (Math.Vector && Math.Vector.isVector(o)) ; } function flatten(array) { var res=[]; var len=array.length; var i; for(i=0;i0) { PostIt(null,Notes[i]); } } } if (typeof State != 'undefined' && o.this) State.this=o.this; } try { if (from) parse(from); else loadFile(parse); } catch (e) { console.log(e) } } function saveData(to) { var base = appConfig.file||document.URL.match(/([a-zA-Z_0-9\-]+)\.html(#.+)?(\?.+)?$/)[1]; var i,o = {editors:{}, styles:{}, textarea:{},input:{},tables:{}, points:{}},el; var els = document.getElementsByTagName('textarea'); // generic text input blocks (via textarea) for(i=0;i