/*
  Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>
  Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
  Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be>
  Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
  Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
  Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
  Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
  Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
  Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
  Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2014 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2015 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2015 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2015 Marijn Haverbeke and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - Allow original AngularJS plugin to find files in Orion workspace
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2015 Marijn Haverbeke and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - Allow original node.js plugin to find files in Orion workspace
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2015 Marijn Haverbeke and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - Allow original requirejs plugin to find files in Orion workspace
 *******************************************************************************/

/**
 * @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

/*******************************************************************************
 * @license
 * Copyright (c) 2015 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/**
 * @license RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/i18n for details
 */

/*******************************************************************************
 * @license
 * Copyright (c) 2015 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2014, 2015 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2015 IBM Corporation, Inc. and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 * Contributors:
 *   IBM Corporation - Initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2015 IBM Corporation, Inc. and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 * Contributors:
 *   IBM Corporation - Initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012, 2015 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/

importScripts("../../requirejs/require.min.js"),function(e,t){"use strict";"function"==typeof define&&define.amd?define("esprima",["exports"],t):t("undefined"!=typeof exports?exports:e.esprima={})}(this,function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function n(e){return e>=48&&57>=e}function r(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function o(e){return"01234567".indexOf(e)>=0}function s(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function i(e){return 10===e||13===e||8232===e||8233===e}function a(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&Mn.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function l(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&Mn.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function p(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function u(e){if(Cn&&p(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function h(e,n,r,o,s){var i;t("number"==typeof r,"Comment must have valid position"),Jn.lastCommentStart=r,i={type:e,value:n},Vn.range&&(i.range=[r,o]),Vn.loc&&(i.loc=s),Vn.comments.push(i),Vn.attachComment&&(Vn.leadingComments.push(i),Vn.trailingComments.push(i))}function f(e){var t,n,r,o;for(t=An-e,n={start:{line:Pn,column:An-In-e}};Wn>An;)if(r=zn.charCodeAt(An),++An,i(r))return Nn=!0,Vn.comments&&(o=zn.slice(t+e,An-1),n.end={line:Pn,column:An-In-1},h("Line",o,t,An-1,n)),13===r&&10===zn.charCodeAt(An)&&++An,++Pn,void(In=An);Vn.comments&&(o=zn.slice(t+e,An),n.end={line:Pn,column:An-In},h("Line",o,t,An,n))}function m(){var e,t,n,r;for(Vn.comments&&(e=An-2,t={start:{line:Pn,column:An-In-2}});Wn>An;)if(n=zn.charCodeAt(An),i(n))13===n&&10===zn.charCodeAt(An+1)&&++An,Nn=!0,++Pn,++An,In=An;else if(42===n){if(47===zn.charCodeAt(An+1))return++An,++An,void(Vn.comments&&(r=zn.slice(e+2,An-2),t.end={line:Pn,column:An-In},h("Block",r,e,An,t)));++An}else++An;An>=Wn&&Vn.comments?(t.end={line:Pn,column:An-In},r=zn.slice(e+2,An),h("Block",r,e,An,t),Y()):Q()}function g(){var e,t;for(Nn=!1,t=0===An;Wn>An;)if(e=zn.charCodeAt(An),s(e))++An;else if(i(e))Nn=!0,++An,13===e&&10===zn.charCodeAt(An)&&++An,++Pn,In=An,t=!0;else if(47===e)if(e=zn.charCodeAt(An+1),47===e)++An,++An,f(2),t=!0;else{if(42!==e)break;++An,++An,m()}else if(t&&45===e){if(45!==zn.charCodeAt(An+1)||62!==zn.charCodeAt(An+2))break;An+=3,f(3)}else{if(60!==e)break;if("!--"!==zn.slice(An+1,An+4))break;++An,++An,++An,++An,f(4)}}function b(e){var t,n,o,s=0;for(n="u"===e?4:2,t=0;n>t;++t){if(!(Wn>An&&r(zn[An])))return"";o=zn[An++],s=16*s+"0123456789abcdef".indexOf(o.toLowerCase())}return String.fromCharCode(s)}function y(){var e,t,n,o;for(e=zn[An],t=0,"}"===e&&Q();Wn>An&&(e=zn[An++],r(e));)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&Q(),65535>=t?String.fromCharCode(t):(n=(t-65536>>10)+55296,o=(t-65536&1023)+56320,String.fromCharCode(n,o))}function v(){var e,t;for(e=zn.charCodeAt(An++),t=String.fromCharCode(e),92===e&&(117!==zn.charCodeAt(An)&&Q(),++An,e=b("u"),e&&"\\"!==e&&a(e.charCodeAt(0))||Q(),t=e);Wn>An&&(e=zn.charCodeAt(An),l(e));)++An,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==zn.charCodeAt(An)&&Q(),++An,e=b("u"),e&&"\\"!==e&&l(e.charCodeAt(0))||Q(),t+=e);return t}function w(){var e,t;for(e=An++;Wn>An;){if(t=zn.charCodeAt(An),92===t)return An=e,v();if(!l(t))break;++An}return zn.slice(e,An)}function _(){var e,t,n;return e=An,t=92===zn.charCodeAt(An)?v():w(),n=1===t.length?xn.Identifier:u(t)?xn.Keyword:"null"===t?xn.NullLiteral:"true"===t||"false"===t?xn.BooleanLiteral:xn.Identifier,{type:n,value:t,lineNumber:Pn,lineStart:In,start:e,end:An}}function S(){var e,t,n,r,o=An,s=zn.charCodeAt(An),i=zn[An];switch(s){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++An,Vn.tokenize&&(40===s?Vn.openParenToken=Vn.tokens.length:123===s&&(Vn.openCurlyToken=Vn.tokens.length)),{type:xn.Punctuator,value:String.fromCharCode(s),lineNumber:Pn,lineStart:In,start:o,end:An};default:if(e=zn.charCodeAt(An+1),61===e)switch(s){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return An+=2,{type:xn.Punctuator,value:String.fromCharCode(s)+String.fromCharCode(e),lineNumber:Pn,lineStart:In,start:o,end:An};case 33:case 61:return An+=2,61===zn.charCodeAt(An)&&++An,{type:xn.Punctuator,value:zn.slice(o,An),lineNumber:Pn,lineStart:In,start:o,end:An}}}if(r=zn.substr(An,4),">>>="===r)return An+=4,{type:xn.Punctuator,value:r,lineNumber:Pn,lineStart:In,start:o,end:An};if(n=r.substr(0,3),">>>"===n||"<<="===n||">>="===n)return An+=3,{type:xn.Punctuator,value:n,lineNumber:Pn,lineStart:In,start:o,end:An};if(t=n.substr(0,2),i===t[1]&&"+-<>&|".indexOf(i)>=0||"=>"===t)return An+=2,{type:xn.Punctuator,value:t,lineNumber:Pn,lineStart:In,start:o,end:An};if("<>=!+-*%&|^/".indexOf(i)>=0)return++An,{type:xn.Punctuator,value:i,lineNumber:Pn,lineStart:In,start:o,end:An};++An;var a={type:xn.Punctuator,lineNumber:Pn,lineStart:In,start:o,end:An,value:zn.slice(o,An)};Q(a)}function k(e){for(var t="";Wn>An&&r(zn[An]);)t+=zn[An++];return 0===t.length&&Q(),a(zn.charCodeAt(An))&&Q(),{type:xn.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:Pn,lineStart:In,start:e,end:An}}function x(e){var t,r;for(r="";Wn>An&&(t=zn[An],"0"===t||"1"===t);)r+=zn[An++];return 0===r.length&&Q(),Wn>An&&(t=zn.charCodeAt(An),(a(t)||n(t))&&Q()),{type:xn.NumericLiteral,value:parseInt(r,2),lineNumber:Pn,lineStart:In,start:e,end:An}}function j(e,t){var r,s;for(o(e)?(s=!0,r="0"+zn[An++]):(s=!1,++An,r="");Wn>An&&o(zn[An]);)r+=zn[An++];return s||0!==r.length||Q(),(a(zn.charCodeAt(An))||n(zn.charCodeAt(An)))&&Q(),{type:xn.NumericLiteral,value:parseInt(r,8),octal:s,lineNumber:Pn,lineStart:In,start:t,end:An}}function O(){var e,t;for(e=An+1;Wn>e;++e){if(t=zn[e],"8"===t||"9"===t)return!1;if(!o(t))return!0}return!0}function T(){var e,r,s;if(s=zn[An],t(n(s.charCodeAt(0))||"."===s,"Numeric literal must start with a decimal digit or a decimal point"),r=An,e="","."!==s){if(e=zn[An++],s=zn[An],"0"===e){if("x"===s||"X"===s)return++An,k(r);if("b"===s||"B"===s)return++An,x(r);if("o"===s||"O"===s)return j(s,r);if(o(s)&&O())return j(s,r)}for(;n(zn.charCodeAt(An));)e+=zn[An++];s=zn[An]}if("."===s){for(e+=zn[An++];n(zn.charCodeAt(An));)e+=zn[An++];s=zn[An]}if("e"===s||"E"===s)if(e+=zn[An++],s=zn[An],("+"===s||"-"===s)&&(e+=zn[An++]),n(zn.charCodeAt(An)))for(;n(zn.charCodeAt(An));)e+=zn[An++];else Q();return a(zn.charCodeAt(An))&&Q(),{type:xn.NumericLiteral,value:parseFloat(e),lineNumber:Pn,lineStart:In,start:r,end:An}}function E(){var e,n,r,s,a,l,c="",p=!1;for(e=zn[An],t("'"===e||'"'===e,"String literal must starts with a quote"),n=An,++An;Wn>An;){if(r=zn[An++],r===e){e="";break}if("\\"===r)if(r=zn[An++],r&&i(r.charCodeAt(0)))++Pn,"\r"===r&&"\n"===zn[An]&&++An,In=An;else switch(r){case"u":case"x":"{"===zn[An]?(++An,c+=y()):(l=An,a=b(r),a?c+=a:(An=l,c+=r));break;case"n":c+="\n";break;case"r":c+="\r";break;case"t":c+="	";break;case"b":c+="\b";break;case"f":c+="\f";break;case"v":c+="";break;default:o(r)?(s="01234567".indexOf(r),0!==s&&(p=!0),Wn>An&&o(zn[An])&&(p=!0,s=8*s+"01234567".indexOf(zn[An++]),"0123".indexOf(r)>=0&&Wn>An&&o(zn[An])&&(s=8*s+"01234567".indexOf(zn[An++]))),c+=String.fromCharCode(s)):c+=r}else{if(i(r.charCodeAt(0)))break;c+=r}}var d={type:xn.StringLiteral,value:c,octal:p,lineNumber:Hn,lineStart:Bn,start:n,end:An};return""!==e&&Y(d),d}function R(e,t){var n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t){return parseInt(t,16)<=1114111?"x":void Q(null,Dn.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{RegExp(n)}catch(r){Q(null,Dn.InvalidRegExp)}try{return new RegExp(e,t)}catch(o){return null}}function D(){var e,n,r,o,s;for(e=zn[An],t("/"===e,"Regular expression literal must start with a slash"),n=zn[An++],r=!1,o=!1;Wn>An;)if(e=zn[An++],n+=e,"\\"===e)e=zn[An++],i(e.charCodeAt(0))&&Q(null,Dn.UnterminatedRegExp),n+=e;else if(i(e.charCodeAt(0)))Q(null,Dn.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){o=!0;break}"["===e&&(r=!0)}return o||Q(Gn,Dn.UnterminatedRegExp),s=n.substr(1,n.length-2),{value:s,literal:n}}function M(){var e,t,n,r;for(t="",n="";Wn>An&&(e=zn[An],l(e.charCodeAt(0)));)if(++An,"\\"===e&&Wn>An)if(e=zn[An],"u"===e){if(++An,r=An,e=b("u"))for(n+=e,t+="\\u";An>r;++r)t+=zn[r];else An=r,n+="u",t+="\\u";Y()}else t+="\\",Y();else n+=e,t+=e;return{value:n,literal:t}}function z(){$n=!0;var e,t,n,r;return g(),e=An,t=D(),n=M(),r=R(t.value,n.value),$n=!1,Vn.tokenize?{type:xn.RegularExpression,value:r,regex:{pattern:t.value,flags:n.value},lineNumber:Pn,lineStart:In,start:e,end:An}:{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:An}}function C(){var e,t,n,r;return g(),e=An,t={start:{line:Pn,column:An-In}},n=z(),t.end={line:Pn,column:An-In},Vn.tokenize||(Vn.tokens.length>0&&(r=Vn.tokens[Vn.tokens.length-1],r.range[0]===e&&"Punctuator"===r.type&&("/"===r.value||"/="===r.value)&&Vn.tokens.pop()),Vn.tokens.push({type:"RegularExpression",value:n.literal,regex:n.regex,range:[e,An],loc:t})),n}function A(e){return e.type===xn.Identifier||e.type===xn.Keyword||e.type===xn.BooleanLiteral||e.type===xn.NullLiteral}function P(){var e,t;if(e=Vn.tokens[Vn.tokens.length-1],!e)return C();if("Punctuator"===e.type){if("]"===e.value)return S();if(")"===e.value)return t=Vn.tokens[Vn.openParenToken-1],!t||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?S():C();if("}"===e.value){if(Vn.tokens[Vn.openCurlyToken-3]&&"Keyword"===Vn.tokens[Vn.openCurlyToken-3].type){if(t=Vn.tokens[Vn.openCurlyToken-4],!t)return S()}else{if(!Vn.tokens[Vn.openCurlyToken-4]||"Keyword"!==Vn.tokens[Vn.openCurlyToken-4].type)return S();if(t=Vn.tokens[Vn.openCurlyToken-5],!t)return C()}return On.indexOf(t.value)>=0?S():C()}return C()}return"Keyword"===e.type&&"this"!==e.value?C():S()}function I(){var e;return An>=Wn?{type:xn.EOF,lineNumber:Pn,lineStart:In,start:An,end:An,range:[An,An]}:(e=zn.charCodeAt(An),a(e)?_():40===e||41===e||59===e?S():39===e||34===e?E():46===e?n(zn.charCodeAt(An+1))?T():S():n(e)?T():Vn.tokenize&&47===e?P():S())}function N(){var e,t,n,r;return e={start:{line:Pn,column:An-In}},t=I(),e.end={line:Pn,column:An-In},t.type!==xn.EOF&&(n=zn.slice(t.start,t.end),r={type:jn[t.type],value:n,range:[t.start,t.end],loc:e},t.regex&&(r.regex={pattern:t.regex.pattern,flags:t.regex.flags}),Vn.tokens.push(r)),t}function L(){var e;return $n=!0,Ln=An,Un=Pn,qn=In,g(),e=Gn,Fn=An,Hn=Pn,Bn=In,Gn="undefined"!=typeof Vn.tokens?N():I(),$n=!1,e}function U(){$n=!0,g(),Ln=An,Un=Pn,qn=In,Fn=An,Hn=Pn,Bn=In,Gn="undefined"!=typeof Vn.tokens?N():I(),$n=!1}function q(e){if(Vn.deps)for(var t=e.length,n=0;t>n;n++){var r=e[n];r.type===Tn.Literal&&Vn.deps.push(r)}}function F(e,t){if(Vn.deps){var n=t.length;if("importScripts"===e.name)q(t);else if("Worker"===e.name)t[0].type===Tn.Literal&&Vn.deps.push(t[0]);else if("require"===e.name){var r=t[0];r.type===Tn.ArrayExpression?q(r.elements):r.type===Tn.Literal&&Vn.deps.push(r),n>1&&(r=t[1],r.type===Tn.ArrayExpression&&q(r.elements))}else"requirejs"===e.name?(r=t[0],r.type===Tn.ArrayExpression&&q(r.elements)):"define"===e.name&&n>1&&(r=t[0],r.type===Tn.Literal&&(r=t[1]),r.type===Tn.ArrayExpression&&q(r.elements))}}function H(){this.line=Hn,this.column=Fn-Bn}function B(){this.start=new H,this.end=null}function $(e){this.start={line:e.lineNumber,column:e.start-e.lineStart},this.end=null}function W(){Vn.loc&&(this.loc=new B),Vn.range&&(this.range=[Fn,0]),Vn.directSourceFile&&(this.sourceFile=Vn.directSourceFile)}function G(e){Vn.loc&&(this.loc=new $(e)),Vn.range&&(this.range=[e.start,0]),Vn.directSourceFile&&(this.sourceFile=Vn.directSourceFile)}function J(e,t,n,r){var o=new Error("Line "+e+": "+n);if(o.index=t,o.lineNumber=e,o.column=t-($n?In:qn)+1,o.description=n,r){var s=r;2===r.type&&Vn&&Array.isArray(Vn.tokens)&&Vn.tokens.length>0&&(s=Vn.tokens[Vn.tokens.length-1]),o.index="number"==typeof s.start?s.start:s.range[0],o.token=s.value,o.end="number"==typeof s.end?s.end:s.range[1]}return o}function V(e){var n,r;throw n=Array.prototype.slice.call(arguments,1),r=e.replace(/%(\d)/g,function(e,r){return t(r<n.length,"Message reference must be in range"),n[r]}),J(Un,Ln,r)}function X(e){var n,r,o;if(n=Array.prototype.slice.call(arguments,1),r=e.replace(/%(\d)/g,function(e,r){return t(r<n.length,"Message reference must be in range"),n[r]}),o=J(Pn,Ln,r),!Vn.errors)throw o;Vn.errors.push(o)}function K(e,t,n){var r=t||Dn.UnexpectedToken;e&&!t&&(r=e.type===xn.EOF?Dn.UnexpectedEOS:e.type===xn.Identifier?Dn.UnexpectedIdentifier:e.type===xn.NumericLiteral?Dn.UnexpectedNumber:e.type===xn.StringLiteral?Dn.UnexpectedString:Dn.UnexpectedToken,e.type===xn.Keyword&&(c(e.value)?r=Dn.UnexpectedReserved:Cn&&p(e.value)&&(r=Dn.StrictReservedWord)));var o=null!=n?n:e?e.value:"ILLEGAL";return r=r.replace("%0",o),e&&"number"==typeof e.lineNumber?J(e.lineNumber,e.start,r,e):J($n?Pn:Un,$n?An:Ln,r,e)}function Q(e,t){throw K(e,t)}function Y(e,t,n){var r=K(e,t,n);if(!Vn.errors)throw r;Vn.errors.push(r)}function Z(e){var t=L();(t.type!==xn.Punctuator||t.value!==e)&&Q(t)}function et(e){var t;if(Vn.errors)if(t=Gn,t.type===xn.Punctuator&&","===t.value)L();else if(t.type===xn.Punctuator&&";"===t.value)if(L(),Gn.value===e)Y(t,Dn.UnexpectedToken,";");else{var n=e&&e!==t.value?e:";";Vn.tokens&&Vn.tokens.length>0&&(t=Vn.tokens[Vn.tokens.length-2]),Y(t,Dn.MissingToken,n)}else t.type!==xn.EOF&&(Vn.tokens&&Vn.tokens.length>0&&(t=Vn.tokens[Vn.tokens.length-2]),Y(t,Dn.MissingToken,","));else Z(",")}function tt(e){var t=L();(t.type!==xn.Keyword||t.value!==e)&&Q(t)}function nt(e){return Gn.type===xn.Punctuator&&Gn.value===e}function rt(e){return Gn.type===xn.Keyword&&Gn.value===e}function ot(){var e;return Gn.type!==xn.Punctuator?!1:(e=Gn.value,"="===e||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function st(){try{if(59===zn.charCodeAt(Fn)||nt(";"))return void L();if(Nn)return;if(Ln=Fn,Un=Hn,qn=Bn,Gn.type!==xn.EOF&&!nt("}")){var e=Gn;Vn.errors&&vn(Bn),Q(e)}}catch(t){if(Vn.errors)return void gn(t);throw t}}function it(e){return e.type===Tn.Identifier||e.type===Tn.MemberExpression}function at(){var e=[],t=new W;for(Z("[");!nt("]");)nt(",")?(L(),e.push(null)):(e.push(Rt()),nt("]")||Z(","));return L(),t.finishArrayExpression(e)}function lt(e,t){var n,r,o=new W;return n=Cn,r=nn(),t&&Cn&&d(e[0].name)&&Y(t,Dn.StrictParamName),Cn=n,o.finishFunctionExpression(null,e,[],r)}function ct(){var e,t=new W;return e=L(),e.type===xn.StringLiteral||e.type===xn.NumericLiteral?(Cn&&e.octal&&Y(e,Dn.StrictOctalLiteral),t.finishLiteral(e)):t.finishIdentifier(e.value)}function pt(){var e,t,n,r,o,s=new W;return e=Gn,e.type===xn.Identifier?(n=ct(),"get"!==e.value||nt(":")||nt("(")?"set"!==e.value||nt(":")||nt("(")?kn(e,n,s):(t=ct(),Z("("),e=Gn,e.type!==xn.Identifier?(Z(")"),Y(e),r=lt([])):(o=[Ct()],Z(")"),r=lt(o,e)),s.finishProperty("set",t,r,!1,!1)):(t=ct(),Z("("),Z(")"),r=lt([]),s.finishProperty("get",t,r,!1,!1))):e.type!==xn.EOF&&e.type!==xn.Punctuator?kn(e,ct(),s):void Q(e)}function dt(){var e,t,n,r,o=[],s={},i=String,a=new W;for(Z("{");!nt("}");)e=pt(),null!=e&&"undefined"!=typeof e&&(t=e.key.type===Tn.Identifier?e.key.name:i(e.key.value),r="init"===e.kind?Rn.Data:"get"===e.kind?Rn.Get:Rn.Set,n="$"+t,Object.prototype.hasOwnProperty.call(s,n)?(s[n]===Rn.Data?Cn&&r===Rn.Data?X(Dn.StrictDuplicateProperty):r!==Rn.Data&&X(Dn.AccessorDataProperty):r===Rn.Data?X(Dn.AccessorDataProperty):s[n]&r&&X(Dn.AccessorGetSet),s[n]|=r):s[n]=r,o.push(e),nt("}")||et("}"));return Z("}"),a.finishObjectExpression(o)}function ut(){var e;return Z("("),nt(")")?(L(),En.ArrowParameterPlaceHolder):(++Jn.parenthesisCount,e=Dt(),Z(")"),e)}function ht(){var e,t,n,r;if(nt("("))return ut();if(nt("["))return at();if(nt("{"))return dt();if(e=Gn.type,r=new W,e===xn.Identifier)n=r.finishIdentifier(L().value);else if(e===xn.StringLiteral||e===xn.NumericLiteral)Cn&&Gn.octal&&Y(Gn,Dn.StrictOctalLiteral),n=r.finishLiteral(L());else if(e===xn.Keyword){if(rt("function"))return ln();rt("this")?(L(),n=r.finishThisExpression()):Q(L())}else e===xn.BooleanLiteral?(t=L(),t.value="true"===t.value,n=r.finishLiteral(t)):e===xn.NullLiteral?(t=L(),t.value=null,n=r.finishLiteral(t)):nt("/")||nt("/=")?(An=Fn,t="undefined"!=typeof Vn.tokens?C():z(),L(),n=r.finishLiteral(t)):Q(L());return n}function ft(){var e=[];if(Z("("),!nt(")"))for(;Wn>Fn&&(e.push(Rt()),!nt(")"));)et(")");return mn(")"),e}function mt(){var e,t=new W;try{e=L(),A(e)||(Vn.errors&&_n(e),Q(e))}catch(n){if(Vn.errors)return gn(n),Sn(t,Tn.Identifier);throw n}return t.finishIdentifier(e.value)}function gt(){return Z("."),mt()}function bt(){var e;return Z("["),e=Dt(),Z("]"),e}function yt(){var e,t,n=new W;return tt("new"),e=wt(),t=nt("(")?ft():[],n.finishNewExpression(e,t)}function vt(){var e,t,n,r,o=Jn.allowIn;for(r=Gn,Jn.allowIn=!0,e=rt("new")?yt():ht();;)if(nt("."))n=gt(),e=new G(r).finishMemberExpression(".",e,n);else if(nt("("))t=ft(),e=new G(r).finishCallExpression(e,t);else{if(!nt("["))break;n=bt(),e=new G(r).finishMemberExpression("[",e,n)}return Jn.allowIn=o,e}function wt(){var e,n,r;for(t(Jn.allowIn,"callee of new expression always allow in keyword."),r=Gn,e=rt("new")?yt():ht();;)if(nt("["))n=bt(),e=new G(r).finishMemberExpression("[",e,n);else{if(!nt("."))break;n=gt(),e=new G(r).finishMemberExpression(".",e,n)}return e}function _t(){var e,t,n=Gn;return e=vt(),Nn||Gn.type!==xn.Punctuator||(nt("++")||nt("--"))&&(Cn&&e.type===Tn.Identifier&&d(e.name)&&X(Dn.StrictLHSPostfix),it(e)||X(Dn.InvalidLHSInAssignment),t=L(),e=new G(n).finishPostfixExpression(t.value,e)),e}function St(){var e,t,n;return Gn.type!==xn.Punctuator&&Gn.type!==xn.Keyword?t=_t():nt("++")||nt("--")?(n=Gn,e=L(),t=St(),Cn&&t.type===Tn.Identifier&&d(t.name)&&X(Dn.StrictLHSPrefix),it(t)||X(Dn.InvalidLHSInAssignment),t=new G(n).finishUnaryExpression(e.value,t)):nt("+")||nt("-")||nt("~")||nt("!")?(n=Gn,e=L(),t=St(),t=new G(n).finishUnaryExpression(e.value,t)):rt("delete")||rt("void")||rt("typeof")?(n=Gn,e=L(),t=St(),t=new G(n).finishUnaryExpression(e.value,t),Cn&&"delete"===t.operator&&t.argument.type===Tn.Identifier&&X(Dn.StrictDelete)):t=_t(),t}function kt(e,t){var n=0;if(e.type!==xn.Punctuator&&e.type!==xn.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function xt(){var e,t,n,r,o,s,i,a,l,c;if(e=Gn,l=St(),l===En.ArrowParameterPlaceHolder)return l;if(r=Gn,o=kt(r,Jn.allowIn),0===o)return l;for(r.prec=o,L(),t=[e,Gn],i=St(),s=[l,r,i];(o=kt(Gn,Jn.allowIn))>0;){for(;s.length>2&&o<=s[s.length-2].prec;)i=s.pop(),a=s.pop().value,l=s.pop(),t.pop(),n=new G(t[t.length-1]).finishBinaryExpression(a,l,i),s.push(n);r=L(),r.prec=o,s.push(r),t.push(Gn),n=St(),s.push(n)}for(c=s.length-1,n=s[c],t.pop();c>1;)n=new G(t.pop()).finishBinaryExpression(s[c-1].value,s[c-2],n),c-=2;return n}function jt(){var e,t,n,r,o;return o=Gn,e=xt(),e===En.ArrowParameterPlaceHolder?e:(nt("?")&&(L(),t=Jn.allowIn,Jn.allowIn=!0,n=Rt(),Jn.allowIn=t,Z(":"),r=Rt(),e=new G(o).finishConditionalExpression(e,n,r)),e)}function Ot(){return nt("{")?nn():Rt()}function Tt(e){var t,n,r,o,s,i,a,l,c;for(o=[],s=[],i=0,l=null,a={paramSet:{}},t=0,n=e.length;n>t;t+=1)if(r=e[t],r.type===Tn.Identifier)o.push(r),s.push(null),rn(a,r,r.name);else{if(r.type!==Tn.AssignmentExpression)return null;o.push(r.left),s.push(r.right),++i,rn(a,r.left,r.left.name)}return a.message===Dn.StrictParamDupe&&(c=Cn?a.stricted:a.firstRestricted,Q(c,a.message)),0===i&&(s=[]),{params:o,defaults:s,rest:l,stricted:a.stricted,firstRestricted:a.firstRestricted,message:a.message}}function Et(e,t){var n,r;return Z("=>"),n=Cn,r=Ot(),Cn&&e.firstRestricted&&Q(e.firstRestricted,e.message),Cn&&e.stricted&&Y(e.stricted,e.message),Cn=n,t.finishArrowFunctionExpression(e.params,e.defaults,r,r.type!==Tn.BlockStatement)}function Rt(){var e,t,n,r,o,s;return e=Jn.parenthesisCount,s=Gn,t=Gn,n=jt(),n!==En.ArrowParameterPlaceHolder&&!nt("=>")||Jn.parenthesisCount!==e&&Jn.parenthesisCount!==e+1||(n.type===Tn.Identifier?o=Tt([n]):n.type===Tn.AssignmentExpression?o=Tt([n]):n.type===Tn.SequenceExpression?o=Tt(n.expressions):n===En.ArrowParameterPlaceHolder&&(o=Tt([])),!o)?(ot()&&(it(n)||X(Dn.InvalidLHSInAssignment),Cn&&n.type===Tn.Identifier&&d(n.name)&&Y(t,Dn.StrictLHSAssignment),t=L(),r=Rt(),n=new G(s).finishAssignmentExpression(t.value,n,r)),n):Et(o,new G(s))}function Dt(){var e,t,n=Gn;if(e=Rt(),nt(",")){for(t=[e];Wn>Fn&&nt(",");)L(),t.push(Rt());e=new G(n).finishSequenceExpression(t)}return e}function Mt(){for(var e,t=[],n=An;Wn>Fn&&!nt("}")&&(e=cn(),"undefined"!=typeof e&&n!==An);)t.push(e),n=An;return t}function zt(){var e,t=new W;return Z("{"),e=Mt(),mn("}"),t.finishBlockStatement(e)}function Ct(){var e,t=new W;return e=L(),e.type!==xn.Identifier&&(Cn&&e.type===xn.Keyword&&p(e.value)?Y(e,Dn.StrictReservedWord):Q(e)),t.finishIdentifier(e.value)}function At(e){var t,n=null,r=new W;return t=Ct(),Cn&&d(t.name)&&X(Dn.StrictVarName),"const"===e?(Z("="),n=Rt()):nt("=")&&(L(),n=Rt()),r.finishVariableDeclarator(t,n)}function Pt(e){var t=[];do{if(t.push(At(e)),!nt(","))break;L()}while(Wn>Fn);return t}function It(e){var t;return tt("var"),t=Pt(),st(),e.finishVariableDeclaration(t,"var")}function Nt(e){var t,n=new W;return tt(e),t=Pt(e),st(),n.finishVariableDeclaration(t,e)}function Lt(){var e=new W;return Z(";"),e.finishEmptyStatement()}function Ut(e){var t=Dt();return st(),t||(t=Sn(e)),e.finishExpressionStatement(t)}function qt(e){var t,n,r;return tt("if"),Z("("),t=Dt(),mn(")","{"),n=tn(),rt("else")?(L(),r=tn()):r=null,e.finishIfStatement(t,n,r)}function Ft(e){var t,n,r;return tt("do"),r=Jn.inIteration,Jn.inIteration=!0,t=tn(),Jn.inIteration=r,tt("while"),Z("("),n=Dt(),mn(")","{"),nt(";")&&L(),e.finishDoWhileStatement(t,n)}function Ht(e){var t,n,r;return tt("while"),Z("("),t=Dt(),mn(")","{"),r=Jn.inIteration,Jn.inIteration=!0,n=tn(),Jn.inIteration=r,e.finishWhileStatement(t,n)}function Bt(){var e,t,n=new W;return e=L(),t=Pt(),n.finishVariableDeclaration(t,e.value)}function $t(e){var t,n,r,o,s,i,a,l=Jn.allowIn;return t=n=r=null,tt("for"),Z("("),nt(";")?L():(rt("var")||rt("let")?(Jn.allowIn=!1,t=Bt(),Jn.allowIn=l,1===t.declarations.length&&rt("in")&&(L(),o=t,s=Dt(),t=null)):(Jn.allowIn=!1,t=Dt(),Jn.allowIn=l,rt("in")&&(it(t)||X(Dn.InvalidLHSInForIn),L(),o=t,s=Dt(),t=null)),"undefined"==typeof o&&Z(";")),"undefined"==typeof o&&(nt(";")||(n=Dt()),Z(";"),nt(")")||(r=Dt())),mn(")","{"),a=Jn.inIteration,Jn.inIteration=!0,i=tn(),Jn.inIteration=a,"undefined"==typeof o?e.finishForStatement(t,n,r,i):e.finishForInStatement(o,s,i)}function Wt(e){var t,n=null;return tt("continue"),59===zn.charCodeAt(Fn)?(L(),Jn.inIteration||V(Dn.IllegalContinue),e.finishContinueStatement(null)):Nn?(Jn.inIteration||V(Dn.IllegalContinue),e.finishContinueStatement(null)):(Gn.type===xn.Identifier&&(n=Ct(),t="$"+n.name,Object.prototype.hasOwnProperty.call(Jn.labelSet,t)||V(Dn.UnknownLabel,n.name)),st(),null!==n||Jn.inIteration||V(Dn.IllegalContinue),e.finishContinueStatement(n))}function Gt(e){var t,n=null;return tt("break"),59===zn.charCodeAt(Ln)?(L(),Jn.inIteration||Jn.inSwitch||V(Dn.IllegalBreak),e.finishBreakStatement(null)):Nn?(Jn.inIteration||Jn.inSwitch||V(Dn.IllegalBreak),e.finishBreakStatement(null)):(Gn.type===xn.Identifier&&(n=Ct(),t="$"+n.name,Object.prototype.hasOwnProperty.call(Jn.labelSet,t)||V(Dn.UnknownLabel,n.name)),st(),null!==n||Jn.inIteration||Jn.inSwitch||V(Dn.IllegalBreak),e.finishBreakStatement(n))}function Jt(e){var t=null,n=Gn;return tt("return"),Jn.inFunctionBody||Y(n,Dn.IllegalReturn,n.value),32===zn.charCodeAt(Ln)&&a(zn.charCodeAt(Ln+1))?(t=Dt(),st(),e.finishReturnStatement(t)):Nn?e.finishReturnStatement(null):(nt(";")||nt("}")||Gn.type===xn.EOF||(t=Dt()),st(),e.finishReturnStatement(t))}function Vt(e){var t,n;return Cn&&X(Dn.StrictModeWith),tt("with"),Z("("),t=Dt(),mn(")","{"),n=tn(),e.finishWithStatement(t,n)}function Xt(){var e,t,n=[],r=new W;rt("default")?(L(),e=null):(tt("case"),e=Dt()),nt(":")&&L();for(var o=An;Wn>Fn&&!(nt("}")||rt("default")||rt("case"))&&(t=tn(),"undefined"!=typeof t&&null!==t)&&(n.push(t),o!==An);)o=An;return r.finishSwitchCase(e,n)}function Kt(e){var t,n,r,o,s;if(tt("switch"),Z("("),t=Dt(),Z(")"),Z("{"),n=[],nt("}"))return L(),e.finishSwitchStatement(t,n);for(o=Jn.inSwitch,Jn.inSwitch=!0,s=!1;Wn>Fn&&!nt("}");)r=Xt(),null===r.test&&(s&&V(Dn.MultipleDefaultsInSwitch),s=!0),n.push(r);return Jn.inSwitch=o,Z("}"),e.finishSwitchStatement(t,n)}function Qt(e){var t;return tt("throw"),Nn&&V(Dn.NewlineAfterThrow),t=Dt(),st(),e.finishThrowStatement(t)}function Yt(){var e,t,n=new W;return tt("catch"),Z("("),nt(")")&&Q(Gn),e=Ct(),Cn&&d(e.name)&&X(Dn.StrictCatchVariable),Z(")"),t=zt(),n.finishCatchClause(e,t)}function Zt(e){var t,n=[],r=null;return tt("try"),t=zt(),rt("catch")&&n.push(Yt()),rt("finally")&&(L(),r=zt()),0!==n.length||r||V(Dn.NoCatchOrFinally),e.finishTryStatement(t,[],n,r)}function en(e){return tt("debugger"),st(),e.finishDebuggerStatement()}function tn(){var e,t,n,r,o=Gn.type;if(o===xn.EOF&&Q(Gn),o===xn.Punctuator&&"{"===Gn.value)return zt();if(r=new W,o===xn.Punctuator)switch(Gn.value){case";":return Lt(r);case"(":return Ut(r)}else if(o===xn.Keyword)switch(Gn.value){case"break":return Gt(r);case"continue":return Wt(r);case"debugger":return en(r);case"do":return Ft(r);case"for":return $t(r);case"function":return an(r);case"if":return qt(r);case"return":return Jt(r);case"switch":return Kt(r);case"throw":return Qt(r);case"try":return Zt(r);case"var":return It(r);case"while":return Ht(r);case"with":return Vt(r)}return e=Dt(),e&&e.type===Tn.Identifier&&nt(":")?(L(),n="$"+e.name,Object.prototype.hasOwnProperty.call(Jn.labelSet,n)&&V(Dn.Redeclaration,"Label",e.name),Jn.labelSet[n]=!0,t=tn(),delete Jn.labelSet[n],r.finishLabeledStatement(e,t)):(st(),e||(e=Sn(r)),r.finishExpressionStatement(e))}function nn(){var e,t,n,r,o,s,i,a,l,c=[],p=new W;for(Z("{");Wn>Fn&&Gn.type===xn.StringLiteral&&(t=Gn,e=cn(),c.push(e),e.expression.type===Tn.Literal);)n=zn.slice(t.start+1,t.end-1),"use strict"===n?(Cn=!0,r&&Y(r,Dn.StrictOctalLiteral)):!r&&t.octal&&(r=t);o=Jn.labelSet,s=Jn.inIteration,i=Jn.inSwitch,a=Jn.inFunctionBody,l=Jn.parenthesizedCount,Jn.labelSet={},Jn.inIteration=!1,Jn.inSwitch=!1,Jn.inFunctionBody=!0,Jn.parenthesizedCount=0;for(var d=An;Wn>An&&!nt("}")&&(e=cn(),"undefined"!=typeof e&&null!=e)&&(c.push(e),d!==An);)d=An;return mn("}"),Jn.labelSet=o,Jn.inIteration=s,Jn.inSwitch=i,Jn.inFunctionBody=a,Jn.parenthesizedCount=l,p.finishBlockStatement(c)}function rn(e,t,n){var r="$"+n;Cn?(d(n)&&(e.stricted=t,e.message=Dn.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=Dn.StrictParamDupe)):e.firstRestricted||(d(n)?(e.firstRestricted=t,e.message=Dn.StrictParamName):p(n)?(e.firstRestricted=t,e.message=Dn.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.firstRestricted=t,e.message=Dn.StrictParamDupe)),e.paramSet[r]=!0}function on(e){var t,n,r;return t=Gn,n=Ct(),rn(e,t,t.value),nt("=")&&(L(),r=Rt(),++e.defaultCount),e.params.push(n),e.defaults.push(r),!nt(")")}function sn(e){var t;if(t={params:[],defaultCount:0,defaults:[],firstRestricted:e},Z("("),!nt(")"))for(t.paramSet={};Wn>Fn&&on(t);)Z(",");return Z(")"),0===t.defaultCount&&(t.defaults=[]),{params:t.params,defaults:t.defaults,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}}function an(){var e,t,n,r,o,s,i,a,l=[],c=[],u=new W;return tt("function"),n=Gn,e=Ct(),Cn?d(n.value)&&Y(n,Dn.StrictFunctionName):d(n.value)?(s=n,i=Dn.StrictFunctionName):p(n.value)&&(s=n,i=Dn.StrictReservedWord),o=sn(s),l=o.params,c=o.defaults,r=o.stricted,s=o.firstRestricted,o.message&&(i=o.message),a=Cn,t=nn(),Cn&&s&&Q(s,i),Cn&&r&&Y(r,i),Cn=a,u.finishFunctionDeclaration(e,l,c,t)}function ln(){var e,t,n,r,o,s,i,a=null,l=[],c=[],u=new W;return tt("function"),nt("(")||(e=Gn,a=Ct(),Cn?d(e.value)&&Y(e,Dn.StrictFunctionName):d(e.value)?(n=e,r=Dn.StrictFunctionName):p(e.value)&&(n=e,r=Dn.StrictReservedWord)),o=sn(n),l=o.params,c=o.defaults,t=o.stricted,n=o.firstRestricted,o.message&&(r=o.message),i=Cn,s=nn(),Cn&&n&&Q(n,r),Cn&&t&&Y(t,r),Cn=i,u.finishFunctionExpression(a,l,c,s)}function cn(){if(Gn.type===xn.Keyword)switch(Gn.value){case"const":case"let":return Nt(Gn.value);case"function":return an();default:return tn()}return Gn.type!==xn.EOF?tn():void 0}function pn(){for(var e,t,n,r,o=[];Wn>Fn&&(t=Gn,t.type===xn.StringLiteral)&&(e=cn(),o.push(e),e.expression.type===Tn.Literal);)n=zn.slice(t.start+1,t.end-1),"use strict"===n?(Cn=!0,r&&Y(r,Dn.StrictOctalLiteral)):!r&&t.octal&&(r=t);for(var s=An;Wn>Fn&&(e=cn(),"undefined"!=typeof e&&null!==e)&&(o.push(e),s!==An);)s=An;return o}function dn(){var e,t;return U(),t=new W,Cn=!1,e=pn(),t.finishProgram(e)}function un(){var e,t,n,r=[];for(e=0;e<Vn.tokens.length;++e)t=Vn.tokens[e],n={type:t.type,value:t.value},t.regex&&(n.regex={pattern:t.regex.pattern,flags:t.regex.flags}),Vn.range&&(n.range=t.range),Vn.loc&&(n.loc=t.loc),r.push(n);Vn.tokens=r}function hn(e,t){var n,r;n=String,"string"==typeof e||e instanceof String||(e=n(e)),zn=e,An=0,Pn=zn.length>0?1:0,In=0,Fn=An,Hn=Pn,Bn=In,Wn=zn.length,Gn=null,Jn={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},Vn={},t=t||{},t.tokens=!0,Vn.tokens=[],Vn.tokenize=!0,Vn.openParenToken=-1,Vn.openCurlyToken=-1,Vn.range="boolean"==typeof t.range&&t.range,Vn.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(Vn.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(Vn.errors=[]);try{if(U(),Gn.type===xn.EOF)return Vn.tokens;for(L();Gn.type!==xn.EOF;)try{L()}catch(o){if(Vn.errors){Vn.errors.push(o);break}throw o}un(),r=Vn.tokens,"undefined"!=typeof Vn.comments&&(r.comments=Vn.comments),"undefined"!=typeof Vn.errors&&(r.errors=Vn.errors)}catch(s){throw s}finally{Vn={}}return r}function fn(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),zn=e,An=0,Pn=zn.length>0?1:0,In=0,Fn=An,Hn=Pn,Bn=In,Wn=zn.length,Gn=null,Jn={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},Vn={},"undefined"!=typeof t&&("boolean"==typeof t.deps&&t.deps&&(Vn.deps=[]),Vn.range="boolean"==typeof t.range&&t.range,Vn.loc="boolean"==typeof t.loc&&t.loc,Vn.attachComment="boolean"==typeof t.attachComment&&t.attachComment,Vn.loc&&null!==t.source&&void 0!==t.source&&(Vn.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(Vn.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(Vn.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(Vn.errors=[],Vn.parseStatement=tn,Vn.parseExpression=Dt,tn=yn(tn),Dt=bn(Dt)),Vn.attachComment&&(Vn.range=!0,Vn.comments=[],Vn.bottomRightStack=[],Vn.trailingComments=[],Vn.leadingComments=[]),Vn.directSourceFile=t.directSourceFile);try{n=dn(),"undefined"!=typeof Vn.comments&&(n.comments=Vn.comments),"undefined"!=typeof Vn.tokens&&(un(),n.tokens=Vn.tokens),"undefined"!=typeof Vn.errors&&(n.errors=Vn.errors),"undefined"!=typeof Vn.deps&&(n.dependencies=Vn.deps)
}catch(o){throw o}finally{"undefined"!=typeof Vn.errors&&(tn=Vn.parseStatement,Dt=Vn.parseExpression),Vn={}}return n}function mn(e,t){try{Z(e)}catch(n){if(!Vn.errors)throw n;gn(n),t&&zn[n.index]===t&&(An=n.index,U())}}function gn(e){for(var t=Vn.errors.length,n=0;t>n;n++){var r=Vn.errors[n];if(r.index===e.index&&r.message===e.message)return}Vn.errors.push(e)}function bn(e){return function(){try{return e.apply(null,arguments)}catch(t){gn(t)}}}function yn(e){return function(){Vn.statementStart=An;try{return e.apply(null,arguments)}catch(t){gn(t)}}}function vn(e){for(var t=e;t>-1&&";"!==zn[t]&&"\n"!==zn[t];)t--;if(!(t<=Vn.statementStart)){var n=!1;Vn.lastRewindLocation?n=!0:Vn.lastRewindLocation!==t&&(n=!0),n&&(An=t,wn(e),U(),Vn.lastRewindLocation=An)}}function wn(e,t){for(var n=Vn.tokens.length-1;n>-1;){var r=Vn.tokens[n];if(r.range[0]<e){t&&Vn.tokens.pop();break}n--,Vn.tokens.pop()}return n}function _n(e){if(e.value&&e.type===xn.Punctuator){var t=e.range?e.range[0]:e.start,n=wn(t),r=Vn.tokens[n];r.type===jn[xn.Punctuator]&&"."===r.value&&(An=r.range[0]+1,U())}}function Sn(e,t,n){var r={type:"RecoveredNode",name:"",recovered:!0,expectedValue:n,expectedType:t};return Vn.range&&(r.range=e.range,r.range[1]=An,r.start=e.range,r.end=An),Vn.loc&&(r.loc=e.loc,r.loc.end=new H),r}function kn(e,t,n){if(Vn.errors){var r=Gn;if(":"===r.value)try{return r=L(),n.finishProperty("init",t,Rt(),!1,!0)}catch(o){return r=Vn.tokens[Vn.tokens.length-1],Y(r,Dn.UnexpectedToken,r.value),n.finishProperty("init",t,null,!1,!0),null}else{if(r.type===xn.Punctuator&&"}"===r.value)return Y(e,Dn.UnexpectedToken,e.value),n.finishProperty("init",t,!1,!0,!0),null;if(Y(e,Dn.UnexpectedToken,e.value),r.type===xn.Identifier||r.type===xn.StringLiteral)return n.finishProperty("init",t,!1,!0),null;for(;r.type!==xn.EOF;){if(r.type===xn.Punctuator&&(","===r.value||"}"===r.value))return n.finishProperty("init",t,!1,!0),null;r=L(),r=I()}}return n.finishProperty("init",t,!1,!0),null}return Z(":"),n.finishProperty("init",t,Rt(),!1,!0)}var xn,jn,On,Tn,En,Rn,Dn,Mn,zn,Cn,An,Pn,In,Nn,Ln,Un,qn,Fn,Hn,Bn,$n,Wn,Gn,Jn,Vn;xn={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},jn={},jn[xn.BooleanLiteral]="Boolean",jn[xn.EOF]="<end>",jn[xn.Identifier]="Identifier",jn[xn.Keyword]="Keyword",jn[xn.NullLiteral]="Null",jn[xn.NumericLiteral]="Numeric",jn[xn.Punctuator]="Punctuator",jn[xn.StringLiteral]="String",jn[xn.RegularExpression]="RegularExpression",On=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],Tn={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},En={ArrowParameterPlaceHolder:{type:"ArrowParameterPlaceHolder"}},Rn={Data:1,Get:2,Set:4},Dn={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",MissingToken:"Missing expected '%0'"},Mn={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ０-９Ａ-Ｚ＿ａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]")},G.prototype=W.prototype={processComment:function(){var e,t,n,r,o,s=Vn.bottomRightStack,i=s[s.length-1];if(!(this.type===Tn.Program&&this.body.length>0)){if(Vn.trailingComments.length>0){for(n=[],r=Vn.trailingComments.length-1;r>=0;--r)o=Vn.trailingComments[r],o.range[0]>=this.range[1]&&(n.unshift(o),Vn.trailingComments.splice(r,1));Vn.trailingComments=[]}else i&&i.trailingComments&&i.trailingComments[0].range[0]>=this.range[1]&&(n=i.trailingComments,delete i.trailingComments);if(i)for(;i&&i.range[0]>=this.range[0];)e=i,i=s.pop();if(e)e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=e.leadingComments,e.leadingComments=void 0);else if(Vn.leadingComments.length>0)for(t=[],r=Vn.leadingComments.length-1;r>=0;--r)o=Vn.leadingComments[r],o.range[1]<=this.range[0]&&(t.unshift(o),Vn.leadingComments.splice(r,1));t&&t.length>0&&(this.leadingComments=t),n&&n.length>0&&(this.trailingComments=n),s.push(this)}},finish:function(){Vn.loc&&(this.loc.end={line:Un,column:Ln-qn},Vn.source&&(this.loc.source=Vn.source)),Vn.range&&(this.range[1]=Ln,this.start=this.range[0],this.end=Ln),Vn.attachComment&&this.processComment()},finishArrayExpression:function(e){return this.type=Tn.ArrayExpression,this.elements=e,this.finish(),this},finishArrowFunctionExpression:function(e,t,n,r){return this.type=Tn.ArrowFunctionExpression,this.id=null,this.params=e,this.defaults=t,this.body=n,this.rest=null,this.generator=!1,this.expression=r,this.finish(),this},finishAssignmentExpression:function(e,t,n){return this.type=Tn.AssignmentExpression,this.operator=e,this.left=t,this.right=n,this.finish(),this},finishBinaryExpression:function(e,t,n){return this.type="||"===e||"&&"===e?Tn.LogicalExpression:Tn.BinaryExpression,this.operator=e,this.left=t,this.right=n,this.finish(),this},finishBlockStatement:function(e){return this.type=Tn.BlockStatement,this.body=e,this.finish(),this},finishBreakStatement:function(e){return this.type=Tn.BreakStatement,this.label=e,this.finish(),this},finishCallExpression:function(e,t){return this.type=Tn.CallExpression,this.callee=e,this.arguments=t,F(e,t),this.finish(),this},finishCatchClause:function(e,t){return this.type=Tn.CatchClause,this.param=e,this.body=t,this.finish(),this},finishConditionalExpression:function(e,t,n){return this.type=Tn.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n,this.finish(),this},finishContinueStatement:function(e){return this.type=Tn.ContinueStatement,this.label=e,this.finish(),this},finishDebuggerStatement:function(){return this.type=Tn.DebuggerStatement,this.finish(),this},finishDoWhileStatement:function(e,t){return this.type=Tn.DoWhileStatement,this.body=e,this.test=t,this.finish(),this},finishEmptyStatement:function(){return this.type=Tn.EmptyStatement,this.finish(),this},finishExpressionStatement:function(e){return this.type=Tn.ExpressionStatement,this.expression=e,this.finish(),this},finishForStatement:function(e,t,n,r){return this.type=Tn.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r,this.finish(),this},finishForInStatement:function(e,t,n){return this.type=Tn.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1,this.finish(),this},finishFunctionDeclaration:function(e,t,n,r){return this.type=Tn.FunctionDeclaration,this.id=e,this.params=t,this.defaults=n,this.body=r,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishFunctionExpression:function(e,t,n,r){return this.type=Tn.FunctionExpression,this.id=e,this.params=t,this.defaults=n,this.body=r,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishIdentifier:function(e){return this.type=Tn.Identifier,this.name=e,this.finish(),this},finishIfStatement:function(e,t,n){return this.type=Tn.IfStatement,this.test=e,this.consequent=t,this.alternate=n,this.finish(),this},finishLabeledStatement:function(e,t){return this.type=Tn.LabeledStatement,this.label=e,this.body=t,this.finish(),this},finishLiteral:function(e){return this.type=Tn.Literal,this.value=e.value,this.raw=zn.slice(e.start,e.end),e.regex&&(this.regex=e.regex),this.finish(),this},finishMemberExpression:function(e,t,n){return this.type=Tn.MemberExpression,this.computed="["===e,this.object=t,this.property=n,this.finish(),this},finishNewExpression:function(e,t){return this.type=Tn.NewExpression,this.callee=e,this.arguments=t,F(e,t),this.finish(),this},finishObjectExpression:function(e){return this.type=Tn.ObjectExpression,this.properties=e,this.finish(),this},finishPostfixExpression:function(e,t){return this.type=Tn.UpdateExpression,this.operator=e,this.argument=t,this.prefix=!1,this.finish(),this},finishProgram:function(e){return this.type=Tn.Program,this.body=e,this.finish(),this},finishProperty:function(e,t,n,r,o){return this.type=Tn.Property,this.key=t,this.value=n,this.kind=e,this.method=r,this.shorthand=o,this.finish(),this},finishReturnStatement:function(e){return this.type=Tn.ReturnStatement,this.argument=e,this.finish(),this},finishSequenceExpression:function(e){return this.type=Tn.SequenceExpression,this.expressions=e,this.finish(),this},finishSwitchCase:function(e,t){return this.type=Tn.SwitchCase,this.test=e,this.consequent=t,this.finish(),this},finishSwitchStatement:function(e,t){return this.type=Tn.SwitchStatement,this.discriminant=e,this.cases=t,this.finish(),this},finishThisExpression:function(){return this.type=Tn.ThisExpression,this.finish(),this},finishThrowStatement:function(e){return this.type=Tn.ThrowStatement,this.argument=e,this.finish(),this},finishTryStatement:function(e,t,n,r){return this.type=Tn.TryStatement,this.block=e,this.guardedHandlers=t,this.handlers=n,this.finalizer=r,this.finish(),this},finishUnaryExpression:function(e,t){return this.type="++"===e||"--"===e?Tn.UpdateExpression:Tn.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0,this.finish(),this},finishVariableDeclaration:function(e,t){return this.type=Tn.VariableDeclaration,this.declarations=e,this.kind=t,this.finish(),this},finishVariableDeclarator:function(e,t){return this.type=Tn.VariableDeclarator,this.id=e,this.init=t,this.finish(),this},finishWhileStatement:function(e,t){return this.type=Tn.WhileStatement,this.test=e,this.body=t,this.finish(),this},finishWithStatement:function(e,t){return this.type=Tn.WithStatement,this.object=e,this.body=t,this.finish(),this}},e.version="2.0.0",e.tokenize=hn,e.parse=fn,e.isIdentifierPart=l,e.isIdentifierStart=a,e.isIdentifierChar=l,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in Tn)Tn.hasOwnProperty(e)&&(t[e]=Tn[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}),function(e){return"object"==typeof exports&&"object"==typeof module?e(exports):"function"==typeof define&&define.amd?define("acorn/util/walk",["exports"],e):void e((this.acorn||(this.acorn={})).walk={})}(function(e){"use strict";function t(e){return"string"==typeof e?function(t){return t==e}:e?e:function(){return!0}}function n(e,t){this.node=e,this.state=t}function r(e,t,n){n(e,t)}function o(){}function s(e,t){return{vars:Object.create(null),prev:e,isCatch:t}}function i(e){for(;e.isCatch;)e=e.prev;return e}e.simple=function(t,n,r,o){function s(e,t,o){var i=o||e.type,a=n[i];r[i](e,t,s),a&&a(e,t)}r||(r=e.base),s(t,o)},e.ancestor=function(t,n,r,o){function s(e,t,o){var i=o||e.type,a=n[i];e!=t[t.length-1]&&(t=t.slice(),t.push(e)),r[i](e,t,s),a&&a(e,t)}r||(r=e.base),o||(o=[]),s(t,o)},e.recursive=function(t,n,r,o){function s(e,t,n){i[n||e.type](e,t,s)}var i=r?e.make(r,o):o;s(t,n)},e.findNodeAt=function(r,o,s,i,a,l){i=t(i);try{a||(a=e.base);var c=function(e,t,r){var l=r||e.type;if((null==o||e.start<=o)&&(null==s||e.end>=s)&&a[l](e,t,c),i(l,e)&&(null==o||e.start==o)&&(null==s||e.end==s))throw new n(e,t)};c(r,l)}catch(p){if(p instanceof n)return p;throw p}},e.findNodeAround=function(r,o,s,i,a){s=t(s);try{i||(i=e.base);var l=function(e,t,r){var a=r||e.type;if(!(e.start>o||e.end<o)&&(i[a](e,t,l),s(a,e)))throw new n(e,t)};l(r,a)}catch(c){if(c instanceof n)return c;throw c}},e.findNodeAfter=function(r,o,s,i,a){s=t(s);try{i||(i=e.base);var l=function(e,t,r){if(!(e.end<o)){var a=r||e.type;if(e.start>=o&&s(a,e))throw new n(e,t);i[a](e,t,l)}};l(r,a)}catch(c){if(c instanceof n)return c;throw c}},e.findNodeBefore=function(r,o,s,i,a){s=t(s),i||(i=e.base);var l,c=function(e,t,r){if(!(e.start>o)){var a=r||e.type;e.end<=o&&(!l||l.node.end<e.end)&&s(a,e)&&(l=new n(e,t)),i[a](e,t,c)}};return c(r,a),l},e.make=function(t,n){n||(n=e.base);var r={};for(var o in n)r[o]=n[o];for(var o in t)r[o]=t[o];return r};var a=e.base={};a.Program=a.BlockStatement=function(e,t,n){for(var r=0;r<e.body.length;++r)n(e.body[r],t,"Statement")},a.Statement=r,a.EmptyStatement=o,a.ExpressionStatement=function(e,t,n){n(e.expression,t,"Expression")},a.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},a.LabeledStatement=function(e,t,n){n(e.body,t,"Statement")},a.BreakStatement=a.ContinueStatement=o,a.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},a.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;r<e.cases.length;++r){var o=e.cases[r];o.test&&n(o.test,t,"Expression");for(var s=0;s<o.consequent.length;++s)n(o.consequent[s],t,"Statement")}},a.ReturnStatement=a.YieldExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},a.ThrowStatement=a.SpreadElement=function(e,t,n){n(e.argument,t,"Expression")},a.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler.body,t,"ScopeBody"),e.finalizer&&n(e.finalizer,t,"Statement")},a.WhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},a.DoWhileStatement=a.WhileStatement,a.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},a.ForInStatement=a.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},a.ForInit=function(e,t,n){"VariableDeclaration"==e.type?n(e,t):n(e,t,"Expression")},a.DebuggerStatement=o,a.FunctionDeclaration=function(e,t,n){n(e,t,"Function")},a.VariableDeclaration=function(e,t,n){for(var r=0;r<e.declarations.length;++r){var o=e.declarations[r];o.init&&n(o.init,t,"Expression")}},a.Function=function(e,t,n){n(e.body,t,"ScopeBody")},a.ScopeBody=function(e,t,n){n(e,t,"Statement")},a.Expression=r,a.ThisExpression=o,a.ArrayExpression=function(e,t,n){for(var r=0;r<e.elements.length;++r){var o=e.elements[r];o&&n(o,t,"Expression")}},a.ObjectExpression=function(e,t,n){for(var r=0;r<e.properties.length;++r)n(e.properties[r],t)},a.FunctionExpression=a.ArrowFunctionExpression=a.FunctionDeclaration,a.SequenceExpression=a.TemplateLiteral=function(e,t,n){for(var r=0;r<e.expressions.length;++r)n(e.expressions[r],t,"Expression")},a.UnaryExpression=a.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},a.BinaryExpression=a.AssignmentExpression=a.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},a.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},a.NewExpression=a.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0;r<e.arguments.length;++r)n(e.arguments[r],t,"Expression")},a.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},a.Identifier=a.Literal=a.ExportDeclaration=a.ImportDeclaration=o,a.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t)},a.ClassDeclaration=a.ClassExpression=function(e,t,n){e.superClass&&n(e.superClass,t,"Expression");for(var r=0;r<e.body.body.length;r++)n(e.body.body[r],t)},a.MethodDefinition=a.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")},a.ComprehensionExpression=function(e,t,n){for(var r=0;r<e.blocks.length;r++)n(e.blocks[r].right,t,"Expression");n(e.body,t,"Expression")},a.RecoveredNode=o,e.scopeVisitor=e.make({Function:function(e,t,n){for(var r=s(t),o=0;o<e.params.length;++o)r.vars[e.params[o].name]={type:"argument",node:e.params[o]};if(e.id){var a="FunctionDeclaration"==e.type;(a?i(t):r).vars[e.id.name]={type:a?"function":"function name",node:e.id}}n(e.body,r,"ScopeBody")},TryStatement:function(e,t,n){if(n(e.block,t,"Statement"),e.handler){var r=s(t,!0);r.vars[e.handler.param.name]={type:"catch clause",node:e.handler.param},n(e.handler.body,r,"ScopeBody")}e.finalizer&&n(e.finalizer,t,"Statement")},VariableDeclaration:function(e,t,n){for(var r=i(t),o=0;o<e.declarations.length;++o){var s=e.declarations[o];r.vars[s.id.name]={type:"var",node:s.id},s.init&&n(s.init,t,"Expression")}}})}),function(e){return"object"==typeof exports&&"object"==typeof module?exports.init=e:"function"==typeof define&&define.amd?define("tern/lib/def",{init:e}):void(tern.def={init:e})}(function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e,n,r,s){var i=new u(e,null,r,s).parseType(n,!0);if(/^fn\(/.test(e))for(var a=0;a<i.args.length;++a)(function(e){var n=i.args[e];n instanceof t.Fn&&n.args&&n.args.length&&o(i,function(r,o){var s=o[e];s&&s.propagate(new t.IsCallee(t.cx().topScope,n.args,null,t.ANull))})})(a);return i}function o(e,t,n){var r=e.computeRet,o=e.retval;e.computeRet=function(e,s,i){var a=t(e,s,i),l=r?r(e,s,i):o;return n?a:l}}function s(e){var t=Object.create(e.prototype);return t.props=Object.create(null),t.isShell=!0,t}function i(e){if(!e["!type"]||/^(fn\(|\[)/.test(e["!type"]))return!1;for(var t in e)if("!type"!=t&&"!doc"!=t&&"!url"!=t&&"!span"!=t&&"!data"!=t)return!1;return!0}function a(e,r,o){if(!e){var l=r["!type"];if(l)if(/^fn\(/.test(l))e=s(t.Fn);else{if("["!=l.charAt(0))throw new Error("Invalid !type spec: "+l);e=s(t.Arr)}else e=r["!stdProto"]?t.cx().protos[r["!stdProto"]]:s(t.Obj);e.name=o}for(var c in r)if(n(r,c)&&33!=c.charCodeAt(0)){var p=r[c];if("string"==typeof p||i(p))continue;var d=e.defProp(c);a(d.getType(!1),p,o?o+"."+c:c).propagate(d)}return e}function l(e,o,s){if(e.isShell){delete e.isShell;var a=o["!type"];if(a)r(a,s,e);else{var p=o["!proto"]&&r(o["!proto"]);t.Obj.call(e,p instanceof t.Obj?p:!0,s)}}var d=o["!effects"];if(d&&e instanceof t.Fn)for(var u=0;u<d.length;++u)f(d[u],e);c(o,e);for(var h in o)if(n(o,h)&&33!=h.charCodeAt(0)){var m=o[h],g=e.defProp(h),b=s?s+"."+h:h,y=g.getType(!1);if("string"==typeof m){if(y)continue;r(m,b).propagate(g)}else{if(i(m)){if(y)continue;r(m["!type"],b,null,!0).propagate(g),y=g.getType(!1),y instanceof t.Obj&&c(m,y)}else l(y,m,b);m["!doc"]&&(g.doc=m["!doc"]),m["!url"]&&(g.url=m["!url"]),m["!span"]&&(g.span=m["!span"])}}}function c(e,t){e["!doc"]&&(t.doc=e["!doc"]),e["!url"]&&(t.url=e["!url"]),e["!span"]&&(t.span=e["!span"]),e["!data"]&&(t.metaData=e["!data"])}function p(e,n){var r=t.cx().parent,o=r&&r.passes&&r.passes[e];if(o)for(var s=0;s<o.length;s++)o[s](n)}function d(e,n){var r=t.cx();t.addOrigin(r.curOrigin=e["!name"]||"env#"+r.origins.length),r.localDefs=r.definitions[r.curOrigin]=Object.create(null),p("preLoadDef",e),a(n,e);var o=e["!define"];if(o){for(var s in o){var i=o[s];r.localDefs[s]="string"==typeof i?m(i):a(null,i,s)}for(var s in o){var i=o[s];"string"!=typeof i&&l(r.localDefs[s],o[s],s)}}l(n,e),p("postLoadDef",e),r.curOrigin=r.localDefs=null}var u=e.TypeParser=function(e,t,n,r){this.pos=t||0,this.spec=e,this.base=n,this.forceNew=r};u.prototype={eat:function(e){return(1==e.length?this.spec.charAt(this.pos)==e:this.spec.indexOf(e,this.pos)==this.pos)?(this.pos+=e.length,!0):void 0},word:function(e){for(var t,n="",e=e||/[\w$]/;(t=this.spec.charAt(this.pos))&&e.test(t);)n+=t,++this.pos;return n},error:function(){throw new Error("Unrecognized type spec: "+this.spec+" (at "+this.pos+")")},parseFnType:function(e,n){var r=[],o=[];if(!this.eat(")"))for(var s=0;;++s){var i,a=this.spec.indexOf(": ",this.pos);if(-1!=a&&(i=this.spec.slice(this.pos,a),/^[$\w?]+$/.test(i)?this.pos=a+2:i=null),o.push(i),r.push(this.parseType()),!this.eat(", ")){this.eat(")")||this.error();break}}var l,c,p,d;return this.eat(" -> ")?n&&this.spec.indexOf("!",this.pos)>-1?(l=t.ANull,p=this.pos,c=this.parseRetType()):l=this.parseType():l=t.ANull,n&&(d=this.base)?t.Fn.call(this.base,e,t.ANull,r,o,l):d=new t.Fn(e,t.ANull,r,o,l),c&&(d.computeRet=c),null!=p&&(d.computeRetSource=this.spec.slice(p,this.pos)),d},parseType:function(e,n){if(this.eat("fn("))return this.parseFnType(e,n);if(this.eat("[")){var r=this.parseType();if(r==t.ANull&&"[b.<i>]"==this.spec){var o=m("b");console.log(o.props["<i>"].types.length)}return this.eat("]")||this.error(),n&&this.base?(t.Arr.call(this.base,r),this.base):new t.Arr(r)}if(this.eat("+")){var s=this.word(/[\w$<>\.!]/),i=m(s+".prototype");return i instanceof t.Obj||(i=m(s)),i instanceof t.Obj?n&&this.forceNew?new t.Obj(i):t.getInstance(i):i}return this.eat("?")?t.ANull:this.fromWord(this.word(/[\w$<>\.!`]/))},fromWord:function(e){var n=t.cx();switch(e){case"number":return n.num;case"string":return n.str;case"bool":return n.bool;case"<top>":return n.topScope}return n.localDefs&&e in n.localDefs?n.localDefs[e]:m(e)},parseBaseRetType:function(){if(this.eat("[")){var e=this.parseRetType();return this.eat("]")||this.error(),function(n,r){return new t.Arr(e(n,r))}}if(this.eat("+")){var n=this.parseRetType();return function(e,r){return t.getInstance(n(e,r))}}if(this.eat("!")){var r=this.word(/\d/);if(r)return r=Number(r),function(e,n){return n[r]||t.ANull};if(this.eat("this"))return function(e){return e};if(this.eat("custom:")){var o=this.word(/[\w$]/);return g[o]||function(){return t.ANull}}return this.fromWord("!"+r+this.word(/[\w$<>\.!]/))}var s=this.parseType();return function(){return s}},extendRetType:function(e){var n=this.word(/[\w<>$!]/)||this.error();return"!ret"==n?function(n,r){var o=e(n,r);if(o.retval)return o.retval;var s=new t.AVal;return o.propagate(new t.IsCallee(t.ANull,[],null,s)),s}:function(t,r){return e(t,r).getProp(n)}},parseRetType:function(){for(var e=this.parseBaseRetType();this.eat(".");)e=this.extendRetType(e);return e}};var h,f=e.parseEffect=function(e,n){var r;if(0==e.indexOf("propagate ")){var s=new u(e,10),i=s.parseRetType();s.eat(" ")||s.error();var a=s.parseRetType();o(n,function(e,t){i(e,t).propagate(a(e,t))})}else if(0==e.indexOf("call ")){var l=5==e.indexOf("and return ",5),s=new u(e,l?16:5),c=s.parseRetType(),p=null,d=[];for(s.eat(" this=")&&(p=s.parseRetType());s.eat(" ");)d.push(s.parseRetType());o(n,function(e,n){for(var r=c(e,n),o=p?p(e,n):t.ANull,s=[],i=0;i<d.length;++i)s.push(d[i](e,n));var a=l?new t.AVal:t.ANull;return r.propagate(new t.IsCallee(o,s,null,a)),a},l)}else if(r=e.match(/^custom (\S+)\s*(.*)/)){var h=g[r[1]];h&&o(n,r[2]?h(r[2]):h)}else{if(0!=e.indexOf("copy "))throw new Error("Unknown effect type: "+e);var s=new u(e,5),f=s.parseRetType();s.eat(" ");var m=s.parseRetType();o(n,function(e,n){var r=f(e,n),o=m(e,n);r.forAllProps(function(e,n,r){r&&"<i>"!=e&&o.propagate(new t.PropHasSubset(e,n))})})}},m=e.parsePath=function(e){var n=t.cx(),r=n.paths[e],o=e;if(null!=r)return r;n.paths[e]=t.ANull;var s=h||n.topScope;if(n.localDefs)for(var i in n.localDefs)if(0==e.indexOf(i)){if(e==i)return n.paths[e]=n.localDefs[e];if("."==e.charAt(i.length)){s=n.localDefs[i],e=e.slice(i.length+1);break}}for(var a=e.split("."),l=0;l<a.length&&s!=t.ANull;++l){var c=a[l];if("!"==c.charAt(0))if("!proto"==c)s=s instanceof t.Obj&&s.proto||t.ANull;else{var p=s.getFunctionType();if(p)if("!ret"==c)s=p.retval&&p.retval.getType(!1)||t.ANull;else{var d=p.args&&p.args[Number(c.slice(1))];s=d&&d.getType(!1)||t.ANull}else s=t.ANull}else if(s instanceof t.Obj){var u="prototype"==c&&s instanceof t.Fn?s.getProp(c):s.props[c];s=!u||u.isEmpty()?t.ANull:u.types[0]}}return n.paths[o]=s==t.ANull?null:s,s};e.load=function(e,n){n||(n=t.cx().topScope);var r=h;h=n;try{d(e,n)}finally{h=r}};var g=Object.create(null);t.registerFunction=function(e,t){g[e]=t};var b=t.constraint("created, target, spec",{addType:function(e){if(e instanceof t.Obj&&this.created++<5){var n=new t.Obj(e),r=this.spec;if(r instanceof t.AVal&&(r=r.getType(!1)),r instanceof t.Obj)for(var o in r.props){var s=r.props[o].types[0],i=n.defProp(o);if(s&&s instanceof t.Obj&&s.props.value){var a=s.props.value.getType(!1);a&&i.addType(a)}}this.target.addType(n)}}});t.registerFunction("Object_create",function(e,n,r){if(r&&r.length&&"Literal"==r[0].type&&null==r[0].value)return new t.Obj;var o=new t.AVal;return n[0]&&n[0].propagate(new b(0,o,n[1])),o});var y=t.constraint("self, args, target",{addType:function(e){if(e instanceof t.Fn){this.target.addType(new t.Fn(e.name,e.self,e.args.slice(this.args.length),e.argNames.slice(this.args.length),e.retval)),this.self.propagate(e.self);for(var n=0;n<Math.min(e.args.length,this.args.length);++n)this.args[n].propagate(e.args[n])}}});return t.registerFunction("Function_bind",function(e,n){if(!n.length)return t.ANull;var r=new t.AVal;return e.propagate(new y(n[0],n.slice(1),r)),r}),t.registerFunction("Array_ctor",function(e,n){var r=new t.Arr;if(1!=n.length||!n[0].hasType(t.cx().num))for(var o=r.getProp("<i>"),s=0;s<n.length;++s)n[s].propagate(o);return r}),e}),function(e){return"object"==typeof exports&&"object"==typeof module?e(exports):"function"==typeof define&&define.amd?define("tern/lib/signal",["exports"],e):void e((self.tern||(self.tern={})).signal={})}(function(e){function t(e,t){var n=this._handlers||(this._handlers=Object.create(null));(n[e]||(n[e]=[])).push(t)}function n(e,t){var n=this._handlers&&this._handlers[e];if(n)for(var r=0;r<n.length;++r)if(n[r]==t){n.splice(r,1);break}}function r(e,t,n,r,o){var s=this._handlers&&this._handlers[e];if(s)for(var i=0;i<s.length;++i)s[i].call(this,t,n,r,o)}e.mixin=function(e){return e.on=t,e.off=n,e.signal=r,e}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(exports,require("esprima"),require("acorn/util/walk"),require("./def"),require("./signal")):"function"==typeof define&&define.amd?define("tern/lib/infer",["exports","esprima","acorn/util/walk","./def","./signal"],e):void e(self.tern||(self.tern={}),acorn,acorn_loose,acorn.walk,tern.def,tern.signal)}(function(e,t,n,r,o){"use strict";function s(e,t){var n=Object.create(e);if(t)for(var r in t)n[r]=t[r];return n}function i(e){for(var t=0,n=0,r=0,o=null,s=0;s<e.length;++s){var i=e[s];if(i instanceof st)++t;else if(i instanceof ot)++n;else if(i instanceof rt)++r;else if(i instanceof nt){if(o&&i.name!=o.name)return null;o=i}}var a=(t&&1)+(n&&1)+(r&&1)+(o&&1);if(a>1)return null;if(o)return o;for(var l=0,c=null,s=0;s<e.length;++s){var i=e[s],p=0;if(t)p=i.getProp("<i>").isEmpty()?1:2;else if(n){p=1;for(var d=0;d<i.args.length;++d)i.args[d].isEmpty()||++p;i.retval.isEmpty()||++p}else r&&(p=i.name?100:2);p>=l&&(l=p,c=i)}return c}function a(){}function l(e,t){it.disabledComputing={fn:e,prev:it.disabledComputing};try{return t()}finally{it.disabledComputing=it.disabledComputing.prev}}function c(e,t){var n=it.props[e]||(it.props[e]=[]);n.push(t)}function p(e){return it.props[e]}function d(t){if(it.workList)return t(it.workList);var n=[],r=0,o=it.workList=function(e,t,o){r<lt-ct*n.length&&n.push(e,t,o,r)};try{for(var s=t(o),i=0;i<n.length;i+=4){if(at&&+new Date>=at)throw new e.TimedOut;r=n[i+3]+1,n[i+1].addType(n[i],n[i+2])}return s}finally{it.workList=null}}function u(e,t){e.fnType&&(e.fnType.instantiateScore=(e.fnType.instantiateScore||0)+t)}function h(e,t){try{return n.simple(e,{Expression:function(){if(--t<=0)throw dt
}}),!0}catch(r){if(r==dt)return!1;throw r}}function f(e,t){var n=t.fnType.instantiateScore;return!it.disabledComputing&&n&&t.fnType.args.length&&h(e,5*n)?(u(t.prev,n/2),m(e,t),!0):void(t.fnType.instantiateScore=null)}function m(e,t){for(var r=t.fnType,o=0;o<r.args.length;++o)r.args[o]=new q;r.self=new q,r.computeRet=function(o,s){return l(r,function(){var i=it.curOrigin;it.curOrigin=r.origin;var a=new pt(t.prev);a.originNode=t.originNode;for(var l in t.props)for(var c=a.defProp(l,t.props[l].originNode),p=0;p<s.length;++p)r.argNames[p]==l&&p<s.length&&s[p].propagate(c);for(var d=r.argNames.length!=s.length?r.argNames.slice(0,s.length):r.argNames;d.length<s.length;)d.push("?");if(a.fnType=new ot(r.name,o,s,d,z),r.arguments){var u=a.fnType.arguments=new q;a.defProp("arguments").addType(new st(u));for(var p=0;p<s.length;++p)s[p].propagate(u)}return e.body.scope=a,n.recursive(e.body,a,null,ut),n.recursive(e.body,a,null,ft),it.curOrigin=i,a.fnType.retval})}}function g(e){function t(e,n,r){if(!(r>3)&&e.forward)for(var s=0;s<e.forward.length;++s){var i=e.forward[s].propagatesTo();if(i){var a,l=n;if(i instanceof q)a=i;else{if(!(i.target instanceof q))continue;l+=i.pathExt,a=i.target}if(a==o)return l;var c=t(a,l,r+1);if(c)return c}}}var n=e.fnType,o=n.retval;if(o!=z){var s,i;!o.isEmpty()&&(s=o.getType())instanceof st&&(o=i=s.getProp("<i>"));for(var a=t(n.self,"!this",0),l=0;!a&&l<n.args.length;++l)a=t(n.args[l],"!"+l,0);if(a){i&&(a="["+a+"]");var c=new r.TypeParser(a);return n.computeRet=c.parseRetType(),n.computeRetSource=a,!0}}}function b(e,t){return e.defProp(t.name,t)}function y(e,t,n){var r=e.property;return e.computed?"Literal"==r.type&&"string"==typeof r.value?r.value:(n&&x(r,t,n,z),"<i>"):r.name}function v(e){switch(e){case"+":case"-":case"~":return it.num;case"!":return it.bool;case"typeof":return it.str;case"void":case"delete":return z}}function w(e){switch(e){case"==":case"!=":case"===":case"!==":case"<":case">":case">=":case"<=":case"in":case"instanceof":return!0}}function _(e){switch(typeof e){case"boolean":return it.bool;case"number":return it.num;case"string":return it.str;case"object":case"function":return e?V(it.protos.RegExp):z}}function S(e){return function(t,n,r,o,s){var i=e(t,n,r,s);return o&&i.propagate(o),i}}function k(e){return function(t,n,r,o,s){return o||(o=new q),e(t,n,r,o,s),o}}function x(e,t,n,r,o){var s=ht[e.type];return s?s(e,t,n,r,o):null}function j(e,t){var n=e&&e[t],r=Array.prototype.slice.call(arguments,2);if(n)for(var o=0;o<n.length;++o)n[o].apply(null,r)}function O(e){var t=e?JSON.parse(JSON.stringify(e)):e;return e instanceof Error&&(t.__isError=!0,t.lineNumber="number"==typeof t.lineNumber?t.lineNumber:e.lineNumber,t.message=t.message||e.message,t.name=t.name||e.name,t.stack=t.stack||e.stack),t}function T(e){e&&Array.isArray(e)&&e.forEach(function(e){var t=e.message;e.message=t=t.replace(/^Line \d+: /,""),/^Unexpected/.test(t)&&(e.type=1,/end of input$/.test(t)&&(e.type=2))})}function E(e,t,n){var r=Array.isArray(e);return r&&1==e.length&&(e=e[0],r=!1),r?null==n?function(t){return e.indexOf(t.origin)>-1}:function(r,o){return o&&o.start>=t&&o.end<=n&&e.indexOf(r.origin)>-1}:null==n?function(t){return t.origin==e}:function(r,o){return o&&o.start>=t&&o.end<=n&&r.origin==e}}function R(e){vt=!0;var t=p(e);if(t)for(var n=0;n<t.length;++n){var r=t[n].getProp(e);if(!r.isEmpty())return r}return z}function D(e,t){var n=bt[e.type];return n?n(e,t):null}var M=e.toString=function(e,t,n){return e&&e!=n?e.toString(t):"?"},z=e.ANull=o.mixin({addType:function(){},propagate:function(){},getProp:function(){return z},forAllProps:function(){},hasType:function(){return!1},isEmpty:function(){return!0},getFunctionType:function(){},getType:function(){},gatherProperties:function(){},propagatesTo:function(){},typeHint:function(){},propHint:function(){}}),C=100,A=90,P=10,I=5,N=5,L=90,U=2,q=e.AVal=function(){this.types=[],this.forward=null,this.maxWeight=0};q.prototype=s(z,{addType:function(e,t){if(t=t||C,this.maxWeight<t){if(this.maxWeight=t,1==this.types.length&&this.types[0]==e)return;this.types.length=0}else if(this.maxWeight>t||this.types.indexOf(e)>-1)return;this.signal("addType",e),this.types.push(e);var n=this.forward;n&&d(function(r){for(var o=0;o<n.length;++o)r(e,n[o],t)})},propagate:function(e,t){if(!(e==z||e instanceof tt)){t&&C>t&&(e=new et(e,t)),(this.forward||(this.forward=[])).push(e);var n=this.types;n.length&&d(function(r){for(var o=0;o<n.length;++o)r(n[o],e,t)})}},getProp:function(e){if("__proto__"==e||"✖"==e)return z;var t=(this.props||(this.props=Object.create(null)))[e];return t||(t=this.props[e]=new q,this.propagate(new H(e,t))),t},forAllProps:function(e){this.propagate(new $(e))},hasType:function(e){return this.types.indexOf(e)>-1},isEmpty:function(){return 0==this.types.length},getFunctionType:function(){for(var e=this.types.length-1;e>=0;--e)if(this.types[e]instanceof ot)return this.types[e]},getType:function(e){return 0==this.types.length&&e!==!1?this.makeupType():1==this.types.length?this.types[0]:i(this.types)},computedPropType:function(){if(!this.propertyOf||!this.propertyOf.hasProp("<i>"))return null;var e=this.propertyOf.getProp("<i>");return e==this?null:e.getType()},makeupType:function(){var e=this.computedPropType();if(e)return e;if(!this.forward)return null;for(var t=this.forward.length-1;t>=0;--t){var n=this.forward[t].typeHint();if(n&&!n.isEmpty())return vt=!0,n}for(var r=Object.create(null),o=null,t=0;t<this.forward.length;++t){var s=this.forward[t].propHint();s&&"length"!=s&&"<i>"!=s&&"✖"!=s&&s!=it.completingProperty&&(r[s]=!0,o=s)}if(!o)return null;var a=p(o);if(a){var l=[];e:for(var t=0;t<a.length;++t){var c=a[t];for(var s in r)if(!c.hasProp(s))continue e;c.hasCtor&&(c=V(c)),l.push(c)}var d=i(l);if(d)return vt=!0,d}},typeHint:function(){return this.types.length?this.getType():null},propagatesTo:function(){return this},gatherProperties:function(e,t){for(var n=0;n<this.types.length;++n)this.types[n].gatherProperties(e,t)},guessProperties:function(e){if(this.forward)for(var t=0;t<this.forward.length;++t){var n=this.forward[t].propHint();n&&e(n,null,0)}var r=this.makeupType();r&&r.gatherProperties(e)}}),a.prototype=s(z,{init:function(){this.origin=it.curOrigin}});var F=e.constraint=function(e,t){var n="this.init();";e=e?e.split(", "):[];for(var r=0;r<e.length;++r)n+="this."+e[r]+" = "+e[r]+";";var o=Function.apply(null,e.concat([n]));o.prototype=Object.create(a.prototype);for(var s in t)t.hasOwnProperty(s)&&(o.prototype[s]=t[s]);return o},H=F("prop, target",{addType:function(e,t){e.getProp&&e.getProp(this.prop).propagate(this.target,t)},propHint:function(){return this.prop},propagatesTo:function(){return"<i>"!=this.prop&&/[^\w_]/.test(this.prop)?void 0:{target:this.target,pathExt:"."+this.prop}}}),B=e.PropHasSubset=F("prop, type, originNode",{addType:function(e,t){if(e instanceof rt){var n=e.defProp(this.prop,this.originNode);n.origin=this.origin,this.type.propagate(n,t)}},propHint:function(){return this.prop}}),$=F("c",{addType:function(e){e instanceof rt&&e.forAllProps(this.c)}}),W=e.IsCallee=F("self, args, argNodes, retval",{init:function(){a.prototype.init(),this.disabled=it.disabledComputing},addType:function(e,t){if(e instanceof ot){for(var n=0;n<this.args.length;++n)n<e.args.length&&this.args[n].propagate(e.args[n],t),e.arguments&&this.args[n].propagate(e.arguments,t);this.self.propagate(e.self,this.self==it.topScope?L:t);var r=e.computeRet;if(r)for(var o=this.disabled;o;o=o.prev)(o.fn==e||e.name&&o.fn.name==e.name)&&(r=null);r?r(this.self,this.args,this.argNodes).propagate(this.retval,t):e.retval.propagate(this.retval,t)}},typeHint:function(){for(var e=[],t=0;t<this.args.length;++t)e.push("?");return new ot(null,this.self,this.args,e,z)},propagatesTo:function(){return{target:this.retval,pathExt:".!ret"}}}),G=F("propName, args, argNodes, retval",{init:function(){a.prototype.init(),this.disabled=it.disabledComputing},addType:function(e,t){var n=new W(e,this.args,this.argNodes,this.retval);n.disabled=this.disabled,e.getProp(this.propName).propagate(n,t)},propHint:function(){return this.propName}}),J=e.IsCtor=F("target, noReuse",{addType:function(e,t){e instanceof ot&&e.getProp("prototype").propagate(new X(this.noReuse?!1:e,this.target),t)}}),V=e.getInstance=function(e,t){if(t===!1)return new rt(e);t||(t=e.hasCtor),e.instances||(e.instances=[]);for(var n=0;n<e.instances.length;++n){var r=e.instances[n];if(r.ctor==t)return r.instance}var o=new rt(e,t&&t.name);return o.origin=e.origin,e.instances.push({ctor:t,instance:o}),o},X=e.IsProto=F("ctor, target",{addType:function(e){e instanceof rt&&((this.count=(this.count||0)+1)>8||this.target.addType(e==it.protos.Array?new st:V(e,this.ctor)))}}),K=F("fn",{addType:function(e){if(e instanceof rt&&!e.hasCtor){e.hasCtor=this.fn;var t=new Z(e,this.fn);t.addType(this.fn),e.forAllProps(function(e,n,r){r&&n.propagate(t)})}}}),Q=F("other, target",{addType:function(e,t){e==it.str?this.target.addType(it.str,t):e==it.num&&this.other.hasType(it.num)&&this.target.addType(it.num,t)},typeHint:function(){return this.other}}),Y=e.IfObj=F("target",{addType:function(e,t){e instanceof rt&&this.target.addType(e,t)},propagatesTo:function(){return this.target}}),Z=F("obj, ctor",{addType:function(e){e instanceof ot&&e.self&&e.self.isEmpty()&&e.self.addType(V(this.obj,this.ctor),U)}}),et=F("inner, weight",{addType:function(e,t){this.inner.addType(e,Math.min(t,this.weight))},propagatesTo:function(){return this.inner.propagatesTo()},typeHint:function(){return this.inner.typeHint()},propHint:function(){return this.inner.propHint()}}),tt=e.Type=function(){};tt.prototype=s(z,{constructor:tt,propagate:function(e,t){e.addType(this,t)},hasType:function(e){return e==this},isEmpty:function(){return!1},typeHint:function(){return this},getType:function(){return this}});var nt=e.Prim=function(e,t){this.name=t,this.proto=e};nt.prototype=s(tt.prototype,{constructor:nt,toString:function(){return this.name},getProp:function(e){return this.proto.hasProp(e)||z},gatherProperties:function(e,t){this.proto&&this.proto.gatherProperties(e,t)}});var rt=e.Obj=function(e,t){if(this.props||(this.props=Object.create(null)),this.proto=e===!0?it.protos.Object:e,e&&!t&&e.name&&!(this instanceof ot)){var n=/^(.*)\.prototype$/.exec(this.proto.name);n&&(t=n[1])}this.name=t,this.maybeProps=null,this.origin=it.curOrigin};rt.prototype=s(tt.prototype,{constructor:rt,toString:function(e){if(!e&&this.name)return this.name;var t=[],n=!1;for(var r in this.props)if("<i>"!=r){if(t.length>5){n=!0;break}t.push(e?r+": "+M(this.props[r].getType(),e-1):r)}return t.sort(),n&&t.push("..."),"{"+t.join(", ")+"}"},hasProp:function(e,t){var n=this.props[e];if(t!==!1)for(var r=this.proto;r&&!n;r=r.proto)n=r.props[e];return n},defProp:function(e,t){var n=this.hasProp(e,!1);if(n)return n.maybePurge&&(n.maybePurge=!1),t&&!n.originNode&&(n.originNode=t),n;if("__proto__"==e||"✖"==e)return z;var r=this.maybeProps&&this.maybeProps[e];return r?(delete this.maybeProps[e],this.maybeUnregProtoPropHandler()):(r=new q,r.propertyOf=this),this.props[e]=r,r.originNode=t,r.origin=it.curOrigin,this.broadcastProp(e,r,!0),r},getProp:function(e){var t=this.hasProp(e,!0)||this.maybeProps&&this.maybeProps[e];if(t)return t;if("__proto__"==e||"✖"==e)return z;var n=this.ensureMaybeProps()[e]=new q;return n.propertyOf=this,n},broadcastProp:function(e,t,n){if(n&&(this.signal("addProp",e,t),this instanceof pt||c(e,this)),this.onNewProp)for(var r=0;r<this.onNewProp.length;++r){var o=this.onNewProp[r];o.onProtoProp?o.onProtoProp(e,t,n):o(e,t,n)}},onProtoProp:function(e,t){var n=this.maybeProps&&this.maybeProps[e];n&&(delete this.maybeProps[e],this.maybeUnregProtoPropHandler(),this.proto.getProp(e).propagate(n)),this.broadcastProp(e,t,!1)},ensureMaybeProps:function(){return this.maybeProps||(this.proto&&this.proto.forAllProps(this),this.maybeProps=Object.create(null)),this.maybeProps},removeProp:function(e){var t=this.props[e];delete this.props[e],this.ensureMaybeProps()[e]=t},forAllProps:function(e){this.onNewProp||(this.onNewProp=[],this.proto&&this.proto.forAllProps(this)),this.onNewProp.push(e);for(var t=this;t;t=t.proto)for(var n in t.props)e.onProtoProp?e.onProtoProp(n,t.props[n],t==this):e(n,t.props[n],t==this)},maybeUnregProtoPropHandler:function(){if(this.maybeProps){for(var e in this.maybeProps)return;this.maybeProps=null}!this.proto||this.onNewProp&&this.onNewProp.length||this.proto.unregPropHandler(this)},unregPropHandler:function(e){for(var t=0;t<this.onNewProp.length;++t)if(this.onNewProp[t]==e){this.onNewProp.splice(t,1);break}this.maybeUnregProtoPropHandler()},gatherProperties:function(e,t){for(var n in this.props)"<i>"!=n&&e(n,this,t);this.proto&&this.proto.gatherProperties(e,t+1)}});var ot=e.Fn=function(e,t,n,r,o){rt.call(this,it.protos.Function,e),this.self=t,this.args=n,this.argNames=r,this.retval=o};ot.prototype=s(rt.prototype,{constructor:ot,toString:function(e){e&&e--;for(var t="fn(",n=0;n<this.args.length;++n){n&&(t+=", ");var r=this.argNames[n];r&&"?"!=r&&(t+=r+": "),t+=M(this.args[n].getType(),e,this)}return t+=")",this.retval.isEmpty()||(t+=" -> "+M(this.retval.getType(),e,this)),t},getProp:function(e){if("prototype"==e){var t=this.hasProp(e,!1);if(!t){t=this.defProp(e);var n=new rt(!0,this.name&&this.name+".prototype");n.origin=this.origin,t.addType(n,P)}return t}return rt.prototype.getProp.call(this,e)},defProp:function(e,t){if("prototype"==e){var n=this.hasProp(e,!1);return n?n:(n=rt.prototype.defProp.call(this,e,t),n.origin=this.origin,n.propagate(new K(this)),n)}return rt.prototype.defProp.call(this,e,t)},getFunctionType:function(){return this}});var st=e.Arr=function(e){rt.call(this,it.protos.Array);var t=this.defProp("<i>");e&&e.propagate(t)};st.prototype=s(rt.prototype,{constructor:st,toString:function(e){return"["+M(this.getProp("<i>").getType(),e,this)+"]"}}),e.Context=function(t,n){this.parent=n,this.props=Object.create(null),this.protos=Object.create(null),this.origins=[],this.curOrigin="ecma5",this.paths=Object.create(null),this.definitions=Object.create(null),this.purgeGen=0,this.workList=null,this.disabledComputing=null,e.withContext(this,function(){if(it.protos.Object=new rt(null,"Object.prototype"),it.topScope=new pt,it.topScope.name="<top>",it.protos.Array=new rt(!0,"Array.prototype"),it.protos.Function=new rt(!0,"Function.prototype"),it.protos.RegExp=new rt(!0,"RegExp.prototype"),it.protos.String=new rt(!0,"String.prototype"),it.protos.Number=new rt(!0,"Number.prototype"),it.protos.Boolean=new rt(!0,"Boolean.prototype"),it.str=new nt(it.protos.String,"string"),it.bool=new nt(it.protos.Boolean,"bool"),it.num=new nt(it.protos.Number,"number"),it.curOrigin=null,t)for(var e=0;e<t.length;++e)r.load(t[e])})};var it=null;e.cx=function(){return it},e.withContext=function(e,t){var n=it;it=e;try{return t()}finally{it=n}},e.TimedOut=function(){this.message="Timed out",this.stack=(new Error).stack},e.TimedOut.prototype=Object.create(Error.prototype),e.TimedOut.prototype.name="infer.TimedOut";var at;e.withTimeout=function(e,t){var n=+new Date+e,r=at;if(r&&n>r)return t();at=n;try{return t()}finally{at=r}},e.addOrigin=function(e){it.origins.indexOf(e)<0&&it.origins.push(e)};var lt=20,ct=1e-4,pt=e.Scope=function(e){rt.call(this,e||!0),this.prev=e};pt.prototype=s(rt.prototype,{constructor:pt,defVar:function(e,t){for(var n=this;;n=n.proto){var r=n.props[e];if(r)return r;if(!n.prev)return n.defProp(e,t)}}});var dt={},ut=n.make({Function:function(e,t,n){var r=e.body.scope=new pt(t);r.originNode=e;for(var o=[],s=[],i=0;i<e.params.length;++i){var a=e.params[i];s.push(a.name),o.push(b(r,a))}if(r.fnType=new ot(e.id&&e.id.name,new q,o,s,z),r.fnType.originNode=e,e.id){var l="FunctionDeclaration"==e.type;b(l?t:r,e.id)}n(e.body,r,"ScopeBody")},TryStatement:function(e,t,n){if(n(e.block,t,"Statement"),e.handler){var r=b(t,e.handler.param);n(e.handler.body,t,"ScopeBody");var o=it.definitions.ecma5;o&&r.isEmpty()&&V(o["Error.prototype"]).propagate(r,N)}e.finalizer&&n(e.finalizer,t,"Statement")},VariableDeclaration:function(e,t,n){for(var r=0;r<e.declarations.length;++r){var o=e.declarations[r];b(t,o.id),o.init&&n(o.init,t,"Expression")}}}),ht={RecoveredNode:S(function(){return new q}),ArrayExpression:S(function(e,t,n){for(var r=new q,o=0;o<e.elements.length;++o){var s=e.elements[o];s&&x(s,t,n,r)}return new st(r)}),ObjectExpression:S(function(e,t,n,r){var o=e.objType=new rt(!0,r);o.originNode=e;for(var s=0;s<e.properties.length;++s){var r,i=e.properties[s],a=i.key;if("Identifier"==a.type)r=a.name;else{if("string"!=typeof a.value){x(i.value,t,n,z);continue}r=a.value}var l=o.defProp(r,a);l.initializer=!0,x(i.value,t,n,l,r)}return o}),FunctionExpression:S(function(e,t,n,r){var o=e.body.scope,s=o.fnType;return r&&!s.name&&(s.name=r),n(e.body,t,"ScopeBody"),f(e,o)||g(o),e.id&&o.getProp(e.id.name).addType(s),s}),SequenceExpression:S(function(e,t,n){for(var r=0,o=e.expressions.length-1;o>r;++r)x(e.expressions[r],t,n,z);return x(e.expressions[o],t,n)}),UnaryExpression:S(function(e,t,n){return x(e.argument,t,n,z),v(e.operator)}),UpdateExpression:S(function(e,t,n){return x(e.argument,t,n,z),it.num}),BinaryExpression:S(function(e,t,n){if("+"==e.operator){var r=x(e.left,t,n),o=x(e.right,t,n);if(r.hasType(it.str)||o.hasType(it.str))return it.str;if(r.hasType(it.num)&&o.hasType(it.num))return it.num;var s=new q;return r.propagate(new Q(o,s)),o.propagate(new Q(r,s)),s}return x(e.left,t,n,z),x(e.right,t,n,z),w(e.operator)?it.bool:it.num}),AssignmentExpression:S(function(e,t,n){var r,o,s;if("MemberExpression"==e.left.type?(s=y(e.left,t,n),"Identifier"==e.left.object.type&&(o=e.left.object.name+"."+s)):o=e.left.name,"="!=e.operator&&"+="!=e.operator?(x(e.right,t,n,z),r=it.num):r=x(e.right,t,n,null,o),"MemberExpression"==e.left.type){var i=x(e.left.object,t,n);if("prototype"==s&&u(t,20),"<i>"==s){var a=e.left.property.name,l=t.props[a],c=l&&l.iteratesOver;if(c){u(t,20);var p="MemberExpression"==e.right.type&&e.right.computed&&e.right.property.name==a;return c.forAllProps(function(e,t,n){n&&"prototype"!=e&&"<i>"!=e&&i.propagate(new B(e,p?t:z))}),r}}i.propagate(new B(s,r,e.left.property))}else{var a=t.defVar(e.left.name,e.left);a.maybePurge&&(a.maybePurge=!1),r.propagate(a)}return r}),LogicalExpression:k(function(e,t,n,r){x(e.left,t,n,r),x(e.right,t,n,r)}),ConditionalExpression:k(function(e,t,n,r){x(e.test,t,n,z),x(e.consequent,t,n,r),x(e.alternate,t,n,r)}),NewExpression:k(function(e,t,n,r,o){"Identifier"==e.callee.type&&e.callee.name in t.props&&u(t,20);for(var s=0,i=[];s<e.arguments.length;++s)i.push(x(e.arguments[s],t,n));var a=x(e.callee,t,n),l=new q;a.propagate(new J(l,o&&/\.prototype$/.test(o))),l.propagate(r,A),a.propagate(new W(l,i,e.arguments,new Y(r)))}),CallExpression:k(function(e,t,n,r){for(var o=0,s=[];o<e.arguments.length;++o)s.push(x(e.arguments[o],t,n));if("MemberExpression"==e.callee.type){var i=x(e.callee.object,t,n),a=y(e.callee,t,n);("call"==a||"apply"==a)&&t.fnType&&t.fnType.args.indexOf(i)>-1&&u(t,30),i.propagate(new G(a,s,e.arguments,r))}else{var l=x(e.callee,t,n);t.fnType&&t.fnType.args.indexOf(l)>-1&&u(t,30);var c=l.getFunctionType();c&&c.instantiateScore&&t.fnType&&u(t,c.instantiateScore/5),l.propagate(new W(it.topScope,s,e.arguments,r))}}),MemberExpression:k(function(e,t,n,r){var o=y(e,t),s=x(e.object,t,n),i=s.getProp(o);if("<i>"==o){var a=x(e.property,t,n);if(!a.hasType(it.num))return i.propagate(r,I)}i.propagate(r)}),Identifier:S(function(e,t){return"arguments"!=e.name||!t.fnType||e.name in t.props||t.defProp(e.name,t.fnType.originNode).addType(new st(t.fnType.arguments=new q)),t.getProp(e.name)}),ThisExpression:S(function(e,t){return t.fnType?t.fnType.self:it.topScope}),Literal:S(function(e){return _(e.value)})},ft=n.make({Expression:function(e,t,n){x(e,t,n,z)},FunctionDeclaration:function(e,t,n){var r=e.body.scope,o=r.fnType;n(e.body,t,"ScopeBody"),f(e,r)||g(r);var s=t.getProp(e.id.name);s.addType(o)},VariableDeclaration:function(e,t,n){for(var r=0;r<e.declarations.length;++r){var o=e.declarations[r],s=t.getProp(o.id.name);o.init&&x(o.init,t,n,s,o.id.name)}},ReturnStatement:function(e,t,n){if(e.argument){var r=z;t.fnType&&(t.fnType.retval==z&&(t.fnType.retval=new q),r=t.fnType.retval),x(e.argument,t,n,r)}},ForInStatement:function(e,t,n){var r=x(e.right,t,n);if("Identifier"==e.right.type&&e.right.name in t.props||"MemberExpression"==e.right.type&&"prototype"==e.right.property.name){u(t,5);var o;"Identifier"==e.left.type?o=e.left.name:"VariableDeclaration"==e.left.type&&(o=e.left.declarations[0].id.name),o&&o in t.props&&(t.getProp(o).iteratesOver=r)}n(e.body,t,"Statement")},ScopeBody:function(e,t,n){n(e,e.scope||t)}}),mt=Object.create(null);mt.type="Program",mt.body=[],mt.comments=[],mt.tokens=[],mt.range=[0,0];var gt=e.parse=function(e,n,r){var o;try{r.tolerant=!0,r.tokens=!0,r.comment=!0,r.range=!0,r.deps=!0,r.loc=!0,o=t.parse(e,r),"object"!=typeof o.sourceFile&&(o.sourceFile=Object.create(null),o.sourceFile.text=o.source,o.sourceFile.name=o.fileLocation)}catch(s){o=mt,o.range[1]=e&&"number"==typeof e.length?e.length:0,o.errors=[s]}return Array.isArray(o.errors)&&o.errors.length>0&&(T(o.errors),o.errors=o.errors.map(O)),j(n,"postParse",o,e),o};e.analyze=function(t,r,o,s){"string"==typeof t&&(t=gt(t)),r||(r="file#"+it.origins.length),e.addOrigin(it.curOrigin=r),o||(o=it.topScope),n.recursive(t,o,null,ut),j(s,"preInfer",t,o),n.recursive(t,o,null,ft),j(s,"postInfer",t,o),it.curOrigin=null},e.purgeTypes=function(e,t,n){var r=E(e,t,n);++it.purgeGen,it.topScope.purge(r);for(var o in it.props){for(var s=it.props[o],i=0;i<s.length;++i){var a=s[i],l=a.props[o];(!l||r(l,l.originNode))&&s.splice(i--,1)}s.length||delete it.props[o]}},q.prototype.purge=function(e){if(this.purgeGen!=it.purgeGen){this.purgeGen=it.purgeGen;for(var t=0;t<this.types.length;++t){var n=this.types[t];e(n,n.originNode)?this.types.splice(t--,1):n.purge(e)}if(this.forward)for(var t=0;t<this.forward.length;++t){var r=this.forward[t];e(r)?(this.forward.splice(t--,1),this.props&&(this.props=null)):r.purge&&r.purge(e)}}},z.purge=function(){},rt.prototype.purge=function(e){if(this.purgeGen==it.purgeGen)return!0;this.purgeGen=it.purgeGen;for(var t in this.props){var n=this.props[t];e(n,n.originNode)&&this.removeProp(t),n.purge(e)}},ot.prototype.purge=function(e){if(!rt.prototype.purge.call(this,e)){this.self.purge(e),this.retval.purge(e);for(var t=0;t<this.args.length;++t)this.args[t].purge(e)}},e.markVariablesDefinedBy=function(e,t,n,r){for(var o=E(t,n,r),s=e;s;s=s.prev)for(var i in s.props){var a=s.props[i];o(a,a.originNode)&&(a.maybePurge=!0,null==n&&a.originNode&&(a.originNode=null))}},e.purgeMarkedVariables=function(e){for(var t=e;t;t=t.prev)for(var n in t.props)t.props[n].maybePurge&&delete t.props[n]};var bt={ArrayExpression:function(e,t){for(var n=new q,r=0;r<e.elements.length;++r){var o=e.elements[r];o&&D(o,t).propagate(n)}return new st(n)},ObjectExpression:function(e){return e.objType},FunctionExpression:function(e){return e.body.scope.fnType},SequenceExpression:function(e,t){return D(e.expressions[e.expressions.length-1],t)},UnaryExpression:function(e){return v(e.operator)},UpdateExpression:function(){return it.num},BinaryExpression:function(e,t){if(w(e.operator))return it.bool;if("+"==e.operator){var n=D(e.left,t),r=D(e.right,t);if(n.hasType(it.str)||r.hasType(it.str))return it.str}return it.num},AssignmentExpression:function(e,t){return D(e.right,t)},LogicalExpression:function(e,t){var n=D(e.left,t);return n.isEmpty()?D(e.right,t):n},ConditionalExpression:function(e,t){var n=D(e.consequent,t);return n.isEmpty()?D(e.alternate,t):n},NewExpression:function(e,t){var n=D(e.callee,t).getFunctionType(),r=n&&n.getProp("prototype").getType();return r?V(r,n):z},CallExpression:function(e,t){var n=D(e.callee,t).getFunctionType();if(!n)return z;if(n.computeRet){for(var r=0,o=[];r<e.arguments.length;++r)o.push(D(e.arguments[r],t));var s=z;return"MemberExpression"==e.callee.type&&(s=D(e.callee.object,t)),n.computeRet(s,o,e.arguments)}return n.retval},MemberExpression:function(e,t){var n=y(e,t),r=D(e.object,t).getType();return r?r.getProp(n):"<i>"==n?z:R(n)},Identifier:function(e,t){return t.hasProp(e.name)||z},ThisExpression:function(e,t){return t.fnType?t.fnType.self:it.topScope},Literal:function(e){return _(e.value)}},yt=e.searchVisitor=n.make({Function:function(e,t,n){var r=e.body.scope;e.id&&n(e.id,r);for(var o=0;o<e.params.length;++o)n(e.params[o],r);n(e.body,r,"ScopeBody")},TryStatement:function(e,t,r){e.handler&&r(e.handler.param,t),n.base.TryStatement(e,t,r)},VariableDeclaration:function(e,t,n){for(var r=0;r<e.declarations.length;++r){var o=e.declarations[r];n(o.id,t),o.init&&n(o.init,t,"Expression")}}});e.fullVisitor=n.make({MemberExpression:function(e,t,n){n(e.object,t,"Expression"),n(e.property,t,e.computed?"Expression":null)},ObjectExpression:function(e,t,n){for(var r=0;r<e.properties.length;++r)n(e.properties[r].value,t,"Expression"),n(e.properties[r].key,t)}},yt),e.findExpressionAt=function(e,t,r,o,s){var i=s||function(e,t){return bt.hasOwnProperty(t.type)};return n.findNodeAt(e,t,r,i,yt,o||it.topScope)},e.findExpressionAround=function(e,t,r,o,s){var i=s||function(e,n){return null!=t&&n.start>t?!1:bt.hasOwnProperty(n.type)};return n.findNodeAround(e,r,i,yt,o||it.topScope)},e.expressionType=function(e){return D(e.node,e.state)};var vt=!1;e.resetGuessing=function(e){vt=e},e.didGuess=function(){return vt},e.forAllPropertiesOf=function(e,t){e.gatherProperties(t,0)};var wt=n.make({},yt);e.findRefs=function(e,t,r,o,s){wt.Identifier=function(e,t){if(e.name==r)for(var n=t;n;n=n.prev)if(n==o&&s(e,t),r in n.props)return},n.recursive(e,t,null,wt)};var _t=n.make({Function:function(e,t,n){n(e.body,e.body.scope,"ScopeBody")}});e.findPropRefs=function(e,t,r,o,s){n.simple(e,{MemberExpression:function(e,t){e.computed||e.property.name!=o||D(e.object,t).getType()==r&&s(e.property)},ObjectExpression:function(e,t){if(D(e,t).getType()==r)for(var n=0;n<e.properties.length;++n)e.properties[n].key.name==o&&s(e.properties[n].key)}},_t,t)};var St=e.scopeAt=function(e,t,r){var o=n.findNodeAround(e,t,function(e,t){return"ScopeBody"==e&&t.scope});return o?o.node.scope:r||it.topScope};return e.forAllLocalsAt=function(e,t,n,r){var o=St(e,t,n);o.gatherProperties(r,0)},r=e.def=r.init({},e),e}),function(e){return"object"==typeof exports&&"object"==typeof module?e(exports,require("./infer"),require("./signal"),require("esprima"),require("acorn/util/walk")):"function"==typeof define&&define.amd?define("tern/lib/tern",["exports","./infer","./signal","esprima","acorn/util/walk"],e):void e(self.tern||(self.tern={}),tern,tern.signal,acorn,acorn.walk)}(function(e,t,n,r,o){"use strict";function s(e,t){this.name=e,this.parent=t,this.scope=this.text=this.ast=this.lineOffsets=null}function i(e,n,r){e.text=n,e.ast=t.parse(n,r.passes,{directSourceFile:e,allowReturnOutsideFunction:!0}),e.lineOffsets=null}function a(e,n,r){if(n.query&&!W.hasOwnProperty(n.query.type))return r("No query type '"+n.query.type+"' defined");var o=n.query;o||r(null,{});var s=n.files||[];s.length&&++e.uses;for(var i=0;i<s.length;++i){var a=s[i];c(e,a.name,null,"full"==a.type?a.text:null)}var l="number"==typeof n.timeout?[n.timeout]:null;if(!o)return void u(e,l,function(){});var p=W[o.type];if(p.takesFile){if("string"!=typeof o.file)return r(".query.file must be a string");/^#/.test(o.file)||c(e,o.file,null)}u(e,l,function(n){function i(){var t;try{t=p.run(e,o,a)}catch(n){return e.options.debug&&"TernError"!=n.name&&console.error(n.stack),r(n)}r(null,t)}if(n)return r(n);var a=p.takesFile&&b(e,s,o.file);return p.fullFile&&"part"==a.type?r("Can't run a "+o.type+" query on a file fragment"):void t.withContext(e.cx,l?function(){t.withTimeout(l[0],i)}:i)})}function l(e,n){return t.withContext(e.cx,function(){n.scope=e.cx.topScope,e.signal("beforeLoad",n),t.markVariablesDefinedBy(n.scope,n.name),t.analyze(n.ast,n.name,n.scope,e.passes),t.purgeMarkedVariables(n.scope),e.signal("afterLoad",n)}),n}function c(e,t,n,r){var o=e.findFile(t);if(o)return null!=r&&p(e,o,r),void(v(o.parent)>v(n)&&(o.parent=n,o.excluded&&(o.excluded=null)));var a=new s(t,n);e.files.push(a),e.fileMap[t]=a,null!=r?i(a,r,e):e.options.async?(e.startAsyncAction(),e.options.getFile(t,function(t,n){i(a,n||"",e),e.finishAsyncAction(t)})):i(a,e.options.getFile(t)||"",e)}function p(e,n,r,o){n.scope&&(t.withContext(e.cx,function(){t.purgeTypes(n.name),o&&(t.markVariablesDefinedBy(n.scope,n.name),t.purgeMarkedVariables(n.scope))}),n.scope=null),null!=r&&i(n,r,e)}function d(e,t,n){var r=function(){e.off("everythingFetched",r),clearTimeout(o),u(e,t,n)};e.on("everythingFetched",r);var o=setTimeout(r,e.options.fetchTimeout)}function u(e,n,r){if(e.pending)return d(e,n,r);var o=e.fetchError;if(o)return e.fetchError=null,r(o);for(var s=!0,i=0;i<e.files.length;){for(var a=[];i<e.files.length;++i){var c=e.files[i];null==c.text?s=!1:null!=c.scope||c.excluded||a.push(c)}a.sort(function(e,t){return v(e.parent)-v(t.parent)});for(var p=0;p<a.length;p++){var c=a[p];if(c.parent&&!_(e,c))c.excluded=!0;else if(n){var u=+new Date;t.withTimeout(n[0],function(){l(e,c)}),n[0]-=+new Date-u}else l(e,c)}}s?r():d(e,n,r)}function h(e){var t=e.indexOf("\n");return 0>t?e:e.slice(0,t)}function f(e,t,n){var r=Math.max(0,n-500),o=null;if(!/^\s*$/.test(e))for(;;){var s=t.indexOf(e,r);if(0>s||s>n+500)break;(null==o||Math.abs(o-n)>Math.abs(s-n))&&(o=s),r=s+e.length}return o}function m(e){for(var t=0;e;++t,e=e.prev);return t}function g(e){var t=new Error(e);return t.name="TernError",t}function b(e,n,r){var s=r.match(/^#(\d+)$/);if(!s)return e.findFile(r);var i=n[s[1]];if(!i)throw g("Reference to unknown file "+r);if("full"==i.type)return e.findFile(i.name);var a=i.backing=e.findFile(i.name),l=i.offset;i.offsetLines&&(l={line:i.offsetLines,ch:0}),i.offset=l=j(a,null==i.offsetLines?i.offset:{line:i.offsetLines,ch:0},!0);var c=h(i.text),p=f(c,a.text,l),d=null==p?Math.max(0,a.text.lastIndexOf("\n",l)):p;return t.withContext(e.cx,function(){t.purgeTypes(i.name,d,d+i.text.length);var n,r=i.text;if(n=r.match(/(?:"([^"]*)"|([\w$]+))\s*:\s*function\b/)){var s=o.findNodeAround(i.backing.ast,d,"ObjectExpression");if(s&&s.node.objType)var l={type:s.node.objType,prop:n[2]||n[1]}}if(p&&(n=c.match(/^(.*?)\bfunction\b/))){for(var u=n[1].length,h="",f=0;u>f;++f)h+=" ";r=h+r.slice(u);var g=!0}var b=t.scopeAt(a.ast,d,a.scope),y=t.scopeAt(a.ast,d+r.length,a.scope),v=i.scope=m(b)<m(y)?y:b;t.markVariablesDefinedBy(b,i.name,d,d+i.text.length),i.ast=t.parse(i.text,e.passes,{directSourceFile:i,allowReturnOutsideFunction:!0}),t.analyze(i.ast,i.name,v,e.passes),t.purgeMarkedVariables(b);e:if(l||g){var w=t.scopeAt(i.ast,c.length,b);if(!w.fnType)break e;if(l){var _=l.type.getProp(l.prop);_.addType(w.fnType)}else if(g){var S=t.scopeAt(a.ast,d+c.length,a.scope);if(S==b||!S.fnType)break e;var k=S.fnType,x=w.fnType;if(!x||x.name!=k.name&&k.name)break e;for(var f=0,j=Math.min(k.args.length,x.args.length);j>f;++f)k.args[f].propagate(x.args[f]);k.self.propagate(x.self),x.retval.propagate(k.retval)}}}),i}function y(e){var t=0;return o.simple(e,{Expression:function(){++t}}),t}function v(e,t){for(var n=0;t;)t=e.findFile(t).parent,++n;return n}function w(e,t){for(;;){var n=e.findFile(t.parent);if(!n.parent)break;t=n}return t.name}function _(e,t){var n=w(e,t),r=y(t.ast),o=e.budgets[n];return null==o&&(o=e.budgets[n]=e.options.dependencyBudget),r>o?!1:(e.budgets[n]=o-r,!0)}function S(e){return"number"==typeof e||"object"==typeof e&&"number"==typeof e.line&&"number"==typeof e.ch}function k(e){if(e.query){if("string"!=typeof e.query.type)return".query.type must be a string";if(e.query.start&&!S(e.query.start))return".query.start must be a position";if(e.query.end&&!S(e.query.end))return".query.end must be a position"}if(e.files){if(!Array.isArray(e.files))return"Files property must be an array";for(var t=0;t<e.files.length;++t){var n=e.files[t];if("object"!=typeof n)return".files[n] must be objects";if("string"!=typeof n.text)return".files[n].text must be a string";if("string"!=typeof n.name)return".files[n].name must be a string";
if("part"==n.type){if(!S(n.offset)&&"number"!=typeof n.offsetLines)return".files[n].offset must be a position"}else if("full"!=n.type)return'.files[n].type must be "full" or "part"'}}}function x(e,t){for(var n=e.text,r=e.lineOffsets||(e.lineOffsets=[0]),o=0,s=0,i=Math.min(Math.floor(t/J),r.length-1),o=r[i],s=i*J;t>s;){if(++s,o=n.indexOf("\n",o)+1,0==o)return null;s%J==0&&r.push(o)}return o}function j(e,t,n){if("number"!=typeof t){var r=x(e,t.line);if(null==r){if(!n)throw g("File doesn't contain a line "+t.line);t=e.text.length}else t=r+t.ch}if(t>e.text.length){if(!n)throw g("Position "+t+" is outside of file.");t=e.text.length}return t}function O(e,t){if(!e)return{line:0,ch:0};for(var n,r,o=e.lineOffsets||(e.lineOffsets=[0]),s=e.text,i=o.length-1;i>=0;--i)o[i]<=t&&(n=i*J,r=o[i]);for(;;){var a=s.indexOf("\n",r);if(a>=t||0>a)break;r=a+1,++n}return{line:n,ch:t-r}}function T(e,t,n){if(e.lineCharPositions){var r=O(t,n);return"part"==t.type&&(r.line+=null!=t.offsetLines?t.offsetLines:O(t.backing,t.offset).line),r}return n+("part"==t.type?t.offset:0)}function E(e){for(var t in e)null==e[t]&&delete e[t];return e}function R(e,t,n){null!=n&&(e[t]=n)}function D(e,t){"string"!=typeof e&&(e=e.name,t=t.name);var n=/^[A-Z]/.test(e),r=/^[A-Z]/.test(t);return n==r?t>e?-1:e==t?0:1:n?1:-1}function M(e,t,n){return"Literal"==e.type&&"string"==typeof e.value&&e.start==t-1&&e.end<=n+1}function z(e,n,o){function s(r,o,s){if(!(n.omitObjectPrototype!==!1&&o==e.cx.protos.Object&&!c||n.filter!==!1&&c&&0!=(n.caseInsensitive?r.toLowerCase():r).indexOf(c))){for(var i=0;i<p.length;++i){var a=p[i];if((u?a.name:a)==r)return}var l=u?{name:r}:r;if(p.push(l),n.types||n.docs||n.urls||n.origins){var d=o?o.props[r]:t.ANull;t.resetGuessing();var h=d.getType();l.guess=t.didGuess(),n.types&&(l.type=t.toString(h)),n.docs&&R(l,"doc",d.doc||h&&h.doc),n.urls&&R(l,"url",d.url||h&&h.url),n.origins&&R(l,"origin",d.origin||h&&h.origin)}n.depths&&(l.depth=s)}}if(null==n.end)throw g("missing .query.end field");for(var i=j(o,n.end),a=i,l=o.text;i&&r.isIdentifierChar(l.charCodeAt(i-1));)--i;if(n.expandWordForward!==!1)for(;a<l.length&&r.isIdentifierChar(l.charCodeAt(a));)++a;var c=l.slice(i,a),p=[];n.caseInsensitive&&(c=c.toLowerCase());var d,u=n.types||n.depths||n.docs||n.urls||n.origins,h=t.findExpressionAround(o.ast,null,i,o.scope,"MemberExpression");if(h&&(h.node.computed?M(h.node.property,i,a):h.node.object.end<i)){var f=h.node.property;f="Literal"==f.type?f.value.slice(1):f.name,e.cx.completingProperty=f,h.node=h.node.object;var m=t.expressionType(h);if(m&&t.forAllPropertiesOf(m,s),!p.length&&n.guess!==!1&&m&&m.guessProperties&&m.guessProperties(function(e,t,n){e!=f&&"✖"!=e&&s(e,t,n)}),!p.length&&c.length>=2&&n.guess!==!1)for(var f in e.cx.props)s(f,e.cx.props[f][0],0);d="memberCompletion"}else t.forAllLocalsAt(o.ast,i,o.scope,s),n.includeKeywords&&V.forEach(function(e){s(e,null,0)}),d="completion";return e.passes[d]&&e.passes[d].forEach(function(e){e(o,n,p)}),n.sort!==!1&&p.sort(D),e.cx.completingProperty=null,{start:T(n,o,i),end:T(n,o,a),completions:p}}function C(e,t){var n=t.prefix,r=[];for(var o in e.cx.props)"<i>"==o||n&&0!=o.indexOf(n)||r.push(o);return t.sort!==!1&&r.sort(D),{completions:r}}function A(e,n,r){var o=X(r,n);t.resetGuessing();var s=t.expressionType(o);if(s=n.preferFunction?s.getFunctionType()||s.getType():s.getType(),"Identifier"==o.node.type)var i=o.node.name;else if("MemberExpression"==o.node.type&&!o.node.computed)var i=o.node.property.name;if(null!=n.depth&&"number"!=typeof n.depth)throw g(".query.depth must be a number");var a={guess:t.didGuess(),type:t.toString(s,n.depth),name:s&&s.name,exprName:i};return s&&I(s,a),E(a)}function P(e,n,r){var o=X(r,n),s=t.expressionType(o),i={url:s.url,doc:s.doc},a=s.getType();return a&&I(a,i),E(i)}function I(e,n){n.url||(n.url=e.url),n.doc||(n.doc=e.doc),n.origin||(n.origin=e.origin);var r,o=t.cx().protos;!n.url&&!n.doc&&e.proto&&(r=e.proto.hasCtor)&&e.proto!=o.Object&&e.proto!=o.Function&&e.proto!=o.Array&&(n.url=r.url,n.doc=r.doc)}function N(e,n,r){var o=X(r,n);t.resetGuessing();var s=t.expressionType(o);if(t.didGuess())return{};var i=K(s),a={url:s.url,doc:s.doc,origin:s.origin};if(s.types)for(var l=s.types.length-1;l>=0;--l){var c=s.types[l];I(c,a),i||(i=K(c))}if(i&&i.node){var p=i.node.sourceFile||e.findFile(i.origin),d=T(n,p,i.node.start),u=T(n,p,i.node.end);a.start=d,a.end=u,a.file=i.origin;var h=Math.max(0,i.node.start-50);a.contextOffset=i.node.start-h,a.context=p.text.slice(h,h+50)}else i&&(a.file=i.origin,Q(e,n,i,a));return E(a)}function L(e,n,r,o,s){function i(e){return function(t,r){if(s)for(var o=r;o!=l;o=o.prev){var i=o.hasProp(s);if(i)throw g("Renaming `"+a+"` to `"+s+"` would make a variable at line "+(O(e,t.start).line+1)+" point to the definition at line "+(O(e,i.name.start).line+1))}p.push({file:e.name,start:T(n,e,t.start),end:T(n,e,t.end)})}}for(var a=o.node.name,l=o.state;l&&!(a in l.props);l=l.prev);if(!l)throw g("Could not find a definition for "+a+" "+!!e.cx.topScope.props.x);var c,p=[];if(l.originNode){if(c="local",s){for(var d=l.prev;d&&!(s in d.props);d=d.prev);d&&t.findRefs(l.originNode,l,s,d,function(e){throw g("Renaming `"+a+"` to `"+s+"` would shadow the definition used at line "+(O(r,e.start).line+1))})}t.findRefs(l.originNode,l,a,l,i(r))}else{c="global";for(var u=0;u<e.files.length;++u){var h=e.files[u];t.findRefs(h.ast,h.scope,a,l,i(h))}}return{refs:p,type:c,name:a}}function U(e,n,r,o){function s(e){return function(t){a.push({file:e.name,start:T(n,e,t.start),end:T(n,e,t.end)})}}var i=t.expressionType(r).getType();if(!i)throw g("Couldn't determine type of base object.");for(var a=[],l=0;l<e.files.length;++l){var c=e.files[l];t.findPropRefs(c.ast,c.scope,i,o.name,s(c))}return{refs:a,name:o.name}}function q(e,t,n){var r=X(n,t,!0);if(r&&"Identifier"==r.node.type)return L(e,t,n,r);if(r&&"MemberExpression"==r.node.type&&!r.node.computed){var o=r.node.property;return r.node=r.node.object,U(e,t,r,o)}if(r&&"ObjectExpression"==r.node.type)for(var s=j(n,t.end),i=0;i<r.node.properties.length;++i){var a=r.node.properties[i].key;if(a.start<=s&&a.end>=s)return U(e,t,r,a)}throw g("Not at a variable or property name.")}function F(e,t,n){if("string"!=typeof t.newName)throw g(".query.newName should be a string");var r=X(n,t);if(!r||"Identifier"!=r.node.type)throw g("Not at a variable.");var o=L(e,t,n,r,t.newName),s=o.refs;delete o.refs,o.files=e.files.map(function(e){return e.name});for(var i=o.changes=[],a=0;a<s.length;++a){var l=s[a];l.text=t.newName,i.push(l)}return o}function H(e){return{files:e.files.map(function(e){return e.name})}}var B=Object.create(null);e.registerPlugin=function(e,t){B[e]=t};var $=e.defaultOptions={debug:!1,async:!1,getFile:function(e,t){this.async&&t(null,null)},defs:[],plugins:{},fetchTimeout:1e3,dependencyBudget:2e4},W={completions:{takesFile:!0,run:z},properties:{run:C},type:{takesFile:!0,run:A},documentation:{takesFile:!0,run:P},definition:{takesFile:!0,run:N},refs:{takesFile:!0,fullFile:!0,run:q},rename:{takesFile:!0,fullFile:!0,run:F},files:{run:H}};e.defineQueryType=function(e,t){W[e]=t},s.prototype.asLineChar=function(e){return O(this,e)};var G=e.Server=function(e){this.cx=null,this.options=e||{};for(var t in $)e.hasOwnProperty(t)||(e[t]=$[t]);this.handlers=Object.create(null),this.files=[],this.fileMap=Object.create(null),this.budgets=Object.create(null),this.uses=0,this.pending=0,this.asyncError=null,this.passes=Object.create(null),this.defs=e.defs.slice(0);for(var n in e.plugins)if(e.plugins.hasOwnProperty(n)&&n in B){var r=B[n](this,e.plugins[n]);if(r&&r.defs&&(r.loadFirst?this.defs.unshift(r.defs):this.defs.push(r.defs)),r&&r.passes)for(var o in r.passes)r.passes.hasOwnProperty(o)&&(this.passes[o]||(this.passes[o]=[])).push(r.passes[o])}this.reset()};G.prototype=n.mixin({addFile:function(e,t,n){n&&!n in this.fileMap&&(n=null),c(this,e,n,t)},delFile:function(e){for(var t,n=0;n<this.files.length;++n)if((t=this.files[n]).name==e)return p(this,t,null,!0),this.files.splice(n--,1),void delete this.fileMap[e]},reset:function(){this.signal("reset"),this.cx=new t.Context(this.defs,this),this.uses=0,this.budgets=Object.create(null);for(var e=0;e<this.files.length;++e){var n=this.files[e];n.scope=null}},request:function(e,t){var n=k(e);if(n)return t(n);var r=this;a(this,e,function(e,n){t(e,n),r.uses>40&&(r.reset(),u(r,null,function(){}))})},findFile:function(e){return this.fileMap[e]},flush:function(e){var n=this.cx;u(this,null,function(r){return r?e(r):void t.withContext(n,e)})},startAsyncAction:function(){++this.pending},finishAsyncAction:function(e){e&&(this.asyncError=e),this.pending=--this.pending>-1?this.pending:0,0==this.pending&&this.signal("everythingFetched")}});var J=25;e.resolvePos=j;var V="break do instanceof typeof case else new var catch finally return void continue for switch while debugger function this with default if throw delete in try".split(" "),X=e.findQueryExpr=function(e,n,r){if(null==n.end)throw g("missing .query.end field");if(n.variable){var o=t.scopeAt(e.ast,j(e,n.end),e.scope);return{node:{type:"Identifier",name:n.variable,start:n.end,end:n.end+1},state:o}}var s=n.start&&j(e,n.start),i=j(e,n.end),a=t.findExpressionAt(e.ast,s,i,e.scope);if(a)return a;if(a=t.findExpressionAround(e.ast,s,i,e.scope),a&&(r||(null==s?i:s)-a.node.start<20||a.node.end-i<20))return a;throw g("No expression at the given position.")},K=e.getSpan=function(e){if(e.origin){if(e.originNode){var t=e.originNode;return/^Function/.test(t.type)&&t.id&&(t=t.id),{origin:e.origin,node:t}}return e.span?{origin:e.origin,span:e.span}:void 0}},Q=e.storeSpan=function(e,t,n,r){if(r.origin=n.origin,n.span){var o=/^(\d+)\[(\d+):(\d+)\]-(\d+)\[(\d+):(\d+)\]$/.exec(n.span);r.start=t.lineCharPositions?{line:Number(o[2]),ch:Number(o[3])}:Number(o[1]),r.end=t.lineCharPositions?{line:Number(o[5]),ch:Number(o[6])}:Number(o[4])}else{var s=e.findFile(n.origin);r.start=T(t,s,n.node.start),r.end=T(t,s,n.node.end)}};e.version="0.6.2"}),function(e){return"object"==typeof exports&&"object"==typeof module?e(exports):"function"==typeof define&&define.amd?define("tern/lib/comment",["exports"],e):void e(tern.comment||(tern.comment={}))}(function(e){function t(e){return 14>e&&e>8||32===e||160===e}function n(e,n){for(;n>0;--n){var r=e.charCodeAt(n-1);if(10==r)break;if(!t(r))return!1}return!0}e.commentsBefore=function(e,r){var o,s=null,i=0;e:for(;r>0;){var a=e.charCodeAt(r-1);if(10==a)for(var l=--r,c=!1;l>0;--l){if(a=e.charCodeAt(l-1),47==a&&47==e.charCodeAt(l-2)){if(!n(e,l-2))break e;var p=e.slice(l,r);!i&&o?s[0]=p+"\n"+s[0]:(s||(s=[])).unshift(p),o=!0,i=0,r=l-2;break}if(10==a){if(!c&&++i>1)break e;break}c||t(a)||(c=!0)}else if(47==a&&42==e.charCodeAt(r-2)){for(var l=r-2;l>1;--l)if(42==e.charCodeAt(l-1)&&47==e.charCodeAt(l-2)){if(!n(e,l-2))break e;(s||(s=[])).unshift(e.slice(l,r-2)),o=!1,i=0;break}r=l-2}else{if(!t(a))break;--r}}return s},e.commentAfter=function(e,n){for(;n<e.length;){var r=e.charCodeAt(n);if(47==r){var o,s=e.charCodeAt(n+1);if(47==s)o=e.indexOf("\n",n+2);else{if(42!=s)return;o=e.indexOf("*/",n+2)}return e.slice(n+2,0>o?e.length:o)}t(r)&&++n}},e.ensureCommentsBefore=function(t,n){return n.hasOwnProperty("commentsBefore")?n.commentsBefore:n.commentsBefore=e.commentsBefore(t,n.start)}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require("../lib/comment"),require("acorn/util/walk")):"function"==typeof define&&define.amd?define("tern/plugin/doc_comment",["../lib/infer","../lib/tern","../lib/comment","acorn/util/walk"],e):void e(tern,tern,tern.comment,acorn.walk)}(function(e,t,n,r){"use strict";function o(e,t){function o(e){n.ensureCommentsBefore(t,e)}r.simple(e,{VariableDeclaration:o,FunctionDeclaration:o,AssignmentExpression:function(e){"="==e.operator&&o(e)},ObjectExpression:function(e){for(var t=0;t<e.properties.length;++t)o(e.properties[t].key)}})}function s(t,n){r.simple(t,{VariableDeclaration:function(e,t){e.commentsBefore&&i(e,e.commentsBefore,t,t.getProp(e.declarations[0].id.name))},FunctionDeclaration:function(e,t){e.commentsBefore&&i(e,e.commentsBefore,t,t.getProp(e.id.name),e.body.scope.fnType)},AssignmentExpression:function(t,n){t.commentsBefore&&i(t,t.commentsBefore,n,e.expressionType({node:t.left,state:n}))},ObjectExpression:function(e,t){for(var n=0;n<e.properties.length;++n){var r=e.properties[n],o=r.key;o.commentsBefore&&i(r,o.commentsBefore,t,e.objType.getProp(o.name))}}},e.searchVisitor,n)}function i(t,n,r,o,s){d(t,r,o,n),!s&&o instanceof e.AVal&&o.types.length&&(s=o.types[o.types.length-1],s instanceof e.Obj&&s.origin==e.cx().curOrigin&&!s.doc||(s=null));var i=n[n.length-1];i=i.trim(),o instanceof e.AVal&&(o.doc=i),s&&(s.doc=i)}function a(e,t){for(;/\s/.test(e.charAt(t));)++t;return t}function l(e,t,n,r){for(var o=[],s=[],i=!0;n=a(t,n),!i||t.charAt(n)!=r;i=!1){var l=t.indexOf(":",n);if(0>l)return null;var p=t.slice(n,l);if(!/^[\w$]+$/.test(p))return null;o.push(p),n=l+1;var d=c(e,t,n);if(!d)return null;n=d.end,s.push(d.type),n=a(t,n);var u=t.charAt(n);if(++n,u==r)break;if(","!=u)return null}return{labels:o,types:s,end:n}}function c(t,n,r){r=a(n,r);var o;if(n.indexOf("function(",r)==r){var s=l(t,n,r+9,")"),i=e.ANull;if(!s)return null;if(r=a(n,s.end),":"==n.charAt(r)){++r;var p=c(t,n,r+1);if(!p)return null;r=p.end,i=p.type}o=new e.Fn(null,e.ANull,s.types,s.labels,i)}else if("["==n.charAt(r)){var d=c(t,n,r+1);if(!d)return null;if(r=a(n,d.end),"]"!=n.charAt(r))return null;++r,o=new e.Arr(d.type)}else if("{"==n.charAt(r)){var u=l(t,n,r+1,"}");if(!u)return null;o=new e.Obj(!0);for(var h=0;h<u.types.length;++h){var f=o.defProp(u.labels[h]);f.initializer=!0,u.types[h].propagate(f)}r=u.end}else{for(var m=r;/[\w$]/.test(n.charAt(r));)++r;if(m==r)return null;var g=n.slice(m,r);if(/^(number|integer)$/i.test(g))o=e.cx().num;else if(/^bool(ean)?$/i.test(g))o=e.cx().bool;else if(/^string$/i.test(g))o=e.cx().str;else if(/^array$/i.test(g)){var d=null;if("."==n.charAt(r)&&"<"==n.charAt(r+1)){var b=c(t,n,r+2);if(!b)return null;if(r=a(n,b.end),">"!=n.charAt(r++))return null;d=b.type}o=new e.Arr(d)}else if(/^object$/i.test(g)){if(o=new e.Obj(!0),"."==n.charAt(r)&&"<"==n.charAt(r+1)){var y=c(t,n,r+2);if(!y)return null;if(r=a(n,y.end),","!=n.charAt(r++))return null;var v=c(t,n,r);if(!v)return null;if(r=a(n,v.end),">"!=n.charAt(r++))return null;v.type.propagate(o.defProp("<i>"))}}else{var w=t.hasProp(g);if(w&&(w=w.getType()),w)if(w instanceof e.Fn&&/^[A-Z]/.test(g)){var _=w.getProp("prototype").getType();o=_ instanceof e.Obj?e.getInstance(_):w}else o=w;else o=e.ANull}}var S=!1;return"="==n.charAt(r)&&(++r,S=!0),{type:o,end:r,isOptional:S}}function p(e,t,n){if(n=a(t,n||0),"{"!=t.charAt(n))return null;var r=c(e,t,n+1);return r&&"}"==t.charAt(r.end)?(++r.end,r):null}function d(e,t,n,r){for(var o,s,i,a,l=r.length-1;l>=0;l--)for(var c,d=r[l],h=/(?:\n|$|\*)\s*@(type|param|arg(?:ument)?|returns?)\s+(.*)/g;c=h.exec(d);){var f=p(t,c[2]);if(f)switch(a=!0,c[1]){case"returns":case"return":i=f.type;break;case"type":o=f.type;break;case"param":case"arg":case"argument":var m=c[2].slice(f.end).match(/^\s*([\w$]+)/);if(!m)continue;var g=m[1]+(f.isOptional?"?":"");(s||(s=Object.create(null)))[g]=f.type}}a&&u(o,s,i,e,n)}function u(e,t,n,r,o){var s;if("VariableDeclaration"==r.type){var i=r.declarations[0];i.init&&"FunctionExpression"==i.init.type&&(s=i.init.body.scope.fnType)}else"FunctionDeclaration"==r.type?s=r.body.scope.fnType:"AssignmentExpression"==r.type?"FunctionExpression"==r.right.type&&(s=r.right.body.scope.fnType):"FunctionExpression"==r.value.type&&(s=r.value.body.scope.fnType);if(s&&(t||n)){if(t)for(var a=0;a<s.argNames.length;++a){var l=s.argNames[a],c=t[l];!c&&(c=t[l+"?"])&&(s.argNames[a]+="?"),c&&c.propagate(s.args[a])}n&&n.propagate(s.retval)}else e&&e.propagate(o)}t.registerPlugin("doc_comment",function(){return{passes:{postParse:o,postInfer:s}}})}),define("orion/editor/templates",[],function(){function e(e,t){return t.substring(e.length)}function t(e,t,n,r){this.prefix=e,this.description=t,this.template=n,this.name=r,this._parse()}function n(e,t){this._keywords=e||[],this._templates=[],this.addTemplates(t||[])}var r="${tab}",o="${delimiter}",s="${cursor}";return t.prototype={getProposal:function(e,t,n){var i,a=t-e.length,l={},c=void 0!==n.delimiter?n.delimiter:"\n";n.indentation&&(c+=n.indentation);for(var p=void 0!==n.tab?n.tab:"	",d=0,u=this.variables,h=this.segments,f=[],m=0;m<h.length;m++){var g=h[m],b=u[g];if(void 0!==b)switch(g){case r:g=p;break;case o:g=c;break;case s:g="",i=d;break;default:var y=l[g];y||(y=l[g]={data:b.data,positions:[]}),g=b.substitution,y.data&&y.data.values&&(g=y.data.values[0]),y.positions.push({offset:a+d,length:g.length})}f.push(g),d+=g.length}var v=[];for(var w in l)l.hasOwnProperty(w)&&v.push(l[w]);return f=f.join(""),void 0===i&&(i=f.length),{proposal:f,name:this.name,description:this.description,groups:v,escapePosition:a+i,style:"noemphasis"}},match:function(e){return 0===this.prefix.indexOf(e)},_parse:function(){var e,t=this.template,n=[],s={},i=0;t=t.replace(/\n/g,o),t=t.replace(/\t/g,r),t.replace(/\$\{((?:[^\\}]+|\\.))*\}/g,function(r,o,a){var l=r.substring(2,r.length-1),c=r,p=l,d=null,u=p.indexOf(":");-1!==u&&(p=p.substring(0,u),c="${"+p+"}",d=JSON.parse(l.substring(u+1).replace("\\}","}").trim()));var h=s[c];return h||(h=s[c]={}),h.substitution=p,d&&(h.data=d),e=t.substring(i,a),e&&n.push(e),n.push(c),i=a+r.length,p}),e=t.substring(i,t.length),e&&n.push(e),this.segments=n,this.variables=s}},n.prototype={addTemplates:function(e){for(var n=this.getTemplates(),r=0;r<e.length;r++)n.push(new t(e[r].prefix,e[r].description,e[r].template,e[r].name))},initialize:function(){},computeProposals:function(e,t,n){var r=this.getPrefix(e,t,n),o=[];return this.isValid(r,e,t,n)&&(o=o.concat(this.getTemplateProposals(r,t,n)),o=o.concat(this.getKeywordProposals(r))),o},getKeywords:function(){return this._keywords},getKeywordProposals:function(t){var n=[],r=this.getKeywords();if(r){for(var o=0;o<r.length;o++)0===r[o].indexOf(t)&&n.push({proposal:e(t,r[o]),description:r[o],style:"noemphasis_keyword"});0<n.length&&n.splice(0,0,{proposal:"",description:"Keywords",style:"noemphasis_title_keywords",unselectable:!0})}return n},getPrefix:function(e,t,n){return n.prefix},getTemplates:function(){return this._templates},getTemplateProposals:function(e,t,n){for(var r=[],o=this.getTemplates(),s=0;s<o.length;s++){var i=o[s];if(i.match(e)){var a=i.getProposal(e,t,n);this.removePrefix(e,a),r.push(a)}}return 0<r.length&&(r.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}),r.splice(0,0,{proposal:"",description:"Templates",style:"noemphasis_title",unselectable:!0})),r},removePrefix:function(t,n){var r=n.overwrite=n.proposal.substring(0,t.length)!==t;r||(n.proposal=e(t,n.proposal))},isValid:function(){return!0}},{Template:t,TemplateContentAssist:n}}),define("tern/plugin/resolver",["orion/editor/templates"],function(e){function t(e,t){for(var r=Object.keys(p),o=0;o<r.length;o++){var s=r[o],i=p[s];i&&(i.pending||i.file)||n(e,s,t)}}function n(e,t,n){e.startAsyncAction(),p[t].pending=!0,e.options.getFile({logical:t,file:n},function(n,r){p[t].file=r.file,p[t].contents=r.contents,p[t].logical=r.logical,p[t].err=n,delete p[t].pending,e.finishAsyncAction(n)})}function r(e){var t=function(){clearTimeout(n),o(e)},n=setTimeout(t,e.options.fetchTimeout)}function o(e){if(e.pending)return r(e);for(var t=!0,n=Object.keys(p),o=0;o<n.length;o++)if(!p[n[o]]){t=!1;break}return t?void 0:r(e)}function s(e,n){if(Array.isArray(n.dependencies)&&n.dependencies.length>0){for(var r=0;r<n.dependencies.length;r++){var o=n.dependencies[r].value;if(o){if(void 0!==p[o])continue;p[o]=Object.create(null)}}t(e,n.sourceFile?n.sourceFile.name:null)}}function i(e){return p[e]}function a(t){if(t.t)return t.t;var n=new e.Template(t.prefix,t.description,t.template,t.name);return t.t=n,n}function l(e){if(e&&e.parents&&e.parents.length>0){var t=e.parents.pop();switch(t.type){case"MemberExpression":return{kind:"member"};case"VariableDeclarator":return null;case"FunctionDelcaration":case"FunctionExpression":if(offset<t.body.range[0])return null;break;case"Property":return offset-1>=t.value.range[0]&&offset-1<=t.value.range[1]?{kind:"prop"}:null;case"SwitchStatement":return{kind:"swtch"}}}return{kind:"top"}}function c(e,t){var n=l(t);if(n&&n.kind){for(var r=[],o=e.length,s=0;o>s;s++){var i=e[s];i.nodes&&i.nodes[n.kind]&&r.push(i)}return r.map(a,this)}}var p=Object.create(null);return{doPostParse:s,doPreInfer:o,getResolved:i,getTemplatesForNode:c}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionAmqp",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,n){function r(r,s,i){var a=t.resolvePos(r,s.end),l=e.findExpressionAround(r.ast,null,a,r.scope),c=n.getTemplatesForNode(o,l);if(c&&c.length>0)for(var p=0;p<c.length;p++){var d=c[p];d.origin="amqp",d.type="template",i.push(d)}}var o=[{prefix:"amqp",name:"amqp",nodes:{top:!0,member:!1,prop:!1},description:" - Node.js require statement for AMQP framework",template:"var amqp = require('amqp');\n"},{prefix:"amqp",name:"amqp connection",nodes:{top:!0,member:!1,prop:!1},description:" - create a new AMQP connection ",template:"var amqp = require('amqp');\nvar ${connection} = amqp.createConnection({\n	host: ${host},\n	port: ${port},\n	login: ${login},\n	password: ${password}\n});\n"},{prefix:"amqp",name:"amqp on",nodes:{top:!0,member:!1,prop:!1},description:" - create a new AMQP connection on statement",template:"${connection}.on(${event}, function() {\n	${cursor}\n});\n"},{prefix:"amqp",name:"amqp queue",nodes:{top:!0,member:!1,prop:!1},description:" - create a new AMQP connection queue statement",template:"${connection}.queue(${id}, function(queue) {\n	queue.bind('#'); //catch all messages\n	queue.subscribe(function (message, headers, deliveryInfo) {\n		// Receive messages\n	});\n	${cursor}\n});\n"},{prefix:"amqp",name:"amqp exchange",nodes:{top:!0,member:!1,prop:!1},description:" - create a new AMQP connection exchange",template:"var exchange = ${connection}.exchange(${id}, {type: 'topic'}, function(exchange) {\n	${cursor}\n});\n"}];t.registerPlugin("orionAmqp",function(){return{defs:s,passes:{completion:r}}});var s={"!name":"amqp","!define":{"!node":{amqp:{Connection:"Connection",createConnection:"fn(options: Object, implOptions: Object, readyCallback: fn()) -> +Connection"}},"Exchange.!3":{type:"string"},"createExchangeErrorHandlerFor.!ret":"fn(err: ?)","Connection.prototype._bodyToBuffer.!ret":"[Connection.prototype._bodyToBuffer.!ret.<i>]","Connection.prototype._bodyToBuffer.!ret.<i>":{contentType:"string"},"Connection.prototype._parseURLOptions.!ret":{ssl:{enabled:"bool"}},"Connection.prototype._sendHeader.!2":{reserved1:"number",routingKey:"string",noWait:"bool"},"serializer.serializeFields.!2":{reserved1:"number",routingKey:"string",noWait:"bool"},"Queue.prototype.subscribeRaw.!0":{state:"string"},"Message.!1":{parseError:"+Error",rawData:"string"},"parseTable.!ret":{"!doc":"XXX check if bitIndex greater than 7?"},"parseFields.!1":"[?]","parseFields.!ret":{}},methods:{"<i>":{"!doc":"debug(name);"},"!doc":"methods keyed on their name"},Channel:{prototype:{closeOK:"fn()",reconnect:"fn()",_taskPush:"fn(reply: ?, cb: ?)",_tasksFlush:"fn()",_handleTaskReply:"fn(channel: ?, method: ?, args: ?) -> bool",_onChannelMethod:"fn(channel: ?, method: ?, args: ?)",close:"fn(reason: ?)"},"!type":"fn(connection: +Connection, channel: number)","!doc":"This class is not exposed to the user."},Exchange:{prototype:{_onMethod:"fn(channel: ?, method: ?, args: ?) -> bool",publish:{"!type":"fn(routingKey: ?, data: ?, options: ?, callback: ?)","!doc":"exchange.publish('routing.key', 'body'); the third argument can specify additional options - mandatory (boolean, default false) - immediate (boolean, default false) - contentType (default 'application/octet-stream') - contentEncoding - headers - deliveryMode - priority (0-9) - correlationId - replyTo - expiration - messageId - timestamp - userId - appId - clusterId the callback is optional and is only used when confirm is turned on for the exchange"},_awaitConfirm:{"!type":"fn(task: ?, callback: ?)","!doc":"registers tasks for confirms"},cleanup:{"!type":"fn()","!doc":"do any necessary cleanups eg."},destroy:"fn(ifUnused: ?)",unbind:"fn()",bind:"fn()",bind_headers:"fn()"},"!type":"fn(connection: +Connection, channel: number, name: ?, options: Exchange.!3, openCallback: ?)",binds:"number",exchangeBinds:"number",sourceExchanges:{"<i>":"+Exchange"},_sequence:"number",_unAcked:{},_addedExchangeErrorHandler:"bool",state:"string",channel:"number",connection:"+Connection",_tasks:"[?]"},createExchangeErrorHandlerFor:{"!type":"fn(exchange: +Exchange) -> fn(err: ?)","!doc":"creates an error handler scoped to the given `exchange`"},Connection:{prototype:{setOptions:"fn(options: ?)",setImplOptions:"fn(options: ?)",connect:"fn()",reconnect:"fn()",disconnect:"fn()",addAllListeners:"fn()",heartbeat:"fn()",exchange:{"!type":"fn(name: ?, options: Exchange.!3, openCallback: ?) -> +Exchange","!doc":"connection.exchange('my-exchange', { type: 'topic' }); Options - type 'fanout', 'direct', or 'topic' (default) - passive (boolean) - durable (boolean) - autoDelete (boolean, default true)"},exchangeClosed:{"!type":"fn(name: ?)","!doc":"remove an exchange when it's closed (called from Exchange)"},queue:{"!type":"fn(name: ?) -> +Queue","!doc":"Options - passive (boolean) - durable (boolean) - exclusive (boolean) - autoDelete (boolean, default true)"},queueClosed:{"!type":"fn(name: ?)","!doc":"remove a queue when it's closed (called from Queue)"},publish:{"!type":"fn(routingKey: ?, body: ?, options: ?, callback: ?)","!doc":"Publishes a message to the default exchange."},_bodyToBuffer:"fn(body: ?) -> [?]",_inboundHeartbeatTimerReset:"fn()",_outboundHeartbeatTimerReset:"fn()",_saslResponse:"fn() -> ?|string",_onMethod:"fn(channel: number, method: methods.<i>, args: parseFields.!ret)",_parseURLOptions:{"!type":"fn(connectionString: ?) -> Connection.prototype._parseURLOptions.!ret","!doc":"Generate connection options from URI string formatted with amqp scheme."},_chooseHost:{"!type":"fn() -> !this.options.host","!doc":"If you pass a array of hosts, lets choose a random host or the preferred host number, or then next one."},_createSocket:"fn()",end:"fn()",_getSSLOptions:"fn() -> !this.sslConnectionOptions",_startHandshake:{"!type":"fn()","!doc":"Time to start the AMQP 7-way connection initialization handshake! 1."},_sendBody:{"!type":"fn(channel: number, body: ?, properties: ?)","!doc":"Parse helpers "},_sendHeader:{"!type":"fn(channel: number, size: ?, properties: ?)","!doc":"connection: the connection channel: the channel to send this on size: size in bytes of the following message properties: an object containing any of the following: - contentType (default 'application/octet-stream') - contentEncoding - headers - deliveryMode - priority (0-9) - correlationId - replyTo - expiration - messageId - timestamp - userId - appId - clusterId"},_sendMethod:"fn(channel: number, method: ?, args: ?)",generateChannelId:{"!type":"fn() -> !this.channelCounter","!doc":"tries to find the next available id slot for a channel"}},"!type":"fn(connectionArgs: ?, options: ?, readyCallback: ?)",connectionAttemptScheduled:{"!type":"bool","!doc":"Set to false, so that if we fail in the reconnect attempt, we can schedule another one."},_defaultExchange:"+Exchange",channelCounter:"number",_blocked:"bool",channels:{"!doc":"In the case where this is a reconnection, do not trample on the existing channels.","<i>":"+Queue"},exchanges:{"<i>":"+Exchange"},parser:{"!type":"+AMQPParser","!doc":"Reset parser state"},readyEmitted:{"!type":"bool","!doc":"Set 'ready' flag for auth failure detection."},hosti:{"!type":"number","!doc":"If this is already set, it looks like we want to choose another one."},"<i>":"fn()",sslConnectionOptions:{}},serializer:{serializeFloat:"fn(b: ?, size: number, value: ?, bigEndian: ?)",serializeInt:"fn(b: ?, size: number, int: number)",serializeShortString:"fn(b: ?, string: ?)",serializeLongString:"fn(b: ?, string: ?)",serializeDate:"fn(b: ?, date: ?)",serializeBuffer:"fn(b: ?, buffer: ?)",serializeBase64:"fn(b: ?, buffer: ?)",isBigInt:"fn(value: ?) -> bool",getCode:"fn(dec: ?) -> string",isFloat:"fn(value: ?) -> bool",serializeValue:"fn(b: ?, value: ?)",serializeTable:"fn(b: ?, object: ?)",serializeArray:"fn(b: ?, arr: ?)",serializeFields:"fn(buffer: ?, fields: ?, args: ?, strict: bool)"},methodTable:{"<i>":{"<i>":"methods.<i>"},"!doc":"a look up table for methods recieved indexed on class id, method id"},classes:{"!doc":"classes keyed on their index"},Queue:{prototype:{subscribeRaw:"fn(options: Queue.consumerTagListeners.<i>, messageListener: Queue.consumerTagListeners.<i>)",unsubscribe:"fn(consumerTag: ?)",subscribe:"fn(options: ?, messageListener: ?)",shift:{"!type":"fn(reject: ?, requeue: ?)","!doc":"Acknowledges the last message"},bind:"fn(exchange: string, routingKey: string, callback: string)",unbind:"fn(exchange: string, routingKey: string)",bind_headers:"fn()",unbind_headers:"fn()",destroy:"fn(options: ?)",purge:"fn()",_onMethod:"fn(channel: ?, method: ?, args: ?)",_onContentHeader:"fn(channel: number, classInfo: ?, weight: number, properties: parseFields.!ret, size: number)",_onContent:"fn(channel: number, data: ?)",flow:"fn(active: ?)",subscribeJSON:"Queue.prototype.subscribe"},"!type":"fn(connection: +Connection, channel: number, name: ?, options: ?, callback: ?)",name:"string",_bindings:{"<i>":{"<i>":"number"}},consumerTagListeners:{"<i>":{state:"string"}},consumerTagOptions:{"<i>":"Queue.consumerTagListeners.<i>"},options:{autoDelete:"bool",closeChannelOnUnsubscribe:"bool"},state:"string",_bindCallback:"string",_sequence:"number",confirm:"bool",currentMessage:"+Message"},AMQPParser:{prototype:{throwError:{"!type":"fn(error: string)","!doc":"If there's an error in the parser, call the onError handler or throw"},execute:{"!type":"fn(data: ?)","!doc":"Everytime data is recieved on the socket, pass it to this function for parsing."},_parseMethodFrame:"fn(channel: number, buffer: ?)",_parseHeaderFrame:"fn(channel: number, buffer: ?)"},"!type":"fn(version: string, type: string)","!doc":"An interruptible AMQP parser.",isClient:"bool",state:"string",parse:"fn(data: ?) -> AMQPParser.parse",onMethod:"fn(channel: number, method: methods.<i>, args: parseFields.!ret)",onContent:"fn(channel: number, data: ?)",onContentHeader:"fn(channel: number, classInfo: ?, weight: number, properties: parseFields.!ret, size: number)",onHeartBeat:"fn()",onError:"fn(e: string)"},maxFrameBuffer:{"!type":"number","!doc":"parser"},channelMax:{"!type":"number","!doc":"copying qpid)"},defaultPorts:{amqp:"number",amqps:"number"},defaultOptions:{host:"string",port:"number",login:"string",password:"string",authMechanism:"string",vhost:"string",connectionTimeout:"number",ssl:{enabled:"bool"}},defaultSslOptions:{port:"number",ssl:{rejectUnauthorized:"bool"}},defaultImplOptions:{defaultExchangeName:"string",reconnect:"bool",reconnectBackoffStrategy:"string",reconnectExponentialLimit:"number",reconnectBackoffTime:"number"},defaultClientProperties:{platform:"string",product:"string"},Message:{prototype:{acknowledge:{"!type":"fn(all: ?)","!doc":"Acknowledge receipt of message."},reject:{"!type":"fn(requeue: ?)","!doc":"Reject an incoming message."}},"!type":"fn(queue: +Queue, args: ?)","!doc":"Properties: - routingKey - size - deliveryTag - contentType (default 'application/octet-stream') - contentEncoding - headers - deliveryMode - priority (0-9) - correlationId - replyTo - experation - messageId - timestamp - userId - appId - clusterId",queue:"+Queue",read:"number",size:"number"},parseShortString:"fn(buffer: ?)",parseLongString:"fn(buffer: ?)",parseSignedInteger:"fn(buffer: ?) -> !0.<i>",parseValue:"fn(buffer: ?) -> !0.<i>",parseTable:"fn(buffer: ?) -> parseTable.!ret",parseFields:"fn(buffer: ?, fields: [?]) -> parseFields.!ret",Error:{name:"string"},createConnection:"fn(options: Object, implOptions: Object, readyCallback: fn()) -> +Connection"}
}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require("../lib/comment"),require("acorn/util/walk")):"function"==typeof define&&define.amd?define("tern/plugin/orionAngular",["../lib/infer","../lib/tern","../lib/comment","acorn/util/walk"],e):void e(tern,tern,tern.comment,acorn.walk)}(function(e,t,n,r){"use strict";function o(){this.fields=Object.create(null),this.forward=[]}function s(t){var n=e.cx().definitions.angular.service;return n.hasProp(t)?n.getProp(t):void 0}function i(t,n){var r=s(n);return r?r:t.injector&&t.injector?t.injector.get(n):e.ANull}function a(t,n,r,o){var s=[];if("FunctionExpression"===r.type)for(var a=0;a<r.params.length;++a)s.push(i(t,r.params[a].name));else if("ArrayExpression"===r.type){for(a=0;a<r.elements.length-1;++a){var l=r.elements[a];s.push("Literal"===l.type&&"string"==typeof l.value?i(t,l.value):e.ANull)}var c=r.elements[r.elements.length-1];c&&"FunctionExpression"===c.type&&(n=c.body.scope.fnType)}var p=new e.AVal;if(o){var d=new e.AVal;n.propagate(new e.IsCtor(d)),d.propagate(p,90),n.propagate(new e.IsCallee(d,s,null,new e.IfObj(p)))}else n.propagate(new e.IsCallee(e.cx().topScope,s,null,p));return p}function l(e){var t=[];if(e&&"ArrayExpression"===e.type)for(var n=0;n<e.elements.length;++n){var r=e.elements[n];"Literal"===r.type&&"string"==typeof r.value&&t.push(r.value)}return t}function c(e){var t=e.definitions.angular;return t&&t.Module.getProp("prototype").getType()}function p(t,n){var r=e.cx(),s=r.parent._angular,i=c(r),a=new e.Obj(i||!0);i||s.nakedModules.push(a),a.origin=r.curOrigin,a.injector=new o,a.metaData={includes:n};for(var l=0;l<n.length;++l){var p=s.modules[n[l]];p?p.injector&&p.injector.forwardTo(a.injector):(s.pendingImports[n[l]]||(s.pendingImports[n[l]]=[])).push(a.injector)}if("string"==typeof t){s.modules[t]=a;var d=s.pendingImports[t];if(d)for(delete s.pendingImports[t],l=0;l<d.length;++l)a.injector.forwardTo(d[l])}return a}function d(e,t){r.simple(e,{CallExpression:function(e){if("MemberExpression"===e.callee.type&&!e.callee.computed&&e.arguments.length&&/^(value|constant|controller|factory|provider)$/.test(e.callee.property.name)){var r=n.commentsBefore(t,e.callee.property.start-1);if(r){var o=r[0],s=o.search(/\.\s/);s>5&&(o=o.slice(0,s+1)),o=o.trim().replace(/\s*\n\s*\*\s*|\s{1,}/g," "),e.arguments[0].angularDoc=o}}}})}function u(t){var n=e.cx(),r=t["!name"],o=n.definitions[r];if("angular"!==r){var s=o&&o["!ng"];if(s)for(var i in s.props){var a=s.props[i].getType(),l=p(i.replace(/`/g,"."),a.metaData&&a.metaData.includes||[]);l.origin=r;for(var d in a.props){var u=a.props[d],h=u.getType();h&&(/^_inject_/.test(d)?(h.name||(h.name=d.slice(8)),l.injector.set(d.slice(8),h,u.doc,u.span)):a.props[d].propagate(l.defProp(d)))}}}else{var f=c(n),m=n.parent._angular.nakedModules;if(f)for(var g=0;g<m.length;++g)m[g].proto=f}}function h(t){var n=e.cx().parent._angular.modules,r=new e.Obj(null),o=0;for(var s in n){var i=n[s];if(t.origins.indexOf(i.origin)>-1){var a=s.replace(/\./g,"`");if(r.defProp(a).addType(i),i.condenseForceInclude=!0,++o,i.injector)for(var l in i.injector.fields){var c=i.injector.fields[l];c.local&&(t.roots["!ng."+a+"._inject_"+l]=c)}}}o&&(t.roots["!ng"]=r)}function f(t){var n=e.cx().parent._angular.modules;for(var r in t.types){var o;if(o=r.match(/^!ng\.([^\.]+)\._inject_([^\.]+)^/)){var s=n[o[1].replace(/`/g,".")];console.log(s.injector.fields,o[2]);var i=s.injector.fields[o[2]],a=t.types[r];i.span&&(a.span=i.span),i.doc&&(a.doc=i.doc)}}}function m(e){e._angular={modules:Object.create(null),pendingImports:Object.create(null),nakedModules:[]}}var g=e.constraint("doc",{addType:function(e){e.doc||(e.doc=this.doc)}});o.prototype.get=function(t){if("$scope"==t)return new e.Obj(s("$rootScope").getType(),"$scope");if(t in this.fields)return this.fields[t];var n=this.fields[t]=new e.AVal;return n},o.prototype.set=function(t,n,r,o,s){if(!("$scope"==t||s&&s>10)){var i=this.fields[t]||(this.fields[t]=new e.AVal);s||(i.local=!0),i.origin||(i.origin=e.cx().curOrigin),"string"!=typeof o||i.span?o&&"object"==typeof o&&!i.originNode&&(i.originNode=o):i.span=o,r&&(i.doc=r,i.propagate(new g(r))),n.propagate(i);for(var a=0;a<this.forward.length;++a)this.forward[a].set(t,n,r,o,(s||0)+1)}},o.prototype.forwardTo=function(e){this.forward.push(e);for(var t in this.fields){var n=this.fields[t];e.set(t,n,n.doc,n.span||n.originNode,1)}},e.registerFunction("angular_callInject",function(e){return function(t,n,r){var o=t.getType();o&&r&&r[e]&&a(o,n[e],r[e])}}),e.registerFunction("angular_regFieldCall",function(e,t,n){var r=e.getType();if(r&&n&&n.length>1){var o=a(r,t[1],n[1]);r.injector&&"Literal"===n[0].type&&r.injector.set(n[0].value,o,n[0].angularDoc,n[0])}}),e.registerFunction("angular_regFieldNew",function(e,t,n){var r=e.getType();if(r&&n&&n.length>1){var o=a(r,t[1],n[1],!0);r.injector&&"Literal"===n[0].type&&r.injector.set(n[0].value,o,n[0].angularDoc,n[0])}}),e.registerFunction("angular_regField",function(e,t,n){var r=e.getType();r&&r.injector&&n&&n[0]&&"Literal"===n[0].type&&t[1]&&r.injector.set(n[0].value,t[1],n[0].angularDoc,n[0])}),e.registerFunction("angular_module",function(t,n,r){var o,s=r&&r[0]&&"Literal"===r[0].type&&r[0].value;return"string"==typeof s&&(o=e.cx().parent._angular.modules[s]),o||(o=p(s,l(r&&r[1]))),o});var b=e.constraint("self, args, target",{addType:function(t){if(t instanceof e.Fn){this.target.addType(new e.Fn(t.name,t.self,t.args.slice(this.args.length),t.argNames.slice(this.args.length),t.retval)),this.self.propagate(t.self);for(var n=0;n<Math.min(t.args.length,this.args.length);++n)this.args[n].propagate(t.args[n])}}});e.registerFunction("angular_bind",function(t,n){if(n.length<2)return e.ANull;var r=new e.AVal;return n[1].propagate(new b(n[0],n.slice(2),r)),r});var y={"!name":"angular","!define":{cacheObj:{info:"fn() -> ?",put:"fn(key: string, value: ?) -> !1",get:"fn(key: string) -> ?",remove:"fn(key: string)",removeAll:"fn()",destroy:"fn()"},eventObj:{targetScope:"service.$rootScope",currentScope:"service.$rootScope",name:"string",stopPropagation:"fn()",preventDefault:"fn()",defaultPrevented:"bool"},Module:{"!url":"http://docs.angularjs.org/api/angular.Module","!doc":"Interface for configuring angular modules.",prototype:{animation:{"!type":"fn(name: string, animationFactory: fn()) -> !this","!url":"http://docs.angularjs.org/api/angular.Module#animation","!doc":"Defines an animation hook that can be later used with $animate service and directives that use this service."},config:{"!type":"fn(configFn: fn()) -> !this","!effects":["custom angular_callInject 0"],"!url":"http://docs.angularjs.org/api/angular.Module#config","!doc":"Use this method to register work which needs to be performed on module loading."},constant:"service.$provide.constant",controller:{"!type":"fn(name: string, constructor: fn()) -> !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/ng.$controllerProvider","!doc":"Register a controller."},directive:{"!type":"fn(name: string, directiveFactory: fn()) -> !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/ng.$compileProvider#directive","!doc":"Register a new directive with the compiler."},factory:"service.$provide.factory",filter:{"!type":"fn(name: string, filterFactory: fn()) -> !this","!effects":["custom angular_callInject 1"],"!url":"http://docs.angularjs.org/api/ng.$filterProvider","!doc":"Register filter factory function."},provider:"service.$provide.provider",run:{"!type":"fn(initializationFn: fn()) -> !this","!effects":["custom angular_callInject 0"],"!url":"http://docs.angularjs.org/api/angular.Module#run","!doc":"Register work which should be performed when the injector is done loading all modules."},service:"service.$provide.service",value:"service.$provide.value",name:{"!type":"string","!url":"http://docs.angularjs.org/api/angular.Module#name","!doc":"Name of the module."},requires:{"!type":"[string]","!url":"http://docs.angularjs.org/api/angular.Module#requires","!doc":"List of module names which must be loaded before this module."}}},Promise:{"!url":"http://docs.angularjs.org/api/ng.$q","!doc":"Allow for interested parties to get access to the result of the deferred task when it completes.",prototype:{then:"fn(successCallback: fn(value: ?), errorCallback: fn(reason: ?), notifyCallback: fn(value: ?)) -> +Promise","catch":"fn(errorCallback: fn(reason: ?))","finally":"fn(callback: fn()) -> +Promise",success:"fn(callback: fn(data: ?, status: number, headers: ?, config: ?)) -> +Promise",error:"fn(callback: fn(data: ?, status: number, headers: ?, config: ?)) -> +Promise"}},Deferred:{"!url":"http://docs.angularjs.org/api/ng.$q",prototype:{resolve:"fn(value: ?)",reject:"fn(reason: ?)",notify:"fn(value: ?)",promise:"+Promise"}},ResourceClass:{"!url":"http://docs.angularjs.org/api/ngResource.$resource",prototype:{$promise:"+Promise",$save:"fn()"}},Resource:{"!url":"http://docs.angularjs.org/api/ngResource.$resource",prototype:{get:"fn(params: ?, callback: fn()) -> +ResourceClass",save:"fn(params: ?, callback: fn()) -> +ResourceClass",query:"fn(params: ?, callback: fn()) -> +ResourceClass",remove:"fn(params: ?, callback: fn()) -> +ResourceClass","delete":"fn(params: ?, callback: fn()) -> +ResourceClass"}},service:{$anchorScroll:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$anchorScroll","!doc":"Checks current value of $location.hash() and scroll to related element."},$animate:{"!url":"http://docs.angularjs.org/api/ng.$animate","!doc":"Rudimentary DOM manipulation functions to insert, remove, move elements within the DOM.",addClass:{"!type":"fn(element: +Element, className: string, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#addClass","!doc":"Adds the provided className CSS class value to the provided element."},enter:{"!type":"fn(element: +Element, parent: +Element, after: +Element, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#enter","!doc":"Inserts the element into the DOM either after the after element or within the parent element."},leave:{"!type":"fn(element: +Element, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#leave","!doc":"Removes the element from the DOM."},move:{"!type":"fn(element: +Element, parent: +Element, after: +Element, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#move","!doc":"Moves element to be placed either after the after element or inside of the parent element."},removeClass:{"!type":"fn(element: +Element, className: string, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#removeClass","!doc":"Removes the provided className CSS class value from the provided element."}},$cacheFactory:{"!type":"fn(cacheId: string, options?: ?) -> cacheObj","!url":"http://docs.angularjs.org/api/ng.$cacheFactory","!doc":"Factory that constructs cache objects and gives access to them."},$compile:{"!type":"fn(element: +Element, transclude: fn(scope: ?), maxPriority: number)","!url":"http://docs.angularjs.org/api/ng.$compile","!doc":"Compiles a piece of HTML string or DOM into a template and produces a template function."},$controller:{"!type":"fn(controller: fn(), locals: ?) -> ?","!url":"http://docs.angularjs.org/api/ng.$controller","!doc":"Instantiates controllers."},$document:{"!type":"jQuery.fn","!url":"http://docs.angularjs.org/api/ng.$document","!doc":"A jQuery (lite)-wrapped reference to the browser's window.document element."},$exceptionHandler:{"!type":"fn(exception: +Error, cause?: string)","!url":"http://docs.angularjs.org/api/ng.$exceptionHandler","!doc":"Any uncaught exception in angular expressions is delegated to this service."},$filter:{"!type":"fn(name: string) -> fn(input: string) -> string","!url":"http://docs.angularjs.org/api/ng.$filter","!doc":"Retrieve a filter function."},$http:{"!type":"fn(config: ?) -> service.$q","!url":"http://docs.angularjs.org/api/ng.$http","!doc":"Facilitates communication with remote HTTP servers.","delete":"fn(url: string, config?: ?) -> +Promise",get:"fn(url: string, config?: ?) -> +Promise",head:"fn(url: string, config?: ?) -> +Promise",jsonp:"fn(url: string, config?: ?) -> +Promise",post:"fn(url: string, data: ?, config?: ?) -> +Promise",put:"fn(url: string, data: ?, config?: ?) -> +Promise"},$interpolate:{"!type":"fn(text: string, mustHaveExpression?: bool, trustedContext?: string) -> fn(context: ?) -> string","!url":"http://docs.angularjs.org/api/ng.$interpolate","!doc":"Compiles a string with markup into an interpolation function."},$locale:{"!url":"http://docs.angularjs.org/api/ng.$locale",id:"string"},$location:{"!url":"http://docs.angularjs.org/api/ng.$location","!doc":"Parses the URL in the browser address bar.",absUrl:{"!type":"fn() -> string","!url":"http://docs.angularjs.org/api/ng.$location#absUrl","!doc":"Return full url representation."},hash:{"!type":"fn(value?: string) -> string","!url":"http://docs.angularjs.org/api/ng.$location#hash","!doc":"Get or set the hash fragment."},host:{"!type":"fn() -> string","!url":"http://docs.angularjs.org/api/ng.$location#host","!doc":"Return host of current url."},path:{"!type":"fn(value?: string) -> string","!url":"http://docs.angularjs.org/api/ng.$location#path","!doc":"Get or set the URL path."},port:{"!type":"fn() -> number","!url":"http://docs.angularjs.org/api/ng.$location#port","!doc":"Returns the port of the current url."},protocol:{"!type":"fn() -> string","!url":"http://docs.angularjs.org/api/ng.$location#protocol","!doc":"Return protocol of current url."},replace:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$location#replace","!doc":"Changes to $location during current $digest will be replacing current history record, instead of adding new one."},search:{"!type":"fn(search: string, paramValue?: string) -> string","!url":"http://docs.angularjs.org/api/ng.$location#search","!doc":"Get or set the URL query."},url:{"!type":"fn(url: string, replace?: string) -> string","!url":"http://docs.angularjs.org/api/ng.$location#url","!doc":"Get or set the current url."}},$log:{"!url":"http://docs.angularjs.org/api/ng.$log","!doc":"Simple service for logging.",debug:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#debug","!doc":"Write a debug message."},error:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#error","!doc":"Write an error message."},info:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#info","!doc":"Write an info message."},log:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#log","!doc":"Write a log message."},warn:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#warn","!doc":"Write a warning message."}},$parse:{"!type":"fn(expression: string) -> fn(context: ?, locals: ?) -> ?","!url":"http://docs.angularjs.org/api/ng.$parse","!doc":"Converts Angular expression into a function."},$q:{"!url":"http://docs.angularjs.org/api/ng.$q","!doc":"A promise/deferred implementation.",all:{"!type":"fn(promises: [+Promise]) -> +Promise","!url":"http://docs.angularjs.org/api/ng.$q#all","!doc":"Combines multiple promises into a single promise."},defer:{"!type":"fn() -> +Deferred","!url":"http://docs.angularjs.org/api/ng.$q#defer","!doc":"Creates a Deferred object which represents a task which will finish in the future."},reject:{"!type":"fn(reasion: ?) -> +Promise","!url":"http://docs.angularjs.org/api/ng.$q#reject","!doc":"Creates a promise that is resolved as rejected with the specified reason."},when:{"!type":"fn(value: ?) -> +Promise","!url":"http://docs.angularjs.org/api/ng.$q#when","!doc":"Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise."}},$rootElement:{"!type":"+Element","!url":"http://docs.angularjs.org/api/ng.$rootElement","!doc":"The root element of Angular application."},$rootScope:{"!url":"http://docs.angularjs.org/api/ng.$rootScope",$apply:{"!type":"fn(expression: string)","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$apply","!doc":"Execute an expression in angular from outside of the angular framework."},$broadcast:{"!type":"fn(name: string, args?: ?) -> eventObj","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$broadcast","!doc":"Dispatches an event name downwards to all child scopes."},$destroy:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$destroy","!doc":"Removes the current scope (and all of its children) from the parent scope."},$digest:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$digest","!doc":"Processes all of the watchers of the current scope and its children."},$emit:{"!type":"fn(name: string, args?: ?) -> eventObj","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$emit","!doc":"Dispatches an event name upwards through the scope hierarchy."},$eval:{"!type":"fn(expression: string) -> ?","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$eval","!doc":"Executes the expression on the current scope and returns the result."},$evalAsync:{"!type":"fn(expression: string)","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$evalAsync","!doc":"Executes the expression on the current scope at a later point in time."},$new:{"!type":"fn(isolate: bool) -> service.$rootScope","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$new","!doc":"Creates a new child scope."},$on:{"!type":"fn(name: string, listener: fn(event: ?)) -> fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$on","!doc":"Listens on events of a given type."},$watch:{"!type":"fn(watchExpression: string, listener?: fn(), objectEquality?: bool) -> fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$watch","!doc":"Registers a listener callback to be executed whenever the watchExpression changes."},$watchCollection:{"!type":"fn(obj: string, listener: fn()) -> fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$watchCollection","!doc":"Shallow watches the properties of an object and fires whenever any of the properties."},$id:{"!type":"number","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$id","!doc":"Unique scope ID."}},$sce:{HTML:"string",CSS:"string",URL:"string",RESOURCE_URL:"string",JS:"string",getTrusted:"fn(type: string, maybeTrusted: ?) -> !1",getTrustedCss:"fn(maybeTrusted: ?) -> !0",getTrustedHtml:"fn(maybeTrusted: ?) -> !0",getTrustedJs:"fn(maybeTrusted: ?) -> !0",getTrustedResourceUrl:"fn(maybeTrusted: ?) -> !0",getTrustedUrl:"fn(maybeTrusted: ?) -> !0",parse:"fn(type: string, expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsCss:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsHtml:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsJs:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsResourceUrl:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsUrl:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",trustAs:"fn(type: string, value: ?) -> !1",trustAsHtml:"fn(value: ?) -> !0",trustAsJs:"fn(value: ?) -> !0",trustAsResourceUrl:"fn(value: ?) -> !0",trustAsUrl:"fn(value: ?) -> !0",isEnabled:"fn() -> bool"},$templateCache:{"!url":"http://docs.angularjs.org/api/ng.$templateCache","!proto":"cacheObj"},$timeout:{"!type":"fn(fn: fn(), delay?: number, invokeApply?: bool) -> +Promise","!url":"http://docs.angularjs.org/api/ng.$timeout","!doc":"Angular's wrapper for window.setTimeout.",cancel:"fn(promise: +Promise)"},$window:"<top>",$injector:{"!url":"http://docs.angularjs.org/api/AUTO.$injector","!doc":"Retrieve object instances as defined by provider.",annotate:{"!type":"fn(f: fn()) -> [string]","!url":"http://docs.angularjs.org/api/AUTO.$injector#annotate","!doc":"Returns an array of service names which the function is requesting for injection."},get:{"!type":"fn(name: string) -> ?","!url":"http://docs.angularjs.org/api/AUTO.$injector#get","!doc":"Return an instance of a service."},has:{"!type":"fn(name: string) -> bool","!url":"http://docs.angularjs.org/api/AUTO.$injector#has","!doc":"Allows the user to query if the particular service exist."},instantiate:{"!type":"fn(type: fn(), locals?: ?) -> +!0","!url":"http://docs.angularjs.org/api/AUTO.$injector#instantiate","!doc":"Create a new instance of JS type."},invoke:{"!type":"fn(type: fn(), self?: ?, locals?: ?) -> !0.!ret","!url":"http://docs.angularjs.org/api/AUTO.$injector#invoke","!doc":"Invoke the method and supply the method arguments from the $injector."}},$provide:{"!url":"http://docs.angularjs.org/api/AUTO.$provide","!doc":"Use $provide to register new providers with the $injector.",constant:{"!type":"fn(name: string, value: ?) -> !this","!effects":["custom angular_regField"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#constant","!doc":"A constant value."},decorator:{"!type":"fn(name: string, decorator: fn())","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#decorator","!doc":"Decoration of service, allows the decorator to intercept the service instance creation."},factory:{"!type":"fn(name: string, providerFunction: fn()) -> !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#factory","!doc":"A short hand for configuring services if only $get method is required."},provider:{"!type":"fn(name: string, providerType: fn()) -> !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#provider","!doc":"Register a provider for a service."},service:{"!type":"fn(name: string, constructor: fn()) -> !this","!effects":["custom angular_regFieldNew"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#provider","!doc":"Register a provider for a service."},value:{"!type":"fn(name: string, object: ?) -> !this","!effects":["custom angular_regField"],"!url":"http://docs.angularjs.org/api/AUTO.$providevalue","!doc":"A short hand for configuring services if the $get method is a constant."}},$cookies:{"!url":"http://docs.angularjs.org/api/ngCookies.$cookies","!doc":"Provides read/write access to browser's cookies.",text:"string"},$resource:{"!type":"fn(url: string, paramDefaults?: ?, actions?: ?) -> +Resource","!url":"http://docs.angularjs.org/api/ngResource.$resource","!doc":"Creates a resource object that lets you interact with RESTful server-side data sources."},$route:{"!url":"http://docs.angularjs.org/api/ngRoute.$route","!doc":"Deep-link URLs to controllers and views.",reload:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ngRoute.$route#reload","!doc":"Reload the current route even if $location hasn't changed."},current:{"!url":"http://docs.angularjs.org/api/ngRoute.$route#current","!doc":"Reference to the current route definition.",controller:"?",locals:"?"},routes:"[?]"},$sanitize:{"!type":"fn(string) -> string","!url":"http://docs.angularjs.org/api/ngSanitize.$sanitize","!doc":"Sanitize HTML input."},$swipe:{"!url":"http://docs.angularjs.org/api/ngTouch.$swipe","!doc":"A service that abstracts the messier details of hold-and-drag swipe behavior.",bind:{"!type":"fn(element: +Element, handlers: ?)","!url":"http://docs.angularjs.org/api/ngTouch.$swipe#bind","!doc":"Abstracts the messier details of hold-and-drag swipe behavior."}}}},angular:{bind:{"!type":"fn(self: ?, fn: fn(), args?: ?) -> !custom:angular_bind","!url":"http://docs.angularjs.org/api/angular.bind","!doc":"Returns a function which calls function fn bound to self."},bootstrap:{"!type":"fn(element: +Element, modules?: [string]) -> service.$injector","!url":"http://docs.angularjs.org/api/angular.bootstrap","!doc":"Use this function to manually start up angular application."},copy:{"!type":"fn(source: ?, target?: ?) -> !0","!url":"http://docs.angularjs.org/api/angular.copy","!doc":"Creates a deep copy of source, which should be an object or an array."},element:{"!type":"fn(element: +Element) -> jQuery.fn","!url":"http://docs.angularjs.org/api/angular.element","!doc":"Wraps a raw DOM element or HTML string as a jQuery element."},equals:{"!type":"fn(o1: ?, o2: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.equals","!doc":"Determines if two objects or two values are equivalent."},extend:{"!type":"fn(dst: ?, src: ?) -> !0","!url":"http://docs.angularjs.org/api/angular.extend","!doc":"Extends the destination object dst by copying all of the properties from the src object(s) to dst."},forEach:{"!type":"fn(obj: ?, iterator: fn(value: ?, key: ?), context?: ?) -> !0","!effects":["call !1 this=!2 !0.<i> number"],"!url":"http://docs.angularjs.org/api/angular.forEach","!doc":"Invokes the iterator function once for each item in obj collection, which can be either an object or an array."},fromJson:{"!type":"fn(json: string) -> ?","!url":"http://docs.angularjs.org/api/angular.fromJson","!doc":"Deserializes a JSON string."},identity:{"!type":"fn(val: ?) -> !0","!url":"http://docs.angularjs.org/api/angular.identity","!doc":"A function that returns its first argument."},injector:{"!type":"fn(modules: [string]) -> service.$injector","!url":"http://docs.angularjs.org/api/angular.injector","!doc":"Creates an injector function"},isArray:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isArray","!doc":"Determines if a reference is an Array."},isDate:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isDate","!doc":"Determines if a reference is a date."},isDefined:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isDefined","!doc":"Determines if a reference is defined."},isElement:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isElement","!doc":"Determines if a reference is a DOM element."},isFunction:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isFunction","!doc":"Determines if a reference is a function."},isNumber:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isNumber","!doc":"Determines if a reference is a number."},isObject:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isObject","!doc":"Determines if a reference is an object."},isString:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isString","!doc":"Determines if a reference is a string."},isUndefined:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isUndefined","!doc":"Determines if a reference is undefined."},lowercase:{"!type":"fn(val: string) -> string","!url":"http://docs.angularjs.org/api/angular.lowercase","!doc":"Converts the specified string to lowercase."},module:{"!type":"fn(name: string, deps: [string]) -> !custom:angular_module","!url":"http://docs.angularjs.org/api/angular.module","!doc":"A global place for creating, registering and retrieving Angular modules."},Module:"Module",noop:{"!type":"fn()","!url":"http://docs.angularjs.org/api/angular.noop","!doc":"A function that performs no operations."},toJson:{"!type":"fn(val: ?) -> string","!url":"http://docs.angularjs.org/api/angular.toJson","!doc":"Serializes input into a JSON-formatted string."},uppercase:{"!type":"fn(string) -> string","!url":"http://docs.angularjs.org/api/angular.uppercase","!doc":"Converts the specified string to uppercase."},version:{"!url":"http://docs.angularjs.org/api/angular.version",full:"string",major:"number",minor:"number",dot:"number",codename:"string"}}};t.registerPlugin("orionAngular",function(e){return m(e),e.on("reset",function(){m(e)}),{defs:y,passes:{postParse:d,postLoadDef:u,preCondenseReach:h,postCondenseReach:f},loadFirst:!0}})}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionExpress",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,n){function r(r,s,i){var a=t.resolvePos(r,s.end),l=e.findExpressionAround(r.ast,null,a,r.scope),c=n.getTemplatesForNode(o,l);if(c&&c.length>0)for(var p=0;p<c.length;p++){var d=c[p];d.origin="express",d.type="template",i.push(d)}}var o=[{prefix:"express",name:"express",nodes:{top:!0,member:!1,prop:!1},description:" - Node.js require statement for Express",template:"var ${name} = require('express');"},{prefix:"express",name:"express app",description:" - create a new Express app",template:"var express = require('express');\nvar ${app} = express();\n${cursor}\napp.listen(${timeout});\n"},{prefix:"express",name:"express configure",nodes:{top:!0,member:!1,prop:!1},description:" - create an Express app configure statement",template:"app.configure(function() {\n	app.set(${id}, ${value});\n});"},{prefix:"express",name:"express specific configure",nodes:{top:!0,member:!1,prop:!1},description:" - create a specific Express app configure statement",template:"app.configure(${name}, function() {\n	app.set(${id}, ${value});\n});"},{prefix:"express",name:"express app get",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Express app.get call",template:"var value = app.get(${id}, function(request, result){\n	${cursor}\n});\n"},{prefix:"express",name:"express app set",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Express app set call",template:"app.set(${id}, ${value});\n"},{prefix:"express",name:"express app use",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Express app use statement",template:"app.use(${fnOrObject});\n"},{prefix:"express",name:"express app engine",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Express app engine statement",template:"app.engine(${fnOrObject});\n"},{prefix:"express",name:"express app param",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Express app param statement",template:"app.param(${id}, ${value});\n"},{prefix:"express",name:"express app error use",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Express app error handling use statement",template:"app.use(function(error, request, result, next) {\n	result.send(${code}, ${message});\n});\n"}];t.registerPlugin("orionExpress",function(){return{defs:s,passes:{completion:r}}});var s={express:{IRoute:{path:"string",stack:"?",all:"fn(handler: [RequestHandler]) -> IRoute",get:"fn(handler: [RequestHandler]) -> IRoute",post:"fn(handler: [RequestHandler]) -> IRoute",put:"fn(handler: [RequestHandler]) -> IRoute","delete":"fn(handler: [RequestHandler]) -> IRoute",patch:"fn(handler: [RequestHandler]) -> IRoute",options:"fn(handler: [RequestHandler]) -> IRoute"},Router:{"!type":"fn(options?: ?) -> Router",prototype:{param:"fn(name: string, handler: RequestParamHandler) -> T",all:"?",get:"?",post:"?",put:"?","delete":"?",patch:"?",options:"?",route:"fn(path: string) -> IRoute",use:"fn(handler: [RequestHandler]) -> T"}},CookieOptions:{maxAge:"number",signed:"bool",expires:"Date",httpOnly:"bool",path:"string",domain:"string",secure:"bool"},Errback:{},Request:{get:"fn(name: string) -> string",header:"fn(name: string) -> string",headers:{},accepts:"fn(type: string) -> string",acceptsCharset:"fn(charset: string) -> bool",acceptsLanguage:"fn(lang: string) -> bool",range:"fn(size: number) -> [?]",accepted:"[MediaType]",acceptedLanguages:"[?]",acceptedCharsets:"[?]",param:"fn(name: string, defaultValue?: ?) -> string",is:"fn(type: string) -> bool",protocol:"string",secure:"bool",ip:"string",ips:"[string]",subdomains:"[string]",path:"string",hostname:"string",host:"string",fresh:"bool",stale:"bool",xhr:"bool",body:"?",cookies:"?",method:"string",params:"?",user:"?",authenticatedUser:"?",files:"?",clearCookie:"fn(name: string, options?: ?) -> Response",query:"?",route:"?",signedCookies:"?",originalUrl:"string",url:"string"},MediaType:{value:"string",quality:"number",type:"string",subtype:"string"},Send:{},Response:{status:"fn(code: number) -> Response",sendStatus:"fn(code: number) -> Response",links:"fn(links: ?) -> Response",send:"Send",json:"Send",jsonp:"Send",sendFile:"fn(path: string)",sendfile:"fn(path: string)",download:"fn(path: string)",contentType:"fn(type: string) -> Response",type:"fn(type: string) -> Response",format:"fn(obj: ?) -> Response",attachment:"fn(filename?: string) -> Response",set:"fn(field: ?) -> Response",header:"fn(field: ?) -> Response",headersSent:"bool",get:"fn(field: string) -> string",clearCookie:"fn(name: string, options?: ?) -> Response",cookie:"fn(name: string, val: string, options: CookieOptions) -> Response",location:"fn(url: string) -> Response",redirect:"fn(url: string)",render:"fn(view: string, options?: Object, callback?: fn(err: Error, html: string))",locals:"?",charset:"string"},ErrorRequestHandler:{},RequestHandler:{},Handler:{},RequestParamHandler:{},Application:{init:"fn()",defaultConfiguration:"fn()",engine:"fn(ext: string, fn: Function) -> Application",set:"fn(setting: string, val: ?) -> Application",get:{},path:"fn() -> string",enabled:"fn(setting: string) -> bool",disabled:"fn(setting: string) -> bool",enable:"fn(setting: string) -> Application",disable:"fn(setting: string) -> Application",configure:"fn(fn: Function) -> Application",render:"fn(name: string, options?: Object, callback?: fn(err: Error, html: string))",listen:"fn(port: number, hostname: string, backlog: number, callback?: Function) -> http.Server",route:"fn(path: string) -> IRoute",router:"string",settings:"?",resource:"?",map:"?",locals:"?",routes:"?"},Express:{version:"string",mime:"string",createApplication:"fn() -> Application",createServer:"fn() -> Application",application:"?",request:"Request",response:"Response"},"static":"fn(root: string, options?: ?) -> RequestHandler"},"!name":"express","!define":{"!node":{express:{"!type":"fn() -> express.Application","!url":"http://expressjs.com","!doc":"Creates an express application.",Router:{"!type":"fn(options?: express.RouterOptions) -> +express.Router"}}}}}
}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionMongoDB",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,n){function r(r,s,i){var a=t.resolvePos(r,s.end),l=e.findExpressionAround(r.ast,null,a,r.scope),c=n.getTemplatesForNode(o,l);if(c&&c.length>0)for(var p=0;p<c.length;p++){var d=c[p];d.origin="mongodb",d.type="template",i.push(d)}}var o=[{prefix:"mongodb",name:"mongodb",nodes:{top:!0,member:!1,prop:!1},description:" - Node.js require statement for MongoDB",template:"var ${name} = require('mongodb');\n"},{prefix:"mongodb",name:"mongodb client",nodes:{top:!0,member:!1,prop:!1},description:" - create a new MongoDB client",template:"var MongoClient = require('mongodb').MongoClient;\nvar Server = require('mongodb').Server;\n${cursor}"},{prefix:"mongodb",name:"mongodb open",nodes:{top:!0,member:!1,prop:!1},description:" - create a new MongoDB client and open a connection",template:"var MongoClient = require('mongodb').MongoClient;\nvar Server = require('mongodb').Server;\nvar ${client} = new MongoClient(new Server(${host}, ${port}));\ntry {\n	${client}.open(function(error, ${client}) {\n		var ${db} = ${client}.db(${name});\n		${cursor}\n	});\n} finally {\n	${client}.close();\n};"},{prefix:"mongodb",name:"mongodb connect",nodes:{top:!0,member:!1,prop:!1},description:" - connect to an existing MongoDB database",template:"var MongoClient = require('mongodb').MongoClient;\nMongoClient.connect(${url}, function(error, db) {\n	${cursor}\n});\n"},{prefix:"mongodb",name:"mongodb connect (Cloud Foundry)",nodes:{top:!0,member:!1,prop:!1},description:" - connect to an existing MongoDB database using Cloud Foundry",template:"if (${process}.env.VCAP_SERVICES) {\n	var env = JSON.parse(${process}.env.VCAP_SERVICES);\n	var mongo = env['${mongo-version}'][0].credentials;\n} else {\n	var mongo = {\n		username : 'username',\n		password : 'password',\n		url : 'mongodb://username:password@localhost:27017/database'\n	};\n}\nvar MongoClient = require('mongodb').MongoClient;\nMongoClient.connect(mongo.url, function(error, db) {\n	${cursor}\n});\n"},{prefix:"mongodb",name:"mongodb collection",nodes:{top:!0,member:!1,prop:!1},description:" - create a MongoDB database collection",template:"${db}.collection(${id}, function(${error}, collection) {\n	${cursor}\n});"},{prefix:"mongodb",name:"mongodb strict collection",nodes:{top:!0,member:!1,prop:!1},description:" - create a MongoDB database strict collection",template:"${db}.collection(${id}, {strict:true}, function(${error}, collection) {\n	${cursor}\n});"}];t.registerPlugin("orionMongoDB",function(){return{defs:s,passes:{completion:r}}});var s={mongodb:{MongoClient:{"!type":"fn(serverConfig: ?, options: ?)",connect:"fn(uri: string, options: ?, callback: fn(err: Error, db: Db))",prototype:{}},Server:{"!type":"fn(host: string, port: number, opts?: ServerOptions)",prototype:{connect:"fn() -> ?"}},Db:{"!type":"fn(databaseName: string, serverConfig: Server, dbOptions?: DbCreateOptions)",prototype:{db:"fn(dbName: string) -> Db",open:"fn(callback: fn(err: Error, db: Db))",close:"fn(forceClose?: bool, callback?: fn(err: Error, result: ?))",admin:"fn(callback: fn(err: Error, result: ?)) -> ?",collectionsInfo:"fn(collectionName: string, callback?: fn(err: Error, result: ?))",collectionNames:"fn(collectionName: string, options: ?, callback?: fn(err: Error, result: ?))",collection:"fn(collectionName: string) -> Collection",collections:"fn(callback: fn(err: Error, collections: [Collection]))",eval:"fn(code: ?, parameters: [?], options?: ?, callback?: fn(err: Error, result: ?))",logout:"fn(options: ?, callback?: fn(err: Error, result: ?))",authenticate:"fn(userName: string, password: string, callback?: fn(err: Error, result: ?))",addUser:"fn(username: string, password: string, callback?: fn(err: Error, result: ?))",removeUser:"fn(username: string, callback?: fn(err: Error, result: ?))",createCollection:"fn(collectionName: string, callback?: fn(err: Error, result: Collection))",command:"fn(selector: Object, callback?: fn(err: Error, result: ?))",dropCollection:"fn(collectionName: string, callback?: fn(err: Error, result: ?))",renameCollection:"fn(fromCollection: string, toCollection: string, callback?: fn(err: Error, result: ?))",lastError:"fn(options: Object, connectionOptions: ?, callback: fn(err: Error, result: ?))",previousError:"fn(options: Object, callback: fn(err: Error, result: ?))",executeDbCommand:"fn(command_hash: ?, callback?: fn(err: Error, result: ?))",executeDbAdminCommand:"fn(command_hash: ?, callback?: fn(err: Error, result: ?))",resetErrorHistory:"fn(callback?: fn(err: Error, result: ?))",createIndex:"fn(collectionName: ?, fieldOrSpec: ?, options: IndexOptions, callback: Function)",ensureIndex:"fn(collectionName: ?, fieldOrSpec: ?, options: IndexOptions, callback: Function)",cursorInfo:"fn(options: ?, callback: Function)",dropIndex:"fn(collectionName: string, indexName: string, callback: Function)",reIndex:"fn(collectionName: string, callback: Function)",indexInformation:"fn(collectionName: string, options: ?, callback: Function)",dropDatabase:"fn(callback: fn(err: Error, result: ?))",stats:"fn(options: ?, callback: Function)",_registerHandler:"fn(db_command: ?, raw: ?, connection: ?, exhaust: ?, callback: Function)",_reRegisterHandler:"fn(newId: ?, object: ?, callback: Function)",_callHandler:"fn(id: ?, document: ?, err: ?) -> ?",_hasHandler:"fn(id: ?) -> ?",_removeHandler:"fn(id: ?) -> ?",_findHandler:"fn(id: ?) -> ret",__executeQueryCommand:"fn(self: ?, db_command: ?, options: ?, callback: ?)",DEFAULT_URL:"string",connect:"fn(url: string, options: Object, callback: fn(err: Error, result: ?))",addListener:"fn(event: string, handler: fn(param: ?)) -> ?"}},SocketOptions:{timeout:"number",noDelay:"bool",keepAlive:"number",encoding:"string"},ServerOptions:{auto_reconnect:"bool",poolSize:"number",socketOptions:"?"},PKFactory:{counter:"number",createPk:"fn()"},DbCreateOptions:{w:"?",wtimeout:"number",fsync:"bool",journal:"bool",readPreference:"string",native_parser:"bool",forceServerObjectId:"bool",pkFactory:"PKFactory",serializeFunctions:"bool",raw:"bool",recordQueryStats:"bool",retryMiliSeconds:"number",numberOfRetries:"number",logger:"Object",slaveOk:"number",promoteLongs:"bool"},ReadPreference:{PRIMARY:"string",PRIMARY_PREFERRED:"string",SECONDARY:"string",SECONDARY_PREFERRED:"string",NEAREST:"string",prototype:{}},CollectionCreateOptions:{readPreference:"string",slaveOk:"bool",serializeFunctions:"bool",raw:"bool",pkFactory:"PKFactory"},CollStats:{ns:"string",count:"number",size:"number",avgObjSize:"number",storageSize:"number",numExtents:"number",nindexes:"number",lastExtentSize:"number",paddingFactor:"number",flags:"number",totalIndexSize:"number",indexSizes:{_id_:"number",username:"number"}},Collection:{insert:"fn(query: ?, callback: fn(err: Error, result: ?))",remove:"fn(selector: Object, callback?: fn(err: Error, result: ?))",rename:"fn(newName: String, callback?: fn(err: Error, result: ?))",save:"fn(doc: ?, callback: fn(err: Error, result: ?))",update:"fn(selector: Object, document: ?, callback?: fn(err: Error, result: ?))",distinct:"fn(key: string, query: Object, callback: fn(err: Error, result: ?))",count:"fn(callback: fn(err: Error, result: ?))",drop:"fn(callback?: fn(err: Error, result: ?))",findAndModify:"fn(query: Object, sort: [?], doc: Object, callback: fn(err: Error, result: ?))",findAndRemove:"fn(query: Object, sort?: [?], callback?: fn(err: Error, result: ?))",find:"fn(callback?: fn(err: Error, result: Cursor)) -> Cursor",findOne:"fn(callback?: fn(err: Error, result: ?)) -> Cursor",createIndex:"fn(fieldOrSpec: ?, callback: fn(err: Error, indexName: string))",ensureIndex:"fn(fieldOrSpec: ?, callback: fn(err: Error, indexName: string))",indexInformation:"fn(options: ?, callback: Function)",dropIndex:"fn(name: string, callback: Function)",dropAllIndexes:"fn(callback: Function)",reIndex:"fn(callback: Function)",mapReduce:"fn(map: Function, reduce: Function, options: MapReduceOptions, callback: Function)",group:"fn(keys: Object, condition: Object, initial: Object, reduce: Function, finalize: Function, command: bool, options: Object, callback: Function)",options:"fn(callback: Function)",isCapped:"fn(callback: Function)",indexExists:"fn(indexes: string, callback: Function)",geoNear:"fn(x: number, y: number, callback: Function)",geoHaystackSearch:"fn(x: number, y: number, callback: Function)",indexes:"fn(callback: Function)",aggregate:"fn(pipeline: [?], callback: fn(err: Error, results: ?))",stats:"fn(options: Object, callback: fn(err: Error, results: CollStats))",hint:"?"},MapReduceOptions:{out:"Object",query:"Object",sort:"Object",limit:"number",keeptemp:"bool",finalize:"?",scope:"Object",jsMode:"bool",verbose:"bool",readPreference:"string"},IndexOptions:{w:"?",wtimeout:"number",fsync:"bool",journal:"bool",unique:"bool",sparse:"bool",background:"bool",dropDups:"bool",min:"number",max:"number",v:"number",expireAfterSeconds:"number",name:"string"},Cursor:{INIT:"number",OPEN:"number",CLOSED:"number",GET_MORE:"number",prototype:{rewind:"fn() -> Cursor",toArray:"fn(callback: fn(err: Error, results: [?]))",each:"fn(callback: fn(err: Error, item: ?))",count:"fn(applySkipLimit: bool, callback: fn(err: Error, count: number))",sort:"fn(keyOrList: ?, callback?: fn(err: Error, result: ?)) -> Cursor",limit:"fn(limit: number, callback?: fn(err: Error, result: ?)) -> Cursor",setReadPreference:"fn(preference: string, callback?: Function) -> Cursor",skip:"fn(skip: number, callback?: fn(err: Error, result: ?)) -> Cursor",batchSize:"fn(batchSize: number, callback?: fn(err: Error, result: ?)) -> Cursor",nextObject:"fn(callback: fn(err: Error, doc: ?))",explain:"fn(callback: fn(err: Error, result: ?))",stream:"fn() -> CursorStream",close:"fn(callback: fn(err: Error, result: ?))",isClosed:"fn() -> bool"}},CursorStream:{"!type":"fn(cursor: Cursor)",prototype:{pause:"fn() -> ?",resume:"fn() -> ?",destroy:"fn() -> ?"}},CollectionFindOptions:{limit:"number",sort:"?",fields:"Object",skip:"number",hint:"Object",explain:"bool",snapshot:"bool",timeout:"bool",tailtable:"bool",tailableRetryInterval:"number",numberOfRetries:"number",awaitdata:"bool",oplogReplay:"bool",exhaust:"bool",batchSize:"number",returnKey:"bool",maxScan:"number",min:"number",max:"number",showDiskLoc:"bool",comment:"String",raw:"bool",readPreference:"String",partial:"bool"},MongoCollectionOptions:{safe:"?",serializeFunctions:"?",raw:"bool",pkFactory:"?",readPreference:"string"}},"!name":"mongodb","!define":{"!node":{mongodb:{"!doc":"MongoDB","!url":"https://www.mongodb.org/",MongoClient:"mongodb.MongoClient",Db:"mongodb.Db",Server:"mongodb.Server",SocketOptions:"mongodb.SocketOptions",ServerOptions:"mongodb.ServerOptions",CollectionFindOptions:"mongodb.CollectionFindOptions",MongoCollectionOptions:"mongodb.MongoCollectionOptions",IndexOptions:"mongodb.IndexOptions",CollectionCreateOptions:"mongodb.CollectionCreateOptions",DbCreateOptions:"mongodb.DbCreateOptions",MapReduceOptions:"mongodb.MapReduceOptions",CollStats:"mongodb.CollStats",ReadPreference:"mongodb.ReadPreference",Collection:"mongodb.Collection",Cursor:"mongodb.Cursor",PKFactory:"mongodb.PKFactory"}}}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionMySQL",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,n){function r(r,s,i){var a=t.resolvePos(r,s.end),l=e.findExpressionAround(r.ast,null,a,r.scope),c=n.getTemplatesForNode(o,l);if(c&&c.length>0)for(var p=0;p<c.length;p++){var d=c[p];d.origin="mysql",d.type="template",i.push(d)}}var o=[{prefix:"mysql",name:"mysql",nodes:{top:!0,member:!1,prop:!1},description:" - Node.js require statement for MySQL DB",template:"var mysql = require('mysql');\n"},{prefix:"mysql",name:"mysql connection",nodes:{top:!0,member:!1,prop:!1},description:" - create a new MySQL DB connection",template:"var mysql = require('mysql');\nvar ${connection} = mysql.createConnection({\n	host : ${host},\n	user : ${username},\n	password : ${password}\n});\ntry {\n	${connection}.connect();\n	${cursor}\n} finally {\n	${connection}.end();\n}"},{prefix:"mysql",name:"mysql query",nodes:{top:!0,member:!1,prop:!1},description:" - create a new MySQL DB query statement",template:"${connection}.query(${sql}, function(error, rows, fields) {\n	${cursor}\n});\n"}];t.registerPlugin("orionMySQL",function(){return{defs:s,passes:{completion:r}}});var s={mysql:{createConnection:"fn(connectionUri: string) -> Connection",createPool:"fn(config: PoolConfig) -> Pool",createPoolCluster:"fn(config?: PoolClusterConfig) -> PoolCluster",escape:"fn(value: ?) -> string",format:"fn(sql: string) -> string",MySql:{createConnection:"fn(connectionUri: string) -> Connection",createPool:"fn(config: PoolConfig) -> Pool",createPoolCluster:"fn(config?: PoolClusterConfig) -> PoolCluster",escape:"fn(value: ?) -> string",format:"fn(sql: string) -> string"},ConnectionStatic:{createQuery:"fn(sql: string) -> Query"},Connection:{config:"ConnectionConfig",threadId:"number",beginTransaction:"fn(callback: fn(err: Error))",connect:"fn()",commit:"fn(callback: fn(err: Error))",changeUser:"fn(options: ConnectionOptions)",query:"QueryFunction",end:"fn()",destroy:"fn()",pause:"fn()",release:"fn()",resume:"fn()",escape:"fn(value: ?) -> string",escapeId:"fn(value: string) -> string",format:"fn(sql: string) -> string",on:"fn(ev: string, callback: fn(args: [?])) -> Connection",rollback:"fn(callback: fn())"},Pool:{config:"PoolConfig",getConnection:"fn(callback: fn(err: Error, connection: Connection))",query:"QueryFunction",end:"fn()",on:"fn(ev: string, callback: fn(args: [?])) -> Pool"},PoolCluster:{config:"PoolClusterConfig",add:"fn(config: PoolConfig)",end:"fn()",getConnection:"fn(callback: fn(err: Error, connection: Connection))",of:"fn(pattern: string) -> Pool",on:"fn(ev: string, callback: fn(args: [?])) -> PoolCluster"},Query:{sql:"string",start:"fn()",determinePacket:"fn(firstByte: number, parser: ?) -> ?",stream:"fn(options: StreamOptions) -> stream.Readable",pipe:"fn(callback: fn(args: [?])) -> Query",on:"fn(ev: string, callback: fn(args: [?])) -> Query"},QueryFunction:{},QueryOptions:{sql:"string",timeout:"number",nestTables:"?",typeCast:"?"},StreamOptions:{highWaterMark:"number",objectMode:"?"},ConnectionOptions:{user:"string",password:"string",database:"string",charset:"string"},ConnectionConfig:{host:"string",port:"number",localAddress:"string",socketPath:"string",timezone:"string",connectTimeout:"number",stringifyObjects:"bool",insecureAuth:"bool",typeCast:"?",queryFormat:"fn(query: string, values: ?)",supportBigNumbers:"bool",bigNumberStrings:"bool",dateStrings:"bool",debug:"?",trace:"bool",multipleStatements:"bool",flags:"?",ssl:"?"},PoolConfig:{acquireTimeout:"number",waitForConnections:"bool",connectionLimit:"number",queueLimit:"number"},PoolClusterConfig:{canRetry:"bool",removeNodeErrorCount:"number",defaultSelector:"string"},SslCredentials:{pfx:"string",key:"string",passphrase:"string",cert:"string",ca:"?",crl:"?",ciphers:"string"},Error:{code:"string",errno:"number",sqlStateMarker:"string",sqlState:"string",fieldCount:"number",stack:"string",fatal:"bool"}},"!name":"mysql","!define":{"!node":{mysql:{createConnection:"fn(connectionUri: string) -> mysql.Connection",createPool:"fn(config: mysql.PoolConfig) -> mysql.Pool",createPoolCluster:"fn(config?: mysql.PoolClusterConfig) -> mysql.PoolCluster",escape:"fn(value: ?) -> string",format:"fn(sql: string) -> string"}}}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionNode",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern)}(function(e,t,n,r){"use strict";function o(e,t){if("/"===t[0])return t;var n,r=e.lastIndexOf("/");for(r>=0&&(t=e.slice(0,r+1)+t);n=/[^\/]*[^\/\.][^\/]*\/\.\.\//.exec(t);)t=t.slice(0,n.index)+t.slice(n.index+n[0].length);return t.replace(/(^|[^\.])\.\//g,"$1")}function s(e,t){return"/"!==e[e.length-1]&&(e+="/"),0==t.indexOf(e)?t.slice(e.length):t}function i(t,n){return t.modules[n]||(t.modules[n]=new e.AVal)}function a(t,n,r){var o=new e.Scope(t);o.originNode=r,e.cx().definitions.node.require.propagate(o.defProp("require"));var s=new e.Obj(e.cx().definitions.node.Module.getProp("prototype").getType());s.propagate(o.defProp("module"));var i=new e.Obj(!0,"exports");s.origin=i.origin=n,i.propagate(o.defProp("exports"));var a=o.exports=s.defProp("exports");return i.propagate(a,h),o}function l(e,t,n){return e.addFile(t,null,n),i(e._node,t)}function c(e){return e.replace(/\\/g,"/")}function p(e,t){return o(c(e.options.projectDir)+"/",c(t))}function d(t){var n=e.cx().parent._node.modules,r=t.roots["!node"]=new e.Obj(null);for(var o in n){var s=n[o],i=s.origin||o,a=r.defProp(i.replace(/\./g,"`"));s.propagate(a),a.origin=s.origin}}function u(t){var n=e.cx(),r=n.definitions[t["!name"]]["!node"],o=n.parent._node;if(r)for(var s in r.props){var a=s.replace(/`/g,"."),l=i(o,a);l.origin=a,r.props[s].propagate(l)}}var h=95;r&&function(){var t=r("fs"),n=r("module"),o=r("path");s=o.relative,l=function(r,i,a){var l=r._node;if(1==l.options.dontLoad||l.options.dontLoad&&new RegExp(l.options.dontLoad).test(i)||l.options.load&&!new RegExp(l.options.load).test(i))return e.ANull;if(l.modules[i])return l.modules[i];var p={id:a,paths:n._nodeModulePaths(o.dirname(a))};try{var d=n._resolveFilename(i,p)}catch(u){return e.ANull}var h=c(d);return l.modules[h]?l.modules[h]:(t.existsSync(d)&&/^(\.js)?$/.test(o.extname(d))&&r.addFile(s(r.options.projectDir,d),null,l.currentOrigin),l.modules[h]=new e.AVal)}}(),e.registerFunction("nodeRequire",function(t,r,s){if(!s||!s.length||"Literal"!==s[0].type||"string"!=typeof s[0].value)return e.ANull;var i=e.cx(),c=i.parent,d=c._node,u=s[0].value,h=i.definitions.node;if(h[u]&&/^[a-z_]*$/.test(u))return h[u];var f=n.getResolved(u),m=u;if(f&&void 0!==f.file&&(m=f.file),!m&&u in d.modules)return d.modules[u];var g;if(d.options.modules&&d.options.modules.hasOwnProperty(u)){var b=a(i.topScope,u);e.def.load(d.options.modules[u],b),g=d.modules[u]=b.exports}else{u=m;var y=d.currentFile||p(c,s[0].sourceFile.name),v=/^\.{0,2}\//.test(u);if(v){if(!y)return s[0].required||e.ANull;u=o(y,u)}g=l(c,u,y)}return s[0].required=g}),t.registerPlugin("orionNode",function(e,t){return e._node={modules:Object.create(null),options:t||{},currentFile:null,currentOrigin:null,server:e},e.on("beforeLoad",function(t){this._node.currentFile=p(e,t.name),this._node.currentOrigin=t.name,t.scope=a(t.scope,this._node.currentOrigin,t.ast)}),e.on("afterLoad",function(e){var t=i(this._node,this._node.currentFile);t.origin=this._node.currentOrigin;var n=e.scope.exports;n&&n.propagate(t),this._node.currentFile=null,this._node.currentOrigin=null}),e.on("reset",function(){this._node.modules=Object.create(null)}),{defs:f,passes:{preCondenseReach:d,postLoadDef:u,postParse:function(t){n.doPostParse(e,t)},preInfer:function(){n.doPreInfer(e)}}}});var f={"!name":"node","!define":{require:{"!type":"fn(id: string) -> !custom:nodeRequire",resolve:{"!type":"fn() -> string","!url":"http://nodejs.org/api/globals.html#globals_require_resolve","!doc":"Use the internal require() machinery to look up the location of a module, but rather than loading the module, just return the resolved filename."},cache:{"!url":"http://nodejs.org/api/globals.html#globals_require_cache","!doc":"Modules are cached in this object when they are required. By deleting a key value from this object, the next require will reload the module."},extensions:{"!url":"http://nodejs.org/api/globals.html#globals_require_extensions","!doc":"Instruct require on how to handle certain file extensions."},"!url":"http://nodejs.org/api/globals.html#globals_require","!doc":"To require modules."},Module:{"!type":"fn()",prototype:{exports:{"!type":"?","!url":"http://nodejs.org/api/modules.html#modules_module_exports","!doc":"The exports object is created by the Module system. Sometimes this is not acceptable, many want their module to be an instance of some class. To do this assign the desired export object to module.exports. For example suppose we were making a module called a.js"},require:{"!type":"require","!url":"http://nodejs.org/api/modules.html#modules_module_require_id","!doc":"The module.require method provides a way to load a module as if require() was called from the original module."},id:{"!type":"string","!url":"http://nodejs.org/api/modules.html#modules_module_id","!doc":"The identifier for the module. Typically this is the fully resolved filename."},filename:{"!type":"string","!url":"http://nodejs.org/api/modules.html#modules_module_filename","!doc":"The fully resolved filename to the module."},loaded:{"!type":"bool","!url":"http://nodejs.org/api/modules.html#modules_module_loaded","!doc":"Whether or not the module is done loading, or is in the process of loading."},parent:{"!type":"+Module","!url":"http://nodejs.org/api/modules.html#modules_module_parent","!doc":"The module that required this one."},children:{"!type":"[+Module]","!url":"http://nodejs.org/api/modules.html#modules_module_children","!doc":"The module objects required by this one."}}},events:{EventEmitter:{prototype:{addListener:{"!type":"fn(event: string, listener: fn())","!url":"http://nodejs.org/api/events.html#events_emitter_addlistener_event_listener","!doc":"Adds a listener to the end of the listeners array for the specified event."},on:{"!type":"fn(event: string, listener: fn())","!url":"http://nodejs.org/api/events.html#events_emitter_on_event_listener","!doc":"Adds a listener to the end of the listeners array for the specified event."},once:{"!type":"fn(event: string, listener: fn())","!url":"http://nodejs.org/api/events.html#events_emitter_once_event_listener","!doc":"Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed."},removeListener:{"!type":"fn(event: string, listener: fn())","!url":"http://nodejs.org/api/events.html#events_emitter_removelistener_event_listener","!doc":"Remove a listener from the listener array for the specified event. Caution: changes array indices in the listener array behind the listener."},removeAllListeners:{"!type":"fn(event: string)","!url":"http://nodejs.org/api/events.html#events_emitter_removealllisteners_event","!doc":"Removes all listeners, or those of the specified event."},setMaxListeners:{"!type":"fn(n: number)","!url":"http://nodejs.org/api/events.html#events_emitter_setmaxlisteners_n","!doc":"By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that to be increased. Set to zero for unlimited."},listeners:{"!type":"fn(event: string) -> [fn()]","!url":"http://nodejs.org/api/events.html#events_emitter_listeners_event","!doc":"Returns an array of listeners for the specified event."},emit:{"!type":"fn(event: string)","!url":"http://nodejs.org/api/events.html#events_emitter_emit_event_arg1_arg2","!doc":"Execute each of the listeners in order with the supplied arguments."}},"!url":"http://nodejs.org/api/events.html#events_class_events_eventemitter","!doc":"To access the EventEmitter class, require('events').EventEmitter."}},stream:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",pipe:{"!type":"fn(destination: +stream.Writable, options?: ?)","!url":"http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options","!doc":"Connects this readable stream to destination WriteStream. Incoming data on this stream gets written to destination. Properly manages back-pressure so that a slow destination will not be overwhelmed by a fast readable stream."}},Writable:{"!type":"fn(options?: ?)",prototype:{"!proto":"stream.prototype",write:{"!type":"fn(chunk: +Buffer, encoding?: string, callback?: fn()) -> bool","!url":"http://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback_1","!doc":"Writes chunk to the stream. Returns true if the data has been flushed to the underlying resource. Returns false to indicate that the buffer is full, and the data will be sent out in the future. The 'drain' event will indicate when the buffer is empty again."},end:{"!type":"fn(chunk: +Buffer, encoding?: string, callback?: fn()) -> bool","!url":"http://nodejs.org/api/stream.html#stream_writable_end_chunk_encoding_callback","!doc":"Call this method to signal the end of the data being written to the stream."}},"!url":"http://nodejs.org/api/stream.html#stream_class_stream_writable","!doc":"A Writable Stream has the following methods, members, and events."},Readable:{"!type":"fn(options?: ?)",prototype:{"!proto":"stream.prototype",setEncoding:{"!type":"fn(encoding: string)","!url":"http://nodejs.org/api/stream.html#stream_readable_setencoding_encoding","!doc":"Makes the 'data' event emit a string instead of a Buffer. encoding can be 'utf8', 'utf16le' ('ucs2'), 'ascii', or 'hex'."},pause:{"!type":"fn()","!url":"http://nodejs.org/api/stream.html#stream_readable_pause","!doc":"Switches the readable stream into \"old mode\", where data is emitted using a 'data' event rather than being buffered for consumption via the read() method."},resume:{"!type":"fn()","!url":"http://nodejs.org/api/stream.html#stream_readable_resume","!doc":"Switches the readable stream into \"old mode\", where data is emitted using a 'data' event rather than being buffered for consumption via the read() method."},destroy:"fn()",unpipe:{"!type":"fn(dest?: +stream.Writable)","!url":"http://nodejs.org/api/stream.html#stream_readable_unpipe_destination","!doc":"Undo a previously established pipe(). If no destination is provided, then all previously established pipes are removed."},push:{"!type":"fn(chunk: +Buffer) -> bool","!url":"http://nodejs.org/api/stream.html#stream_readable_push_chunk","!doc":"Explicitly insert some data into the read queue. If called with null, will signal the end of the data."},unshift:{"!type":"fn(chunk: +Buffer) -> bool","!url":"http://nodejs.org/api/stream.html#stream_readable_unshift_chunk","!doc":"This is the corollary of readable.push(chunk). Rather than putting the data at the end of the read queue, it puts it at the front of the read queue."},wrap:{"!type":"fn(stream: ?) -> +stream.Readable","!url":"http://nodejs.org/api/stream.html#stream_readable_wrap_stream","!doc":"If you are using an older Node library that emits 'data' events and has a pause() method that is advisory only, then you can use the wrap() method to create a Readable stream that uses the old stream as its data source."},read:{"!type":"fn(size?: number) -> +Buffer","!url":"http://nodejs.org/api/stream.html#stream_readable_read_size_1","!doc":"Call this method to consume data once the 'readable' event is emitted."}},"!url":"http://nodejs.org/api/stream.html#stream_class_stream_readable","!doc":"A Readable Stream has the following methods, members, and events."},Duplex:{"!type":"fn(options?: ?)",prototype:{"!proto":"stream.Readable.prototype",write:"fn(chunk: +Buffer, encoding?: string, callback?: fn()) -> bool",end:"fn(chunk: +Buffer, encoding?: string, callback?: fn()) -> bool"},"!url":"http://nodejs.org/api/stream.html#stream_class_stream_duplex","!doc":'A "duplex" stream is one that is both Readable and Writable, such as a TCP socket connection.'},Transform:{"!type":"fn(options?: ?)",prototype:{"!proto":"stream.Duplex.prototype"},"!url":"http://nodejs.org/api/stream.html#stream_class_stream_transform","!doc":'A "transform" stream is a duplex stream where the output is causally connected in some way to the input, such as a zlib stream or a crypto stream.'},PassThrough:"stream.Transform","!url":"http://nodejs.org/api/stream.html#stream_stream","!doc":"A stream is an abstract interface implemented by various objects in Node. For example a request to an HTTP server is a stream, as is stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter"},querystring:{stringify:{"!type":"fn(obj: ?, sep?: string, eq?: string) -> string","!url":"http://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq","!doc":"Serialize an object to a query string. Optionally override the default separator ('&') and assignment ('=') characters."},parse:{"!type":"fn(str: string, sep?: string, eq?: string, options?: ?) -> ?","!url":"http://nodejs.org/api/querystring.html#querystring_querystring_parse_str_sep_eq_options","!doc":"Deserialize a query string to an object. Optionally override the default separator ('&') and assignment ('=') characters."},escape:{"!type":"fn(string) -> string","!url":"http://nodejs.org/api/querystring.html#querystring_querystring_escape","!doc":"The escape function used by querystring.stringify, provided so that it could be overridden if necessary."},unescape:{"!type":"fn(string) -> string","!url":"http://nodejs.org/api/querystring.html#querystring_querystring_unescape","!doc":"The unescape function used by querystring.parse, provided so that it could be overridden if necessary."}},http:{STATUS_CODES:{},createServer:{"!type":"fn(listener?: fn(request: +http.IncomingMessage, response: +http.ServerResponse)) -> +http.Server","!url":"http://nodejs.org/api/http.html#http_http_createserver_requestlistener","!doc":"Returns a new web server object."},Server:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",listen:{"!type":"fn(port: number, hostname?: string, backlog?: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback","!doc":"Begin accepting connections on the specified port and hostname. If the hostname is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY)."},close:{"!type":"fn(callback?: ?)","!url":"http://nodejs.org/api/http.html#http_server_close_callback","!doc":"Stops the server from accepting new connections."},maxHeadersCount:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_server_maxheaderscount","!doc":"Limits maximum incoming headers count, equal to 1000 by default. If set to 0 - no limit will be applied."},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_server_settimeout_msecs_callback","!doc":"Sets the timeout value for sockets, and emits a 'timeout' event on the Server object, passing the socket as an argument, if a timeout occurs."},timeout:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_server_timeout","!doc":"The number of milliseconds of inactivity before a socket is presumed to have timed out."}},"!url":"http://nodejs.org/api/http.html#http_class_http_server","!doc":"Class for HTTP server objects."},ServerResponse:{"!type":"fn()",prototype:{"!proto":"stream.Writable.prototype",writeContinue:{"!type":"fn()","!url":"http://nodejs.org/api/http.html#http_response_writecontinue","!doc":"Sends a HTTP/1.1 100 Continue message to the client, indicating that the request body should be sent."},writeHead:{"!type":"fn(statusCode: number, headers?: ?)","!url":"http://nodejs.org/api/http.html#http_response_writehead_statuscode_reasonphrase_headers","!doc":"Sends a response header to the request. The status code is a 3-digit HTTP status code, like 404. The last argument, headers, are the response headers. Optionally one can give a human-readable reasonPhrase as the second argument."},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_response_settimeout_msecs_callback","!doc":"Sets the Socket's timeout value to msecs. If a callback is provided, then it is added as a listener on the 'timeout' event on the response object."},statusCode:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_response_statuscode","!doc":"When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed."},setHeader:{"!type":"fn(name: string, value: string)","!url":"http://nodejs.org/api/http.html#http_response_setheader_name_value","!doc":"Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name."},headersSent:{"!type":"bool","!url":"http://nodejs.org/api/http.html#http_response_headerssent","!doc":"Boolean (read-only). True if headers were sent, false otherwise."},sendDate:{"!type":"bool","!url":"http://nodejs.org/api/http.html#http_response_senddate","!doc":"When true, the Date header will be automatically generated and sent in the response if it is not already present in the headers. Defaults to true."},getHeader:{"!type":"fn(name: string) -> string","!url":"http://nodejs.org/api/http.html#http_response_getheader_name","!doc":"Reads out a header that's already been queued but not sent to the client. Note that the name is case insensitive. This can only be called before headers get implicitly flushed."},removeHeader:{"!type":"fn(name: string)","!url":"http://nodejs.org/api/http.html#http_response_removeheader_name","!doc":"Removes a header that's queued for implicit sending."},addTrailers:{"!type":"fn(headers: ?)","!url":"http://nodejs.org/api/http.html#http_response_addtrailers_headers","!doc":"This method adds HTTP trailing headers (a header but at the end of the message) to the response."}},"!url":"http://nodejs.org/api/http.html#http_class_http_serverresponse","!doc":"This object is created internally by a HTTP server--not by the user. It is passed as the second parameter to the 'request' event."},request:{"!type":"fn(options: ?, callback?: fn(res: +http.IncomingMessage)) -> +http.ClientRequest","!url":"http://nodejs.org/api/http.html#http_http_request_options_callback","!doc":"Node maintains several connections per server to make HTTP requests. This function allows one to transparently issue requests."},get:{"!type":"fn(options: ?, callback?: fn(res: +http.IncomingMessage)) -> +http.ClientRequest","!url":"http://nodejs.org/api/http.html#http_http_get_options_callback","!doc":"Since most requests are GET requests without bodies, Node provides this convenience method. The only difference between this method and http.request() is that it sets the method to GET and calls req.end() automatically."},globalAgent:{"!type":"+http.Agent","!url":"http://nodejs.org/api/http.html#http_http_globalagent","!doc":"Global instance of Agent which is used as the default for all http client requests."},Agent:{"!type":"fn()",prototype:{maxSockets:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_agent_maxsockets","!doc":"By default set to 5. Determines how many concurrent sockets the agent can have open per host."},sockets:{"!type":"[+net.Socket]","!url":"http://nodejs.org/api/http.html#http_agent_sockets","!doc":"An object which contains arrays of sockets currently in use by the Agent. Do not modify."},requests:{"!type":"[+http.ClientRequest]","!url":"http://nodejs.org/api/http.html#http_agent_requests","!doc":"An object which contains queues of requests that have not yet been assigned to sockets. Do not modify."}},"!url":"http://nodejs.org/api/http.html#http_class_http_agent","!doc":"In node 0.5.3+ there is a new implementation of the HTTP Agent which is used for pooling sockets used in HTTP client requests."},ClientRequest:{"!type":"fn()",prototype:{"!proto":"stream.Writable.prototype",abort:{"!type":"fn()","!url":"http://nodejs.org/api/http.html#http_request_abort","!doc":"Aborts a request. (New since v0.3.8.)"},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_request_settimeout_timeout_callback","!doc":"Once a socket is assigned to this request and is connected socket.setTimeout() will be called."},setNoDelay:{"!type":"fn(noDelay?: fn())","!url":"http://nodejs.org/api/http.html#http_request_setnodelay_nodelay","!doc":"Once a socket is assigned to this request and is connected socket.setNoDelay() will be called."},setSocketKeepAlive:{"!type":"fn(enable?: bool, initialDelay?: number)","!url":"http://nodejs.org/api/http.html#http_request_setsocketkeepalive_enable_initialdelay","!doc":"Once a socket is assigned to this request and is connected socket.setKeepAlive() will be called."}},"!url":"http://nodejs.org/api/http.html#http_class_http_clientrequest","!doc":"This object is created internally and returned from http.request(). It represents an in-progress request whose header has already been queued. The header is still mutable using the setHeader(name, value), getHeader(name), removeHeader(name) API. The actual header will be sent along with the first data chunk or when closing the connection."},IncomingMessage:{"!type":"fn()",prototype:{"!proto":"stream.Readable.prototype",httpVersion:{"!type":"string","!url":"http://nodejs.org/api/http.html#http_message_httpversion","!doc":"In case of server request, the HTTP version sent by the client. In the case of client response, the HTTP version of the connected-to server. Probably either '1.1' or '1.0'."},headers:{"!type":"?","!url":"http://nodejs.org/api/http.html#http_message_headers","!doc":"The request/response headers object."},trailers:{"!type":"?","!url":"http://nodejs.org/api/http.html#http_message_trailers","!doc":"The request/response trailers object. Only populated after the 'end' event."},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_message_settimeout_msecs_callback","!doc":"Calls message.connection.setTimeout(msecs, callback)."},setEncoding:{"!type":"fn(encoding?: string)","!url":"http://nodejs.org/api/http.html#http_message_setencoding_encoding","!doc":"Set the encoding for data emitted by the 'data' event."},pause:{"!type":"fn()","!url":"http://nodejs.org/api/http.html#http_message_pause","!doc":"Pauses request/response from emitting events. Useful to throttle back a download."},resume:{"!type":"fn()","!url":"http://nodejs.org/api/http.html#http_message_resume","!doc":"Resumes a paused request/response."},method:{"!type":"string","!url":"http://nodejs.org/api/http.html#http_message_method","!doc":"Only valid for request obtained from http.Server."},url:{"!type":"string","!url":"http://nodejs.org/api/http.html#http_message_url","!doc":"Only valid for request obtained from http.Server."},statusCode:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_message_statuscode","!doc":"Only valid for response obtained from http.ClientRequest."},socket:{"!type":"+net.Socket","!url":"http://nodejs.org/api/http.html#http_message_socket","!doc":"The net.Socket object associated with the connection."}},"!url":"http://nodejs.org/api/http.html#http_http_incomingmessage","!doc":"An IncomingMessage object is created by http.Server or http.ClientRequest and passed as the first argument to the 'request' and 'response' event respectively. It may be used to access response status, headers and data."}},https:{Server:"http.Server",createServer:{"!type":"fn(listener?: fn(request: +http.IncomingMessage, response: +http.ServerResponse)) -> +https.Server","!url":"http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener","!doc":"Returns a new HTTPS web server object. The options is similar to tls.createServer(). The requestListener is a function which is automatically added to the 'request' event."},request:{"!type":"fn(options: ?, callback?: fn(res: +http.IncomingMessage)) -> +http.ClientRequest","!url":"http://nodejs.org/api/https.html#https_https_request_options_callback","!doc":"Makes a request to a secure web server."},get:{"!type":"fn(options: ?, callback?: fn(res: +http.IncomingMessage)) -> +http.ClientRequest","!url":"http://nodejs.org/api/https.html#https_https_get_options_callback","!doc":"Like http.get() but for HTTPS."},Agent:"http.Agent",globalAgent:"http.globalAgent"},cluster:{"!proto":"events.EventEmitter.prototype",settings:{exec:"string",args:"[string]",silent:"bool","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_settings","!doc":"All settings set by the .setupMaster is stored in this settings object. This object is not supposed to be changed or set manually, by you."},Worker:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",id:{"!type":"string","!url":"http://nodejs.org/api/cluster.html#cluster_worker_id","!doc":"Each new worker is given its own unique id, this id is stored in the id."},process:{"!type":"+child_process.ChildProcess","!url":"http://nodejs.org/api/cluster.html#cluster_worker_process","!doc":"All workers are created using child_process.fork(), the returned object from this function is stored in process."},suicide:{"!type":"bool","!url":"http://nodejs.org/api/cluster.html#cluster_worker_suicide","!doc":"This property is a boolean. It is set when a worker dies after calling .kill() or immediately after calling the .disconnect() method. Until then it is undefined."},send:{"!type":"fn(message: ?, sendHandle?: ?)","!url":"http://nodejs.org/api/cluster.html#cluster_worker_send_message_sendhandle","!doc":"This function is equal to the send methods provided by child_process.fork(). In the master you should use this function to send a message to a specific worker. However in a worker you can also use process.send(message), since this is the same function."},destroy:"fn()",disconnect:{"!type":"fn()","!url":"http://nodejs.org/api/cluster.html#cluster_worker_disconnect","!doc":"When calling this function the worker will no longer accept new connections, but they will be handled by any other listening worker. Existing connection will be allowed to exit as usual. When no more connections exist, the IPC channel to the worker will close allowing it to die graceful. When the IPC channel is closed the disconnect event will emit, this is then followed by the exit event, there is emitted when the worker finally die."},kill:{"!type":"fn(signal?: string)","!url":"http://nodejs.org/api/cluster.html#cluster_worker_kill_signal_sigterm","!doc":"This function will kill the worker, and inform the master to not spawn a new worker. The boolean suicide lets you distinguish between voluntary and accidental exit."}},"!url":"http://nodejs.org/api/cluster.html#cluster_class_worker","!doc":"A Worker object contains all public information and method about a worker. In the master it can be obtained using cluster.workers. In a worker it can be obtained using cluster.worker."},isMaster:{"!type":"bool","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_ismaster","!doc":"True if the process is a master. This is determined by the process.env.NODE_UNIQUE_ID. If process.env.NODE_UNIQUE_ID is undefined, then isMaster is true."},isWorker:{"!type":"bool","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_isworker","!doc":"This boolean flag is true if the process is a worker forked from a master. If the process.env.NODE_UNIQUE_ID is set to a value, then isWorker is true."},setupMaster:{"!type":"fn(settings?: cluster.settings)","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_setupmaster_settings","!doc":"setupMaster is used to change the default 'fork' behavior. The new settings are effective immediately and permanently, they cannot be changed later on."},fork:{"!type":"fn(env?: ?) -> +cluster.Worker","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_fork_env","!doc":"Spawn a new worker process. This can only be called from the master process."},disconnect:{"!type":"fn(callback?: fn())","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_disconnect_callback","!doc":"When calling this method, all workers will commit a graceful suicide. When they are disconnected all internal handlers will be closed, allowing the master process to die graceful if no other event is waiting."},worker:{"!type":"+cluster.Worker","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_worker","!doc":"A reference to the current worker object. Not available in the master process."},workers:{"!type":"[+cluster.Worker]","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_workers","!doc":"A hash that stores the active worker objects, keyed by id field. Makes it easy to loop through all the workers. It is only available in the master process."},"!url":"http://nodejs.org/api/cluster.html#cluster_cluster","!doc":"A single instance of Node runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node processes to handle the load."},zlib:{Zlib:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",flush:{"!type":"fn(callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_flush_callback","!doc":"Flush pending data. Don't call this frivolously, premature flushes negatively impact the effectiveness of the compression algorithm."},reset:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_reset","!doc":"Reset the compressor/decompressor to factory defaults. Only applicable to the inflate and deflate algorithms."}},"!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_zlib","!doc":"Not exported by the zlib module. It is documented here because it is the base class of the compressor/decompressor classes."},deflate:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_deflate_buf_callback","!doc":"Compress a string with Deflate."},deflateRaw:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_deflateraw_buf_callback","!doc":"Compress a string with DeflateRaw."},gzip:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_gzip_buf_callback","!doc":"Compress a string with Gzip."},gunzip:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_gunzip_buf_callback","!doc":"Decompress a raw Buffer with Gunzip."},inflate:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_inflate_buf_callback","!doc":"Decompress a raw Buffer with Inflate."},inflateRaw:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_inflateraw_buf_callback","!doc":"Decompress a raw Buffer with InflateRaw."},unzip:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_unzip_buf_callback","!doc":"Decompress a raw Buffer with Unzip."},Gzip:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_gzip","!doc":"Compress data using gzip.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createGzip:{"!type":"fn(options: ?) -> +zlib.Zlib","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_creategzip_options","!doc":"Returns a new Gzip object with an options."},Gunzip:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_gunzip","!doc":"Decompress a gzip stream.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createGunzip:{"!type":"fn(options: ?) -> +zlib.Gunzip","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_creategunzip_options","!doc":"Returns a new Gunzip object with an options."},Deflate:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_deflate","!doc":"Compress data using deflate.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createDeflate:{"!type":"fn(options: ?) -> +zlib.Deflate","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createdeflate_options","!doc":"Returns a new Deflate object with an options."},Inflate:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_inflate","!doc":"Decompress a deflate stream.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createInflate:{"!type":"fn(options: ?) -> +zlib.Inflate","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createinflate_options","!doc":"Returns a new Inflate object with an options."},InflateRaw:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_inflateraw","!doc":"Decompress a raw deflate stream.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createInflateRaw:{"!type":"fn(options: ?) -> +zlib.InflateRaw","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createinflateraw_options","!doc":"Returns a new InflateRaw object with an options."},DeflateRaw:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_deflateraw","!doc":"Compress data using deflate, and do not append a zlib header.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createDeflateRaw:{"!type":"fn(options: ?) -> +zlib.DeflateRaw","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createdeflateraw_options","!doc":"Returns a new DeflateRaw object with an options."},Unzip:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_unzip","!doc":"Decompress either a Gzip- or Deflate-compressed stream by auto-detecting the header.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createUnzip:{"!type":"fn(options: ?) -> +zlib.Unzip","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createunzip_options","!doc":"Returns a new Unzip object with an options."},Z_NO_FLUSH:"number",Z_PARTIAL_FLUSH:"number",Z_SYNC_FLUSH:"number",Z_FULL_FLUSH:"number",Z_FINISH:"number",Z_BLOCK:"number",Z_TREES:"number",Z_OK:"number",Z_STREAM_END:"number",Z_NEED_DICT:"number",Z_ERRNO:"number",Z_STREAM_ERROR:"number",Z_DATA_ERROR:"number",Z_MEM_ERROR:"number",Z_BUF_ERROR:"number",Z_VERSION_ERROR:"number",Z_NO_COMPRESSION:"number",Z_BEST_SPEED:"number",Z_BEST_COMPRESSION:"number",Z_DEFAULT_COMPRESSION:"number",Z_FILTERED:"number",Z_HUFFMAN_ONLY:"number",Z_RLE:"number",Z_FIXED:"number",Z_DEFAULT_STRATEGY:"number",Z_BINARY:"number",Z_TEXT:"number",Z_ASCII:"number",Z_UNKNOWN:"number",Z_DEFLATED:"number",Z_NULL:"number"},os:{tmpdir:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_tmpdir","!doc":"Returns the operating system's default directory for temp files."},endianness:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_endianness","!doc":'Returns the endianness of the CPU. Possible values are "BE" or "LE".'},hostname:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_hostname","!doc":"Returns the hostname of the operating system."},type:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_type","!doc":"Returns the operating system name."},platform:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_platform","!doc":"Returns the operating system platform."},arch:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_arch","!doc":"Returns the operating system CPU architecture."},release:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_release","!doc":"Returns the operating system release."},uptime:{"!type":"fn() -> number","!url":"http://nodejs.org/api/os.html#os_os_uptime","!doc":"Returns the system uptime in seconds."},loadavg:{"!type":"fn() -> [number]","!url":"http://nodejs.org/api/os.html#os_os_loadavg","!doc":"Returns an array containing the 1, 5, and 15 minute load averages."},totalmem:{"!type":"fn() -> number","!url":"http://nodejs.org/api/os.html#os_os_totalmem","!doc":"Returns the total amount of system memory in bytes."},freemem:{"!type":"fn() -> number","!url":"http://nodejs.org/api/os.html#os_os_freemem","!doc":"Returns the amount of free system memory in bytes."},cpus:{"!type":"fn() -> [os.cpuSpec]","!url":"http://nodejs.org/api/os.html#os_os_cpus","!doc":"Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq)."},networkInterfaces:{"!type":"fn() -> ?","!url":"http://nodejs.org/api/os.html#os_os_networkinterfaces","!doc":"Get a list of network interfaces."},EOL:{"!type":"string","!url":"http://nodejs.org/api/os.html#os_os_eol","!doc":"A constant defining the appropriate End-of-line marker for the operating system."}},punycode:{decode:{"!type":"fn(string: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_decode_string","!doc":"Converts a Punycode string of ASCII code points to a string of Unicode code points."},encode:{"!type":"fn(string: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_encode_string","!doc":"Converts a string of Unicode code points to a Punycode string of ASCII code points."},toUnicode:{"!type":"fn(domain: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_tounicode_domain","!doc":"Converts a Punycode string representing a domain name to Unicode. Only the Punycoded parts of the domain name will be converted, i.e. it doesn't matter if you call it on a string that has already been converted to Unicode."},toASCII:{"!type":"fn(domain: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_toascii_domain","!doc":"Converts a Unicode string representing a domain name to Punycode. Only the non-ASCII parts of the domain name will be converted, i.e. it doesn't matter if you call it with a domain that's already in ASCII."},ucs2:{decode:{"!type":"fn(string: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_ucs2_decode_string","!doc":"Creates an array containing the decimal code points of each Unicode character in the string. While JavaScript uses UCS-2 internally, this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16."},encode:{"!type":"fn(codePoints: [number]) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_ucs2_encode_codepoints","!doc":"Creates a string based on an array of decimal code points."}},version:{"!type":"?","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_version","!doc":"A string representing the current Punycode.js version number."}},repl:{start:{"!type":"fn(options: ?) -> +events.EventEmitter","!url":"http://nodejs.org/api/repl.html#repl_repl_start_options","!doc":"Returns and starts a REPLServer instance."}},readline:{createInterface:{"!type":"fn(options: ?) -> +readline.Interface","!url":"http://nodejs.org/api/readline.html#readline_readline_createinterface_options","!doc":"Creates a readline Interface instance."},Interface:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",setPrompt:{"!type":"fn(prompt: string, length: number)","!url":"http://nodejs.org/api/readline.html#readline_rl_setprompt_prompt_length","!doc":"Sets the prompt, for example when you run node on the command line, you see > , which is node's prompt."},prompt:{"!type":"fn(preserveCursor?: bool)","!url":"http://nodejs.org/api/readline.html#readline_rl_prompt_preservecursor","!doc":"Readies readline for input from the user, putting the current setPrompt options on a new line, giving the user a new spot to write. Set preserveCursor to true to prevent the cursor placement being reset to 0."},question:{"!type":"fn(query: string, callback: fn())","!url":"http://nodejs.org/api/readline.html#readline_rl_question_query_callback","!doc":"Prepends the prompt with query and invokes callback with the user's response. Displays the query to the user, and then invokes callback with the user's response after it has been typed."},pause:{"!type":"fn()","!url":"http://nodejs.org/api/readline.html#readline_rl_pause","!doc":"Pauses the readline input stream, allowing it to be resumed later if needed."},resume:{"!type":"fn()","!url":"http://nodejs.org/api/readline.html#readline_rl_resume","!doc":"Resumes the readline input stream."},close:{"!type":"fn()","!url":"http://nodejs.org/api/readline.html#readline_rl_close","!doc":'Closes the Interface instance, relinquishing control on the input and output streams. The "close" event will also be emitted.'},write:{"!type":"fn(data: ?, key?: ?)","!url":"http://nodejs.org/api/readline.html#readline_rl_write_data_key","!doc":"Writes data to output stream. key is an object literal to represent a key sequence; available if the terminal is a TTY."}},"!url":"http://nodejs.org/api/readline.html#readline_class_interface","!doc":"The class that represents a readline interface with an input and output stream."}},vm:{createContext:{"!type":"fn(initSandbox?: ?) -> ?","!url":"http://nodejs.org/api/vm.html#vm_vm_createcontext_initsandbox","!doc":"vm.createContext creates a new context which is suitable for use as the 2nd argument of a subsequent call to vm.runInContext. A (V8) context comprises a global object together with a set of build-in objects and functions. The optional argument initSandbox will be shallow-copied to seed the initial contents of the global object used by the context."},Script:{"!type":"fn()",prototype:{runInThisContext:{"!type":"fn()","!url":"http://nodejs.org/api/vm.html#vm_script_runinthiscontext","!doc":"Similar to vm.runInThisContext but a method of a precompiled Script object. script.runInThisContext runs the code of script and returns the result. Running code does not have access to local scope, but does have access to the global object (v8: in actual context)."},runInNewContext:{"!type":"fn(sandbox?: ?)","!url":"http://nodejs.org/api/vm.html#vm_script_runinnewcontext_sandbox","!doc":"Similar to vm.runInNewContext a method of a precompiled Script object. script.runInNewContext runs the code of script with sandbox as the global object and returns the result. Running code does not have access to local scope. sandbox is optional."}},"!url":"http://nodejs.org/api/vm.html#vm_class_script","!doc":"A class for running scripts. Returned by vm.createScript."},runInThisContext:{"!type":"fn(code: string, filename?: string)","!url":"http://nodejs.org/api/vm.html#vm_vm_runinthiscontext_code_filename","!doc":"vm.runInThisContext() compiles code, runs it and returns the result. Running code does not have access to local scope. filename is optional, it's used only in stack traces."},runInNewContext:{"!type":"fn(code: string, sandbox?: ?, filename?: string)","!url":"http://nodejs.org/api/vm.html#vm_vm_runinnewcontext_code_sandbox_filename","!doc":"vm.runInNewContext compiles code, then runs it in sandbox and returns the result. Running code does not have access to local scope. The object sandbox will be used as the global object for code. sandbox and filename are optional, filename is only used in stack traces."},runInContext:{"!type":"fn(code: string, context: ?, filename?: string)","!url":"http://nodejs.org/api/vm.html#vm_vm_runincontext_code_context_filename","!doc":"vm.runInContext compiles code, then runs it in context and returns the result. A (V8) context comprises a global object, together with a set of built-in objects and functions. Running code does not have access to local scope and the global object held within context will be used as the global object for code. filename is optional, it's used only in stack traces."},createScript:{"!type":"fn(code: string, filename?: string) -> +vm.Script","!url":"http://nodejs.org/api/vm.html#vm_vm_createscript_code_filename","!doc":"createScript compiles code but does not run it. Instead, it returns a vm.Script object representing this compiled code. This script can be run later many times using methods below. The returned script is not bound to any global object. It is bound before each run, just for that run. filename is optional, it's only used in stack traces."}},child_process:{ChildProcess:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",stdin:{"!type":"+stream.Writable","!url":"http://nodejs.org/api/child_process.html#child_process_child_stdin","!doc":"A Writable Stream that represents the child process's stdin. Closing this stream via end() often causes the child process to terminate."},stdout:{"!type":"+stream.Readable","!url":"http://nodejs.org/api/child_process.html#child_process_child_stdout","!doc":"A Readable Stream that represents the child process's stdout."},stderr:{"!type":"+stream.Readable","!url":"http://nodejs.org/api/child_process.html#child_process_child_stderr","!doc":"A Readable Stream that represents the child process's stderr."},pid:{"!type":"number","!url":"http://nodejs.org/api/child_process.html#child_process_child_pid","!doc":"The PID of the child process."},kill:{"!type":"fn(signal?: string)","!url":"http://nodejs.org/api/child_process.html#child_process_child_kill_signal","!doc":"Send a signal to the child process. If no argument is given, the process will be sent 'SIGTERM'."},send:{"!type":"fn(message: ?, sendHandle?: ?)","!url":"http://nodejs.org/api/child_process.html#child_process_child_send_message_sendhandle","!doc":"When using child_process.fork() you can write to the child using child.send(message, [sendHandle]) and messages are received by a 'message' event on the child."},disconnect:{"!type":"fn()","!url":"http://nodejs.org/api/child_process.html#child_process_child_disconnect","!doc":"To close the IPC connection between parent and child use the child.disconnect() method. This allows the child to exit gracefully since there is no IPC channel keeping it alive. When calling this method the disconnect event will be emitted in both parent and child, and the connected flag will be set to false. Please note that you can also call process.disconnect() in the child process."}},"!url":"http://nodejs.org/api/child_process.html#child_process_class_childprocess","!doc":"ChildProcess is an EventEmitter."},spawn:{"!type":"fn(command: string, args?: [string], options?: ?) -> +child_process.ChildProcess","!url":"http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options","!doc":"Launches a new process with the given command, with command line arguments in args. If omitted, args defaults to an empty Array."},exec:{"!type":"fn(command: string, callback: fn(error: ?, stdout: +Buffer, stderr: +Buffer)) -> +child_process.ChildProcess","!url":"http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback","!doc":"Runs a command in a shell and buffers the output."},execFile:{"!type":"fn(file: string, args: [string], options: ?, callback: fn(error: ?, stdout: +Buffer, stderr: +Buffer)) -> +child_process.ChildProcess","!url":"http://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback","!doc":"This is similar to child_process.exec() except it does not execute a subshell but rather the specified file directly. This makes it slightly leaner than child_process.exec. It has the same options."},fork:{"!type":"fn(modulePath: string, args?: [string], options?: ?) -> +child_process.ChildProcess","!url":"http://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options","!doc":"This is a special case of the spawn() functionality for spawning Node processes. In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication channel built-in."}},url:{parse:{"!type":"fn(urlStr: string, parseQueryString?: bool, slashesDenoteHost?: bool) -> url.type","!url":"http://nodejs.org/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost","!doc":"Take a URL string, and return an object."},format:{"!type":"fn(url: url.type) -> string","!url":"http://nodejs.org/api/url.html#url_url_format_urlobj","!doc":"Take a parsed URL object, and return a formatted URL string."},resolve:{"!type":"fn(from: string, to: string) -> string","!url":"http://nodejs.org/api/url.html#url_url_resolve_from_to","!doc":"Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag."}},dns:{lookup:{"!type":"fn(domain: string, callback: fn(err: +Error, address: string, family: number)) -> string","!url":"http://nodejs.org/api/dns.html#dns_dns_lookup_domain_family_callback","!doc":"Resolves a domain (e.g. 'google.com') into the first found A (IPv4) or AAAA (IPv6) record. The family can be the integer 4 or 6. Defaults to null that indicates both Ip v4 and v6 address family."},resolve:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolve_domain_rrtype_callback","!doc":"Resolves a domain (e.g. 'google.com') into an array of the record types specified by rrtype. Valid rrtypes are 'A' (IPV4 addresses, default), 'AAAA' (IPV6 addresses), 'MX' (mail exchange records), 'TXT' (text records), 'SRV' (SRV records), 'PTR' (used for reverse IP lookups), 'NS' (name server records) and 'CNAME' (canonical name records)."},resolve4:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolve4_domain_callback","!doc":"The same as dns.resolve(), but only for IPv4 queries (A records). addresses is an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106'])."},resolve6:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolve6_domain_callback","!doc":"The same as dns.resolve4() except for IPv6 queries (an AAAA query)."},resolveMx:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvemx_domain_callback","!doc":"The same as dns.resolve(), but only for mail exchange queries (MX records)."},resolveTxt:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvetxt_domain_callback","!doc":"The same as dns.resolve(), but only for text queries (TXT records). addresses is an array of the text records available for domain (e.g., ['v=spf1 ip4:0.0.0.0 ~all'])."},resolveSrv:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvesrv_domain_callback","!doc":"The same as dns.resolve(), but only for service records (SRV records). addresses is an array of the SRV records available for domain. Properties of SRV records are priority, weight, port, and name (e.g., [{'priority': 10, {'weight': 5, 'port': 21223, 'name': 'service.example.com'}, ...])."},resolveNs:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvens_domain_callback","!doc":"The same as dns.resolve(), but only for name server records (NS records). addresses is an array of the name server records available for domain (e.g., ['ns1.example.com', 'ns2.example.com'])."},resolveCname:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvecname_domain_callback","!doc":"The same as dns.resolve(), but only for canonical name records (CNAME records). addresses is an array of the canonical name records available for domain (e.g., ['bar.example.com'])."},reverse:{"!type":"fn(ip: string, callback: fn(err: +Error, domains: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_reverse_ip_callback","!doc":"Reverse resolves an ip address to an array of domain names."}},net:{createServer:{"!type":"fn(options?: ?, connectionListener?: fn(socket: +net.Socket)) -> +net.Server","!url":"http://nodejs.org/api/net.html#net_net_createserver_options_connectionlistener","!doc":"Creates a new TCP server. The connectionListener argument is automatically set as a listener for the 'connection' event."},Server:{"!type":"fn()",prototype:{"!proto":"net.Socket.prototype",listen:{"!type":"fn(port: number, hostname?: string, backlog?: number, callback?: fn())","!url":"http://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback","!doc":"Begin accepting connections on the specified port and host. If the host is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). A port value of zero will assign a random port."},close:{"!type":"fn(callback?: fn())","!url":"http://nodejs.org/api/net.html#net_server_close_callback","!doc":"Stops the server from accepting new connections and keeps existing connections. This function is asynchronous, the server is finally closed when all connections are ended and the server emits a 'close' event. Optionally, you can pass a callback to listen for the 'close' event."},maxConnections:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_server_maxconnections","!doc":"Set this property to reject connections when the server's connection count gets high."},getConnections:{"!type":"fn(callback: fn(err: +Error, count: number))","!url":"http://nodejs.org/api/net.html#net_server_getconnections_callback","!doc":"Asynchronously get the number of concurrent connections on the server. Works when sockets were sent to forks."}},"!url":"http://nodejs.org/api/net.html#net_class_net_server","!doc":"This class is used to create a TCP or UNIX server. A server is a net.Socket that can listen for new incoming connections."},Socket:{"!type":"fn(options: ?)",prototype:{"!proto":"events.EventEmitter.prototype",connect:{"!type":"fn(port: number, host?: string, connectionListener?: fn())","!url":"http://nodejs.org/api/net.html#net_socket_connect_port_host_connectlistener","!doc":"Opens the connection for a given socket. If port and host are given, then the socket will be opened as a TCP socket, if host is omitted, localhost will be assumed. If a path is given, the socket will be opened as a unix socket to that path."},bufferSize:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_buffersize","!doc":"net.Socket has the property that socket.write() always works. This is to help users get up and running quickly. The computer cannot always keep up with the amount of data that is written to a socket - the network connection simply might be too slow. Node will internally queue up the data written to a socket and send it out over the wire when it is possible. (Internally it is polling on the socket's file descriptor for being writable)."},setEncoding:{"!type":"fn(encoding?: string)","!url":"http://nodejs.org/api/net.html#net_socket_setencoding_encoding","!doc":"Set the encoding for the socket as a Readable Stream."},write:{"!type":"fn(data: +Buffer, encoding?: string, callback?: fn())","!url":"http://nodejs.org/api/net.html#net_socket_write_data_encoding_callback","!doc":"Sends data on the socket. The second parameter specifies the encoding in the case of a string--it defaults to UTF8 encoding."},end:{"!type":"fn(data?: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/net.html#net_socket_end_data_encoding","!doc":"Half-closes the socket. i.e., it sends a FIN packet. It is possible the server will still send some data."},destroy:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_destroy","!doc":"Ensures that no more I/O activity happens on this socket. Only necessary in case of errors (parse error or so)."},pause:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_pause","!doc":"Pauses the reading of data. That is, 'data' events will not be emitted. Useful to throttle back an upload."},resume:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_resume","!doc":"Resumes reading after a call to pause()."},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback","!doc":"Sets the socket to timeout after timeout milliseconds of inactivity on the socket. By default net.Socket do not have a timeout."},setKeepAlive:{"!type":"fn(enable?: bool, initialDelay?: number)","!url":"http://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay","!doc":"Enable/disable keep-alive functionality, and optionally set the initial delay before the first keepalive probe is sent on an idle socket. enable defaults to false."},address:{"!type":"fn() -> net.address","!url":"http://nodejs.org/api/net.html#net_socket_address","!doc":"Returns the bound address, the address family name and port of the socket as reported by the operating system. Returns an object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }"},unref:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_unref","!doc":"Calling unref on a socket will allow the program to exit if this is the only active socket in the event system. If the socket is already unrefd calling unref again will have no effect."},ref:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_ref","!doc":"Opposite of unref, calling ref on a previously unrefd socket will not let the program exit if it's the only socket left (the default behavior). If the socket is refd calling ref again will have no effect."},remoteAddress:{"!type":"string","!url":"http://nodejs.org/api/net.html#net_socket_remoteaddress","!doc":"The string representation of the remote IP address. For example, '74.125.127.100' or '2001:4860:a005::68'."},remotePort:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_remoteport","!doc":"The numeric representation of the remote port. For example, 80 or 21."},localPort:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_localport","!doc":"The numeric representation of the local port. For example, 80 or 21."},bytesRead:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_bytesread","!doc":"The amount of received bytes."},bytesWritten:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_byteswritten","!doc":"The amount of bytes sent."},setNoDelay:{"!type":"fn(noDelay?: fn())","!url":"http://nodejs.org/api/net.html#net_socket_setnodelay_nodelay","!doc":"Disables the Nagle algorithm. By default TCP connections use the Nagle algorithm, they buffer data before sending it off. Setting true for noDelay will immediately fire off data each time socket.write() is called. noDelay defaults to true."},localAddress:{"!type":"string","!url":"http://nodejs.org/api/net.html#net_socket_localaddress","!doc":"The string representation of the local IP address the remote client is connecting on. For example, if you are listening on '0.0.0.0' and the client connects on '192.168.1.1', the value would be '192.168.1.1'."}},"!url":"http://nodejs.org/api/net.html#net_class_net_socket","!doc":"This object is an abstraction of a TCP or UNIX socket. net.Socket instances implement a duplex Stream interface. They can be created by the user and used as a client (with connect()) or they can be created by Node and passed to the user through the 'connection' event of a server."},connect:{"!type":"fn(options: ?, connectionListener?: fn()) -> +net.Socket","!url":"http://nodejs.org/api/net.html#net_net_connect_options_connectionlistener","!doc":"Constructs a new socket object and opens the socket to the given location. When the socket is established, the 'connect' event will be emitted."},createConnection:{"!type":"fn(options: ?, connectionListener?: fn()) -> +net.Socket","!url":"http://nodejs.org/api/net.html#net_net_createconnection_options_connectionlistener","!doc":"Constructs a new socket object and opens the socket to the given location. When the socket is established, the 'connect' event will be emitted."},isIP:{"!type":"fn(input: string) -> number","!url":"http://nodejs.org/api/net.html#net_net_isip_input","!doc":"Tests if input is an IP address. Returns 0 for invalid strings, returns 4 for IP version 4 addresses, and returns 6 for IP version 6 addresses."},isIPv4:{"!type":"fn(input: string) -> bool","!url":"http://nodejs.org/api/net.html#net_net_isipv4_input","!doc":"Returns true if input is a version 4 IP address, otherwise returns false."},isIPv6:{"!type":"fn(input: string) -> bool","!url":"http://nodejs.org/api/net.html#net_net_isipv6_input","!doc":"Returns true if input is a version 6 IP address, otherwise returns false."}},dgram:{createSocket:{"!type":"fn(type: string, callback?: fn()) -> +dgram.Socket","!url":"http://nodejs.org/api/dgram.html#dgram_dgram_createsocket_type_callback","!doc":"Creates a datagram Socket of the specified types. Valid types are udp4 and udp6."},Socket:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",send:{"!type":"fn(buf: +Buffer, offset: number, length: number, port: number, address: string, callback?: fn())","!url":"http://nodejs.org/api/dgram.html#dgram_socket_send_buf_offset_length_port_address_callback","!doc":"For UDP sockets, the destination port and IP address must be specified. A string may be supplied for the address parameter, and it will be resolved with DNS. An optional callback may be specified to detect any DNS errors and when buf may be re-used. Note that DNS lookups will delay the time that a send takes place, at least until the next tick. The only way to know for sure that a send has taken place is to use the callback."},bind:{"!type":"fn(port: number, address?: string)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_bind_port_address_callback","!doc":"For UDP sockets, listen for datagrams on a named port and optional address. If address is not specified, the OS will try to listen on all addresses."},close:{"!type":"fn()","!url":"http://nodejs.org/api/dgram.html#dgram_socket_close","!doc":"Close the underlying socket and stop listening for data on it."},address:{address:"string",family:"string",port:"number","!url":"http://nodejs.org/api/dgram.html#dgram_socket_address","!doc":"Returns an object containing the address information for a socket. For UDP sockets, this object will contain address , family and port."},setBroadcast:{"!type":"fn(flag: bool)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_setbroadcast_flag","!doc":"Sets or clears the SO_BROADCAST socket option. When this option is set, UDP packets may be sent to a local interface's broadcast address."},setTTL:{"!type":"fn(ttl: number)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_setttl_ttl","!doc":'Sets the IP_TTL socket option. TTL stands for "Time to Live," but in this context it specifies the number of IP hops that a packet is allowed to go through. Each router or gateway that forwards a packet decrements the TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. Changing TTL values is typically done for network probes or when multicasting.'},setMulticastTTL:{"!type":"fn(ttl: number)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_setmulticastttl_ttl","!doc":'Sets the IP_MULTICAST_TTL socket option. TTL stands for "Time to Live," but in this context it specifies the number of IP hops that a packet is allowed to go through, specifically for multicast traffic. Each router or gateway that forwards a packet decrements the TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.'},setMulticastLoopback:{"!type":"fn(flag: bool)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_setmulticastloopback_flag","!doc":"Sets or clears the IP_MULTICAST_LOOP socket option. When this option is set, multicast packets will also be received on the local interface."},addMembership:{"!type":"fn(multicastAddress: string, multicastInterface?: string)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_addmembership_multicastaddress_multicastinterface","!doc":"Tells the kernel to join a multicast group with IP_ADD_MEMBERSHIP socket option."},dropMembership:{"!type":"fn(multicastAddress: string, multicastInterface?: string)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_dropmembership_multicastaddress_multicastinterface","!doc":"Opposite of addMembership - tells the kernel to leave a multicast group with IP_DROP_MEMBERSHIP socket option. This is automatically called by the kernel when the socket is closed or process terminates, so most apps will never need to call this."}},"!url":"http://nodejs.org/api/dgram.html#dgram_class_dgram_socket","!doc":"The dgram Socket class encapsulates the datagram functionality. It should be created via dgram.createSocket(type, [callback])."}},fs:{rename:{"!type":"fn(oldPath: string, newPath: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_rename_oldpath_newpath_callback","!doc":"Asynchronous rename(2). No arguments other than a possible exception are given to the completion callback."},renameSync:{"!type":"fn(oldPath: string, newPath: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_renamesync_oldpath_newpath","!doc":"Synchronous rename(2)."},ftruncate:{"!type":"fn(fd: number, len: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_ftruncate_fd_len_callback","!doc":"Asynchronous ftruncate(2). No arguments other than a possible exception are given to the completion callback."},ftruncateSync:{"!type":"fn(fd: number, len: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_ftruncatesync_fd_len","!doc":"Synchronous ftruncate(2)."},truncate:{"!type":"fn(path: string, len: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_truncate_path_len_callback","!doc":"Asynchronous truncate(2). No arguments other than a possible exception are given to the completion callback."},truncateSync:{"!type":"fn(path: string, len: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_truncatesync_path_len","!doc":"Synchronous truncate(2)."},chown:{"!type":"fn(path: string, uid: number, gid: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_chown_path_uid_gid_callback","!doc":"Asynchronous chown(2). No arguments other than a possible exception are given to the completion callback."},chownSync:{"!type":"fn(path: string, uid: number, gid: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_chownsync_path_uid_gid","!doc":"Synchronous chown(2)."},fchown:{"!type":"fn(fd: number, uid: number, gid: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_fchown_fd_uid_gid_callback","!doc":"Asynchronous fchown(2). No arguments other than a possible exception are given to the completion callback."},fchownSync:{"!type":"fn(fd: number, uid: number, gid: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_fchownsync_fd_uid_gid","!doc":"Synchronous fchown(2)."},lchown:{"!type":"fn(path: string, uid: number, gid: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_lchown_path_uid_gid_callback","!doc":"Asynchronous lchown(2). No arguments other than a possible exception are given to the completion callback."},lchownSync:{"!type":"fn(path: string, uid: number, gid: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_lchownsync_path_uid_gid","!doc":"Synchronous lchown(2)."},chmod:{"!type":"fn(path: string, mode: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback","!doc":"Asynchronous chmod(2). No arguments other than a possible exception are given to the completion callback."},chmodSync:{"!type":"fn(path: string, mode: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_chmodsync_path_mode","!doc":"Synchronous chmod(2)."},fchmod:{"!type":"fn(fd: number, mode: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_fchmod_fd_mode_callback","!doc":"Asynchronous fchmod(2). No arguments other than a possible exception are given to the completion callback."},fchmodSync:{"!type":"fn(fd: number, mode: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_fchmodsync_fd_mode","!doc":"Synchronous fchmod(2)."},lchmod:{"!type":"fn(path: string, mode: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_lchmod_path_mode_callback","!doc":"Asynchronous lchmod(2). No arguments other than a possible exception are given to the completion callback."},lchmodSync:{"!type":"fn(path: string, mode: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_lchmodsync_path_mode","!doc":"Synchronous lchmod(2)."},stat:{"!type":"fn(path: string, callback?: fn(err: +Error, stats: +fs.Stats) -> ?) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_stat_path_callback","!doc":"Asynchronous stat(2). The callback gets two arguments (err, stats) where stats is a fs.Stats object."},lstat:{"!type":"fn(path: string, callback?: fn(err: +Error, stats: +fs.Stats) -> ?) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_lstat_path_callback","!doc":"Asynchronous lstat(2). The callback gets two arguments (err, stats) where stats is a fs.Stats object. lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is stat-ed, not the file that it refers to."},fstat:{"!type":"fn(fd: number, callback?: fn(err: +Error, stats: +fs.Stats) -> ?) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_fstat_fd_callback","!doc":"Asynchronous fstat(2). The callback gets two arguments (err, stats) where stats is a fs.Stats object. fstat() is identical to stat(), except that the file to be stat-ed is specified by the file descriptor fd."},statSync:{"!type":"fn(path: string) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_statsync_path","!doc":"Synchronous stat(2). Returns an instance of fs.Stats."},lstatSync:{"!type":"fn(path: string) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_lstatsync_path","!doc":"Synchronous lstat(2). Returns an instance of fs.Stats."},fstatSync:{"!type":"fn(fd: number) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_fstatsync_fd","!doc":"Synchronous fstat(2). Returns an instance of fs.Stats."},link:{"!type":"fn(srcpath: string, dstpath: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_link_srcpath_dstpath_callback","!doc":"Asynchronous link(2). No arguments other than a possible exception are given to the completion callback."},linkSync:{"!type":"fn(srcpath: string, dstpath: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_linksync_srcpath_dstpath","!doc":"Synchronous link(2)."},symlink:{"!type":"fn(srcpath: string, dstpath: string, type?: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_symlink_srcpath_dstpath_type_callback","!doc":"Asynchronous symlink(2). No arguments other than a possible exception are given to the completion callback. type argument can be either 'dir', 'file', or 'junction' (default is 'file'). It is only used on Windows (ignored on other platforms). Note that Windows junction points require the destination path to be absolute. When using 'junction', the destination argument will automatically be normalized to absolute path."},symlinkSync:{"!type":"fn(srcpath: string, dstpath: string, type?: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_symlinksync_srcpath_dstpath_type","!doc":"Synchronous symlink(2)."},readlink:{"!type":"fn(path: string, callback?: fn(err: +Error, linkString: string))","!url":"http://nodejs.org/api/fs.html#fs_fs_readlink_path_callback","!doc":"Asynchronous readlink(2). The callback gets two arguments (err, linkString)."},readlinkSync:{"!type":"fn(path: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_readlinksync_path","!doc":"Synchronous readlink(2). Returns the symbolic link's string value."},realpath:{"!type":"fn(path: string, cache: string, callback: fn(err: +Error, resolvedPath: string))","!url":"http://nodejs.org/api/fs.html#fs_fs_realpath_path_cache_callback","!doc":"Asynchronous realpath(2). The callback gets two arguments (err, resolvedPath). May use process.cwd to resolve relative paths. cache is an object literal of mapped paths that can be used to force a specific path resolution or avoid additional fs.stat calls for known real paths."},realpathSync:{"!type":"fn(path: string, cache?: bool) -> string","!url":"http://nodejs.org/api/fs.html#fs_fs_realpathsync_path_cache","!doc":"Synchronous realpath(2). Returns the resolved path."},unlink:{"!type":"fn(path: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_unlink_path_callback","!doc":"Asynchronous unlink(2). No arguments other than a possible exception are given to the completion callback."},unlinkSync:{"!type":"fn(path: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_unlinksync_path","!doc":"Synchronous unlink(2)."},rmdir:{"!type":"fn(path: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_rmdir_path_callback","!doc":"Asynchronous rmdir(2). No arguments other than a possible exception are given to the completion callback."},rmdirSync:{"!type":"fn(path: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_rmdirsync_path","!doc":"Synchronous rmdir(2)."},mkdir:{"!type":"fn(path: string, mode?: ?, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback","!doc":"Asynchronous mkdir(2). No arguments other than a possible exception are given to the completion callback. mode defaults to 0777."},mkdirSync:{"!type":"fn(path: string, mode?: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_mkdirsync_path_mode","!doc":"Synchronous mkdir(2)."},readdir:{"!type":"fn(path: string, callback?: fn(err: +Error, files: [string]))","!url":"http://nodejs.org/api/fs.html#fs_fs_readdir_path_callback","!doc":"Asynchronous readdir(3). Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'."},readdirSync:{"!type":"fn(path: string) -> [string]","!url":"http://nodejs.org/api/fs.html#fs_fs_readdirsync_path","!doc":"Synchronous readdir(3). Returns an array of filenames excluding '.' and '..'."},close:{"!type":"fn(fd: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_close_fd_callback","!doc":"Asynchronous close(2). No arguments other than a possible exception are given to the completion callback."},closeSync:{"!type":"fn(fd: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_closesync_fd","!doc":"Synchronous close(2)."},open:{"!type":"fn(path: string, flags: string, mode?: string, callback?: fn(err: +Error, fd: number))","!url":"http://nodejs.org/api/fs.html#fs_fs_open_path_flags_mode_callback","!doc":"Asynchronous file open."},openSync:{"!type":"fn(path: string, flags: string, mode?: string) -> number","!url":"http://nodejs.org/api/fs.html#fs_fs_opensync_path_flags_mode","!doc":"Synchronous open(2)."},utimes:{"!type":"fn(path: string, atime: number, mtime: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_utimes_path_atime_mtime_callback","!doc":"Change file timestamps of the file referenced by the supplied path."},utimesSync:{"!type":"fn(path: string, atime: number, mtime: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_utimessync_path_atime_mtime","!doc":"Change file timestamps of the file referenced by the supplied path."},futimes:{"!type":"fn(fd: number, atime: number, mtime: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_futimes_fd_atime_mtime_callback","!doc":"Change the file timestamps of a file referenced by the supplied file descriptor."},futimesSync:{"!type":"fn(fd: number, atime: number, mtime: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_futimessync_fd_atime_mtime","!doc":"Change the file timestamps of a file referenced by the supplied file descriptor."},fsync:{"!type":"fn(fd: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_fsync_fd_callback","!doc":"Asynchronous fsync(2). No arguments other than a possible exception are given to the completion callback."},fsyncSync:{"!type":"fn(fd: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_fsyncsync_fd","!doc":"Synchronous fsync(2)."},write:{"!type":"fn(fd: number, buffer: +Buffer, offset: number, length: number, position: number, callback?: fn(err: +Error, written: number, buffer: +Buffer))","!url":"http://nodejs.org/api/fs.html#fs_fs_write_fd_buffer_offset_length_position_callback","!doc":"Write buffer to the file specified by fd."},writeSync:{"!type":"fn(fd: number, buffer: +Buffer, offset: number, length: number, position: number) -> number","!url":"http://nodejs.org/api/fs.html#fs_fs_writesync_fd_buffer_offset_length_position","!doc":"Synchronous version of fs.write(). Returns the number of bytes written."},read:{"!type":"fn(fd: number, buffer: +Buffer, offset: number, length: number, position: number, callback?: fn(err: +Error, bytesRead: number, buffer: +Buffer))","!url":"http://nodejs.org/api/fs.html#fs_fs_read_fd_buffer_offset_length_position_callback","!doc":"Read data from the file specified by fd."},readSync:{"!type":"fn(fd: number, buffer: +Buffer, offset: number, length: number, position: number) -> number","!url":"http://nodejs.org/api/fs.html#fs_fs_readsync_fd_buffer_offset_length_position","!doc":"Synchronous version of fs.read. Returns the number of bytesRead."},readFile:{"!type":"fn(filename: string, callback: fn(err: +Error, data: +Buffer))","!url":"http://nodejs.org/api/fs.html#fs_fs_readfile_filename_options_callback","!doc":"Asynchronously reads the entire contents of a file."},readFileSync:{"!type":"fn(filename: string, encoding: string) -> +Buffer","!url":"http://nodejs.org/api/fs.html#fs_fs_readfilesync_filename_options","!doc":"Synchronous version of fs.readFile. Returns the contents of the filename."},writeFile:{"!type":"fn(filename: string, data: +Buffer, encoding?: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_writefile_filename_data_options_callback","!doc":"Asynchronously writes data to a file, replacing the file if it already exists. data can be a string or a buffer."},writeFileSync:{"!type":"fn(filename: string, data: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_writefilesync_filename_data_options","!doc":"The synchronous version of fs.writeFile."},appendFile:{"!type":"fn(filename: string, data: ?, encoding?: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_appendfile_filename_data_options_callback","!doc":"Asynchronously append data to a file, creating the file if it not yet exists. data can be a string or a buffer."},appendFileSync:{"!type":"fn(filename: string, data: ?, encoding?: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_appendfilesync_filename_data_options","!doc":"The synchronous version of fs.appendFile."},watchFile:{"!type":"fn(filename: string, options: ?, listener: fn(current: +fs.Stats, prev: +fs.Stats))","!url":"http://nodejs.org/api/fs.html#fs_fs_watchfile_filename_options_listener","!doc":"Watch for changes on filename. The callback listener will be called each time the file is accessed."},unwatchFile:{"!type":"fn(filename: string, listener?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_unwatchfile_filename_listener","!doc":"Stop watching for changes on filename. If listener is specified, only that particular listener is removed. Otherwise, all listeners are removed and you have effectively stopped watching filename."},watch:{"!type":"fn(filename: string, options?: ?, listener?: fn(event: string, filename: string)) -> +fs.FSWatcher","!url":"http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener","!doc":"Watch for changes on filename, where filename is either a file or a directory. The returned object is a fs.FSWatcher."},exists:{"!type":"fn(path: string, callback?: fn(exists: bool))","!url":"http://nodejs.org/api/fs.html#fs_fs_exists_path_callback","!doc":"Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false."},existsSync:{"!type":"fn(path: string) -> bool","!url":"http://nodejs.org/api/fs.html#fs_fs_existssync_path","!doc":"Synchronous version of fs.exists."},Stats:{"!type":"fn()",prototype:{isFile:"fn() -> bool",isDirectory:"fn() -> bool",isBlockDevice:"fn() -> bool",isCharacterDevice:"fn() -> bool",isSymbolicLink:"fn() -> bool",isFIFO:"fn() -> bool",isSocket:"fn() -> bool",dev:"number",ino:"number",mode:"number",nlink:"number",uid:"number",gid:"number",rdev:"number",size:"number",blksize:"number",blocks:"number",atime:"Date",mtime:"Date",ctime:"Date"},"!url":"http://nodejs.org/api/fs.html#fs_class_fs_stats","!doc":"Objects returned from fs.stat(), fs.lstat() and fs.fstat() and their synchronous counterparts are of this type."},createReadStream:{"!type":"fn(path: string, options?: ?) -> +stream.Readable","!url":"http://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options","!doc":"Returns a new ReadStream object."},createWriteStream:{"!type":"fn(path: string, options?: ?) -> +stream.Writable","!url":"http://nodejs.org/api/fs.html#fs_fs_createwritestream_path_options","!doc":"Returns a new WriteStream object."},FSWatcher:{"!type":"fn()",prototype:{close:"fn()"},"!url":"http://nodejs.org/api/fs.html#fs_class_fs_fswatcher","!doc":"Objects returned from fs.watch() are of this type."}},path:{normalize:{"!type":"fn(p: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_normalize_p","!doc":"Normalize a string path, taking care of '..' and '.' parts."},join:{"!type":"fn() -> string","!url":"http://nodejs.org/api/path.html#path_path_join_path1_path2","!doc":"Join all arguments together and normalize the resulting path."},resolve:{"!type":"fn(from: string, from2: string, from3: string, from4: string, from5: string, to: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_resolve_from_to","!doc":"Resolves to to an absolute path."},relative:{"!type":"fn(from: string, to: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_relative_from_to","!doc":"Solve the relative path from from to to."},dirname:{"!type":"fn(p: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_dirname_p","!doc":"Return the directory name of a path. Similar to the Unix dirname command."},basename:{"!type":"fn(p: string, ext?: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_basename_p_ext","!doc":"Return the last portion of a path. Similar to the Unix basename command."},extname:{"!type":"fn(p: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_extname_p","!doc":"Return the extension of the path, from the last '.' to end of string in the last portion of the path. If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string."},sep:{"!type":"string","!url":"http://nodejs.org/api/path.html#path_path_sep","!doc":"The platform-specific file separator. '\\\\' or '/'."},delimiter:{"!type":"string","!url":"http://nodejs.org/api/path.html#path_path_delimiter","!doc":"The platform-specific path delimiter, ; or ':'."}},string_decoder:{StringDecoder:{"!type":"fn(encoding?: string)",prototype:{write:{"!type":"fn(buffer: +Buffer) -> string","!url":"http://nodejs.org/api/string_decoder.html#string_decoder_decoder_write_buffer","!doc":"Returns a decoded string."},end:{"!type":"fn()","!url":"http://nodejs.org/api/string_decoder.html#string_decoder_decoder_end","!doc":"Returns any trailing bytes that were left in the buffer."}},"!url":"http://nodejs.org/api/string_decoder.html#string_decoder_class_stringdecoder","!doc":"Accepts a single argument, encoding which defaults to utf8."}},tls:{CLIENT_RENEG_LIMIT:"number",CLIENT_RENEG_WINDOW:"number",SLAB_BUFFER_SIZE:"number",getCiphers:{"!type":"fn() -> [string]","!url":"http://nodejs.org/api/tls.html#tls_tls_getciphers","!doc":"Returns an array with the names of the supported SSL ciphers."},Server:{"!type":"fn()",prototype:{"!proto":"net.Server.prototype",listen:{"!type":"fn(port: number, host?: string, callback?: fn())","!url":"http://nodejs.org/api/tls.html#tls_server_listen_port_host_callback","!doc":"Begin accepting connections on the specified port and host. If the host is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY)."},close:{"!type":"fn()","!url":"http://nodejs.org/api/tls.html#tls_server_close","!doc":"Stops the server from accepting new connections. This function is asynchronous, the server is finally closed when the server emits a 'close' event."},addContext:{"!type":"fn(hostName: string, credentials: tls.Server.credentials)","!url":"http://nodejs.org/api/tls.html#tls_server_addcontext_hostname_credentials","!doc":"Add secure context that will be used if client request's SNI hostname is matching passed hostname (wildcards can be used). credentials can contain key, cert and ca."}},"!url":"http://nodejs.org/api/tls.html#tls_class_tls_server","!doc":"This class is a subclass of net.Server and has the same methods on it. Instead of accepting just raw TCP connections, this accepts encrypted connections using TLS or SSL."},createServer:{"!type":"fn(options?: ?, connectionListener?: fn(stream: +tls.CleartextStream)) -> +tls.Server","!url":"http://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener","!doc":"Creates a new tls.Server. The connectionListener argument is automatically set as a listener for the secureConnection event."},CleartextStream:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",authorized:{"!type":"bool","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_authorized","!doc":"A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false"},authorizationError:{"!type":"+Error","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_authorizationerror","!doc":"The reason why the peer's certificate has not been verified. This property becomes available only when cleartextStream.authorized === false."},getPeerCertificate:{"!type":"fn() -> ?","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_getpeercertificate","!doc":"Returns an object representing the peer's certificate. The returned object has some properties corresponding to the field of the certificate."},getCipher:{"!type":"fn() -> tls.cipher","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_getcipher","!doc":"Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection."},address:{"!type":"net.address","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_address","!doc":"Returns the bound address, the address family name and port of the underlying socket as reported by the operating system. Returns an object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }"},remoteAddress:{"!type":"string","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_remoteaddress","!doc":"The string representation of the remote IP address. For example, '74.125.127.100' or '2001:4860:a005::68'."},remotePort:{"!type":"number","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_remoteport","!doc":"The numeric representation of the remote port. For example, 443."}},"!url":"http://nodejs.org/api/tls.html#tls_class_tls_cleartextstream","!doc":"This is a stream on top of the Encrypted stream that makes it possible to read/write an encrypted data as a cleartext data."},connect:{"!type":"fn(port: number, host?: string, options: ?, listener: fn()) -> +tls.CleartextStream","!url":"http://nodejs.org/api/tls.html#tls_tls_connect_options_callback","!doc":"Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.)"},createSecurePair:{"!type":"fn(credentials?: crypto.credentials, isServer?: bool, requestCert?: bool, rejectUnauthorized?: bool) -> +tls.SecurePair","!url":"http://nodejs.org/api/tls.html#tls_tls_createsecurepair_credentials_isserver_requestcert_rejectunauthorized","!doc":"Creates a new secure pair object with two streams, one of which reads/writes encrypted data, and one reads/writes cleartext data. Generally the encrypted one is piped to/from an incoming encrypted data stream, and the cleartext one is used as a replacement for the initial encrypted stream."},SecurePair:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",cleartext:{"!type":"+tls.CleartextStream","!url":"http://nodejs.org/api/tls.html#tls_class_securepair","!doc":"Returned by tls.createSecurePair."},encrypted:{"!type":"+stream.Duplex","!url":"http://nodejs.org/api/tls.html#tls_class_securepair","!doc":"Returned by tls.createSecurePair."}},"!url":"http://nodejs.org/api/tls.html#tls_class_securepair","!doc":"Returned by tls.createSecurePair."}},crypto:{getCiphers:{"!type":"fn() -> [string]","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_getciphers","!doc":"Returns an array with the names of the supported ciphers."},getHashes:{"!type":"fn() -> [string]","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_gethashes","!doc":"Returns an array with the names of the supported hash algorithms."},createCredentials:{"!type":"fn(details?: ?) -> crypto.credentials","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createcredentials_details","!doc":"Creates a credentials object."},createHash:{"!type":"fn(algorithm: string) -> +crypto.Hash","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm","!doc":"Creates and returns a hash object, a cryptographic hash with the given algorithm which can be used to generate hash digests."},Hash:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",update:{"!type":"fn(data: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/crypto.html#crypto_hash_update_data_input_encoding","!doc":"Updates the hash content with the given data, the encoding of which is given in input_encoding and can be 'utf8', 'ascii' or 'binary'. If no encoding is provided, then a buffer is expected."},digest:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_hash_digest_encoding","!doc":"Calculates the digest of all of the passed data to be hashed. The encoding can be 'hex', 'binary' or 'base64'. If no encoding is provided, then a buffer is returned."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_hash","!doc":"The class for creating hash digests of data."},createHmac:{"!type":"fn(algorithm: string, key: string) -> +crypto.Hmac","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createhmac_algorithm_key","!doc":"Creates and returns a hmac object, a cryptographic hmac with the given algorithm and key."},Hmac:{"!type":"fn()",prototype:{update:{"!type":"fn(data: +Buffer)","!url":"http://nodejs.org/api/crypto.html#crypto_hmac_update_data","!doc":"Update the hmac content with the given data. This can be called many times with new data as it is streamed."},digest:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_hmac_digest_encoding","!doc":"Calculates the digest of all of the passed data to the hmac. The encoding can be 'hex', 'binary' or 'base64'. If no encoding is provided, then a buffer is returned."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_hmac","!doc":"Class for creating cryptographic hmac content."},createCipher:{"!type":"fn(algorithm: string, password: string) -> +crypto.Cipher","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createcipher_algorithm_password","!doc":"Creates and returns a cipher object, with the given algorithm and password."},createCipheriv:{"!type":"fn(algorithm: string, password: string, iv: string) -> +crypto.Cipher","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv","!doc":"Creates and returns a cipher object, with the given algorithm, key and iv."},Cipher:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",update:{"!type":"fn(data: +Buffer, input_encoding?: string, output_encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_cipher_update_data_input_encoding_output_encoding","!doc":"Updates the cipher with data, the encoding of which is given in input_encoding and can be 'utf8', 'ascii' or 'binary'. If no encoding is provided, then a buffer is expected."},"final":{"!type":"fn(output_encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_cipher_final_output_encoding","!doc":"Returns any remaining enciphered contents, with output_encoding being one of: 'binary', 'base64' or 'hex'. If no encoding is provided, then a buffer is returned."},setAutoPadding:{"!type":"fn(auto_padding: bool)","!url":"http://nodejs.org/api/crypto.html#crypto_cipher_setautopadding_auto_padding_true","!doc":"You can disable automatic padding of the input data to block size. If auto_padding is false, the length of the entire input data must be a multiple of the cipher's block size or final will fail. Useful for non-standard padding, e.g. using 0x0 instead of PKCS padding. You must call this before cipher.final."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_cipher","!doc":"Class for encrypting data."},createDecipher:{"!type":"fn(algorithm: string, password: string) -> +crypto.Decipher","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createdecipher_algorithm_password","!doc":"Creates and returns a decipher object, with the given algorithm and key. This is the mirror of the createCipher() above."},createDecipheriv:{"!type":"fn(algorithm: string, key: string, iv: string) -> +crypto.Decipher","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv","!doc":"Creates and returns a decipher object, with the given algorithm, key and iv. This is the mirror of the createCipheriv() above."},Decipher:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",update:{"!type":"fn(data: +Buffer, input_encoding?: string, output_encoding?: string)","!url":"http://nodejs.org/api/crypto.html#crypto_decipher_update_data_input_encoding_output_encoding","!doc":"Updates the decipher with data, which is encoded in 'binary', 'base64' or 'hex'. If no encoding is provided, then a buffer is expected."},"final":{"!type":"fn(output_encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_decipher_final_output_encoding","!doc":"Returns any remaining plaintext which is deciphered, with output_encoding being one of: 'binary', 'ascii' or 'utf8'. If no encoding is provided, then a buffer is returned."},setAutoPadding:{"!type":"fn(auto_padding: bool)","!url":"http://nodejs.org/api/crypto.html#crypto_decipher_setautopadding_auto_padding_true","!doc":"You can disable auto padding if the data has been encrypted without standard block padding to prevent decipher.final from checking and removing it. Can only work if the input data's length is a multiple of the ciphers block size. You must call this before streaming data to decipher.update."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_decipher","!doc":"Class for decrypting data."},createSign:{"!type":"fn(algorithm: string) -> +crypto.Sign","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createsign_algorithm","!doc":"Creates and returns a signing object, with the given algorithm. On recent OpenSSL releases, openssl list-public-key-algorithms will display the available signing algorithms. Examples are 'RSA-SHA256'."},Sign:{"!type":"fn()",prototype:{"!proto":"stream.Writable.prototype",update:{"!type":"fn(data: +Buffer)","!url":"http://nodejs.org/api/crypto.html#crypto_sign_update_data","!doc":"Updates the sign object with data. This can be called many times with new data as it is streamed."},sign:{"!type":"fn(private_key: string, output_format: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format","!doc":"Calculates the signature on all the updated data passed through the sign. private_key is a string containing the PEM encoded private key for signing."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_sign","!doc":"Class for generating signatures."},createVerify:{"!type":"fn(algorith: string) -> +crypto.Verify","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createverify_algorithm","!doc":"Creates and returns a verification object, with the given algorithm. This is the mirror of the signing object above."},Verify:{"!type":"fn()",prototype:{"!proto":"stream.Writable.prototype",update:{"!type":"fn(data: +Buffer)","!url":"http://nodejs.org/api/crypto.html#crypto_verifier_update_data","!doc":"Updates the verifier object with data. This can be called many times with new data as it is streamed."},verify:{"!type":"fn(object: string, signature: string, signature_format?: string) -> bool","!url":"http://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format","!doc":"Verifies the signed data by using the object and signature. object is a string containing a PEM encoded object, which can be one of RSA public key, DSA public key, or X.509 certificate. signature is the previously calculated signature for the data, in the signature_format which can be 'binary', 'hex' or 'base64'. If no encoding is specified, then a buffer is expected."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_verify","!doc":"Class for verifying signatures."},createDiffieHellman:{"!type":"fn(prime: number, encoding?: string) -> +crypto.DiffieHellman","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_creatediffiehellman_prime_length","!doc":"Creates a Diffie-Hellman key exchange object and generates a prime of the given bit length. The generator used is 2."},DiffieHellman:{"!type":"fn()",prototype:{generateKeys:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_generatekeys_encoding","!doc":"Generates private and public Diffie-Hellman key values, and returns the public key in the specified encoding. This key should be transferred to the other party. Encoding can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},computeSecret:{"!type":"fn(other_public_key: +Buffer, input_encoding?: string, output_encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_computesecret_other_public_key_input_encoding_output_encoding","!doc":"Computes the shared secret using other_public_key as the other party's public key and returns the computed shared secret. Supplied key is interpreted using specified input_encoding, and secret is encoded using specified output_encoding. Encodings can be 'binary', 'hex', or 'base64'. If the input encoding is not provided, then a buffer is expected."},getPrime:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_getprime_encoding","!doc":"Returns the Diffie-Hellman prime in the specified encoding, which can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},getGenerator:{"!type":"fn(encoding: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_getgenerator_encoding","!doc":"Returns the Diffie-Hellman prime in the specified encoding, which can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},getPublicKey:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_getpublickey_encoding","!doc":"Returns the Diffie-Hellman public key in the specified encoding, which can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},getPrivateKey:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_getprivatekey_encoding","!doc":"Returns the Diffie-Hellman private key in the specified encoding, which can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},setPublicKey:{"!type":"fn(public_key: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_setpublickey_public_key_encoding","!doc":"Sets the Diffie-Hellman public key. Key encoding can be 'binary', 'hex' or 'base64'. If no encoding is provided, then a buffer is expected."},setPrivateKey:{"!type":"fn(public_key: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_setprivatekey_private_key_encoding","!doc":"Sets the Diffie-Hellman private key. Key encoding can be 'binary', 'hex' or 'base64'. If no encoding is provided, then a buffer is expected."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_diffiehellman","!doc":"The class for creating Diffie-Hellman key exchanges."},getDiffieHellman:{"!type":"fn(group_name: string) -> +crypto.DiffieHellman","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_getdiffiehellman_group_name","!doc":"Creates a predefined Diffie-Hellman key exchange object. The supported groups are: 'modp1', 'modp2', 'modp5' (defined in RFC 2412) and 'modp14', 'modp15', 'modp16', 'modp17', 'modp18' (defined in RFC 3526). The returned object mimics the interface of objects created by crypto.createDiffieHellman() above, but will not allow to change the keys (with diffieHellman.setPublicKey() for example). The advantage of using this routine is that the parties don't have to generate nor exchange group modulus beforehand, saving both processor and communication time."},pbkdf2:{"!type":"fn(password: string, salt: string, iterations: number, keylen: number, callback: fn(err: +Error, derivedKey: string))","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_callback","!doc":"Asynchronous PBKDF2 applies pseudorandom function HMAC-SHA1 to derive a key of given length from the given password, salt and iterations. The callback gets two arguments (err, derivedKey)."},pbkdf2Sync:{"!type":"fn(password: string, salt: string, iterations: number, keylen: number) -> string","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen","!doc":"Synchronous PBKDF2 function. Returns derivedKey or throws error."},randomBytes:{"!type":"fn(size: number, callback?: fn(err: +Error, buf: +Buffer))","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback","!doc":"Generates cryptographically strong pseudo-random data."},pseudoRandomBytes:{"!type":"fn(size: number, callback?: fn(err: +Error, buf: +Buffer))","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_pseudorandombytes_size_callback","!doc":"Generates non-cryptographically strong pseudo-random data. The data returned will be unique if it is sufficiently long, but is not necessarily unpredictable. For this reason, the output of this function should never be used where unpredictability is important, such as in the generation of encryption keys."},DEFAULT_ENCODING:"string"},util:{format:{"!type":"fn(format: string) -> string","!url":"http://nodejs.org/api/util.html#util_util_format_format","!doc":"Returns a formatted string using the first argument as a printf-like format."},debug:{"!type":"fn(msg: string)","!url":"http://nodejs.org/api/util.html#util_util_debug_string","!doc":"A synchronous output function. Will block the process and output string immediately to stderr."},error:{"!type":"fn(msg: string)","!url":"http://nodejs.org/api/util.html#util_util_error","!doc":"Same as util.debug() except this will output all arguments immediately to stderr."},puts:{"!type":"fn(data: string)","!url":"http://nodejs.org/api/util.html#util_util_puts","!doc":"A synchronous output function. Will block the process and output all arguments to stdout with newlines after each argument."},print:{"!type":"fn(data: string)","!url":"http://nodejs.org/api/util.html#util_util_print","!doc":"A synchronous output function. Will block the process, cast each argument to a string then output to stdout. Does not place newlines after each argument."},log:{"!type":"fn(string: string)","!url":"http://nodejs.org/api/util.html#util_util_log_string","!doc":"Output with timestamp on stdout."},inspect:{"!type":"fn(object: ?, options: ?) -> string","!url":"http://nodejs.org/api/util.html#util_util_inspect_object_options","!doc":"Return a string representation of object, which is useful for debugging."},isArray:{"!type":"fn(object: ?) -> bool","!url":"http://nodejs.org/api/util.html#util_util_isarray_object","!doc":'Returns true if the given "object" is an Array. false otherwise.'},isRegExp:{"!type":"fn(object: ?) -> bool","!url":"http://nodejs.org/api/util.html#util_util_isregexp_object","!doc":'Returns true if the given "object" is a RegExp. false otherwise.'},isDate:{"!type":"fn(object: ?) -> bool","!url":"http://nodejs.org/api/util.html#util_util_isdate_object","!doc":'Returns true if the given "object" is a Date. false otherwise.'},isError:{"!type":"fn(object: ?) -> bool","!url":"http://nodejs.org/api/util.html#util_util_iserror_object","!doc":'Returns true if the given "object" is an Error. false otherwise.'},inherits:{"!type":"fn(constructor: ?, superConstructor: ?)","!url":"http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor","!doc":"Inherit the prototype methods from one constructor into another. The prototype of constructor will be set to a new object created from superConstructor."}},assert:{"!type":"fn(value: ?, message?: string)",fail:{"!type":"fn(actual: ?, expected: ?, message: string, operator: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_fail_actual_expected_message_operator","!doc":"Throws an exception that displays the values for actual and expected separated by the provided operator."},ok:{"!type":"fn(value: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert","!doc":"This module is used for writing unit tests for your applications, you can access it with require('assert')."},equal:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_equal_actual_expected_message","!doc":"Tests shallow, coercive equality with the equal comparison operator ( == )."},notEqual:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_notequal_actual_expected_message","!doc":"Tests shallow, coercive non-equality with the not equal comparison operator ( != )."},deepEqual:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_deepequal_actual_expected_message","!doc":"Tests for deep equality."},notDeepEqual:{"!type":"fn(acutal: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_notdeepequal_actual_expected_message","!doc":"Tests for any deep inequality."},strictEqual:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_strictequal_actual_expected_message","!doc":"Tests strict equality, as determined by the strict equality operator ( === )"},notStrictEqual:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_notstrictequal_actual_expected_message","!doc":"Tests strict non-equality, as determined by the strict not equal operator ( !== )"},"throws":{"!type":"fn(block: fn(), error?: ?, messsage?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_throws_block_error_message","!doc":"Expects block to throw an error. error can be constructor, regexp or validation function."},doesNotThrow:{"!type":"fn(block: fn(), error?: ?, messsage?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_doesnotthrow_block_message","!doc":"Expects block not to throw an error."},ifError:{"!type":"fn(value: ?)","!url":"http://nodejs.org/api/assert.html#assert_assert_iferror_value","!doc":"Tests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks."},"!url":"http://nodejs.org/api/assert.html#assert_assert","!doc":"This module is used for writing unit tests for your applications, you can access it with require('assert')."},tty:{isatty:{"!type":"fn(fd: number) -> bool","!url":"http://nodejs.org/api/tty.html#tty_tty_isatty_fd","!doc":"Returns true or false depending on if the fd is associated with a terminal."}},domain:{create:{"!type":"fn() -> +events.EventEmitter","!url":"http://nodejs.org/api/domain.html#domain_domain_create","!doc":"Returns a new Domain object."},Domain:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",run:{"!type":"fn(fn: fn())","!url":"http://nodejs.org/api/domain.html#domain_domain_run_fn","!doc":"Run the supplied function in the context of the domain, implicitly binding all event emitters, timers, and lowlevel requests that are created in that context."},members:{"!type":"[+events.EventEmitter]","!url":"http://nodejs.org/api/domain.html#domain_domain_members","!doc":"An array of timers and event emitters that have been explicitly added to the domain."},add:{"!type":"fn(emitter: +events.EventEmitter)","!url":"http://nodejs.org/api/domain.html#domain_domain_add_emitter","!doc":"Explicitly adds an emitter to the domain. If any event handlers called by the emitter throw an error, or if the emitter emits an error event, it will be routed to the domain's error event, just like with implicit binding."},remove:{"!type":"fn(emitter: +events.EventEmitter)","!url":"http://nodejs.org/api/domain.html#domain_domain_remove_emitter","!doc":"The opposite of domain.add(emitter). Removes domain handling from the specified emitter."},bind:{"!type":"fn(callback: fn(err: +Error, data: ?)) -> !0","!url":"http://nodejs.org/api/domain.html#domain_domain_bind_callback","!doc":"The returned function will be a wrapper around the supplied callback function. When the returned function is called, any errors that are thrown will be routed to the domain's error event."},intercept:{"!type":"fn(cb: fn(data: ?)) -> !0","!url":"http://nodejs.org/api/domain.html#domain_domain_intercept_callback","!doc":"This method is almost identical to domain.bind(callback). However, in addition to catching thrown errors, it will also intercept Error objects sent as the first argument to the function."},dispose:{"!type":"fn()","!url":"http://nodejs.org/api/domain.html#domain_domain_dispose","!doc":"The dispose method destroys a domain, and makes a best effort attempt to clean up any and all IO that is associated with the domain. Streams are aborted, ended, closed, and/or destroyed. Timers are cleared. Explicitly bound callbacks are no longer called. Any error events that are raised as a result of this are ignored."}},"!url":"http://nodejs.org/api/domain.html#domain_class_domain","!doc":"The Domain class encapsulates the functionality of routing errors and uncaught exceptions to the active Domain object."}},"os.cpuSpec":{model:"string",speed:"number",times:{user:"number",nice:"number",sys:"number",idle:"number",irq:"number"}},"process.memoryUsage.type":{rss:"number",heapTotal:"?",number:"?",heapUsed:"number"},"net.address":{port:"number",family:"string",address:"string"},"url.type":{href:"string",protocol:"string",auth:"string",hostname:"string",port:"string",host:"string",pathname:"string",search:"string",query:"string",slashes:"bool",hash:"string"},"tls.Server.credentials":{key:"string",cert:"string",ca:"string"},"tls.cipher":{name:"string",version:"string"},"crypto.credentials":{pfx:"string",key:"string",passphrase:"string",cert:"string",ca:"string",crl:"string",ciphers:"string"},buffer:{Buffer:"Buffer",INSPECT_MAX_BYTES:"number",SlowBuffer:"Buffer"},module:{},timers:{setTimeout:{"!type":"fn(callback: fn(), ms: number) -> timers.Timer","!url":"http://nodejs.org/api/globals.html#globals_settimeout_cb_ms","!doc":"Run callback cb after at least ms milliseconds. The actual delay depends on external factors like OS timer granularity and system load."},clearTimeout:{"!type":"fn(id: timers.Timer)","!url":"http://nodejs.org/api/globals.html#globals_cleartimeout_t","!doc":"Stop a timer that was previously created with setTimeout(). The callback will not execute."},setInterval:{"!type":"fn(callback: fn(), ms: number) -> timers.Timer","!url":"http://nodejs.org/api/globals.html#globals_setinterval_cb_ms","!doc":"Run callback cb repeatedly every ms milliseconds. Note that the actual interval may vary, depending on external factors like OS timer granularity and system load. It's never less than ms but it may be longer."},clearInterval:{"!type":"fn(id: timers.Timer)","!url":"http://nodejs.org/api/globals.html#globals_clearinterval_t","!doc":"Stop a timer that was previously created with setInterval(). The callback will not execute."},setImmediate:{"!type":"fn(callback: fn(), ms: number) -> timers.Timer","!url":"http://nodejs.org/api/timers.html#timers_setimmediate_callback_arg","!doc":"Schedule the 'immediate' execution of callback after I/O events callbacks."},clearImmediate:{"!type":"fn(id: timers.Timer)","!url":"http://nodejs.org/api/timers.html#timers_clearimmediate_immediateid","!doc":"Stops an immediate from triggering."},Timer:{unref:{"!type":"fn()","!url":"http://nodejs.org/api/timers.html#timers_unref","!doc":"Create a timer that is active but if it is the only item left in the event loop won't keep the program running."},ref:{"!type":"fn()","!url":"http://nodejs.org/api/timers.html#timers_unref","!doc":"Explicitly request the timer hold the program open (cancel the effect of 'unref')."}}}},process:{stdout:{"!type":"+stream.Writable","!url":"http://nodejs.org/api/process.html#process_process_stdout","!doc":"A Writable Stream to stdout."},stderr:{"!type":"+stream.Writable","!url":"http://nodejs.org/api/process.html#process_process_stderr","!doc":"A writable stream to stderr."},stdin:{"!type":"+stream.Readable","!url":"http://nodejs.org/api/process.html#process_process_stdin","!doc":"A Readable Stream for stdin. The stdin stream is paused by default, so one must call process.stdin.resume() to read from it."},argv:{"!type":"[string]","!url":"http://nodejs.org/api/process.html#process_process_argv","!doc":"An array containing the command line arguments. The first element will be 'node', the second element will be the name of the JavaScript file. The next elements will be any additional command line arguments."},execPath:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_execpath","!doc":"This is the absolute pathname of the executable that started the process."},abort:{"!type":"fn()","!url":"http://nodejs.org/api/process.html#process_process_abort","!doc":"This causes node to emit an abort. This will cause node to exit and generate a core file."},chdir:{"!type":"fn(directory: string)","!url":"http://nodejs.org/api/process.html#process_process_chdir_directory","!doc":"Changes the current working directory of the process or throws an exception if that fails."},cwd:{"!type":"fn()","!url":"http://nodejs.org/api/process.html#process_process_cwd","!doc":"Returns the current working directory of the process."},env:{"!url":"http://nodejs.org/api/process.html#process_process_env","!doc":"An object containing the user environment."},exit:{"!type":"fn(code?: number)","!url":"http://nodejs.org/api/process.html#process_process_exit_code","!doc":"Ends the process with the specified code. If omitted, exit uses the 'success' code 0."},getgid:{"!type":"fn() -> number","!url":"http://nodejs.org/api/process.html#process_process_getgid","!doc":"Gets the group identity of the process. This is the numerical group id, not the group name."},setgid:{"!type":"fn(id: number)","!url":"http://nodejs.org/api/process.html#process_process_setgid_id","!doc":"Sets the group identity of the process. This accepts either a numerical ID or a groupname string. If a groupname is specified, this method blocks while resolving it to a numerical ID."},getuid:{"!type":"fn() -> number","!url":"http://nodejs.org/api/process.html#process_process_getuid","!doc":"Gets the user identity of the process. This is the numerical userid, not the username."},setuid:{"!type":"fn(id: number)","!url":"http://nodejs.org/api/process.html#process_process_setuid_id","!doc":"Sets the user identity of the process. This accepts either a numerical ID or a username string. If a username is specified, this method blocks while resolving it to a numerical ID."},version:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_version","!doc":"A compiled-in property that exposes NODE_VERSION."},versions:{http_parser:"string",node:"string",v8:"string",ares:"string",uv:"string",zlib:"string",openssl:"string","!url":"http://nodejs.org/api/process.html#process_process_versions","!doc":"A property exposing version strings of node and its dependencies."},config:{target_defaults:{cflags:"[?]",default_configuration:"string",defines:"[string]",include_dirs:"[string]",libraries:"[string]"},variables:{clang:"number",host_arch:"string",node_install_npm:"bool",node_install_waf:"bool",node_prefix:"string",node_shared_openssl:"bool",node_shared_v8:"bool",node_shared_zlib:"bool",node_use_dtrace:"bool",node_use_etw:"bool",node_use_openssl:"bool",target_arch:"string",v8_no_strict_aliasing:"number",v8_use_snapshot:"bool",visibility:"string"},"!url":"http://nodejs.org/api/process.html#process_process_config","!doc":'An Object containing the JavaScript representation of the configure options that were used to compile the current node executable. This is the same as the "config.gypi" file that was produced when running the ./configure script.'},kill:{"!type":"fn(pid: number, signal?: string)","!url":"http://nodejs.org/api/process.html#process_process_kill_pid_signal","!doc":"Send a signal to a process. pid is the process id and signal is the string describing the signal to send. Signal names are strings like 'SIGINT' or 'SIGUSR1'. If omitted, the signal will be 'SIGTERM'."},pid:{"!type":"number","!url":"http://nodejs.org/api/process.html#process_process_pid","!doc":"The PID of the process."},title:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_title","!doc":"Getter/setter to set what is displayed in 'ps'."},arch:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_arch","!doc":"What processor architecture you're running on: 'arm', 'ia32', or 'x64'."},platform:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_platform","!doc":"What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'"},memoryUsage:{"!type":"fn() -> process.memoryUsage.type","!url":"http://nodejs.org/api/process.html#process_process_memoryusage","!doc":"Returns an object describing the memory usage of the Node process measured in bytes."},nextTick:{"!type":"fn(callback: fn())","!url":"http://nodejs.org/api/process.html#process_process_nexttick_callback","!doc":"On the next loop around the event loop call this callback. This is not a simple alias to setTimeout(fn, 0), it's much more efficient. It typically runs before any other I/O events fire, but there are some exceptions."},maxTickDepth:{"!type":"number","!url":"http://nodejs.org/api/process.html#process_process_maxtickdepth","!doc":"The maximum depth of nextTick-calling nextTick-callbacks that will be evaluated before allowing other forms of I/O to occur."},umask:{"!type":"fn(mask?: number) -> number","!url":"http://nodejs.org/api/process.html#process_process_umask_mask","!doc":"Sets or reads the process's file mode creation mask. Child processes inherit the mask from the parent process. Returns the old mask if mask argument is given, otherwise returns the current mask."},uptime:{"!type":"fn() -> number","!url":"http://nodejs.org/api/process.html#process_process_uptime","!doc":"Number of seconds Node has been running."},hrtime:{"!type":"fn() -> [number]","!url":"http://nodejs.org/api/process.html#process_process_hrtime","!doc":"Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array. It is relative to an arbitrary time in the past. It is not related to the time of day and therefore not subject to clock drift. The primary use is for measuring performance between intervals."},"!url":"http://nodejs.org/api/globals.html#globals_process","!doc":"The process object."},global:{"!type":"<top>","!url":"http://nodejs.org/api/globals.html#globals_global","!doc":"In browsers, the top-level scope is the global scope. That means that in browsers if you're in the global scope var something will define a global variable. In Node this is different. The top-level scope is not the global scope; var something inside a Node module will be local to that module."},console:{log:{"!type":"fn(text: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_log_data","!doc":"Prints to stdout with newline. This function can take multiple arguments in a printf()-like way."},info:{"!type":"fn(text: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_info_data","!doc":"Same as console.log."},error:{"!type":"fn(text: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_error_data","!doc":"Same as console.log but prints to stderr."},warn:{"!type":"fn(text: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_warn_data","!doc":"Same as console.error."},dir:{"!type":"fn(obj: ?)","!url":"http://nodejs.org/api/stdio.html#stdio_console_dir_obj","!doc":"Uses util.inspect on obj and prints resulting string to stdout."},time:{"!type":"fn(label: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_time_label","!doc":"Mark a time."},timeEnd:{"!type":"fn(label: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_timeend_label","!doc":"Finish timer, record output."},trace:{"!type":"fn(label: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_trace_label","!doc":"Print a stack trace to stderr of the current position."},assert:{"!type":"fn(expression: bool)","!url":"http://nodejs.org/api/stdio.html#stdio_console_assert_expression_message","!doc":"Same as assert.ok() where if the expression evaluates as false throw an AssertionError with message."},"!url":"http://nodejs.org/api/globals.html#globals_console","!doc":"Used to print to stdout and stderr."},__filename:{"!type":"string","!url":"http://nodejs.org/api/globals.html#globals_filename","!doc":"The filename of the code being executed. This is the resolved absolute path of this code file. For a main program this is not necessarily the same filename used in the command line. The value inside a module is the path to that module file."},__dirname:{"!type":"string","!url":"http://nodejs.org/api/globals.html#globals_dirname","!doc":"The name of the directory that the currently executing script resides in."},setTimeout:"timers.setTimeout",clearTimeout:"timers.clearTimeout",setInterval:"timers.setInterval",clearInterval:"timers.clearInterval",module:{"!type":"+Module","!url":"http://nodejs.org/api/globals.html#globals_module","!doc":"A reference to the current module. In particular module.exports is the same as the exports object. module isn't actually a global but rather local to each module."},Buffer:{"!type":"fn(str: string, encoding?: string) -> +Buffer",prototype:{"!proto":"String.prototype",write:"fn(string: string, offset?: number, length?: number, encoding?: string) -> number",toString:"fn(encoding?: string, start?: number, end?: number) -> string",length:"number",copy:"fn(targetBuffer: +Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number)",slice:"fn(start?: number, end?: number) -> +Buffer",readUInt8:"fn(offset: number, noAssert?: bool) -> number",readUInt16LE:"fn(offset: number, noAssert?: bool) -> number",readUInt16BE:"fn(offset: number, noAssert?: bool) -> number",readUInt32LE:"fn(offset: number, noAssert?: bool) -> number",readUInt32BE:"fn(offset: number, noAssert?: bool) -> number",readInt8:"fn(offset: number, noAssert?: bool) -> number",readInt16LE:"fn(offset: number, noAssert?: bool) -> number",readInt16BE:"fn(offset: number, noAssert?: bool) -> number",readInt32LE:"fn(offset: number, noAssert?: bool) -> number",readInt32BE:"fn(offset: number, noAssert?: bool) -> number",readFloatLE:"fn(offset: number, noAssert?: bool) -> number",readFloatBE:"fn(offset: number, noAssert?: bool) -> number",readDoubleLE:"fn(offset: number, noAssert?: bool) -> number",readDoubleBE:"fn(offset: number, noAssert?: bool) -> number",writeUInt8:"fn(value: number, offset: number, noAssert?: bool)",writeUInt16LE:"fn(value: number, offset: number, noAssert?: bool)",writeUInt16BE:"fn(value: number, offset: number, noAssert?: bool)",writeUInt32LE:"fn(value: number, offset: number, noAssert?: bool)",writeUInt32BE:"fn(value: number, offset: number, noAssert?: bool)",writeInt8:"fn(value: number, offset: number, noAssert?: bool)",writeInt16LE:"fn(value: number, offset: number, noAssert?: bool)",writeInt16BE:"fn(value: number, offset: number, noAssert?: bool)",writeInt32LE:"fn(value: number, offset: number, noAssert?: bool)",writeInt32BE:"fn(value: number, offset: number, noAssert?: bool)",writeFloatLE:"fn(value: number, offset: number, noAssert?: bool)",writeFloatBE:"fn(value: number, offset: number, noAssert?: bool)",writeDoubleLE:"fn(value: number, offset: number, noAssert?: bool)",writeDoubleBE:"fn(value: number, offset: number, noAssert?: bool)",fill:"fn(value: ?, offset?: number, end?: number)"},isBuffer:"fn(obj: ?) -> bool",byteLength:"fn(string: string, encoding?: string) -> number",concat:"fn(list: [+Buffer], totalLength?: number) -> +Buffer","!url":"http://nodejs.org/api/globals.html#globals_class_buffer","!doc":"Used to handle binary data."}}
}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionPostgres",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,n){function r(r,s,i){var a=t.resolvePos(r,s.end),l=e.findExpressionAround(r.ast,null,a,r.scope),c=n.getTemplatesForNode(o,l);if(c&&c.length>0)for(var p=0;p<c.length;p++){var d=c[p];d.origin="postgres",d.type="template",i.push(d)}}var o=[{prefix:"postgres",name:"postgres",nodes:{top:!0,member:!1,prop:!1},description:" - Node.js require statement for Postgres DB",template:"var pg = require('pg');\n"},{prefix:"postgres",name:"postgres client",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Postgres DB client",template:"var pg = require('pg');\nvar url = \"postgres://postgres:${port}@${host}/${database}\";\nvar ${client} = new pg.Client(url);\n"},{prefix:"postgres",name:"postgres connect",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Postgres DB client and connect",template:"var pg = require('pg');\nvar url = \"postgres://postgres:${port}@${host}/${database}\";\nvar ${client} = new pg.Client(url);\n${client}.connect(function(error) {\n	${cursor}\n});\n"},{prefix:"postgres",name:"postgres query",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Postgres DB query statement",template:"${client}.query(${sql}, function(error, result) {\n	${cursor}\n});\n"}];t.registerPlugin("orionPostgres",function(){return{defs:s,passes:{completion:r}}});var s={pg:{connect:"fn(connection: string, callback: fn(err: Error, client: Client, done: fn()))",end:"fn()",ConnectionConfig:{user:"string",database:"string",password:"string",port:"number",host:"string"},Defaults:{poolSize:"number",poolIdleTimeout:"number",reapIntervalMillis:"number",binary:"bool",parseInt8:"bool"},ClientConfig:{ssl:"bool"},QueryConfig:{name:"string",text:"string",values:"[?]"},QueryResult:{rows:"[?]"},ResultBuilder:{command:"string",rowCount:"number",oid:"number",addRow:"fn(row: ?)"},Client:{"!type":"fn(connection: string)",prototype:{connect:"fn(callback?: fn(err: Error))",end:"fn()",query:"fn(queryText: string, callback?: fn(err: Error, result: QueryResult)) -> Query",copyFrom:"fn(queryText: string) -> stream.Writable",copyTo:"fn(queryText: string) -> stream.Readable",pauseDrain:"fn()",resumeDrain:"fn()",on:"fn(event: string, listener: fn()) -> Client"}},Query:{prototype:{on:"fn(event: string, listener: fn(row: ?, result?: ResultBuilder)) -> Query"}},Events:{prototype:{on:"fn(event: string, listener: fn(err: Error, client: Client)) -> Events"}}},"!name":"pg","!define":{"!node":{pg:{connect:"fn(connection: string, callback: fn(err: Error, client: Client, done: fn()))",end:"fn()",Client:"pg.Client"}}}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionRedis",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,n){function r(r,s,i){var a=t.resolvePos(r,s.end),l=e.findExpressionAround(r.ast,null,a,r.scope),c=n.getTemplatesForNode(o,l);if(c&&c.length>0)for(var p=0;p<c.length;p++){var d=c[p];d.origin="redis",d.type="template",i.push(d)}}var o=[{prefix:"redis",name:"redis",nodes:{top:!0,member:!1,prop:!1},description:" - Node.js require statement for Redis",template:"var ${name} = require('redis');\n"},{prefix:"redis",name:"redis client",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Redis client",template:"var ${name} = require('redis');\nvar ${client} = ${name}.createClient(${port}, ${host}, ${options});\n"},{prefix:"redis",name:"redis connect",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Redis client and connect",template:"var ${name} = require('redis');\nvar ${client} = ${name}.createClient(${port}, ${host}, ${options});\ntry {\n	${cursor}\n} finally {\n	${client}.close();\n}\n"},{prefix:"redis",name:"redis set",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Redis client set call",template:"client.set(${key}, ${value});\n"},{prefix:"redis",name:"redis get",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Redis client get call",template:"client.get(${key}, function(${error}, ${reply}) {\n	${cursor}\n});\n"},{prefix:"redis",name:"redis on",nodes:{top:!0,member:!1,prop:!1},description:" - create a new Redis client event handler",template:"client.on(${event}, function(${arg}) {\n	${cursor}});\n"}];t.registerPlugin("orionRedis",function(){return{defs:s,passes:{completion:r}}});var s={"!name":"redis","!define":{"!node":{redis:{createClient:"fn(port_arg: number, host_arg?: string, options?: ClientOpts) -> RedisClient",print:"fn(err: Error, reply: ?)",debug_mode:"bool",ClientOpts:"redis.ClientOpts"}}},ClientOpts:{parser:"string",return_buffers:"bool",detect_buffers:"bool",socket_nodelay:"bool",no_ready_check:"bool",enable_offline_queue:"bool",retry_max_delay:"number",connect_timeout:"number",max_attempts:"number",auth_pass:"string"},RedisClient:{connected:"bool",retry_delay:"number",retry_backoff:"number",command_queue:"[?]",offline_queue:"[?]",server_info:"ServerInfo",end:"fn()",auth:"fn(password: string, callback?: ?)",ping:"fn(callback?: ?)",append:"fn(key: string, value: string, callback?: ?)",bitcount:"fn(key: string, callback?: ?)",set:"fn(key: string, value: string, callback?: ?)",get:"fn(key: string, callback?: ?)",exists:"fn(key: string, value: string, callback?: ?)",publish:"fn(channel: string, value: ?)",subscribe:"fn(channel: string)",setnx:"fn(args: [?], callback?: ?)",setex:"fn(args: [?], callback?: ?)",strlen:"fn(args: [?], callback?: ?)",del:"fn(args: [?], callback?: ?)",setbit:"fn(args: [?], callback?: ?)",getbit:"fn(args: [?], callback?: ?)",setrange:"fn(args: [?], callback?: ?)",getrange:"fn(args: [?], callback?: ?)",substr:"fn(args: [?], callback?: ?)",incr:"fn(args: [?], callback?: ?)",decr:"fn(args: [?], callback?: ?)",mget:"fn(args: [?], callback?: ?)",rpush:"fn(args: [?])",lpush:"fn(args: [?], callback?: ?)",rpushx:"fn(args: [?], callback?: ?)",lpushx:"fn(args: [?], callback?: ?)",linsert:"fn(args: [?], callback?: ?)",rpop:"fn(args: [?], callback?: ?)",lpop:"fn(args: [?], callback?: ?)",brpop:"fn(args: [?], callback?: ?)",brpoplpush:"fn(args: [?], callback?: ?)",blpop:"fn(args: [?], callback?: ?)",llen:"fn(args: [?], callback?: ?)",lindex:"fn(args: [?], callback?: ?)",lset:"fn(args: [?], callback?: ?)",lrange:"fn(args: [?], callback?: ?)",ltrim:"fn(args: [?], callback?: ?)",lrem:"fn(args: [?], callback?: ?)",rpoplpush:"fn(args: [?], callback?: ?)",sadd:"fn(args: [?], callback?: ?)",srem:"fn(args: [?], callback?: ?)",smove:"fn(args: [?], callback?: ?)",sismember:"fn(args: [?], callback?: ?)",scard:"fn(args: [?], callback?: ?)",spop:"fn(args: [?], callback?: ?)",srandmember:"fn(args: [?], callback?: ?)",sinter:"fn(args: [?], callback?: ?)",sinterstore:"fn(args: [?], callback?: ?)",sunion:"fn(args: [?], callback?: ?)",sunionstore:"fn(args: [?], callback?: ?)",sdiff:"fn(args: [?], callback?: ?)",sdiffstore:"fn(args: [?], callback?: ?)",smembers:"fn(args: [?], callback?: ?)",zadd:"fn(args: [?], callback?: ?)",zincrby:"fn(args: [?], callback?: ?)",zrem:"fn(args: [?], callback?: ?)",zremrangebyscore:"fn(args: [?], callback?: ?)",zremrangebyrank:"fn(args: [?], callback?: ?)",zunionstore:"fn(args: [?], callback?: ?)",zinterstore:"fn(args: [?], callback?: ?)",zrange:"fn(args: [?], callback?: ?)",zrangebyscore:"fn(args: [?], callback?: ?)",zrevrangebyscore:"fn(args: [?], callback?: ?)",zcount:"fn(args: [?], callback?: ?)",zrevrange:"fn(args: [?], callback?: ?)",zcard:"fn(args: [?], callback?: ?)",zscore:"fn(args: [?], callback?: ?)",zrank:"fn(args: [?], callback?: ?)",zrevrank:"fn(args: [?], callback?: ?)",hset:"fn(args: [?], callback?: ?)",hsetnx:"fn(args: [?], callback?: ?)",hget:"fn(args: [?], callback?: ?)",hmset:"fn(args: [?], callback?: ?)",hmget:"fn(args: [?], callback?: ?)",hincrby:"fn(args: [?], callback?: ?)",hdel:"fn(args: [?], callback?: ?)",hlen:"fn(args: [?], callback?: ?)",hkeys:"fn(args: [?], callback?: ?)",hvals:"fn(args: [?], callback?: ?)",hgetall:"fn(args: [?], callback?: ?)",hexists:"fn(args: [?], callback?: ?)",incrby:"fn(args: [?], callback?: ?)",decrby:"fn(args: [?], callback?: ?)",getset:"fn(args: [?], callback?: ?)",mset:"fn(args: [?], callback?: ?)",msetnx:"fn(args: [?], callback?: ?)",randomkey:"fn(args: [?], callback?: ?)",select:"fn(args: [?], callback?: ?)",move:"fn(args: [?], callback?: ?)",rename:"fn(args: [?], callback?: ?)",renamenx:"fn(args: [?], callback?: ?)",expire:"fn(args: [?], callback?: ?)",expireat:"fn(args: [?], callback?: ?)",keys:"fn(args: [?], callback?: ?)",dbsize:"fn(args: [?], callback?: ?)",echo:"fn(args: [?], callback?: ?)",save:"fn(args: [?], callback?: ?)",bgsave:"fn(args: [?], callback?: ?)",bgrewriteaof:"fn(args: [?], callback?: ?)",shutdown:"fn(args: [?], callback?: ?)",lastsave:"fn(args: [?], callback?: ?)",type:"fn(args: [?], callback?: ?)",multi:"fn(args: [?], callback?: ?)",exec:"fn(args: [?], callback?: ?)",discard:"fn(args: [?], callback?: ?)",sync:"fn(args: [?], callback?: ?)",flushdb:"fn(args: [?], callback?: ?)",flushall:"fn(args: [?], callback?: ?)",sort:"fn(args: [?], callback?: ?)",info:"fn(args: [?], callback?: ?)",monitor:"fn(args: [?], callback?: ?)",ttl:"fn(args: [?], callback?: ?)",persist:"fn(args: [?], callback?: ?)",slaveof:"fn(args: [?], callback?: ?)",debug:"fn(args: [?], callback?: ?)",config:"fn(args: [?], callback?: ?)",unsubscribe:"fn(args: [?], callback?: ?)",psubscribe:"fn(args: [?], callback?: ?)",punsubscribe:"fn(args: [?], callback?: ?)",watch:"fn(args: [?], callback?: ?)",unwatch:"fn(args: [?], callback?: ?)",cluster:"fn(args: [?], callback?: ?)",restore:"fn(args: [?], callback?: ?)",migrate:"fn(args: [?], callback?: ?)",dump:"fn(args: [?], callback?: ?)",object:"fn(args: [?], callback?: ?)",client:"fn(args: [?], callback?: ?)",eval:"fn(args: [?], callback?: ?)",evalsha:"fn(args: [?], callback?: ?)",quit:"fn(args: [?], callback?: ?)"},createClient:"fn(port_arg: number, host_arg?: string, options?: ClientOpts) -> RedisClient",print:"fn(err: Error, reply: ?)",debug_mode:"bool",MessageHandler:{},ServerInfo:{redis_version:"string",versions:"[number]"}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require("acorn/util/walk")):"function"==typeof define&&define.amd?define("tern/plugin/orionRequire",["../lib/infer","../lib/tern","acorn/util/walk","./resolver"],e):void e(infer,tern,walk)}(function(e,t,n,r){"use strict";function o(t){return t.require||(t.require=new e.Fn("require",e.ANull,[e.cx().str],["module"],new e.AVal),t.require.computeRet=function(n,r,o){if(o.length&&"Literal"===o[0].type&&"string"==typeof o[0].value){var i=s(o[0].value,t);if(i)return i}return e.ANull}),t.require}function s(t,n){if("require"===t)return o(n);if("module"===t)return e.cx().definitions.requirejs.module;if(n.options.override&&Object.prototype.hasOwnProperty.call(n.options.override,t)){var r=n.options.override[t];if("string"==typeof r&&"="===r.charAt(0))return e.def.parsePath(r.slice(1));if("object"==typeof r){var s=i(t,n);if(s)return s;var c=n.interfaces[l(t)]=new e.Obj(null,l(t));return e.def.load(r,c),c}t=r}return s=a(t,n),s&&n.server.addFile(s.origin,null,n.currentFile),s}function i(e,t){var n=r.getResolved(e);return n&&n.file?t.interfaces[l(n.file)]:null}function a(t,n){var o=i(t,n);if(!o){var s=r.getResolved(t);s&&s.file&&(o=n.interfaces[l(s.file)]=new e.AVal,o.origin=s.file)}return o}function l(e){return e.replace(/\.js$/,"")}function c(t,n,r){var o=s(t,r);n.push(o?o:e.ANull)}function p(e){switch(e.type){case"ArrayExpression":return e.elements.map(p);case"Literal":return e.value;case"ObjectExpression":var t={};return e.properties.forEach(function(e){var n=e.key.name||e.key.value;t[n]=p(e.value)}),t}}function d(t){var n=e.cx().parent._requireJS.interfaces,r=t.roots["!requirejs"]=new e.Obj(null);for(var o in n){var s=r.defProp(o.replace(/\./g,"`"));n[o].propagate(s),s.origin=n[o].origin}}var u=50;e.registerFunction("requireJS",function(t,n,r){var o=e.cx().parent,s=o&&o._requireJS;if(!s||!n.length)return e.ANull;var i=s.currentFile,a=s.interfaces[l(i)]=new e.AVal;a.origin=i;var p,d=[];if(r&&n.length>1){var h=r[2===n.length?0:1];if("Literal"===h.type&&"string"==typeof h.value)c(h.value,d,s);else if("ArrayExpression"===h.type)for(var f=0;f<h.elements.length;++f){var m=h.elements[f];if("Literal"===m.type&&"string"==typeof m.value)if("exports"===m.value){var g=new e.Obj(!0);d.push(g),a.addType(g,u)}else c(m.value,d,s)}}else r&&1===n.length&&"FunctionExpression"===r[0].type&&r[0].params.length&&(g=new e.Obj(!0),c("require",d,s),d.push(g),a.addType(g,u),p=n[0]);return p||(p=n[Math.min(n.length-1,2)],p.isEmpty()||p.getFunctionType()||(p=null)),p?p.propagate(new e.IsCallee(e.ANull,d,null,a)):n.length&&n[0].propagate(a),e.ANull}),e.registerFunction("requireJSConfig",function(t,n,r){var o=e.cx().parent,s=o&&o._requireJS;if(s&&r&&r.length&&"ObjectExpression"===r[0].type){var i=p(r[0]);for(var a in i)if(i.hasOwnProperty(a)){var l=i[a],c=s.options[a];if(c){if("paths"===a)for(var d in l)l.hasOwnProperty(d)&&!s.options.paths[d]&&(s.options.paths[d]=l[d])}else s.options[a]=l}}return e.ANull}),t.registerPlugin("orionRequire",function(t,n){return t._requireJS={interfaces:Object.create(null),options:n||{},currentFile:null,server:t,resolved:Object.create(null)},t.on("beforeLoad",function(e){this._requireJS.currentFile=e.name}),t.on("reset",function(){this._requireJS.interfaces=Object.create(null),this._requireJS.require=null}),{defs:h,passes:{preCondenseReach:d,postLoadDef:function(t){var n=e.cx(),r=n.definitions[t["!name"]]["!requirejs"],t=n.parent._requireJS;if(r)for(var o in r.props)r.props[o].propagate(s(o,t))},postParse:function(e){r.doPostParse(t,e)},preInfer:function(){r.doPreInfer(t)}}}});var h={"!name":"requirejs","!define":{module:{id:"string",uri:"string",config:"fn() -> ?",exports:"?"}},requirejs:{"!type":"fn(deps: [string], callback: fn(), errback: fn()) -> !custom:requireJS",onError:"fn(err: +Error)",load:"fn(context: ?, moduleName: string, url: string)",config:"fn(config: ?) -> !custom:requireJSConfig",version:"string",isBrowser:"bool"},require:"requirejs",define:{"!type":"fn(deps: [string], callback: fn()) -> !custom:requireJS",amd:{jQuery:"bool"}}}}),define("tern/plugin/ternPlugins",["../lib/infer","../lib/tern","acorn/util/walk"],function(e,t){t.registerPlugin("ternPlugins",function(){return{}}),t.defineQueryType("installed_plugins",{run:function(e){return e.options&&"object"==typeof e.options.plugins?e.options.plugins:null}}),t.defineQueryType("environments",{run:function(e){if(e.options&&"object"==typeof e.options.plugins){for(var t=e.options.plugins,n=Object.keys(t),r=Object.create(null),o=0;o<n.length;o++){var s=n[o],i=t[s].env;i&&(r[i]=!0)}return r}return null}}),t.defineQueryType("install_plugins",{run:function(){}}),t.defineQueryType("remove_plugins",{run:function(){}}),t.defineQueryType("plugin_enablement",{run:function(){}})}),define("requirejs/text",["module"],function(e){"use strict";var t,n,r,o,s,i=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],a=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!=typeof location&&location.href,p=c&&location.protocol&&location.protocol.replace(/\:/,""),d=c&&location.hostname,u=c&&(location.port||void 0),h={},f=e.config&&e.config()||{};return t={version:"2.0.12",strip:function(e){if(e){e=e.replace(a,"");var t=e.match(l);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:f.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;3>t;t+=1){n=i[t];try{e=new ActiveXObject(n)}catch(r){}if(e){i=[n];break}}return e},parseName:function(e){var t,n,r,o=!1,s=e.indexOf("."),i=0===e.indexOf("./")||0===e.indexOf("../");return-1!==s&&(!i||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),-1!==s&&(o="strip"===r.substring(s+1),r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:o}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,o){var s,i,a,l=t.xdRegExp.exec(e);return l?(s=l[2],i=l[3],i=i.split(":"),a=i[1],i=i[0],!(s&&s!==n||i&&i.toLowerCase()!==r.toLowerCase()||(a||i)&&a!==o)):!0},finishLoad:function(e,n,r,o){r=n?t.strip(r):r,f.isBuild&&(h[e]=r),o(r)},load:function(e,n,r,o){if(o&&o.isBuild&&!o.inlineText)return void r();f.isBuild=o&&o.isBuild;var s=t.parseName(e),i=s.moduleName+(s.ext?"."+s.ext:""),a=n.toUrl(i),l=f.useXhr||t.useXhr;return 0===a.indexOf("empty:")?void r():void(!c||l(a,p,d,u)?t.get(a,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([i],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)}))},write:function(e,n,r){if(h.hasOwnProperty(n)){var o=t.jsEscape(h[n]);r.asModule(e+"!"+n,"define(function () { return '"+o+"';});\n")}},writeFile:function(e,n,r,o,s){var i=t.parseName(n),a=i.ext?"."+i.ext:"",l=i.moduleName+a,c=r.toUrl(i.moduleName+a)+".js";t.load(l,r,function(){var n=function(e){return o(c,e)};n.asModule=function(e,t){return o.asModule(e,c,t)},t.write(e,l,n,s)},s)}},"node"===f.env||!f.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var o=n.readFileSync(e,"utf8");0===o.indexOf("﻿")&&(o=o.substring(1)),t(o)}catch(s){r&&r(s)}}):"xhr"===f.env||!f.env&&t.createXhr()?t.get=function(e,n,r,o){var s,i=t.createXhr();if(i.open("GET",e,!0),o)for(s in o)o.hasOwnProperty(s)&&i.setRequestHeader(s.toLowerCase(),o[s]);f.onXhr&&f.onXhr(i,e),i.onreadystatechange=function(){var t,o;4===i.readyState&&(t=i.status||0,t>399&&600>t?(o=new Error(e+" HTTP status: "+t),o.xhr=i,r&&r(o)):n(i.responseText),f.onXhrComplete&&f.onXhrComplete(i,e))},i.send(null)}:"rhino"===f.env||!f.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var n,r,o="utf-8",s=new java.io.File(e),i=java.lang.System.getProperty("line.separator"),a=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),o)),l="";try{for(n=new java.lang.StringBuffer,r=a.readLine(),r&&r.length()&&65279===r.charAt(0)&&(r=r.substring(1)),null!==r&&n.append(r);null!==(r=a.readLine());)n.append(i),n.append(r);l=String(n.toString())}finally{a.close()}t(l)}:("xpconnect"===f.env||!f.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(r=Components.classes,o=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,i,a,l={};s&&(e=e.replace(/\//g,"\\")),a=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(o.nsIFileInputStream),n.init(a,1,0,!1),i=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(o.nsIConverterInputStream),i.init(n,"utf-8",n.available(),o.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),i.readString(n.available(),l),i.close(),n.close(),t(l.value)}catch(c){throw new Error((a&&a.path||"")+": "+c)}}),t}),define("json",["requirejs/text"],function(e){var t=Object.create(null);return{load:function(n,r,o,s){e.get(r.toUrl(n),function(e){if(s.isBuild)t[n]=e,o(e);else{try{var r=JSON.parse(e)}catch(i){o.error(i)}o(r)}},o.error,{accept:"application/json"})},write:function(e,n,r){var o=t[n];o&&r('define("'+e+"!"+n+'", function(){ return '+o+";});\n")}}}),define("json!tern/defs/ecma5.json",function(){return{"!name":"ecma5","!define":{"Error.prototype":"Error.prototype"},Infinity:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Infinity","!doc":"A numeric value representing infinity."},undefined:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/undefined","!doc":"The value undefined."},NaN:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/NaN","!doc":"A value representing Not-A-Number."},Object:{"!type":"fn()",getPrototypeOf:{"!type":"fn(obj: ?) -> ?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/getPrototypeOf","!doc":"Returns the prototype (i.e. the internal prototype) of the specified object."},create:{"!type":"fn(proto: ?) -> !custom:Object_create","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/create","!doc":"Creates a new object with the specified prototype object and properties."},defineProperty:{"!type":"fn(obj: ?, prop: string, desc: ?)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/defineProperty","!doc":"Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. If you want to see how to use the Object.defineProperty method with a binary-flags-like syntax, see this article."},defineProperties:{"!type":"fn(obj: ?, props: ?)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/defineProperty","!doc":"Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. If you want to see how to use the Object.defineProperty method with a binary-flags-like syntax, see this article."},getOwnPropertyDescriptor:{"!type":"fn(obj: ?, prop: string) -> ?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor","!doc":"Returns a property descriptor for an own property (that is, one directly present on an object, not present by dint of being along an object's prototype chain) of a given object."},keys:{"!type":"fn(obj: ?) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/keys","!doc":"Returns an array of a given object's own enumerable properties, in the same order as that provided by a for-in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well)."},getOwnPropertyNames:{"!type":"fn(obj: ?) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames","!doc":"Returns an array of all properties (enumerable or not) found directly upon a given object."},seal:{"!type":"fn(obj: ?)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/seal","!doc":"Seals an object, preventing new properties from being added to it and marking all existing properties as non-configurable. Values of present properties can still be changed as long as they are writable."},isSealed:{"!type":"fn(obj: ?) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/isSealed","!doc":"Determine if an object is sealed."},freeze:{"!type":"fn(obj: ?)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/freeze","!doc":"Freezes an object: that is, prevents new properties from being added to it; prevents existing properties from being removed; and prevents existing properties, or their enumerability, configurability, or writability, from being changed. In essence the object is made effectively immutable. The method returns the object being frozen."},isFrozen:{"!type":"fn(obj: ?) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/isFrozen","!doc":"Determine if an object is frozen."},prototype:{"!stdProto":"Object",toString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/toString","!doc":"Returns a string representing the object."},toLocaleString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/toLocaleString","!doc":"Returns a string representing the object. This method is meant to be overriden by derived objects for locale-specific purposes."},valueOf:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/valueOf","!doc":"Returns the primitive value of the specified object"},hasOwnProperty:{"!type":"fn(prop: string) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/hasOwnProperty","!doc":"Returns a boolean indicating whether the object has the specified property."},propertyIsEnumerable:{"!type":"fn(prop: string) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable","!doc":"Returns a Boolean indicating whether the specified property is enumerable."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object","!doc":"Creates an object wrapper."},Function:{"!type":"fn(body: string) -> fn()",prototype:{"!stdProto":"Function",apply:{"!type":"fn(this: ?, args: [?])","!effects":["call and return !this this=!0 !1.<i> !1.<i> !1.<i>"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/apply","!doc":"Calls a function with a given this value and arguments provided as an array (or an array like object)."},call:{"!type":"fn(this: ?, args?: ?) -> !this.!ret","!effects":["call and return !this this=!0 !1 !2 !3 !4"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/call","!doc":"Calls a function with a given this value and arguments provided individually."},bind:{"!type":"fn(this: ?, args?: ?) -> !custom:Function_bind","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind","!doc":"Creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function was called."},prototype:"?"},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function","!doc":"Every function in JavaScript is actually a Function object."},Array:{"!type":"fn(size: number) -> !custom:Array_ctor",isArray:{"!type":"fn(value: ?) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/isArray","!doc":"Returns true if an object is an array, false if it is not."},prototype:{"!stdProto":"Array",length:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/length","!doc":"An unsigned, 32-bit integer that specifies the number of elements in an array."},concat:{"!type":"fn(other: [?]) -> !this","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/concat","!doc":"Returns a new array comprised of this array joined with other array(s) and/or value(s)."},join:{"!type":"fn(separator?: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/join","!doc":"Joins all elements of an array into a string."},splice:{"!type":"fn(pos: number, amount: number)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/splice","!doc":"Changes the content of an array, adding new elements while removing old elements."},pop:{"!type":"fn() -> !this.<i>","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/pop","!doc":"Removes the last element from an array and returns that element."},push:{"!type":"fn(newelt: ?) -> number","!effects":["propagate !0 !this.<i>"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/push","!doc":"Mutates an array by appending the given elements and returning the new length of the array."},shift:{"!type":"fn() -> !this.<i>","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/shift","!doc":"Removes the first element from an array and returns that element. This method changes the length of the array."},unshift:{"!type":"fn(newelt: ?) -> number","!effects":["propagate !0 !this.<i>"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/unshift","!doc":"Adds one or more elements to the beginning of an array and returns the new length of the array."},slice:{"!type":"fn(from: number, to?: number) -> !this","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/slice","!doc":"Returns a shallow copy of a portion of an array."},reverse:{"!type":"fn()","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/reverse","!doc":"Reverses an array in place.  The first array element becomes the last and the last becomes the first."},sort:{"!type":"fn(compare?: fn(a: ?, b: ?) -> number)","!effects":["call !0 !this.<i> !this.<i>"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort","!doc":"Sorts the elements of an array in place and returns the array."},indexOf:{"!type":"fn(elt: ?, from?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf","!doc":"Returns the first index at which a given element can be found in the array, or -1 if it is not present."},lastIndexOf:{"!type":"fn(elt: ?, from?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/lastIndexOf","!doc":"Returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex."},every:{"!type":"fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> bool","!effects":["call !0 this=!1 !this.<i> number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/every","!doc":"Tests whether all elements in the array pass the test implemented by the provided function."},some:{"!type":"fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> bool","!effects":["call !0 this=!1 !this.<i> number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/some","!doc":"Tests whether some element in the array passes the test implemented by the provided function."},filter:{"!type":"fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> !this","!effects":["call !0 this=!1 !this.<i> number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/filter","!doc":"Creates a new array with all elements that pass the test implemented by the provided function."},forEach:{"!type":"fn(f: fn(elt: ?, i: number), context?: ?)","!effects":["call !0 this=!1 !this.<i> number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach","!doc":"Executes a provided function once per array element."},map:{"!type":"fn(f: fn(elt: ?, i: number) -> ?, context?: ?) -> [!0.!ret]","!effects":["call !0 this=!1 !this.<i> number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/map","!doc":"Creates a new array with the results of calling a provided function on every element in this array."},reduce:{"!type":"fn(combine: fn(sum: ?, elt: ?, i: number) -> ?, init?: ?) -> !0.!ret","!effects":["call !0 !1 !this.<i> number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/Reduce","!doc":"Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value."},reduceRight:{"!type":"fn(combine: fn(sum: ?, elt: ?, i: number) -> ?, init?: ?) -> !0.!ret","!effects":["call !0 !1 !this.<i> number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/ReduceRight","!doc":"Apply a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array","!doc":"The JavaScript Array global object is a constructor for arrays, which are high-level, list-like objects."},String:{"!type":"fn(value: ?) -> string",fromCharCode:{"!type":"fn(code: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/fromCharCode","!doc":"Returns a string created by using the specified sequence of Unicode values."},prototype:{"!stdProto":"String",length:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/JavaScript/Reference/Global_Objects/String/length","!doc":"Represents the length of a string."},"<i>":"string",charAt:{"!type":"fn(i: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/charAt","!doc":"Returns the specified character from a string."},charCodeAt:{"!type":"fn(i: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/charCodeAt","!doc":"Returns the numeric Unicode value of the character at the given index (except for unicode codepoints > 0x10000)."},indexOf:{"!type":"fn(char: string, from?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/indexOf","!doc":"Returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex,\nreturns -1 if the value is not found."},lastIndexOf:{"!type":"fn(char: string, from?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/lastIndexOf","!doc":"Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found. The calling string is searched backward, starting at fromIndex."},substring:{"!type":"fn(from: number, to?: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/substring","!doc":"Returns a subset of a string between one index and another, or through the end of the string."},substr:{"!type":"fn(from: number, length?: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/substr","!doc":"Returns the characters in a string beginning at the specified location through the specified number of characters."},slice:{"!type":"fn(from: number, to?: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/slice","!doc":"Extracts a section of a string and returns a new string."},trim:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim","!doc":"Removes whitespace from both ends of the string."},trimLeft:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/TrimLeft","!doc":"Removes whitespace from the left end of the string."},trimRight:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/TrimRight","!doc":"Removes whitespace from the right end of the string."},toUpperCase:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toUpperCase","!doc":"Returns the calling string value converted to uppercase."},toLowerCase:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toLowerCase","!doc":"Returns the calling string value converted to lowercase."},toLocaleUpperCase:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase","!doc":"Returns the calling string value converted to upper case, according to any locale-specific case mappings."},toLocaleLowerCase:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase","!doc":"Returns the calling string value converted to lower case, according to any locale-specific case mappings."},split:{"!type":"fn(pattern: string) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/split","!doc":"Splits a String object into an array of strings by separating the string into substrings."},concat:{"!type":"fn(other: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/concat","!doc":"Combines the text of two or more strings and returns a new string."},localeCompare:{"!type":"fn(other: string) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/localeCompare","!doc":"Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order."},match:{"!type":"fn(pattern: +RegExp) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/match","!doc":"Used to retrieve the matches when matching a string against a regular expression."},replace:{"!type":"fn(pattern: +RegExp, replacement: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/replace","!doc":"Returns a new string with some or all matches of a pattern replaced by a replacement.  The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match."},search:{"!type":"fn(pattern: +RegExp) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/search","!doc":"Executes the search for a match between a regular expression and this String object."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String","!doc":"The String global object is a constructor for strings, or a sequence of characters."},Number:{"!type":"fn(value: ?) -> number",MAX_VALUE:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/MAX_VALUE","!doc":"The maximum numeric value representable in JavaScript."},MIN_VALUE:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/MIN_VALUE","!doc":"The smallest positive numeric value representable in JavaScript."},POSITIVE_INFINITY:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY","!doc":"A value representing the positive Infinity value."},NEGATIVE_INFINITY:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY","!doc":"A value representing the negative Infinity value."},prototype:{"!stdProto":"Number",toString:{"!type":"fn(radix?: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toString","!doc":"Returns a string representing the specified Number object"},toFixed:{"!type":"fn(digits: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toFixed","!doc":"Formats a number using fixed-point notation"},toExponential:{"!type":"fn(digits: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toExponential","!doc":"Returns a string representing the Number object in exponential notation"}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number","!doc":"The Number JavaScript object is a wrapper object allowing you to work with numerical values. A Number object is created using the Number() constructor."},Boolean:{"!type":"fn(value: ?) -> bool",prototype:{"!stdProto":"Boolean"},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean","!doc":"The Boolean object is an object wrapper for a boolean value."},RegExp:{"!type":"fn(source: string, flags?: string)",prototype:{"!stdProto":"RegExp",exec:{"!type":"fn(input: string) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/exec","!doc":"Executes a search for a match in a specified string. Returns a result array, or null."},compile:{"!type":"fn(source: string, flags?: string)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp","!doc":"Creates a regular expression object for matching text with a pattern."},test:{"!type":"fn(input: string) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/test","!doc":"Executes the search for a match between a regular expression and a specified string. Returns true or false."},global:{"!type":"bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp","!doc":"Creates a regular expression object for matching text with a pattern."},ignoreCase:{"!type":"bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp","!doc":"Creates a regular expression object for matching text with a pattern."},multiline:{"!type":"bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/multiline","!doc":"Reflects whether or not to search in strings across multiple lines.\n"},source:{"!type":"string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/source","!doc":"A read-only property that contains the text of the pattern, excluding the forward slashes.\n"},lastIndex:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/lastIndex","!doc":"A read/write integer property that specifies the index at which to start the next match."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp","!doc":"Creates a regular expression object for matching text with a pattern."},Date:{"!type":"fn(ms: number)",parse:{"!type":"fn(source: string) -> +Date","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/parse","!doc":"Parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC."},UTC:{"!type":"fn(year: number, month: number, date: number, hour?: number, min?: number, sec?: number, ms?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/UTC","!doc":"Accepts the same parameters as the longest form of the constructor, and returns the number of milliseconds in a Date object since January 1, 1970, 00:00:00, universal time."},now:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/now","!doc":"Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC."},prototype:{toUTCString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toUTCString","!doc":"Converts a date to a string, using the universal time convention."},toISOString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toISOString","!doc":"JavaScript provides a direct way to convert a date object into a string in ISO format, the ISO 8601 Extended Format."},toDateString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toDateString","!doc":"Returns the date portion of a Date object in human readable form in American English."},toTimeString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toTimeString","!doc":"Returns the time portion of a Date object in human readable form in American English."},toLocaleDateString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toLocaleDateString","!doc":"Converts a date to a string, returning the \"date\" portion using the operating system's locale's conventions.\n"},toLocaleTimeString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString","!doc":'Converts a date to a string, returning the "time" portion using the current locale\'s conventions.'},getTime:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTime","!doc":"Returns the numeric value corresponding to the time for the specified date according to universal time."},getFullYear:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getFullYear","!doc":"Returns the year of the specified date according to local time."},getYear:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getYear","!doc":"Returns the year in the specified date according to local time."},getMonth:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getMonth","!doc":"Returns the month in the specified date according to local time."},getUTCMonth:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCMonth","!doc":"Returns the month of the specified date according to universal time.\n"},getDate:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getDate","!doc":"Returns the day of the month for the specified date according to local time."},getUTCDate:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCDate","!doc":"Returns the day (date) of the month in the specified date according to universal time.\n"},getDay:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getDay","!doc":"Returns the day of the week for the specified date according to local time."},getUTCDay:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCDay","!doc":"Returns the day of the week in the specified date according to universal time.\n"},getHours:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getHours","!doc":"Returns the hour for the specified date according to local time."},getUTCHours:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCHours","!doc":"Returns the hours in the specified date according to universal time.\n"},getMinutes:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getMinutes","!doc":"Returns the minutes in the specified date according to local time."},getUTCMinutes:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date","!doc":"Creates JavaScript Date instances which let you work with dates and times."},getSeconds:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getSeconds","!doc":"Returns the seconds in the specified date according to local time."},getUTCSeconds:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCSeconds","!doc":"Returns the seconds in the specified date according to universal time.\n"},getMilliseconds:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getMilliseconds","!doc":"Returns the milliseconds in the specified date according to local time."},getUTCMilliseconds:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds","!doc":"Returns the milliseconds in the specified date according to universal time.\n"},getTimezoneOffset:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset","!doc":"Returns the time-zone offset from UTC, in minutes, for the current locale."},setTime:{"!type":"fn(date: +Date) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setTime","!doc":"Sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n"},setFullYear:{"!type":"fn(year: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setFullYear","!doc":"Sets the full year for a specified date according to local time.\n"},setUTCFullYear:{"!type":"fn(year: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCFullYear","!doc":"Sets the full year for a specified date according to universal time.\n"},setMonth:{"!type":"fn(month: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setMonth","!doc":"Set the month for a specified date according to local time."},setUTCMonth:{"!type":"fn(month: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCMonth","!doc":"Sets the month for a specified date according to universal time.\n"},setDate:{"!type":"fn(day: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setDate","!doc":"Sets the day of the month for a specified date according to local time."},setUTCDate:{"!type":"fn(day: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCDate","!doc":"Sets the day of the month for a specified date according to universal time.\n"},setHours:{"!type":"fn(hour: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setHours","!doc":"Sets the hours for a specified date according to local time, and returns the number of milliseconds since 1 January 1970 00:00:00 UTC until the time represented by the updated Date instance."},setUTCHours:{"!type":"fn(hour: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCHours","!doc":"Sets the hour for a specified date according to universal time.\n"},setMinutes:{"!type":"fn(min: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setMinutes","!doc":"Sets the minutes for a specified date according to local time."},setUTCMinutes:{"!type":"fn(min: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCMinutes","!doc":"Sets the minutes for a specified date according to universal time.\n"},setSeconds:{"!type":"fn(sec: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setSeconds","!doc":"Sets the seconds for a specified date according to local time."},setUTCSeconds:{"!type":"fn(sec: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCSeconds","!doc":"Sets the seconds for a specified date according to universal time.\n"},setMilliseconds:{"!type":"fn(ms: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setMilliseconds","!doc":"Sets the milliseconds for a specified date according to local time.\n"},setUTCMilliseconds:{"!type":"fn(ms: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds","!doc":"Sets the milliseconds for a specified date according to universal time.\n"}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date","!doc":"Creates JavaScript Date instances which let you work with dates and times."},Error:{"!type":"fn(message: string)",prototype:{name:{"!type":"string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Error/name","!doc":"A name for the type of error."},message:{"!type":"string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Error/message","!doc":"A human-readable description of the error."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Error","!doc":"Creates an error object."},SyntaxError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/SyntaxError","!doc":"Represents an error when trying to interpret syntactically invalid code."},ReferenceError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/ReferenceError","!doc":"Represents an error when a non-existent variable is referenced."},URIError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/URIError","!doc":"Represents an error when a malformed URI is encountered."},EvalError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/EvalError","!doc":"Represents an error regarding the eval function."},RangeError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RangeError","!doc":"Represents an error when a number is not within the correct range allowed."},parseInt:{"!type":"fn(string: string, radix?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseInt","!doc":"Parses a string argument and returns an integer of the specified radix or base."},parseFloat:{"!type":"fn(string: string) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseFloat","!doc":"Parses a string argument and returns a floating point number."},isNaN:{"!type":"fn(value: number) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/isNaN","!doc":"Determines whether a value is NaN or not. Be careful, this function is broken. You may be interested in ECMAScript 6 Number.isNaN."},eval:{"!type":"fn(code: string) -> ?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/eval","!doc":"Evaluates JavaScript code represented as a string."},encodeURI:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURI","!doc":'Encodes a Uniform Resource Identifier (URI) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).'},encodeURIComponent:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent","!doc":'Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).'},decodeURI:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/decodeURI","!doc":"Decodes a Uniform Resource Identifier (URI) previously created by encodeURI or by a similar routine."},decodeURIComponent:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/decodeURIComponent","!doc":"Decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent or by a similar routine."},Math:{E:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/E","!doc":"The base of natural logarithms, e, approximately 2.718."},LN2:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/LN2","!doc":"The natural logarithm of 2, approximately 0.693."},LN10:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/LN10","!doc":"The natural logarithm of 10, approximately 2.302."},LOG2E:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/LOG2E","!doc":"The base 2 logarithm of E (approximately 1.442)."},LOG10E:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/LOG10E","!doc":"The base 10 logarithm of E (approximately 0.434)."},SQRT1_2:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/SQRT1_2","!doc":"The square root of 1/2; equivalently, 1 over the square root of 2, approximately 0.707."},SQRT2:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/SQRT2","!doc":"The square root of 2, approximately 1.414."},PI:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/PI","!doc":"The ratio of the circumference of a circle to its diameter, approximately 3.14159."},abs:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/abs","!doc":"Returns the absolute value of a number."},cos:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/cos","!doc":"Returns the cosine of a number."},sin:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/sin","!doc":"Returns the sine of a number."},tan:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/tan","!doc":"Returns the tangent of a number."},acos:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/acos","!doc":"Returns the arccosine (in radians) of a number."},asin:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/asin","!doc":"Returns the arcsine (in radians) of a number."},atan:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/atan","!doc":"Returns the arctangent (in radians) of a number."},atan2:{"!type":"fn(y: number, x: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/atan2","!doc":"Returns the arctangent of the quotient of its arguments."},ceil:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/ceil","!doc":"Returns the smallest integer greater than or equal to a number."},floor:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/floor","!doc":"Returns the largest integer less than or equal to a number."},round:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/round","!doc":"Returns the value of a number rounded to the nearest integer."},exp:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/exp","!doc":"Returns Ex, where x is the argument, and E is Euler's constant, the base of the natural logarithms."},log:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/log","!doc":"Returns the natural logarithm (base E) of a number."},sqrt:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/sqrt","!doc":"Returns the square root of a number."},pow:{"!type":"fn(number, number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/pow","!doc":"Returns base to the exponent power, that is, baseexponent."},max:{"!type":"fn(number, number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/max","!doc":"Returns the largest of zero or more numbers."},min:{"!type":"fn(number, number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/min","!doc":"Returns the smallest of zero or more numbers."},random:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/random","!doc":"Returns a floating-point, pseudo-random number in the range [0, 1) that is, from 0 (inclusive) up to but not including 1 (exclusive), which you can then scale to your desired range."},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math","!doc":"A built-in object that has properties and methods for mathematical constants and functions."},JSON:{parse:{"!type":"fn(json: string) -> ?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/parse","!doc":"Parse a string as JSON, optionally transforming the value produced by parsing."},stringify:{"!type":"fn(value: ?) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify","!doc":"Convert a value to JSON, optionally replacing values if a replacer function is specified, or optionally including only the specified properties if a replacer array is specified."},"!url":"https://developer.mozilla.org/en-US/docs/JSON","!doc":"JSON (JavaScript Object Notation) is a data-interchange format.  It closely resembles a subset of JavaScript syntax, although it is not a strict subset. (See JSON in the JavaScript Reference for full details.)  It is useful when writing any kind of JavaScript-based application, including websites and browser extensions.  For example, you might store user information in JSON format in a cookie, or you might store extension preferences in JSON in a string-valued browser preference."}}
}),define("json!tern/defs/browser.json",function(){return{"!name":"browser",location:{assign:{"!type":"fn(url: string)","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"Load the document at the provided URL."},replace:{"!type":"fn(url: string)","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"Replace the current document with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session history, meaning the user won't be able to use the Back button to navigate to it."},reload:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"Reload the document from the current URL. forceget is a boolean, which, when it is true, causes the page to always be reloaded from the server. If it is false or not specified, the browser may reload the page from its cache."},origin:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The origin of the URL."},hash:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The part of the URL that follows the # symbol, including the # symbol."},search:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The part of the URL that follows the ? symbol, including the ? symbol."},pathname:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The path (relative to the host)."},port:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The port number of the URL."},hostname:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The host name (without the port number or square brackets)."},host:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The host name and port number."},protocol:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The protocol of the URL."},href:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The entire URL."},"!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"Returns a location object with information about the current location of the document. Assigning to the location property changes the current page to the new address."},Node:{"!type":"fn()",prototype:{parentElement:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.parentElement","!doc":"Returns the DOM node's parent Element, or null if the node either has no parent, or its parent isn't a DOM Element."},textContent:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.textContent","!doc":"Gets or sets the text content of a node and its descendants."},baseURI:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.baseURI","!doc":"The absolute base URI of a node or null if unable to obtain an absolute URI."},localName:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.localName","!doc":"Returns the local part of the qualified name of this node."},prefix:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.prefix","!doc":"Returns the namespace prefix of the specified node, or null if no prefix is specified. This property is read only."},namespaceURI:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.namespaceURI","!doc":"The namespace URI of the node, or null if the node is not in a namespace (read-only). When the node is a document, it returns the XML namespace for the current document."},ownerDocument:{"!type":"+Document","!url":"https://developer.mozilla.org/en/docs/DOM/Node.ownerDocument","!doc":"The ownerDocument property returns the top-level document object for this node."},attributes:{"!type":"+NamedNodeMap","!url":"https://developer.mozilla.org/en/docs/DOM/Node.attributes","!doc":"A collection of all attribute nodes registered to the specified node. It is a NamedNodeMap,not an Array, so it has no Array methods and the Attr nodes' indexes may differ among browsers."},nextSibling:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nextSibling","!doc":"Returns the node immediately following the specified one in its parent's childNodes list, or null if the specified node is the last node in that list."},previousSibling:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.previousSibling","!doc":"Returns the node immediately preceding the specified one in its parent's childNodes list, null if the specified node is the first in that list."},lastChild:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.lastChild","!doc":"Returns the last child of a node."},firstChild:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.firstChild","!doc":"Returns the node's first child in the tree, or null if the node is childless. If the node is a Document, it returns the first node in the list of its direct children."},childNodes:{"!type":"+NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/Node.childNodes","!doc":"Returns a collection of child nodes of the given element."},parentNode:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.parentNode","!doc":"Returns the parent of the specified node in the DOM tree."},nodeType:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nodeType","!doc":"Returns an integer code representing the type of the node."},nodeValue:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nodeValue","!doc":"Returns or sets the value of the current node."},nodeName:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nodeName","!doc":"Returns the name of the current node as a string."},tagName:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nodeName","!doc":"Returns the name of the current node as a string."},insertBefore:{"!type":"fn(newElt: +Element, before: +Element) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.insertBefore","!doc":"Inserts the specified node before a reference element as a child of the current node."},replaceChild:{"!type":"fn(newElt: +Element, oldElt: +Element) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.replaceChild","!doc":"Replaces one child node of the specified element with another."},removeChild:{"!type":"fn(oldElt: +Element) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.removeChild","!doc":"Removes a child node from the DOM. Returns removed node."},appendChild:{"!type":"fn(newElt: +Element) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.appendChild","!doc":"Adds a node to the end of the list of children of a specified parent node. If the node already exists it is removed from current parent node, then added to new parent node."},hasChildNodes:{"!type":"fn() -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.hasChildNodes","!doc":"Returns a Boolean value indicating whether the current Node has child nodes or not."},cloneNode:{"!type":"fn(deep: bool) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.cloneNode","!doc":"Returns a duplicate of the node on which this method was called."},normalize:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Node.normalize","!doc":'Puts the specified node and all of its subtree into a "normalized" form. In a normalized subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.'},isSupported:{"!type":"fn(features: string, version: number) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.isSupported","!doc":"Tests whether the DOM implementation implements a specific feature and that feature is supported by this node."},hasAttributes:{"!type":"fn() -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.hasAttributes","!doc":"Returns a boolean value of true or false, indicating if the current element has any attributes or not."},lookupPrefix:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.lookupPrefix","!doc":"Returns the prefix for a given namespaceURI if present, and null if not. When multiple prefixes are possible, the result is implementation-dependent."},isDefaultNamespace:{"!type":"fn(uri: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.isDefaultNamespace","!doc":"Accepts a namespace URI as an argument and returns true if the namespace is the default namespace on the given node or false if not."},lookupNamespaceURI:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.lookupNamespaceURI","!doc":"Takes a prefix and returns the namespaceURI associated with it on the given node if found (and null if not). Supplying null for the prefix will return the default namespace."},addEventListener:{"!type":"fn(type: string, listener: fn(e: +Event), capture: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.addEventListener","!doc":"Registers a single event listener on a single target. The event target may be a single element in a document, the document itself, a window, or an XMLHttpRequest."},removeEventListener:{"!type":"fn(type: string, listener: fn(), capture: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.removeEventListener","!doc":"Allows the removal of event listeners from the event target."},isSameNode:{"!type":"fn(other: +Node) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.isSameNode","!doc":"Tests whether two nodes are the same, that is they reference the same object."},isEqualNode:{"!type":"fn(other: +Node) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.isEqualNode","!doc":"Tests whether two nodes are equal."},compareDocumentPosition:{"!type":"fn(other: +Node) -> number","!url":"https://developer.mozilla.org/en/docs/DOM/Node.compareDocumentPosition","!doc":"Compares the position of the current node against another node in any other document."},contains:{"!type":"fn(other: +Node) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.contains","!doc":"Indicates whether a node is a descendent of a given node."},dispatchEvent:{"!type":"fn(event: +Event) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.dispatchEvent","!doc":"Dispatches an event into the event system. The event is subject to the same capturing and bubbling behavior as directly dispatched events."},ELEMENT_NODE:"number",ATTRIBUTE_NODE:"number",TEXT_NODE:"number",CDATA_SECTION_NODE:"number",ENTITY_REFERENCE_NODE:"number",ENTITY_NODE:"number",PROCESSING_INSTRUCTION_NODE:"number",COMMENT_NODE:"number",DOCUMENT_NODE:"number",DOCUMENT_TYPE_NODE:"number",DOCUMENT_FRAGMENT_NODE:"number",NOTATION_NODE:"number",DOCUMENT_POSITION_DISCONNECTED:"number",DOCUMENT_POSITION_PRECEDING:"number",DOCUMENT_POSITION_FOLLOWING:"number",DOCUMENT_POSITION_CONTAINS:"number",DOCUMENT_POSITION_CONTAINED_BY:"number",DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:"number"},"!url":"https://developer.mozilla.org/en/docs/DOM/Node","!doc":"A Node is an interface from which a number of DOM types inherit, and allows these various types to be treated (or tested) similarly."},Element:{"!type":"fn()",prototype:{"!proto":"Node.prototype",getAttribute:{"!type":"fn(name: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/element.getAttribute","!doc":'Returns the value of the named attribute on the specified element. If the named attribute does not exist, the value returned will either be null or "" (the empty string).'},setAttribute:{"!type":"fn(name: string, value: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.setAttribute","!doc":"Adds a new attribute or changes the value of an existing attribute on the specified element."},removeAttribute:{"!type":"fn(name: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.removeAttribute","!doc":"Removes an attribute from the specified element."},getAttributeNode:{"!type":"fn(name: string) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.getAttributeNode","!doc":"Returns the specified attribute of the specified element, as an Attr node."},getElementsByTagName:{"!type":"fn(tagName: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/element.getElementsByTagName","!doc":"Returns a list of elements with the given tag name. The subtree underneath the specified element is searched, excluding the element itself. The returned list is live, meaning that it updates itself with the DOM tree automatically. Consequently, there is no need to call several times element.getElementsByTagName with the same element and arguments."},getElementsByTagNameNS:{"!type":"fn(ns: string, tagName: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/element.getElementsByTagNameNS","!doc":"Returns a list of elements with the given tag name belonging to the given namespace."},getAttributeNS:{"!type":"fn(ns: string, name: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/element.getAttributeNS","!doc":'Returns the string value of the attribute with the specified namespace and name. If the named attribute does not exist, the value returned will either be null or "" (the empty string).'},setAttributeNS:{"!type":"fn(ns: string, name: string, value: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.setAttributeNS","!doc":"Adds a new attribute or changes the value of an attribute with the given namespace and name."},removeAttributeNS:{"!type":"fn(ns: string, name: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.removeAttributeNS","!doc":"removeAttributeNS removes the specified attribute from an element."},getAttributeNodeNS:{"!type":"fn(ns: string, name: string) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.getAttributeNodeNS","!doc":"Returns the Attr node for the attribute with the given namespace and name."},hasAttribute:{"!type":"fn(name: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/element.hasAttribute","!doc":"hasAttribute returns a boolean value indicating whether the specified element has the specified attribute or not."},hasAttributeNS:{"!type":"fn(ns: string, name: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/element.hasAttributeNS","!doc":"hasAttributeNS returns a boolean value indicating whether the current element has the specified attribute."},focus:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/element.focus","!doc":"Sets focus on the specified element, if it can be focused."},blur:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/element.blur","!doc":"The blur method removes keyboard focus from the current element."},scrollIntoView:{"!type":"fn(top: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollIntoView","!doc":"The scrollIntoView() method scrolls the element into view."},scrollByLines:{"!type":"fn(lines: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollByLines","!doc":"Scrolls the document by the given number of lines."},scrollByPages:{"!type":"fn(pages: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollByPages","!doc":"Scrolls the current document by the specified number of pages."},getElementsByClassName:{"!type":"fn(name: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/document.getElementsByClassName","!doc":"Returns a set of elements which have all the given class names. When called on the document object, the complete document is searched, including the root node. You may also call getElementsByClassName on any element; it will return only elements which are descendants of the specified root element with the given class names."},querySelector:{"!type":"fn(selectors: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/Element.querySelector","!doc":"Returns the first element that is a descendent of the element on which it is invoked that matches the specified group of selectors."},querySelectorAll:{"!type":"fn(selectors: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/Element.querySelectorAll","!doc":"Returns a non-live NodeList of all elements descended from the element on which it is invoked that match the specified group of CSS selectors."},getClientRects:{"!type":"fn() -> [+ClientRect]","!url":"https://developer.mozilla.org/en/docs/DOM/element.getClientRects","!doc":"Returns a collection of rectangles that indicate the bounding rectangles for each box in a client."},getBoundingClientRect:{"!type":"fn() -> +ClientRect","!url":"https://developer.mozilla.org/en/docs/DOM/element.getBoundingClientRect","!doc":"Returns a text rectangle object that encloses a group of text rectangles."},setAttributeNode:{"!type":"fn(attr: +Attr) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.setAttributeNode","!doc":"Adds a new Attr node to the specified element."},removeAttributeNode:{"!type":"fn(attr: +Attr) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.removeAttributeNode","!doc":"Removes the specified attribute from the current element."},setAttributeNodeNS:{"!type":"fn(attr: +Attr) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.setAttributeNodeNS","!doc":"Adds a new namespaced attribute node to an element."},insertAdjacentHTML:{"!type":"fn(position: string, text: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.insertAdjacentHTML","!doc":"Parses the specified text as HTML or XML and inserts the resulting nodes into the DOM tree at a specified position. It does not reparse the element it is being used on and thus it does not corrupt the existing elements inside the element. This, and avoiding the extra step of serialization make it much faster than direct innerHTML manipulation."},children:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/Element.children","!doc":"Returns a collection of child elements of the given element."},childElementCount:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Element.childElementCount","!doc":"Returns the number of child elements of the given element."},className:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/element.className","!doc":"Gets and sets the value of the class attribute of the specified element."},style:{cssText:"string",alignmentBaseline:"string",background:"string",backgroundAttachment:"string",backgroundClip:"string",backgroundColor:"string",backgroundImage:"string",backgroundOrigin:"string",backgroundPosition:"string",backgroundPositionX:"string",backgroundPositionY:"string",backgroundRepeat:"string",backgroundRepeatX:"string",backgroundRepeatY:"string",backgroundSize:"string",baselineShift:"string",border:"string",borderBottom:"string",borderBottomColor:"string",borderBottomLeftRadius:"string",borderBottomRightRadius:"string",borderBottomStyle:"string",borderBottomWidth:"string",borderCollapse:"string",borderColor:"string",borderImage:"string",borderImageOutset:"string",borderImageRepeat:"string",borderImageSlice:"string",borderImageSource:"string",borderImageWidth:"string",borderLeft:"string",borderLeftColor:"string",borderLeftStyle:"string",borderLeftWidth:"string",borderRadius:"string",borderRight:"string",borderRightColor:"string",borderRightStyle:"string",borderRightWidth:"string",borderSpacing:"string",borderStyle:"string",borderTop:"string",borderTopColor:"string",borderTopLeftRadius:"string",borderTopRightRadius:"string",borderTopStyle:"string",borderTopWidth:"string",borderWidth:"string",bottom:"string",boxShadow:"string",boxSizing:"string",captionSide:"string",clear:"string",clip:"string",clipPath:"string",clipRule:"string",color:"string",colorInterpolation:"string",colorInterpolationFilters:"string",colorProfile:"string",colorRendering:"string",content:"string",counterIncrement:"string",counterReset:"string",cursor:"string",direction:"string",display:"string",dominantBaseline:"string",emptyCells:"string",enableBackground:"string",fill:"string",fillOpacity:"string",fillRule:"string",filter:"string","float":"string",floodColor:"string",floodOpacity:"string",font:"string",fontFamily:"string",fontSize:"string",fontStretch:"string",fontStyle:"string",fontVariant:"string",fontWeight:"string",glyphOrientationHorizontal:"string",glyphOrientationVertical:"string",height:"string",imageRendering:"string",kerning:"string",left:"string",letterSpacing:"string",lightingColor:"string",lineHeight:"string",listStyle:"string",listStyleImage:"string",listStylePosition:"string",listStyleType:"string",margin:"string",marginBottom:"string",marginLeft:"string",marginRight:"string",marginTop:"string",marker:"string",markerEnd:"string",markerMid:"string",markerStart:"string",mask:"string",maxHeight:"string",maxWidth:"string",minHeight:"string",minWidth:"string",opacity:"string",orphans:"string",outline:"string",outlineColor:"string",outlineOffset:"string",outlineStyle:"string",outlineWidth:"string",overflow:"string",overflowWrap:"string",overflowX:"string",overflowY:"string",padding:"string",paddingBottom:"string",paddingLeft:"string",paddingRight:"string",paddingTop:"string",page:"string",pageBreakAfter:"string",pageBreakBefore:"string",pageBreakInside:"string",pointerEvents:"string",position:"string",quotes:"string",resize:"string",right:"string",shapeRendering:"string",size:"string",speak:"string",src:"string",stopColor:"string",stopOpacity:"string",stroke:"string",strokeDasharray:"string",strokeDashoffset:"string",strokeLinecap:"string",strokeLinejoin:"string",strokeMiterlimit:"string",strokeOpacity:"string",strokeWidth:"string",tabSize:"string",tableLayout:"string",textAlign:"string",textAnchor:"string",textDecoration:"string",textIndent:"string",textLineThrough:"string",textLineThroughColor:"string",textLineThroughMode:"string",textLineThroughStyle:"string",textLineThroughWidth:"string",textOverflow:"string",textOverline:"string",textOverlineColor:"string",textOverlineMode:"string",textOverlineStyle:"string",textOverlineWidth:"string",textRendering:"string",textShadow:"string",textTransform:"string",textUnderline:"string",textUnderlineColor:"string",textUnderlineMode:"string",textUnderlineStyle:"string",textUnderlineWidth:"string",top:"string",unicodeBidi:"string",unicodeRange:"string",vectorEffect:"string",verticalAlign:"string",visibility:"string",whiteSpace:"string",width:"string",wordBreak:"string",wordSpacing:"string",wordWrap:"string",writingMode:"string",zIndex:"string",zoom:"string","!url":"https://developer.mozilla.org/en/docs/DOM/element.style","!doc":"Returns an object that represents the element's style attribute."},classList:{"!type":"+DOMTokenList","!url":"https://developer.mozilla.org/en/docs/DOM/element.classList","!doc":"Returns a token list of the class attribute of the element."},contentEditable:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/Element.contentEditable","!doc":"Indicates whether or not the element is editable."},firstElementChild:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.firstElementChild","!doc":"Returns the element's first child element or null if there are no child elements."},lastElementChild:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.lastElementChild","!doc":"Returns the element's last child element or null if there are no child elements."},nextElementSibling:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.nextElementSibling","!doc":"Returns the element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list."},previousElementSibling:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.previousElementSibling","!doc":"Returns the element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list."},tabIndex:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.tabIndex","!doc":"Gets/sets the tab order of the current element."},title:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/element.title","!doc":"Establishes the text to be displayed in a 'tool tip' popup when the mouse is over the displayed node."},width:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetWidth","!doc":"Returns the layout width of an element."},height:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetHeight","!doc":"Height of an element relative to the element's offsetParent."},getContext:{"!type":"fn(id: string) -> CanvasRenderingContext2D","!url":"https://developer.mozilla.org/en/docs/DOM/HTMLCanvasElement","!doc":"DOM canvas elements expose the HTMLCanvasElement interface, which provides properties and methods for manipulating the layout and presentation of canvas elements. The HTMLCanvasElement interface inherits the properties and methods of the element object interface."},supportsContext:"fn(id: string) -> bool",oncopy:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.oncopy","!doc":"The oncopy property returns the onCopy event handler code on the current element."},oncut:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.oncut","!doc":"The oncut property returns the onCut event handler code on the current element."},onpaste:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onpaste","!doc":"The onpaste property returns the onPaste event handler code on the current element."},onbeforeunload:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/HTML/Element/body","!doc":"The HTML <body> element represents the main content of an HTML document. There is only one <body> element in a document."},onfocus:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onfocus","!doc":"The onfocus property returns the onFocus event handler code on the current element."},onblur:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onblur","!doc":"The onblur property returns the onBlur event handler code, if any, that exists on the current element."},onchange:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onchange","!doc":"The onchange property sets and returns the onChange event handler code for the current element."},onclick:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onclick","!doc":"The onclick property returns the onClick event handler code on the current element."},ondblclick:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.ondblclick","!doc":"The ondblclick property returns the onDblClick event handler code on the current element."},onmousedown:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmousedown","!doc":"The onmousedown property returns the onMouseDown event handler code on the current element."},onmouseup:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmouseup","!doc":"The onmouseup property returns the onMouseUp event handler code on the current element."},onmousewheel:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/wheel","!doc":"The wheel event is fired when a wheel button of a pointing device (usually a mouse) is rotated. This event deprecates the legacy mousewheel event."},onmouseover:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmouseover","!doc":"The onmouseover property returns the onMouseOver event handler code on the current element."},onmouseout:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmouseout","!doc":"The onmouseout property returns the onMouseOut event handler code on the current element."},onmousemove:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmousemove","!doc":"The onmousemove property returns the mousemove event handler code on the current element."},oncontextmenu:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.oncontextmenu","!doc":'An event handler property for right-click events on the window. Unless the default behavior is prevented, the browser context menu will activate. Note that this event will occur with any non-disabled right-click event and does not depend on an element possessing the "contextmenu" attribute.'},onkeydown:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onkeydown","!doc":"The onkeydown property returns the onKeyDown event handler code on the current element."},onkeyup:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onkeyup","!doc":"The onkeyup property returns the onKeyUp event handler code for the current element."},onkeypress:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onkeypress","!doc":"The onkeypress property sets and returns the onKeyPress event handler code for the current element."},onresize:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onresize","!doc":"onresize returns the element's onresize event handler code. It can also be used to set the code to be executed when the resize event occurs."},onscroll:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onscroll","!doc":"The onscroll property returns the onScroll event handler code on the current element."},ondragstart:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DragDrop/Drag_Operations","!doc":"The following describes the steps that occur during a drag and drop operation."},ondragover:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/dragover","!doc":"The dragover event is fired when an element or text selection is being dragged over a valid drop target (every few hundred milliseconds)."},ondragleave:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/dragleave","!doc":"The dragleave event is fired when a dragged element or text selection leaves a valid drop target."},ondragenter:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/dragenter","!doc":"The dragenter event is fired when a dragged element or text selection enters a valid drop target."},ondragend:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/dragend","!doc":"The dragend event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key)."},ondrag:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/drag","!doc":"The drag event is fired when an element or text selection is being dragged (every few hundred milliseconds)."},offsetTop:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetTop","!doc":"Returns the distance of the current element relative to the top of the offsetParent node."},offsetLeft:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetLeft","!doc":"Returns the number of pixels that the upper left corner of the current element is offset to the left within the offsetParent node."},offsetHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetHeight","!doc":"Height of an element relative to the element's offsetParent."},offsetWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetWidth","!doc":"Returns the layout width of an element."},scrollTop:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollTop","!doc":"Gets or sets the number of pixels that the content of an element is scrolled upward."},scrollLeft:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollLeft","!doc":"Gets or sets the number of pixels that an element's content is scrolled to the left."},scrollHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollHeight","!doc":"Height of the scroll view of an element; it includes the element padding but not its margin."},scrollWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollWidth","!doc":"Read-only property that returns either the width in pixels of the content of an element or the width of the element itself, whichever is greater."},clientTop:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.clientTop","!doc":"The width of the top border of an element in pixels. It does not include the top margin or padding. clientTop is read-only."},clientLeft:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.clientLeft","!doc":"The width of the left border of an element in pixels. It includes the width of the vertical scrollbar if the text direction of the element is right-to-left and if there is an overflow causing a left vertical scrollbar to be rendered. clientLeft does not include the left margin or the left padding. clientLeft is read-only."},clientHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.clientHeight","!doc":"Returns the inner height of an element in pixels, including padding but not the horizontal scrollbar height, border, or margin."},clientWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.clientWidth","!doc":"The inner width of an element in pixels. It includes padding but not the vertical scrollbar (if present, if rendered), border or margin."},innerHTML:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/element.innerHTML","!doc":"Sets or gets the HTML syntax describing the element's descendants."},createdCallback:{"!type":"fn()","!url":"http://w3c.github.io/webcomponents/spec/custom/index.html#dfn-created-callback","!doc":"This callback is invoked after custom element instance is created and its definition is registered. The actual timing of this callback is defined further in this specification."},attachedCallback:{"!type":"fn()","!url":"http://w3c.github.io/webcomponents/spec/custom/index.html#dfn-entered-view-callback","!doc":"Unless specified otherwise, this callback must be enqueued whenever custom element is inserted into a document and this document has a browsing context."},detachedCallback:{"!type":"fn()","!url":"http://w3c.github.io/webcomponents/spec/custom/index.html#dfn-left-view-callback","!doc":"Unless specified otherwise, this callback must be enqueued whenever custom element is removed from the document and this document has a browsing context."},attributeChangedCallback:{"!type":"fn()","!url":"http://w3c.github.io/webcomponents/spec/custom/index.html#dfn-attribute-changed-callback","!doc":"Unless specified otherwise, this callback must be enqueued whenever custom element's attribute is added, changed or removed."}},"!url":"https://developer.mozilla.org/en/docs/DOM/Element","!doc":"Represents an element in an HTML or XML document."},Text:{"!type":"fn()",prototype:{"!proto":"Node.prototype",wholeText:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Text.wholeText","!doc":"Returns all text of all Text nodes logically adjacent to the node.  The text is concatenated in document order.  This allows you to specify any text node and obtain all adjacent text as a single string."},splitText:{"!type":"fn(offset: number) -> +Text","!url":"https://developer.mozilla.org/en/docs/DOM/Text.splitText","!doc":"Breaks the Text node into two nodes at the specified offset, keeping both nodes in the tree as siblings."}},"!url":"https://developer.mozilla.org/en/docs/DOM/Text","!doc":"In the DOM, the Text interface represents the textual content of an Element or Attr.  If an element has no markup within its content, it has a single child implementing Text that contains the element's text.  However, if the element contains markup, it is parsed into information items and Text nodes that form its children."},Document:{"!type":"fn()",prototype:{"!proto":"Node.prototype",activeElement:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.activeElement","!doc":"Returns the currently focused element, that is, the element that will get keystroke events if the user types any. This attribute is read only."},compatMode:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.compatMode","!doc":"Indicates whether the document is rendered in Quirks mode or Strict mode."},designMode:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.designMode","!doc":"Can be used to make any document editable, for example in a <iframe />:"},dir:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Document.dir","!doc":"This property should indicate and allow the setting of the directionality of the text of the document, whether left to right (default) or right to left."},height:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/document.height","!doc":"Returns the height of the <body> element of the current document."},width:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/document.width","!doc":"Returns the width of the <body> element of the current document in pixels."},characterSet:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.characterSet","!doc":"Returns the character encoding of the current document."},readyState:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.readyState","!doc":'Returns "loading" while the document is loading, "interactive" once it is finished parsing but still loading sub-resources, and "complete" once it has loaded.'},location:{"!type":"location","!url":"https://developer.mozilla.org/en/docs/DOM/document.location","!doc":"Returns a Location object, which contains information about the URL of the document and provides methods for changing that URL."},lastModified:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.lastModified","!doc":"Returns a string containing the date and time on which the current document was last modified."},head:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.head","!doc":"Returns the <head> element of the current document. If there are more than one <head> elements, the first one is returned."},body:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.body","!doc":"Returns the <body> or <frameset> node of the current document."},cookie:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.cookie","!doc":"Get and set the cookies associated with the current document."},URL:"string",domain:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.domain","!doc":"Gets/sets the domain portion of the origin of the current document, as used by the same origin policy."},referrer:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.referrer","!doc":"Returns the URI of the page that linked to this page."},title:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.title","!doc":"Gets or sets the title of the document."},defaultView:{"!url":"https://developer.mozilla.org/en/docs/DOM/document.defaultView","!doc":"In browsers returns the window object associated with the document or null if none available."},documentURI:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.documentURI","!doc":"Returns the document location as string. It is read-only per DOM4 specification."},xmlStandalone:"bool",xmlVersion:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.xmlVersion","!doc":'Returns the version number as specified in the XML declaration (e.g., <?xml version="1.0"?>) or "1.0" if the declaration is absent.'},xmlEncoding:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Document.xmlEncoding","!doc":"Returns the encoding as determined by the XML declaration. Should be null if unspecified or unknown."},inputEncoding:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.inputEncoding","!doc":"Returns a string representing the encoding under which the document was parsed (e.g. ISO-8859-1)."},documentElement:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.documentElement","!doc":"Read-only"},implementation:{hasFeature:"fn(feature: string, version: number) -> bool",createDocumentType:{"!type":"fn(qualifiedName: string, publicId: string, systemId: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/DOMImplementation.createDocumentType","!doc":"Returns a DocumentType object which can either be used with DOMImplementation.createDocument upon document creation or they can be put into the document via Node.insertBefore() or Node.replaceChild(): http://www.w3.org/TR/DOM-Level-3-Cor...l#ID-B63ED1A31 (less ideal due to features not likely being as accessible: http://www.w3.org/TR/DOM-Level-3-Cor...createDocument ). In any case, entity declarations and notations will not be available: http://www.w3.org/TR/DOM-Level-3-Cor...-createDocType   "},createHTMLDocument:{"!type":"fn(title: string) -> +Document","!url":"https://developer.mozilla.org/en/docs/DOM/DOMImplementation.createHTMLDocument","!doc":"This method (available from document.implementation) creates a new HTML document."},createDocument:{"!type":"fn(namespaceURI: string, qualifiedName: string, type: +Node) -> +Document","!url":"https://developer.mozilla.org/en-US/docs/DOM/DOMImplementation.createHTMLDocument","!doc":"This method creates a new HTML document."},"!url":"https://developer.mozilla.org/en/docs/DOM/document.implementation","!doc":"Returns a DOMImplementation object associated with the current document."},doctype:{"!type":"+Node","!url":"https://developer.mozilla.org/en/docs/DOM/document.doctype","!doc":"Returns the Document Type Declaration (DTD) associated with current document. The returned object implements the DocumentType interface. Use DOMImplementation.createDocumentType() to create a DocumentType."},open:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/document.open","!doc":"The document.open() method opens a document for writing."},close:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/document.close","!doc":"The document.close() method finishes writing to a document, opened with document.open()."},write:{"!type":"fn(html: string)","!url":"https://developer.mozilla.org/en/docs/DOM/document.write","!doc":"Writes a string of text to a document stream opened by document.open()."},writeln:{"!type":"fn(html: string)","!url":"https://developer.mozilla.org/en/docs/DOM/document.writeln","!doc":"Writes a string of text followed by a newline character to a document."},clear:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/document.clear","!doc":"In recent versions of Mozilla-based applications as well as in Internet Explorer and Netscape 4 this method does nothing."},hasFocus:{"!type":"fn() -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/document.hasFocus","!doc":"Returns a Boolean value indicating whether the document or any element inside the document has focus. This method can be used to determine whether the active element in a document has focus."},createElement:{"!type":"fn(tagName: string) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.createElement","!doc":"Creates the specified element."},createElementNS:{"!type":"fn(ns: string, tagName: string) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.createElementNS","!doc":"Creates an element with the specified namespace URI and qualified name."},createDocumentFragment:{"!type":"fn() -> +DocumentFragment","!url":"https://developer.mozilla.org/en/docs/DOM/document.createDocumentFragment","!doc":"Creates a new empty DocumentFragment."},createTextNode:{"!type":"fn(content: string) -> +Text","!url":"https://developer.mozilla.org/en/docs/DOM/document.createTextNode","!doc":"Creates a new Text node."},createComment:{"!type":"fn(content: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/document.createComment","!doc":"Creates a new comment node, and returns it."},createCDATASection:{"!type":"fn(content: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/document.createCDATASection","!doc":"Creates a new CDATA section node, and returns it. "},createProcessingInstruction:{"!type":"fn(content: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/document.createProcessingInstruction","!doc":"Creates a new processing instruction node, and returns it."},createAttribute:{"!type":"fn(name: string) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/document.createAttribute","!doc":"Creates a new attribute node, and returns it."},createAttributeNS:{"!type":"fn(ns: string, name: string) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/Attr","!doc":"This type represents a DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types."},importNode:{"!type":"fn(node: +Node, deep: bool) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.importNode","!doc":"Creates a copy of a node from an external document that can be inserted into the current document."},getElementById:{"!type":"fn(id: string) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.getElementById","!doc":"Returns a reference to the element by its ID."},getElementsByTagName:{"!type":"fn(tagName: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/document.getElementsByTagName","!doc":"Returns a NodeList of elements with the given tag name. The complete document is searched, including the root node. The returned NodeList is live, meaning that it updates itself automatically to stay in sync with the DOM tree without having to call document.getElementsByTagName again."},getElementsByTagNameNS:{"!type":"fn(ns: string, tagName: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/document.getElementsByTagNameNS","!doc":"Returns a list of elements with the given tag name belonging to the given namespace. The complete document is searched, including the root node."},createEvent:{"!type":"fn(type: string) -> +Event","!url":"https://developer.mozilla.org/en/docs/DOM/document.createEvent","!doc":"Creates an event of the type specified. The returned object should be first initialized and can then be passed to element.dispatchEvent."},createRange:{"!type":"fn() -> +Range","!url":"https://developer.mozilla.org/en/docs/DOM/document.createRange","!doc":"Returns a new Range object."},evaluate:{"!type":"fn(expr: ?) -> +XPathResult","!url":"https://developer.mozilla.org/en/docs/DOM/document.evaluate","!doc":"Returns an XPathResult based on an XPath expression and other given parameters."},execCommand:{"!type":"fn(cmd: string)","!url":"https://developer.mozilla.org/en-US/docs/Rich-Text_Editing_in_Mozilla#Executing_Commands","!doc":"Run command to manipulate the contents of an editable region."},queryCommandEnabled:{"!type":"fn(cmd: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/document","!doc":"Returns true if the Midas command can be executed on the current range."},queryCommandIndeterm:{"!type":"fn(cmd: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/document","!doc":"Returns true if the Midas command is in a indeterminate state on the current range."},queryCommandState:{"!type":"fn(cmd: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/document","!doc":"Returns true if the Midas command has been executed on the current range."},queryCommandSupported:{"!type":"fn(cmd: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/document.queryCommandSupported","!doc":"Reports whether or not the specified editor query command is supported by the browser."},queryCommandValue:{"!type":"fn(cmd: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/document","!doc":"Returns the current value of the current range for Midas command."},getElementsByName:{"!type":"fn(name: string) -> +HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/document.getElementsByName","!doc":"Returns a list of elements with a given name in the HTML document."},elementFromPoint:{"!type":"fn(x: number, y: number) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.elementFromPoint","!doc":"Returns the element from the document whose elementFromPoint method is being called which is the topmost element which lies under the given point.  To get an element, specify the point via coordinates, in CSS pixels, relative to the upper-left-most point in the window or frame containing the document."},getSelection:{"!type":"fn() -> +Selection","!url":"https://developer.mozilla.org/en/docs/DOM/document.getSelection","!doc":"The DOM getSelection() method is available on the Window and Document interfaces."},adoptNode:{"!type":"fn(node: +Node) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.adoptNode","!doc":"Adopts a node from an external document. The node and its subtree is removed from the document it's in (if any), and its ownerDocument is changed to the current document. The node can then be inserted into the current document."},createTreeWalker:{"!type":"fn(root: +Node, mask: number) -> ?","!url":"https://developer.mozilla.org/en/docs/DOM/document.createTreeWalker","!doc":"Returns a new TreeWalker object."},createExpression:{"!type":"fn(text: string) -> ?","!url":"https://developer.mozilla.org/en/docs/DOM/document.createExpression","!doc":"This method compiles an XPathExpression which can then be used for (repeated) evaluations."},createNSResolver:{"!type":"fn(node: +Node)","!url":"https://developer.mozilla.org/en/docs/DOM/document.createNSResolver","!doc":"Creates an XPathNSResolver which resolves namespaces with respect to the definitions in scope for a specified node."},scripts:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/Document.scripts","!doc":"Returns a list of the <script> elements in the document. The returned object is an HTMLCollection."},plugins:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/document.plugins","!doc":"Returns an HTMLCollection object containing one or more HTMLEmbedElements or null which represent the <embed> elements in the current document."},embeds:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/document.embeds","!doc":"Returns a list of the embedded OBJECTS within the current document."},anchors:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/document.anchors","!doc":"Returns a list of all of the anchors in the document."},links:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/document.links","!doc":"The links property returns a collection of all AREA elements and anchor elements in a document with a value for the href attribute. "},forms:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/document.forms","!doc":"Returns a collection (an HTMLCollection) of the form elements within the current document."},styleSheets:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/document.styleSheets","!doc":"Returns a list of stylesheet objects for stylesheets explicitly linked into or embedded in a document."},currentScript:{"!type":"+Node","!url":"https://developer.mozilla.org/en-US/docs/Web/API/document.currentScript","!doc":"Returns the <script> element whose script is currently being processed."},registerElement:{"!type":"fn(type: string, options?: ?)","!url":"http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-register","!doc":"The registerElement method of the Document interface provides a way to register a custom element and returns its custom element constructor."}},"!url":"https://developer.mozilla.org/en/docs/DOM/document","!doc":"Each web page loaded in the browser has its own document object. This object serves as an entry point to the web page's content (the DOM tree, including elements such as <body> and <table>) and provides functionality global to the document (such as obtaining the page's URL and creating new elements in the document)."},document:{"!type":"+Document","!url":"https://developer.mozilla.org/en/docs/DOM/document","!doc":"Each web page loaded in the browser has its own document object. This object serves as an entry point to the web page's content (the DOM tree, including elements such as <body> and <table>) and provides functionality global to the document (such as obtaining the page's URL and creating new elements in the document)."},XMLDocument:{"!type":"fn()",prototype:"Document.prototype","!url":"https://developer.mozilla.org/en/docs/Parsing_and_serializing_XML","!doc":"The Web platform provides the following objects for parsing and serializing XML:"},HTMLElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement"},HTMLAnchorElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement"},HTMLAreaElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAreaElement"},HTMLAudioElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement"},HTMLBaseElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLBaseElement"},HTMLBodyElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLBodyElement"},HTMLBRElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLBRElement"},HTMLButtonElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement"},HTMLCanvasElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement"},HTMLDataElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDataElement"},HTMLDataListElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDataListElement"},HTMLDivElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElement"},HTMLDListElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDListElement"},HTMLDocument:{"!type":"Document","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLDocument"},HTMLEmbedElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement"},HTMLFieldSetElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLFieldSetElement"},HTMLFormControlsCollection:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection"},HTMLFormElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement"},HTMLHeadElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLHeadElement"},HTMLHeadingElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLHeadingElement"},HTMLHRElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement"},HTMLHtmlElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLHtmlElement"},HTMLIFrameElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement"},HTMLImageElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement"},HTMLInputElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement"},HTMLKeygenElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLKeygenElement"},HTMLLabelElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement"},HTMLLegendElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLLegendElement"},HTMLLIElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLLIElement"},HTMLLinkElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement"},HTMLMapElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement"},HTMLMediaElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement"},HTMLMetaElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement"},HTMLMeterElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMeterElement"},HTMLModElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLModElement"},HTMLObjectElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement"},HTMLOListElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement"},HTMLOptGroupElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptGroupElement"},HTMLOptionElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement"},HTMLOptionsCollection:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionsCollection"},HTMLOutputElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLOutputElement"},HTMLParagraphElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLParagraphElement"},HTMLParamElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement"},HTMLPreElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLPreElement"},HTMLProgressElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLProgressElement"},HTMLQuoteElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLQuoteElement"},HTMLScriptElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement"},HTMLSelectElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement"},HTMLSourceElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLSourceElement"},HTMLSpanElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLSpanElement"},HTMLStyleElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement"},HTMLTableCaptionElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCaptionElement"},HTMLTableCellElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement"},HTMLTableColElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableColElement"},HTMLTableDataCellElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableDataCellElement"},HTMLTableElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement"},HTMLTableHeaderCellElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableHeaderCellElement"},HTMLTableRowElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement"},HTMLTableSectionElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableSectionElement"},HTMLTextAreaElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement"},HTMLTimeElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTimeElement"},HTMLTitleElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTitleElement"},HTMLTrackElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement"},HTMLUListElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLUListElement"},HTMLUnknownElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLUnknownElement"},HTMLVideoElement:{"!type":"Element","!url":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement"},Attr:{"!type":"fn()",prototype:{isId:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/Attr","!doc":"This type represents a DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types."},name:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Attr","!doc":"This type represents a DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types."},value:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Attr","!doc":"This type represents a DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types."}},"!url":"https://developer.mozilla.org/en/docs/DOM/Attr","!doc":"This type represents a DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types."},NodeList:{"!type":"fn()",prototype:{length:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.length","!doc":"Returns the number of items in a NodeList."},item:{"!type":"fn(i: number) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/NodeList.item","!doc":"Returns a node from a NodeList by index."},"<i>":"+Element"},"!url":"https://developer.mozilla.org/en/docs/DOM/NodeList","!doc":"NodeList objects are collections of nodes returned by getElementsByTagName, getElementsByTagNameNS, Node.childNodes, querySelectorAll, getElementsByClassName, etc."},HTMLCollection:{"!type":"fn()",prototype:{length:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/HTMLCollection","!doc":"The number of items in the collection."},item:{"!type":"fn(i: number) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/HTMLCollection","!doc":"Returns the specific node at the given zero-based index into the list. Returns null if the index is out of range."},namedItem:{"!type":"fn(name: string) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/HTMLCollection","!doc":"Returns the specific node whose ID or, as a fallback, name matches the string specified by name. Matching by name is only done as a last resort, only in HTML, and only if the referenced element supports the name attribute. Returns null if no node exists by the given name."},"<i>":"+Element"},"!url":"https://developer.mozilla.org/en/docs/DOM/HTMLCollection","!doc":"HTMLCollection is an interface representing a generic collection of elements (in document order) and offers methods and properties for traversing the list."},NamedNodeMap:{"!type":"fn()",prototype:{length:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"The number of items in the map."},getNamedItem:{"!type":"fn(name: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"Gets a node by name."},setNamedItem:{"!type":"fn(node: +Node) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"Adds (or replaces) a node by its nodeName."},removeNamedItem:{"!type":"fn(name: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"Removes a node (or if an attribute, may reveal a default if present)."},item:{"!type":"fn(i: number) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"Returns the item at the given index (or null if the index is higher or equal to the number of nodes)."},getNamedItemNS:{"!type":"fn(ns: string, name: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"Gets a node by namespace and localName."},setNamedItemNS:{"!type":"fn(node: +Node) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"Adds (or replaces) a node by its localName and namespaceURI."},removeNamedItemNS:{"!type":"fn(ns: string, name: string) -> +Node","!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"Removes a node (or if an attribute, may reveal a default if present)."},"<i>":"+Node"},"!url":"https://developer.mozilla.org/en/docs/DOM/NamedNodeMap","!doc":"A collection of nodes returned by Element.attributes (also potentially for DocumentType.entities, DocumentType.notations). NamedNodeMaps are not in any particular order (unlike NodeList), although they may be accessed by an index as in an array (they may also be accessed with the item() method). A NamedNodeMap object are live and will thus be auto-updated if changes are made to their contents internally or elsewhere."},DocumentFragment:{"!type":"fn()",prototype:{"!proto":"Node.prototype"},"!url":"https://developer.mozilla.org/en/docs/DOM/document.createDocumentFragment","!doc":"Creates a new empty DocumentFragment."},DOMTokenList:{"!type":"fn()",prototype:{length:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/DOMTokenList","!doc":"The amount of items in the list."},item:{"!type":"fn(i: number) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/DOMTokenList","!doc":"Returns an item in the list by its index."},contains:{"!type":"fn(token: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/DOMTokenList","!doc":"Return true if the underlying string contains token, otherwise false."},add:{"!type":"fn(token: string)","!url":"https://developer.mozilla.org/en/docs/DOM/DOMTokenList","!doc":"Adds token to the underlying string."},remove:{"!type":"fn(token: string)","!url":"https://developer.mozilla.org/en/docs/DOM/DOMTokenList","!doc":"Remove token from the underlying string."},toggle:{"!type":"fn(token: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/DOMTokenList","!doc":"Removes token from string and returns false. If token doesn't exist it's added and the function returns true."},"<i>":"string"},"!url":"https://developer.mozilla.org/en/docs/DOM/DOMTokenList","!doc":"This type represents a set of space-separated tokens. Commonly returned by HTMLElement.classList, HTMLLinkElement.relList, HTMLAnchorElement.relList or HTMLAreaElement.relList. It is indexed beginning with 0 as with JavaScript arrays. DOMTokenList is always case-sensitive."},XPathResult:{"!type":"fn()",prototype:{boolValue:"bool",invalidIteratorState:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/Introduction_to_using_XPath_in_JavaScript","!doc":"This document describes the interface for using XPath in JavaScript internally, in extensions, and from websites. Mozilla implements a fair amount of the DOM 3 XPath. Which means that XPath expressions can be run against both HTML and XML documents."},numberValue:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/XPathResult","!doc":"Refer to nsIDOMXPathResult for more detail."},resultType:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/document.evaluate","!doc":"Returns an XPathResult based on an XPath expression and other given parameters."},singleNodeValue:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/Introduction_to_using_XPath_in_JavaScript","!doc":"This document describes the interface for using XPath in JavaScript internally, in extensions, and from websites. Mozilla implements a fair amount of the DOM 3 XPath. Which means that XPath expressions can be run against both HTML and XML documents."},snapshotLength:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/XPathResult","!doc":"Refer to nsIDOMXPathResult for more detail."},stringValue:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/Introduction_to_using_XPath_in_JavaScript","!doc":"This document describes the interface for using XPath in JavaScript internally, in extensions, and from websites. Mozilla implements a fair amount of the DOM 3 XPath. Which means that XPath expressions can be run against both HTML and XML documents."},iterateNext:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/Introduction_to_using_XPath_in_JavaScript","!doc":"This document describes the interface for using XPath in JavaScript internally, in extensions, and from websites. Mozilla implements a fair amount of the DOM 3 XPath. Which means that XPath expressions can be run against both HTML and XML documents."},snapshotItem:{"!type":"fn()","!url":"https://developer.mozilla.org/en-US/docs/XPathResult#snapshotItem()"},ANY_TYPE:"number",NUMBER_TYPE:"number",STRING_TYPE:"number",BOOL_TYPE:"number",UNORDERED_NODE_ITERATOR_TYPE:"number",ORDERED_NODE_ITERATOR_TYPE:"number",UNORDERED_NODE_SNAPSHOT_TYPE:"number",ORDERED_NODE_SNAPSHOT_TYPE:"number",ANY_UNORDERED_NODE_TYPE:"number",FIRST_ORDERED_NODE_TYPE:"number"},"!url":"https://developer.mozilla.org/en/docs/XPathResult","!doc":"Refer to nsIDOMXPathResult for more detail."},ClientRect:{"!type":"fn()",prototype:{top:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.getClientRects","!doc":"Top of the box, in pixels, relative to the viewport."},left:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.getClientRects","!doc":"Left of the box, in pixels, relative to the viewport."},bottom:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.getClientRects","!doc":"Bottom of the box, in pixels, relative to the viewport."},right:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.getClientRects","!doc":"Right of the box, in pixels, relative to the viewport."}},"!url":"https://developer.mozilla.org/en/docs/DOM/element.getClientRects","!doc":"Returns a collection of rectangles that indicate the bounding rectangles for each box in a client."},Event:{"!type":"fn()",prototype:{stopPropagation:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/event.stopPropagation","!doc":"Prevents further propagation of the current event."},preventDefault:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/event.preventDefault","!doc":"Cancels the event if it is cancelable, without stopping further propagation of the event."},initEvent:{"!type":"fn(type: string, bubbles: bool, cancelable: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/event.initEvent","!doc":"The initEvent method is used to initialize the value of an event created using document.createEvent."},stopImmediatePropagation:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/event.stopImmediatePropagation","!doc":"Prevents other listeners of the same event to be called."},type:{"!type":"string","!url":"https://developer.mozilla.org/en-US/docs/Web/API/event.type","!doc":"Returns a string containing the type of event."},NONE:"number",CAPTURING_PHASE:"number",AT_TARGET:"number",BUBBLING_PHASE:"number",MOUSEDOWN:"number",MOUSEUP:"number",MOUSEOVER:"number",MOUSEOUT:"number",MOUSEMOVE:"number",MOUSEDRAG:"number",CLICK:"number",DBLCLICK:"number",KEYDOWN:"number",KEYUP:"number",KEYPRESS:"number",DRAGDROP:"number",FOCUS:"number",BLUR:"number",SELECT:"number",CHANGE:"number",target:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget","!doc":"An EventTarget is a DOM interface implemented by objects that can receive DOM events and have listeners for them. The most common EventTargets are DOM elements, although other objects can be EventTargets too, for example document, window, XMLHttpRequest, and others."},relatedTarget:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/event.relatedTarget","!doc":"Identifies a secondary target for the event."},pageX:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.pageX","!doc":"Returns the horizontal coordinate of the event relative to whole document."},pageY:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.pageY","!doc":"Returns the vertical coordinate of the event relative to the whole document."},clientX:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.clientX","!doc":"Returns the horizontal coordinate within the application's client area at which the event occurred (as opposed to the coordinates within the page). For example, clicking in the top-left corner of the client area will always result in a mouse event with a clientX value of 0, regardless of whether the page is scrolled horizontally."},clientY:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.clientY","!doc":"Returns the vertical coordinate within the application's client area at which the event occurred (as opposed to the coordinates within the page). For example, clicking in the top-left corner of the client area will always result in a mouse event with a clientY value of 0, regardless of whether the page is scrolled vertically."},keyCode:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.keyCode","!doc":"Returns the Unicode value of a non-character key in a keypress event or any key in any other type of keyboard event."},charCode:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.charCode","!doc":"Returns the Unicode value of a character key pressed during a keypress event."},which:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.which","!doc":"Returns the numeric keyCode of the key pressed, or the character code (charCode) for an alphanumeric key pressed."},button:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.button","!doc":"Indicates which mouse button caused the event."},shiftKey:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/event.shiftKey","!doc":"Indicates whether the SHIFT key was pressed when the event fired."},ctrlKey:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/event.ctrlKey","!doc":"Indicates whether the CTRL key was pressed when the event fired."},altKey:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/event.altKey","!doc":"Indicates whether the ALT key was pressed when the event fired."},metaKey:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/event.metaKey","!doc":"Indicates whether the META key was pressed when the event fired."},returnValue:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/window.onbeforeunload","!doc":"An event that fires when a window is about to unload its resources. The document is still visible and the event is still cancelable."},cancelBubble:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/event.cancelBubble","!doc":"bool is the boolean value of true or false."},dataTransfer:{dropEffect:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DragDrop/DataTransfer","!doc":"The actual effect that will be used, and should always be one of the possible values of effectAllowed."},effectAllowed:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DragDrop/Drag_Operations","!doc":"Specifies the effects that are allowed for this drag."},files:{"!type":"+FileList","!url":"https://developer.mozilla.org/en/docs/DragDrop/DataTransfer","!doc":"Contains a list of all the local files available on the data transfer."},types:{"!type":"[string]","!url":"https://developer.mozilla.org/en-US/docs/DragDrop/DataTransfer","!doc":"Holds a list of the format types of the data that is stored for the first item, in the same order the data was added. An empty list will be returned if no data was added."},addElement:{"!type":"fn(element: +Element)","!url":"https://developer.mozilla.org/en/docs/DragDrop/DataTransfer","!doc":"Set the drag source."},clearData:{"!type":"fn(type?: string)","!url":"https://developer.mozilla.org/en/docs/DragDrop/Drag_Operations","!doc":"Remove the data associated with a given type."},getData:{"!type":"fn(type: string) -> string","!url":"https://developer.mozilla.org/en/docs/DragDrop/Drag_Operations","!doc":"Retrieves the data for a given type, or an empty string if data for that type does not exist or the data transfer contains no data."},setData:{"!type":"fn(type: string, data: string)","!url":"https://developer.mozilla.org/en/docs/DragDrop/Drag_Operations","!doc":"Set the data for a given type."},setDragImage:{"!type":"fn(image: +Element)","!url":"https://developer.mozilla.org/en/docs/DragDrop/Drag_Operations","!doc":"Set the image to be used for dragging if a custom one is desired."},"!url":"https://developer.mozilla.org/en/docs/DragDrop/DataTransfer","!doc":"This object is available from the dataTransfer property of all drag events. It cannot be created separately."}},"!url":"https://developer.mozilla.org/en-US/docs/DOM/event","!doc":"The DOM Event interface is accessible from within the handler function, via the event object passed as the first argument."},TouchEvent:{"!type":"fn()",prototype:"Event.prototype","!url":"https://developer.mozilla.org/en/docs/DOM/Touch_events","!doc":"In order to provide quality support for touch-based user interfaces, touch events offer the ability to interpret finger activity on touch screens or trackpads."},WheelEvent:{"!type":"fn()",prototype:"Event.prototype","!url":"https://developer.mozilla.org/en/docs/DOM/WheelEvent","!doc":"The DOM WheelEvent represents events that occur due to the user moving a mouse wheel or similar input device."},MouseEvent:{"!type":"fn()",prototype:"Event.prototype","!url":"https://developer.mozilla.org/en/docs/DOM/MouseEvent","!doc":"The DOM MouseEvent represents events that occur due to the user interacting with a pointing device (such as a mouse). It's represented by the nsINSDOMMouseEvent interface, which extends the nsIDOMMouseEvent interface."},KeyboardEvent:{"!type":"fn()",prototype:"Event.prototype","!url":"https://developer.mozilla.org/en/docs/DOM/KeyboardEvent","!doc":"KeyboardEvent objects describe a user interaction with the keyboard. Each event describes a key; the event type (keydown, keypress, or keyup) identifies what kind of activity was performed."},HashChangeEvent:{"!type":"fn()",prototype:"Event.prototype","!url":"https://developer.mozilla.org/en/docs/DOM/window.onhashchange","!doc":"The hashchange event fires when a window's hash changes."},ErrorEvent:{"!type":"fn()",prototype:"Event.prototype","!url":"https://developer.mozilla.org/en/docs/DOM/DOM_event_reference/error","!doc":"The error event is fired whenever a resource fails to load."},CustomEvent:{"!type":"fn()",prototype:"Event.prototype","!url":"https://developer.mozilla.org/en/docs/DOM/Event/CustomEvent","!doc":"The DOM CustomEvent are events initialized by an application for any purpose."},BeforeLoadEvent:{"!type":"fn()",prototype:"Event.prototype","!url":"https://developer.mozilla.org/en/docs/DOM/window","!doc":"This section provides a brief reference for all of the methods, properties, and events available through the DOM window object. The window object implements the Window interface, which in turn inherits from the AbstractView interface. Some additional global functions, namespaces objects, and constructors, not typically associated with the window, but available on it, are listed in the JavaScript Reference."},WebSocket:{"!type":"fn(url: string)",prototype:{close:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/WebSockets/WebSockets_reference/CloseEvent","!doc":"A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute."},send:{"!type":"fn(data: string)","!url":"https://developer.mozilla.org/en/docs/WebSockets/WebSockets_reference/WebSocket","!doc":"The WebSocket object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection."},binaryType:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/WebSockets/WebSockets_reference/WebSocket","!doc":"The WebSocket object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection."},bufferedAmount:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/WebSockets/Writing_WebSocket_client_applications","!doc":"WebSockets is a technology that makes it possible to open an interactive communication session between the user's browser and a server. Using a WebSocket connection, Web applications can perform real-time communication instead of having to poll for changes back and forth."},extensions:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/WebSockets/WebSockets_reference/WebSocket","!doc":"The WebSocket object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection."},onclose:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/WebSockets/WebSockets_reference/CloseEvent","!doc":"A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute."},onerror:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/WebSockets/Writing_WebSocket_client_applications","!doc":"WebSockets is a technology that makes it possible to open an interactive communication session between the user's browser and a server. Using a WebSocket connection, Web applications can perform real-time communication instead of having to poll for changes back and forth."},onmessage:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/WebSockets/WebSockets_reference/WebSocket","!doc":"The WebSocket object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection."},onopen:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/WebSockets/WebSockets_reference/WebSocket","!doc":"The WebSocket object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection."},protocol:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/WebSockets","!doc":"WebSockets is an advanced technology that makes it possible to open an interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply."},url:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/WebSockets/Writing_WebSocket_client_applications","!doc":"WebSockets is a technology that makes it possible to open an interactive communication session between the user's browser and a server. Using a WebSocket connection, Web applications can perform real-time communication instead of having to poll for changes back and forth."},CONNECTING:"number",OPEN:"number",CLOSING:"number",CLOSED:"number"},"!url":"https://developer.mozilla.org/en/docs/WebSockets","!doc":"WebSockets is an advanced technology that makes it possible to open an interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply."},Worker:{"!type":"fn(scriptURL: string)",prototype:{postMessage:{"!type":"fn(message: ?)","!url":"https://developer.mozilla.org/en/docs/DOM/Worker","!doc":"Sends a message to the worker's inner scope. This accepts a single parameter, which is the data to send to the worker. The data may be any value or JavaScript object handled by the structured clone algorithm, which includes cyclical references."},terminate:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Worker","!doc":"Immediately terminates the worker. This does not offer the worker an opportunity to finish its operations; it is simply stopped at once."},onmessage:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Worker","!doc":"An event listener that is called whenever a MessageEvent with type message bubbles through the worker. The message is stored in the event's data member."},onerror:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Worker","!doc":"An event listener that is called whenever an ErrorEvent with type error bubbles through the worker."}},"!url":"https://developer.mozilla.org/en/docs/DOM/Worker","!doc":"Workers are background tasks that can be easily created and can send messages back to their creators. Creating a worker is as simple as calling the Worker() constructor, specifying a script to be run in the worker thread."},localStorage:{setItem:{"!type":"fn(name: string, value: string)","!url":"https://developer.mozilla.org/en/docs/DOM/Storage","!doc":"Store an item in storage."},getItem:{"!type":"fn(name: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/Storage","!doc":"Retrieve an item from storage."},"!url":"https://developer.mozilla.org/en/docs/DOM/Storage","!doc":"The DOM Storage mechanism is a means through which string key/value pairs can be securely stored and later retrieved for use."},sessionStorage:{setItem:{"!type":"fn(name: string, value: string)","!url":"https://developer.mozilla.org/en/docs/DOM/Storage","!doc":"Store an item in storage."},getItem:{"!type":"fn(name: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/Storage","!doc":"Retrieve an item from storage."},"!url":"https://developer.mozilla.org/en/docs/DOM/Storage","!doc":"This is a global object (sessionStorage) that maintains a storage area that's available for the duration of the page session. A page session lasts for as long as the browser is open and survives over page reloads and restores. Opening a page in a new tab or window will cause a new session to be initiated."},FileList:{"!type":"fn()",prototype:{length:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/FileList","!doc":"A read-only value indicating the number of files in the list."},item:{"!type":"fn(i: number) -> +File","!url":"https://developer.mozilla.org/en/docs/DOM/FileList","!doc":"Returns a File object representing the file at the specified index in the file list."},"<i>":"+File"},"!url":"https://developer.mozilla.org/en/docs/DOM/FileList","!doc":'An object of this type is returned by the files property of the HTML input element; this lets you access the list of files selected with the <input type="file"> element. It\'s also used for a list of files dropped into web content when using the drag and drop API.'},File:{"!type":"fn()",prototype:{"!proto":"Blob.prototype",fileName:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/File.fileName","!doc":"Returns the name of the file. For security reasons the path is excluded from this property."},fileSize:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/File.fileSize","!doc":"Returns the size of a file in bytes."},lastModifiedDate:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/File.lastModifiedDate","!doc":"Returns the last modified date of the file. Files without a known last modified date use the current date instead."},name:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/File.name","!doc":"Returns the name of the file. For security reasons, the path is excluded from this property."}},"!url":"https://developer.mozilla.org/en/docs/DOM/File","!doc":"The File object provides information about -- and access to the contents of -- files. These are generally retrieved from a FileList object returned as a result of a user selecting files using the input element, or from a drag and drop operation's DataTransfer object."},Blob:{"!type":"fn(parts: [?], properties?: ?)",prototype:{size:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Blob","!doc":"The size, in bytes, of the data contained in the Blob object. Read only."},type:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Blob","!doc":"An ASCII-encoded string, in all lower case, indicating the MIME type of the data contained in the Blob. If the type is unknown, this string is empty. Read only."},slice:{"!type":"fn(start: number, end?: number, type?: string) -> +Blob","!url":"https://developer.mozilla.org/en/docs/DOM/Blob","!doc":"Returns a new Blob object containing the data in the specified range of bytes of the source Blob."}},"!url":"https://developer.mozilla.org/en/docs/DOM/Blob","!doc":"A Blob object represents a file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system."},FileReader:{"!type":"fn()",prototype:{abort:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Aborts the read operation. Upon return, the readyState will be DONE."},readAsArrayBuffer:{"!type":"fn(blob: +Blob)","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Starts reading the contents of the specified Blob, producing an ArrayBuffer."},readAsBinaryString:{"!type":"fn(blob: +Blob)","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Starts reading the contents of the specified Blob, producing raw binary data."},readAsDataURL:{"!type":"fn(blob: +Blob)","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Starts reading the contents of the specified Blob, producing a data: url."},readAsText:{"!type":"fn(blob: +Blob, encoding?: string)","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Starts reading the contents of the specified Blob, producing a string."},EMPTY:"number",LOADING:"number",DONE:"number",error:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"The error that occurred while reading the file. Read only."},readyState:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Indicates the state of the FileReader. This will be one of the State constants. Read only."},result:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"The file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation. Read only."},onabort:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Called when the read operation is aborted."},onerror:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Called when an error occurs."},onload:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Called when the read operation is successfully completed."},onloadend:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Called when the read is completed, whether successful or not. This is called after either onload or onerror."},onloadstart:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Called when reading the data is about to begin."},onprogress:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"Called periodically while the data is being read."}},"!url":"https://developer.mozilla.org/en/docs/DOM/FileReader","!doc":"The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. File objects may be obtained from a FileList object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's DataTransfer object, or from the mozGetAsFile() API on an HTMLCanvasElement."},URL:{createObjectURL:{"!type":"fn(blob: +Blob) -> string","!url":"https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL","!doc":"The URL.createObjectURL() static method creates a DOMString containing an URL representing the object given in parameter."},revokeObjectURL:{"!type":"fn(string)","!url":"https://developer.mozilla.org/en-US/docs/Web/API/URL.revokeObjectURL","!doc":"The URL.revokeObjectURL() static method releases an existing object URL which was previously created by calling window.URL.createObjectURL()."}},Range:{"!type":"fn()",prototype:{collapsed:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/range.collapsed","!doc":"Returns a boolean indicating whether the range's start and end points are at the same position."},commonAncestorContainer:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/range.commonAncestorContainer","!doc":"Returns the deepest Node that contains the  startContainer and  endContainer Nodes."},endContainer:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/range.endContainer","!doc":"Returns the Node within which the Range ends."},endOffset:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/range.endOffset","!doc":"Returns a number representing where in the  endContainer the Range ends."},startContainer:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/range.startContainer","!doc":"Returns the Node within which the Range starts."},startOffset:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/range.startOffset","!doc":"Returns a number representing where in the startContainer the Range starts."},setStart:{"!type":"fn(node: +Element, offset: number)","!url":"https://developer.mozilla.org/en/docs/DOM/range.setStart","!doc":"Sets the start position of a Range."},setEnd:{"!type":"fn(node: +Element, offset: number)","!url":"https://developer.mozilla.org/en/docs/DOM/range.setEnd","!doc":"Sets the end position of a Range."},setStartBefore:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/range.setStartBefore","!doc":"Sets the start position of a Range relative to another Node."},setStartAfter:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/range.setStartAfter","!doc":"Sets the start position of a Range relative to a Node."},setEndBefore:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/range.setEndBefore","!doc":"Sets the end position of a Range relative to another Node."},setEndAfter:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/range.setEndAfter","!doc":"Sets the end position of a Range relative to another Node."},selectNode:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/range.selectNode","!doc":"Sets the Range to contain the Node and its contents."},selectNodeContents:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/range.selectNodeContents","!doc":"Sets the Range to contain the contents of a Node."},collapse:{"!type":"fn(toStart: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/range.collapse","!doc":"Collapses the Range to one of its boundary points."},cloneContents:{"!type":"fn() -> +DocumentFragment","!url":"https://developer.mozilla.org/en/docs/DOM/range.cloneContents","!doc":"Returns a DocumentFragment copying the Nodes of a Range."},deleteContents:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/range.deleteContents","!doc":"Removes the contents of a Range from the Document."},extractContents:{"!type":"fn() -> +DocumentFragment","!url":"https://developer.mozilla.org/en/docs/DOM/range.extractContents","!doc":"Moves contents of a Range from the document tree into a DocumentFragment."},insertNode:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/range.insertNode","!doc":"Insert a node at the start of a Range."},surroundContents:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/range.surroundContents","!doc":"Moves content of a Range into a new node, placing the new node at the start of the specified range."},compareBoundaryPoints:{"!type":"fn(how: number, other: +Range) -> number","!url":"https://developer.mozilla.org/en/docs/DOM/range.compareBoundaryPoints","!doc":"Compares the boundary points of two Ranges."},cloneRange:{"!type":"fn() -> +Range","!url":"https://developer.mozilla.org/en/docs/DOM/range.cloneRange","!doc":"Returns a Range object with boundary points identical to the cloned Range."},detach:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/range.detach","!doc":"Releases a Range from use to improve performance. This lets the browser choose to release resources associated with this Range. Subsequent attempts to use the detached range will result in a DOMException being thrown with an error code of INVALID_STATE_ERR."},END_TO_END:"number",END_TO_START:"number",START_TO_END:"number",START_TO_START:"number"},"!url":"https://developer.mozilla.org/en/docs/DOM/range.detach","!doc":"Releases a Range from use to improve performance. This lets the browser choose to release resources associated with this Range. Subsequent attempts to use the detached range will result in a DOMException being thrown with an error code of INVALID_STATE_ERR."},XMLHttpRequest:{"!type":"fn()",prototype:{abort:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"Aborts the request if it has already been sent."},getAllResponseHeaders:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"Returns all the response headers as a string, or null if no response has been received. Note: For multipart requests, this returns the headers from the current part of the request, not from the original channel."},getResponseHeader:{"!type":"fn(header: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"Returns the string containing the text of the specified header, or null if either the response has not yet been received or the header doesn't exist in the response."},open:{"!type":"fn(method: string, url: string, async?: bool, user?: string, password?: string)","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"Initializes a request."},overrideMimeType:{"!type":"fn(type: string)","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"Overrides the MIME type returned by the server."},send:{"!type":"fn(data?: string)","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived."},setRequestHeader:{"!type":"fn(header: string, value: string)","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"Sets the value of an HTTP request header.You must call setRequestHeader() after open(), but before send()."},onreadystatechange:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"A JavaScript function object that is called whenever the readyState attribute changes."},readyState:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"The state of the request. (0=unsent, 1=opened, 2=headers_received, 3=loading, 4=done)"},response:{"!type":"+Document","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":'The response entity body according to responseType, as an ArrayBuffer, Blob, Document, JavaScript object (for "json"), or string. This is null if the request is not complete or was not successful.'},responseText:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"The response to the request as text, or null if the request was unsuccessful or has not yet been sent."},responseType:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"Can be set to change the response type."},responseXML:{"!type":"+Document","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"The response to the request as a DOM Document object, or null if the request was unsuccessful, has not yet been sent, or cannot be parsed as XML or HTML."},status:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"The status of the response to the request. This is the HTTP result code"},statusText:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":'The response string returned by the HTTP server. Unlike status, this includes the entire text of the response message ("200 OK", for example).'},timeout:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest/Synchronous_and_Asynchronous_Requests","!doc":"The number of milliseconds a request can take before automatically being terminated. A value of 0 (which is the default) means there is no timeout."},UNSENT:"number",OPENED:"number",HEADERS_RECEIVED:"number",LOADING:"number",DONE:"number"},"!url":"https://developer.mozilla.org/en/docs/DOM/XMLHttpRequest","!doc":"XMLHttpRequest is a JavaScript object that was designed by Microsoft and adopted by Mozilla, Apple, and Google. It's now being standardized in the W3C. It provides an easy way to retrieve data at a URL. Despite its name, XMLHttpRequest can be used to retrieve any type of data, not just XML, and it supports protocols other than HTTP (including file and ftp)."},DOMParser:{"!type":"fn()",prototype:{parseFromString:{"!type":"fn(data: string, mime: string) -> +Document","!url":"https://developer.mozilla.org/en/docs/DOM/DOMParser","!doc":"DOMParser can parse XML or HTML source stored in a string into a DOM Document. DOMParser is specified in DOM Parsing and Serialization."}},"!url":"https://developer.mozilla.org/en/docs/DOM/DOMParser","!doc":"DOMParser can parse XML or HTML source stored in a string into a DOM Document. DOMParser is specified in DOM Parsing and Serialization."},Selection:{"!type":"fn()",prototype:{anchorNode:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/anchorNode","!doc":"Returns the node in which the selection begins."},anchorOffset:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/anchorOffset","!doc":"Returns the number of characters that the selection's anchor is offset within the anchorNode."},focusNode:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/focusNode","!doc":"Returns the node in which the selection ends."},focusOffset:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/focusOffset","!doc":"Returns the number of characters that the selection's focus is offset within the focusNode. "},isCollapsed:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/isCollapsed","!doc":"Returns a boolean indicating whether the selection's start and end points are at the same position."},rangeCount:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/rangeCount","!doc":"Returns the number of ranges in the selection."},getRangeAt:{"!type":"fn(i: number) -> +Range","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/getRangeAt","!doc":"Returns a range object representing one of the ranges currently selected."},collapse:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/collapse","!doc":"Collapses the current selection to a single point. The document is not modified. If the content is focused and editable, the caret will blink there."},extend:{"!type":"fn(node: +Element, offset: number)","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/extend","!doc":"Moves the focus of the selection to a specified point. The anchor of the selection does not move. The selection will be from the anchor to the new focus regardless of direction."},collapseToStart:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/collapseToStart","!doc":"Collapses the selection to the start of the first range in the selection.  If the content of the selection is focused and editable, the caret will blink there."},collapseToEnd:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/collapseToEnd","!doc":"Collapses the selection to the end of the last range in the selection.  If the content the selection is in is focused and editable, the caret will blink there."},selectAllChildren:{"!type":"fn(node: +Element)","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/selectAllChildren","!doc":"Adds all the children of the specified node to the selection. Previous selection is lost."},addRange:{"!type":"fn(range: +Range)","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/addRange","!doc":"Adds a Range to a Selection."},removeRange:{"!type":"fn(range: +Range)","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/removeRange","!doc":"Removes a range from the selection."},removeAllRanges:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/removeAllRanges","!doc":"Removes all ranges from the selection, leaving the anchorNode and focusNode properties equal to null and leaving nothing selected. "},deleteFromDocument:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/deleteFromDocument","!doc":"Deletes the actual text being represented by a selection object from the document's DOM."},containsNode:{"!type":"fn(node: +Element) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Selection/containsNode","!doc":"Indicates if the node is part of the selection."}},"!url":"https://developer.mozilla.org/en/docs/DOM/Selection","!doc":"Selection is the class of the object returned by window.getSelection() and other methods. It represents the text selection in the greater page, possibly spanning multiple elements, when the user drags over static text and other parts of the page. For information about text selection in an individual text editing element."},console:{error:{"!type":"fn(text: string)","!url":"https://developer.mozilla.org/en/docs/DOM/console.error","!doc":"Outputs an error message to the Web Console."},info:{"!type":"fn(text: string)","!url":"https://developer.mozilla.org/en/docs/DOM/console.info","!doc":"Outputs an informational message to the Web Console."},log:{"!type":"fn(text: string)","!url":"https://developer.mozilla.org/en/docs/DOM/console.log","!doc":"Outputs a message to the Web Console."},warn:{"!type":"fn(text: string)","!url":"https://developer.mozilla.org/en/docs/DOM/console.warn","!doc":"Outputs a warning message to the Web Console."},"!url":"https://developer.mozilla.org/en/docs/DOM/console","!doc":"The console object provides access to the browser's debugging console. The specifics of how it works vary from browser to browser, but there is a de facto set of features that are typically provided."},top:{"!type":"<top>","!url":"https://developer.mozilla.org/en/docs/DOM/window.top","!doc":"Returns a reference to the topmost window in the window hierarchy."},parent:{"!type":"<top>","!url":"https://developer.mozilla.org/en/docs/DOM/window.parent","!doc":"A reference to the parent of the current window or subframe."},window:{"!type":"<top>","!url":"https://developer.mozilla.org/en/docs/DOM/window","!doc":"The window object represents a window containing a DOM document."},opener:{"!type":"<top>","!url":"https://developer.mozilla.org/en/docs/DOM/window.opener","!doc":"Returns a reference to the window that opened this current window."},self:{"!type":"<top>","!url":"https://developer.mozilla.org/en/docs/DOM/window.self","!doc":"Returns an object reference to the window object. "},devicePixelRatio:"number",name:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/JavaScript/Reference/Global_Objects/Function/name","!doc":"The name of the function."},closed:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/window.closed","!doc":"This property indicates whether the referenced window is closed or not."},pageYOffset:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollY","!doc":"Returns the number of pixels that the document has already been scrolled vertically."},pageXOffset:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollX","!doc":"Returns the number of pixels that the document has already been scrolled vertically."},scrollY:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollY","!doc":"Returns the number of pixels that the document has already been scrolled vertically."},scrollX:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollX","!doc":"Returns the number of pixels that the document has already been scrolled vertically."},screenTop:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.top","!doc":"Returns the distance in pixels from the top side of the current screen."},screenLeft:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.left","!doc":"Returns the distance in pixels from the left side of the main screen to the left side of the current screen."},screenY:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.screenY","!doc":"Returns the vertical coordinate of the event within the screen as a whole."},screenX:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/event.screenX","!doc":"Returns the horizontal coordinate of the event within the screen as a whole."},innerWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.innerWidth","!doc":"Width (in pixels) of the browser window viewport including, if rendered, the vertical scrollbar."},innerHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.innerHeight","!doc":"Height (in pixels) of the browser window viewport including, if rendered, the horizontal scrollbar."},outerWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.outerWidth","!doc":"window.outerWidth gets the width of the outside of the browser window. It represents the width of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles."},outerHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.outerHeight","!doc":"window.outerHeight gets the height in pixels of the whole browser window."},frameElement:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/window.frameElement","!doc":"Returns the element (such as <iframe> or <object>) in which the window is embedded, or null if the window is top-level."},crypto:{getRandomValues:{"!type":"fn([number])","!url":"https://developer.mozilla.org/en/docs/DOM/window.crypto.getRandomValues","!doc":"This methods lets you get cryptographically random values."},"!url":"https://developer.mozilla.org/en/docs/DOM/window.crypto.getRandomValues","!doc":"This methods lets you get cryptographically random values."},navigator:{appName:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator.appName","!doc":'Returns the name of the browser. The HTML5 specification also allows any browser to return "Netscape" here, for compatibility reasons.'},appVersion:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator.appVersion","!doc":'Returns the version of the browser as a string. It may be either a plain version number, like "5.0", or a version number followed by more detailed information. The HTML5 specification also allows any browser to return "4.0" here, for compatibility reasons.'},language:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator.language","!doc":"Returns a string representing the language version of the browser."},platform:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator.platform","!doc":"Returns a string representing the platform of the browser."},plugins:{"!type":"[?]","!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator.plugins","!doc":"Returns a PluginArray object, listing the plugins installed in the application."},userAgent:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator.userAgent","!doc":"Returns the user agent string for the current browser."},vendor:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator.vendor","!doc":"Returns the name of the browser vendor for the current browser."},javaEnabled:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator.javaEnabled","!doc":"This method indicates whether the current browser is Java-enabled or not."},"!url":"https://developer.mozilla.org/en/docs/DOM/window.navigator","!doc":"Returns a reference to the navigator object, which can be queried for information about the application running the script."},history:{state:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Manipulating_the_browser_history","!doc":"The DOM window object provides access to the browser's history through the history object. It exposes useful methods and properties that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the contents of the history stack."},length:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Manipulating_the_browser_history","!doc":"The DOM window object provides access to the browser's history through the history object. It exposes useful methods and properties that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the contents of the history stack."},go:{"!type":"fn(delta: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.history","!doc":"Returns a reference to the History object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in)."},forward:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Manipulating_the_browser_history","!doc":"The DOM window object provides access to the browser's history through the history object. It exposes useful methods and properties that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the contents of the history stack."},back:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Manipulating_the_browser_history","!doc":"The DOM window object provides access to the browser's history through the history object. It exposes useful methods and properties that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the contents of the history stack."},pushState:{"!type":"fn(data: ?, title: string, url?: string)","!url":"https://developer.mozilla.org/en/docs/DOM/Manipulating_the_browser_history","!doc":"The DOM window object provides access to the browser's history through the history object. It exposes useful methods and properties that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the contents of the history stack."},replaceState:{"!type":"fn(data: ?, title: string, url?: string)","!url":"https://developer.mozilla.org/en/docs/DOM/Manipulating_the_browser_history","!doc":"The DOM window object provides access to the browser's history through the history object. It exposes useful methods and properties that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the contents of the history stack."},"!url":"https://developer.mozilla.org/en/docs/DOM/Manipulating_the_browser_history","!doc":"The DOM window object provides access to the browser's history through the history object. It exposes useful methods and properties that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the contents of the history stack."},screen:{availWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.availWidth","!doc":"Returns the amount of horizontal space in pixels available to the window."},availHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.availHeight","!doc":"Returns the amount of vertical space available to the window on the screen."},availTop:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.availTop","!doc":"Specifies the y-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface features."},availLeft:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.availLeft","!doc":"Returns the first available pixel available from the left side of the screen."},pixelDepth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.pixelDepth","!doc":"Returns the bit depth of the screen."},colorDepth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.colorDepth","!doc":"Returns the color depth of the screen."},width:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.width","!doc":"Returns the width of the screen."},height:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/window.screen.height","!doc":"Returns the height of the screen in pixels."},"!url":"https://developer.mozilla.org/en/docs/DOM/window.screen","!doc":"Returns a reference to the screen object associated with the window."},postMessage:{"!type":"fn(message: string, targetOrigin: string)","!url":"https://developer.mozilla.org/en/docs/DOM/window.postMessage","!doc":"window.postMessage, when called, causes a MessageEvent to be dispatched at the target window when any pending script that must be executed completes (e.g. remaining event handlers if window.postMessage is called from an event handler, previously-set pending timeouts, etc.). The MessageEvent has the type message, a data property which is set to the value of the first argument provided to window.postMessage, an origin property corresponding to the origin of the main document in the window calling window.postMessage at the time window.postMessage was called, and a source property which is the window from which window.postMessage is called. (Other standard properties of events are present with their expected values.)"},close:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/window.close","!doc":"Closes the current window, or a referenced window."},blur:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/element.blur","!doc":"The blur method removes keyboard focus from the current element."},focus:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/element.focus","!doc":"Sets focus on the specified element, if it can be focused."},onload:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onload","!doc":"An event handler for the load event of a window."},onunload:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onunload","!doc":"The unload event is raised when the window is unloading its content and resources. The resources removal is processed after the unload event occurs."},onscroll:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onscroll","!doc":"Specifies the function to be called when the window is scrolled."},onresize:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onresize","!doc":"An event handler for the resize event on the window."},ononline:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/document.ononline","!doc":",fgh s dgkljgsdfl dfjg sdlgj sdlg sdlfj dlg jkdfkj dfjgdfkglsdfjsdlfkgj hdflkg hdlkfjgh dfkjgh"},onoffline:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/Online_and_offline_events","!doc":"Some browsers implement Online/Offline events from the WHATWG Web Applications 1.0 specification."},onmousewheel:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/DOM_event_reference/mousewheel","!doc":"The DOM mousewheel event is fired asynchronously when mouse wheel or similar device is operated. It's represented by the MouseWheelEvent interface."},onmouseup:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onmouseup","!doc":"An event handler for the mouseup event on the window."},onmouseover:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmouseover","!doc":"The onmouseover property returns the onMouseOver event handler code on the current element."},onmouseout:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmouseout","!doc":"The onmouseout property returns the onMouseOut event handler code on the current element."},onmousemove:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmousemove","!doc":"The onmousemove property returns the mousemove event handler code on the current element."},onmousedown:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onmousedown","!doc":"An event handler for the mousedown event on the window."},onclick:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onclick","!doc":"The onclick property returns the onClick event handler code on the current element."},ondblclick:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.ondblclick","!doc":"The ondblclick property returns the onDblClick event handler code on the current element."},onmessage:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Worker","!doc":"Dedicated Web Workers provide a simple means for web content to run scripts in background threads.  Once created, a worker can send messages to the spawning task by posting messages to an event handler specified by the creator."},onkeyup:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onkeyup","!doc":"The onkeyup property returns the onKeyUp event handler code for the current element."},onkeypress:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onkeypress","!doc":"The onkeypress property sets and returns the onKeyPress event handler code for the current element."},onkeydown:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onkeydown","!doc":"An event handler for the keydown event on the window."},oninput:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/DOM_event_reference/input","!doc":"The DOM input event is fired synchronously when the value of an <input> or <textarea> element is changed. Additionally, it's also fired on contenteditable editors when its contents are changed. In this case, the event target is the editing host element. If there are two or more elements which have contenteditable as true, \"editing host\" is the nearest ancestor element whose parent isn't editable. Similarly, it's also fired on root element of designMode editors."},onpopstate:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onpopstate","!doc":"An event handler for the popstate event on the window."},onhashchange:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onhashchange","!doc":"The hashchange event fires when a window's hash changes."},onfocus:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onfocus","!doc":"The onfocus property returns the onFocus event handler code on the current element."},onblur:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onblur","!doc":"The onblur property returns the onBlur event handler code, if any, that exists on the current element."},onerror:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onerror","!doc":"An event handler for runtime script errors."},ondrop:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/drop","!doc":"The drop event is fired when an element or text selection is dropped on a valid drop target."},ondragstart:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/dragstart","!doc":"The dragstart event is fired when the user starts dragging an element or text selection."},ondragover:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/dragover","!doc":"The dragover event is fired when an element or text selection is being dragged over a valid drop target (every few hundred milliseconds)."},ondragleave:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/dragleave","!doc":"The dragleave event is fired when a dragged element or text selection leaves a valid drop target."},ondragenter:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/dragenter","!doc":"The dragenter event is fired when a dragged element or text selection enters a valid drop target."},ondragend:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/dragend","!doc":"The dragend event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key)."},ondrag:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/drag","!doc":"The drag event is fired when an element or text selection is being dragged (every few hundred milliseconds)."},oncontextmenu:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.oncontextmenu","!doc":'An event handler property for right-click events on the window. Unless the default behavior is prevented, the browser context menu will activate (though IE8 has a bug with this and will not activate the context menu if a contextmenu event handler is defined). Note that this event will occur with any non-disabled right-click event and does not depend on an element possessing the "contextmenu" attribute.'},onchange:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onchange","!doc":"The onchange property sets and returns the onChange event handler code for the current element."},onbeforeunload:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onbeforeunload","!doc":"An event that fires when a window is about to unload its resources. The document is still visible and the event is still cancelable."},onabort:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.onabort","!doc":"An event handler for abort events sent to the window."},getSelection:{"!type":"fn() -> +Selection","!url":"https://developer.mozilla.org/en/docs/DOM/window.getSelection","!doc":"Returns a selection object representing the range of text selected by the user. "},alert:{"!type":"fn(message: string)","!url":"https://developer.mozilla.org/en/docs/DOM/window.alert","!doc":"Display an alert dialog with the specified content and an OK button."},confirm:{"!type":"fn(message: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/window.confirm","!doc":"Displays a modal dialog with a message and two buttons, OK and Cancel."},prompt:{"!type":"fn(message: string, value: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/window.prompt","!doc":"Displays a dialog with a message prompting the user to input some text."},scrollBy:{"!type":"fn(x: number, y: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollBy","!doc":"Scrolls the document in the window by the given amount."},scrollTo:{"!type":"fn(x: number, y: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollTo","!doc":"Scrolls to a particular set of coordinates in the document."},scroll:{"!type":"fn(x: number, y: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.scroll","!doc":"Scrolls the window to a particular place in the document."},setTimeout:{"!type":"fn(f: fn(), ms: number) -> number","!url":"https://developer.mozilla.org/en/docs/DOM/window.setTimeout","!doc":"Calls a function or executes a code snippet after specified delay."},clearTimeout:{"!type":"fn(timeout: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.clearTimeout","!doc":"Clears the delay set by window.setTimeout()."},setInterval:{"!type":"fn(f: fn(), ms: number) -> number","!url":"https://developer.mozilla.org/en/docs/DOM/window.setInterval","!doc":"Calls a function or executes a code snippet repeatedly, with a fixed time delay between each call to that function."},clearInterval:{"!type":"fn(interval: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.clearInterval","!doc":"Cancels repeated action which was set up using setInterval."},atob:{"!type":"fn(encoded: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/window.atob","!doc":"Decodes a string of data which has been encoded using base-64 encoding."},btoa:{"!type":"fn(data: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/window.btoa","!doc":"Creates a base-64 encoded ASCII string from a string of binary data."},addEventListener:{"!type":"fn(type: string, listener: fn(e: +Event), capture: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.addEventListener","!doc":"Registers a single event listener on a single target. The event target may be a single element in a document, the document itself, a window, or an XMLHttpRequest."},removeEventListener:{"!type":"fn(type: string, listener: fn(), capture: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.removeEventListener","!doc":"Allows the removal of event listeners from the event target."},dispatchEvent:{"!type":"fn(event: +Event) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.dispatchEvent","!doc":"Dispatches an event into the event system. The event is subject to the same capturing and bubbling behavior as directly dispatched events."},getComputedStyle:{"!type":"fn(node: +Element, pseudo?: string) -> Element.prototype.style","!url":"https://developer.mozilla.org/en/docs/DOM/window.getComputedStyle","!doc":"Gives the final used values of all the CSS properties of an element."},CanvasRenderingContext2D:{canvas:"+Element",width:"number",height:"number",commit:"fn()",save:"fn()",restore:"fn()",currentTransform:"?",scale:"fn(x: number, y: number)",rotate:"fn(angle: number)",translate:"fn(x: number, y: number)",transform:"fn(a: number, b: number, c: number, d: number, e: number, f: number)",setTransform:"fn(a: number, b: number, c: number, d: number, e: number, f: number)",resetTransform:"fn()",globalAlpha:"number",globalCompositeOperation:"string",imageSmoothingEnabled:"bool",strokeStyle:"string",fillStyle:"string",createLinearGradient:"fn(x0: number, y0: number, x1: number, y1: number) -> ?",createPattern:"fn(image: ?, repetition: string) -> ?",shadowOffsetX:"number",shadowOffsetY:"number",shadowBlur:"number",shadowColor:"string",clearRect:"fn(x: number, y: number, w: number, h: number)",fillRect:"fn(x: number, y: number, w: number, h: number)",strokeRect:"fn(x: number, y: number, w: number, h: number)",fillRule:"string",fill:"fn()",beginPath:"fn()",stroke:"fn()",clip:"fn()",resetClip:"fn()",measureText:"fn(text: string) -> ?",drawImage:"fn(image: ?, dx: number, dy: number)",createImageData:"fn(sw: number, sh: number) -> ?",getImageData:"fn(sx: number, sy: number, sw: number, sh: number) -> ?",putImageData:"fn(imagedata: ?, dx: number, dy: number)",lineWidth:"number",lineCap:"string",lineJoin:"string",miterLimit:"number",setLineDash:"fn(segments: [number])",getLineDash:"fn() -> [number]",lineDashOffset:"number",font:"string",textAlign:"string",textBaseline:"string",direction:"string",closePath:"fn()",moveTo:"fn(x: number, y: number)",lineTo:"fn(x: number, y: number)",quadraticCurveTo:"fn(cpx: number, cpy: number, x: number, y: number)",bezierCurveTo:"fn(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number)",arcTo:"fn(x1: number, y1: number, x2: number, y2: number, radius: number)",rect:"fn(x: number, y: number, w: number, h: number)",arc:"fn(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: bool)",ellipse:"fn(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise: bool)"}}
}),function(){"use strict";function e(e,t,n,r,o,s){t[e]&&(n.push(e),(t[e]===!0||1===t[e])&&r.push(o+e+"/"+s))}function t(e,t,n,r,o){var s=r+t+"/"+o;require._fileExists(e.toUrl(s+".js"))&&n.push(s)}function n(e,t,r){var o;for(o in t)!t.hasOwnProperty(o)||e.hasOwnProperty(o)&&!r?"object"==typeof t[o]&&(!e[o]&&t[o]&&(e[o]={}),n(e[o],t[o],r)):e[o]=t[o]}var r=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(o){var s=o.config?o.config():{};return{version:"2.0.4",load:function(o,i,a,l){l=l||{},l.locale&&(s.locale=l.locale);var c,p,d,u=r.exec(o),h=u[1],f=u[4],m=u[5],g=f.split("-"),b=[],y={},v="";if(u[5]?(h=u[1],c=h+m):(c=o,m=u[4],f=s.locale,f||(f=s.locale="undefined"==typeof navigator?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),g=f.split("-")),l.isBuild){for(b.push(c),t(i,"root",b,h,m),p=0;p<g.length;p++)d=g[p],v+=(v?"-":"")+d,t(i,v,b,h,m);if(l.locales){var w,_;for(w=0;w<l.locales.length;w++)for(f=l.locales[w],g=f.split("-"),v="",_=0;_<g.length;_++)d=g[_],v+=(v?"-":"")+d,t(i,v,b,h,m)}i(b,function(){a()})}else i([c],function(t){var r,o=[];for(e("root",t,o,b,h,m),p=0;p<g.length;p++)r=g[p],v+=(v?"-":"")+r,e(v,t,o,b,h,m);i(b,function(){var e,r,s;for(e=o.length-1;e>-1&&o[e];e--)s=o[e],r=t[s],(r===!0||1===r)&&(r=i(h+s+"/"+m)),n(y,r);a(y)})})}}})}(),define("javascript/nls/workermessages",{root:!0}),define("javascript/nls/root/workermessages",{ternDocPluginName:"Doc Comments",ternDocPluginDescription:"Tern plug-in to parse and use JSDoc-like comments for inferencing",orionAMQPPluginName:"Orion AMQP",orionAMQPPluginDescription:"Plug-in that contributes type information and code templates for AMQP.",orionAngularPluginName:"Orion AngularJS",orionAngularPluginDescription:"Plug-in that contributes type information and code templates for AngularJS.",orionComponentPluginName:"Orion ComponentJS",orionComponentPluginDescription:"Plug-in that contributes type information and code templates for ComponentJS.",orionExpressPluginName:"Orion ExpressJS",orionExpressPluginDescription:"Plug-in that contributes type information and code templates for ExpressJS.",orionMongoDBPluginName:"Orion MongoDB",orionMongoDBPluginDescription:"Plug-in that contributes type information and code templates for MongoDB.",orionMySQLPluginName:"Orion MySQL",orionMySQLPluginDescription:"Plug-in that contributes type information and code templates for MySQL.",orionNodePluginName:"Orion Node.js",orionNodePluginDescription:"Plug-in that contributes type information and code templates for Node.js.",orionPostgresPluginName:"Orion PostgreSQL",orionPostgresPluginDescription:"Plug-in that contributes type information and code templates for PostgreSQL.",orionRequirePluginName:"Orion RequireJS",orionRequirePluginDescription:"Plug-in that contributes type information and code templates for RequireJS.",orionRedisPluginName:"Orion Redis",orionRedisPluginDescription:"Plug-in that contributes type information and code templates for Redis.",ternPluginsPluginName:"Orion Tern Plug-in Support",ternPluginsPluginDescription:"Plug-in that allows Orion to inspect and modify plug-ins running in Tern.",unknownError:"An unknown error occurred.",failedDeleteRequest:"Failed to delete file from Tern: ${0}",failedReadRequest:"Failed to read file into Tern: ${0}",failedToComputeProposals:"Failed to compute proposals",failedToComputeProposalsNoServer:"Failed to compute proposals, server not started",failedToComputeDecl:"Failed to compute declaration",failedToComputeDeclNoServer:"Failed to compute declaration, server not started",failedToComputeDoc:"Failed to compute documentation",failedToComputeDocNoServer:"Failed to compute documentation, server not started",failedToComputeOccurrences:"Failed to compute occurrences",failedToComputeOccurrencesNoServer:"failed to compute occurrences, server not started",failedGetInstalledPlugins:"Failed to get installed plug-ins",failedGetInstalledPluginsNoServer:"Failed to get installed plug-ins, server not started",failedInstallPlugins:"Failed to install plug-ins",failedInstallPluginsNoServer:"Failed to install plug-ins, server not started",failedRemovePlugins:"Failed to remove plug-ins",failedRemovePluginsNoServer:"Failed to remove plug-ins, server not started",failedEnablementPlugins:"Failed to set enablement of plug-ins",failedEnablementPluginsNoServer:"Failed to set enablement of plug-ins, server not started",failedGetEnvs:"Failed to get contributed environments",failedGetEnvsNoServer:"Failed to get contributed environments, server not started",failedRename:"Failed to compute rename changes",failedRenameNoServer:"Failed to compute rename changes, server not started"}),define("javascript/handlers/ternAssistHandler",["i18n!javascript/nls/workermessages"],function(e){function t(t,n,r){t?t.request({query:{type:"completions",file:n.meta.location,types:!0,origins:!0,urls:!0,docs:!0,end:n.params.offset,sort:!0,includeKeywords:n.params.keywords},files:n.files},function(t,n){r(t?{request:"completions",error:t.message,message:e.failedToComputeProposals}:n&&n.completions?{request:"completions",proposals:n.completions}:{request:"completions",proposals:[]})}):r({request:"completions",message:e.failedToComputeProposalsNoServer})}return{computeProposals:t}}),define("javascript/handlers/ternDeclarationHandler",["i18n!javascript/nls/workermessages"],function(e){function t(t,n,r){t?t.request({query:{type:"definition",file:n.meta.location,end:n.params.offset},files:n.files},function(t,n){t&&r({request:"definition",error:t.message,message:e.failedToComputeDecl}),r(n&&"number"==typeof n.start&&"number"==typeof n.end?{request:"definition",declaration:n}:{request:"definition",declaration:null})}):r({request:"definition",message:e.failedToComputeDeclNoServer})}return{computeDeclaration:t}}),define("javascript/handlers/ternHoverHandler",["i18n!javascript/nls/workermessages"],function(e){function t(t,n,r){t?t.request({query:{type:"documentation",file:n.meta.location,end:n.params.offset},files:n.files},function(t,n){r(t?{request:"documentation",error:t.message,message:e.failedToComputeDoc}:n&&n.doc?{request:"documentation",doc:n}:{request:"documentation",doc:null})}):r({request:"documentation",message:e.failedToComputeDocNoServer})}return{computeHover:t}}),define("javascript/handlers/ternOccurrencesHandler",["i18n!javascript/nls/workermessages"],function(e){function t(t,n,r){t?t.request({query:{type:"refs",file:n.meta.location,end:n.params.selection.start}},function(t,n){r(t?{request:"occurrences",error:t.message,message:e.failedToComputeOccurrences}:n&&Array.isArray(n)?{request:"occurrences",refs:n}:{request:"occurrences",refs:[]})}):r({request:"occurrences",message:e.failedToComputeOccurrencesNoServer})}return{computeOccurrences:t}}),define("javascript/handlers/ternRenameHandler",["i18n!javascript/nls/workermessages"],function(e){function t(t,n,r){t?t.request({query:{type:"rename",file:n.meta.location,end:n.params.offset,newName:n.newname},files:n.files},function(t,n){r(t?{request:"rename",error:t.message,message:e.failedRename}:n&&Array.isArray(n.changes)?{request:"rename",changes:n}:{request:"rename",changes:[]})}):r({request:"rename",message:e.failedRenameNoServer})}return{computeRename:t}}),define("javascript/handlers/ternPluginsHandler",["i18n!javascript/nls/workermessages"],function(e){function t(t,n,r){t?t.request({query:{type:i}},function(t,n){t&&r({request:i,error:t.message,message:e.failedGetInstalledPlugins}),r("object"==typeof n?{request:i,plugins:n}:{request:i,plugins:null})}):r({request:i,message:e.failedGetInstalledPluginsNoServer})}function n(t,n,r){t?t.request({query:{type:a}},function(t,n){t&&r({request:a,error:t.message,message:e.failedInstallPlugins}),r("object"==typeof n?{request:a,status:n}:{request:a,status:{state:-1}})}):r({request:a,message:e.failedInstallPluginsNoServer})}function r(t,n,r){t?t.request({query:{type:l}},function(t,n){t&&r({request:l,error:t.message,message:e.failedRemovePlugins}),r("object"==typeof n?{request:l,status:n}:{request:l,status:{state:-1}})}):r({request:l,message:e.failedRemovePluginsNoServer})}function o(t,n,r){t?t.request({query:{type:c}},function(t,n){t&&r({request:c,error:t.message,message:e.failedEnablementPlugins}),r("object"==typeof n?{request:c,status:n}:{request:c,status:{state:-1}})}):r({request:c,message:e.failedEnablementPluginsNoServer})}function s(t,n,r){t?t.request({query:{type:p}},function(t,n){t&&r({request:p,error:t.message,message:e.failedGetEnvs}),r("object"==typeof n?{request:p,envs:n}:{request:p,envs:null})}):r({request:p,message:e.failedGetEnvsNoServer})}var i="installed_plugins",a="install_plugins",l="remove_plugins",c="plugin_enablement",p="environments";return{getInstalledPlugins:t,installPlugins:n,removePlugins:r,setPluginEnablement:o,getEnvironments:s}}),define("orion/i18nUtil",[],function(){function e(e){var t=/\$\{([^\}]+)\}/g,n=arguments;return 2===n.length&&n[1]&&"object"==typeof n[1]?e.replace(t,function(e,t){return n[1][t]}):e.replace(t,function(e,t){return n[(t<<0)+1]})}return{formatMessage:e}});var lang="en",sear=self.location.search;if(sear){var langs=sear.split("worker-language");Array.isArray(langs)&&2===langs.length&&(lang=langs[1].slice(1))}requirejs.config({locale:lang}),require({baseUrl:"../../",paths:{i18n:"requirejs/i18n",json:"requirejs/json",esprima:"esprima/esprima"}},["tern/lib/tern","tern/plugin/doc_comment","tern/plugin/orionAmqp","tern/plugin/orionAngular","tern/plugin/orionExpress","tern/plugin/orionMongoDB","tern/plugin/orionMySQL","tern/plugin/orionNode","tern/plugin/orionPostgres","tern/plugin/orionRedis","tern/plugin/orionRequire","tern/plugin/ternPlugins","json!tern/defs/ecma5.json","json!tern/defs/browser.json","javascript/handlers/ternAssistHandler","javascript/handlers/ternDeclarationHandler","javascript/handlers/ternHoverHandler","javascript/handlers/ternOccurrencesHandler","javascript/handlers/ternRenameHandler","javascript/handlers/ternPluginsHandler","i18n!javascript/nls/workermessages","orion/i18nUtil"],function(e,t,n,r,o,s,i,a,l,c,p,d,u,h,f,m,g,b,y,v,w,_){function S(){var t={async:!0,debug:!0,defs:[u,h],projectDir:"/",plugins:{doc_comment:{name:w.ternDocPluginName,description:w.ternDocPluginDescription,fullDocs:!0,version:"0.6.2",removable:!1},orionAmqp:{name:w.orionAMQPPluginName,description:w.orionAMQPPluginDescription,version:"0.9.1",removable:!0,env:"amqp"},orionAngular:{name:w.orionAngularPluginName,description:w.orionAngularPluginDescription,version:"0.6.2",removable:!0},orionExpress:{name:w.orionExpressPluginName,description:w.orionExpressPluginDescription,version:"4.12.4",removable:!0,env:"express"},orionMongoDB:{name:w.orionMongoDBPluginName,description:w.orionMongoDBPluginDescription,version:"1.1.21",removable:!0,env:"mongodb"},orionMySQL:{name:w.orionMySQLPluginName,description:w.orionMySQLPluginDescription,version:"2.7.0",removable:!0,env:"mysql"},orionNode:{name:w.orionNodePluginName,description:w.orionNodePluginDescription,version:"0.6.2",removable:!0},orionPostgres:{name:w.orionPostgresPluginName,description:w.orionPostgresPluginDescription,version:"4.4.0",removable:!0,env:"pg"},orionRedis:{name:w.orionRedisPluginName,description:w.orionRedisPluginDescription,version:"0.12.1",removable:!0,env:"redis"},orionRequire:{name:w.orionRequirePluginName,description:w.orionRequirePluginDescription,version:"0.6.2",removable:!0},plugins:{name:w.ternPluginsPluginName,description:w.ternPluginsPluginDescription,version:"1.0",removable:!1}},getFile:O};T=new e.Server(t),k("server_ready")}function k(e,t){e||(e=new Error(t?t:w.unknownError)),this.port?this.port.postMessage(e):postMessage(e)}function x(e){var t=e.error,n=e.contents,r=e.file,o=E[r];if(Array.isArray(o)){var s=o.shift();"function"==typeof s&&s(t,n)}o=E[e.logical],Array.isArray(o)&&(s=o.shift(),"function"==typeof s&&s(t,{contents:n,file:r,logical:e.logical}))}function j(e){T&&"string"==typeof e.file?T.delFile(e.file):k(_.formatMessage(w.failedDeleteRequest,e.file))}function O(e,t){if(T){var n=e;"object"==typeof e&&(n=e.logical),Array.isArray(E[n])||(E[n]=[]),E[n].push(t),k({request:"read",args:{file:e}})}else k(_.formatMessage(w.failedReadRequest,n))}var T,E=Object.create(null);S(),onmessage=function(e){if("object"==typeof e.data){var t=e.data;if("string"==typeof t.request)switch(t.request){case"completions":f.computeProposals(T,t.args,k);break;case"occurrences":b.computeOccurrences(T,t.args,k);break;case"definition":m.computeDeclaration(T,t.args,k);break;case"documentation":g.computeHover(T,t.args,k);break;case"rename":y.computeRename(T,t.args,k);break;case"addFile":T.addFile(t.args.file,t.args.source);break;case"delfile":j(t.args);break;case"read":x(t.args);break;case"installed_plugins":v.getInstalledPlugins(T,t.args,k);break;case"install_plugins":v.installPlugins(T,t.args,k);break;case"remove_plugins":v.removePlugins(T,t.args,k);break;case"plugin_enablement":v.setPluginEnablement(T,t.args,k);break;case"environments":v.getEnvironments(T,t.args,k)}}},onerror=function(e){k(e)},onconnect=function(e){this.port=e.ports[0],this.port.onmessage=onmessage,this.port.start()}}),define("javascript/plugins/ternWorkerCore",function(){});