Last active
March 27, 2016 08:25
-
-
Save royriojas/0d67452e01754269660f to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var esformatter = require( 'esformatter' ); | |
var esformatterJSX = require( 'esformatter-jsx' ); | |
var throttle = require( 'lodash.throttle' ); | |
var hash = window.location.hash.substr( 1 ); | |
var extend = require('extend'); | |
var params; | |
try { | |
params = JSON.parse( decodeURIComponent( hash ) ); | |
} catch (ex) { | |
params = { }; | |
} | |
var testCode = '// Paste your own code here...\n\n\n\ var Comment = React.createClass({\n render: function() {\n return (\n <div className="comment">\n <h2 className="commentAuthor">\n {this.props.author}\n </h2>\n {this.props.children}\n </div>\n );\n }\n});'; | |
var originalConfig; | |
var esformatterConfig = originalConfig = { | |
'jsx': { | |
'attrsOnSameLineAsTag': false, | |
'maxAttrsOnTag': 1, | |
'firstAttributeOnSameLine': false, | |
'alignWithFirstAttribute': true | |
}, | |
'indent': { | |
'value': ' ', | |
'ArrayExpression': 1, | |
'AssignmentExpression': 1, | |
'BinaryExpression': 1, | |
'ConditionalExpression': 1, | |
'CallExpression': 1, | |
'CatchClause': 1, | |
'DoWhileStatement': 1, | |
'ForInStatement': 1, | |
'ForStatement': 1, | |
'FunctionDeclaration': 1, | |
'FunctionExpression': 1, | |
'IfStatement': 1, | |
'MemberExpression': 1, | |
'MultipleVariableDeclaration': 1, | |
'ObjectExpression': 1, | |
'ReturnStatement': '>=1', | |
'SwitchCase': 1, | |
'SwitchStatement': 1, | |
'TopLevelFunctionBlock': 1, | |
'TryStatement': 1, | |
'VariableDeclaration.LogicalExpression': 1, | |
'WhileStatement': 1 | |
}, | |
'lineBreak': { | |
'before': { | |
'AssignmentExpression': '>=0', | |
'AssignmentOperator': 0, | |
'BlockStatement': 1, | |
'CallExpression': -1, | |
'ConditionalExpression': '>=1', | |
'CatchOpeningBrace': 0, | |
'CatchClosingBrace': '>=1', | |
'CatchKeyword': 0, | |
'DeleteOperator': '>=1', | |
'DoWhileStatement': '>=1', | |
'DoWhileStatementOpeningBrace': 0, | |
'DoWhileStatementClosingBrace': '>=1', | |
'EndOfFile': 1, | |
'EmptyStatement': -1, | |
'FinallyKeyword': -1, | |
'FinallyOpeningBrace': 0, | |
'FinallyClosingBrace': '>=1', | |
'ForInStatement': '>=1', | |
'ForInStatementExpressionOpening': 0, | |
'ForInStatementExpressionClosing': 0, | |
'ForInStatementOpeningBrace': 0, | |
'ForInStatementClosingBrace': '>=1', | |
'ForStatement': '>=1', | |
'ForStatementExpressionOpening': 0, | |
'ForStatementExpressionClosing': '<2', | |
'ForStatementOpeningBrace': 0, | |
'ForStatementClosingBrace': '>=1', | |
'FunctionExpression': 0, | |
'FunctionExpressionOpeningBrace': 0, | |
'FunctionExpressionClosingBrace': '>=1', | |
'FunctionDeclaration': '>=1', | |
'FunctionDeclarationOpeningBrace': 0, | |
'FunctionDeclarationClosingBrace': '>=1', | |
'IfStatement': '>=1', | |
'IfStatementOpeningBrace': 0, | |
'IfStatementClosingBrace': '>=1', | |
'ElseIfStatement': 0, | |
'ElseIfStatementOpeningBrace': 0, | |
'ElseIfStatementClosingBrace': '>=1', | |
'ElseStatement': 0, | |
'ElseStatementOpeningBrace': 0, | |
'ElseStatementClosingBrace': '>=1', | |
'LogicalExpression': -1, | |
'ObjectExpressionOpeningBrace': 0, | |
'ObjectExpressionClosingBrace': 1, | |
'Property': 1, | |
'ReturnStatement': '>=1', | |
'SwitchOpeningBrace': 0, | |
'SwitchClosingBrace': '>=1', | |
'ThisExpression': -1, | |
'ThrowStatement': '>=1', | |
'TryKeyword': -1, | |
'TryOpeningBrace': 0, | |
'TryClosingBrace': '>=1', | |
'VariableName': '>=1', | |
'VariableValue': 0, | |
'VariableDeclaration': '>=1', | |
'VariableDeclarationWithoutInit': '>=1', | |
'WhileStatement': '>=1', | |
'WhileStatementOpeningBrace': 0, | |
'WhileStatementClosingBrace': '>=1', | |
'ArrayExpressionClosing': 1 | |
}, | |
'after': { | |
'AssignmentExpression': '>=1', | |
'AssignmentOperator': 0, | |
'BlockStatement': 0, | |
'CallExpression': -1, | |
'CatchOpeningBrace': '>=1', | |
'CatchClosingBrace': '>=0', | |
'CatchKeyword': 0, | |
'ConditionalExpression': '>=1', | |
'DeleteOperator': '>=1', | |
'DoWhileStatement': '>=1', | |
'DoWhileStatementOpeningBrace': '>=1', | |
'DoWhileStatementClosingBrace': 0, | |
'EmptyStatement': -1, | |
'FinallyKeyword': -1, | |
'FinallyOpeningBrace': '>=1', | |
'FinallyClosingBrace': '>=1', | |
'ForInStatement': '>=1', | |
'ForInStatementExpressionOpening': '<2', | |
'ForInStatementExpressionClosing': -1, | |
'ForInStatementOpeningBrace': '>=1', | |
'ForInStatementClosingBrace': '>=1', | |
'ForStatement': '>=1', | |
'ForStatementExpressionOpening': '<2', | |
'ForStatementExpressionClosing': -1, | |
'ForStatementOpeningBrace': '>=1', | |
'ForStatementClosingBrace': '>=1', | |
'FunctionExpression': '>=1', | |
'FunctionExpressionOpeningBrace': '>=1', | |
'FunctionExpressionClosingBrace': -1, | |
'FunctionDeclaration': '>=1', | |
'FunctionDeclarationOpeningBrace': '>=1', | |
'FunctionDeclarationClosingBrace': '>=1', | |
'IfStatement': '>=1', | |
'IfStatementOpeningBrace': '>=1', | |
'IfStatementClosingBrace': '>=1', | |
'ElseIfStatement': '>=1', | |
'ElseIfStatementOpeningBrace': '>=1', | |
'ElseIfStatementClosingBrace': '>=1', | |
'ElseStatement': '>=1', | |
'ElseStatementOpeningBrace': '>=1', | |
'ElseStatementClosingBrace': '>=1', | |
'LogicalExpression': -1, | |
'ObjectExpressionClosingBrace': 0, | |
'ObjectExpressionOpeningBrace': 1, | |
'PropertyValue': 0, | |
'Property': 0, | |
'ReturnStatement': 1, | |
'SwitchOpeningBrace': '>=1', | |
'SwitchClosingBrace': '>=1', | |
'ThisExpression': 0, | |
'ThrowStatement': '>=1', | |
'TryKeyword': -1, | |
'TryOpeningBrace': '>=1', | |
'TryClosingBrace': 0, | |
'VariableDeclaration': '>=1', | |
'WhileStatement': '>=1', | |
'WhileStatementOpeningBrace': '>=1', | |
'WhileStatementClosingBrace': '>=1', | |
'ArrayExpressionOpening': 1, | |
'ArrayExpressionComma': 1 | |
} | |
}, | |
'whiteSpace': { | |
'value': ' ', | |
'removeTrailing': 1, | |
'before': { | |
'ArgumentComma': 0, | |
'ArgumentList': 1, | |
'ArgumentListArrayExpression': 0, | |
'ArgumentListFunctionExpression': 1, | |
'ArgumentListObjectExpression': 0, | |
'AssignmentOperator': 1, | |
'BinaryExpression': 0, | |
'BinaryExpressionOperator': 1, | |
'BlockComment': 1, | |
'CallExpression': 1, | |
'CatchParameterList': 0, | |
'CatchOpeningBrace': 1, | |
'CatchClosingBrace': 1, | |
'CatchKeyword': 1, | |
'CommaOperator': 0, | |
'ConditionalExpressionConsequent': 1, | |
'ConditionalExpressionAlternate': 1, | |
'DoWhileStatementOpeningBrace': 1, | |
'DoWhileStatementClosingBrace': 1, | |
'DoWhileStatementConditional': 1, | |
'EmptyStatement': 0, | |
'ExpressionClosingParentheses': 0, | |
'FinallyKeyword': -1, | |
'FinallyOpeningBrace': 1, | |
'FinallyClosingBrace': 1, | |
'ForInStatement': 1, | |
'ForInStatementExpressionOpening': 1, | |
'ForInStatementExpressionClosing': 0, | |
'ForInStatementOpeningBrace': 1, | |
'ForInStatementClosingBrace': 1, | |
'ForStatement': 1, | |
'ForStatementExpressionOpening': 1, | |
'ForStatementExpressionClosing': 0, | |
'ForStatementOpeningBrace': 1, | |
'ForStatementClosingBrace': 1, | |
'ForStatementSemicolon': 0, | |
'FunctionDeclarationOpeningBrace': 1, | |
'FunctionDeclarationClosingBrace': 1, | |
'FunctionExpressionOpeningBrace': 1, | |
'FunctionExpressionClosingBrace': 1, | |
'IfStatementConditionalOpening': 1, | |
'IfStatementConditionalClosing': 1, | |
'IfStatementOpeningBrace': 1, | |
'IfStatementClosingBrace': 1, | |
'ElseStatementOpeningBrace': 1, | |
'ElseStatementClosingBrace': 1, | |
'ElseIfStatementOpeningBrace': 1, | |
'ElseIfStatementClosingBrace': 1, | |
'MemberExpressionClosing': 1, | |
'LineComment': 1, | |
'LogicalExpressionOperator': 1, | |
'PropertyName': 1, | |
'Property': 1, | |
'PropertyValue': 1, | |
'ParameterList': 1, | |
'SwitchDiscriminantOpening': 1, | |
'SwitchDiscriminantClosing': 0, | |
'ThrowKeyword': 1, | |
'TryKeyword': -1, | |
'TryOpeningBrace': 1, | |
'TryClosingBrace': 1, | |
'UnaryExpressionOperator': 0, | |
'VariableName': 1, | |
'VariableValue': 1, | |
'WhileStatementConditionalOpening': 1, | |
'WhileStatementConditionalClosing': 0, | |
'WhileStatementOpeningBrace': 1, | |
'WhileStatementClosingBrace': 1, | |
'ParameterComma': 0, | |
'ArrayExpressionOpening': 1, | |
'ArrayExpressionClosing': 1, | |
'ArrayExpressionComma': 0, | |
'ObjectExpressionClosingBrace': 1 | |
}, | |
'after': { | |
'ObjectExpressionOpeningBrace': 1, | |
'ArrayExpressionOpening': 1, | |
'ArrayExpressionClosing': 0, | |
'ArrayExpressionComma': 1, | |
'ArgumentComma': 1, | |
'ArgumentList': 1, | |
'ArgumentListArrayExpression': 1, | |
'ArgumentListFunctionExpression': 1, | |
'ArgumentListObjectExpression': 0, | |
'AssignmentOperator': 1, | |
'BinaryExpression': 0, | |
'BinaryExpressionOperator': 1, | |
'BlockComment': 1, | |
'CallExpression': 0, | |
'CatchParameterList': 0, | |
'CatchOpeningBrace': 1, | |
'CatchClosingBrace': 1, | |
'CatchKeyword': 1, | |
'CommaOperator': 1, | |
'ConditionalExpressionConsequent': 1, | |
'ConditionalExpressionTest': 1, | |
'DoWhileStatementOpeningBrace': 1, | |
'DoWhileStatementClosingBrace': 1, | |
'DoWhileStatementBody': 1, | |
'EmptyStatement': 0, | |
'ExpressionOpeningParentheses': 0, | |
'FinallyKeyword': -1, | |
'FinallyOpeningBrace': 1, | |
'FinallyClosingBrace': 1, | |
'ForInStatement': 1, | |
'ForInStatementExpressionOpening': 0, | |
'ForInStatementExpressionClosing': 1, | |
'ForInStatementOpeningBrace': 1, | |
'ForInStatementClosingBrace': 1, | |
'ForStatement': 1, | |
'ForStatementExpressionOpening': 0, | |
'ForStatementExpressionClosing': 1, | |
'ForStatementClosingBrace': 1, | |
'ForStatementOpeningBrace': 1, | |
'ForStatementSemicolon': 1, | |
'FunctionReservedWord': 1, | |
'FunctionName': 0, | |
'FunctionExpressionOpeningBrace': 0, | |
'FunctionExpressionClosingBrace': 0, | |
'FunctionDeclarationOpeningBrace': 1, | |
'FunctionDeclarationClosingBrace': 1, | |
'IfStatementConditionalOpening': 1, | |
'IfStatementConditionalClosing': 1, | |
'IfStatementOpeningBrace': 1, | |
'IfStatementClosingBrace': 1, | |
'ElseStatementOpeningBrace': 1, | |
'ElseStatementClosingBrace': 1, | |
'ElseIfStatementOpeningBrace': 1, | |
'ElseIfStatementClosingBrace': 1, | |
'MemberExpressionOpening': 1, | |
'LogicalExpressionOperator': 1, | |
'PropertyName': 0, | |
'PropertyValue': 0, | |
'ParameterComma': 1, | |
'ParameterList': 1, | |
'SwitchDiscriminantOpening': 0, | |
'SwitchDiscriminantClosing': 1, | |
'ThrowKeyword': 1, | |
'TryKeyword': -1, | |
'TryOpeningBrace': 1, | |
'TryClosingBrace': 1, | |
'UnaryExpressionOperator': 0, | |
'VariableName': 1, | |
'WhileStatementConditionalOpening': 0, | |
'WhileStatementConditionalClosing': 1, | |
'WhileStatementOpeningBrace': 1, | |
'WhileStatementClosingBrace': 1, | |
'ObjectExpressionClosingBrace': 0 | |
} | |
} | |
}; | |
if ( supportStorage ) { | |
try { | |
//__esConfig = params.config || JSON.parse( window.localStorage.__esconfig2__ ); | |
__esConfig = JSON.parse( window.localStorage.__esconfig2__ ); | |
} catch (ex) { | |
__esConfig = esformatterConfig; | |
} | |
} else { | |
__esConfig = esformatterConfig; | |
} | |
esformatterConfig = __esConfig; | |
extend(true, esformatterConfig, params.config); | |
var supportStorage = true; | |
try { | |
testCode = params.code || window.localStorage.__code2__ || testCode; | |
} catch (ex) { | |
supportStorage = false; | |
} | |
esformatter.register( esformatterJSX ); | |
var doSaveHistory = function ( code, esformatterConfig ) { | |
history.replaceState( { }, 'save', '#' + encodeURIComponent( JSON.stringify( { | |
config: { | |
jsx: esformatterConfig.jsx | |
}, | |
code: code | |
} ) ) ); | |
}; | |
doSaveHistory = throttle(doSaveHistory, 1000); | |
function fnStart() { | |
var source = document.getElementById( 'source-area' ); | |
var pre = document.getElementById( 'result-area' ); | |
source.value = testCode; | |
var cdmIn = CodeMirror.fromTextArea( source, { | |
lineNumbers: true, | |
mode: 'javascript' | |
} ); | |
var cdmOut = CodeMirror.fromTextArea( pre, { | |
lineNumbers: true, | |
mode: 'javascript' | |
} ); | |
var formatCode = function () { | |
try { | |
var code = cdmIn.getValue(); | |
if ( supportStorage ) { | |
window.localStorage.__code2__ = code; | |
window.localStorage.__esconfig2__ = JSON.stringify( esformatterConfig ); | |
} | |
doSaveHistory( code, esformatterConfig ); | |
var esResult = esformatter.format( code, esformatterConfig ); | |
cdmOut.setValue( esResult ); | |
} catch (ex) { | |
cdmOut.setValue( '//==> Error: ' + ex.message ); | |
if ( supportStorage ) { | |
window.localStorage.__code2__ = testCode; | |
} | |
} | |
}; | |
var fCode = throttle( formatCode, 500 ); | |
formatCode(); | |
cdmIn.on( 'change', fCode ); | |
var $configPanel = $( '#panel-config' ); | |
var $doc = $( document ); | |
var close = function () { | |
$configPanel.removeClass( 'panel-open' ); | |
$doc.off( '.panel' ); | |
}; | |
var shown = false; | |
var $btn = $( '#btn-config' ).on( 'click', function ( e ) { | |
var isOpen = $configPanel.hasClass( 'panel-open' ); | |
if ( !isOpen ) { | |
$configPanel.addClass( 'panel-open' ); | |
setTimeout( function () { | |
$doc.on( 'click.panel', function ( e ) { | |
if ( $( e.target ).closest( '#panel-config' ).length > 0 ) { | |
return; | |
} | |
close(); | |
} ); | |
}, 100 ); | |
if ( !shown ) { | |
shown = true; | |
var configTxt = CodeMirror.fromTextArea( document.getElementById( 'config' ), { | |
lineNumbers: true, | |
mode: 'javascript' | |
} ); | |
var $restore = $( '#btn-restore' ).on( 'click', function ( e ) { | |
configTxt.setValue( JSON.stringify( originalConfig, null, 2 ) ); | |
} ); | |
var __esConfig; | |
if ( supportStorage ) { | |
try { | |
//__esConfig = params.config || JSON.parse( window.localStorage.__esconfig2__ ); | |
__esConfig = JSON.parse( window.localStorage.__esconfig2__ ); | |
} catch (ex) { | |
__esConfig = esformatterConfig; | |
} | |
} else { | |
__esConfig = esformatterConfig; | |
} | |
esformatterConfig = __esConfig; | |
extend(true, esformatterConfig, params.config); | |
configTxt.setValue( JSON.stringify( esformatterConfig, null, 2 ) ); | |
configTxt.on( 'change', function () { | |
var esConfig; | |
try { | |
esConfig = JSON.parse( configTxt.getValue() ); | |
} catch (ex) { | |
esConfig = esformatterConfig; | |
} | |
esformatterConfig = esConfig; | |
fCode(); | |
} ); | |
} | |
} else { | |
close(); | |
} | |
} ); | |
} | |
var $ = require( 'jquery' ); | |
$.getScript( 'https://cdn.jsdelivr.net/codemirror/4.5.0/codemirror.js' ).then( function () { | |
$.getScript( 'https://cdn.jsdelivr.net/codemirror/4.5.0/mode/javascript/javascript.js' ).then( function () { | |
$( fnStart ); | |
} ); | |
} ); |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function(){require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var getNative=require("lodash._getnative");var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max,nativeNow=getNative(Date,"now");var now=nativeNow||function(){return(new Date).getTime()};function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}wait=wait<0?0:+wait||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=!!options.leading;maxWait="maxWait"in options&&nativeMax(+options.maxWait||0,wait);trailing="trailing"in options?!!options.trailing:trailing}function cancel(){if(timeoutId){clearTimeout(timeoutId)}if(maxTimeoutId){clearTimeout(maxTimeoutId)}lastCalled=0;maxTimeoutId=timeoutId=trailingCall=undefined}function complete(isCalled,id){if(id){clearTimeout(id)}maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=undefined}}}function delayed(){var remaining=wait-(now()-stamp);if(remaining<=0||remaining>wait){complete(trailingCall,maxTimeoutId)}else{timeoutId=setTimeout(delayed,remaining)}}function maxDelayed(){complete(trailing,timeoutId)}function debounced(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0||remaining>maxWait;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=undefined}return result}debounced.cancel=cancel;return debounced}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}module.exports=debounce},{"lodash._getnative":2}],2:[function(require,module,exports){var funcTag="[object Function]";var reIsHostCtor=/^\[object .+?Constructor\]$/;function isObjectLike(value){return!!value&&typeof value=="object"}var objectProto=Object.prototype;var fnToString=Function.prototype.toString;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;var reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function getNative(object,key){var value=object==null?undefined:object[key];return isNative(value)?value:undefined}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isNative(value){if(value==null){return false}if(isFunction(value)){return reIsNative.test(fnToString.call(value))}return isObjectLike(value)&&reIsHostCtor.test(value)}module.exports=getNative},{}],"lodash.throttle":[function(require,module,exports){var debounce=require("lodash.debounce");var FUNC_ERROR_TEXT="Expected a function";function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?!!options.leading:leading;trailing="trailing"in options?!!options.trailing:trailing}return debounce(func,wait,{leading:leading,maxWait:+wait,trailing:trailing})}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}module.exports=throttle},{"lodash.debounce":1}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({extend:[function(require,module,exports){"use strict";var hasOwn=Object.prototype.hasOwnProperty;var toStr=Object.prototype.toString;var isArray=function isArray(arr){if(typeof Array.isArray==="function"){return Array.isArray(arr)}return toStr.call(arr)==="[object Array]"};var isPlainObject=function isPlainObject(obj){if(!obj||toStr.call(obj)!=="[object Object]"){return false}var hasOwnConstructor=hasOwn.call(obj,"constructor");var hasIsPrototypeOf=obj.constructor&&obj.constructor.prototype&&hasOwn.call(obj.constructor.prototype,"isPrototypeOf");if(obj.constructor&&!hasOwnConstructor&&!hasIsPrototypeOf){return false}var key;for(key in obj){}return typeof key==="undefined"||hasOwn.call(obj,key)};module.exports=function extend(){var options,name,src,copy,copyIsArray,clone,target=arguments[0],i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}else if(typeof target!=="object"&&typeof target!=="function"||target==null){target={}}for(;i<length;++i){options=arguments[i];if(options!=null){for(name in options){src=target[name];copy=options[name];if(target!==copy){if(deep&©&&(isPlainObject(copy)||(copyIsArray=isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&isArray(src)?src:[]}else{clone=src&&isPlainObject(src)?src:{}}target[name]=extend(deep,clone,copy)}else if(typeof copy!=="undefined"){target[name]=copy}}}}}return target}},{}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({jquery:[function(require,module,exports){(function(global,factory){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document")}return factory(w)}}else{factory(global)}})(typeof window!=="undefined"?window:this,function(window,noGlobal){var arr=[];var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var support={};var document=window.document,version="2.1.4",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return num!=null?num<0?this[num+this.length]:this[num]:slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret},each:function(callback,args){return jQuery.each(this,callback,args)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(i===length){target=this;i--}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&©&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&jQuery.isArray(src)?src:[]}else{clone=src&&jQuery.isPlainObject(src)?src:{}}target[name]=jQuery.extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return jQuery.type(obj)==="function"},isArray:Array.isArray,isWindow:function(obj){return obj!=null&&obj===obj.window},isNumeric:function(obj){return!jQuery.isArray(obj)&&obj-parseFloat(obj)+1>=0},isPlainObject:function(obj){if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray){for(;i<length;i++){value=callback.apply(obj[i],args);if(value===false){break}}}else{for(i in obj){value=callback.apply(obj[i],args);if(value===false){break}}}}else{if(isArray){for(;i<length;i++){value=callback.call(obj[i],i,obj[i]);if(value===false){break}}}else{for(i in obj){value=callback.call(obj[i],i,obj[i]);if(value===false){break}}}}return obj},trim:function(text){return text==null?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArraylike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr)}else{push.call(ret,arr)}}return ret},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i)},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j]}first.length=i;return first},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i])}}return matches},map:function(elems,callback,arg){var value,i=0,length=elems.length,isArray=isArraylike(elems),ret=[];if(isArray){for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}return concat.apply([],ret)},guid:1,proxy:function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp}if(!jQuery.isFunction(fn)){return undefined}args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy},now:Date.now,support:support});jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});function isArraylike(obj){var length="length"in obj&&obj.length,type=jQuery.type(obj);if(type==="function"||jQuery.isWindow(obj)){return false}if(obj.nodeType===1&&length){return true}return type==="array"||length===0||typeof length==="number"&&length>0&&length-1 in obj}var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i}}return-1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),attributes="\\["+whitespace+"*("+characterEncoding+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+".*"+")\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while(target[j++]=els[i++]){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;results=results||[];nodeType=context.nodeType;if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed&&documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if(m=match[1]){if(nodeType===9){elem=context.getElementById(m);if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&support.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){nid=old=expando;newContext=context;newSelector=nodeType!==1&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){groups=tokenize(selector);if(old=context.getAttribute("id")){nid=old.replace(rescape,"\\$&")}else{context.setAttribute("id",nid)}nid="[id='"+nid+"'] ";i=groups.length;while(i--){groups[i]=nid+toSelector(groups[i])}newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;newSelector=groups.join(",")}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(!old){context.removeAttribute("id")}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key+" "]=value}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return false}finally{if(div.parentNode){div.parentNode.removeChild(div)}div=null}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=attrs.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff}if(cur){while(cur=cur.nextSibling){if(cur===b){return-1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,parent,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=doc.documentElement;parent=doc.defaultView;if(parent&&parent!==parent.top){if(parent.addEventListener){parent.addEventListener("unload",unloadHandler,false)}else if(parent.attachEvent){parent.attachEvent("onunload",unloadHandler)}}documentIsHTML=!isXML(doc);support.attributes=assert(function(div){div.className="i";return!div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(doc.createComment(""));return!div.getElementsByTagName("*").length});support.getElementsByClassName=rnative.test(doc.getElementsByClassName);support.getById=assert(function(div){docElem.appendChild(div).id=expando;return!doc.getElementsByName||!doc.getElementsByName(expando).length});if(support.getById){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{delete Expr.find["ID"];Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag)}else if(support.qsa){return context.querySelectorAll(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while(elem=results[i++]){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if(support.qsa=rnative.test(doc.querySelectorAll)){assert(function(div){docElem.appendChild(div).innerHTML="<a id='"+expando+"'></a>"+"<select id='"+expando+"-\f]' msallowcapture=''>"+"<option selected=''></option></select>";if(div.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")")}if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!div.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=")}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}if(!div.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]")}});assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=")}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled")}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1}if(b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}else if(aup===bup){return siblingCheck(a,b)}cur=a;while(cur=cur.parentNode){ap.unshift(cur)}cur=b;while(cur=cur.parentNode){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return doc};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i++]){ret+=getText(node)}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else if(nodeType===3||nodeType===4){return elem.nodeValue}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3]){Sizzle.error(match[0])}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){outerCache=parent[expando]||(parent[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=cache[0]===dirruns&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns){diff=cache[1]}else{while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){(node[expando]||(node[expando]={}))[type]=[dirruns,diff]}if(node===elem){break}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===false},disabled:function(elem){return elem.disabled===true},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected; | |
},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return!Expr.pseudos["empty"](elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i)}return matchIndexes})}};Expr.pseudos["nth"]=Expr.pseudos["eq"];for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i)}for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i)}function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters;tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached){return parseOnly?0:cached.slice(0)}soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar}groups.push(tokens=[])}matched=false;if(match=rcombinators.exec(soFar)){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length)}for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length)}}if(!matched){break}}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)};function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value}return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&dir==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml)}}}:function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];if(xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true}}}}else{while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});if((oldCache=outerCache[dir])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return newCache[2]=oldCache[2]}else{outerCache[dir]=newCache;if(newCache[2]=matcher(elem,context,xml)){return true}}}}}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results)}return results}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if(elem=unmatched[i]){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i)}}}}return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter)}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector)}return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml)}if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if(elem=temp[i]){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem)}}}if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if(elem=matcherOut[i]){temp.push(matcherIn[i]=elem)}}postFinder(null,matcherOut=[],temp,xml)}i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i<len;i++){if(matcher=Expr.relative[tokens[i].type]){matchers=[addCombinator(elementMatcher(matchers),matcher)]}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break}}return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;if(outermost){outermostContext=context!==document&&context}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;while(matcher=elementMatchers[j++]){if(matcher(elem,context,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector=selector.slice(tokens.shift().value.length)}i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type]){break}if(find=Expr.find[type]){if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="<a href='#'></a>";return div.firstChild.getAttribute("href")==="#"})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}})}if(!support.attributes||!assert(function(div){div.innerHTML="<input/>";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue}})}if(!assert(function(div){return div.getAttribute("disabled")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/;var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>=0!==not})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,len=this.length,ret=[],self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true}}}))}for(i=0;i<len;i++){jQuery.find(selector,self[i],ret)}ret=this.pushStack(len>1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector){return this}if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}}else if(!context||context.jquery){return(context||rootjQuery).find(selector)}else{return this.constructor(context).find(selector)}}else if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector)){return typeof rootjQuery.ready!=="undefined"?rootjQuery.ready(selector):selector(jQuery)}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.extend({dir:function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched},sibling:function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched}});jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true}}})},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],pos=rneedsContext.test(selectors)||typeof selectors!=="string"?jQuery(selectors,context||this.context):0;for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(pos?pos.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.unique(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnotwhite=/\S+/g;var optionsCache={};function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?optionsCache[options]||createOptions(options):jQuery.extend({},options);var memory,fired,firing,firingStart,firingLength,firingIndex,list=[],stack=!options.once&&[],fire=function(data){memory=options.memory&&data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;firing=true;for(;list&&firingIndex<firingLength;firingIndex++){if(list[firingIndex].apply(data[0],data[1])===false&&options.stopOnFalse){memory=false;break}}firing=false;if(list){if(stack){if(stack.length){fire(stack.shift())}}else if(memory){list=[]}else{self.disable()}}},self={add:function(){if(list){var start=list.length;(function add(args){jQuery.each(args,function(_,arg){var type=jQuery.type(arg);if(type==="function"){if(!options.unique||!self.has(arg)){list.push(arg)}}else if(arg&&arg.length&&type!=="string"){add(arg)}})})(arguments);if(firing){firingLength=list.length}else if(memory){firingStart=start;fire(memory)}}return this},remove:function(){if(list){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(firing){if(index<=firingLength){firingLength--}if(index<=firingIndex){firingIndex--}}}})}return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length)},empty:function(){list=[];firingLength=0;return this},disable:function(){list=stack=memory=undefined;return this},disabled:function(){return!list},lock:function(){stack=undefined;if(!memory){self.disable()}return this},locked:function(){return!stack},fireWith:function(context,args){if(list&&(!fired||stack)){args=args||[];args=[context,args.slice?args.slice():args];if(firing){stack.push(args)}else{fire(args)}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return!!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify)}else{newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)}})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock)}deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(subordinate){var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues){deferred.notifyWith(contexts,values)}else if(!--remaining){deferred.resolveWith(contexts,values)}}},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i<length;i++){if(resolveValues[i]&&jQuery.isFunction(resolveValues[i].promise)){resolveValues[i].promise().done(updateFunc(i,resolveContexts,resolveValues)).fail(deferred.reject).progress(updateFunc(i,progressContexts,progressValues))}else{--remaining}}}if(!remaining){deferred.resolveWith(resolveContexts,resolveValues)}return deferred.promise()}});var readyList;jQuery.fn.ready=function(fn){jQuery.ready.promise().done(fn);return this};jQuery.extend({isReady:false,readyWait:1,holdReady:function(hold){if(hold){jQuery.readyWait++}else{jQuery.ready(true)}},ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return}jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return}readyList.resolveWith(document,[jQuery]);if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");jQuery(document).off("ready")}}});function completed(){document.removeEventListener("DOMContentLoaded",completed,false);window.removeEventListener("load",completed,false);jQuery.ready()}jQuery.ready.promise=function(obj){if(!readyList){readyList=jQuery.Deferred();if(document.readyState==="complete"){setTimeout(jQuery.ready)}else{document.addEventListener("DOMContentLoaded",completed,false);window.addEventListener("load",completed,false)}}return readyList.promise(obj)};jQuery.ready.promise();var access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)==="object"){chainable=true;for(i in key){jQuery.access(elems,fn,i,key[i],true,emptyGet,raw)}}else if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)))}}}return chainable?elems:bulk?fn.call(elems):len?fn(elems[0],key):emptyGet};jQuery.acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!+owner.nodeType};function Data(){Object.defineProperty(this.cache={},0,{get:function(){return{}}});this.expando=jQuery.expando+Data.uid++}Data.uid=1;Data.accepts=jQuery.acceptData;Data.prototype={key:function(owner){if(!Data.accepts(owner)){return 0}var descriptor={},unlock=owner[this.expando];if(!unlock){unlock=Data.uid++;try{descriptor[this.expando]={value:unlock};Object.defineProperties(owner,descriptor)}catch(e){descriptor[this.expando]=unlock;jQuery.extend(owner,descriptor)}}if(!this.cache[unlock]){this.cache[unlock]={}}return unlock},set:function(owner,data,value){var prop,unlock=this.key(owner),cache=this.cache[unlock];if(typeof data==="string"){cache[data]=value}else{if(jQuery.isEmptyObject(cache)){jQuery.extend(this.cache[unlock],data)}else{for(prop in data){cache[prop]=data[prop]}}}return cache},get:function(owner,key){var cache=this.cache[this.key(owner)];return key===undefined?cache:cache[key]},access:function(owner,key,value){var stored;if(key===undefined||key&&typeof key==="string"&&value===undefined){stored=this.get(owner,key);return stored!==undefined?stored:this.get(owner,jQuery.camelCase(key))}this.set(owner,key,value);return value!==undefined?value:key},remove:function(owner,key){var i,name,camel,unlock=this.key(owner),cache=this.cache[unlock];if(key===undefined){this.cache[unlock]={}}else{if(jQuery.isArray(key)){name=key.concat(key.map(jQuery.camelCase))}else{camel=jQuery.camelCase(key);if(key in cache){name=[key,camel]}else{name=camel;name=name in cache?[name]:name.match(rnotwhite)||[]}}i=name.length;while(i--){delete cache[name[i]]}}},hasData:function(owner){return!jQuery.isEmptyObject(this.cache[owner[this.expando]]||{})},discard:function(owner){if(owner[this.expando]){delete this.cache[owner[this.expando]]}}};var data_priv=new Data;var data_user=new Data;var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/([A-Z])/g;function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}data_user.set(elem,key,data)}else{data=undefined}}return data}jQuery.extend({hasData:function(elem){return data_user.hasData(elem)||data_priv.hasData(elem)},data:function(elem,name,data){return data_user.access(elem,name,data)},removeData:function(elem,name){data_user.remove(elem,name)},_data:function(elem,name,data){return data_priv.access(elem,name,data)},_removeData:function(elem,name){data_priv.remove(elem,name)}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=data_user.get(elem);if(elem.nodeType===1&&!data_priv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data[name])}}}data_priv.set(elem,"hasDataAttrs",true)}}return data}if(typeof key==="object"){return this.each(function(){data_user.set(this,key)})}return access(this,function(value){var data,camelKey=jQuery.camelCase(key);if(elem&&value===undefined){data=data_user.get(elem,key);if(data!==undefined){return data}data=data_user.get(elem,camelKey);if(data!==undefined){return data}data=dataAttr(elem,camelKey,undefined);if(data!==undefined){return data}return}this.each(function(){var data=data_user.get(this,camelKey);data_user.set(this,camelKey,value);if(key.indexOf("-")!==-1&&data!==undefined){data_user.set(this,key,value)}})},null,value,arguments.length>1,null,true)},removeData:function(key){return this.each(function(){data_user.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=data_priv.get(elem,type);if(data){if(!queue||jQuery.isArray(data)){queue=data_priv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+"queueHooks";return data_priv.get(elem,key)||data_priv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(elem,[type+"queue",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.length<setter){return jQuery.queue(this[0],type)}return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!--count){defer.resolveWith(elements,[elements])}};if(typeof type!=="string"){obj=type;type=undefined}type=type||"fx";while(i--){tmp=data_priv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve)}}resolve();return defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var cssExpand=["Top","Right","Bottom","Left"];var isHidden=function(elem,el){elem=el||elem;return jQuery.css(elem,"display")==="none"||!jQuery.contains(elem.ownerDocument,elem)};var rcheckableType=/^(?:checkbox|radio)$/i;(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin"in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.get(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.hasData(elem)&&data_priv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"); | |
origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){delete elemData.handle;data_priv.remove(elem,"events")}},trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(data_priv.get(cur,"events")||{})[event.type]&&data_priv.get(cur,"handle");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&jQuery.acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&jQuery.acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},dispatch:function(event){event=jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=slice.call(arguments),handlers=(data_priv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.namespace_re||event.namespace_re.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click")){for(;cur!==this;cur=cur.parentNode||this){if(cur.disabled!==true||event.type!=="click"){matches=[];for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+" ";if(matches[sel]===undefined){matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null,[cur]).length}if(matches[sel]){matches.push(handleObj)}}if(matches.length){handlerQueue.push({elem:cur,handlers:matches})}}}}if(delegateCount<handlers.length){handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)})}return handlerQueue},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){if(event.which==null){event.which=original.charCode!=null?original.charCode:original.keyCode}return event}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var eventDoc,doc,body,button=original.button;if(event.pageX==null&&original.clientX!=null){eventDoc=event.target.ownerDocument||document;doc=eventDoc.documentElement;body=eventDoc.body;event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)}if(!event.which&&button!==undefined){event.which=button&1?1:button&2?3:button&4?2:0}return event}},fix:function(event){if(event[jQuery.expando]){return event}var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];if(!fixHook){this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{}}copy=fixHook.props?this.props.concat(fixHook.props):this.props;event=new jQuery.Event(originalEvent);i=copy.length;while(i--){prop=copy[i];event[prop]=originalEvent[prop]}if(!event.target){event.target=document}if(event.target.nodeType===3){event.target=event.target.parentNode}return fixHook.filter?fixHook.filter(event,originalEvent):event},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){this.focus();return false}},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&jQuery.nodeName(this,"input")){this.click();return false}},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result}}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:true,originalEvent:{}});if(bubble){jQuery.event.trigger(e,null,elem)}else{jQuery.event.dispatch.call(elem,e)}if(e.isDefaultPrevented()){event.preventDefault()}}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle,false)}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props)}if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse}else{this.type=src}if(props){jQuery.extend(this,props)}this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=true};jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&e.preventDefault){e.preventDefault()}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&e.stopPropagation){e.stopPropagation()}},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&e.stopImmediatePropagation){e.stopImmediatePropagation()}this.stopPropagation()}};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||related!==target&&!jQuery.contains(target,related)){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix}return ret}}});if(!support.focusinBubbles){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),true)};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=data_priv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true)}data_priv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=data_priv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);data_priv.remove(doc,fix)}else{data_priv.access(doc,fix,attaches)}}}})}jQuery.fn.extend({on:function(types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined}for(type in types){this.on(type,selector,data,types[type],one)}return this}if(data==null&&fn==null){fn=selector;data=selector=undefined}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined}else{fn=data;data=selector;selector=undefined}}if(fn===false){fn=returnFalse}else if(!fn){return this}if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments)};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)}return this.each(function(){jQuery.event.add(this,types,fn,data,selector)})},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this}if(typeof types==="object"){for(type in types){this.off(type,selector,types[type])}return this}if(selector===false||typeof selector==="function"){fn=selector;selector=undefined}if(fn===false){fn=returnFalse}return this.each(function(){jQuery.event.remove(this,types,fn,selector)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true)}}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1]}else{elem.removeAttribute("type")}return elem}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){data_priv.set(elems[i],"globalEval",!refElements||data_priv.get(refElements[i],"globalEval"))}}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return}if(data_priv.hasData(src)){pdataOld=data_priv.access(src);pdataCur=data_priv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i])}}}}if(data_user.hasData(src)){udataOld=data_user.access(src);udataCur=jQuery.extend({},udataOld);data_user.set(dest,udataCur)}}function getAll(context,tag){var ret=context.getElementsByTagName?context.getElementsByTagName(tag||"*"):context.querySelectorAll?context.querySelectorAll(tag||"*"):[];return tag===undefined||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],ret):ret}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue}}jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i])}}if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i])}}else{cloneCopyEvent(elem,clone)}}destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"))}return clone},buildFragment:function(elems,context,scripts,selection){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(jQuery.type(elem)==="object"){jQuery.merge(nodes,elem.nodeType?[elem]:elem)}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem))}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1></$2>")+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}}fragment.textContent="";i=0;while(elem=nodes[i++]){if(selection&&jQuery.inArray(elem,selection)!==-1){continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}return fragment},cleanData:function(elems){var data,elem,type,key,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(jQuery.acceptData(elem)){key=elem[data_priv.expando];if(key&&(data=data_priv.cache[key])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}if(data_priv.cache[key]){delete data_priv.cache[key]}}}delete data_user.cache[elem[data_user.expando]]}}});jQuery.fn.extend({text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},remove:function(selector,keepData){var elem,elems=selector?jQuery.filter(selector,this):this,i=0;for(;(elem=elems[i])!=null;i++){if(!keepData&&elem.nodeType===1){jQuery.cleanData(getAll(elem))}if(elem.parentNode){if(keepData&&jQuery.contains(elem.ownerDocument,elem)){setGlobalEval(getAll(elem,"script"))}elem.parentNode.removeChild(elem)}}return this},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=""}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value}}elem=0}catch(e){}}if(elem){this.empty().append(value)}},null,value,arguments.length)},replaceWith:function(){var arg=arguments[0];this.domManip(arguments,function(elem){arg=this.parentNode;jQuery.cleanData(getAll(this));if(arg){arg.replaceChild(elem,this)}});return arg&&(arg.length||arg.nodeType)?this:this.remove()},detach:function(selector){return this.remove(selector,true)},domManip:function(args,callback){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=this.length,set=this,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value)){return this.each(function(index){var self=set.eq(index);if(isFunction){args[0]=value.call(this,index,self.html())}self.domManip(args,callback)})}if(l){fragment=jQuery.buildFragment(args,this[0].ownerDocument,false,this);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,"script"))}}callback.call(this[i],node,i)}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!data_priv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src){if(jQuery._evalUrl){jQuery._evalUrl(node.src)}}else{jQuery.globalEval(node.textContent.replace(rcleanScript,""))}}}}}}return this}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get())}return this.pushStack(ret)}});var iframe,elemdisplay={};function actualDisplay(name,doc){var style,elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=window.getDefaultComputedStyle&&(style=window.getDefaultComputedStyle(elem[0]))?style.display:jQuery.css(elem[0],"display");elem.detach();return display}function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];if(!display){display=actualDisplay(nodeName,doc);if(display==="none"||!display){iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement);doc=iframe[0].contentDocument;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach()}elemdisplay[nodeName]=display}return display}var rmargin=/^margin/;var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){if(elem.ownerDocument.defaultView.opener){return elem.ownerDocument.defaultView.getComputedStyle(elem,null)}return window.getComputedStyle(elem,null)};function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name]}if(computed){if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name)}if(rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}(function(){var pixelPositionVal,boxSizingReliableVal,docElem=document.documentElement,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";container.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;"+"position:absolute";container.appendChild(div);function computePixelPositionAndBoxSizingReliable(){div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;"+"box-sizing:border-box;display:block;margin-top:1%;top:1%;"+"border:1px;padding:1px;width:4px;position:absolute";div.innerHTML="";docElem.appendChild(container);var divStyle=window.getComputedStyle(div,null);pixelPositionVal=divStyle.top!=="1%";boxSizingReliableVal=divStyle.width==="4px";docElem.removeChild(container)}if(window.getComputedStyle){jQuery.extend(support,{pixelPosition:function(){computePixelPositionAndBoxSizingReliable();return pixelPositionVal},boxSizingReliable:function(){if(boxSizingReliableVal==null){computePixelPositionAndBoxSizingReliable()}return boxSizingReliableVal},reliableMarginRight:function(){var ret,marginDiv=div.appendChild(document.createElement("div"));marginDiv.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;"+"box-sizing:content-box;display:block;margin:0;border:0;padding:0";marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";docElem.appendChild(container);ret=!parseFloat(window.getComputedStyle(marginDiv,null).marginRight);docElem.removeChild(container);div.removeChild(marginDiv);return ret}})}})();jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name]}return ret};var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"];function vendorPropName(style,name){if(name in style){return name}var capName=name[0].toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in style){return name}}return origName}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;for(;i<4;i+=2){if(extra==="margin"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles)}if(isBorderBox){if(extra==="content"){val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles)}if(extra!=="margin"){val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding"){val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true,val=name==="width"?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null){val=elem.style[name]}if(rnumnonpx.test(val)){return val}valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function showHide(elements,show){var display,elem,hidden,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue}values[index]=data_priv.get(elem,"olddisplay");display=elem.style.display;if(show){if(!values[index]&&display==="none"){elem.style.display=""}if(elem.style.display===""&&isHidden(elem)){values[index]=data_priv.access(elem,"olddisplay",defaultDisplay(elem.nodeName))}}else{hidden=isHidden(elem);if(display!=="none"||!hidden){data_priv.set(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"))}}}for(index=0;index<length;index++){elem=elements[index];if(!elem.style){continue}if(!show||elem.style.display==="none"||elem.style.display===""){elem.style.display=show?values[index]||"":"none"}}return elements}jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{columnCount:true,fillOpacity:true,flexGrow:true,flexShrink:true,fontWeight:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":"cssFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return}var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName));hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rrelNum.exec(value))){value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name));type="number"}if(value==null||value!==value){return}if(type==="number"&&!jQuery.cssNumber[origName]){value+="px"}if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit"}if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){style[name]=value}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret}return style[name]}},css:function(elem,name,extra,styles){var val,num,hooks,origName=jQuery.camelCase(name);name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName));hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra)}if(val===undefined){val=curCSS(elem,name,styles)}if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name]}if(extra===""||extra){num=parseFloat(val);return extra===true||jQuery.isNumeric(num)?num||0:val}return val}});jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,"display"))&&elem.offsetWidth===0?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)}},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,jQuery.css(elem,"boxSizing",false,styles)==="border-box",styles):0)}}});jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){if(computed){return jQuery.swap(elem,{display:"inline-block"},curCSS,[elem,"marginRight"])}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0]}return expanded}};if(!rmargin.test(prefix)){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles)}return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide()}return this.each(function(){if(isHidden(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem[tween.prop]!=null&&(!tween.elem.style||tween.elem.style[tween.prop]==null)){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else if(tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||unit!=="px"&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3];parts=parts||[];start=+target||1;do{scale=scale||".5";start=start/scale;jQuery.style(tween.elem,prop,start+unit)}while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations)}if(parts){start=tween.start=+start||+target||0;tween.unit=unit;tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]; | |
}return tween}]};function createFxNow(){setTimeout(function(){fxNow=undefined});return fxNow=jQuery.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if(tween=collection[index].call(animation,prop,value)){return tween}}}function defaultPrefilter(elem,props,opts){var prop,value,toggle,tween,hooks,oldfire,display,checkDisplay,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHidden(elem),dataShow=data_priv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire()}}}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire()}})})}if(elem.nodeType===1&&("height"in props||"width"in props)){opts.overflow=[style.overflow,style.overflowX,style.overflowY];display=jQuery.css(elem,"display");checkDisplay=display==="none"?data_priv.get(elem,"olddisplay")||defaultDisplay(elem.nodeName):display;if(checkDisplay==="inline"&&jQuery.css(elem,"float")==="none"){style.display="inline-block"}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]})}for(prop in props){value=props[prop];if(rfxtypes.exec(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true}else{continue}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}else{display=undefined}}if(!jQuery.isEmptyObject(orig)){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden}}else{dataShow=data_priv.access(elem,"fxshow",{})}if(toggle){dataShow.hidden=!hidden}if(hidden){jQuery(elem).show()}else{anim.done(function(){jQuery(elem).hide()})}anim.done(function(){var prop;data_priv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop])}});for(prop in orig){tween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=tween.start;if(hidden){tween.end=tween.start;tween.start=prop==="width"||prop==="height"?1:0}}}}else if((display==="none"?defaultDisplay(elem.nodeName):display)==="inline"){style.display=display}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=jQuery.camelCase(index);easing=specialEasing[name];value=props[index];if(jQuery.isArray(value)){easing=value[1];value=props[index]=value[0]}if(index!==name){props[name]=value;delete props[index]}hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing}}}else{specialEasing[name]=easing}}}function Animation(elem,properties,options){var result,stopped,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped){return false}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent)}deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining}else{deferred.resolveWith(elem,[animation]);return false}},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this}stopped=true;for(;index<length;index++){animation.tweens[index].run(1)}if(gotoEnd){deferred.resolveWith(elem,[animation,gotoEnd])}else{deferred.rejectWith(elem,[animation,gotoEnd])}return this}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=animationPrefilters[index].call(animation,elem,props,animation.opts);if(result){return result}}jQuery.map(props,createTween,animation);if(jQuery.isFunction(animation.opts.start)){animation.opts.start.call(elem,animation)}jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){if(jQuery.isFunction(props)){callback=props;props=["*"]}else{props=props.split(" ")}var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];tweeners[prop]=tweeners[prop]||[];tweeners[prop].unshift(callback)}},prefilter:function(callback,prepend){if(prepend){animationPrefilters.unshift(callback)}else{animationPrefilters.push(callback)}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default;if(opt.queue==null||opt.queue===true){opt.queue="fx"}opt.old=opt.complete;opt.complete=function(){if(jQuery.isFunction(opt.old)){opt.old.call(this)}if(opt.queue){jQuery.dequeue(this,opt.queue)}};return opt};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||data_priv.get(this,"finish")){anim.stop(true)}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined}if(clearQueue&&type!==false){this.queue(type||"fx",[])}return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=data_priv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index])}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index])}}}for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1)}}if(dequeue||!gotoEnd){jQuery.dequeue(this,type)}})},finish:function(type){if(type!==false){type=type||"fx"}return this.each(function(){var index,data=data_priv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true)}for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1)}}for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this)}}delete data.finish})}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback)}});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=jQuery.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1)}}if(!timers.length){jQuery.fx.stop()}fxNow=undefined};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);if(timer()){jQuery.fx.start()}else{jQuery.timers.pop()}};jQuery.fx.interval=13;jQuery.fx.start=function(){if(!timerId){timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval)}};jQuery.fx.stop=function(){clearInterval(timerId);timerId=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";support.checkOn=input.value!=="";support.optSelected=opt.selected;select.disabled=true;support.optDisabled=!opt.disabled;input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t"})();var nodeHook,boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute===strundefined){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name)}else if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}else{elem.setAttribute(name,value+"");return value}}else if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}else{ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i++]){propName=jQuery.propFix[name]||name;if(jQuery.expr.match.bool.test(name)){elem[propName]=false}elem.removeAttribute(name)}}},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val}return value}}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle;if(!isXML){handle=attrHandle[name];attrHandle[name]=ret;ret=getter(elem,name,isXML)!=null?name.toLowerCase():null;attrHandle[name]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined){return hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:elem[name]=value}else{return hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name]}},propHooks:{tabIndex:{get:function(elem){return elem.hasAttribute("tabindex")||rfocusable.test(elem.nodeName)||elem.href?elem.tabIndex:-1}}}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null}}}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed=typeof value==="string"&&value,i=0,len=this.length;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))})}if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i<len;i++){elem=this[i];cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ");if(cur){j=0;while(clazz=classes[j++]){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" "}}finalValue=jQuery.trim(cur);if(elem.className!==finalValue){elem.className=finalValue}}}}return this},removeClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed=arguments.length===0||typeof value==="string"&&value,i=0,len=this.length;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))})}if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i<len;i++){elem=this[i];cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"");if(cur){j=0;while(clazz=classes[j++]){while(cur.indexOf(" "+clazz+" ")>=0){cur=cur.replace(" "+clazz+" "," ")}}finalValue=value?jQuery.trim(cur):"";if(elem.className!==finalValue){elem.className=finalValue}}}}return this},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value)}if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)})}return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];while(className=classNames[i++]){if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else if(type===strundefined||type==="boolean"){if(this.className){data_priv.set(this,"__className__",this.className)}this.className=this.className||value===false?"":data_priv.get(this,"__className__")||""}})},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i<l;i++){if(this[i].nodeType===1&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0){return true}}return false}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret}ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(isFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=""}else if(typeof val==="number"){val+=""}else if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+""})}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.trim(jQuery.text(elem))}},select:{get:function(elem){var value,option,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;for(;i<max;i++){option=options[i];if((option.selected||i===index)&&(support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){value=jQuery(option).val();if(one){return value}values.push(value)}}return values},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(option.value,values)>=0){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value)){return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now();var rquery=/\?/;jQuery.parseJSON=function(data){return JSON.parse(data+"")};jQuery.parseXML=function(data){var xml,tmp;if(!data||typeof data!=="string"){return null}try{tmp=new DOMParser;xml=tmp.parseFromString(data,"text/xml")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data)}return xml};var rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*"),ajaxLocation=window.location.href,ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func)){while(dataType=dataTypes[i++]){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else if(seekingTransport){return!(selected=dataTypeOrTransport)}});return selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key]}}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0]in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}break}}}}if(conv!==true){if(conv&&s["throws"]){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}}}}}return{state:"success",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,parts,fireGlobals,i,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()]=match[2]}}match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();if(!state){name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(!state){s.mimeType=type}return this},statusCode:function(map){var code;if(map){if(state<2){for(code in map){statusCode[code]=[statusCode[code],map[code]]}}else{jqXHR.always(map[jqXHR.status])}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR).complete=completeDeferred.add;jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""];if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?"80":"443"))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443"))))}if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return jqXHR}fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url;if(!s.hasContent){if(s.data){cacheURL=s.url+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data}if(s.cache===false){s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++}}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType)}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){return jqXHR.abort()}strAbort="abort";for(i in{success:1,error:1,complete:1}){jqXHR[i](s[i])}transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s])}if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout)}try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2){done(-1,e)}else{throw e}}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(state===2){return}state=2;if(timeoutTimer){clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type==="HEAD"){statusText="nocontent"}else if(status===304){statusText="notmodified"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true})};jQuery.fn.extend({wrapAll:function(html){var wrap;if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))})}if(this[0]){wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes)}}).end()}});jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add)}})}else if(!traditional&&jQuery.type(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add)}}else{add(prefix,obj)}}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():value==null?"":value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(traditional===undefined){traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional}if(jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a)){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join("&").replace(r20,"+")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();if(window.attachEvent){ | |
window.attachEvent("onunload",function(){for(var key in xhrCallbacks){xhrCallbacks[key]()}})}support.cors=!!xhrSupported&&"withCredentials"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest"}for(i in headers){xhr.setRequestHeader(i,headers[i])}callback=function(type){return function(){if(callback){delete xhrCallbacks[id];callback=xhr.onload=xhr.onerror=null;if(type==="abort"){xhr.abort()}else if(type==="error"){complete(xhr.status,xhr.statusText)}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,typeof xhr.responseText==="string"?{text:xhr.responseText}:undefined,xhr.getAllResponseHeaders())}}}};xhr.onload=callback();xhr.onerror=callback("error");callback=xhrCallbacks[id]=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback){throw e}}},abort:function(){if(callback){callback()}}}}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type="GET"}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("<script>").prop({async:true,charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type==="error"?404:200,evt.type)}});document.head.appendChild(script[0])},abort:function(){if(callback){callback()}}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;this[callback]=true;return callback}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName)}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName}s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called")}return responseContainer[0]};s.dataTypes[0]="json";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments};jqXHR.always(function(){window[callbackName]=overwritten;if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName)}if(responseContainer&&jQuery.isFunction(overwritten)){overwritten(responseContainer[0])}responseContainer=overwritten=undefined});return"script"}});jQuery.parseHTML=function(data,context,keepScripts){if(!data||typeof data!=="string"){return null}if(typeof context==="boolean"){keepScripts=context;context=false}context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])]}parsed=jQuery.buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove()}return jQuery.merge([],parsed.childNodes)};var _load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback){if(typeof url!=="string"&&_load){return _load.apply(this,arguments)}var selector,type,response,self=this,off=url.indexOf(" ");if(off>=0){selector=jQuery.trim(url.slice(off));url=url.slice(0,off)}if(jQuery.isFunction(params)){callback=params;params=undefined}else if(params&&typeof params==="object"){type="POST"}if(self.length>0){jQuery.ajax({url:url,type:type,dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).complete(callback&&function(jqXHR,status){self.each(callback,response||[jqXHR.responseText,status,jqXHR])})}return this};jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};var docElem=window.document.documentElement;function getWindow(elem){return jQuery.isWindow(elem)?elem:elem.nodeType===9&&elem.defaultView}jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};if(position==="static"){elem.style.position="relative"}curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0}if(jQuery.isFunction(options)){options=options.call(elem,i,curOffset)}if(options.top!=null){props.top=options.top-curOffset.top+curTop}if(options.left!=null){props.left=options.left-curOffset.left+curLeft}if("using"in options){options.using.call(elem,props)}else{curElem.css(props)}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)})}var docElem,win,elem=this[0],box={top:0,left:0},doc=elem&&elem.ownerDocument;if(!doc){return}docElem=doc.documentElement;if(!jQuery.contains(docElem,elem)){return box}if(typeof elem.getBoundingClientRect!==strundefined){box=elem.getBoundingClientRect()}win=getWindow(doc);return{top:box.top+win.pageYOffset-docElem.clientTop,left:box.left+win.pageXOffset-docElem.clientLeft}},position:function(){if(!this[0]){return}var offsetParent,offset,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect()}else{offsetParent=this.offsetParent();offset=this.offset();if(!jQuery.nodeName(offsetParent[0],"html")){parentOffset=offsetParent.offset()}parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",true)}return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||docElem;while(offsetParent&&(!jQuery.nodeName(offsetParent,"html")&&jQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent}return offsetParent||docElem})}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined){return win?win[prop]:elem[method]}if(win){win.scrollTo(!top?val:window.pageXOffset,top?val:window.pageYOffset)}else{elem[method]=val}},method,val,arguments.length,null)}});jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed}})});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(jQuery.isWindow(elem)){return elem.document.documentElement["client"+name]}if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])}return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable,null)}})});jQuery.fn.size=function(){return this.length};jQuery.fn.andSelf=jQuery.fn.addBack;if(typeof define==="function"&&define.amd){define("jquery",[],function(){return jQuery})}var _jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$}if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery}return jQuery};if(typeof noGlobal===strundefined){window.jQuery=window.$=jQuery}return jQuery})},{}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){module.exports=["a","span","img","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"]},{}],2:[function(require,module,exports){var falafel=require("fresh-falafel");module.exports=function(str,cb){var opts=require("./parser-options");var babylon=require("babylon");opts.parser={parse:function(code,opts_){opts_=opts_||{};opts_.allowHashBang=true;opts_.sourceType="module";opts_.ecmaVersion=Infinity;opts_.plugins=["jsx","flow","asyncFunctions","classConstructorCall","doExpressions","trailingFunctionCommas","objectRestSpread","decorators","classProperties","exportExtensions","exponentiationOperator","asyncGenerators","functionBind"];opts_.features={};return babylon.parse(code,opts_)}};return falafel(str,opts,cb)}},{"./parser-options":6,babylon:8,"fresh-falafel":77}],3:[function(require,module,exports){function matchAny(type,types){types=types||[];for(var i=0,len=types.length;i<len;i++){if(type===types[i]){return true}}return false}module.exports=function findParent(){var args=[].slice.call(arguments);var node=args.shift();while(node.parent){if(matchAny(node.parent.type,args)){return node.parent}node=node.parent}return null}},{}],4:[function(require,module,exports){var findParent=require("./find-parent");var falafel=require("./falafel-helper");var iterateReverse=require("./iterate-reverse");function replaceJSXExpressionContainer(source){var response=[];var index;var ast=falafel(source,function(node){if(node.type==="JSXExpressionContainer"){var attribute=false;var replacement;index=response.length;if(findParent(node,"JSXAttribute")){attribute=true;replacement='"__JSXattribute_0_'+index+'"'}else{replacement="<__JSXExpression_0_"+index+" />"}var loc=node.loc||node.node.loc;response.push({jsxAttribute:attribute,code:node.source(),column:loc.start.column});node.update(replacement)}});return{containers:response,source:ast.toString()}}function removeEmptyLines(code){return code.split("\n").filter(function(line){return line.trim()!==""}).join("\n")}function alingText(source,node,htmlOptions){var jsxParent=findParent(node,"JSXElement");var column=node.loc.start.column;if(jsxParent){column=node.loc.start.column-jsxParent.loc.start.column}var first=false;return removeEmptyLines(source).split("\n").map(function(line){line=line.replace(/\s+$/g,"");if(!first){first=true;return line}var alingWith=column+1;if(alingWith<0){return line}return new Array(alingWith).join(htmlOptions.indent_char)+line}).join("\n")}function addSpaces(container,column){var parts=container.split("\n");var first=false;parts=parts.map(function(line){if(!first){first=true;return line}return new Array(column+1).join(" ")+line});return parts.join("\n")}function restoreContainers(source,containers,space){iterateReverse(containers,function(entry,idx){var container=entry.code;var column=entry.column;var rx=entry.jsxAttribute?new RegExp('"__JSXattribute_0_'+idx+'"'):new RegExp("<__JSXExpression_0_"+idx+"\\s\\/>");if(!entry.jsxAttribute){container=addSpaces(container,column)}if(typeof space!=="string"){space=" "}source=source.split(rx).join(container.replace(/^\{\s*/,"{"+space).replace(/\s*\}$/,space+"}"))});return source}module.exports={create:function(htmlOptions,jsxOptions,options,esformatter){var ins={htmlOptions:htmlOptions,jsxOptions:jsxOptions,_keepUnformatted:function(tag){var me=this;var unformatted=me.htmlOptions.unformatted||[];return unformatted.indexOf(tag)>-1},prepareToProcessTags:function(source){var me=this;var code=falafel(source,function(node){if(node.type==="JSXElement"&&!node.selfClosing){if(node.children&&node.children.length>0){if(!me._keepUnformatted(node.openingElement.name.name)){node.openingElement.update(node.openingElement.source()+"\n");node.closingElement.update("\n"+node.closingElement.source())}else{var childrenSource=node.children.map(function(n,idx){var src=n.source().replace(/\n/g," ").replace(/\s+/g," ");var prev=node.children[idx-1]||{};var next=node.children[idx+1]||{};if(src.trim()===""&&prev.type==="JSXExpressionContainer"&&next.type==="JSXExpressionContainer"){src=""}return src}).join("").trim();var openTag=node.openingElement.source().replace(/\n/g," ").replace(/\s+/g," ").trim();var closeTag=node.closingElement.source().replace(/\n/g," ").replace(/\s+/g," ").trim();var nSource=openTag+childrenSource+closeTag;node.update(nSource)}}}});return removeEmptyLines(code.toString())},operateOnOpenTags:function(source,_htmlOptions){var me=this;var ast=falafel(source,function(node){if(node.type==="JSXOpeningElement"){if(node.attributes&&node.attributes.length>(me.jsxOptions.maxAttrsOnTag||0)){if(node.selfClosing){node.update(node.source().split(/\n/).map(function(line){return line.trim()}).join(" "))}}}});ast=falafel(ast.toString(),function(node){if(node.type==="JSXOpeningElement"){if(node.attributes&&node.attributes.length>(me.jsxOptions.maxAttrsOnTag||0)){var first=node.attributes[0];var firstAttributeInSameLine=me.jsxOptions.firstAttributeOnSameLine;var indentSize=_htmlOptions.indent_size||4;var indentChar=_htmlOptions.indent_char||" ";var alignWith=me.jsxOptions.alignWithFirstAttribute?first.loc.start.column:node.loc.start.column+indentSize;var tabPrefix=new Array(alignWith+1).join(indentChar);var index=0;node.attributes.forEach(function(cNode){index++;if(firstAttributeInSameLine&&index===1){return cNode}cNode.update("\n"+tabPrefix+cNode.source())})}}});return ast.toString()},_recursiveFormat:function(node){var originalSource=node.source();var source=originalSource;var code;try{if(node.type==="ObjectExpression"||node.type==="ArrayExpression"){source="var __OE_AE_VAR_TOKEN__ = "+source}var hadBindShorthand=false;if((node.type==="BindExpression"||node.type==="CallExpression")&&source.match(/^::/)){source=source.replace("::","");hadBindShorthand=true}code=esformatter.format(source,options).trim();if(node.type==="BindExpression"||node.type==="CallExpression"&&hadBindShorthand){code="::"+code}falafel(code,function(_node){if(_node.type==="VariableDeclarator"&&_node.id.name==="__OE_AE_VAR_TOKEN__"){if(_node.init.type==="ObjectExpression"||_node.init.type==="ArrayExpression"){code=_node.init.source();if(jsxOptions.JSXExpressionsSingleLine){code=code.replace(/\n\s+/g," ");code=code.replace(/\n/g," ")}}}})}catch(ex){code=originalSource}return code},format:function(ast,noAlign){var me=this;var source=ast.source();var response=replaceJSXExpressionContainer(source);var containers=response.containers;source=response.source;if(!jsxOptions.attrsOnSameLineAsTag){source=me.prepareToProcessTags(source)}var beautifier=require("js-beautify");source=beautifier.html(source,htmlOptions);if(!jsxOptions.attrsOnSameLineAsTag){source=me.operateOnOpenTags(source,htmlOptions)}if(!noAlign){source=alingText(source,ast,htmlOptions)}source=restoreContainers(source,containers,jsxOptions.spaceInJSXExpressionContainers);if(containers.length>0){var expressionContainers={};var ast2=falafel(source,function(node){if(node.type==="JSXExpressionContainer"&&!findParent(node,"JSXExpressionContainer")){if(node.expression.type==="Literal"||node.expression.type==="Identifier"){return}var idx=Object.keys(expressionContainers).length;var token="__TT__TOKEN__TT__"+idx+"_T_";var formatted=node.expression.source();if(node.expression.type==="JSXElement"){formatted=me.format(node.expression,true)}else if(node.expression.type!=="JSXEmptyExpression"&&node.expression.type!=="StringLiteral"&&jsxOptions.formatJSXExpressions){formatted=me._recursiveFormat(node.expression)}expressionContainers[token]={token:token,formatted:formatted,index:idx};node.expression.update(token)}});source=ast2.toString().split("\n");source=source.map(function(line){var keys=Object.keys(expressionContainers);keys.forEach(function(key){var index=line.indexOf(key);if(index>-1){var parts=expressionContainers[key].formatted.split("\n").map(function(part,i){if(i===0){return part}return new Array(index+1).join(" ")+part});line=line.split(key).join(parts.join("\n"));line=line.replace(/\s+$/,"");delete expressionContainers[key]}});return line.replace(/\s+$/,"")}).join("\n")}return source}};return ins}}},{"./falafel-helper":2,"./find-parent":3,"./iterate-reverse":5,"js-beautify":83}],5:[function(require,module,exports){module.exports=function iterateReverse(arr,cb){arr=arr||[];var idx=arr.length-1;while(idx>=0){var item=arr[idx];cb(item,idx);idx--}}},{}],6:[function(require,module,exports){module.exports={ranges:true,locations:true,sourceType:"module",allowHashBang:true,ecmaVersion:7,playground:true,preserveParens:true}},{}],7:[function(require,module,exports){var extend=require("extend");var findParent=require("./find-parent");var falafel=require("./falafel-helper");var ignore=require("esformatter-ignore");module.exports={setOptions:function(opts,esformatter){var me=this;opts=opts||{};me.opts=opts;me._esformatter=esformatter;var jsxOptions=opts.jsx||{};me.jsxOptions=extend(true,{formatJSX:true,attrsOnSameLineAsTag:true,maxAttrsOnTag:null,firstAttributeOnSameLine:false,alignWithFirstAttribute:true,JSXExpressionsSingleLine:true,formatJSXExpressions:true},jsxOptions);if(me.jsxOptions.maxAttrsOnTag<1){me.jsxOptions.maxAttrsOnTag=1}var htmlOptions=jsxOptions.htmlOptions||{};me.htmlOptions=extend(true,{brace_style:"collapse",indent_char:" ",indent_size:2,max_preserve_newlines:2,preserve_newlines:true,unformatted:require("./default-unformatted"),wrap_line_length:160},htmlOptions)},stringBefore:function(code){var me=this;me.jsxElements=me.jsxElements||[];var jsxElements=[];if(!me.jsxOptions.formatJSX){return code}me._ignore=me._ignore||[];var _ignore=Object.create(ignore);me._ignore.push(_ignore);code=_ignore.stringBefore(code);me._staticProps=me._staticProps||[];me._decoratorsOnMethods=me._decoratorsOnMethods||[];var decoratorsOnMethods=[];var staticProps=[];code=falafel(code,function(node){if(node.type==="JSXElement"&&!findParent(node,"JSXElement")){var index=jsxElements.length;jsxElements.push({loc:node.loc,code:node.source()});node.update("<__ESFORMATTER__JSX_NODE_0_"+index+" />")}}).toString();var ast=falafel(code,function(node){if(node.type==="ArrowFunctionExpression"||node.type==="FunctionDeclaration"||node.type==="ClassMethod"||node.type==="FunctionExpression"||node.type==="ObjectMethod"){if(node.body&&node.type!=="FunctionExpression"&&node.type!=="ArrowFunctionExpression"){node.body.update(node.body.source().replace(/\}$/,"\n___AVOID_ESFMT_BUG_WITH_COMMENTS__;\n}"))}node.update(node.source().replace(/^async\s+function/,"async function"));node.update(node.source().replace(/^async\s+\(\)/,"async ()"))}if(node.type==="Decorator"){if(node.parent.type==="ClassMethod"){var index=decoratorsOnMethods.length;var replaceComment="/*__decorator_on_method__("+index+")*/";decoratorsOnMethods.push({code:node.source(),replacedWith:replaceComment});node.update(replaceComment)}else{node.update(node.source().replace(/^\s*@/,"____decorator__at_sign___")+";/*__decorator__semi__*/")}}if(node.type==="SpreadProperty"){var _source=node.source().replace(/^\s*\.\.\./,"____esfmt_spread_sign___:");node.update(_source)}});me.jsxElements.push(jsxElements);me._staticProps.push(staticProps);me._decoratorsOnMethods.push(decoratorsOnMethods);return ast.toString()},_restoreJSXElements:function(source){var me=this;var jsxElements=me.jsxElements.pop();jsxElements=jsxElements||[];jsxElements.forEach(function(entry,idx){var container=entry.code;var rx=new RegExp("<__ESFORMATTER__JSX_NODE_0_"+idx+"\\s\\/>");source=source.split(rx).join(container)});return source},_restoreStaticProps:function(source){var me=this;var staticProps=me._staticProps.pop();staticProps=staticProps||[];staticProps.forEach(function(entry,idx){var container=entry.code;var rx=new RegExp("\\/\\*__ESFORMATTER__STATIC_PROPS__"+idx+"__\\*\\/");source=source.split(rx).join(container)});return source},_restoreDecoratorsOnMethods:function(source){var me=this;var decoratorsOnMethods=me._decoratorsOnMethods.pop();decoratorsOnMethods=decoratorsOnMethods||[];decoratorsOnMethods.forEach(function(entry){var code=entry.code;var replacedWith=entry.replacedWith;source=source.split(replacedWith).join(code)});return source},stringAfter:function(code){var me=this;if(!me.jsxOptions.formatJSX){return code}code=me._restoreJSXElements(code);code=me._restoreDecoratorsOnMethods(code);var jsxOptions=me.jsxOptions;var htmlOptions=me.htmlOptions;var formatter=require("./format-jsx").create(htmlOptions,jsxOptions,me.opts,me._esformatter);var ast=falafel(code,function(node){if(node.type!=="JSXElement"){return}var conditionalParent=findParent(node,"ConditionalExpression");if(conditionalParent){var formatted=formatter.format(node);node.update(formatted);return}});code=ast.toString();code=code.replace(/____esfmt_spread_sign___\s*:\s*/g,"...");ast=falafel(code,function(node){if(node.type==="CallExpression"&&node.callee.source().indexOf("____decorator__at_sign___")>-1){node.callee.update(node.callee.source().replace("____decorator__at_sign___","@"))}if(node.type==="Identifier"&&node.source().indexOf("____decorator__at_sign___")>-1){node.update(node.source().replace("____decorator__at_sign___","@"))}if(node.type!=="JSXElement"){return}var formatted;if(!findParent(node,"JSXElement")){formatted=formatter.format(node);node.update(formatted)}});code=ast.toString();code=code.replace(/\s*\n*\s*\n*\s*___AVOID_ESFMT_BUG_WITH_COMMENTS__;\s*\n/g,"\n");code=code.replace(/;\s*\/\*__decorator__semi__\*\//g,"");var _ignore=me._ignore.pop();code=_ignore.stringAfter(code);return code}}},{"./default-unformatted":1,"./falafel-helper":2,"./find-parent":3,"./format-jsx":4,"esformatter-ignore":75,extend:76}],8:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;exports.parse=parse;var _parser=require("./parser");var _parser2=_interopRequireDefault(_parser);require("./parser/util");require("./parser/statement");require("./parser/lval");require("./parser/expression");require("./parser/node");require("./parser/location");require("./parser/comments");var _tokenizerTypes=require("./tokenizer/types");require("./tokenizer");require("./tokenizer/context");var _pluginsFlow=require("./plugins/flow");var _pluginsFlow2=_interopRequireDefault(_pluginsFlow);var _pluginsJsx=require("./plugins/jsx");var _pluginsJsx2=_interopRequireDefault(_pluginsJsx);_parser.plugins.flow=_pluginsFlow2["default"];_parser.plugins.jsx=_pluginsJsx2["default"];function parse(input,options){return new _parser2["default"](options,input).parse()}exports.tokTypes=_tokenizerTypes.types},{"./parser":12,"./parser/comments":10,"./parser/expression":11,"./parser/location":13,"./parser/lval":14,"./parser/node":15,"./parser/statement":16,"./parser/util":17,"./plugins/flow":18,"./plugins/jsx":19,"./tokenizer":22,"./tokenizer/context":21,"./tokenizer/types":24,"babel-runtime/helpers/interop-require-default":33}],9:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getOptions=getOptions;var defaultOptions={sourceType:"script",allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowSuperOutsideMethod:false,plugins:[],strictMode:null};exports.defaultOptions=defaultOptions;function getOptions(opts){var options={};for(var key in defaultOptions){options[key]=opts&&key in opts?opts[key]:defaultOptions[key]}return options}},{}],10:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _index=require("./index");var _index2=_interopRequireDefault(_index);function last(stack){return stack[stack.length-1]}var pp=_index2["default"].prototype;pp.addComment=function(comment){this.state.trailingComments.push(comment);this.state.leadingComments.push(comment)};pp.processComment=function(node){if(node.type==="Program"&&node.body.length>0)return;var stack=this.state.commentStack;var lastChild=undefined,trailingComments=undefined,i=undefined;if(this.state.trailingComments.length>0){if(this.state.trailingComments[0].start>=node.end){trailingComments=this.state.trailingComments;this.state.trailingComments=[]}else{this.state.trailingComments.length=0}}else{var lastInStack=last(stack);if(stack.length>0&&lastInStack.trailingComments&&lastInStack.trailingComments[0].start>=node.end){trailingComments=lastInStack.trailingComments;lastInStack.trailingComments=null}}while(stack.length>0&&last(stack).start>=node.start){lastChild=stack.pop()}if(lastChild){if(lastChild.leadingComments){if(lastChild!==node&&last(lastChild.leadingComments).end<=node.start){node.leadingComments=lastChild.leadingComments;lastChild.leadingComments=null}else{for(i=lastChild.leadingComments.length-2;i>=0;--i){if(lastChild.leadingComments[i].end<=node.start){node.leadingComments=lastChild.leadingComments.splice(0,i+1);break}}}}}else if(this.state.leadingComments.length>0){if(last(this.state.leadingComments).end<=node.start){node.leadingComments=this.state.leadingComments;this.state.leadingComments=[]}else{for(i=0;i<this.state.leadingComments.length;i++){if(this.state.leadingComments[i].end>node.start){break}}node.leadingComments=this.state.leadingComments.slice(0,i);if(node.leadingComments.length===0){node.leadingComments=null}trailingComments=this.state.leadingComments.slice(i);if(trailingComments.length===0){trailingComments=null}}}if(trailingComments){if(trailingComments.length&&trailingComments[0].start>=node.start&&last(trailingComments).end<=node.end){node.innerComments=trailingComments}else{node.trailingComments=trailingComments}}stack.push(node)}},{"./index":12,"babel-runtime/helpers/interop-require-default":33}],11:[function(require,module,exports){"use strict";var _Object$create=require("babel-runtime/core-js/object/create")["default"];var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _tokenizerTypes=require("../tokenizer/types");var _index=require("./index");var _index2=_interopRequireDefault(_index);var _utilIdentifier=require("../util/identifier");var pp=_index2["default"].prototype;pp.checkPropClash=function(prop,propHash){if(prop.computed||prop.method)return;var key=prop.key;var name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"StringLiteral":case"NumericLiteral":name=String(key.value);break;default:return}if(name==="__proto__"&&prop.kind==="init"){if(propHash.proto)this.raise(key.start,"Redefinition of __proto__ property");propHash.proto=true}};pp.parseExpression=function(noIn,refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.match(_tokenizerTypes.types.comma)){var node=this.startNodeAt(startPos,startLoc);node.expressions=[expr];while(this.eat(_tokenizerTypes.types.comma)){node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos))}this.toReferencedList(node.expressions);return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.match(_tokenizerTypes.types._yield)&&this.state.inGenerator){return this.parseYield()}var failOnShorthandAssign=undefined;if(refShorthandDefaultPos){failOnShorthandAssign=false}else{refShorthandDefaultPos={start:0};failOnShorthandAssign=true}var startPos=this.state.start;var startLoc=this.state.startLoc;if(this.match(_tokenizerTypes.types.parenL)||this.match(_tokenizerTypes.types.name)){this.state.potentialArrowAt=this.state.start}var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,startPos,startLoc);if(this.state.type.isAssign){var node=this.startNodeAt(startPos,startLoc);node.operator=this.state.value;node.left=this.match(_tokenizerTypes.types.eq)?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.extra&&left.extra.parenthesized){var errorMsg=undefined;if(left.type==="ObjectPattern"){errorMsg="`({a}) = 0` use `({a} = 0)`"}else if(left.type==="ArrayPattern"){errorMsg="`([a]) = 0` use `([a] = 0)`"}if(errorMsg){this.raise(left.start,"You're trying to assign to a parenthesized expression, eg. instead of "+errorMsg)}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(_tokenizerTypes.types.question)){var node=this.startNodeAt(startPos,startLoc);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(_tokenizerTypes.types.colon);node.alternate=this.parseMaybeAssign(noIn);return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start){return expr}else{return this.parseExprOp(expr,startPos,startLoc,-1,noIn)}};pp.parseExprOp=function(left,leftStartPos,leftStartLoc,minPrec,noIn){var prec=this.state.type.binop;if(prec!=null&&(!noIn||!this.match(_tokenizerTypes.types._in))){if(prec>minPrec){var node=this.startNodeAt(leftStartPos,leftStartLoc);node.left=left;node.operator=this.state.value;if(node.operator==="**"&&left.type==="UnaryExpression"&&left.extra&&!left.extra.parenthesizedArgument){this.raise(left.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.")}var op=this.state.type;this.next();var startPos=this.state.start;var startLoc=this.state.startLoc;node.right=this.parseExprOp(this.parseMaybeUnary(),startPos,startLoc,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===_tokenizerTypes.types.logicalOR||op===_tokenizerTypes.types.logicalAND?"LogicalExpression":"BinaryExpression"); | |
return this.parseExprOp(node,leftStartPos,leftStartLoc,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.state.type.prefix){var node=this.startNode();var update=this.match(_tokenizerTypes.types.incDec);node.operator=this.state.value;node.prefix=true;this.next();var argType=this.state.type;this.addExtra(node,"parenthesizedArgument",argType===_tokenizerTypes.types.parenL);node.argument=this.parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}if(update){this.checkLVal(node.argument)}else if(this.state.strict&&node.operator==="delete"&&node.argument.type==="Identifier"){this.raise(node.start,"Deleting local variable in strict mode")}return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.state.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(startPos,startLoc);node.operator=this.state.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var potentialArrowAt=this.state.potentialArrowAt;var expr=this.parseExprAtom(refShorthandDefaultPos);if(expr.type==="ArrowFunctionExpression"&&expr.start===potentialArrowAt){return expr}if(refShorthandDefaultPos&&refShorthandDefaultPos.start){return expr}return this.parseSubscripts(expr,startPos,startLoc)};pp.parseSubscripts=function(base,startPos,startLoc,noCalls){for(;;){if(!noCalls&&this.eat(_tokenizerTypes.types.doubleColon)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.callee=this.parseNoCallExpr();return this.parseSubscripts(this.finishNode(node,"BindExpression"),startPos,startLoc,noCalls)}else if(this.eat(_tokenizerTypes.types.dot)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.property=this.parseIdentifier(true);node.computed=false;base=this.finishNode(node,"MemberExpression")}else if(this.eat(_tokenizerTypes.types.bracketL)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(_tokenizerTypes.types.bracketR);base=this.finishNode(node,"MemberExpression")}else if(!noCalls&&this.match(_tokenizerTypes.types.parenL)){var possibleAsync=this.state.potentialArrowAt===base.start&&base.type==="Identifier"&&base.name==="async"&&!this.canInsertSemicolon();this.next();var node=this.startNodeAt(startPos,startLoc);node.callee=base;node.arguments=this.parseCallExpressionArguments(_tokenizerTypes.types.parenR,this.hasPlugin("trailingFunctionCommas"),possibleAsync);base=this.finishNode(node,"CallExpression");if(possibleAsync&&this.shouldParseAsyncArrow()){return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos,startLoc),node)}else{this.toReferencedList(node.arguments)}}else if(this.match(_tokenizerTypes.types.backQuote)){var node=this.startNodeAt(startPos,startLoc);node.tag=base;node.quasi=this.parseTemplate();base=this.finishNode(node,"TaggedTemplateExpression")}else{return base}}};pp.parseCallExpressionArguments=function(close,allowTrailingComma,possibleAsyncArrow){var innerParenStart=undefined;var elts=[],first=true;while(!this.eat(close)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma);if(allowTrailingComma&&this.eat(close))break}if(this.match(_tokenizerTypes.types.parenL)&&!innerParenStart){innerParenStart=this.state.start}elts.push(this.parseExprListItem())}if(possibleAsyncArrow&&innerParenStart&&this.shouldParseAsyncArrow()){this.unexpected()}return elts};pp.shouldParseAsyncArrow=function(){return this.match(_tokenizerTypes.types.arrow)};pp.parseAsyncArrowFromCallExpression=function(node,call){if(!this.hasPlugin("asyncFunctions"))this.unexpected();this.expect(_tokenizerTypes.types.arrow);return this.parseArrowExpression(node,call.arguments,true)};pp.parseNoCallExpr=function(){var startPos=this.state.start,startLoc=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),startPos,startLoc,true)};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined,canBeArrow=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case _tokenizerTypes.types._super:if(!this.state.inMethod&&!this.options.allowSuperOutsideMethod){this.raise(this.state.start,"'super' outside of function or class")}node=this.startNode();this.next();if(!this.match(_tokenizerTypes.types.parenL)&&!this.match(_tokenizerTypes.types.bracketL)&&!this.match(_tokenizerTypes.types.dot)){this.unexpected()}if(this.match(_tokenizerTypes.types.parenL)&&this.state.inMethod!=="constructor"&&!this.options.allowSuperOutsideMethod){this.raise(node.start,"super() outside of class constructor")}return this.finishNode(node,"Super");case _tokenizerTypes.types._this:node=this.startNode();this.next();return this.finishNode(node,"ThisExpression");case _tokenizerTypes.types._yield:if(this.state.inGenerator)this.unexpected();case _tokenizerTypes.types.name:node=this.startNode();var allowAwait=this.hasPlugin("asyncFunctions")&&this.state.value==="await"&&this.state.inAsync;var allowYield=this.shouldAllowYieldIdentifier();var id=this.parseIdentifier(allowAwait||allowYield);if(this.hasPlugin("asyncFunctions")){if(id.name==="await"){if(this.state.inAsync||this.inModule){return this.parseAwait(node)}}else if(id.name==="async"&&this.match(_tokenizerTypes.types._function)&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}else if(canBeArrow&&id.name==="async"&&this.match(_tokenizerTypes.types.name)){var params=[this.parseIdentifier()];this.expect(_tokenizerTypes.types.arrow);return this.parseArrowExpression(node,params,true)}}if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokenizerTypes.types.arrow)){return this.parseArrowExpression(node,[id])}return id;case _tokenizerTypes.types._do:if(this.hasPlugin("doExpressions")){var _node=this.startNode();this.next();var oldInFunction=this.state.inFunction;var oldLabels=this.state.labels;this.state.labels=[];this.state.inFunction=false;_node.body=this.parseBlock(false,true);this.state.inFunction=oldInFunction;this.state.labels=oldLabels;return this.finishNode(_node,"DoExpression")}case _tokenizerTypes.types.regexp:var value=this.state.value;node=this.parseLiteral(value.value,"RegExpLiteral");node.pattern=value.pattern;node.flags=value.flags;return node;case _tokenizerTypes.types.num:return this.parseLiteral(this.state.value,"NumericLiteral");case _tokenizerTypes.types.string:return this.parseLiteral(this.state.value,"StringLiteral");case _tokenizerTypes.types._null:node=this.startNode();this.next();return this.finishNode(node,"NullLiteral");case _tokenizerTypes.types._true:case _tokenizerTypes.types._false:node=this.startNode();node.value=this.match(_tokenizerTypes.types._true);this.next();return this.finishNode(node,"BooleanLiteral");case _tokenizerTypes.types.parenL:return this.parseParenAndDistinguishExpression(null,null,canBeArrow);case _tokenizerTypes.types.bracketL:node=this.startNode();this.next();node.elements=this.parseExprList(_tokenizerTypes.types.bracketR,true,true,refShorthandDefaultPos);this.toReferencedList(node.elements);return this.finishNode(node,"ArrayExpression");case _tokenizerTypes.types.braceL:return this.parseObj(false,refShorthandDefaultPos);case _tokenizerTypes.types._function:node=this.startNode();this.next();return this.parseFunction(node,false);case _tokenizerTypes.types.at:this.parseDecorators();case _tokenizerTypes.types._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case _tokenizerTypes.types._new:return this.parseNew();case _tokenizerTypes.types.backQuote:return this.parseTemplate();case _tokenizerTypes.types.doubleColon:node=this.startNode();this.next();node.object=null;var callee=node.callee=this.parseNoCallExpr();if(callee.type==="MemberExpression"){return this.finishNode(node,"BindExpression")}else{this.raise(callee.start,"Binding should be performed on object property.")}default:this.unexpected()}};pp.parseLiteral=function(value,type){var node=this.startNode();this.addExtra(node,"rawValue",value);this.addExtra(node,"raw",this.input.slice(this.state.start,this.state.end));node.value=value;this.next();return this.finishNode(node,type)};pp.parseParenExpression=function(){this.expect(_tokenizerTypes.types.parenL);var val=this.parseExpression();this.expect(_tokenizerTypes.types.parenR);return val};pp.parseParenAndDistinguishExpression=function(startPos,startLoc,canBeArrow,isAsync){startPos=startPos||this.state.start;startLoc=startLoc||this.state.startLoc;var val=undefined;this.next();var innerStartPos=this.state.start,innerStartLoc=this.state.startLoc;var exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,optionalCommaStart=undefined;while(!this.match(_tokenizerTypes.types.parenR)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma);if(this.match(_tokenizerTypes.types.parenR)&&this.hasPlugin("trailingFunctionCommas")){optionalCommaStart=this.state.start;break}}if(this.match(_tokenizerTypes.types.ellipsis)){var spreadNodeStartPos=this.state.start,spreadNodeStartLoc=this.state.startLoc;spreadStart=this.state.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStartLoc,spreadNodeStartPos));break}else{exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEndPos=this.state.start;var innerEndLoc=this.state.startLoc;this.expect(_tokenizerTypes.types.parenR);if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokenizerTypes.types.arrow)){for(var _i=0;_i<exprList.length;_i++){var param=exprList[_i];if(param.extra&¶m.extra.parenthesized)this.unexpected(param.extra.parenStart)}return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.state.lastTokStart)}}if(optionalCommaStart)this.unexpected(optionalCommaStart);if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStartPos,innerStartLoc);val.expressions=exprList;this.toReferencedList(val.expressions);this.finishNodeAt(val,"SequenceExpression",innerEndPos,innerEndLoc)}else{val=exprList[0]}this.addExtra(val,"parenthesized",true);this.addExtra(val,"parenStart",startPos);return val};pp.parseParenItem=function(node){return node};pp.parseNew=function(){var node=this.startNode();var meta=this.parseIdentifier(true);if(this.eat(_tokenizerTypes.types.dot)){node.meta=meta;node.property=this.parseIdentifier(true);if(node.property.name!=="target"){this.raise(node.property.start,"The only valid meta property for new is new.target")}return this.finishNode(node,"MetaProperty")}node.callee=this.parseNoCallExpr();if(this.eat(_tokenizerTypes.types.parenL)){node.arguments=this.parseExprList(_tokenizerTypes.types.parenR,this.hasPlugin("trailingFunctionCommas"));this.toReferencedList(node.arguments)}else{node.arguments=[]}return this.finishNode(node,"NewExpression")};pp.parseTemplateElement=function(){var elem=this.startNode();elem.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value};this.next();elem.tail=this.match(_tokenizerTypes.types.backQuote);return this.finishNode(elem,"TemplateElement")};pp.parseTemplate=function(){var node=this.startNode();this.next();node.expressions=[];var curElt=this.parseTemplateElement();node.quasis=[curElt];while(!curElt.tail){this.expect(_tokenizerTypes.types.dollarBraceL);node.expressions.push(this.parseExpression());this.expect(_tokenizerTypes.types.braceR);node.quasis.push(curElt=this.parseTemplateElement())}this.next();return this.finishNode(node,"TemplateLiteral")};pp.parseObj=function(isPattern,refShorthandDefaultPos){var decorators=[];var propHash=_Object$create(null);var first=true;var node=this.startNode();node.properties=[];this.next();while(!this.eat(_tokenizerTypes.types.braceR)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma);if(this.eat(_tokenizerTypes.types.braceR))break}while(this.match(_tokenizerTypes.types.at)){decorators.push(this.parseDecorator())}var prop=this.startNode(),isGenerator=false,isAsync=false,startPos=undefined,startLoc=undefined;if(decorators.length){prop.decorators=decorators;decorators=[]}if(this.hasPlugin("objectRestSpread")&&this.match(_tokenizerTypes.types.ellipsis)){prop=this.parseSpread();prop.type=isPattern?"RestProperty":"SpreadProperty";node.properties.push(prop);continue}prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos){startPos=this.state.start;startLoc=this.state.startLoc}if(!isPattern){isGenerator=this.eat(_tokenizerTypes.types.star)}if(!isPattern&&this.hasPlugin("asyncFunctions")&&this.isContextual("async")){if(isGenerator)this.unexpected();var asyncId=this.parseIdentifier();if(this.match(_tokenizerTypes.types.colon)||this.match(_tokenizerTypes.types.parenL)||this.match(_tokenizerTypes.types.braceR)){prop.key=asyncId}else{isAsync=true;if(this.hasPlugin("asyncGenerators"))isGenerator=this.eat(_tokenizerTypes.types.star);this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,startPos,startLoc,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);if(prop.shorthand){this.addExtra(prop,"shorthand",true)}node.properties.push(prop)}if(decorators.length){this.raise(this.state.start,"You have trailing decorators with no property")}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,startPos,startLoc,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(isAsync||isGenerator||this.match(_tokenizerTypes.types.parenL)){if(isPattern)this.unexpected();prop.kind="method";prop.method=true;this.parseMethod(prop,isGenerator,isAsync);return this.finishNode(prop,"ObjectMethod")}if(this.eat(_tokenizerTypes.types.colon)){prop.value=isPattern?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(false,refShorthandDefaultPos);return this.finishNode(prop,"ObjectProperty")}if(!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&!this.match(_tokenizerTypes.types.comma)&&!this.match(_tokenizerTypes.types.braceR)){if(isGenerator||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);this.parseMethod(prop,false);var paramCount=prop.kind==="get"?0:1;if(prop.params.length!==paramCount){var start=prop.start;if(prop.kind==="get"){this.raise(start,"getter should have no params")}else{this.raise(start,"setter should have exactly one param")}}return this.finishNode(prop,"ObjectMethod")}if(!prop.computed&&prop.key.type==="Identifier"){if(isPattern){var illegalBinding=this.isKeyword(prop.key.name);if(!illegalBinding&&this.state.strict){illegalBinding=_utilIdentifier.reservedWords.strictBind(prop.key.name)||_utilIdentifier.reservedWords.strict(prop.key.name)}if(illegalBinding){this.raise(prop.key.start,"Binding "+prop.key.name)}prop.value=this.parseMaybeDefault(startPos,startLoc,prop.key.__clone())}else if(this.match(_tokenizerTypes.types.eq)&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start){refShorthandDefaultPos.start=this.state.start}prop.value=this.parseMaybeDefault(startPos,startLoc,prop.key.__clone())}else{prop.value=prop.key.__clone()}prop.shorthand=true;return this.finishNode(prop,"ObjectProperty")}this.unexpected()};pp.parsePropertyName=function(prop){if(this.eat(_tokenizerTypes.types.bracketL)){prop.computed=true;prop.key=this.parseMaybeAssign();this.expect(_tokenizerTypes.types.bracketR);return prop.key}else{prop.computed=false;return prop.key=this.match(_tokenizerTypes.types.num)||this.match(_tokenizerTypes.types.string)?this.parseExprAtom():this.parseIdentifier(true)}};pp.initFunction=function(node,isAsync){node.id=null;node.generator=false;node.expression=false;if(this.hasPlugin("asyncFunctions")){node.async=!!isAsync}};pp.parseMethod=function(node,isGenerator,isAsync){var oldInMethod=this.state.inMethod;this.state.inMethod=node.kind||true;this.initFunction(node,isAsync);this.expect(_tokenizerTypes.types.parenL);node.params=this.parseBindingList(_tokenizerTypes.types.parenR,false,this.hasPlugin("trailingFunctionCommas"));node.generator=isGenerator;this.parseFunctionBody(node);this.state.inMethod=oldInMethod;return node};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&!this.match(_tokenizerTypes.types.braceL);var oldInAsync=this.state.inAsync;this.state.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.state.inFunction,oldInGen=this.state.inGenerator,oldLabels=this.state.labels;this.state.inFunction=true;this.state.inGenerator=node.generator;this.state.labels=[];node.body=this.parseBlock(true);node.expression=false;this.state.inFunction=oldInFunc;this.state.inGenerator=oldInGen;this.state.labels=oldLabels}this.state.inAsync=oldInAsync;var checkLVal=this.state.strict;var checkLValStrict=false;var isStrict=false;if(allowExpression)checkLVal=true;if(!isExpression&&node.body.directives.length){for(var _iterator=node.body.directives,_isArray=Array.isArray(_iterator),_i2=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i2>=_iterator.length)break;_ref=_iterator[_i2++]}else{_i2=_iterator.next();if(_i2.done)break;_ref=_i2.value}var directive=_ref;if(directive.value.value==="use strict"){isStrict=true;checkLVal=true;checkLValStrict=true;break}}}if(isStrict&&node.id&&node.id.type==="Identifier"&&node.id.name==="yield"){this.raise(node.id.start,"Binding yield in strict mode")}if(checkLVal){var nameHash=_Object$create(null);var oldStrict=this.state.strict;if(checkLValStrict)this.state.strict=true;if(node.id){this.checkLVal(node.id,true)}for(var _iterator2=node.params,_isArray2=Array.isArray(_iterator2),_i3=0,_iterator2=_isArray2?_iterator2:_getIterator(_iterator2);;){var _ref2;if(_isArray2){if(_i3>=_iterator2.length)break;_ref2=_iterator2[_i3++]}else{_i3=_iterator2.next();if(_i3.done)break;_ref2=_i3.value}var param=_ref2;this.checkLVal(param,true,nameHash)}this.state.strict=oldStrict}};pp.parseExprList=function(close,allowTrailingComma,allowEmpty,refShorthandDefaultPos){var elts=[],first=true;while(!this.eat(close)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma);if(allowTrailingComma&&this.eat(close))break}elts.push(this.parseExprListItem(allowEmpty,refShorthandDefaultPos))}return elts};pp.parseExprListItem=function(allowEmpty,refShorthandDefaultPos){var elt=undefined;if(allowEmpty&&this.match(_tokenizerTypes.types.comma)){elt=null}else if(this.match(_tokenizerTypes.types.ellipsis)){elt=this.parseSpread(refShorthandDefaultPos)}else{elt=this.parseMaybeAssign(false,refShorthandDefaultPos)}return elt};pp.parseIdentifier=function(liberal){var node=this.startNode();if(this.match(_tokenizerTypes.types.name)){if(!liberal&&this.state.strict&&_utilIdentifier.reservedWords.strict(this.state.value)){this.raise(this.state.start,"The keyword '"+this.state.value+"' is reserved")}node.name=this.state.value}else if(liberal&&this.state.type.keyword){node.name=this.state.type.keyword}else{this.unexpected()}if(!liberal&&node.name==="await"&&this.state.inAsync){this.raise(node.start,"invalid use of await inside of an async function")}this.next();return this.finishNode(node,"Identifier")};pp.parseAwait=function(node){if(!this.state.inAsync){this.unexpected()}if(this.isLineTerminator()){this.unexpected()}node.all=this.eat(_tokenizerTypes.types.star);node.argument=this.parseMaybeUnary();return this.finishNode(node,"AwaitExpression")};pp.parseYield=function(){var node=this.startNode();this.next();if(this.match(_tokenizerTypes.types.semi)||this.canInsertSemicolon()||!this.match(_tokenizerTypes.types.star)&&!this.state.type.startsExpr){node.delegate=false;node.argument=null}else{node.delegate=this.eat(_tokenizerTypes.types.star);node.argument=this.parseMaybeAssign()}return this.finishNode(node,"YieldExpression")}},{"../tokenizer/types":24,"../util/identifier":25,"./index":12,"babel-runtime/core-js/get-iterator":28,"babel-runtime/core-js/object/create":29,"babel-runtime/helpers/interop-require-default":33}],12:[function(require,module,exports){"use strict";var _inherits=require("babel-runtime/helpers/inherits")["default"];var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;var _utilIdentifier=require("../util/identifier");var _options=require("../options");var _tokenizer=require("../tokenizer");var _tokenizer2=_interopRequireDefault(_tokenizer);var plugins={};exports.plugins=plugins;var Parser=function(_Tokenizer){_inherits(Parser,_Tokenizer);function Parser(options,input){_classCallCheck(this,Parser);options=_options.getOptions(options);_Tokenizer.call(this,options,input);this.options=options;this.inModule=this.options.sourceType==="module";this.isReservedWord=_utilIdentifier.reservedWords[6];this.input=input;this.plugins=this.loadPlugins(this.options.plugins);if(this.state.pos===0&&this.input[0]==="#"&&this.input[1]==="!"){this.skipLineComment(2)}}Parser.prototype.hasPlugin=function hasPlugin(name){return!!(this.plugins["*"]||this.plugins[name])};Parser.prototype.extend=function extend(name,f){this[name]=f(this[name])};Parser.prototype.loadPlugins=function loadPlugins(plugins){var pluginMap={};if(plugins.indexOf("flow")>=0){plugins.splice(plugins.indexOf("flow"),1);plugins.push("flow")}for(var _iterator=plugins,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var _name=_ref;pluginMap[_name]=true;var plugin=exports.plugins[_name];if(plugin)plugin(this)}return pluginMap};Parser.prototype.parse=function parse(){var file=this.startNode();var program=this.startNode();this.nextToken();return this.parseTopLevel(file,program)};return Parser}(_tokenizer2["default"]);exports["default"]=Parser},{"../options":9,"../tokenizer":22,"../util/identifier":25,"babel-runtime/core-js/get-iterator":28,"babel-runtime/helpers/class-call-check":31,"babel-runtime/helpers/inherits":32,"babel-runtime/helpers/interop-require-default":33}],13:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _utilLocation=require("../util/location");var _index=require("./index");var _index2=_interopRequireDefault(_index);var pp=_index2["default"].prototype;pp.raise=function(pos,message){var loc=_utilLocation.getLineInfo(this.input,pos);message+=" ("+loc.line+":"+loc.column+")";var err=new SyntaxError(message);err.pos=pos;err.loc=loc;throw err}},{"../util/location":26,"./index":12,"babel-runtime/helpers/interop-require-default":33}],14:[function(require,module,exports){"use strict";var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _tokenizerTypes=require("../tokenizer/types");var _index=require("./index");var _index2=_interopRequireDefault(_index);var _utilIdentifier=require("../util/identifier");var pp=_index2["default"].prototype;pp.toAssignable=function(node,isBinding){if(node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var _iterator=node.properties,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var prop=_ref;if(prop.type==="ObjectMethod"){if(prop.kind==="get"||prop.kind==="set"){this.raise(prop.key.start,"Object pattern can't contain getter or setter")}else{this.raise(prop.key.start,"Object pattern can't contain methods")}}else{this.toAssignable(prop,isBinding)}}break;case"ObjectProperty":this.toAssignable(node.value,isBinding);break;case"SpreadProperty":node.type="RestProperty";break;case"ArrayExpression":node.type="ArrayPattern";this.toAssignableList(node.elements,isBinding);break;case"AssignmentExpression":if(node.operator==="="){node.type="AssignmentPattern";delete node.operator}else{this.raise(node.left.end,"Only '=' operator can be used for specifying default value.")}break;case"MemberExpression":if(!isBinding)break;default:this.raise(node.start,"Assigning to rvalue")}}return node};pp.toAssignableList=function(exprList,isBinding){var end=exprList.length;if(end){var last=exprList[end-1];if(last&&last.type==="RestElement"){--end}else if(last&&last.type==="SpreadElement"){last.type="RestElement";var arg=last.argument;this.toAssignable(arg,isBinding);if(arg.type!=="Identifier"&&arg.type!=="MemberExpression"&&arg.type!=="ArrayPattern"){this.unexpected(arg.start)}--end}}for(var i=0;i<end;i++){var elt=exprList[i];if(elt)this.toAssignable(elt,isBinding)}return exprList};pp.toReferencedList=function(exprList){return exprList};pp.parseSpread=function(refShorthandDefaultPos){var node=this.startNode();this.next();node.argument=this.parseMaybeAssign(refShorthandDefaultPos);return this.finishNode(node,"SpreadElement")};pp.parseRest=function(){var node=this.startNode();this.next();node.argument=this.parseBindingIdentifier();return this.finishNode(node,"RestElement")};pp.shouldAllowYieldIdentifier=function(){return this.match(_tokenizerTypes.types._yield)&&!this.state.strict&&!this.state.inGenerator};pp.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())};pp.parseBindingAtom=function(){switch(this.state.type){case _tokenizerTypes.types._yield:if(this.state.strict||this.state.inGenerator)this.unexpected();case _tokenizerTypes.types.name:return this.parseIdentifier(true);case _tokenizerTypes.types.bracketL:var node=this.startNode();this.next();node.elements=this.parseBindingList(_tokenizerTypes.types.bracketR,true,true);return this.finishNode(node,"ArrayPattern");case _tokenizerTypes.types.braceL:return this.parseObj(true);default:this.unexpected()}};pp.parseBindingList=function(close,allowEmpty,allowTrailingComma){var elts=[];var first=true;while(!this.eat(close)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma)}if(allowEmpty&&this.match(_tokenizerTypes.types.comma)){elts.push(null)}else if(allowTrailingComma&&this.eat(close)){break}else if(this.match(_tokenizerTypes.types.ellipsis)){elts.push(this.parseAssignableListItemTypes(this.parseRest()));this.expect(close);break}else{var left=this.parseMaybeDefault();this.parseAssignableListItemTypes(left);elts.push(this.parseMaybeDefault(null,null,left))}}return elts};pp.parseAssignableListItemTypes=function(param){return param};pp.parseMaybeDefault=function(startPos,startLoc,left){startLoc=startLoc||this.state.startLoc;startPos=startPos||this.state.start;left=left||this.parseBindingAtom();if(!this.eat(_tokenizerTypes.types.eq))return left;var node=this.startNodeAt(startPos,startLoc);node.left=left;node.right=this.parseMaybeAssign();return this.finishNode(node,"AssignmentPattern")};pp.checkLVal=function(expr,isBinding,checkClashes){switch(expr.type){case"Identifier":if(this.state.strict&&(_utilIdentifier.reservedWords.strictBind(expr.name)||_utilIdentifier.reservedWords.strict(expr.name))){this.raise(expr.start,(isBinding?"Binding ":"Assigning to ")+expr.name+" in strict mode")}if(checkClashes){var key="_"+expr.name;if(checkClashes[key]){this.raise(expr.start,"Argument name clash in strict mode")}else{checkClashes[key]=true}}break;case"MemberExpression":if(isBinding)this.raise(expr.start,(isBinding?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var _iterator2=expr.properties,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:_getIterator(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var prop=_ref2;if(prop.type==="ObjectProperty")prop=prop.value;this.checkLVal(prop,isBinding,checkClashes)}break;case"ArrayPattern":for(var _iterator3=expr.elements,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:_getIterator(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var elem=_ref3;if(elem)this.checkLVal(elem,isBinding,checkClashes)}break;case"AssignmentPattern":this.checkLVal(expr.left,isBinding,checkClashes);break;case"RestProperty":case"RestElement":this.checkLVal(expr.argument,isBinding,checkClashes);break;default:this.raise(expr.start,(isBinding?"Binding":"Assigning to")+" rvalue")}}},{"../tokenizer/types":24,"../util/identifier":25,"./index":12,"babel-runtime/core-js/get-iterator":28,"babel-runtime/helpers/interop-require-default":33}],15:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _index=require("./index");var _index2=_interopRequireDefault(_index);var _utilLocation=require("../util/location");var pp=_index2["default"].prototype;var Node=function(){function Node(pos,loc){_classCallCheck(this,Node);this.type="";this.start=pos;this.end=0;this.loc=new _utilLocation.SourceLocation(loc)}Node.prototype.__clone=function __clone(){var node2=new Node;for(var key in this){node2[key]=this[key]}return node2};return Node}();pp.startNode=function(){return new Node(this.state.start,this.state.startLoc)};pp.startNodeAt=function(pos,loc){return new Node(pos,loc)};function finishNodeAt(node,type,pos,loc){node.type=type;node.end=pos;node.loc.end=loc;this.processComment(node);return node}pp.finishNode=function(node,type){return finishNodeAt.call(this,node,type,this.state.lastTokEnd,this.state.lastTokEndLoc)};pp.finishNodeAt=function(node,type,pos,loc){return finishNodeAt.call(this,node,type,pos,loc)}},{"../util/location":26,"./index":12,"babel-runtime/helpers/class-call-check":31,"babel-runtime/helpers/interop-require-default":33}],16:[function(require,module,exports){"use strict";var _Object$create=require("babel-runtime/core-js/object/create")["default"];var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _tokenizerTypes=require("../tokenizer/types");var _index=require("./index");var _index2=_interopRequireDefault(_index);var _utilWhitespace=require("../util/whitespace");var pp=_index2["default"].prototype;pp.parseTopLevel=function(file,program){program.sourceType=this.options.sourceType;this.parseBlockBody(program,true,true,_tokenizerTypes.types.eof);file.program=this.finishNode(program,"Program");file.comments=this.state.comments;file.tokens=this.state.tokens;return this.finishNode(file,"File")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseDirective=function(){var directiveLiteral=this.startNode();var directive=this.startNode();var raw=this.input.slice(this.state.start,this.state.end); | |
var val=directiveLiteral.value=raw.slice(1,-1);this.addExtra(directiveLiteral,"raw",raw);this.addExtra(directiveLiteral,"rawValue",val);this.next();directive.value=this.finishNode(directiveLiteral,"DirectiveLiteral");this.semicolon();return this.finishNode(directive,"Directive")};pp.parseStatement=function(declaration,topLevel){if(this.match(_tokenizerTypes.types.at)){this.parseDecorators(true)}var starttype=this.state.type,node=this.startNode();switch(starttype){case _tokenizerTypes.types._break:case _tokenizerTypes.types._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case _tokenizerTypes.types._debugger:return this.parseDebuggerStatement(node);case _tokenizerTypes.types._do:return this.parseDoStatement(node);case _tokenizerTypes.types._for:return this.parseForStatement(node);case _tokenizerTypes.types._function:if(!declaration)this.unexpected();return this.parseFunctionStatement(node);case _tokenizerTypes.types._class:if(!declaration)this.unexpected();this.takeDecorators(node);return this.parseClass(node,true);case _tokenizerTypes.types._if:return this.parseIfStatement(node);case _tokenizerTypes.types._return:return this.parseReturnStatement(node);case _tokenizerTypes.types._switch:return this.parseSwitchStatement(node);case _tokenizerTypes.types._throw:return this.parseThrowStatement(node);case _tokenizerTypes.types._try:return this.parseTryStatement(node);case _tokenizerTypes.types._let:case _tokenizerTypes.types._const:if(!declaration)this.unexpected();case _tokenizerTypes.types._var:return this.parseVarStatement(node,starttype);case _tokenizerTypes.types._while:return this.parseWhileStatement(node);case _tokenizerTypes.types._with:return this.parseWithStatement(node);case _tokenizerTypes.types.braceL:return this.parseBlock();case _tokenizerTypes.types.semi:return this.parseEmptyStatement(node);case _tokenizerTypes.types._export:case _tokenizerTypes.types._import:if(!this.options.allowImportExportEverywhere){if(!topLevel){this.raise(this.state.start,"'import' and 'export' may only appear at the top level")}if(!this.inModule){this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")}}return starttype===_tokenizerTypes.types._import?this.parseImport(node):this.parseExport(node);case _tokenizerTypes.types.name:if(this.hasPlugin("asyncFunctions")&&this.state.value==="async"){var state=this.state.clone();this.next();if(this.match(_tokenizerTypes.types._function)&&!this.canInsertSemicolon()){this.expect(_tokenizerTypes.types._function);return this.parseFunction(node,true,false,true)}else{this.state=state}}}var maybeName=this.state.value;var expr=this.parseExpression();if(starttype===_tokenizerTypes.types.name&&expr.type==="Identifier"&&this.eat(_tokenizerTypes.types.colon)){return this.parseLabeledStatement(node,maybeName,expr)}else{return this.parseExpressionStatement(node,expr)}};pp.takeDecorators=function(node){if(this.state.decorators.length){node.decorators=this.state.decorators;this.state.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.match(_tokenizerTypes.types.at)){this.state.decorators.push(this.parseDecorator())}if(allowExport&&this.match(_tokenizerTypes.types._export)){return}if(!this.match(_tokenizerTypes.types._class)){this.raise(this.state.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(){if(!this.hasPlugin("decorators")){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword==="break";this.next();if(this.isLineTerminator()){node.label=null}else if(!this.match(_tokenizerTypes.types.name)){this.unexpected()}else{node.label=this.parseIdentifier();this.semicolon()}var i=undefined;for(i=0;i<this.state.labels.length;++i){var lab=this.state.labels[i];if(node.label==null||lab.name===node.label.name){if(lab.kind!=null&&(isBreak||lab.kind==="loop"))break;if(node.label&&isBreak)break}}if(i===this.state.labels.length)this.raise(node.start,"Unsyntactic "+keyword);return this.finishNode(node,isBreak?"BreakStatement":"ContinueStatement")};pp.parseDebuggerStatement=function(node){this.next();this.semicolon();return this.finishNode(node,"DebuggerStatement")};pp.parseDoStatement=function(node){this.next();this.state.labels.push(loopLabel);node.body=this.parseStatement(false);this.state.labels.pop();this.expect(_tokenizerTypes.types._while);node.test=this.parseParenExpression();this.eat(_tokenizerTypes.types.semi);return this.finishNode(node,"DoWhileStatement")};pp.parseForStatement=function(node){this.next();this.state.labels.push(loopLabel);this.expect(_tokenizerTypes.types.parenL);if(this.match(_tokenizerTypes.types.semi)){return this.parseFor(node,null)}if(this.match(_tokenizerTypes.types._var)||this.match(_tokenizerTypes.types._let)||this.match(_tokenizerTypes.types._const)){var _init=this.startNode(),varKind=this.state.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if(this.match(_tokenizerTypes.types._in)||this.isContextual("of")){if(_init.declarations.length===1&&!_init.declarations[0].init){return this.parseForIn(node,_init)}}return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.match(_tokenizerTypes.types._in)||this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return this.parseFor(node,init)};pp.parseFunctionStatement=function(node){this.next();return this.parseFunction(node,true)};pp.parseIfStatement=function(node){this.next();node.test=this.parseParenExpression();node.consequent=this.parseStatement(false);node.alternate=this.eat(_tokenizerTypes.types._else)?this.parseStatement(false):null;return this.finishNode(node,"IfStatement")};pp.parseReturnStatement=function(node){if(!this.state.inFunction&&!this.options.allowReturnOutsideFunction){this.raise(this.state.start,"'return' outside of function")}this.next();if(this.isLineTerminator()){node.argument=null}else{node.argument=this.parseExpression();this.semicolon()}return this.finishNode(node,"ReturnStatement")};pp.parseSwitchStatement=function(node){this.next();node.discriminant=this.parseParenExpression();node.cases=[];this.expect(_tokenizerTypes.types.braceL);this.state.labels.push(switchLabel);var cur=undefined;for(var sawDefault=undefined;!this.match(_tokenizerTypes.types.braceR);){if(this.match(_tokenizerTypes.types._case)||this.match(_tokenizerTypes.types._default)){var isCase=this.match(_tokenizerTypes.types._case);if(cur)this.finishNode(cur,"SwitchCase");node.cases.push(cur=this.startNode());cur.consequent=[];this.next();if(isCase){cur.test=this.parseExpression()}else{if(sawDefault)this.raise(this.state.lastTokStart,"Multiple default clauses");sawDefault=true;cur.test=null}this.expect(_tokenizerTypes.types.colon)}else{if(cur){cur.consequent.push(this.parseStatement(true))}else{this.unexpected()}}}if(cur)this.finishNode(cur,"SwitchCase");this.next();this.state.labels.pop();return this.finishNode(node,"SwitchStatement")};pp.parseThrowStatement=function(node){this.next();if(_utilWhitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start)))this.raise(this.state.lastTokEnd,"Illegal newline after throw");node.argument=this.parseExpression();this.semicolon();return this.finishNode(node,"ThrowStatement")};var empty=[];pp.parseTryStatement=function(node){this.next();node.block=this.parseBlock();node.handler=null;if(this.match(_tokenizerTypes.types._catch)){var clause=this.startNode();this.next();this.expect(_tokenizerTypes.types.parenL);clause.param=this.parseBindingAtom();this.checkLVal(clause.param,true,_Object$create(null));this.expect(_tokenizerTypes.types.parenR);clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=this.eat(_tokenizerTypes.types._finally)?this.parseBlock():null;if(!node.handler&&!node.finalizer){this.raise(node.start,"Missing catch or finally clause")}return this.finishNode(node,"TryStatement")};pp.parseVarStatement=function(node,kind){this.next();this.parseVar(node,false,kind);this.semicolon();return this.finishNode(node,"VariableDeclaration")};pp.parseWhileStatement=function(node){this.next();node.test=this.parseParenExpression();this.state.labels.push(loopLabel);node.body=this.parseStatement(false);this.state.labels.pop();return this.finishNode(node,"WhileStatement")};pp.parseWithStatement=function(node){if(this.state.strict)this.raise(this.state.start,"'with' in strict mode");this.next();node.object=this.parseParenExpression();node.body=this.parseStatement(false);return this.finishNode(node,"WithStatement")};pp.parseEmptyStatement=function(node){this.next();return this.finishNode(node,"EmptyStatement")};pp.parseLabeledStatement=function(node,maybeName,expr){for(var _iterator=this.state.labels,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var label=_ref;if(label.name===maybeName){this.raise(expr.start,"Label '"+maybeName+"' is already declared")}}var kind=this.state.type.isLoop?"loop":this.match(_tokenizerTypes.types._switch)?"switch":null;for(var i=this.state.labels.length-1;i>=0;i--){var label=this.state.labels[i];if(label.statementStart===node.start){label.statementStart=this.state.start;label.kind=kind}else{break}}this.state.labels.push({name:maybeName,kind:kind,statementStart:this.state.start});node.body=this.parseStatement(true);this.state.labels.pop();node.label=expr;return this.finishNode(node,"LabeledStatement")};pp.parseExpressionStatement=function(node,expr){node.expression=expr;this.semicolon();return this.finishNode(node,"ExpressionStatement")};pp.parseBlock=function(allowDirectives){var node=this.startNode();this.expect(_tokenizerTypes.types.braceL);this.parseBlockBody(node,allowDirectives,false,_tokenizerTypes.types.braceR);return this.finishNode(node,"BlockStatement")};pp.parseBlockBody=function(node,allowDirectives,topLevel,end){node.body=[];node.directives=[];var parsedNonDirective=false;var oldStrict=undefined;var octalPosition=undefined;while(!this.eat(end)){if(allowDirectives&&!parsedNonDirective&&this.match(_tokenizerTypes.types.string)){var oldState=this.state;var lookahead=this.lookahead();this.state=lookahead;var isDirective=this.isLineTerminator();this.state=oldState;if(isDirective){if(this.state.containsOctal&&!octalPosition){octalPosition=this.state.octalPosition}var stmt=this.parseDirective();node.directives.push(stmt);if(allowDirectives&&stmt.value.value==="use strict"){oldStrict=this.state.strict;this.state.strict=true;this.setStrict(true);if(octalPosition){this.raise(octalPosition,"Octal literal in strict mode")}}continue}}parsedNonDirective=true;node.body.push(this.parseStatement(true,topLevel))}if(oldStrict===false){this.setStrict(false)}};pp.parseFor=function(node,init){node.init=init;this.expect(_tokenizerTypes.types.semi);node.test=this.match(_tokenizerTypes.types.semi)?null:this.parseExpression();this.expect(_tokenizerTypes.types.semi);node.update=this.match(_tokenizerTypes.types.parenR)?null:this.parseExpression();this.expect(_tokenizerTypes.types.parenR);node.body=this.parseStatement(false);this.state.labels.pop();return this.finishNode(node,"ForStatement")};pp.parseForIn=function(node,init){var type=this.match(_tokenizerTypes.types._in)?"ForInStatement":"ForOfStatement";this.next();node.left=init;node.right=this.parseExpression();this.expect(_tokenizerTypes.types.parenR);node.body=this.parseStatement(false);this.state.labels.pop();return this.finishNode(node,type)};pp.parseVar=function(node,isFor,kind){node.declarations=[];node.kind=kind.keyword;for(;;){var decl=this.startNode();this.parseVarHead(decl);if(this.eat(_tokenizerTypes.types.eq)){decl.init=this.parseMaybeAssign(isFor)}else if(kind===_tokenizerTypes.types._const&&!(this.match(_tokenizerTypes.types._in)||this.isContextual("of"))){this.unexpected()}else if(decl.id.type!=="Identifier"&&!(isFor&&(this.match(_tokenizerTypes.types._in)||this.isContextual("of")))){this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value")}else{decl.init=null}node.declarations.push(this.finishNode(decl,"VariableDeclarator"));if(!this.eat(_tokenizerTypes.types.comma))break}return node};pp.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync,optionalId){var oldInMethod=this.state.inMethod;this.state.inMethod=false;this.initFunction(node,isAsync);if(this.match(_tokenizerTypes.types.star)){if(node.async&&!this.hasPlugin("asyncGenerators")){this.unexpected()}else{node.generator=true;this.next()}}if(isStatement&&!optionalId&&!this.match(_tokenizerTypes.types.name)&&!this.match(_tokenizerTypes.types._yield)){this.unexpected()}if(this.match(_tokenizerTypes.types.name)||this.match(_tokenizerTypes.types._yield)){node.id=this.parseBindingIdentifier()}this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);this.state.inMethod=oldInMethod;return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(_tokenizerTypes.types.parenL);node.params=this.parseBindingList(_tokenizerTypes.types.parenR,false,this.hasPlugin("trailingFunctionCommas"))};pp.parseClass=function(node,isStatement,optionalId){this.next();this.parseClassId(node,isStatement,optionalId);this.parseClassSuper(node);this.parseClassBody(node);return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.match(_tokenizerTypes.types.eq)||this.isLineTerminator()};pp.parseClassBody=function(node){var oldStrict=this.state.strict;this.state.strict=true;var hadConstructorCall=false;var hadConstructor=false;var decorators=[];var classBody=this.startNode();classBody.body=[];this.expect(_tokenizerTypes.types.braceL);while(!this.eat(_tokenizerTypes.types.braceR)){if(this.eat(_tokenizerTypes.types.semi)){continue}if(this.match(_tokenizerTypes.types.at)){decorators.push(this.parseDecorator());continue}var method=this.startNode();if(decorators.length){method.decorators=decorators;decorators=[]}var isConstructorCall=false;var isMaybeStatic=this.match(_tokenizerTypes.types.name)&&this.state.value==="static";var isGenerator=this.eat(_tokenizerTypes.types.star);var isGetSet=false;var isAsync=false;this.parsePropertyName(method);method["static"]=isMaybeStatic&&!this.match(_tokenizerTypes.types.parenL);if(method["static"]){if(isGenerator)this.unexpected();isGenerator=this.eat(_tokenizerTypes.types.star);this.parsePropertyName(method)}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed){if(this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.hasPlugin("classConstructorCall")&&method.key.name==="call"&&this.match(_tokenizerTypes.types.name)&&this.state.value==="constructor"){isConstructorCall=true;this.parsePropertyName(method)}}var isAsyncMethod=this.hasPlugin("asyncFunctions")&&!this.match(_tokenizerTypes.types.parenL)&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async";if(isAsyncMethod){if(this.hasPlugin("asyncGenerators")&&this.eat(_tokenizerTypes.types.star))isGenerator=true;isAsync=true;this.parsePropertyName(method)}method.kind="method";if(!method.computed){var key=method.key;if(!isAsync&&!isGenerator&&key.type==="Identifier"&&!this.match(_tokenizerTypes.types.parenL)&&(key.name==="get"||key.name==="set")){isGetSet=true;method.kind=key.name;key=this.parsePropertyName(method)}var isConstructor=!isConstructorCall&&!method["static"]&&(key.type==="Identifier"&&key.name==="constructor"||key.type==="StringLiteral"&&key.value==="constructor");if(isConstructor){if(hadConstructor)this.raise(key.start,"Duplicate constructor in the same class");if(isGetSet)this.raise(key.start,"Constructor can't have get/set modifier");if(isGenerator)this.raise(key.start,"Constructor can't be a generator");if(isAsync)this.raise(key.start,"Constructor can't be an async function");method.kind="constructor";hadConstructor=true}var isStaticPrototype=method["static"]&&(key.type==="Identifier"&&key.name==="prototype"||key.type==="StringLiteral"&&key.value==="prototype");if(isStaticPrototype){this.raise(key.start,"Classes may not have static property named prototype")}}if(isConstructorCall){if(hadConstructorCall)this.raise(method.start,"Duplicate constructor call in the same class");method.kind="constructorCall";hadConstructorCall=true}if((method.kind==="constructor"||method.kind==="constructorCall")&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync);if(isGetSet){var paramCount=method.kind==="get"?0:1;if(method.params.length!==paramCount){var start=method.start;if(method.kind==="get"){this.raise(start,"getter should have no params")}else{this.raise(start,"setter should have exactly one param")}}}}if(decorators.length){this.raise(this.state.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");this.state.strict=oldStrict};pp.parseClassProperty=function(node){if(this.match(_tokenizerTypes.types.eq)){if(!this.hasPlugin("classProperties"))this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){this.parseMethod(method,isGenerator,isAsync);classBody.body.push(this.finishNode(method,"ClassMethod"))};pp.parseClassId=function(node,isStatement,optionalId){if(this.match(_tokenizerTypes.types.name)){node.id=this.parseIdentifier()}else{if(optionalId||!isStatement){node.id=null}else{this.unexpected()}}};pp.parseClassSuper=function(node){node.superClass=this.eat(_tokenizerTypes.types._extends)?this.parseExprSubscripts():null};pp.parseExport=function(node){this.next();if(this.match(_tokenizerTypes.types.star)){var specifier=this.startNode();this.next();if(this.hasPlugin("exportExtensions")&&this.eatContextual("as")){specifier.exported=this.parseIdentifier();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node,true)}else{this.parseExportFrom(node,true);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdentifier(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.match(_tokenizerTypes.types.comma)&&this.lookahead().type===_tokenizerTypes.types.star){this.expect(_tokenizerTypes.types.comma);var _specifier=this.startNode();this.expect(_tokenizerTypes.types.star);this.expectContextual("as");_specifier.exported=this.parseIdentifier();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node,true)}else if(this.eat(_tokenizerTypes.types._default)){var expr=this.startNode();var needsSemi=false;if(this.eat(_tokenizerTypes.types._function)){expr=this.parseFunction(expr,true,false,false,true)}else if(this.match(_tokenizerTypes.types._class)){expr=this.parseClass(expr,true,true)}else{needsSemi=true;expr=this.parseMaybeAssign()}node.declaration=expr;if(needsSemi)this.semicolon();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.state.type.keyword||this.shouldParseExportDeclaration()){node.specifiers=[];node.source=null;node.declaration=this.parseExportDeclaration(node)}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();this.parseExportFrom(node)}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.parseExportDeclaration=function(){return this.parseStatement(true)};pp.isExportDefaultSpecifier=function(){if(this.match(_tokenizerTypes.types.name)){return this.state.value!=="type"&&this.state.value!=="async"}if(!this.match(_tokenizerTypes.types._default)){return false}var lookahead=this.lookahead();return lookahead.type===_tokenizerTypes.types.comma||lookahead.type===_tokenizerTypes.types.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(_tokenizerTypes.types.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node,expect){if(this.eatContextual("from")){node.source=this.match(_tokenizerTypes.types.string)?this.parseExprAtom():this.unexpected();this.checkExport(node)}else{if(expect){this.unexpected()}else{node.source=null}}this.semicolon()};pp.shouldParseExportDeclaration=function(){return this.hasPlugin("asyncFunctions")&&this.isContextual("async")};pp.checkExport=function(node){if(this.state.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[];var first=true;var needsFrom=undefined;this.expect(_tokenizerTypes.types.braceL);while(!this.eat(_tokenizerTypes.types.braceR)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma);if(this.eat(_tokenizerTypes.types.braceR))break}var isDefault=this.match(_tokenizerTypes.types._default);if(isDefault&&!needsFrom)needsFrom=true;var node=this.startNode();node.local=this.parseIdentifier(isDefault);node.exported=this.eatContextual("as")?this.parseIdentifier(true):node.local.__clone();nodes.push(this.finishNode(node,"ExportSpecifier"))}if(needsFrom&&!this.isContextual("from")){this.unexpected()}return nodes};pp.parseImport=function(node){this.next();if(this.match(_tokenizerTypes.types.string)){node.specifiers=[];node.source=this.parseExprAtom()}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.match(_tokenizerTypes.types.string)?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.match(_tokenizerTypes.types.name)){var startPos=this.state.start,startLoc=this.state.startLoc;node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),startPos,startLoc));if(!this.eat(_tokenizerTypes.types.comma))return}if(this.match(_tokenizerTypes.types.star)){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdentifier();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}this.expect(_tokenizerTypes.types.braceL);while(!this.eat(_tokenizerTypes.types.braceR)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma);if(this.eat(_tokenizerTypes.types.braceR))break}var specifier=this.startNode();specifier.imported=this.parseIdentifier(true);specifier.local=this.eatContextual("as")?this.parseIdentifier():specifier.imported.__clone();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,startPos,startLoc){var node=this.startNodeAt(startPos,startLoc);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"../tokenizer/types":24,"../util/whitespace":27,"./index":12,"babel-runtime/core-js/get-iterator":28,"babel-runtime/core-js/object/create":29,"babel-runtime/helpers/interop-require-default":33}],17:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _tokenizerTypes=require("../tokenizer/types");var _index=require("./index");var _index2=_interopRequireDefault(_index);var _utilWhitespace=require("../util/whitespace");var pp=_index2["default"].prototype;pp.addExtra=function(node,key,val){if(!node)return;var extra=node.extra=node.extra||{};extra[key]=val};pp.isRelational=function(op){return this.match(_tokenizerTypes.types.relational)&&this.state.value===op};pp.expectRelational=function(op){if(this.isRelational(op)){this.next()}else{this.unexpected()}};pp.isContextual=function(name){return this.match(_tokenizerTypes.types.name)&&this.state.value===name};pp.eatContextual=function(name){return this.state.value===name&&this.eat(_tokenizerTypes.types.name)};pp.expectContextual=function(name){if(!this.eatContextual(name))this.unexpected()};pp.canInsertSemicolon=function(){return this.match(_tokenizerTypes.types.eof)||this.match(_tokenizerTypes.types.braceR)||_utilWhitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start))};pp.isLineTerminator=function(){return this.eat(_tokenizerTypes.types.semi)||this.canInsertSemicolon()};pp.semicolon=function(){if(!this.isLineTerminator())this.unexpected()};pp.expect=function(type){return this.eat(type)||this.unexpected()};pp.unexpected=function(pos){this.raise(pos!=null?pos:this.state.start,"Unexpected token")}},{"../tokenizer/types":24,"../util/whitespace":27,"./index":12,"babel-runtime/helpers/interop-require-default":33}],18:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;var _tokenizerTypes=require("../tokenizer/types");var _parser=require("../parser");var _parser2=_interopRequireDefault(_parser);var pp=_parser2["default"].prototype;pp.flowParseTypeInitialiser=function(tok){var oldInType=this.state.inType;this.state.inType=true;this.expect(tok||_tokenizerTypes.types.colon);var type=this.flowParseType();this.state.inType=oldInType;return type};pp.flowParseDeclareClass=function(node){this.next();this.flowParseInterfaceish(node,true);return this.finishNode(node,"DeclareClass")};pp.flowParseDeclareFunction=function(node){this.next();var id=node.id=this.parseIdentifier();var typeNode=this.startNode();var typeContainer=this.startNode();if(this.isRelational("<")){typeNode.typeParameters=this.flowParseTypeParameterDeclaration()}else{typeNode.typeParameters=null}this.expect(_tokenizerTypes.types.parenL);var tmp=this.flowParseFunctionTypeParams();typeNode.params=tmp.params;typeNode.rest=tmp.rest;this.expect(_tokenizerTypes.types.parenR);typeNode.returnType=this.flowParseTypeInitialiser();typeContainer.typeAnnotation=this.finishNode(typeNode,"FunctionTypeAnnotation");id.typeAnnotation=this.finishNode(typeContainer,"TypeAnnotation");this.finishNode(id,id.type);this.semicolon();return this.finishNode(node,"DeclareFunction")};pp.flowParseDeclare=function(node){if(this.match(_tokenizerTypes.types._class)){return this.flowParseDeclareClass(node)}else if(this.match(_tokenizerTypes.types._function)){return this.flowParseDeclareFunction(node)}else if(this.match(_tokenizerTypes.types._var)){return this.flowParseDeclareVariable(node)}else if(this.isContextual("module")){return this.flowParseDeclareModule(node)}else{this.unexpected()}};pp.flowParseDeclareVariable=function(node){this.next();node.id=this.flowParseTypeAnnotatableIdentifier();this.semicolon();return this.finishNode(node,"DeclareVariable")};pp.flowParseDeclareModule=function(node){this.next();if(this.match(_tokenizerTypes.types.string)){node.id=this.parseExprAtom()}else{node.id=this.parseIdentifier()}var bodyNode=node.body=this.startNode();var body=bodyNode.body=[];this.expect(_tokenizerTypes.types.braceL);while(!this.match(_tokenizerTypes.types.braceR)){var node2=this.startNode();this.next();body.push(this.flowParseDeclare(node2))}this.expect(_tokenizerTypes.types.braceR);this.finishNode(bodyNode,"BlockStatement");return this.finishNode(node,"DeclareModule")};pp.flowParseInterfaceish=function(node,allowStatic){node.id=this.parseIdentifier();if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterDeclaration()}else{node.typeParameters=null}node["extends"]=[];if(this.eat(_tokenizerTypes.types._extends)){do{node["extends"].push(this.flowParseInterfaceExtends())}while(this.eat(_tokenizerTypes.types.comma))}node.body=this.flowParseObjectType(allowStatic)};pp.flowParseInterfaceExtends=function(){var node=this.startNode();node.id=this.parseIdentifier();if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterInstantiation()}else{node.typeParameters=null}return this.finishNode(node,"InterfaceExtends")};pp.flowParseInterface=function(node){this.flowParseInterfaceish(node,false);return this.finishNode(node,"InterfaceDeclaration")};pp.flowParseTypeAlias=function(node){node.id=this.parseIdentifier();if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterDeclaration()}else{node.typeParameters=null}node.right=this.flowParseTypeInitialiser(_tokenizerTypes.types.eq);this.semicolon();return this.finishNode(node,"TypeAlias")};pp.flowParseTypeParameterDeclaration=function(){var node=this.startNode();node.params=[];this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flowParseExistentialTypeParam()||this.flowParseTypeAnnotatableIdentifier());if(!this.isRelational(">")){this.expect(_tokenizerTypes.types.comma)}}this.expectRelational(">");return this.finishNode(node,"TypeParameterDeclaration")};pp.flowParseExistentialTypeParam=function(){if(this.match(_tokenizerTypes.types.star)){var node=this.startNode();this.next();return this.finishNode(node,"ExistentialTypeParam")}};pp.flowParseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.state.inType;node.params=[];this.state.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flowParseExistentialTypeParam()||this.flowParseType());if(!this.isRelational(">")){this.expect(_tokenizerTypes.types.comma)}}this.expectRelational(">");this.state.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flowParseObjectPropertyKey=function(){return this.match(_tokenizerTypes.types.num)||this.match(_tokenizerTypes.types.string)?this.parseExprAtom():this.parseIdentifier(true)};pp.flowParseObjectTypeIndexer=function(node,isStatic){node["static"]=isStatic;this.expect(_tokenizerTypes.types.bracketL);node.id=this.flowParseObjectPropertyKey();node.key=this.flowParseTypeInitialiser();this.expect(_tokenizerTypes.types.bracketR);node.value=this.flowParseTypeInitialiser();this.flowObjectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flowParseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterDeclaration()}this.expect(_tokenizerTypes.types.parenL);while(this.match(_tokenizerTypes.types.name)){node.params.push(this.flowParseFunctionTypeParam());if(!this.match(_tokenizerTypes.types.parenR)){this.expect(_tokenizerTypes.types.comma)}}if(this.eat(_tokenizerTypes.types.ellipsis)){node.rest=this.flowParseFunctionTypeParam()}this.expect(_tokenizerTypes.types.parenR);node.returnType=this.flowParseTypeInitialiser();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flowParseObjectTypeMethod=function(startPos,startLoc,isStatic,key){var node=this.startNodeAt(startPos,startLoc);node.value=this.flowParseObjectTypeMethodish(this.startNodeAt(startPos,startLoc));node["static"]=isStatic;node.key=key;node.optional=false;this.flowObjectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flowParseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node["static"]=isStatic; | |
node.value=this.flowParseObjectTypeMethodish(valueNode);this.flowObjectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flowParseObjectType=function(allowStatic){var nodeStart=this.startNode();var node=undefined;var propertyKey=undefined;var isStatic=undefined;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];this.expect(_tokenizerTypes.types.braceL);while(!this.match(_tokenizerTypes.types.braceR)){var optional=false;var startPos=this.state.start,startLoc=this.state.startLoc;node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.match(_tokenizerTypes.types.bracketL)){nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node,isStatic))}else if(this.match(_tokenizerTypes.types.parenL)||this.isRelational("<")){nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.match(_tokenizerTypes.types.colon)){propertyKey=this.parseIdentifier()}else{propertyKey=this.flowParseObjectPropertyKey()}if(this.isRelational("<")||this.match(_tokenizerTypes.types.parenL)){nodeStart.properties.push(this.flowParseObjectTypeMethod(startPos,startLoc,isStatic,propertyKey))}else{if(this.eat(_tokenizerTypes.types.question)){optional=true}node.key=propertyKey;node.value=this.flowParseTypeInitialiser();node.optional=optional;node["static"]=isStatic;this.flowObjectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}}this.expect(_tokenizerTypes.types.braceR);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flowObjectTypeSemicolon=function(){if(!this.eat(_tokenizerTypes.types.semi)&&!this.eat(_tokenizerTypes.types.comma)&&!this.match(_tokenizerTypes.types.braceR)){this.unexpected()}};pp.flowParseGenericType=function(startPos,startLoc,id){var node=this.startNodeAt(startPos,startLoc);node.typeParameters=null;node.id=id;while(this.eat(_tokenizerTypes.types.dot)){var node2=this.startNodeAt(startPos,startLoc);node2.qualification=node.id;node2.id=this.parseIdentifier();node.id=this.finishNode(node2,"QualifiedTypeIdentifier")}if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flowParseTypeofType=function(){var node=this.startNode();this.expect(_tokenizerTypes.types._typeof);node.argument=this.flowParsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flowParseTupleType=function(){var node=this.startNode();node.types=[];this.expect(_tokenizerTypes.types.bracketL);while(this.state.pos<this.input.length&&!this.match(_tokenizerTypes.types.bracketR)){node.types.push(this.flowParseType());if(this.match(_tokenizerTypes.types.bracketR))break;this.expect(_tokenizerTypes.types.comma)}this.expect(_tokenizerTypes.types.bracketR);return this.finishNode(node,"TupleTypeAnnotation")};pp.flowParseFunctionTypeParam=function(){var optional=false;var node=this.startNode();node.name=this.parseIdentifier();if(this.eat(_tokenizerTypes.types.question)){optional=true}node.optional=optional;node.typeAnnotation=this.flowParseTypeInitialiser();return this.finishNode(node,"FunctionTypeParam")};pp.flowParseFunctionTypeParams=function(){var ret={params:[],rest:null};while(this.match(_tokenizerTypes.types.name)){ret.params.push(this.flowParseFunctionTypeParam());if(!this.match(_tokenizerTypes.types.parenR)){this.expect(_tokenizerTypes.types.comma)}}if(this.eat(_tokenizerTypes.types.ellipsis)){ret.rest=this.flowParseFunctionTypeParam()}return ret};pp.flowIdentToTypeAnnotation=function(startPos,startLoc,node,id){switch(id.name){case"any":return this.finishNode(node,"AnyTypeAnnotation");case"void":return this.finishNode(node,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(node,"BooleanTypeAnnotation");case"mixed":return this.finishNode(node,"MixedTypeAnnotation");case"number":return this.finishNode(node,"NumberTypeAnnotation");case"string":return this.finishNode(node,"StringTypeAnnotation");default:return this.flowParseGenericType(startPos,startLoc,id)}};pp.flowParsePrimaryType=function(){var startPos=this.state.start,startLoc=this.state.startLoc;var node=this.startNode();var tmp=undefined;var type=undefined;var isGroupedType=false;switch(this.state.type){case _tokenizerTypes.types.name:return this.flowIdentToTypeAnnotation(startPos,startLoc,node,this.parseIdentifier());case _tokenizerTypes.types.braceL:return this.flowParseObjectType();case _tokenizerTypes.types.bracketL:return this.flowParseTupleType();case _tokenizerTypes.types.relational:if(this.state.value==="<"){node.typeParameters=this.flowParseTypeParameterDeclaration();this.expect(_tokenizerTypes.types.parenL);tmp=this.flowParseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(_tokenizerTypes.types.parenR);this.expect(_tokenizerTypes.types.arrow);node.returnType=this.flowParseType();return this.finishNode(node,"FunctionTypeAnnotation")}case _tokenizerTypes.types.parenL:this.next();if(!this.match(_tokenizerTypes.types.parenR)&&!this.match(_tokenizerTypes.types.ellipsis)){if(this.match(_tokenizerTypes.types.name)){var token=this.lookahead().type;isGroupedType=token!==_tokenizerTypes.types.question&&token!==_tokenizerTypes.types.colon}else{isGroupedType=true}}if(isGroupedType){type=this.flowParseType();this.expect(_tokenizerTypes.types.parenR);if(this.eat(_tokenizerTypes.types.arrow)){this.raise(node,"Unexpected token =>. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=this.flowParseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(_tokenizerTypes.types.parenR);this.expect(_tokenizerTypes.types.arrow);node.returnType=this.flowParseType();node.typeParameters=null;return this.finishNode(node,"FunctionTypeAnnotation");case _tokenizerTypes.types.string:node.value=this.state.value;this.addExtra(node,"rawValue",node.value);this.addExtra(node,"raw",this.input.slice(this.state.start,this.state.end));this.next();return this.finishNode(node,"StringLiteralTypeAnnotation");case _tokenizerTypes.types._true:case _tokenizerTypes.types._false:node.value=this.match(_tokenizerTypes.types._true);this.next();return this.finishNode(node,"BooleanLiteralTypeAnnotation");case _tokenizerTypes.types.num:node.value=this.state.value;this.addExtra(node,"rawValue",node.value);this.addExtra(node,"raw",this.input.slice(this.state.start,this.state.end));this.next();return this.finishNode(node,"NumericLiteralTypeAnnotation");default:if(this.state.type.keyword==="typeof"){return this.flowParseTypeofType()}}this.unexpected()};pp.flowParsePostfixType=function(){var node=this.startNode();var type=node.elementType=this.flowParsePrimaryType();if(this.match(_tokenizerTypes.types.bracketL)){this.expect(_tokenizerTypes.types.bracketL);this.expect(_tokenizerTypes.types.bracketR);return this.finishNode(node,"ArrayTypeAnnotation")}else{return type}};pp.flowParsePrefixType=function(){var node=this.startNode();if(this.eat(_tokenizerTypes.types.question)){node.typeAnnotation=this.flowParsePrefixType();return this.finishNode(node,"NullableTypeAnnotation")}else{return this.flowParsePostfixType()}};pp.flowParseIntersectionType=function(){var node=this.startNode();var type=this.flowParsePrefixType();node.types=[type];while(this.eat(_tokenizerTypes.types.bitwiseAND)){node.types.push(this.flowParsePrefixType())}return node.types.length===1?type:this.finishNode(node,"IntersectionTypeAnnotation")};pp.flowParseUnionType=function(){var node=this.startNode();var type=this.flowParseIntersectionType();node.types=[type];while(this.eat(_tokenizerTypes.types.bitwiseOR)){node.types.push(this.flowParseIntersectionType())}return node.types.length===1?type:this.finishNode(node,"UnionTypeAnnotation")};pp.flowParseType=function(){var oldInType=this.state.inType;this.state.inType=true;var type=this.flowParseUnionType();this.state.inType=oldInType;return type};pp.flowParseTypeAnnotation=function(){var node=this.startNode();node.typeAnnotation=this.flowParseTypeInitialiser();return this.finishNode(node,"TypeAnnotation")};pp.flowParseTypeAnnotatableIdentifier=function(requireTypeAnnotation,canBeOptionalParam){var ident=this.parseIdentifier();var isOptionalParam=false;if(canBeOptionalParam&&this.eat(_tokenizerTypes.types.question)){this.expect(_tokenizerTypes.types.question);isOptionalParam=true}if(requireTypeAnnotation||this.match(_tokenizerTypes.types.colon)){ident.typeAnnotation=this.flowParseTypeAnnotation();this.finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;this.finishNode(ident,ident.type)}return ident};exports["default"]=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.match(_tokenizerTypes.types.colon)&&!allowExpression){node.returnType=this.flowParseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.state.strict&&this.match(_tokenizerTypes.types.name)&&this.state.value==="interface"){var node=this.startNode();this.next();return this.flowParseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.match(_tokenizerTypes.types._class)||this.match(_tokenizerTypes.types.name)||this.match(_tokenizerTypes.types._function)||this.match(_tokenizerTypes.types._var)){return this.flowParseDeclare(node)}}else if(this.match(_tokenizerTypes.types.name)){if(expr.name==="interface"){return this.flowParseInterface(node)}else if(expr.name==="type"){return this.flowParseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||inner.call(this)}});instance.extend("parseParenItem",function(){return function(node,startLoc,startPos,forceArrow){var canBeArrow=this.state.potentialArrowAt=startPos;if(this.match(_tokenizerTypes.types.colon)){var typeCastNode=this.startNodeAt(startLoc,startPos);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flowParseTypeAnnotation();if(forceArrow&&!this.match(_tokenizerTypes.types.arrow)){this.unexpected()}if(canBeArrow&&this.eat(_tokenizerTypes.types.arrow)){var func=this.parseArrowExpression(this.startNodeAt(startLoc,startPos),[node]);func.returnType=typeCastNode.typeAnnotation;return func}else{return this.finishNode(typeCastNode,"TypeCastExpression")}}else{return node}}});instance.extend("parseExport",function(inner){return function(node){node=inner.call(this,node);if(node.type==="ExportNamedDeclaration"){node.exportKind=node.exportKind||"value"}return node}});instance.extend("parseExportDeclaration",function(inner){return function(node){if(this.isContextual("type")){node.exportKind="type";var declarationNode=this.startNode();this.next();if(this.match(_tokenizerTypes.types.braceL)){node.specifiers=this.parseExportSpecifiers();this.parseExportFrom(node);return null}else{return this.flowParseTypeAlias(declarationNode)}}else{return inner.call(this,node)}}});instance.extend("parseClassId",function(inner){return function(node){inner.apply(this,arguments);if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterDeclaration()}}});instance.extend("isKeyword",function(inner){return function(name){if(this.state.inType&&name==="void"){return false}else{return inner.call(this,name)}}});instance.extend("readToken",function(inner){return function(code){if(this.state.inType&&(code===62||code===60)){return this.finishOp(_tokenizerTypes.types.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.state.inType)return inner.call(this)}});function typeCastToParameter(node){node.expression.typeAnnotation=node.typeAnnotation;return node.expression}instance.extend("toAssignable",function(inner){return function(node){if(node.type==="TypeCastExpression"){return typeCastToParameter(node)}else{return inner.apply(this,arguments)}}});instance.extend("toAssignableList",function(inner){return function(exprList,isBinding){for(var i=0;i<exprList.length;i++){var expr=exprList[i];if(expr&&expr.type==="TypeCastExpression"){exprList[i]=typeCastToParameter(expr)}}return inner.call(this,exprList,isBinding)}});instance.extend("toReferencedList",function(){return function(exprList){for(var i=0;i<exprList.length;i++){var expr=exprList[i];if(expr&&expr._exprListItem&&expr.type==="TypeCastExpression"){this.raise(expr.start,"Unexpected type cast")}}return exprList}});instance.extend("parseExprListItem",function(inner){return function(allowEmpty,refShorthandDefaultPos){var container=this.startNode();var node=inner.call(this,allowEmpty,refShorthandDefaultPos);if(this.match(_tokenizerTypes.types.colon)){container._exprListItem=true;container.expression=node;container.typeAnnotation=this.flowParseTypeAnnotation();return this.finishNode(container,"TypeCastExpression")}else{return node}}});instance.extend("checkLVal",function(inner){return function(node){if(node.type!=="TypeCastExpression"){return inner.apply(this,arguments)}}});instance.extend("parseClassProperty",function(inner){return function(node){if(this.match(_tokenizerTypes.types.colon)){node.typeAnnotation=this.flowParseTypeAnnotation()}return inner.call(this,node)}});instance.extend("isClassProperty",function(inner){return function(){return this.match(_tokenizerTypes.types.colon)||inner.call(this)}});instance.extend("parseClassMethod",function(){return function(classBody,method,isGenerator,isAsync){if(this.isRelational("<")){method.typeParameters=this.flowParseTypeParameterDeclaration()}this.parseMethod(method,isGenerator,isAsync);classBody.body.push(this.finishNode(method,"ClassMethod"))}});instance.extend("parseClassSuper",function(inner){return function(node,isStatement){inner.call(this,node,isStatement);if(node.superClass&&this.isRelational("<")){node.superTypeParameters=this.flowParseTypeParameterInstantiation()}if(this.isContextual("implements")){this.next();var implemented=node["implements"]=[];do{var _node=this.startNode();_node.id=this.parseIdentifier();if(this.isRelational("<")){_node.typeParameters=this.flowParseTypeParameterInstantiation()}else{_node.typeParameters=null}implemented.push(this.finishNode(_node,"ClassImplements"))}while(this.eat(_tokenizerTypes.types.comma))}}});instance.extend("parseObjPropValue",function(inner){return function(prop){var typeParameters=undefined;if(this.isRelational("<")){typeParameters=this.flowParseTypeParameterDeclaration();if(!this.match(_tokenizerTypes.types.parenL))this.unexpected()}inner.apply(this,arguments);if(typeParameters){(prop.value||prop).typeParameters=typeParameters}}});instance.extend("parseAssignableListItemTypes",function(){return function(param){if(this.eat(_tokenizerTypes.types.question)){param.optional=true}if(this.match(_tokenizerTypes.types.colon)){param.typeAnnotation=this.flowParseTypeAnnotation()}this.finishNode(param,param.type);return param}});instance.extend("parseImportSpecifiers",function(inner){return function(node){node.importKind="value";var kind=null;if(this.match(_tokenizerTypes.types._typeof)){kind="typeof"}else if(this.isContextual("type")){kind="type"}if(kind){var lh=this.lookahead();if(lh.type===_tokenizerTypes.types.name&&lh.value!=="from"||lh.type===_tokenizerTypes.types.braceL||lh.type===_tokenizerTypes.types.star){this.next();node.importKind=kind}}inner.call(this,node)}});instance.extend("parseFunctionParams",function(inner){return function(node){if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterDeclaration()}inner.call(this,node)}});instance.extend("parseVarHead",function(inner){return function(decl){inner.call(this,decl);if(this.match(_tokenizerTypes.types.colon)){decl.id.typeAnnotation=this.flowParseTypeAnnotation();this.finishNode(decl.id,decl.id.type)}}});instance.extend("parseAsyncArrowFromCallExpression",function(inner){return function(node,call){if(this.match(_tokenizerTypes.types.colon)){node.returnType=this.flowParseTypeAnnotation()}return inner.call(this,node,call)}});instance.extend("shouldParseAsyncArrow",function(inner){return function(){return this.match(_tokenizerTypes.types.colon)||inner.call(this)}});instance.extend("parseParenAndDistinguishExpression",function(inner){return function(startPos,startLoc,canBeArrow,isAsync){startPos=startPos||this.state.start;startLoc=startLoc||this.state.startLoc;if(canBeArrow&&this.lookahead().type===_tokenizerTypes.types.parenR){this.expect(_tokenizerTypes.types.parenL);this.expect(_tokenizerTypes.types.parenR);var node=this.startNodeAt(startPos,startLoc);if(this.match(_tokenizerTypes.types.colon))node.returnType=this.flowParseTypeAnnotation();this.expect(_tokenizerTypes.types.arrow);return this.parseArrowExpression(node,[],isAsync)}else{var node=inner.call(this,startPos,startLoc,canBeArrow,isAsync);if(this.match(_tokenizerTypes.types.colon)){var state=this.state.clone();try{return this.parseParenItem(node,startPos,startLoc,true)}catch(err){if(err instanceof SyntaxError){this.state=state;return node}else{throw err}}}else{return node}}}})};module.exports=exports["default"]},{"../parser":12,"../tokenizer/types":24,"babel-runtime/helpers/interop-require-default":33}],19:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;var _xhtml=require("./xhtml");var _xhtml2=_interopRequireDefault(_xhtml);var _tokenizerTypes=require("../../tokenizer/types");var _tokenizerContext=require("../../tokenizer/context");var _parser=require("../../parser");var _parser2=_interopRequireDefault(_parser);var _utilIdentifier=require("../../util/identifier");var _utilWhitespace=require("../../util/whitespace");var HEX_NUMBER=/^[\da-fA-F]+$/;var DECIMAL_NUMBER=/^\d+$/;_tokenizerContext.types.j_oTag=new _tokenizerContext.TokContext("<tag",false);_tokenizerContext.types.j_cTag=new _tokenizerContext.TokContext("</tag",false);_tokenizerContext.types.j_expr=new _tokenizerContext.TokContext("<tag>...</tag>",true,true);_tokenizerTypes.types.jsxName=new _tokenizerTypes.TokenType("jsxName");_tokenizerTypes.types.jsxText=new _tokenizerTypes.TokenType("jsxText",{beforeExpr:true});_tokenizerTypes.types.jsxTagStart=new _tokenizerTypes.TokenType("jsxTagStart");_tokenizerTypes.types.jsxTagEnd=new _tokenizerTypes.TokenType("jsxTagEnd");_tokenizerTypes.types.jsxTagStart.updateContext=function(){this.state.context.push(_tokenizerContext.types.j_expr);this.state.context.push(_tokenizerContext.types.j_oTag);this.state.exprAllowed=false};_tokenizerTypes.types.jsxTagEnd.updateContext=function(prevType){var out=this.state.context.pop();if(out===_tokenizerContext.types.j_oTag&&prevType===_tokenizerTypes.types.slash||out===_tokenizerContext.types.j_cTag){this.state.context.pop();this.state.exprAllowed=this.curContext()===_tokenizerContext.types.j_expr}else{this.state.exprAllowed=true}};var pp=_parser2["default"].prototype;pp.jsxReadToken=function(){var out="";var chunkStart=this.state.pos;for(;;){if(this.state.pos>=this.input.length){this.raise(this.state.start,"Unterminated JSX contents")}var ch=this.input.charCodeAt(this.state.pos);switch(ch){case 60:case 123:if(this.state.pos===this.state.start){if(ch===60&&this.state.exprAllowed){++this.state.pos;return this.finishToken(_tokenizerTypes.types.jsxTagStart)}return this.getTokenFromCode(ch)}out+=this.input.slice(chunkStart,this.state.pos);return this.finishToken(_tokenizerTypes.types.jsxText,out);case 38:out+=this.input.slice(chunkStart,this.state.pos);out+=this.jsxReadEntity();chunkStart=this.state.pos;break;default:if(_utilWhitespace.isNewLine(ch)){out+=this.input.slice(chunkStart,this.state.pos);out+=this.jsxReadNewLine(true);chunkStart=this.state.pos}else{++this.state.pos}}}};pp.jsxReadNewLine=function(normalizeCRLF){var ch=this.input.charCodeAt(this.state.pos);var out=undefined;++this.state.pos;if(ch===13&&this.input.charCodeAt(this.state.pos)===10){++this.state.pos;out=normalizeCRLF?"\n":"\r\n"}else{out=String.fromCharCode(ch)}++this.state.curLine;this.state.lineStart=this.state.pos;return out};pp.jsxReadString=function(quote){var out="";var chunkStart=++this.state.pos;for(;;){if(this.state.pos>=this.input.length){this.raise(this.state.start,"Unterminated string constant")}var ch=this.input.charCodeAt(this.state.pos);if(ch===quote)break;if(ch===38){out+=this.input.slice(chunkStart,this.state.pos);out+=this.jsxReadEntity();chunkStart=this.state.pos}else if(_utilWhitespace.isNewLine(ch)){out+=this.input.slice(chunkStart,this.state.pos);out+=this.jsxReadNewLine(false);chunkStart=this.state.pos}else{++this.state.pos}}out+=this.input.slice(chunkStart,this.state.pos++);return this.finishToken(_tokenizerTypes.types.string,out)};pp.jsxReadEntity=function(){var str="";var count=0;var entity=undefined;var ch=this.input[this.state.pos];var startPos=++this.state.pos;while(this.state.pos<this.input.length&&count++<10){ch=this.input[this.state.pos++];if(ch===";"){if(str[0]==="#"){if(str[1]==="x"){str=str.substr(2);if(HEX_NUMBER.test(str))entity=String.fromCharCode(parseInt(str,16))}else{str=str.substr(1);if(DECIMAL_NUMBER.test(str))entity=String.fromCharCode(parseInt(str,10))}}else{entity=_xhtml2["default"][str]}break}str+=ch}if(!entity){this.state.pos=startPos;return"&"}return entity};pp.jsxReadWord=function(){var ch=undefined;var start=this.state.pos;do{ch=this.input.charCodeAt(++this.state.pos)}while(_utilIdentifier.isIdentifierChar(ch)||ch===45);return this.finishToken(_tokenizerTypes.types.jsxName,this.input.slice(start,this.state.pos))};function getQualifiedJSXName(object){if(object.type==="JSXIdentifier"){return object.name}if(object.type==="JSXNamespacedName"){return object.namespace.name+":"+object.name.name}if(object.type==="JSXMemberExpression"){return getQualifiedJSXName(object.object)+"."+getQualifiedJSXName(object.property)}}pp.jsxParseIdentifier=function(){var node=this.startNode();if(this.match(_tokenizerTypes.types.jsxName)){node.name=this.state.value}else if(this.state.type.keyword){node.name=this.state.type.keyword}else{this.unexpected()}this.next();return this.finishNode(node,"JSXIdentifier")};pp.jsxParseNamespacedName=function(){var startPos=this.state.start,startLoc=this.state.startLoc;var name=this.jsxParseIdentifier();if(!this.eat(_tokenizerTypes.types.colon))return name;var node=this.startNodeAt(startPos,startLoc);node.namespace=name;node.name=this.jsxParseIdentifier();return this.finishNode(node,"JSXNamespacedName")};pp.jsxParseElementName=function(){var startPos=this.state.start,startLoc=this.state.startLoc;var node=this.jsxParseNamespacedName();while(this.eat(_tokenizerTypes.types.dot)){var newNode=this.startNodeAt(startPos,startLoc);newNode.object=node;newNode.property=this.jsxParseIdentifier();node=this.finishNode(newNode,"JSXMemberExpression")}return node};pp.jsxParseAttributeValue=function(){var node=undefined;switch(this.state.type){case _tokenizerTypes.types.braceL:node=this.jsxParseExpressionContainer();if(node.expression.type==="JSXEmptyExpression"){this.raise(node.start,"JSX attributes must only be assigned a non-empty expression")}else{return node}case _tokenizerTypes.types.jsxTagStart:case _tokenizerTypes.types.string:node=this.parseExprAtom();node.extra=null;return node;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}};pp.jsxParseEmptyExpression=function(){var node=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(node,"JSXEmptyExpression",this.start,this.startLoc)};pp.jsxParseExpressionContainer=function(){var node=this.startNode();this.next();if(this.match(_tokenizerTypes.types.braceR)){node.expression=this.jsxParseEmptyExpression()}else{node.expression=this.parseExpression()}this.expect(_tokenizerTypes.types.braceR);return this.finishNode(node,"JSXExpressionContainer")};pp.jsxParseAttribute=function(){var node=this.startNode();if(this.eat(_tokenizerTypes.types.braceL)){this.expect(_tokenizerTypes.types.ellipsis);node.argument=this.parseMaybeAssign();this.expect(_tokenizerTypes.types.braceR);return this.finishNode(node,"JSXSpreadAttribute")}node.name=this.jsxParseNamespacedName();node.value=this.eat(_tokenizerTypes.types.eq)?this.jsxParseAttributeValue():null;return this.finishNode(node,"JSXAttribute")};pp.jsxParseOpeningElementAt=function(startPos,startLoc){var node=this.startNodeAt(startPos,startLoc);node.attributes=[];node.name=this.jsxParseElementName();while(!this.match(_tokenizerTypes.types.slash)&&!this.match(_tokenizerTypes.types.jsxTagEnd)){node.attributes.push(this.jsxParseAttribute())}node.selfClosing=this.eat(_tokenizerTypes.types.slash);this.expect(_tokenizerTypes.types.jsxTagEnd);return this.finishNode(node,"JSXOpeningElement")};pp.jsxParseClosingElementAt=function(startPos,startLoc){var node=this.startNodeAt(startPos,startLoc);node.name=this.jsxParseElementName();this.expect(_tokenizerTypes.types.jsxTagEnd);return this.finishNode(node,"JSXClosingElement")};pp.jsxParseElementAt=function(startPos,startLoc){var node=this.startNodeAt(startPos,startLoc);var children=[];var openingElement=this.jsxParseOpeningElementAt(startPos,startLoc);var closingElement=null;if(!openingElement.selfClosing){contents:for(;;){switch(this.state.type){case _tokenizerTypes.types.jsxTagStart:startPos=this.state.start;startLoc=this.state.startLoc;this.next();if(this.eat(_tokenizerTypes.types.slash)){closingElement=this.jsxParseClosingElementAt(startPos,startLoc);break contents}children.push(this.jsxParseElementAt(startPos,startLoc));break;case _tokenizerTypes.types.jsxText:children.push(this.parseExprAtom());break;case _tokenizerTypes.types.braceL:children.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}}if(getQualifiedJSXName(closingElement.name)!==getQualifiedJSXName(openingElement.name)){this.raise(closingElement.start,"Expected corresponding JSX closing tag for <"+getQualifiedJSXName(openingElement.name)+">")}}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;if(this.match(_tokenizerTypes.types.relational)&&this.state.value==="<"){this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag")}return this.finishNode(node,"JSXElement")};pp.jsxParseElement=function(){var startPos=this.state.start,startLoc=this.state.startLoc;this.next();return this.jsxParseElementAt(startPos,startLoc)};exports["default"]=function(instance){instance.extend("parseExprAtom",function(inner){return function(refShortHandDefaultPos){if(this.match(_tokenizerTypes.types.jsxText)){var node=this.parseLiteral(this.state.value,"JSXText");node.extra=null;return node}else if(this.match(_tokenizerTypes.types.jsxTagStart)){return this.jsxParseElement()}else{return inner.call(this,refShortHandDefaultPos)}}});instance.extend("readToken",function(inner){return function(code){var context=this.curContext();if(context===_tokenizerContext.types.j_expr){return this.jsxReadToken()}if(context===_tokenizerContext.types.j_oTag||context===_tokenizerContext.types.j_cTag){if(_utilIdentifier.isIdentifierStart(code)){return this.jsxReadWord()}if(code===62){++this.state.pos;return this.finishToken(_tokenizerTypes.types.jsxTagEnd)}if((code===34||code===39)&&context===_tokenizerContext.types.j_oTag){return this.jsxReadString(code)}}if(code===60&&this.state.exprAllowed){++this.state.pos;return this.finishToken(_tokenizerTypes.types.jsxTagStart)}return inner.call(this,code)}});instance.extend("updateContext",function(inner){return function(prevType){if(this.match(_tokenizerTypes.types.braceL)){var curContext=this.curContext();if(curContext===_tokenizerContext.types.j_oTag){this.state.context.push(_tokenizerContext.types.b_expr)}else if(curContext===_tokenizerContext.types.j_expr){this.state.context.push(_tokenizerContext.types.b_tmpl)}else{inner.call(this,prevType)}this.state.exprAllowed=true}else if(this.match(_tokenizerTypes.types.slash)&&prevType===_tokenizerTypes.types.jsxTagStart){this.state.context.length-=2;this.state.context.push(_tokenizerContext.types.j_cTag);this.state.exprAllowed=false}else{return inner.call(this,prevType)}}})};module.exports=exports["default"]},{"../../parser":12,"../../tokenizer/context":21,"../../tokenizer/types":24,"../../util/identifier":25,"../../util/whitespace":27,"./xhtml":20,"babel-runtime/helpers/interop-require-default":33}],20:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};module.exports=exports["default"]},{}],21:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];exports.__esModule=true;var _types=require("./types");var _utilWhitespace=require("../util/whitespace");var TokContext=function TokContext(token,isExpr,preserveSpace,override){_classCallCheck(this,TokContext);this.token=token;this.isExpr=!!isExpr;this.preserveSpace=!!preserveSpace;this.override=override};exports.TokContext=TokContext;var types={b_stat:new TokContext("{",false),b_expr:new TokContext("{",true),b_tmpl:new TokContext("${",true),p_stat:new TokContext("(",false),p_expr:new TokContext("(",true),q_tmpl:new TokContext("`",true,true,function(p){ | |
return p.readTmplToken()}),f_expr:new TokContext("function",true)};exports.types=types;_types.types.parenR.updateContext=_types.types.braceR.updateContext=function(){if(this.state.context.length===1){this.state.exprAllowed=true;return}var out=this.state.context.pop();if(out===types.b_stat&&this.curContext()===types.f_expr){this.state.context.pop();this.state.exprAllowed=false}else if(out===types.b_tmpl){this.state.exprAllowed=true}else{this.state.exprAllowed=!out.isExpr}};_types.types.name.updateContext=function(prevType){this.state.exprAllowed=false;if(prevType===_types.types._let||prevType===_types.types._const||prevType===_types.types._var){if(_utilWhitespace.lineBreak.test(this.input.slice(this.state.end))){this.state.exprAllowed=true}}};_types.types.braceL.updateContext=function(prevType){this.state.context.push(this.braceIsBlock(prevType)?types.b_stat:types.b_expr);this.state.exprAllowed=true};_types.types.dollarBraceL.updateContext=function(){this.state.context.push(types.b_tmpl);this.state.exprAllowed=true};_types.types.parenL.updateContext=function(prevType){var statementParens=prevType===_types.types._if||prevType===_types.types._for||prevType===_types.types._with||prevType===_types.types._while;this.state.context.push(statementParens?types.p_stat:types.p_expr);this.state.exprAllowed=true};_types.types.incDec.updateContext=function(){};_types.types._function.updateContext=function(){if(this.curContext()!==types.b_stat){this.state.context.push(types.f_expr)}this.state.exprAllowed=false};_types.types.backQuote.updateContext=function(){if(this.curContext()===types.q_tmpl){this.state.context.pop()}else{this.state.context.push(types.q_tmpl)}this.state.exprAllowed=false}},{"../util/whitespace":27,"./types":24,"babel-runtime/helpers/class-call-check":31}],22:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;var _utilIdentifier=require("../util/identifier");var _types=require("./types");var _context=require("./context");var _utilLocation=require("../util/location");var _utilWhitespace=require("../util/whitespace");var _state=require("./state");var _state2=_interopRequireDefault(_state);var Token=function Token(state){_classCallCheck(this,Token);this.type=state.type;this.value=state.value;this.start=state.start;this.end=state.end;this.loc=new _utilLocation.SourceLocation(state.startLoc,state.endLoc)};exports.Token=Token;function codePointToString(code){if(code<=65535){return String.fromCharCode(code)}else{return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}}var Tokenizer=function(){function Tokenizer(options,input){_classCallCheck(this,Tokenizer);this.state=new _state2["default"];this.state.init(options,input)}Tokenizer.prototype.next=function next(){if(!this.isLookahead){this.state.tokens.push(new Token(this.state))}this.state.lastTokEnd=this.state.end;this.state.lastTokStart=this.state.start;this.state.lastTokEndLoc=this.state.endLoc;this.state.lastTokStartLoc=this.state.startLoc;this.nextToken()};Tokenizer.prototype.eat=function eat(type){if(this.match(type)){this.next();return true}else{return false}};Tokenizer.prototype.match=function match(type){return this.state.type===type};Tokenizer.prototype.isKeyword=function isKeyword(word){return _utilIdentifier.isKeyword(word)};Tokenizer.prototype.lookahead=function lookahead(){var old=this.state;this.state=old.clone(true);this.isLookahead=true;this.next();this.isLookahead=false;var curr=this.state.clone(true);this.state=old;return curr};Tokenizer.prototype.setStrict=function setStrict(strict){this.state.strict=strict;if(!this.match(_types.types.num)&&!this.match(_types.types.string))return;this.state.pos=this.state.start;while(this.state.pos<this.state.lineStart){this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1;--this.state.curLine}this.nextToken()};Tokenizer.prototype.curContext=function curContext(){return this.state.context[this.state.context.length-1]};Tokenizer.prototype.nextToken=function nextToken(){var curContext=this.curContext();if(!curContext||!curContext.preserveSpace)this.skipSpace();this.state.containsOctal=false;this.state.octalPosition=null;this.state.start=this.state.pos;this.state.startLoc=this.state.curPosition();if(this.state.pos>=this.input.length)return this.finishToken(_types.types.eof);if(curContext.override){return curContext.override(this)}else{return this.readToken(this.fullCharCodeAtPos())}};Tokenizer.prototype.readToken=function readToken(code){if(_utilIdentifier.isIdentifierStart(code)||code===92){return this.readWord()}else{return this.getTokenFromCode(code)}};Tokenizer.prototype.fullCharCodeAtPos=function fullCharCodeAtPos(){var code=this.input.charCodeAt(this.state.pos);if(code<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.state.pos+1);return(code<<10)+next-56613888};Tokenizer.prototype.pushComment=function pushComment(block,text,start,end,startLoc,endLoc){var comment={type:block?"CommentBlock":"CommentLine",value:text,start:start,end:end,loc:new _utilLocation.SourceLocation(startLoc,endLoc)};if(!this.isLookahead){this.state.tokens.push(comment);this.state.comments.push(comment)}this.addComment(comment)};Tokenizer.prototype.skipBlockComment=function skipBlockComment(){var startLoc=this.state.curPosition();var start=this.state.pos,end=this.input.indexOf("*/",this.state.pos+=2);if(end===-1)this.raise(this.state.pos-2,"Unterminated comment");this.state.pos=end+2;_utilWhitespace.lineBreakG.lastIndex=start;var match=undefined;while((match=_utilWhitespace.lineBreakG.exec(this.input))&&match.index<this.state.pos){++this.state.curLine;this.state.lineStart=match.index+match[0].length}this.pushComment(true,this.input.slice(start+2,end),start,this.state.pos,startLoc,this.state.curPosition())};Tokenizer.prototype.skipLineComment=function skipLineComment(startSkip){var start=this.state.pos;var startLoc=this.state.curPosition();var ch=this.input.charCodeAt(this.state.pos+=startSkip);while(this.state.pos<this.input.length&&ch!==10&&ch!==13&&ch!==8232&&ch!==8233){++this.state.pos;ch=this.input.charCodeAt(this.state.pos)}this.pushComment(false,this.input.slice(start+startSkip,this.state.pos),start,this.state.pos,startLoc,this.state.curPosition())};Tokenizer.prototype.skipSpace=function skipSpace(){loop:while(this.state.pos<this.input.length){var ch=this.input.charCodeAt(this.state.pos);switch(ch){case 32:case 160:++this.state.pos;break;case 13:if(this.input.charCodeAt(this.state.pos+1)===10){++this.state.pos}case 10:case 8232:case 8233:++this.state.pos;++this.state.curLine;this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(ch>8&&ch<14||ch>=5760&&_utilWhitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.state.pos}else{break loop}}}};Tokenizer.prototype.finishToken=function finishToken(type,val){this.state.end=this.state.pos;this.state.endLoc=this.state.curPosition();var prevType=this.state.type;this.state.type=type;this.state.value=val;this.updateContext(prevType)};Tokenizer.prototype.readToken_dot=function readToken_dot(){var next=this.input.charCodeAt(this.state.pos+1);if(next>=48&&next<=57){return this.readNumber(true)}var next2=this.input.charCodeAt(this.state.pos+2);if(next===46&&next2===46){this.state.pos+=3;return this.finishToken(_types.types.ellipsis)}else{++this.state.pos;return this.finishToken(_types.types.dot)}};Tokenizer.prototype.readToken_slash=function readToken_slash(){if(this.state.exprAllowed){++this.state.pos;return this.readRegexp()}var next=this.input.charCodeAt(this.state.pos+1);if(next===61){return this.finishOp(_types.types.assign,2)}else{return this.finishOp(_types.types.slash,1)}};Tokenizer.prototype.readToken_mult_modulo=function readToken_mult_modulo(code){var type=code===42?_types.types.star:_types.types.modulo;var width=1;var next=this.input.charCodeAt(this.state.pos+1);if(next===42&&this.hasPlugin("exponentiationOperator")){width++;next=this.input.charCodeAt(this.state.pos+2);type=_types.types.exponent}if(next===61){width++;type=_types.types.assign}return this.finishOp(type,width)};Tokenizer.prototype.readToken_pipe_amp=function readToken_pipe_amp(code){var next=this.input.charCodeAt(this.state.pos+1);if(next===code)return this.finishOp(code===124?_types.types.logicalOR:_types.types.logicalAND,2);if(next===61)return this.finishOp(_types.types.assign,2);return this.finishOp(code===124?_types.types.bitwiseOR:_types.types.bitwiseAND,1)};Tokenizer.prototype.readToken_caret=function readToken_caret(){var next=this.input.charCodeAt(this.state.pos+1);if(next===61){return this.finishOp(_types.types.assign,2)}else{return this.finishOp(_types.types.bitwiseXOR,1)}};Tokenizer.prototype.readToken_plus_min=function readToken_plus_min(code){var next=this.input.charCodeAt(this.state.pos+1);if(next===code){if(next===45&&this.input.charCodeAt(this.state.pos+2)===62&&_utilWhitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.pos))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(_types.types.incDec,2)}if(next===61){return this.finishOp(_types.types.assign,2)}else{return this.finishOp(_types.types.plusMin,1)}};Tokenizer.prototype.readToken_lt_gt=function readToken_lt_gt(code){var next=this.input.charCodeAt(this.state.pos+1);var size=1;if(next===code){size=code===62&&this.input.charCodeAt(this.state.pos+2)===62?3:2;if(this.input.charCodeAt(this.state.pos+size)===61)return this.finishOp(_types.types.assign,size+1);return this.finishOp(_types.types.bitShift,size)}if(next===33&&code===60&&this.input.charCodeAt(this.state.pos+2)===45&&this.input.charCodeAt(this.state.pos+3)===45){if(this.inModule)this.unexpected();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61){size=this.input.charCodeAt(this.state.pos+2)===61?3:2}return this.finishOp(_types.types.relational,size)};Tokenizer.prototype.readToken_eq_excl=function readToken_eq_excl(code){var next=this.input.charCodeAt(this.state.pos+1);if(next===61)return this.finishOp(_types.types.equality,this.input.charCodeAt(this.state.pos+2)===61?3:2);if(code===61&&next===62){this.state.pos+=2;return this.finishToken(_types.types.arrow)}return this.finishOp(code===61?_types.types.eq:_types.types.prefix,1)};Tokenizer.prototype.getTokenFromCode=function getTokenFromCode(code){switch(code){case 46:return this.readToken_dot();case 40:++this.state.pos;return this.finishToken(_types.types.parenL);case 41:++this.state.pos;return this.finishToken(_types.types.parenR);case 59:++this.state.pos;return this.finishToken(_types.types.semi);case 44:++this.state.pos;return this.finishToken(_types.types.comma);case 91:++this.state.pos;return this.finishToken(_types.types.bracketL);case 93:++this.state.pos;return this.finishToken(_types.types.bracketR);case 123:++this.state.pos;return this.finishToken(_types.types.braceL);case 125:++this.state.pos;return this.finishToken(_types.types.braceR);case 58:if(this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58){return this.finishOp(_types.types.doubleColon,2)}else{++this.state.pos;return this.finishToken(_types.types.colon)}case 63:++this.state.pos;return this.finishToken(_types.types.question);case 64:++this.state.pos;return this.finishToken(_types.types.at);case 96:++this.state.pos;return this.finishToken(_types.types.backQuote);case 48:var next=this.input.charCodeAt(this.state.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(code);case 124:case 38:return this.readToken_pipe_amp(code);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(code);case 60:case 62:return this.readToken_lt_gt(code);case 61:case 33:return this.readToken_eq_excl(code);case 126:return this.finishOp(_types.types.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+codePointToString(code)+"'")};Tokenizer.prototype.finishOp=function finishOp(type,size){var str=this.input.slice(this.state.pos,this.state.pos+size);this.state.pos+=size;return this.finishToken(type,str)};Tokenizer.prototype.readRegexp=function readRegexp(){var escaped=undefined,inClass=undefined,start=this.state.pos;for(;;){if(this.state.pos>=this.input.length)this.raise(start,"Unterminated regular expression");var ch=this.input.charAt(this.state.pos);if(_utilWhitespace.lineBreak.test(ch)){this.raise(start,"Unterminated regular expression")}if(escaped){escaped=false}else{if(ch==="["){inClass=true}else if(ch==="]"&&inClass){inClass=false}else if(ch==="/"&&!inClass){break}escaped=ch==="\\"}++this.state.pos}var content=this.input.slice(start,this.state.pos);++this.state.pos;var mods=this.readWord1();if(mods){var validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag")}return this.finishToken(_types.types.regexp,{pattern:content,flags:mods})};Tokenizer.prototype.readInt=function readInt(radix,len){var start=this.state.pos,total=0;for(var i=0,e=len==null?Infinity:len;i<e;++i){var code=this.input.charCodeAt(this.state.pos),val=undefined;if(code>=97){val=code-97+10}else if(code>=65){val=code-65+10}else if(code>=48&&code<=57){val=code-48}else{val=Infinity}if(val>=radix)break;++this.state.pos;total=total*radix+val}if(this.state.pos===start||len!=null&&this.state.pos-start!==len)return null;return total};Tokenizer.prototype.readRadixNumber=function readRadixNumber(radix){this.state.pos+=2;var val=this.readInt(radix);if(val==null)this.raise(this.state.start+2,"Expected number in radix "+radix);if(_utilIdentifier.isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.state.pos,"Identifier directly after number");return this.finishToken(_types.types.num,val)};Tokenizer.prototype.readNumber=function readNumber(startsWithDot){var start=this.state.pos,isFloat=false,octal=this.input.charCodeAt(this.state.pos)===48;if(!startsWithDot&&this.readInt(10)===null)this.raise(start,"Invalid number");var next=this.input.charCodeAt(this.state.pos);if(next===46){++this.state.pos;this.readInt(10);isFloat=true;next=this.input.charCodeAt(this.state.pos)}if(next===69||next===101){next=this.input.charCodeAt(++this.state.pos);if(next===43||next===45)++this.state.pos;if(this.readInt(10)===null)this.raise(start,"Invalid number");isFloat=true}if(_utilIdentifier.isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.state.pos,"Identifier directly after number");var str=this.input.slice(start,this.state.pos),val=undefined;if(isFloat){val=parseFloat(str)}else if(!octal||str.length===1){val=parseInt(str,10)}else if(/[89]/.test(str)||this.state.strict){this.raise(start,"Invalid number")}else{val=parseInt(str,8)}return this.finishToken(_types.types.num,val)};Tokenizer.prototype.readCodePoint=function readCodePoint(){var ch=this.input.charCodeAt(this.state.pos),code=undefined;if(ch===123){var codePos=++this.state.pos;code=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos);++this.state.pos;if(code>1114111)this.raise(codePos,"Code point out of bounds")}else{code=this.readHexChar(4)}return code};Tokenizer.prototype.readString=function readString(quote){var out="",chunkStart=++this.state.pos;for(;;){if(this.state.pos>=this.input.length)this.raise(this.state.start,"Unterminated string constant");var ch=this.input.charCodeAt(this.state.pos);if(ch===quote)break;if(ch===92){out+=this.input.slice(chunkStart,this.state.pos);out+=this.readEscapedChar(false);chunkStart=this.state.pos}else{if(_utilWhitespace.isNewLine(ch))this.raise(this.state.start,"Unterminated string constant");++this.state.pos}}out+=this.input.slice(chunkStart,this.state.pos++);return this.finishToken(_types.types.string,out)};Tokenizer.prototype.readTmplToken=function readTmplToken(){var out="",chunkStart=this.state.pos;for(;;){if(this.state.pos>=this.input.length)this.raise(this.state.start,"Unterminated template");var ch=this.input.charCodeAt(this.state.pos);if(ch===96||ch===36&&this.input.charCodeAt(this.state.pos+1)===123){if(this.state.pos===this.state.start&&this.match(_types.types.template)){if(ch===36){this.state.pos+=2;return this.finishToken(_types.types.dollarBraceL)}else{++this.state.pos;return this.finishToken(_types.types.backQuote)}}out+=this.input.slice(chunkStart,this.state.pos);return this.finishToken(_types.types.template,out)}if(ch===92){out+=this.input.slice(chunkStart,this.state.pos);out+=this.readEscapedChar(true);chunkStart=this.state.pos}else if(_utilWhitespace.isNewLine(ch)){out+=this.input.slice(chunkStart,this.state.pos);++this.state.pos;switch(ch){case 13:if(this.input.charCodeAt(this.state.pos)===10)++this.state.pos;case 10:out+="\n";break;default:out+=String.fromCharCode(ch);break}++this.state.curLine;this.state.lineStart=this.state.pos;chunkStart=this.state.pos}else{++this.state.pos}}};Tokenizer.prototype.readEscapedChar=function readEscapedChar(inTemplate){var ch=this.input.charCodeAt(++this.state.pos);++this.state.pos;switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\x0B";case 102:return"\f";case 13:if(this.input.charCodeAt(this.state.pos)===10)++this.state.pos;case 10:this.state.lineStart=this.state.pos;++this.state.curLine;return"";default:if(ch>=48&&ch<=55){var octalStr=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0];var octal=parseInt(octalStr,8);if(octal>255){octalStr=octalStr.slice(0,-1);octal=parseInt(octalStr,8)}if(octal>0){if(!this.state.containsOctal){this.state.containsOctal=true;this.state.octalPosition=this.state.pos-2}if(this.state.strict||inTemplate){this.raise(this.state.pos-2,"Octal literal in strict mode")}}this.state.pos+=octalStr.length-1;return String.fromCharCode(octal)}return String.fromCharCode(ch)}};Tokenizer.prototype.readHexChar=function readHexChar(len){var codePos=this.state.pos;var n=this.readInt(16,len);if(n===null)this.raise(codePos,"Bad character escape sequence");return n};Tokenizer.prototype.readWord1=function readWord1(){this.state.containsEsc=false;var word="",first=true,chunkStart=this.state.pos;while(this.state.pos<this.input.length){var ch=this.fullCharCodeAtPos();if(_utilIdentifier.isIdentifierChar(ch)){this.state.pos+=ch<=65535?1:2}else if(ch===92){this.state.containsEsc=true;word+=this.input.slice(chunkStart,this.state.pos);var escStart=this.state.pos;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX")}++this.state.pos;var esc=this.readCodePoint();if(!(first?_utilIdentifier.isIdentifierStart:_utilIdentifier.isIdentifierChar)(esc,true)){this.raise(escStart,"Invalid Unicode escape")}word+=codePointToString(esc);chunkStart=this.state.pos}else{break}first=false}return word+this.input.slice(chunkStart,this.state.pos)};Tokenizer.prototype.readWord=function readWord(){var word=this.readWord1();var type=_types.types.name;if(!this.state.containsEsc&&this.isKeyword(word)){type=_types.keywords[word]}return this.finishToken(type,word)};Tokenizer.prototype.braceIsBlock=function braceIsBlock(prevType){if(prevType===_types.types.colon){var _parent=this.curContext();if(_parent===_context.types.b_stat||_parent===_context.types.b_expr){return!_parent.isExpr}}if(prevType===_types.types._return){return _utilWhitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start))}if(prevType===_types.types._else||prevType===_types.types.semi||prevType===_types.types.eof||prevType===_types.types.parenR){return true}if(prevType===_types.types.braceL){return this.curContext()===_context.types.b_stat}return!this.state.exprAllowed};Tokenizer.prototype.updateContext=function updateContext(prevType){var update=undefined,type=this.state.type;if(type.keyword&&prevType===_types.types.dot){this.state.exprAllowed=false}else if(update=type.updateContext){update.call(this,prevType)}else{this.state.exprAllowed=type.beforeExpr}};return Tokenizer}();exports["default"]=Tokenizer},{"../util/identifier":25,"../util/location":26,"../util/whitespace":27,"./context":21,"./state":23,"./types":24,"babel-runtime/helpers/class-call-check":31,"babel-runtime/helpers/interop-require-default":33}],23:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];exports.__esModule=true;var _utilLocation=require("../util/location");var _context=require("./context");var _types=require("./types");var State=function(){function State(){_classCallCheck(this,State)}State.prototype.init=function init(options,input){this.strict=options.strictMode===false?false:options.sourceType==="module";this.input=input;this.potentialArrowAt=-1;this.inMethod=this.inFunction=this.inGenerator=this.inAsync=false;this.labels=[];this.decorators=[];this.tokens=[];this.comments=[];this.trailingComments=[];this.leadingComments=[];this.commentStack=[];this.pos=this.lineStart=0;this.curLine=1;this.type=_types.types.eof;this.value=null;this.start=this.end=this.pos;this.startLoc=this.endLoc=this.curPosition();this.lastTokEndLoc=this.lastTokStartLoc=null;this.lastTokStart=this.lastTokEnd=this.pos;this.context=[_context.types.b_stat];this.exprAllowed=true;this.containsEsc=this.containsOctal=false;this.octalPosition=null;return this};State.prototype.curPosition=function curPosition(){return new _utilLocation.Position(this.curLine,this.pos-this.lineStart)};State.prototype.clone=function clone(skipArrays){var state=new State;for(var key in this){var val=this[key];if((!skipArrays||key==="context")&&Array.isArray(val)){val=val.slice()}state[key]=val}return state};return State}();exports["default"]=State;module.exports=exports["default"]},{"../util/location":26,"./context":21,"./types":24,"babel-runtime/helpers/class-call-check":31}],24:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];exports.__esModule=true;var TokenType=function TokenType(label){var conf=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.rightAssociative=!!conf.rightAssociative;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};exports.TokenType=TokenType;function binop(name,prec){return new TokenType(name,{beforeExpr:true,binop:prec})}var beforeExpr={beforeExpr:true},startsExpr={startsExpr:true};var types={num:new TokenType("num",startsExpr),regexp:new TokenType("regexp",startsExpr),string:new TokenType("string",startsExpr),name:new TokenType("name",startsExpr),eof:new TokenType("eof"),bracketL:new TokenType("[",{beforeExpr:true,startsExpr:true}),bracketR:new TokenType("]"),braceL:new TokenType("{",{beforeExpr:true,startsExpr:true}),braceR:new TokenType("}"),parenL:new TokenType("(",{beforeExpr:true,startsExpr:true}),parenR:new TokenType(")"),comma:new TokenType(",",beforeExpr),semi:new TokenType(";",beforeExpr),colon:new TokenType(":",beforeExpr),doubleColon:new TokenType("::",beforeExpr),dot:new TokenType("."),question:new TokenType("?",beforeExpr),arrow:new TokenType("=>",beforeExpr),template:new TokenType("template"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:true,startsExpr:true}),at:new TokenType("@"),eq:new TokenType("=",{beforeExpr:true,isAssign:true}),assign:new TokenType("_=",{beforeExpr:true,isAssign:true}),incDec:new TokenType("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new TokenType("prefix",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=",6),relational:binop("</>",7),bitShift:binop("<</>>",8),plusMin:new TokenType("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];options.keyword=name;keywords[name]=types["_"+name]=new TokenType(name,options)}kw("break");kw("case",beforeExpr);kw("catch");kw("continue");kw("debugger");kw("default",beforeExpr);kw("do",{isLoop:true,beforeExpr:true});kw("else",beforeExpr);kw("finally");kw("for",{isLoop:true});kw("function",startsExpr);kw("if");kw("return",beforeExpr);kw("switch");kw("throw",beforeExpr);kw("try");kw("var");kw("let");kw("const");kw("while",{isLoop:true});kw("with");kw("new",{beforeExpr:true,startsExpr:true});kw("this",startsExpr);kw("super",startsExpr);kw("class");kw("extends",beforeExpr);kw("export");kw("import");kw("yield",{beforeExpr:true,startsExpr:true});kw("null",startsExpr);kw("true",startsExpr);kw("false",startsExpr);kw("in",{beforeExpr:true,binop:7});kw("instanceof",{beforeExpr:true,binop:7});kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true});kw("void",{beforeExpr:true,prefix:true,startsExpr:true});kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})},{"babel-runtime/helpers/class-call-check":31}],25:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;function makePredicate(words){words=words.split(" ");return function(str){return words.indexOf(str)>=0}}var reservedWords={6:makePredicate("enum await"),strict:makePredicate("implements interface let package private protected public static yield"),strictBind:makePredicate("eval arguments")};exports.reservedWords=reservedWords;var isKeyword=makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super");exports.isKeyword=isKeyword;var nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var nonASCIIidentifierChars="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");nonASCIIidentifierStartChars=nonASCIIidentifierChars=null;var astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,99,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,98,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,16481,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,1340,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,16355,541];var astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,9,20855,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,4305,6,792618,239];function isInAstralSet(code,set){var pos=65536;for(var i=0;i<set.length;i+=2){pos+=set[i];if(pos>code)return false;pos+=set[i+1];if(pos>=code)return true}}function isIdentifierStart(code){if(code<65)return code===36;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;if(code<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));return isInAstralSet(code,astralIdentifierStartCodes)}function isIdentifierChar(code){if(code<48)return code===36;if(code<58)return true;if(code<65)return false;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;if(code<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],26:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];exports.__esModule=true;exports.getLineInfo=getLineInfo;var _whitespace=require("./whitespace");var Position=function Position(line,col){_classCallCheck(this,Position);this.line=line;this.column=col};exports.Position=Position;var SourceLocation=function SourceLocation(start,end){_classCallCheck(this,SourceLocation);this.start=start;this.end=end};exports.SourceLocation=SourceLocation;function getLineInfo(input,offset){for(var line=1,cur=0;;){_whitespace.lineBreakG.lastIndex=cur;var match=_whitespace.lineBreakG.exec(input);if(match&&match.index<offset){++line;cur=match.index+match[0].length}else{return new Position(line,offset-cur)}}}},{"./whitespace":27,"babel-runtime/helpers/class-call-check":31}],27:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isNewLine=isNewLine;var lineBreak=/\r\n?|\n|\u2028|\u2029/;exports.lineBreak=lineBreak;var lineBreakG=new RegExp(lineBreak.source,"g");exports.lineBreakG=lineBreakG;function isNewLine(code){return code===10||code===13||code===8232||code===8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{}],28:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/get-iterator"),__esModule:true}},{"core-js/library/fn/get-iterator":34}],29:[function(require,module,exports){ | |
module.exports={"default":require("core-js/library/fn/object/create"),__esModule:true}},{"core-js/library/fn/object/create":35}],30:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/object/set-prototype-of"),__esModule:true}},{"core-js/library/fn/object/set-prototype-of":36}],31:[function(require,module,exports){"use strict";exports["default"]=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true},{}],32:[function(require,module,exports){"use strict";var _Object$create=require("babel-runtime/core-js/object/create")["default"];var _Object$setPrototypeOf=require("babel-runtime/core-js/object/set-prototype-of")["default"];exports["default"]=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=_Object$create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)_Object$setPrototypeOf?_Object$setPrototypeOf(subClass,superClass):subClass.__proto__=superClass};exports.__esModule=true},{"babel-runtime/core-js/object/create":29,"babel-runtime/core-js/object/set-prototype-of":30}],33:[function(require,module,exports){"use strict";exports["default"]=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.__esModule=true},{}],34:[function(require,module,exports){require("../modules/web.dom.iterable");require("../modules/es6.string.iterator");module.exports=require("../modules/core.get-iterator")},{"../modules/core.get-iterator":70,"../modules/es6.string.iterator":73,"../modules/web.dom.iterable":74}],35:[function(require,module,exports){var $=require("../../modules/$");module.exports=function create(P,D){return $.create(P,D)}},{"../../modules/$":57}],36:[function(require,module,exports){require("../../modules/es6.object.set-prototype-of");module.exports=require("../../modules/$.core").Object.setPrototypeOf},{"../../modules/$.core":42,"../../modules/es6.object.set-prototype-of":72}],37:[function(require,module,exports){module.exports=function(it){if(typeof it!="function")throw TypeError(it+" is not a function!");return it}},{}],38:[function(require,module,exports){module.exports=function(){}},{}],39:[function(require,module,exports){var isObject=require("./$.is-object");module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},{"./$.is-object":52}],40:[function(require,module,exports){var cof=require("./$.cof"),TAG=require("./$.wks")("toStringTag"),ARG=cof(function(){return arguments}())=="Arguments";module.exports=function(it){var O,T,B;return it===undefined?"Undefined":it===null?"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:ARG?cof(O):(B=cof(O))=="Object"&&typeof O.callee=="function"?"Arguments":B}},{"./$.cof":41,"./$.wks":68}],41:[function(require,module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},{}],42:[function(require,module,exports){var core=module.exports={version:"1.2.6"};if(typeof __e=="number")__e=core},{}],43:[function(require,module,exports){var aFunction=require("./$.a-function");module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.a-function":37}],44:[function(require,module,exports){module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}},{}],45:[function(require,module,exports){module.exports=!require("./$.fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./$.fails":47}],46:[function(require,module,exports){var global=require("./$.global"),core=require("./$.core"),ctx=require("./$.ctx"),PROTOTYPE="prototype";var $export=function(type,name,source){var IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{})[PROTOTYPE],key,own,out;if(IS_GLOBAL)source=name;for(key in source){own=!IS_FORCED&&target&&key in target;if(own&&key in exports)continue;out=own?target[key]:source[key];exports[key]=IS_GLOBAL&&typeof target[key]!="function"?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?function(C){var F=function(param){return this instanceof C?new C(param):C(param)};F[PROTOTYPE]=C[PROTOTYPE];return F}(out):IS_PROTO&&typeof out=="function"?ctx(Function.call,out):out;if(IS_PROTO)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out}};$export.F=1;$export.G=2;$export.S=4;$export.P=8;$export.B=16;$export.W=32;module.exports=$export},{"./$.core":42,"./$.ctx":43,"./$.global":48}],47:[function(require,module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return true}}},{}],48:[function(require,module,exports){var global=module.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();if(typeof __g=="number")__g=global},{}],49:[function(require,module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},{}],50:[function(require,module,exports){var $=require("./$"),createDesc=require("./$.property-desc");module.exports=require("./$.descriptors")?function(object,key,value){return $.setDesc(object,key,createDesc(1,value))}:function(object,key,value){object[key]=value;return object}},{"./$":57,"./$.descriptors":45,"./$.property-desc":59}],51:[function(require,module,exports){var cof=require("./$.cof");module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return cof(it)=="String"?it.split(""):Object(it)}},{"./$.cof":41}],52:[function(require,module,exports){module.exports=function(it){return typeof it==="object"?it!==null:typeof it==="function"}},{}],53:[function(require,module,exports){"use strict";var $=require("./$"),descriptor=require("./$.property-desc"),setToStringTag=require("./$.set-to-string-tag"),IteratorPrototype={};require("./$.hide")(IteratorPrototype,require("./$.wks")("iterator"),function(){return this});module.exports=function(Constructor,NAME,next){Constructor.prototype=$.create(IteratorPrototype,{next:descriptor(1,next)});setToStringTag(Constructor,NAME+" Iterator")}},{"./$":57,"./$.hide":50,"./$.property-desc":59,"./$.set-to-string-tag":62,"./$.wks":68}],54:[function(require,module,exports){"use strict";var LIBRARY=require("./$.library"),$export=require("./$.export"),redefine=require("./$.redefine"),hide=require("./$.hide"),has=require("./$.has"),Iterators=require("./$.iterators"),$iterCreate=require("./$.iter-create"),setToStringTag=require("./$.set-to-string-tag"),getProto=require("./$").getProto,ITERATOR=require("./$.wks")("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values";var returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var getMethod=function(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case KEYS:return function keys(){return new Constructor(this,kind)};case VALUES:return function values(){return new Constructor(this,kind)}}return function entries(){return new Constructor(this,kind)}};var TAG=NAME+" Iterator",DEF_VALUES=DEFAULT==VALUES,VALUES_BUG=false,proto=Base.prototype,$native=proto[ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],$default=$native||getMethod(DEFAULT),methods,key;if($native){var IteratorPrototype=getProto($default.call(new Base));setToStringTag(IteratorPrototype,TAG,true);if(!LIBRARY&&has(proto,FF_ITERATOR))hide(IteratorPrototype,ITERATOR,returnThis);if(DEF_VALUES&&$native.name!==VALUES){VALUES_BUG=true;$default=function values(){return $native.call(this)}}}if((!LIBRARY||FORCED)&&(BUGGY||VALUES_BUG||!proto[ITERATOR])){hide(proto,ITERATOR,$default)}Iterators[NAME]=$default;Iterators[TAG]=returnThis;if(DEFAULT){methods={values:DEF_VALUES?$default:getMethod(VALUES),keys:IS_SET?$default:getMethod(KEYS),entries:!DEF_VALUES?$default:getMethod("entries")};if(FORCED)for(key in methods){if(!(key in proto))redefine(proto,key,methods[key])}else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods)}return methods}},{"./$":57,"./$.export":46,"./$.has":49,"./$.hide":50,"./$.iter-create":53,"./$.iterators":56,"./$.library":58,"./$.redefine":60,"./$.set-to-string-tag":62,"./$.wks":68}],55:[function(require,module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},{}],56:[function(require,module,exports){module.exports={}},{}],57:[function(require,module,exports){var $Object=Object;module.exports={create:$Object.create,getProto:$Object.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:$Object.getOwnPropertyDescriptor,setDesc:$Object.defineProperty,setDescs:$Object.defineProperties,getKeys:$Object.keys,getNames:$Object.getOwnPropertyNames,getSymbols:$Object.getOwnPropertySymbols,each:[].forEach}},{}],58:[function(require,module,exports){module.exports=true},{}],59:[function(require,module,exports){module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}},{}],60:[function(require,module,exports){module.exports=require("./$.hide")},{"./$.hide":50}],61:[function(require,module,exports){var getDesc=require("./$").getDesc,isObject=require("./$.is-object"),anObject=require("./$.an-object");var check=function(O,proto){anObject(O);if(!isObject(proto)&&proto!==null)throw TypeError(proto+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(test,buggy,set){try{set=require("./$.ctx")(Function.call,getDesc(Object.prototype,"__proto__").set,2);set(test,[]);buggy=!(test instanceof Array)}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}({},false):undefined),check:check}},{"./$":57,"./$.an-object":39,"./$.ctx":43,"./$.is-object":52}],62:[function(require,module,exports){var def=require("./$").setDesc,has=require("./$.has"),TAG=require("./$.wks")("toStringTag");module.exports=function(it,tag,stat){if(it&&!has(it=stat?it:it.prototype,TAG))def(it,TAG,{configurable:true,value:tag})}},{"./$":57,"./$.has":49,"./$.wks":68}],63:[function(require,module,exports){var global=require("./$.global"),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},{"./$.global":48}],64:[function(require,module,exports){var toInteger=require("./$.to-integer"),defined=require("./$.defined");module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$.defined":44,"./$.to-integer":65}],65:[function(require,module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},{}],66:[function(require,module,exports){var IObject=require("./$.iobject"),defined=require("./$.defined");module.exports=function(it){return IObject(defined(it))}},{"./$.defined":44,"./$.iobject":51}],67:[function(require,module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(key===undefined?"":key,")_",(++id+px).toString(36))}},{}],68:[function(require,module,exports){var store=require("./$.shared")("wks"),uid=require("./$.uid"),Symbol=require("./$.global").Symbol;module.exports=function(name){return store[name]||(store[name]=Symbol&&Symbol[name]||(Symbol||uid)("Symbol."+name))}},{"./$.global":48,"./$.shared":63,"./$.uid":67}],69:[function(require,module,exports){var classof=require("./$.classof"),ITERATOR=require("./$.wks")("iterator"),Iterators=require("./$.iterators");module.exports=require("./$.core").getIteratorMethod=function(it){if(it!=undefined)return it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]}},{"./$.classof":40,"./$.core":42,"./$.iterators":56,"./$.wks":68}],70:[function(require,module,exports){var anObject=require("./$.an-object"),get=require("./core.get-iterator-method");module.exports=require("./$.core").getIterator=function(it){var iterFn=get(it);if(typeof iterFn!="function")throw TypeError(it+" is not iterable!");return anObject(iterFn.call(it))}},{"./$.an-object":39,"./$.core":42,"./core.get-iterator-method":69}],71:[function(require,module,exports){"use strict";var addToUnscopables=require("./$.add-to-unscopables"),step=require("./$.iter-step"),Iterators=require("./$.iterators"),toIObject=require("./$.to-iobject");module.exports=require("./$.iter-define")(Array,"Array",function(iterated,kind){this._t=toIObject(iterated);this._i=0;this._k=kind},function(){var O=this._t,kind=this._k,index=this._i++;if(!O||index>=O.length){this._t=undefined;return step(1)}if(kind=="keys")return step(0,index);if(kind=="values")return step(0,O[index]);return step(0,[index,O[index]])},"values");Iterators.Arguments=Iterators.Array;addToUnscopables("keys");addToUnscopables("values");addToUnscopables("entries")},{"./$.add-to-unscopables":38,"./$.iter-define":54,"./$.iter-step":55,"./$.iterators":56,"./$.to-iobject":66}],72:[function(require,module,exports){var $export=require("./$.export");$export($export.S,"Object",{setPrototypeOf:require("./$.set-proto").set})},{"./$.export":46,"./$.set-proto":61}],73:[function(require,module,exports){"use strict";var $at=require("./$.string-at")(true);require("./$.iter-define")(String,"String",function(iterated){this._t=String(iterated);this._i=0},function(){var O=this._t,index=this._i,point;if(index>=O.length)return{value:undefined,done:true};point=$at(O,index);this._i+=point.length;return{value:point,done:false}})},{"./$.iter-define":54,"./$.string-at":64}],74:[function(require,module,exports){require("./es6.array.iterator");var Iterators=require("./$.iterators");Iterators.NodeList=Iterators.HTMLCollection=Iterators.Array},{"./$.iterators":56,"./es6.array.iterator":71}],75:[function(require,module,exports){var escapeRegex=function(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};var replaceBlocks=function(source){var blocks=[];var regex=/\/\*\s*esfmt-ignore-start\s*\*\/((.|\n)*?)\/\*\s*esfmt-ignore-end\s*\*\//g;var lineRegex=/^(\s*)((.*?)esfmt-ignore-line(.*))$/gm;var counter=0;source=source.replace(regex,function(match){var matchFound="/*esfmt-ignore-block("+counter++ +")*/";blocks.push({source:match,replace:matchFound});return matchFound});source=source.replace(lineRegex,function(match){var matchFound="/*esfmt-ignore-line("+counter++ +")*/";blocks.push({source:match,replace:new RegExp("^\\s*"+escapeRegex(matchFound),"m")});return matchFound});return{source:source,blocks:blocks}};var restoreBlocks=function(source,blocks){blocks=blocks||[];blocks.forEach(function(block){source=source.replace(block.replace,block.source)});return source};module.exports={stringBefore:function(code){this._response=replaceBlocks(code);return this._response.source},stringAfter:function(code){return restoreBlocks(code,this._response.blocks)}}},{}],76:[function(require,module,exports){var hasOwn=Object.prototype.hasOwnProperty;var toStr=Object.prototype.toString;var undefined;var isArray=function isArray(arr){if(typeof Array.isArray==="function"){return Array.isArray(arr)}return toStr.call(arr)==="[object Array]"};var isPlainObject=function isPlainObject(obj){"use strict";if(!obj||toStr.call(obj)!=="[object Object]"){return false}var has_own_constructor=hasOwn.call(obj,"constructor");var has_is_property_of_method=obj.constructor&&obj.constructor.prototype&&hasOwn.call(obj.constructor.prototype,"isPrototypeOf");if(obj.constructor&&!has_own_constructor&&!has_is_property_of_method){return false}var key;for(key in obj){}return key===undefined||hasOwn.call(obj,key)};module.exports=function extend(){"use strict";var options,name,src,copy,copyIsArray,clone,target=arguments[0],i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}else if(typeof target!=="object"&&typeof target!=="function"||target==null){target={}}for(;i<length;++i){options=arguments[i];if(options!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&©&&(isPlainObject(copy)||(copyIsArray=isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&isArray(src)?src:[]}else{clone=src&&isPlainObject(src)?src:{}}target[name]=extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target}},{}],77:[function(require,module,exports){var parse;var isArray=require("isarray");var objectKeys=require("object-keys");var forEach=require("foreach");module.exports=function(src,opts,fn){if(typeof opts==="function"){fn=opts;opts={}}if(src&&typeof src==="object"&&src.constructor.name==="Buffer"){src=src.toString()}else if(src&&typeof src==="object"){opts=src;src=opts.source;delete opts.source}src=src===undefined?opts.source:src;if(typeof src!=="string")src=String(src);if(opts.parser){parse=opts.parser.parse}else{parse=require("acorn").parse}var ast=parse(src,opts);var result={chunks:src.split(""),toString:function(){return result.chunks.join("")},inspect:function(){return result.toString()}};var index=0;(function walk(node,parent){insertHelpers(node,parent,result.chunks);forEach(objectKeys(node),function(key){if(key==="parent")return;var child=node[key];if(isArray(child)){forEach(child,function(c){if(c&&typeof c.type==="string"){walk(c,node)}})}else if(child&&typeof child.type==="string"){walk(child,node)}});fn(node)})(ast,undefined);return result};function insertHelpers(node,parent,chunks){node.parent=parent;node.source=function(){return chunks.slice(node.start,node.end).join("")};if(node.update&&typeof node.update==="object"){var prev=node.update;forEach(objectKeys(prev),function(key){update[key]=prev[key]});node.update=update}else{node.update=update}function update(s){chunks[node.start]=s;for(var i=node.start+1;i<node.end;i++){chunks[i]=""}}}},{acorn:78,foreach:79,isarray:80,"object-keys":81}],78:[function(require,module,exports){(function(global){(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){"use strict";exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;exports.__esModule=true;var _state=_dereq_("./state");var Parser=_state.Parser;var _options=_dereq_("./options");var getOptions=_options.getOptions;_dereq_("./parseutil");_dereq_("./statement");_dereq_("./lval");_dereq_("./expression");exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=_dereq_("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;exports.Node=_dereq_("./node").Node;var _tokentype=_dereq_("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=_dereq_("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=_dereq_("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;exports.Token=_dereq_("./tokenize").Token;var _whitespace=_dereq_("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;var version="1.2.2";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.pos,startLoc=p.options.locations&&p.curPosition();p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos,startLoc))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new Parser(getOptions(options),String(input))}},{"./expression":6,"./identifier":7,"./location":8,"./lval":9,"./node":10,"./options":11,"./parseutil":12,"./state":13,"./statement":14,"./tokencontext":15,"./tokenize":16,"./tokentype":17,"./whitespace":19}],2:[function(_dereq_,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],3:[function(_dereq_,module,exports){var process=module.exports={};var queue=[];var draining=false;function drainQueue(){if(draining){return}draining=true;var currentQueue;var len=queue.length;while(len){currentQueue=queue;queue=[];var i=-1;while(++i<len){currentQueue[i]()}len=queue.length}draining=false}process.nextTick=function(fun){queue.push(fun);if(!draining){setTimeout(drainQueue,0)}};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],4:[function(_dereq_,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],5:[function(_dereq_,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i<arguments.length;i++){objects.push(inspect(arguments[i]))}return objects.join(" ")}var i=1;var args=arguments;var len=args.length;var str=String(f).replace(formatRegExp,function(x){if(x==="%%")return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i<len;x=args[++i]){if(isNull(x)||!isObject(x)){str+=" "+x}else{str+=" "+inspect(x)}}return str};exports.deprecate=function(fn,msg){if(isUndefined(global.process)){return function(){return exports.deprecate(fn,msg).apply(this,arguments)}}if(process.noDeprecation===true){return fn}var warned=false;function deprecated(){if(!warned){if(process.throwDeprecation){throw new Error(msg)}else if(process.traceDeprecation){console.trace(msg)}else{console.error(msg)}warned=true}return fn.apply(this,arguments)}return deprecated};var debugs={};var debugEnviron;exports.debuglog=function(set){if(isUndefined(debugEnviron))debugEnviron=process.env.NODE_DEBUG||"";set=set.toUpperCase();if(!debugs[set]){if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else{debugs[set]=function(){}}}return debugs[set]};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};if(arguments.length>=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i<l;++i){if(hasOwnProperty(value,String(i))){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),true))}else{output.push("")}}keys.forEach(function(key){if(!key.match(/^\d+$/)){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,true))}});return output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(desc.get){if(desc.set){str=ctx.stylize("[Getter/Setter]","special")}else{str=ctx.stylize("[Getter]","special")}}else{if(desc.set){str=ctx.stylize("[Setter]","special")}}if(!hasOwnProperty(visibleKeys,key)){name="["+key+"]"}if(!str){if(ctx.seen.indexOf(desc.value)<0){if(isNull(recurseTimes)){str=formatValue(ctx,desc.value,null)}else{str=formatValue(ctx,desc.value,recurseTimes-1)}if(str.indexOf("\n")>-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=_dereq_("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=_dereq_("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]; | |
}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":4,_process:3,inherits:2}],6:[function(_dereq_,module,exports){"use strict";var tt=_dereq_("./tokentype").types;var Parser=_dereq_("./state").Parser;var reservedWords=_dereq_("./identifier").reservedWords;var has=_dereq_("./util").has;var pp=Parser.prototype;pp.checkPropClash=function(prop,propHash){if(this.options.ecmaVersion>=6)return;var key=prop.key,name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind||"init",other=undefined;if(has(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((this.strict||isGetSet)&&other[kind]||!(isGetSet^other.init))this.raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true};pp.parseExpression=function(noIn,refShorthandDefaultPos){var startPos=this.start,startLoc=this.startLoc;var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.type===tt.comma){var node=this.startNodeAt(startPos,startLoc);node.expressions=[expr];while(this.eat(tt.comma))node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos));return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.type==tt._yield&&this.inGenerator)return this.parseYield();var failOnShorthandAssign=undefined;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var startPos=this.start,startLoc=this.startLoc;if(this.type==tt.parenL||this.type==tt.name)this.potentialArrowAt=this.start;var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,startPos,startLoc);if(this.type.isAssign){var node=this.startNodeAt(startPos,startLoc);node.operator=this.value;node.left=this.type===tt.eq?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var startPos=this.start,startLoc=this.startLoc;var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(tt.question)){var node=this.startNodeAt(startPos,startLoc);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(tt.colon);node.alternate=this.parseMaybeAssign(noIn);return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var startPos=this.start,startLoc=this.startLoc;var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,startPos,startLoc,-1,noIn)};pp.parseExprOp=function(left,leftStartPos,leftStartLoc,minPrec,noIn){var prec=this.type.binop;if(Array.isArray(leftStartPos)){if(this.options.locations&&noIn===undefined){noIn=minPrec;minPrec=leftStartLoc;leftStartLoc=leftStartPos[1];leftStartPos=leftStartPos[0]}}if(prec!=null&&(!noIn||this.type!==tt._in)){if(prec>minPrec){var node=this.startNodeAt(leftStartPos,leftStartLoc);node.left=left;node.operator=this.value;var op=this.type;this.next();var startPos=this.start,startLoc=this.startLoc;node.right=this.parseExprOp(this.parseMaybeUnary(),startPos,startLoc,prec,noIn);this.finishNode(node,op===tt.logicalOR||op===tt.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStartPos,leftStartLoc,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.type.prefix){var node=this.startNode(),update=this.type===tt.incDec;node.operator=this.value;node.prefix=true;this.next();node.argument=this.parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var startPos=this.start,startLoc=this.startLoc;var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(startPos,startLoc);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var startPos=this.start,startLoc=this.startLoc;var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,startPos,startLoc)};pp.parseSubscripts=function(base,startPos,startLoc,noCalls){if(Array.isArray(startPos)){if(this.options.locations&&noCalls===undefined){noCalls=startLoc;startLoc=startPos[1];startPos=startPos[0]}}for(;;){if(this.eat(tt.dot)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.property=this.parseIdent(true);node.computed=false;base=this.finishNode(node,"MemberExpression")}else if(this.eat(tt.bracketL)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(tt.bracketR);base=this.finishNode(node,"MemberExpression")}else if(!noCalls&&this.eat(tt.parenL)){var node=this.startNodeAt(startPos,startLoc);node.callee=base;node.arguments=this.parseExprList(tt.parenR,false);base=this.finishNode(node,"CallExpression")}else if(this.type===tt.backQuote){var node=this.startNodeAt(startPos,startLoc);node.tag=base;node.quasi=this.parseTemplate();base=this.finishNode(node,"TaggedTemplateExpression")}else{return base}}};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined,canBeArrow=this.potentialArrowAt==this.start;switch(this.type){case tt._this:case tt._super:var type=this.type===tt._this?"ThisExpression":"Super";node=this.startNode();this.next();return this.finishNode(node,type);case tt._yield:if(this.inGenerator)this.unexpected();case tt.name:var startPos=this.start,startLoc=this.startLoc;var id=this.parseIdent(this.type!==tt.name);if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(tt.arrow))return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),[id]);return id;case tt.regexp:var value=this.value;node=this.parseLiteral(value.value);node.regex={pattern:value.pattern,flags:value.flags};return node;case tt.num:case tt.string:return this.parseLiteral(this.value);case tt._null:case tt._true:case tt._false:node=this.startNode();node.value=this.type===tt._null?null:this.type===tt._true;node.raw=this.type.keyword;this.next();return this.finishNode(node,"Literal");case tt.parenL:return this.parseParenAndDistinguishExpression(canBeArrow);case tt.bracketL:node=this.startNode();this.next();if(this.options.ecmaVersion>=7&&this.type===tt._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(tt.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case tt.braceL:return this.parseObj(false,refShorthandDefaultPos);case tt._function:node=this.startNode();this.next();return this.parseFunction(node,false);case tt._class:return this.parseClass(this.startNode(),false);case tt._new:return this.parseNew();case tt.backQuote:return this.parseTemplate();default:this.unexpected()}};pp.parseLiteral=function(value){var node=this.startNode();node.value=value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"Literal")};pp.parseParenExpression=function(){this.expect(tt.parenL);var val=this.parseExpression();this.expect(tt.parenR);return val};pp.parseParenAndDistinguishExpression=function(canBeArrow){var startPos=this.start,startLoc=this.startLoc,val=undefined;if(this.options.ecmaVersion>=6){this.next();if(this.options.ecmaVersion>=7&&this.type===tt._for){return this.parseComprehension(this.startNodeAt(startPos,startLoc),true)}var innerStartPos=this.start,innerStartLoc=this.startLoc;var exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined;while(this.type!==tt.parenR){first?first=false:this.expect(tt.comma);if(this.type===tt.ellipsis){spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest()));break}else{if(this.type===tt.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEndPos=this.start,innerEndLoc=this.startLoc;this.expect(tt.parenR);if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(tt.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(startPos,startLoc,exprList)}if(!exprList.length)this.unexpected(this.lastTokStart);if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStartPos,innerStartLoc);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEndPos,innerEndLoc)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(startPos,startLoc);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{return val}};pp.parseParenItem=function(item){return item};pp.parseParenArrowList=function(startPos,startLoc,exprList){return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),exprList)};var empty=[];pp.parseNew=function(){var node=this.startNode();var meta=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(tt.dot)){node.meta=meta;node.property=this.parseIdent(true);if(node.property.name!=="target")this.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}var startPos=this.start,startLoc=this.startLoc;node.callee=this.parseSubscripts(this.parseExprAtom(),startPos,startLoc,true);if(this.eat(tt.parenL))node.arguments=this.parseExprList(tt.parenR,false);else node.arguments=empty;return this.finishNode(node,"NewExpression")};pp.parseTemplateElement=function(){var elem=this.startNode();elem.value={raw:this.input.slice(this.start,this.end),cooked:this.value};this.next();elem.tail=this.type===tt.backQuote;return this.finishNode(elem,"TemplateElement")};pp.parseTemplate=function(){var node=this.startNode();this.next();node.expressions=[];var curElt=this.parseTemplateElement();node.quasis=[curElt];while(!curElt.tail){this.expect(tt.dollarBraceL);node.expressions.push(this.parseExpression());this.expect(tt.braceR);node.quasis.push(curElt=this.parseTemplateElement())}this.next();return this.finishNode(node,"TemplateLiteral")};pp.parseObj=function(isPattern,refShorthandDefaultPos){var node=this.startNode(),first=true,propHash={};node.properties=[];this.next();while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var prop=this.startNode(),isGenerator=undefined,startPos=undefined,startLoc=undefined;if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos){startPos=this.start;startLoc=this.startLoc}if(!isPattern)isGenerator=this.eat(tt.star)}this.parsePropertyName(prop);this.parsePropertyValue(prop,isPattern,isGenerator,startPos,startLoc,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parsePropertyValue=function(prop,isPattern,isGenerator,startPos,startLoc,refShorthandDefaultPos){if(this.eat(tt.colon)){prop.value=isPattern?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(false,refShorthandDefaultPos);prop.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===tt.parenL){if(isPattern)this.unexpected();prop.kind="init";prop.method=true;prop.value=this.parseMethod(isGenerator)}else if(this.options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&(this.type!=tt.comma&&this.type!=tt.braceR)){if(isGenerator||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);prop.value=this.parseMethod(false)}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(reservedWords.strictBind(prop.key.name)||reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(startPos,startLoc,prop.key)}else if(this.type===tt.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(startPos,startLoc,prop.key)}else{prop.value=prop.key}prop.shorthand=true}else this.unexpected()};pp.parsePropertyName=function(prop){if(this.options.ecmaVersion>=6){if(this.eat(tt.bracketL)){prop.computed=true;prop.key=this.parseMaybeAssign();this.expect(tt.bracketR);return prop.key}else{prop.computed=false}}return prop.key=this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.initFunction=function(node){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}};pp.parseMethod=function(isGenerator){var node=this.startNode();this.initFunction(node);this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false);var allowExpressionBody=undefined;if(this.options.ecmaVersion>=6){node.generator=isGenerator;allowExpressionBody=true}else{allowExpressionBody=false}this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params){this.initFunction(node);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==tt.braceL;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i<node.params.length;i++){this.checkLVal(node.params[i],true,nameHash)}this.strict=oldStrict}};pp.parseExprList=function(close,allowTrailingComma,allowEmpty,refShorthandDefaultPos){var elts=[],first=true;while(!this.eat(close)){if(!first){this.expect(tt.comma);if(allowTrailingComma&&this.afterTrailingComma(close))break}else first=false;if(allowEmpty&&this.type===tt.comma){elts.push(null)}else{if(this.type===tt.ellipsis)elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false,refShorthandDefaultPos))}}return elts};pp.parseIdent=function(liberal){var node=this.startNode();if(liberal&&this.options.allowReserved=="never")liberal=false;if(this.type===tt.name){if(!liberal&&(!this.options.allowReserved&&this.isReservedWord(this.value)||this.strict&&reservedWords.strict(this.value)&&(this.options.ecmaVersion>=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");node.name=this.value}else if(liberal&&this.type.keyword){node.name=this.type.keyword}else{this.unexpected()}this.next();return this.finishNode(node,"Identifier")};pp.parseYield=function(){var node=this.startNode();this.next();if(this.type==tt.semi||this.canInsertSemicolon()||this.type!=tt.star&&!this.type.startsExpr){node.delegate=false;node.argument=null}else{node.delegate=this.eat(tt.star);node.argument=this.parseMaybeAssign()}return this.finishNode(node,"YieldExpression")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===tt._for){var block=this.startNode();this.next();this.expect(tt.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(tt.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(tt._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?tt.parenR:tt.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],7:[function(_dereq_,module,exports){"use strict";exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;exports.__esModule=true;function makePredicate(words){words=words.split(" ");var f="",cats=[];out:for(var i=0;i<words.length;++i){for(var j=0;j<cats.length;++j){if(cats[j][0].length==words[i].length){cats[j].push(words[i]);continue out}}cats.push([words[i]])}function compareTo(arr){if(arr.length==1){return f+="return str === "+JSON.stringify(arr[0])+";"}f+="switch(str){";for(var i=0;i<arr.length;++i){f+="case "+JSON.stringify(arr[i])+":"}f+="return true}return false;"}if(cats.length>3){cats.sort(function(a,b){return b.length-a.length});f+="switch(str.length){";for(var i=0;i<cats.length;++i){var cat=cats[i];f+="case "+cat[0].length+":";compareTo(cat)}f+="}"}else{compareTo(words)}return new Function("str",f)}var reservedWords={3:makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),5:makePredicate("class enum extends super const export import"),6:makePredicate("enum await"),strict:makePredicate("implements interface let package private protected public static yield"),strictBind:makePredicate("eval arguments")};exports.reservedWords=reservedWords;var ecma5AndLessKeywords="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";var keywords={5:makePredicate(ecma5AndLessKeywords),6:makePredicate(ecma5AndLessKeywords+" let const class extends export import yield super")};exports.keywords=keywords;var nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var nonASCIIidentifierChars="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");nonASCIIidentifierStartChars=nonASCIIidentifierChars=null;var astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,99,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,98,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,16481,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,1340,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,16355,541];var astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,9,20855,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,4305,6,792618,239];function isInAstralSet(code,set){var pos=65536;for(var i=0;i<set.length;i+=2){pos+=set[i];if(pos>code){return false}pos+=set[i+1];if(pos>=code){return true}}}function isIdentifierStart(code,astral){if(code<65){return code===36}if(code<91){return true}if(code<97){return code===95}if(code<123){return true}if(code<=65535){return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code))}if(astral===false){return false}return isInAstralSet(code,astralIdentifierStartCodes)}function isIdentifierChar(code,astral){if(code<48){return code===36}if(code<58){return true}if(code<65){return false}if(code<91){return true}if(code<97){return code===95}if(code<123){return true}if(code<=65535){return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code))}if(astral===false){return false}return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],8:[function(_dereq_,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.getLineInfo=getLineInfo;exports.__esModule=true;var Parser=_dereq_("./state").Parser;var lineBreakG=_dereq_("./whitespace").lineBreakG;var deprecate=_dereq_("util").deprecate;var Position=exports.Position=function(){function Position(line,col){_classCallCheck(this,Position);this.line=line;this.column=col}Position.prototype.offset=function offset(n){return new Position(this.line,this.column+n)};return Position}();var SourceLocation=exports.SourceLocation=function SourceLocation(p,start,end){_classCallCheck(this,SourceLocation);this.start=start;this.end=end;if(p.sourceFile!==null)this.source=p.sourceFile};function getLineInfo(input,offset){for(var line=1,cur=0;;){lineBreakG.lastIndex=cur;var match=lineBreakG.exec(input);if(match&&match.index<offset){++line;cur=match.index+match[0].length}else{return new Position(line,offset-cur)}}}var pp=Parser.prototype;pp.raise=function(pos,message){var loc=getLineInfo(this.input,pos);message+=" ("+loc.line+":"+loc.column+")";var err=new SyntaxError(message);err.pos=pos;err.loc=loc;err.raisedAt=this.pos;throw err};pp.curPosition=function(){return new Position(this.curLine,this.pos-this.lineStart)};pp.markPosition=function(){return this.options.locations?[this.start,this.startLoc]:this.start}},{"./state":13,"./whitespace":19,util:5}],9:[function(_dereq_,module,exports){"use strict";var tt=_dereq_("./tokentype").types;var Parser=_dereq_("./state").Parser;var reservedWords=_dereq_("./identifier").reservedWords;var has=_dereq_("./util").has;var pp=Parser.prototype;pp.toAssignable=function(node,isBinding){if(this.options.ecmaVersion>=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i<node.properties.length;i++){var prop=node.properties[i];if(prop.kind!=="init")this.raise(prop.key.start,"Object pattern can't contain getter or setter");this.toAssignable(prop.value,isBinding)}break;case"ArrayExpression":node.type="ArrayPattern";this.toAssignableList(node.elements,isBinding);break;case"AssignmentExpression":if(node.operator==="="){node.type="AssignmentPattern"}else{this.raise(node.left.end,"Only '=' operator can be used for specifying default value.")}break;case"ParenthesizedExpression":node.expression=this.toAssignable(node.expression,isBinding);break;case"MemberExpression":if(!isBinding)break;default:this.raise(node.start,"Assigning to rvalue")}}return node};pp.toAssignableList=function(exprList,isBinding){var end=exprList.length;if(end){var last=exprList[end-1];if(last&&last.type=="RestElement"){--end}else if(last&&last.type=="SpreadElement"){last.type="RestElement";var arg=last.argument;this.toAssignable(arg,isBinding);if(arg.type!=="Identifier"&&arg.type!=="MemberExpression"&&arg.type!=="ArrayPattern")this.unexpected(arg.start);--end}}for(var i=0;i<end;i++){var elt=exprList[i];if(elt)this.toAssignable(elt,isBinding)}return exprList};pp.parseSpread=function(refShorthandDefaultPos){var node=this.startNode();this.next();node.argument=this.parseMaybeAssign(refShorthandDefaultPos);return this.finishNode(node,"SpreadElement")};pp.parseRest=function(){var node=this.startNode();this.next();node.argument=this.type===tt.name||this.type===tt.bracketL?this.parseBindingAtom():this.unexpected();return this.finishNode(node,"RestElement")};pp.parseBindingAtom=function(){if(this.options.ecmaVersion<6)return this.parseIdent();switch(this.type){case tt.name:return this.parseIdent();case tt.bracketL:var node=this.startNode();this.next();node.elements=this.parseBindingList(tt.bracketR,true,true);return this.finishNode(node,"ArrayPattern");case tt.braceL:return this.parseObj(true);default:this.unexpected()}};pp.parseBindingList=function(close,allowEmpty,allowTrailingComma){var elts=[],first=true;while(!this.eat(close)){if(first)first=false;else this.expect(tt.comma);if(allowEmpty&&this.type===tt.comma){elts.push(null)}else if(allowTrailingComma&&this.afterTrailingComma(close)){break}else if(this.type===tt.ellipsis){var rest=this.parseRest();this.parseBindingListItem(rest);elts.push(rest);this.expect(close);break}else{var elem=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(elem);elts.push(elem)}}return elts};pp.parseBindingListItem=function(param){return param};pp.parseMaybeDefault=function(startPos,startLoc,left){if(Array.isArray(startPos)){if(this.options.locations&&noCalls===undefined){left=startLoc;startLoc=startPos[1];startPos=startPos[0]}}left=left||this.parseBindingAtom();if(!this.eat(tt.eq))return left;var node=this.startNodeAt(startPos,startLoc);node.operator="=";node.left=left;node.right=this.parseMaybeAssign();return this.finishNode(node,"AssignmentPattern")};pp.checkLVal=function(expr,isBinding,checkClashes){switch(expr.type){case"Identifier":if(this.strict&&(reservedWords.strictBind(expr.name)||reservedWords.strict(expr.name)))this.raise(expr.start,(isBinding?"Binding ":"Assigning to ")+expr.name+" in strict mode");if(checkClashes){if(has(checkClashes,expr.name))this.raise(expr.start,"Argument name clash in strict mode");checkClashes[expr.name]=true}break;case"MemberExpression":if(isBinding)this.raise(expr.start,(isBinding?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var i=0;i<expr.properties.length;i++){this.checkLVal(expr.properties[i].value,isBinding,checkClashes)}break;case"ArrayPattern":for(var i=0;i<expr.elements.length;i++){var elem=expr.elements[i];if(elem)this.checkLVal(elem,isBinding,checkClashes)}break;case"AssignmentPattern":this.checkLVal(expr.left,isBinding,checkClashes);break;case"RestElement":this.checkLVal(expr.argument,isBinding,checkClashes);break;case"ParenthesizedExpression":this.checkLVal(expr.expression,isBinding,checkClashes);break;default:this.raise(expr.start,(isBinding?"Binding":"Assigning to")+" rvalue")}}},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],10:[function(_dereq_,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var Parser=_dereq_("./state").Parser;var SourceLocation=_dereq_("./location").SourceLocation;var pp=Parser.prototype;var Node=exports.Node=function Node(){_classCallCheck(this,Node)};pp.startNode=function(){var node=new Node;node.start=this.start;if(this.options.locations)node.loc=new SourceLocation(this,this.startLoc);if(this.options.directSourceFile)node.sourceFile=this.options.directSourceFile;if(this.options.ranges)node.range=[this.start,0];return node};pp.startNodeAt=function(pos,loc){var node=new Node;if(Array.isArray(pos)){if(this.options.locations&&loc===undefined){loc=pos[1];pos=pos[0]}}node.start=pos;if(this.options.locations)node.loc=new SourceLocation(this,loc);if(this.options.directSourceFile)node.sourceFile=this.options.directSourceFile;if(this.options.ranges)node.range=[pos,0];return node};pp.finishNode=function(node,type){node.type=type;node.end=this.lastTokEnd;if(this.options.locations)node.loc.end=this.lastTokEndLoc;if(this.options.ranges)node.range[1]=this.lastTokEnd;return node};pp.finishNodeAt=function(node,type,pos,loc){node.type=type;if(Array.isArray(pos)){if(this.options.locations&&loc===undefined){loc=pos[1];pos=pos[0]}}node.end=pos;if(this.options.locations)node.loc.end=loc;if(this.options.ranges)node.range[1]=pos;return node}},{"./location":8,"./state":13}],11:[function(_dereq_,module,exports){"use strict";exports.getOptions=getOptions;exports.__esModule=true;var _util=_dereq_("./util");var has=_util.has;var isArray=_util.isArray;var SourceLocation=_dereq_("./location").SourceLocation;var defaultOptions={ecmaVersion:5,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:true,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowHashBang:false,locations:false,onToken:null,onComment:null,ranges:false,program:null,sourceFile:null,directSourceFile:null,preserveParens:false,plugins:{}};exports.defaultOptions=defaultOptions;function getOptions(opts){var options={};for(var opt in defaultOptions){options[opt]=opts&&has(opts,opt)?opts[opt]:defaultOptions[opt]}if(isArray(options.onToken)){(function(){var tokens=options.onToken;options.onToken=function(token){return tokens.push(token)}})()}if(isArray(options.onComment))options.onComment=pushComment(options,options.onComment);return options}function pushComment(options,array){return function(block,text,start,end,startLoc,endLoc){var comment={type:block?"Block":"Line",value:text,start:start,end:end};if(options.locations)comment.loc=new SourceLocation(this,startLoc,endLoc);if(options.ranges)comment.range=[start,end];array.push(comment)}}},{"./location":8,"./util":18}],12:[function(_dereq_,module,exports){"use strict"; | |
var tt=_dereq_("./tokentype").types;var Parser=_dereq_("./state").Parser;var lineBreak=_dereq_("./whitespace").lineBreak;var pp=Parser.prototype;pp.isUseStrict=function(stmt){return this.options.ecmaVersion>=5&&stmt.type==="ExpressionStatement"&&stmt.expression.type==="Literal"&&stmt.expression.value==="use strict"};pp.eat=function(type){if(this.type===type){this.next();return true}else{return false}};pp.isContextual=function(name){return this.type===tt.name&&this.value===name};pp.eatContextual=function(name){return this.value===name&&this.eat(tt.name)};pp.expectContextual=function(name){if(!this.eatContextual(name))this.unexpected()};pp.canInsertSemicolon=function(){return this.type===tt.eof||this.type===tt.braceR||lineBreak.test(this.input.slice(this.lastTokEnd,this.start))};pp.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return true}};pp.semicolon=function(){if(!this.eat(tt.semi)&&!this.insertSemicolon())this.unexpected()};pp.afterTrailingComma=function(tokType){if(this.type==tokType){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);this.next();return true}};pp.expect=function(type){this.eat(type)||this.unexpected()};pp.unexpected=function(pos){this.raise(pos!=null?pos:this.start,"Unexpected token")}},{"./state":13,"./tokentype":17,"./whitespace":19}],13:[function(_dereq_,module,exports){"use strict";exports.Parser=Parser;exports.__esModule=true;var _identifier=_dereq_("./identifier");var reservedWords=_identifier.reservedWords;var keywords=_identifier.keywords;var tt=_dereq_("./tokentype").types;var lineBreak=_dereq_("./whitespace").lineBreak;function Parser(options,input,startPos){this.options=options;this.sourceFile=this.options.sourceFile||null;this.isKeyword=keywords[this.options.ecmaVersion>=6?6:5];this.isReservedWord=reservedWords[this.options.ecmaVersion];this.input=input;this.loadPlugins(this.options.plugins);if(startPos){this.pos=startPos;this.lineStart=Math.max(0,this.input.lastIndexOf("\n",startPos));this.curLine=this.input.slice(0,this.lineStart).split(lineBreak).length}else{this.pos=this.lineStart=0;this.curLine=1}this.type=tt.eof;this.value=null;this.start=this.end=this.pos;this.startLoc=this.endLoc=null;this.lastTokEndLoc=this.lastTokStartLoc=null;this.lastTokStart=this.lastTokEnd=this.pos;this.context=this.initialContext();this.exprAllowed=true;this.strict=this.inModule=this.options.sourceType==="module";this.potentialArrowAt=-1;this.inFunction=this.inGenerator=false;this.labels=[];if(this.pos===0&&this.options.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2)}Parser.prototype.extend=function(name,f){this[name]=f(this[name])};var plugins={};exports.plugins=plugins;Parser.prototype.loadPlugins=function(plugins){for(var _name in plugins){var plugin=exports.plugins[_name];if(!plugin)throw new Error("Plugin '"+_name+"' not found");plugin(this,plugins[_name])}}},{"./identifier":7,"./tokentype":17,"./whitespace":19}],14:[function(_dereq_,module,exports){"use strict";var tt=_dereq_("./tokentype").types;var Parser=_dereq_("./state").Parser;var lineBreak=_dereq_("./whitespace").lineBreak;var pp=Parser.prototype;pp.parseTopLevel=function(node){var first=true;if(!node.body)node.body=[];while(this.type!==tt.eof){var stmt=this.parseStatement(true,true);node.body.push(stmt);if(first&&this.isUseStrict(stmt))this.setStrict(true);first=false}this.next();if(this.options.ecmaVersion>=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){var starttype=this.type,node=this.startNode();switch(starttype){case tt._break:case tt._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case tt._debugger:return this.parseDebuggerStatement(node);case tt._do:return this.parseDoStatement(node);case tt._for:return this.parseForStatement(node);case tt._function:if(!declaration&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(node);case tt._class:if(!declaration)this.unexpected();return this.parseClass(node,true);case tt._if:return this.parseIfStatement(node);case tt._return:return this.parseReturnStatement(node);case tt._switch:return this.parseSwitchStatement(node);case tt._throw:return this.parseThrowStatement(node);case tt._try:return this.parseTryStatement(node);case tt._let:case tt._const:if(!declaration)this.unexpected();case tt._var:return this.parseVarStatement(node,starttype);case tt._while:return this.parseWhileStatement(node);case tt._with:return this.parseWithStatement(node);case tt.braceL:return this.parseBlock();case tt.semi:return this.parseEmptyStatement(node);case tt._export:case tt._import:if(!this.options.allowImportExportEverywhere){if(!topLevel)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return starttype===tt._import?this.parseImport(node):this.parseExport(node);default:var maybeName=this.value,expr=this.parseExpression();if(starttype===tt.name&&expr.type==="Identifier"&&this.eat(tt.colon))return this.parseLabeledStatement(node,maybeName,expr);else return this.parseExpressionStatement(node,expr)}};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.eat(tt.semi)||this.insertSemicolon())node.label=null;else if(this.type!==tt.name)this.unexpected();else{node.label=this.parseIdent();this.semicolon()}for(var i=0;i<this.labels.length;++i){var lab=this.labels[i];if(node.label==null||lab.name===node.label.name){if(lab.kind!=null&&(isBreak||lab.kind==="loop"))break;if(node.label&&isBreak)break}}if(i===this.labels.length)this.raise(node.start,"Unsyntactic "+keyword);return this.finishNode(node,isBreak?"BreakStatement":"ContinueStatement")};pp.parseDebuggerStatement=function(node){this.next();this.semicolon();return this.finishNode(node,"DebuggerStatement")};pp.parseDoStatement=function(node){this.next();this.labels.push(loopLabel);node.body=this.parseStatement(false);this.labels.pop();this.expect(tt._while);node.test=this.parseParenExpression();if(this.options.ecmaVersion>=6)this.eat(tt.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};pp.parseForStatement=function(node){this.next();this.labels.push(loopLabel);this.expect(tt.parenL);if(this.type===tt.semi)return this.parseFor(node,null);if(this.type===tt._var||this.type===tt._let||this.type===tt._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==tt._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return this.parseFor(node,init)};pp.parseFunctionStatement=function(node){this.next();return this.parseFunction(node,true)};pp.parseIfStatement=function(node){this.next();node.test=this.parseParenExpression();node.consequent=this.parseStatement(false);node.alternate=this.eat(tt._else)?this.parseStatement(false):null;return this.finishNode(node,"IfStatement")};pp.parseReturnStatement=function(node){if(!this.inFunction&&!this.options.allowReturnOutsideFunction)this.raise(this.start,"'return' outside of function");this.next();if(this.eat(tt.semi)||this.insertSemicolon())node.argument=null;else{node.argument=this.parseExpression();this.semicolon()}return this.finishNode(node,"ReturnStatement")};pp.parseSwitchStatement=function(node){this.next();node.discriminant=this.parseParenExpression();node.cases=[];this.expect(tt.braceL);this.labels.push(switchLabel);for(var cur,sawDefault;this.type!=tt.braceR;){if(this.type===tt._case||this.type===tt._default){var isCase=this.type===tt._case;if(cur)this.finishNode(cur,"SwitchCase");node.cases.push(cur=this.startNode());cur.consequent=[];this.next();if(isCase){cur.test=this.parseExpression()}else{if(sawDefault)this.raise(this.lastTokStart,"Multiple default clauses");sawDefault=true;cur.test=null}this.expect(tt.colon)}else{if(!cur)this.unexpected();cur.consequent.push(this.parseStatement(true))}}if(cur)this.finishNode(cur,"SwitchCase");this.next();this.labels.pop();return this.finishNode(node,"SwitchStatement")};pp.parseThrowStatement=function(node){this.next();if(lineBreak.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");node.argument=this.parseExpression();this.semicolon();return this.finishNode(node,"ThrowStatement")};var empty=[];pp.parseTryStatement=function(node){this.next();node.block=this.parseBlock();node.handler=null;if(this.type===tt._catch){var clause=this.startNode();this.next();this.expect(tt.parenL);clause.param=this.parseBindingAtom();this.checkLVal(clause.param,true);this.expect(tt.parenR);clause.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=this.eat(tt._finally)?this.parseBlock():null;if(!node.handler&&!node.finalizer)this.raise(node.start,"Missing catch or finally clause");return this.finishNode(node,"TryStatement")};pp.parseVarStatement=function(node,kind){this.next();this.parseVar(node,false,kind);this.semicolon();return this.finishNode(node,"VariableDeclaration")};pp.parseWhileStatement=function(node){this.next();node.test=this.parseParenExpression();this.labels.push(loopLabel);node.body=this.parseStatement(false);this.labels.pop();return this.finishNode(node,"WhileStatement")};pp.parseWithStatement=function(node){if(this.strict)this.raise(this.start,"'with' in strict mode");this.next();node.object=this.parseParenExpression();node.body=this.parseStatement(false);return this.finishNode(node,"WithStatement")};pp.parseEmptyStatement=function(node){this.next();return this.finishNode(node,"EmptyStatement")};pp.parseLabeledStatement=function(node,maybeName,expr){for(var i=0;i<this.labels.length;++i){if(this.labels[i].name===maybeName)this.raise(expr.start,"Label '"+maybeName+"' is already declared")}var kind=this.type.isLoop?"loop":this.type===tt._switch?"switch":null;this.labels.push({name:maybeName,kind:kind});node.body=this.parseStatement(true);this.labels.pop();node.label=expr;return this.finishNode(node,"LabeledStatement")};pp.parseExpressionStatement=function(node,expr){node.expression=expr;this.semicolon();return this.finishNode(node,"ExpressionStatement")};pp.parseBlock=function(allowStrict){var node=this.startNode(),first=true,oldStrict=undefined;node.body=[];this.expect(tt.braceL);while(!this.eat(tt.braceR)){var stmt=this.parseStatement(true);node.body.push(stmt);if(first&&allowStrict&&this.isUseStrict(stmt)){oldStrict=this.strict;this.setStrict(this.strict=true)}first=false}if(oldStrict===false)this.setStrict(false);return this.finishNode(node,"BlockStatement")};pp.parseFor=function(node,init){node.init=init;this.expect(tt.semi);node.test=this.type===tt.semi?null:this.parseExpression();this.expect(tt.semi);node.update=this.type===tt.parenR?null:this.parseExpression();this.expect(tt.parenR);node.body=this.parseStatement(false);this.labels.pop();return this.finishNode(node,"ForStatement")};pp.parseForIn=function(node,init){var type=this.type===tt._in?"ForInStatement":"ForOfStatement";this.next();node.left=init;node.right=this.parseExpression();this.expect(tt.parenR);node.body=this.parseStatement(false);this.labels.pop();return this.finishNode(node,type)};pp.parseVar=function(node,isFor,kind){node.declarations=[];node.kind=kind.keyword;for(;;){var decl=this.startNode();this.parseVarId(decl);if(this.eat(tt.eq)){decl.init=this.parseMaybeAssign(isFor)}else if(kind===tt._const&&!(this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))){this.unexpected()}else if(decl.id.type!="Identifier"&&!(isFor&&(this.type===tt._in||this.isContextual("of")))){this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value")}else{decl.init=null}node.declarations.push(this.finishNode(decl,"VariableDeclarator"));if(!this.eat(tt.comma))break}return node};pp.parseVarId=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody){this.initFunction(node);if(this.options.ecmaVersion>=6)node.generator=this.eat(tt.star);if(isStatement||this.type===tt.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false)};pp.parseClass=function(node,isStatement){this.next();this.parseClassId(node,isStatement);this.parseClassSuper(node);var classBody=this.startNode();var hadConstructor=false;classBody.body=[];this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(this.eat(tt.semi))continue;var method=this.startNode();var isGenerator=this.eat(tt.star);var isMaybeStatic=this.type===tt.name&&this.value==="static";this.parsePropertyName(method);method["static"]=isMaybeStatic&&this.type!==tt.parenL;if(method["static"]){if(isGenerator)this.unexpected();isGenerator=this.eat(tt.star);this.parsePropertyName(method)}method.kind="method";if(!method.computed){var key=method.key;var isGetSet=false;if(!isGenerator&&key.type==="Identifier"&&this.type!==tt.parenL&&(key.name==="get"||key.name==="set")){isGetSet=true;method.kind=key.name;key=this.parsePropertyName(method)}if(!method["static"]&&(key.type==="Identifier"&&key.name==="constructor"||key.type==="Literal"&&key.value==="constructor")){if(hadConstructor)this.raise(key.start,"Duplicate constructor in the same class");if(isGetSet)this.raise(key.start,"Constructor can't have get/set modifier");if(isGenerator)this.raise(key.start,"Constructor can't be a generator");method.kind="constructor";hadConstructor=true}}this.parseClassMethod(classBody,method,isGenerator)}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.parseClassMethod=function(classBody,method,isGenerator){method.value=this.parseMethod(isGenerator);classBody.body.push(this.finishNode(method,"MethodDefinition"))};pp.parseClassId=function(node,isStatement){node.id=this.type===tt.name?this.parseIdent():isStatement?this.unexpected():null};pp.parseClassSuper=function(node){node.superClass=this.eat(tt._extends)?this.parseExprSubscripts():null};pp.parseExport=function(node){this.next();if(this.eat(tt.star)){this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected();this.semicolon();return this.finishNode(node,"ExportAllDeclaration")}if(this.eat(tt._default)){var expr=this.parseMaybeAssign();var needsSemi=true;if(expr.type=="FunctionExpression"||expr.type=="ClassExpression"){needsSemi=false;if(expr.id){expr.type=expr.type=="FunctionExpression"?"FunctionDeclaration":"ClassDeclaration"}}node.declaration=expr;if(needsSemi)this.semicolon();return this.finishNode(node,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}return this.finishNode(node,"ExportNamedDeclaration")};pp.shouldParseExportStatement=function(){return this.type.keyword};pp.parseExportSpecifiers=function(){var nodes=[],first=true;this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var node=this.startNode();node.local=this.parseIdent(this.type===tt._default);node.exported=this.eatContextual("as")?this.parseIdent(true):node.local;nodes.push(this.finishNode(node,"ExportSpecifier"))}return nodes};pp.parseImport=function(node){this.next();if(this.type===tt.string){node.specifiers=empty;node.source=this.parseExprAtom();node.kind=""}else{node.specifiers=this.parseImportSpecifiers();this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(){var nodes=[],first=true;if(this.type===tt.name){var node=this.startNode();node.local=this.parseIdent();this.checkLVal(node.local,true);nodes.push(this.finishNode(node,"ImportDefaultSpecifier"));if(!this.eat(tt.comma))return nodes}if(this.type===tt.star){var node=this.startNode();this.next();this.expectContextual("as");node.local=this.parseIdent();this.checkLVal(node.local,true);nodes.push(this.finishNode(node,"ImportNamespaceSpecifier"));return nodes}this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var node=this.startNode();node.imported=this.parseIdent(true);node.local=this.eatContextual("as")?this.parseIdent():node.imported;this.checkLVal(node.local,true);nodes.push(this.finishNode(node,"ImportSpecifier"))}return nodes}},{"./state":13,"./tokentype":17,"./whitespace":19}],15:[function(_dereq_,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var Parser=_dereq_("./state").Parser;var tt=_dereq_("./tokentype").types;var lineBreak=_dereq_("./whitespace").lineBreak;var TokContext=exports.TokContext=function TokContext(token,isExpr,preserveSpace,override){_classCallCheck(this,TokContext);this.token=token;this.isExpr=isExpr;this.preserveSpace=preserveSpace;this.override=override};var types={b_stat:new TokContext("{",false),b_expr:new TokContext("{",true),b_tmpl:new TokContext("${",true),p_stat:new TokContext("(",false),p_expr:new TokContext("(",true),q_tmpl:new TokContext("`",true,true,function(p){return p.readTmplToken()}),f_expr:new TokContext("function",true)};exports.types=types;var pp=Parser.prototype;pp.initialContext=function(){return[types.b_stat]};pp.braceIsBlock=function(prevType){var parent=undefined;if(prevType===tt.colon&&(parent=this.curContext()).token=="{")return!parent.isExpr;if(prevType===tt._return)return lineBreak.test(this.input.slice(this.lastTokEnd,this.start));if(prevType===tt._else||prevType===tt.semi||prevType===tt.eof)return true;if(prevType==tt.braceL)return this.curContext()===types.b_stat;return!this.exprAllowed};pp.updateContext=function(prevType){var update=undefined,type=this.type;if(type.keyword&&prevType==tt.dot)this.exprAllowed=false;else if(update=type.updateContext)update.call(this,prevType);else this.exprAllowed=type.beforeExpr};tt.parenR.updateContext=tt.braceR.updateContext=function(){if(this.context.length==1){this.exprAllowed=true;return}var out=this.context.pop();if(out===types.b_stat&&this.curContext()===types.f_expr){this.context.pop();this.exprAllowed=false}else if(out===types.b_tmpl){this.exprAllowed=true}else{this.exprAllowed=!out.isExpr}};tt.braceL.updateContext=function(prevType){this.context.push(this.braceIsBlock(prevType)?types.b_stat:types.b_expr);this.exprAllowed=true};tt.dollarBraceL.updateContext=function(){this.context.push(types.b_tmpl);this.exprAllowed=true};tt.parenL.updateContext=function(prevType){var statementParens=prevType===tt._if||prevType===tt._for||prevType===tt._with||prevType===tt._while;this.context.push(statementParens?types.p_stat:types.p_expr);this.exprAllowed=true};tt.incDec.updateContext=function(){};tt._function.updateContext=function(){if(this.curContext()!==types.b_stat)this.context.push(types.f_expr);this.exprAllowed=false};tt.backQuote.updateContext=function(){if(this.curContext()===types.q_tmpl)this.context.pop();else this.context.push(types.q_tmpl);this.exprAllowed=false}},{"./state":13,"./tokentype":17,"./whitespace":19}],16:[function(_dereq_,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var _identifier=_dereq_("./identifier");var isIdentifierStart=_identifier.isIdentifierStart;var isIdentifierChar=_identifier.isIdentifierChar;var _tokentype=_dereq_("./tokentype");var tt=_tokentype.types;var keywordTypes=_tokentype.keywords;var Parser=_dereq_("./state").Parser;var SourceLocation=_dereq_("./location").SourceLocation;var _whitespace=_dereq_("./whitespace");var lineBreak=_whitespace.lineBreak;var lineBreakG=_whitespace.lineBreakG;var isNewLine=_whitespace.isNewLine;var nonASCIIwhitespace=_whitespace.nonASCIIwhitespace;var Token=exports.Token=function Token(p){_classCallCheck(this,Token);this.type=p.type;this.value=p.value;this.start=p.start;this.end=p.end;if(p.options.locations)this.loc=new SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};var pp=Parser.prototype;var isRhino=typeof Packages!=="undefined";pp.next=function(){if(this.options.onToken)this.options.onToken(new Token(this));this.lastTokEnd=this.end;this.lastTokStart=this.start;this.lastTokEndLoc=this.endLoc;this.lastTokStartLoc=this.startLoc;this.nextToken()};pp.getToken=function(){this.next();return new Token(this)};if(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===tt.eof,value:token}}}};pp.setStrict=function(strict){this.strict=strict;if(this.type!==tt.num&&this.type!==tt.string)return;this.pos=this.start;if(this.options.locations){while(this.pos<this.lineStart){this.lineStart=this.input.lastIndexOf("\n",this.lineStart-2)+1;--this.curLine}}this.nextToken()};pp.curContext=function(){return this.context[this.context.length-1]};pp.nextToken=function(){var curContext=this.curContext();if(!curContext||!curContext.preserveSpace)this.skipSpace();this.start=this.pos;if(this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(tt.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){if(isIdentifierStart(code,this.options.ecmaVersion>=6)||code===92)return this.readWord();return this.getTokenFromCode(code)};pp.fullCharCodeAtPos=function(){var code=this.input.charCodeAt(this.pos);if(code<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&this.curPosition();var start=this.pos,end=this.input.indexOf("*/",this.pos+=2);if(end===-1)this.raise(this.pos-2,"Unterminated comment");this.pos=end+2;if(this.options.locations){lineBreakG.lastIndex=start;var match=undefined;while((match=lineBreakG.exec(this.input))&&match.index<this.pos){++this.curLine;this.lineStart=match.index+match[0].length}}if(this.options.onComment)this.options.onComment(true,this.input.slice(start+2,end),start,this.pos,startLoc,this.options.locations&&this.curPosition())};pp.skipLineComment=function(startSkip){var start=this.pos;var startLoc=this.options.onComment&&this.options.locations&&this.curPosition();var ch=this.input.charCodeAt(this.pos+=startSkip);while(this.pos<this.input.length&&ch!==10&&ch!==13&&ch!==8232&&ch!==8233){++this.pos;ch=this.input.charCodeAt(this.pos)}if(this.options.onComment)this.options.onComment(false,this.input.slice(start+startSkip,this.pos),start,this.pos,startLoc,this.options.locations&&this.curPosition())};pp.skipSpace=function(){while(this.pos<this.input.length){var ch=this.input.charCodeAt(this.pos);if(ch===32){++this.pos}else if(ch===13){++this.pos;var next=this.input.charCodeAt(this.pos);if(next===10){++this.pos}if(this.options.locations){++this.curLine;this.lineStart=this.pos}}else if(ch===10||ch===8232||ch===8233){++this.pos;if(this.options.locations){++this.curLine;this.lineStart=this.pos}}else if(ch>8&&ch<14){++this.pos}else if(ch===47){var next=this.input.charCodeAt(this.pos+1);if(next===42){this.skipBlockComment()}else if(next===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};pp.finishToken=function(type,val){this.end=this.pos;if(this.options.locations)this.endLoc=this.curPosition();var prevType=this.type;this.type=type;this.value=val;this.updateContext(prevType)};pp.readToken_dot=function(){var next=this.input.charCodeAt(this.pos+1);if(next>=48&&next<=57)return this.readNumber(true);var next2=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&next===46&&next2===46){this.pos+=3;return this.finishToken(tt.ellipsis)}else{++this.pos;return this.finishToken(tt.dot)}};pp.readToken_slash=function(){var next=this.input.charCodeAt(this.pos+1);if(this.exprAllowed){++this.pos;return this.readRegexp()}if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.slash,1)};pp.readToken_mult_modulo=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(code===42?tt.star:tt.modulo,1)};pp.readToken_pipe_amp=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code)return this.finishOp(code===124?tt.logicalOR:tt.logicalAND,2);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(code===124?tt.bitwiseOR:tt.bitwiseAND,1)};pp.readToken_caret=function(){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.bitwiseXOR,1)};pp.readToken_plus_min=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code){if(next==45&&this.input.charCodeAt(this.pos+2)==62&&lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(tt.incDec,2)}if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.plusMin,1)};pp.readToken_lt_gt=function(code){var next=this.input.charCodeAt(this.pos+1);var size=1;if(next===code){size=code===62&&this.input.charCodeAt(this.pos+2)===62?3:2;if(this.input.charCodeAt(this.pos+size)===61)return this.finishOp(tt.assign,size+1);return this.finishOp(tt.bitShift,size)}if(next==33&&code==60&&this.input.charCodeAt(this.pos+2)==45&&this.input.charCodeAt(this.pos+3)==45){if(this.inModule)this.unexpected();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3:2;return this.finishOp(tt.relational,size)};pp.readToken_eq_excl=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(code===61&&next===62&&this.options.ecmaVersion>=6){this.pos+=2;return this.finishToken(tt.arrow)}return this.finishOp(code===61?tt.eq:tt.prefix,1)};pp.getTokenFromCode=function(code){switch(code){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(tt.parenL);case 41:++this.pos;return this.finishToken(tt.parenR);case 59:++this.pos;return this.finishToken(tt.semi);case 44:++this.pos;return this.finishToken(tt.comma);case 91:++this.pos;return this.finishToken(tt.bracketL);case 93:++this.pos;return this.finishToken(tt.bracketR);case 123:++this.pos;return this.finishToken(tt.braceL);case 125:++this.pos;return this.finishToken(tt.braceR);case 58:++this.pos;return this.finishToken(tt.colon);case 63:++this.pos;return this.finishToken(tt.question);case 96:if(this.options.ecmaVersion<6)break;++this.pos;return this.finishToken(tt.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(code);case 124:case 38:return this.readToken_pipe_amp(code);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(code);case 60:case 62:return this.readToken_lt_gt(code);case 61:case 33:return this.readToken_eq_excl(code);case 126:return this.finishOp(tt.prefix,1)}this.raise(this.pos,"Unexpected character '"+codePointToString(code)+"'")};pp.finishOp=function(type,size){var str=this.input.slice(this.pos,this.pos+size);this.pos+=size;return this.finishToken(type,str)};var regexpUnicodeSupport=false;try{new RegExp("","u");regexpUnicodeSupport=true}catch(e){}pp.readRegexp=function(){var escaped=undefined,inClass=undefined,start=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(start,"Unterminated regular expression");var ch=this.input.charAt(this.pos);if(lineBreak.test(ch))this.raise(start,"Unterminated regular expression");if(!escaped){if(ch==="[")inClass=true;else if(ch==="]"&&inClass)inClass=false;else if(ch==="/"&&!inClass)break;escaped=ch==="\\"}else escaped=false;++this.pos}var content=this.input.slice(start,this.pos);++this.pos;var mods=this.readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(this.options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}var value=null;if(!isRhino){try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)this.raise(start,"Error parsing regular expression: "+e.message);this.raise(e)}try{value=new RegExp(content,mods)}catch(err){}}return this.finishToken(tt.regexp,{pattern:content,flags:mods,value:value})};pp.readInt=function(radix,len){var start=this.pos,total=0;for(var i=0,e=len==null?Infinity:len;i<e;++i){var code=this.input.charCodeAt(this.pos),val=undefined;if(code>=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;else val=Infinity;if(val>=radix)break;++this.pos;total=total*radix+val}if(this.pos===start||len!=null&&this.pos-start!==len)return null;return total};pp.readRadixNumber=function(radix){this.pos+=2;var val=this.readInt(radix);if(val==null)this.raise(this.start+2,"Expected number in radix "+radix);if(isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(tt.num,val)};pp.readNumber=function(startsWithDot){var start=this.pos,isFloat=false,octal=this.input.charCodeAt(this.pos)===48;if(!startsWithDot&&this.readInt(10)===null)this.raise(start,"Invalid number");if(this.input.charCodeAt(this.pos)===46){++this.pos;this.readInt(10);isFloat=true}var next=this.input.charCodeAt(this.pos);if(next===69||next===101){next=this.input.charCodeAt(++this.pos);if(next===43||next===45)++this.pos;if(this.readInt(10)===null)this.raise(start,"Invalid number");isFloat=true}if(isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var str=this.input.slice(start,this.pos),val=undefined;if(isFloat)val=parseFloat(str);else if(!octal||str.length===1)val=parseInt(str,10);else if(/[89]/.test(str)||this.strict)this.raise(start,"Invalid number");else val=parseInt(str,8);return this.finishToken(tt.num,val); | |
};pp.readCodePoint=function(){var ch=this.input.charCodeAt(this.pos),code=undefined;if(ch===123){if(this.options.ecmaVersion<6)this.unexpected();++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(code>1114111)this.unexpected()}else{code=this.readHexChar(4)}return code};function codePointToString(code){if(code<=65535){return String.fromCharCode(code)}return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}pp.readString=function(quote){var out="",chunkStart=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var ch=this.input.charCodeAt(this.pos);if(ch===quote)break;if(ch===92){out+=this.input.slice(chunkStart,this.pos);out+=this.readEscapedChar();chunkStart=this.pos}else{if(isNewLine(ch))this.raise(this.start,"Unterminated string constant");++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};pp.readTmplToken=function(){var out="",chunkStart=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var ch=this.input.charCodeAt(this.pos);if(ch===96||ch===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&this.type===tt.template){if(ch===36){this.pos+=2;return this.finishToken(tt.dollarBraceL)}else{++this.pos;return this.finishToken(tt.backQuote)}}out+=this.input.slice(chunkStart,this.pos);return this.finishToken(tt.template,out)}if(ch===92){out+=this.input.slice(chunkStart,this.pos);out+=this.readEscapedChar();chunkStart=this.pos}else if(isNewLine(ch)){out+=this.input.slice(chunkStart,this.pos);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}};pp.readEscapedChar=function(){var ch=this.input.charCodeAt(++this.pos);var octal=/^[0-7]+/.exec(this.input.slice(this.pos,this.pos+3));if(octal)octal=octal[0];while(octal&&parseInt(octal,8)>255)octal=octal.slice(0,-1);if(octal==="0")octal=null;++this.pos;if(octal){if(this.strict)this.raise(this.pos-2,"Octal literal in strict mode");this.pos+=octal.length-1;return String.fromCharCode(parseInt(octal,8))}else{switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\x0B";case 102:return"\f";case 48:return"\x00";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";default:return String.fromCharCode(ch)}}};pp.readHexChar=function(len){var n=this.readInt(16,len);if(n===null)this.raise(this.start,"Bad character escape sequence");return n};var containsEsc;pp.readWord1=function(){containsEsc=false;var word="",first=true,chunkStart=this.pos;var astral=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var ch=this.fullCharCodeAtPos();if(isIdentifierChar(ch,astral)){this.pos+=ch<=65535?1:2}else if(ch===92){containsEsc=true;word+=this.input.slice(chunkStart,this.pos);var escStart=this.pos;if(this.input.charCodeAt(++this.pos)!=117)this.raise(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var esc=this.readCodePoint();if(!(first?isIdentifierStart:isIdentifierChar)(esc,astral))this.raise(escStart,"Invalid Unicode escape");word+=codePointToString(esc);chunkStart=this.pos}else{break}first=false}return word+this.input.slice(chunkStart,this.pos)};pp.readWord=function(){var word=this.readWord1();var type=tt.name;if((this.options.ecmaVersion>=6||!containsEsc)&&this.isKeyword(word))type=keywordTypes[word];return this.finishToken(type,word)}},{"./identifier":7,"./location":8,"./state":13,"./tokentype":17,"./whitespace":19}],17:[function(_dereq_,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var TokenType=exports.TokenType=function TokenType(label){var conf=arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};function binop(name,prec){return new TokenType(name,{beforeExpr:true,binop:prec})}var beforeExpr={beforeExpr:true},startsExpr={startsExpr:true};var types={num:new TokenType("num",startsExpr),regexp:new TokenType("regexp",startsExpr),string:new TokenType("string",startsExpr),name:new TokenType("name",startsExpr),eof:new TokenType("eof"),bracketL:new TokenType("[",{beforeExpr:true,startsExpr:true}),bracketR:new TokenType("]"),braceL:new TokenType("{",{beforeExpr:true,startsExpr:true}),braceR:new TokenType("}"),parenL:new TokenType("(",{beforeExpr:true,startsExpr:true}),parenR:new TokenType(")"),comma:new TokenType(",",beforeExpr),semi:new TokenType(";",beforeExpr),colon:new TokenType(":",beforeExpr),dot:new TokenType("."),question:new TokenType("?",beforeExpr),arrow:new TokenType("=>",beforeExpr),template:new TokenType("template"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:true,startsExpr:true}),eq:new TokenType("=",{beforeExpr:true,isAssign:true}),assign:new TokenType("_=",{beforeExpr:true,isAssign:true}),incDec:new TokenType("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new TokenType("prefix",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=",6),relational:binop("</>",7),bitShift:binop("<</>>",8),plusMin:new TokenType("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10)};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=arguments[1]===undefined?{}:arguments[1];options.keyword=name;keywords[name]=types["_"+name]=new TokenType(name,options)}kw("break");kw("case",beforeExpr);kw("catch");kw("continue");kw("debugger");kw("default");kw("do",{isLoop:true});kw("else",beforeExpr);kw("finally");kw("for",{isLoop:true});kw("function",startsExpr);kw("if");kw("return",beforeExpr);kw("switch");kw("throw",beforeExpr);kw("try");kw("var");kw("let");kw("const");kw("while",{isLoop:true});kw("with");kw("new",{beforeExpr:true,startsExpr:true});kw("this",startsExpr);kw("super",startsExpr);kw("class");kw("extends",beforeExpr);kw("export");kw("import");kw("yield",{beforeExpr:true,startsExpr:true});kw("null",startsExpr);kw("true",startsExpr);kw("false",startsExpr);kw("in",{beforeExpr:true,binop:7});kw("instanceof",{beforeExpr:true,binop:7});kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true});kw("void",{beforeExpr:true,prefix:true,startsExpr:true});kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})},{}],18:[function(_dereq_,module,exports){"use strict";exports.isArray=isArray;exports.has=has;exports.__esModule=true;function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}},{}],19:[function(_dereq_,module,exports){"use strict";exports.isNewLine=isNewLine;exports.__esModule=true;var lineBreak=/\r\n?|\n|\u2028|\u2029/;exports.lineBreak=lineBreak;var lineBreakG=new RegExp(lineBreak.source,"g");exports.lineBreakG=lineBreakG;function isNewLine(code){return code===10||code===13||code===8232||code==8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{}]},{},[1])(1)})}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],79:[function(require,module,exports){var hasOwn=Object.prototype.hasOwnProperty;var toString=Object.prototype.toString;module.exports=function forEach(obj,fn,ctx){if(toString.call(fn)!=="[object Function]"){throw new TypeError("iterator must be a function")}var l=obj.length;if(l===+l){for(var i=0;i<l;i++){fn.call(ctx,obj[i],i,obj)}}else{for(var k in obj){if(hasOwn.call(obj,k)){fn.call(ctx,obj[k],k,obj)}}}}},{}],80:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],81:[function(require,module,exports){"use strict";var has=Object.prototype.hasOwnProperty;var toStr=Object.prototype.toString;var slice=Array.prototype.slice;var isArgs=require("./isArguments");var hasDontEnumBug=!{toString:null}.propertyIsEnumerable("toString");var hasProtoEnumBug=function(){}.propertyIsEnumerable("prototype");var dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var equalsConstructorPrototype=function(o){var ctor=o.constructor;return ctor&&ctor.prototype===o};var blacklistedKeys={$console:true,$frame:true,$frameElement:true,$frames:true,$parent:true,$self:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$window:true};var hasAutomationEqualityBug=function(){if(typeof window==="undefined"){return false}for(var k in window){try{if(!blacklistedKeys["$"+k]&&has.call(window,k)&&window[k]!==null&&typeof window[k]==="object"){try{equalsConstructorPrototype(window[k])}catch(e){return true}}}catch(e){return true}}return false}();var equalsConstructorPrototypeIfNotBuggy=function(o){if(typeof window==="undefined"||!hasAutomationEqualityBug){return equalsConstructorPrototype(o)}try{return equalsConstructorPrototype(o)}catch(e){return false}};var keysShim=function keys(object){var isObject=object!==null&&typeof object==="object";var isFunction=toStr.call(object)==="[object Function]";var isArguments=isArgs(object);var isString=isObject&&toStr.call(object)==="[object String]";var theKeys=[];if(!isObject&&!isFunction&&!isArguments){throw new TypeError("Object.keys called on a non-object")}var skipProto=hasProtoEnumBug&&isFunction;if(isString&&object.length>0&&!has.call(object,0)){for(var i=0;i<object.length;++i){theKeys.push(String(i))}}if(isArguments&&object.length>0){for(var j=0;j<object.length;++j){theKeys.push(String(j))}}else{for(var name in object){if(!(skipProto&&name==="prototype")&&has.call(object,name)){theKeys.push(String(name))}}}if(hasDontEnumBug){var skipConstructor=equalsConstructorPrototypeIfNotBuggy(object);for(var k=0;k<dontEnums.length;++k){if(!(skipConstructor&&dontEnums[k]==="constructor")&&has.call(object,dontEnums[k])){theKeys.push(dontEnums[k])}}}return theKeys};keysShim.shim=function shimObjectKeys(){if(Object.keys){var keysWorksWithArguments=function(){return(Object.keys(arguments)||"").length===2}(1,2);if(!keysWorksWithArguments){var originalKeys=Object.keys;Object.keys=function keys(object){if(isArgs(object)){return originalKeys(slice.call(object))}else{return originalKeys(object)}}}}else{Object.keys=keysShim}return Object.keys||keysShim};module.exports=keysShim},{"./isArguments":82}],82:[function(require,module,exports){"use strict";var toStr=Object.prototype.toString;module.exports=function isArguments(value){var str=toStr.call(value);var isArgs=str==="[object Arguments]";if(!isArgs){isArgs=str!=="[object Array]"&&value!==null&&typeof value==="object"&&typeof value.length==="number"&&value.length>=0&&toStr.call(value.callee)==="[object Function]"}return isArgs}},{}],83:[function(require,module,exports){function get_beautify(js_beautify,css_beautify,html_beautify){var beautify=function(src,config){return js_beautify.js_beautify(src,config)};beautify.js=js_beautify.js_beautify;beautify.css=css_beautify.css_beautify;beautify.html=html_beautify.html_beautify;beautify.js_beautify=js_beautify.js_beautify;beautify.css_beautify=css_beautify.css_beautify;beautify.html_beautify=html_beautify.html_beautify;return beautify}if(typeof define==="function"&&define.amd){define(["./lib/beautify","./lib/beautify-css","./lib/beautify-html"],function(js_beautify,css_beautify,html_beautify){return get_beautify(js_beautify,css_beautify,html_beautify)})}else{(function(mod){var js_beautify=require("./lib/beautify");var css_beautify=require("./lib/beautify-css");var html_beautify=require("./lib/beautify-html");mod.exports=get_beautify(js_beautify,css_beautify,html_beautify)})(module)}},{"./lib/beautify":86,"./lib/beautify-css":84,"./lib/beautify-html":85}],84:[function(require,module,exports){(function(global){(function(){function css_beautify(source_text,options){options=options||{};source_text=source_text||"";source_text=source_text.replace(/\r\n|[\r\u2028\u2029]/g,"\n");var indentSize=options.indent_size||4;var indentCharacter=options.indent_char||" ";var selectorSeparatorNewline=options.selector_separator_newline===undefined?true:options.selector_separator_newline;var end_with_newline=options.end_with_newline===undefined?false:options.end_with_newline;var newline_between_rules=options.newline_between_rules===undefined?true:options.newline_between_rules;var eol=options.eol?options.eol:"\n";if(typeof indentSize==="string"){indentSize=parseInt(indentSize,10)}if(options.indent_with_tabs){indentCharacter=" ";indentSize=1}eol=eol.replace(/\\r/,"\r").replace(/\\n/,"\n");var whiteRe=/^\s+$/;var wordRe=/[\w$\-_]/;var pos=-1,ch;var parenLevel=0;function next(){ch=source_text.charAt(++pos);return ch||""}function peek(skipWhitespace){var result="";var prev_pos=pos;if(skipWhitespace){eatWhitespace()}result=source_text.charAt(pos+1)||"";pos=prev_pos-1;next();return result}function eatString(endChars){var start=pos;while(next()){if(ch==="\\"){next()}else if(endChars.indexOf(ch)!==-1){break}else if(ch==="\n"){break}}return source_text.substring(start,pos+1)}function peekString(endChar){var prev_pos=pos;var str=eatString(endChar);pos=prev_pos-1;next();return str}function eatWhitespace(){var result="";while(whiteRe.test(peek())){next();result+=ch}return result}function skipWhitespace(){var result="";if(ch&&whiteRe.test(ch)){result=ch}while(whiteRe.test(next())){result+=ch}return result}function eatComment(singleLine){var start=pos;singleLine=peek()==="/";next();while(next()){if(!singleLine&&ch==="*"&&peek()==="/"){next();break}else if(singleLine&&ch==="\n"){return source_text.substring(start,pos)}}return source_text.substring(start,pos)+ch}function lookBack(str){return source_text.substring(pos-str.length,pos).toLowerCase()===str}function foundNestedPseudoClass(){var openParen=0;for(var i=pos+1;i<source_text.length;i++){var ch=source_text.charAt(i);if(ch==="{"){return true}else if(ch==="("){openParen+=1}else if(ch===")"){if(openParen==0){return false}openParen-=1}else if(ch===";"||ch==="}"){return false}}return false}var basebaseIndentString=source_text.match(/^[\t ]*/)[0];var singleIndent=new Array(indentSize+1).join(indentCharacter);var indentLevel=0;var nestedLevel=0;function indent(){indentLevel++;basebaseIndentString+=singleIndent}function outdent(){indentLevel--;basebaseIndentString=basebaseIndentString.slice(0,-indentSize)}var print={};print["{"]=function(ch){print.singleSpace();output.push(ch);print.newLine()};print["}"]=function(ch){print.newLine();output.push(ch);print.newLine()};print._lastCharWhitespace=function(){return whiteRe.test(output[output.length-1])};print.newLine=function(keepWhitespace){if(output.length){if(!keepWhitespace&&output[output.length-1]!=="\n"){print.trim()}output.push("\n");if(basebaseIndentString){output.push(basebaseIndentString)}}};print.singleSpace=function(){if(output.length&&!print._lastCharWhitespace()){output.push(" ")}};print.preserveSingleSpace=function(){if(isAfterSpace){print.singleSpace()}};print.trim=function(){while(print._lastCharWhitespace()){output.pop()}};var output=[];var insideRule=false;var insidePropertyValue=false;var enteringConditionalGroup=false;var top_ch="";var last_top_ch="";while(true){var whitespace=skipWhitespace();var isAfterSpace=whitespace!=="";var isAfterNewline=whitespace.indexOf("\n")!==-1;last_top_ch=top_ch;top_ch=ch;if(!ch){break}else if(ch==="/"&&peek()==="*"){var header=indentLevel===0;if(isAfterNewline||header){print.newLine()}output.push(eatComment());print.newLine();if(header){print.newLine(true)}}else if(ch==="/"&&peek()==="/"){if(!isAfterNewline&&last_top_ch!=="{"){print.trim()}print.singleSpace();output.push(eatComment());print.newLine()}else if(ch==="@"){print.preserveSingleSpace();output.push(ch);var variableOrRule=peekString(": ,;{}()[]/='\"");if(variableOrRule.match(/[ :]$/)){next();variableOrRule=eatString(": ").replace(/\s$/,"");output.push(variableOrRule);print.singleSpace()}variableOrRule=variableOrRule.replace(/\s$/,"");if(variableOrRule in css_beautify.NESTED_AT_RULE){nestedLevel+=1;if(variableOrRule in css_beautify.CONDITIONAL_GROUP_RULE){enteringConditionalGroup=true}}}else if(ch==="#"&&peek()==="{"){print.preserveSingleSpace();output.push(eatString("}"))}else if(ch==="{"){if(peek(true)==="}"){eatWhitespace();next();print.singleSpace();output.push("{}");print.newLine();if(newline_between_rules&&indentLevel===0){print.newLine(true)}}else{indent();print["{"](ch);if(enteringConditionalGroup){enteringConditionalGroup=false;insideRule=indentLevel>nestedLevel}else{insideRule=indentLevel>=nestedLevel}}}else if(ch==="}"){outdent();print["}"](ch);insideRule=false;insidePropertyValue=false;if(nestedLevel){nestedLevel--}if(newline_between_rules&&indentLevel===0){print.newLine(true)}}else if(ch===":"){eatWhitespace();if((insideRule||enteringConditionalGroup)&&!(lookBack("&")||foundNestedPseudoClass())){insidePropertyValue=true;output.push(":");print.singleSpace()}else{if(peek()===":"){next();output.push("::")}else{output.push(":")}}}else if(ch==='"'||ch==="'"){print.preserveSingleSpace();output.push(eatString(ch))}else if(ch===";"){insidePropertyValue=false;output.push(ch);print.newLine()}else if(ch==="("){if(lookBack("url")){output.push(ch);eatWhitespace();if(next()){if(ch!==")"&&ch!=='"'&&ch!=="'"){output.push(eatString(")"))}else{pos--}}}else{parenLevel++;print.preserveSingleSpace();output.push(ch);eatWhitespace()}}else if(ch===")"){output.push(ch);parenLevel--}else if(ch===","){output.push(ch);eatWhitespace();if(selectorSeparatorNewline&&!insidePropertyValue&&parenLevel<1){print.newLine()}else{print.singleSpace()}}else if(ch==="]"){output.push(ch)}else if(ch==="["){print.preserveSingleSpace();output.push(ch)}else if(ch==="="){eatWhitespace();ch="=";output.push(ch)}else{print.preserveSingleSpace();output.push(ch)}}var sweetCode="";if(basebaseIndentString){sweetCode+=basebaseIndentString}sweetCode+=output.join("").replace(/[\r\n\t ]+$/,"");if(end_with_newline){sweetCode+="\n"}if(eol!="\n"){sweetCode=sweetCode.replace(/[\n]/g,eol)}return sweetCode}css_beautify.NESTED_AT_RULE={"@page":true,"@font-face":true,"@keyframes":true,"@media":true,"@supports":true,"@document":true};css_beautify.CONDITIONAL_GROUP_RULE={"@media":true,"@supports":true,"@document":true};if(typeof define==="function"&&define.amd){define([],function(){return{css_beautify:css_beautify}})}else if(typeof exports!=="undefined"){exports.css_beautify=css_beautify}else if(typeof window!=="undefined"){window.css_beautify=css_beautify}else if(typeof global!=="undefined"){global.css_beautify=css_beautify}})()}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],85:[function(require,module,exports){(function(global){(function(){function trim(s){return s.replace(/^\s+|\s+$/g,"")}function ltrim(s){return s.replace(/^\s+/g,"")}function rtrim(s){return s.replace(/\s+$/g,"")}function style_html(html_source,options,js_beautify,css_beautify){var multi_parser,indent_inner_html,indent_size,indent_character,wrap_line_length,brace_style,unformatted,preserve_newlines,max_preserve_newlines,indent_handlebars,wrap_attributes,wrap_attributes_indent_size,end_with_newline,extra_liners,eol;options=options||{};if((options.wrap_line_length===undefined||parseInt(options.wrap_line_length,10)===0)&&(options.max_char!==undefined&&parseInt(options.max_char,10)!==0)){options.wrap_line_length=options.max_char}indent_inner_html=options.indent_inner_html===undefined?false:options.indent_inner_html;indent_size=options.indent_size===undefined?4:parseInt(options.indent_size,10);indent_character=options.indent_char===undefined?" ":options.indent_char;brace_style=options.brace_style===undefined?"collapse":options.brace_style;wrap_line_length=parseInt(options.wrap_line_length,10)===0?32786:parseInt(options.wrap_line_length||250,10);unformatted=options.unformatted||["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","address","big","dt","ins","small","strike","tt","pre","h1","h2","h3","h4","h5","h6"];preserve_newlines=options.preserve_newlines===undefined?true:options.preserve_newlines;max_preserve_newlines=preserve_newlines?isNaN(parseInt(options.max_preserve_newlines,10))?32786:parseInt(options.max_preserve_newlines,10):0;indent_handlebars=options.indent_handlebars===undefined?false:options.indent_handlebars;wrap_attributes=options.wrap_attributes===undefined?"auto":options.wrap_attributes;wrap_attributes_indent_size=isNaN(parseInt(options.wrap_attributes_indent_size,10))?indent_size:parseInt(options.wrap_attributes_indent_size,10);end_with_newline=options.end_with_newline===undefined?false:options.end_with_newline;extra_liners=typeof options.extra_liners=="object"&&options.extra_liners?options.extra_liners.concat():typeof options.extra_liners==="string"?options.extra_liners.split(","):"head,body,/html".split(",");eol=options.eol?options.eol:"\n";if(options.indent_with_tabs){indent_character=" ";indent_size=1}eol=eol.replace(/\\r/,"\r").replace(/\\n/,"\n");function Parser(){this.pos=0;this.token="";this.current_mode="CONTENT";this.tags={parent:"parent1",parentcount:1,parent1:""};this.tag_type="";this.token_text=this.last_token=this.last_text=this.token_type="";this.newlines=0;this.indent_content=indent_inner_html;this.Utils={whitespace:"\n\r ".split(""),single_token:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","?php","basefont","isindex"],extra_liners:extra_liners,in_array:function(what,arr){for(var i=0;i<arr.length;i++){if(what===arr[i]){return true}}return false}};this.is_whitespace=function(text){for(var n=0;n<text.length;n++){if(!this.Utils.in_array(text.charAt(n),this.Utils.whitespace)){return false}}return true};this.traverse_whitespace=function(){var input_char="";input_char=this.input.charAt(this.pos);if(this.Utils.in_array(input_char,this.Utils.whitespace)){this.newlines=0;while(this.Utils.in_array(input_char,this.Utils.whitespace)){if(preserve_newlines&&input_char==="\n"&&this.newlines<=max_preserve_newlines){this.newlines+=1}this.pos++;input_char=this.input.charAt(this.pos)}return true}return false};this.space_or_wrap=function(content){if(this.line_char_count>=this.wrap_line_length){this.print_newline(false,content);this.print_indentation(content);return true}else{this.line_char_count++;content.push(" ");return false}};this.get_content=function(){var input_char="",content=[],space=false;while(this.input.charAt(this.pos)!=="<"){if(this.pos>=this.input.length){return content.length?content.join(""):["","TK_EOF"]}if(this.traverse_whitespace()){this.space_or_wrap(content);continue}if(indent_handlebars){var peek3=this.input.substr(this.pos,3);if(peek3==="{{#"||peek3==="{{/"){break}else if(peek3==="{{!"){return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"]}else if(this.input.substr(this.pos,2)==="{{"){if(this.get_tag(true)==="{{else}}"){break}}}input_char=this.input.charAt(this.pos);this.pos++;this.line_char_count++;content.push(input_char)}return content.length?content.join(""):""};this.get_contents_to=function(name){if(this.pos===this.input.length){return["","TK_EOF"]}var input_char="";var content="";var reg_match=new RegExp("</"+name+"\\s*>","igm");reg_match.lastIndex=this.pos;var reg_array=reg_match.exec(this.input);var end_script=reg_array?reg_array.index:this.input.length;if(this.pos<end_script){content=this.input.substring(this.pos,end_script);this.pos=end_script}return content};this.record_tag=function(tag){if(this.tags[tag+"count"]){this.tags[tag+"count"]++;this.tags[tag+this.tags[tag+"count"]]=this.indent_level}else{this.tags[tag+"count"]=1;this.tags[tag+this.tags[tag+"count"]]=this.indent_level}this.tags[tag+this.tags[tag+"count"]+"parent"]=this.tags.parent;this.tags.parent=tag+this.tags[tag+"count"]};this.retrieve_tag=function(tag){if(this.tags[tag+"count"]){var temp_parent=this.tags.parent;while(temp_parent){if(tag+this.tags[tag+"count"]===temp_parent){break}temp_parent=this.tags[temp_parent+"parent"]}if(temp_parent){this.indent_level=this.tags[tag+this.tags[tag+"count"]];this.tags.parent=this.tags[temp_parent+"parent"]}delete this.tags[tag+this.tags[tag+"count"]+"parent"];delete this.tags[tag+this.tags[tag+"count"]];if(this.tags[tag+"count"]===1){delete this.tags[tag+"count"]}else{this.tags[tag+"count"]--}}};this.indent_to_tag=function(tag){if(!this.tags[tag+"count"]){return}var temp_parent=this.tags.parent;while(temp_parent){if(tag+this.tags[tag+"count"]===temp_parent){break}temp_parent=this.tags[temp_parent+"parent"]}if(temp_parent){this.indent_level=this.tags[tag+this.tags[tag+"count"]]}};this.get_tag=function(peek){var input_char="",content=[],comment="",space=false,first_attr=true,tag_start,tag_end,tag_start_char,orig_pos=this.pos,orig_line_char_count=this.line_char_count;peek=peek!==undefined?peek:false;do{if(this.pos>=this.input.length){if(peek){this.pos=orig_pos;this.line_char_count=orig_line_char_count}return content.length?content.join(""):["","TK_EOF"]}input_char=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(input_char,this.Utils.whitespace)){space=true;continue}if(input_char==="'"||input_char==='"'){input_char+=this.get_unformatted(input_char);space=true}if(input_char==="="){space=false}if(content.length&&content[content.length-1]!=="="&&input_char!==">"&&space){var wrapped=this.space_or_wrap(content);var indentAttrs=wrapped&&input_char!=="/"&&wrap_attributes!=="force";space=false;if(!first_attr&&wrap_attributes==="force"&&input_char!=="/"){this.print_newline(false,content);this.print_indentation(content);indentAttrs=true}if(indentAttrs){for(var count=0;count<wrap_attributes_indent_size;count++){content.push(indent_character)}}for(var i=0;i<content.length;i++){if(content[i]===" "){first_attr=false;break}}}if(indent_handlebars&&tag_start_char==="<"){if(input_char+this.input.charAt(this.pos)==="{{"){input_char+=this.get_unformatted("}}");if(content.length&&content[content.length-1]!==" "&&content[content.length-1]!=="<"){input_char=" "+input_char}space=true}}if(input_char==="<"&&!tag_start_char){tag_start=this.pos-1;tag_start_char="<"}if(indent_handlebars&&!tag_start_char){if(content.length>=2&&content[content.length-1]==="{"&&content[content.length-2]==="{"){if(input_char==="#"||input_char==="/"||input_char==="!"){tag_start=this.pos-3}else{tag_start=this.pos-2}tag_start_char="{"}}this.line_char_count++;content.push(input_char);if(content[1]&&(content[1]==="!"||content[1]==="?"||content[1]==="%")){content=[this.get_comment(tag_start)];break}if(indent_handlebars&&content[1]&&content[1]==="{"&&content[2]&&content[2]==="!"){content=[this.get_comment(tag_start)];break}if(indent_handlebars&&tag_start_char==="{"&&content.length>2&&content[content.length-2]==="}"&&content[content.length-1]==="}"){break}}while(input_char!==">");var tag_complete=content.join("");var tag_index;var tag_offset;if(tag_complete.indexOf(" ")!==-1){tag_index=tag_complete.indexOf(" ")}else if(tag_complete.charAt(0)==="{"){tag_index=tag_complete.indexOf("}")}else{tag_index=tag_complete.indexOf(">")}if(tag_complete.charAt(0)==="<"||!indent_handlebars){tag_offset=1}else{tag_offset=tag_complete.charAt(2)==="#"?3:2}var tag_check=tag_complete.substring(tag_offset,tag_index).toLowerCase();if(tag_complete.charAt(tag_complete.length-2)==="/"||this.Utils.in_array(tag_check,this.Utils.single_token)){if(!peek){this.tag_type="SINGLE"}}else if(indent_handlebars&&tag_complete.charAt(0)==="{"&&tag_check==="else"){if(!peek){this.indent_to_tag("if");this.tag_type="HANDLEBARS_ELSE";this.indent_content=true;this.traverse_whitespace()}}else if(this.is_unformatted(tag_check,unformatted)){comment=this.get_unformatted("</"+tag_check+">",tag_complete);content.push(comment);tag_end=this.pos-1;this.tag_type="SINGLE"}else if(tag_check==="script"&&(tag_complete.search("type")===-1||tag_complete.search("type")>-1&&tag_complete.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json)/)>-1)){if(!peek){this.record_tag(tag_check);this.tag_type="SCRIPT"}}else if(tag_check==="style"&&(tag_complete.search("type")===-1||tag_complete.search("type")>-1&&tag_complete.search("text/css")>-1)){if(!peek){this.record_tag(tag_check);this.tag_type="STYLE"}}else if(tag_check.charAt(0)==="!"){if(!peek){this.tag_type="SINGLE";this.traverse_whitespace()}}else if(!peek){if(tag_check.charAt(0)==="/"){this.retrieve_tag(tag_check.substring(1));this.tag_type="END"}else{this.record_tag(tag_check);if(tag_check.toLowerCase()!=="html"){this.indent_content=true}this.tag_type="START"}if(this.traverse_whitespace()){this.space_or_wrap(content)}if(this.Utils.in_array(tag_check,this.Utils.extra_liners)){this.print_newline(false,this.output);if(this.output.length&&this.output[this.output.length-2]!=="\n"){this.print_newline(true,this.output)}}}if(peek){this.pos=orig_pos;this.line_char_count=orig_line_char_count}return content.join("")};this.get_comment=function(start_pos){var comment="",delimiter=">",matched=false;this.pos=start_pos;var input_char=this.input.charAt(this.pos);this.pos++;while(this.pos<=this.input.length){comment+=input_char;if(comment.charAt(comment.length-1)===delimiter.charAt(delimiter.length-1)&&comment.indexOf(delimiter)!==-1){break}if(!matched&&comment.length<10){if(comment.indexOf("<![if")===0){delimiter="<![endif]>";matched=true}else if(comment.indexOf("<![cdata[")===0){delimiter="]]>";matched=true}else if(comment.indexOf("<![")===0){delimiter="]>";matched=true}else if(comment.indexOf("<!--")===0){delimiter="-->";matched=true}else if(comment.indexOf("{{!")===0){delimiter="}}";matched=true}else if(comment.indexOf("<?")===0){delimiter="?>";matched=true}else if(comment.indexOf("<%")===0){delimiter="%>";matched=true}}input_char=this.input.charAt(this.pos);this.pos++}return comment};function tokenMatcher(delimiter){var token="";var add=function(str){var newToken=token+str.toLowerCase();token=newToken.length<=delimiter.length?newToken:newToken.substr(newToken.length-delimiter.length,delimiter.length)};var doesNotMatch=function(){return token.indexOf(delimiter)===-1};return{add:add,doesNotMatch:doesNotMatch}}this.get_unformatted=function(delimiter,orig_tag){if(orig_tag&&orig_tag.toLowerCase().indexOf(delimiter)!==-1){return""}var input_char="";var content="";var space=true;var delimiterMatcher=tokenMatcher(delimiter);do{if(this.pos>=this.input.length){return content}input_char=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(input_char,this.Utils.whitespace)){if(!space){this.line_char_count--;continue}if(input_char==="\n"||input_char==="\r"){content+="\n";this.line_char_count=0;continue}}content+=input_char;delimiterMatcher.add(input_char);this.line_char_count++;space=true;if(indent_handlebars&&input_char==="{"&&content.length&&content.charAt(content.length-2)==="{"){content+=this.get_unformatted("}}"); | |
}}while(delimiterMatcher.doesNotMatch());return content};this.get_token=function(){var token;if(this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"){var type=this.last_token.substr(7);token=this.get_contents_to(type);if(typeof token!=="string"){return token}return[token,"TK_"+type]}if(this.current_mode==="CONTENT"){token=this.get_content();if(typeof token!=="string"){return token}else{return[token,"TK_CONTENT"]}}if(this.current_mode==="TAG"){token=this.get_tag();if(typeof token!=="string"){return token}else{var tag_name_type="TK_TAG_"+this.tag_type;return[token,tag_name_type]}}};this.get_full_indent=function(level){level=this.indent_level+level||0;if(level<1){return""}return Array(level+1).join(this.indent_string)};this.is_unformatted=function(tag_check,unformatted){if(!this.Utils.in_array(tag_check,unformatted)){return false}if(tag_check.toLowerCase()!=="a"||!this.Utils.in_array("a",unformatted)){return true}var next_tag=this.get_tag(true);var tag=(next_tag||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);if(!tag||this.Utils.in_array(tag,unformatted)){return true}else{return false}};this.printer=function(js_source,indent_character,indent_size,wrap_line_length,brace_style){this.input=js_source||"";this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n");this.output=[];this.indent_character=indent_character;this.indent_string="";this.indent_size=indent_size;this.brace_style=brace_style;this.indent_level=0;this.wrap_line_length=wrap_line_length;this.line_char_count=0;for(var i=0;i<this.indent_size;i++){this.indent_string+=this.indent_character}this.print_newline=function(force,arr){this.line_char_count=0;if(!arr||!arr.length){return}if(force||arr[arr.length-1]!=="\n"){if(arr[arr.length-1]!=="\n"){arr[arr.length-1]=rtrim(arr[arr.length-1])}arr.push("\n")}};this.print_indentation=function(arr){for(var i=0;i<this.indent_level;i++){arr.push(this.indent_string);this.line_char_count+=this.indent_string.length}};this.print_token=function(text){if(this.is_whitespace(text)&&!this.output.length){return}if(text||text!==""){if(this.output.length&&this.output[this.output.length-1]==="\n"){this.print_indentation(this.output);text=ltrim(text)}}this.print_token_raw(text)};this.print_token_raw=function(text){if(this.newlines>0){text=rtrim(text)}if(text&&text!==""){if(text.length>1&&text.charAt(text.length-1)==="\n"){this.output.push(text.slice(0,-1));this.print_newline(false,this.output)}else{this.output.push(text)}}for(var n=0;n<this.newlines;n++){this.print_newline(n>0,this.output)}this.newlines=0};this.indent=function(){this.indent_level++};this.unindent=function(){if(this.indent_level>0){this.indent_level--}}};return this}multi_parser=new Parser;multi_parser.printer(html_source,indent_character,indent_size,wrap_line_length,brace_style);while(true){var t=multi_parser.get_token();multi_parser.token_text=t[0];multi_parser.token_type=t[1];if(multi_parser.token_type==="TK_EOF"){break}switch(multi_parser.token_type){case"TK_TAG_START":multi_parser.print_newline(false,multi_parser.output);multi_parser.print_token(multi_parser.token_text);if(multi_parser.indent_content){multi_parser.indent();multi_parser.indent_content=false}multi_parser.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":multi_parser.print_newline(false,multi_parser.output);multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="CONTENT";break;case"TK_TAG_END":if(multi_parser.last_token==="TK_CONTENT"&&multi_parser.last_text===""){var tag_name=multi_parser.token_text.match(/\w+/)[0];var tag_extracted_from_last_output=null;if(multi_parser.output.length){tag_extracted_from_last_output=multi_parser.output[multi_parser.output.length-1].match(/(?:<|{{#)\s*(\w+)/)}if(tag_extracted_from_last_output===null||tag_extracted_from_last_output[1]!==tag_name&&!multi_parser.Utils.in_array(tag_extracted_from_last_output[1],unformatted)){multi_parser.print_newline(false,multi_parser.output)}}multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var tag_check=multi_parser.token_text.match(/^\s*<([a-z-]+)/i);if(!tag_check||!multi_parser.Utils.in_array(tag_check[1],unformatted)){multi_parser.print_newline(false,multi_parser.output)}multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":var foundIfOnCurrentLine=false;for(var lastCheckedOutput=multi_parser.output.length-1;lastCheckedOutput>=0;lastCheckedOutput--){if(multi_parser.output[lastCheckedOutput]==="\n"){break}else{if(multi_parser.output[lastCheckedOutput].match(/{{#if/)){foundIfOnCurrentLine=true;break}}}if(!foundIfOnCurrentLine){multi_parser.print_newline(false,multi_parser.output)}multi_parser.print_token(multi_parser.token_text);if(multi_parser.indent_content){multi_parser.indent();multi_parser.indent_content=false}multi_parser.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="TAG";break;case"TK_CONTENT":multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(multi_parser.token_text!==""){multi_parser.print_newline(false,multi_parser.output);var text=multi_parser.token_text,_beautifier,script_indent_level=1;if(multi_parser.token_type==="TK_SCRIPT"){_beautifier=typeof js_beautify==="function"&&js_beautify}else if(multi_parser.token_type==="TK_STYLE"){_beautifier=typeof css_beautify==="function"&&css_beautify}if(options.indent_scripts==="keep"){script_indent_level=0}else if(options.indent_scripts==="separate"){script_indent_level=-multi_parser.indent_level}var indentation=multi_parser.get_full_indent(script_indent_level);if(_beautifier){var Child_options=function(){this.eol="\n"};Child_options.prototype=options;var child_options=new Child_options;text=_beautifier(text.replace(/^\s*/,indentation),child_options)}else{var white=text.match(/^\s*/)[0];var _level=white.match(/[^\n\r]*$/)[0].split(multi_parser.indent_string).length-1;var reindent=multi_parser.get_full_indent(script_indent_level-_level);text=text.replace(/^\s*/,indentation).replace(/\r\n|\r|\n/g,"\n"+reindent).replace(/\s+$/,"")}if(text){multi_parser.print_token_raw(text);multi_parser.print_newline(true,multi_parser.output)}}multi_parser.current_mode="TAG";break;default:if(multi_parser.token_text!==""){multi_parser.print_token(multi_parser.token_text)}break}multi_parser.last_token=multi_parser.token_type;multi_parser.last_text=multi_parser.token_text}var sweet_code=multi_parser.output.join("").replace(/[\r\n\t ]+$/,"");if(end_with_newline){sweet_code+="\n"}if(eol!="\n"){sweet_code=sweet_code.replace(/[\n]/g,eol)}return sweet_code}if(typeof define==="function"&&define.amd){define(["require","./beautify","./beautify-css"],function(requireamd){var js_beautify=requireamd("./beautify");var css_beautify=requireamd("./beautify-css");return{html_beautify:function(html_source,options){return style_html(html_source,options,js_beautify.js_beautify,css_beautify.css_beautify)}}})}else if(typeof exports!=="undefined"){var js_beautify=require("./beautify.js");var css_beautify=require("./beautify-css.js");exports.html_beautify=function(html_source,options){return style_html(html_source,options,js_beautify.js_beautify,css_beautify.css_beautify)}}else if(typeof window!=="undefined"){window.html_beautify=function(html_source,options){return style_html(html_source,options,window.js_beautify,window.css_beautify)}}else if(typeof global!=="undefined"){global.html_beautify=function(html_source,options){return style_html(html_source,options,global.js_beautify,global.css_beautify)}}})()}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./beautify-css.js":84,"./beautify.js":86}],86:[function(require,module,exports){(function(global){(function(){var acorn={};(function(exports){var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var nonASCIIidentifierChars="̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");var newline=exports.newline=/[\n\r\u2028\u2029]/;var lineBreak=exports.lineBreak=/\r\n|[\n\r\u2028\u2029]/;var allLineBreaks=exports.allLineBreaks=new RegExp(lineBreak.source,"g");var isIdentifierStart=exports.isIdentifierStart=function(code){if(code<65)return code===36||code===64;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code))};var isIdentifierChar=exports.isIdentifierChar=function(code){if(code<48)return code===36;if(code<58)return true;if(code<65)return false;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code))}})(acorn);function in_array(what,arr){for(var i=0;i<arr.length;i+=1){if(arr[i]===what){return true}}return false}function trim(s){return s.replace(/^\s+|\s+$/g,"")}function ltrim(s){return s.replace(/^\s+/g,"")}function rtrim(s){return s.replace(/\s+$/g,"")}function js_beautify(js_source_text,options){"use strict";var beautifier=new Beautifier(js_source_text,options);return beautifier.beautify()}var MODE={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Beautifier(js_source_text,options){"use strict";var output;var tokens=[],token_pos;var Tokenizer;var current_token;var last_type,last_last_text,indent_string;var flags,previous_flags,flag_store;var prefix;var handlers,opt;var baseIndentString="";handlers={TK_START_EXPR:handle_start_expr,TK_END_EXPR:handle_end_expr,TK_START_BLOCK:handle_start_block,TK_END_BLOCK:handle_end_block,TK_WORD:handle_word,TK_RESERVED:handle_word,TK_SEMICOLON:handle_semicolon,TK_STRING:handle_string,TK_EQUALS:handle_equals,TK_OPERATOR:handle_operator,TK_COMMA:handle_comma,TK_BLOCK_COMMENT:handle_block_comment,TK_COMMENT:handle_comment,TK_DOT:handle_dot,TK_UNKNOWN:handle_unknown,TK_EOF:handle_eof};function create_flags(flags_base,mode){var next_indent_level=0;if(flags_base){next_indent_level=flags_base.indentation_level;if(!output.just_added_newline()&&flags_base.line_indent_level>next_indent_level){next_indent_level=flags_base.line_indent_level}}var next_flags={mode:mode,parent:flags_base,last_text:flags_base?flags_base.last_text:"",last_word:flags_base?flags_base.last_word:"",declaration_statement:false,declaration_assignment:false,multiline_frame:false,inline_frame:false,if_block:false,else_block:false,do_block:false,do_while:false,import_block:false,in_case_statement:false,in_case:false,case_body:false,indentation_level:next_indent_level,line_indent_level:flags_base?flags_base.line_indent_level:next_indent_level,start_line_index:output.get_line_number(),ternary_depth:0};return next_flags}options=options?options:{};opt={};if(options.braces_on_own_line!==undefined){opt.brace_style=options.braces_on_own_line?"expand":"collapse"}opt.brace_style=options.brace_style?options.brace_style:opt.brace_style?opt.brace_style:"collapse";if(opt.brace_style==="expand-strict"){opt.brace_style="expand"}opt.indent_size=options.indent_size?parseInt(options.indent_size,10):4;opt.indent_char=options.indent_char?options.indent_char:" ";opt.eol=options.eol?options.eol:"auto";opt.preserve_newlines=options.preserve_newlines===undefined?true:options.preserve_newlines;opt.break_chained_methods=options.break_chained_methods===undefined?false:options.break_chained_methods;opt.max_preserve_newlines=options.max_preserve_newlines===undefined?0:parseInt(options.max_preserve_newlines,10);opt.space_in_paren=options.space_in_paren===undefined?false:options.space_in_paren;opt.space_in_empty_paren=options.space_in_empty_paren===undefined?false:options.space_in_empty_paren;opt.jslint_happy=options.jslint_happy===undefined?false:options.jslint_happy;opt.space_after_anon_function=options.space_after_anon_function===undefined?false:options.space_after_anon_function;opt.keep_array_indentation=options.keep_array_indentation===undefined?false:options.keep_array_indentation;opt.space_before_conditional=options.space_before_conditional===undefined?true:options.space_before_conditional;opt.unescape_strings=options.unescape_strings===undefined?false:options.unescape_strings;opt.wrap_line_length=options.wrap_line_length===undefined?0:parseInt(options.wrap_line_length,10);opt.e4x=options.e4x===undefined?false:options.e4x;opt.end_with_newline=options.end_with_newline===undefined?false:options.end_with_newline;opt.comma_first=options.comma_first===undefined?false:options.comma_first;opt.test_output_raw=options.test_output_raw===undefined?false:options.test_output_raw;if(opt.jslint_happy){opt.space_after_anon_function=true}if(options.indent_with_tabs){opt.indent_char=" ";opt.indent_size=1}if(opt.eol==="auto"){opt.eol="\n";if(js_source_text&&acorn.lineBreak.test(js_source_text||"")){opt.eol=js_source_text.match(acorn.lineBreak)[0]}}opt.eol=opt.eol.replace(/\\r/,"\r").replace(/\\n/,"\n");indent_string="";while(opt.indent_size>0){indent_string+=opt.indent_char;opt.indent_size-=1}var preindent_index=0;if(js_source_text&&js_source_text.length){while(js_source_text.charAt(preindent_index)===" "||js_source_text.charAt(preindent_index)===" "){baseIndentString+=js_source_text.charAt(preindent_index);preindent_index+=1}js_source_text=js_source_text.substring(preindent_index)}last_type="TK_START_BLOCK";last_last_text="";output=new Output(indent_string,baseIndentString);output.raw=opt.test_output_raw;flag_store=[];set_mode(MODE.BlockStatement);this.beautify=function(){var local_token,sweet_code;Tokenizer=new tokenizer(js_source_text,opt,indent_string);tokens=Tokenizer.tokenize();token_pos=0;while(local_token=get_token()){for(var i=0;i<local_token.comments_before.length;i++){handle_token(local_token.comments_before[i])}handle_token(local_token);last_last_text=flags.last_text;last_type=local_token.type;flags.last_text=local_token.text;token_pos+=1}sweet_code=output.get_code();if(opt.end_with_newline){sweet_code+="\n"}if(opt.eol!="\n"){sweet_code=sweet_code.replace(/[\n]/g,opt.eol)}return sweet_code};function handle_token(local_token){var newlines=local_token.newlines;var keep_whitespace=opt.keep_array_indentation&&is_array(flags.mode);if(keep_whitespace){for(i=0;i<newlines;i+=1){print_newline(i>0)}}else{if(opt.max_preserve_newlines&&newlines>opt.max_preserve_newlines){newlines=opt.max_preserve_newlines}if(opt.preserve_newlines){if(local_token.newlines>1){print_newline();for(var i=1;i<newlines;i+=1){print_newline(true)}}}}current_token=local_token;handlers[current_token.type]()}function split_linebreaks(s){s=s.replace(acorn.allLineBreaks,"\n");var out=[],idx=s.indexOf("\n");while(idx!==-1){out.push(s.substring(0,idx));s=s.substring(idx+1);idx=s.indexOf("\n")}if(s.length){out.push(s)}return out}var newline_restricted_tokens=["break","contiue","return","throw"];function allow_wrap_or_preserved_newline(force_linewrap){force_linewrap=force_linewrap===undefined?false:force_linewrap;if(output.just_added_newline()){return}if(opt.preserve_newlines&¤t_token.wanted_newline||force_linewrap){print_newline(false,true)}else if(opt.wrap_line_length){if(last_type==="TK_RESERVED"&&in_array(flags.last_text,newline_restricted_tokens)){return}var proposed_line_length=output.current_line.get_character_count()+current_token.text.length+(output.space_before_token?1:0);if(proposed_line_length>=opt.wrap_line_length){print_newline(false,true)}}}function print_newline(force_newline,preserve_statement_flags){if(!preserve_statement_flags){if(flags.last_text!==";"&&flags.last_text!==","&&flags.last_text!=="="&&last_type!=="TK_OPERATOR"){while(flags.mode===MODE.Statement&&!flags.if_block&&!flags.do_block){restore_mode()}}}if(output.add_new_line(force_newline)){flags.multiline_frame=true}}function print_token_line_indentation(){if(output.just_added_newline()){if(opt.keep_array_indentation&&is_array(flags.mode)&¤t_token.wanted_newline){output.current_line.push(current_token.whitespace_before);output.space_before_token=false}else if(output.set_indent(flags.indentation_level)){flags.line_indent_level=flags.indentation_level}}}function print_token(printable_token){if(output.raw){output.add_raw_token(current_token);return}if(opt.comma_first&&last_type==="TK_COMMA"&&output.just_added_newline()){if(output.previous_line.last()===","){var popped=output.previous_line.pop();if(output.previous_line.is_empty()){output.previous_line.push(popped);output.trim(true);output.current_line.pop();output.trim()}print_token_line_indentation();output.add_token(",");output.space_before_token=true}}printable_token=printable_token||current_token.text;print_token_line_indentation();output.add_token(printable_token)}function indent(){flags.indentation_level+=1}function deindent(){if(flags.indentation_level>0&&(!flags.parent||flags.indentation_level>flags.parent.indentation_level))flags.indentation_level-=1}function set_mode(mode){if(flags){flag_store.push(flags);previous_flags=flags}else{previous_flags=create_flags(null,mode)}flags=create_flags(previous_flags,mode)}function is_array(mode){return mode===MODE.ArrayLiteral}function is_expression(mode){return in_array(mode,[MODE.Expression,MODE.ForInitializer,MODE.Conditional])}function restore_mode(){if(flag_store.length>0){previous_flags=flags;flags=flag_store.pop();if(previous_flags.mode===MODE.Statement){output.remove_redundant_indentation(previous_flags)}}}function start_of_object_property(){return flags.parent.mode===MODE.ObjectLiteral&&flags.mode===MODE.Statement&&(flags.last_text===":"&&flags.ternary_depth===0||last_type==="TK_RESERVED"&&in_array(flags.last_text,["get","set"]))}function start_of_statement(){if(last_type==="TK_RESERVED"&&in_array(flags.last_text,["var","let","const"])&¤t_token.type==="TK_WORD"||last_type==="TK_RESERVED"&&flags.last_text==="do"||last_type==="TK_RESERVED"&&in_array(flags.last_text,["return","throw"])&&!current_token.wanted_newline||last_type==="TK_RESERVED"&&flags.last_text==="else"&&!(current_token.type==="TK_RESERVED"&¤t_token.text==="if")||last_type==="TK_END_EXPR"&&(previous_flags.mode===MODE.ForInitializer||previous_flags.mode===MODE.Conditional)||last_type==="TK_WORD"&&flags.mode===MODE.BlockStatement&&!flags.in_case&&!(current_token.text==="--"||current_token.text==="++")&&last_last_text!=="function"&¤t_token.type!=="TK_WORD"&¤t_token.type!=="TK_RESERVED"||flags.mode===MODE.ObjectLiteral&&(flags.last_text===":"&&flags.ternary_depth===0||last_type==="TK_RESERVED"&&in_array(flags.last_text,["get","set"]))){set_mode(MODE.Statement);indent();if(last_type==="TK_RESERVED"&&in_array(flags.last_text,["var","let","const"])&¤t_token.type==="TK_WORD"){flags.declaration_statement=true}if(!start_of_object_property()){allow_wrap_or_preserved_newline(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["do","for","if","while"]))}return true}return false}function all_lines_start_with(lines,c){for(var i=0;i<lines.length;i++){var line=trim(lines[i]);if(line.charAt(0)!==c){return false}}return true}function each_line_matches_indent(lines,indent){var i=0,len=lines.length,line;for(;i<len;i++){line=lines[i];if(line&&line.indexOf(indent)!==0){return false}}return true}function is_special_word(word){return in_array(word,["case","return","do","if","throw","else"])}function get_token(offset){var index=token_pos+(offset||0);return index<0||index>=tokens.length?null:tokens[index]}function handle_start_expr(){if(start_of_statement()){}var next_mode=MODE.Expression;if(current_token.text==="["){if(last_type==="TK_WORD"||flags.last_text===")"){if(last_type==="TK_RESERVED"&&in_array(flags.last_text,Tokenizer.line_starters)){output.space_before_token=true}set_mode(next_mode);print_token();indent();if(opt.space_in_paren){output.space_before_token=true}return}next_mode=MODE.ArrayLiteral;if(is_array(flags.mode)){if(flags.last_text==="["||flags.last_text===","&&(last_last_text==="]"||last_last_text==="}")){if(!opt.keep_array_indentation){print_newline()}}}}else{if(last_type==="TK_RESERVED"&&flags.last_text==="for"){next_mode=MODE.ForInitializer}else if(last_type==="TK_RESERVED"&&in_array(flags.last_text,["if","while"])){next_mode=MODE.Conditional}else{}}if(flags.last_text===";"||last_type==="TK_START_BLOCK"){print_newline()}else if(last_type==="TK_END_EXPR"||last_type==="TK_START_EXPR"||last_type==="TK_END_BLOCK"||flags.last_text==="."){allow_wrap_or_preserved_newline(current_token.wanted_newline)}else if(!(last_type==="TK_RESERVED"&¤t_token.text==="(")&&last_type!=="TK_WORD"&&last_type!=="TK_OPERATOR"){output.space_before_token=true}else if(last_type==="TK_RESERVED"&&(flags.last_word==="function"||flags.last_word==="typeof")||flags.last_text==="*"&&last_last_text==="function"){if(opt.space_after_anon_function){output.space_before_token=true}}else if(last_type==="TK_RESERVED"&&(in_array(flags.last_text,Tokenizer.line_starters)||flags.last_text==="catch")){if(opt.space_before_conditional){output.space_before_token=true}}if(current_token.text==="("&&last_type==="TK_RESERVED"&&flags.last_word==="await"){output.space_before_token=true}if(current_token.text==="("){if(last_type==="TK_EQUALS"||last_type==="TK_OPERATOR"){if(!start_of_object_property()){allow_wrap_or_preserved_newline()}}}if(current_token.text==="("&&last_type!=="TK_WORD"&&last_type!=="TK_RESERVED"){allow_wrap_or_preserved_newline()}set_mode(next_mode);print_token();if(opt.space_in_paren){output.space_before_token=true}indent()}function handle_end_expr(){while(flags.mode===MODE.Statement){restore_mode()}if(flags.multiline_frame){allow_wrap_or_preserved_newline(current_token.text==="]"&&is_array(flags.mode)&&!opt.keep_array_indentation)}if(opt.space_in_paren){if(last_type==="TK_START_EXPR"&&!opt.space_in_empty_paren){output.trim();output.space_before_token=false}else{output.space_before_token=true}}if(current_token.text==="]"&&opt.keep_array_indentation){print_token();restore_mode()}else{restore_mode();print_token()}output.remove_redundant_indentation(previous_flags);if(flags.do_while&&previous_flags.mode===MODE.Conditional){previous_flags.mode=MODE.Expression;flags.do_block=false;flags.do_while=false}}function handle_start_block(){var next_token=get_token(1);var second_token=get_token(2);if(second_token&&(in_array(second_token.text,[":",","])&&in_array(next_token.type,["TK_STRING","TK_WORD","TK_RESERVED"])||in_array(next_token.text,["get","set"])&&in_array(second_token.type,["TK_WORD","TK_RESERVED"]))){if(!in_array(last_last_text,["class","interface"])){set_mode(MODE.ObjectLiteral)}else{set_mode(MODE.BlockStatement)}}else if(last_type==="TK_OPERATOR"&&flags.last_text==="=>"){set_mode(MODE.BlockStatement)}else if(in_array(last_type,["TK_EQUALS","TK_START_EXPR","TK_COMMA","TK_OPERATOR"])||last_type==="TK_RESERVED"&&in_array(flags.last_text,["return","throw","import"])){set_mode(MODE.ObjectLiteral)}else{set_mode(MODE.BlockStatement)}var empty_braces=!next_token.comments_before.length&&next_token.text==="}";var empty_anonymous_function=empty_braces&&flags.last_word==="function"&&last_type==="TK_END_EXPR";if(opt.brace_style==="expand"||opt.brace_style==="none"&¤t_token.wanted_newline){if(last_type!=="TK_OPERATOR"&&(empty_anonymous_function||last_type==="TK_EQUALS"||last_type==="TK_RESERVED"&&is_special_word(flags.last_text)&&flags.last_text!=="else")){output.space_before_token=true}else{print_newline(false,true)}}else{if(opt.brace_style==="collapse-preserve-inline"){var index=0;var check_token=null;flags.inline_frame=true;do{index+=1;check_token=get_token(index);if(check_token.wanted_newline){flags.inline_frame=false;break}}while(check_token.type!=="TK_EOF"&&!(check_token.type==="TK_END_BLOCK"&&check_token.opened===current_token))}if(is_array(previous_flags.mode)&&(last_type==="TK_START_EXPR"||last_type==="TK_COMMA")){if(flags.inline_frame){allow_wrap_or_preserved_newline();flags.inline_frame=true;previous_flags.multiline_frame=previous_flags.multiline_frame||flags.multiline_frame;flags.multiline_frame=false}else if(last_type==="TK_COMMA"){output.space_before_token=true}}else if(last_type!=="TK_OPERATOR"&&last_type!=="TK_START_EXPR"){if(last_type==="TK_START_BLOCK"){print_newline()}else{output.space_before_token=true}}}print_token();indent()}function handle_end_block(){while(flags.mode===MODE.Statement){restore_mode()}var empty_braces=last_type==="TK_START_BLOCK";if(opt.brace_style==="expand"){if(!empty_braces){print_newline()}}else{if(!empty_braces){if(flags.inline_frame){output.space_before_token=true}else if(is_array(flags.mode)&&opt.keep_array_indentation){opt.keep_array_indentation=false;print_newline();opt.keep_array_indentation=true}else{print_newline()}}}restore_mode();print_token()}function handle_word(){if(current_token.type==="TK_RESERVED"){if(in_array(current_token.text,["set","get"])&&flags.mode!==MODE.ObjectLiteral){current_token.type="TK_WORD"}else if(in_array(current_token.text,["as","from"])&&!flags.import_block){current_token.type="TK_WORD"}else if(flags.mode===MODE.ObjectLiteral){var next_token=get_token(1);if(next_token.text==":"){current_token.type="TK_WORD"}}}if(start_of_statement()){}else if(current_token.wanted_newline&&!is_expression(flags.mode)&&(last_type!=="TK_OPERATOR"||(flags.last_text==="--"||flags.last_text==="++"))&&last_type!=="TK_EQUALS"&&(opt.preserve_newlines||!(last_type==="TK_RESERVED"&&in_array(flags.last_text,["var","let","const","set","get"])))){print_newline()}if(flags.do_block&&!flags.do_while){if(current_token.type==="TK_RESERVED"&¤t_token.text==="while"){output.space_before_token=true;print_token();output.space_before_token=true;flags.do_while=true;return}else{print_newline();flags.do_block=false}}if(flags.if_block){if(!flags.else_block&&(current_token.type==="TK_RESERVED"&¤t_token.text==="else")){flags.else_block=true}else{while(flags.mode===MODE.Statement){restore_mode()}flags.if_block=false;flags.else_block=false}}if(current_token.type==="TK_RESERVED"&&(current_token.text==="case"||current_token.text==="default"&&flags.in_case_statement)){print_newline();if(flags.case_body||opt.jslint_happy){deindent();flags.case_body=false}print_token();flags.in_case=true;flags.in_case_statement=true;return}if(current_token.type==="TK_RESERVED"&¤t_token.text==="function"){if(in_array(flags.last_text,["}",";"])||output.just_added_newline()&&!in_array(flags.last_text,["[","{",":","=",","])){if(!output.just_added_blankline()&&!current_token.comments_before.length){print_newline();print_newline(true)}}if(last_type==="TK_RESERVED"||last_type==="TK_WORD"){if(last_type==="TK_RESERVED"&&in_array(flags.last_text,["get","set","new","return","export","async"])){output.space_before_token=true}else if(last_type==="TK_RESERVED"&&flags.last_text==="default"&&last_last_text==="export"){output.space_before_token=true}else{print_newline()}}else if(last_type==="TK_OPERATOR"||flags.last_text==="="){output.space_before_token=true}else if(!flags.multiline_frame&&(is_expression(flags.mode)||is_array(flags.mode))){}else{print_newline()}}if(last_type==="TK_COMMA"||last_type==="TK_START_EXPR"||last_type==="TK_EQUALS"||last_type==="TK_OPERATOR"){if(!start_of_object_property()){allow_wrap_or_preserved_newline()}}if(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["function","get","set"])){print_token();flags.last_word=current_token.text;return}prefix="NONE";if(last_type==="TK_END_BLOCK"){if(!(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["else","catch","finally","from"]))){prefix="NEWLINE"}else{if(opt.brace_style==="expand"||opt.brace_style==="end-expand"||opt.brace_style==="none"&¤t_token.wanted_newline){prefix="NEWLINE"}else{prefix="SPACE";output.space_before_token=true}}}else if(last_type==="TK_SEMICOLON"&&flags.mode===MODE.BlockStatement){prefix="NEWLINE"}else if(last_type==="TK_SEMICOLON"&&is_expression(flags.mode)){prefix="SPACE"}else if(last_type==="TK_STRING"){prefix="NEWLINE"}else if(last_type==="TK_RESERVED"||last_type==="TK_WORD"||flags.last_text==="*"&&last_last_text==="function"){prefix="SPACE"}else if(last_type==="TK_START_BLOCK"){if(flags.inline_frame){prefix="SPACE"}else{prefix="NEWLINE"}}else if(last_type==="TK_END_EXPR"){output.space_before_token=true;prefix="NEWLINE"}if(current_token.type==="TK_RESERVED"&&in_array(current_token.text,Tokenizer.line_starters)&&flags.last_text!==")"){if(flags.last_text==="else"||flags.last_text==="export"){prefix="SPACE"}else{prefix="NEWLINE"}}if(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["else","catch","finally"])){if(!(last_type==="TK_END_BLOCK"&&previous_flags.mode===MODE.BlockStatement)||opt.brace_style==="expand"||opt.brace_style==="end-expand"||opt.brace_style==="none"&¤t_token.wanted_newline){print_newline()}else{output.trim(true);var line=output.current_line;if(line.last()!=="}"){print_newline()}output.space_before_token=true}}else if(prefix==="NEWLINE"){if(last_type==="TK_RESERVED"&&is_special_word(flags.last_text)){output.space_before_token=true}else if(last_type!=="TK_END_EXPR"){if((last_type!=="TK_START_EXPR"||!(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["var","let","const"])))&&flags.last_text!==":"){if(current_token.type==="TK_RESERVED"&¤t_token.text==="if"&&flags.last_text==="else"){output.space_before_token=true}else{print_newline()}}}else if(current_token.type==="TK_RESERVED"&&in_array(current_token.text,Tokenizer.line_starters)&&flags.last_text!==")"){print_newline()}}else if(flags.multiline_frame&&is_array(flags.mode)&&flags.last_text===","&&last_last_text==="}"){print_newline()}else if(prefix==="SPACE"){output.space_before_token=true}print_token();flags.last_word=current_token.text;if(current_token.type==="TK_RESERVED"){if(current_token.text==="do"){flags.do_block=true}else if(current_token.text==="if"){flags.if_block=true}else if(current_token.text==="import"){flags.import_block=true}else if(flags.import_block&¤t_token.type==="TK_RESERVED"&¤t_token.text==="from"){flags.import_block=false}}}function handle_semicolon(){if(start_of_statement()){output.space_before_token=false}while(flags.mode===MODE.Statement&&!flags.if_block&&!flags.do_block){restore_mode()}if(flags.import_block){flags.import_block=false}print_token()}function handle_string(){if(start_of_statement()){output.space_before_token=true}else if(last_type==="TK_RESERVED"||last_type==="TK_WORD"||flags.inline_frame){ | |
output.space_before_token=true}else if(last_type==="TK_COMMA"||last_type==="TK_START_EXPR"||last_type==="TK_EQUALS"||last_type==="TK_OPERATOR"){if(!start_of_object_property()){allow_wrap_or_preserved_newline()}}else{print_newline()}print_token()}function handle_equals(){if(start_of_statement()){}if(flags.declaration_statement){flags.declaration_assignment=true}output.space_before_token=true;print_token();output.space_before_token=true}function handle_comma(){print_token();output.space_before_token=true;if(flags.declaration_statement){if(is_expression(flags.parent.mode)){flags.declaration_assignment=false}if(flags.declaration_assignment){flags.declaration_assignment=false;print_newline(false,true)}else if(opt.comma_first){allow_wrap_or_preserved_newline()}}else if(flags.mode===MODE.ObjectLiteral||flags.mode===MODE.Statement&&flags.parent.mode===MODE.ObjectLiteral){if(flags.mode===MODE.Statement){restore_mode()}if(!flags.inline_frame){print_newline()}}else if(opt.comma_first){allow_wrap_or_preserved_newline()}}function handle_operator(){if(start_of_statement()){}if(last_type==="TK_RESERVED"&&is_special_word(flags.last_text)){output.space_before_token=true;print_token();return}if(current_token.text==="*"&&last_type==="TK_DOT"){print_token();return}if(current_token.text===":"&&flags.in_case){flags.case_body=true;indent();print_token();print_newline();flags.in_case=false;return}if(current_token.text==="::"){print_token();return}if(last_type==="TK_OPERATOR"){allow_wrap_or_preserved_newline()}var space_before=true;var space_after=true;if(in_array(current_token.text,["--","++","!","~"])||in_array(current_token.text,["-","+"])&&(in_array(last_type,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||in_array(flags.last_text,Tokenizer.line_starters)||flags.last_text===",")){space_before=false;space_after=false;if(current_token.wanted_newline&&(current_token.text==="--"||current_token.text==="++")){print_newline(false,true)}if(flags.last_text===";"&&is_expression(flags.mode)){space_before=true}if(last_type==="TK_RESERVED"){space_before=true}else if(last_type==="TK_END_EXPR"){space_before=!(flags.last_text==="]"&&(current_token.text==="--"||current_token.text==="++"))}else if(last_type==="TK_OPERATOR"){space_before=in_array(current_token.text,["--","-","++","+"])&&in_array(flags.last_text,["--","-","++","+"]);if(in_array(current_token.text,["+","-"])&&in_array(flags.last_text,["--","++"])){space_after=true}}if((flags.mode===MODE.BlockStatement&&!flags.inline_frame||flags.mode===MODE.Statement)&&(flags.last_text==="{"||flags.last_text===";")){print_newline()}}else if(current_token.text===":"){if(flags.ternary_depth===0){space_before=false}else{flags.ternary_depth-=1}}else if(current_token.text==="?"){flags.ternary_depth+=1}else if(current_token.text==="*"&&last_type==="TK_RESERVED"&&flags.last_text==="function"){space_before=false;space_after=false}output.space_before_token=output.space_before_token||space_before;print_token();output.space_before_token=space_after}function handle_block_comment(){if(output.raw){output.add_raw_token(current_token);if(current_token.directives&¤t_token.directives["preserve"]==="end"){if(!opt.test_output_raw){output.raw=false}}return}if(current_token.directives){print_newline(false,true);print_token();if(current_token.directives["preserve"]==="start"){output.raw=true}print_newline(false,true);return}if(!acorn.newline.test(current_token.text)&&!current_token.wanted_newline){output.space_before_token=true;print_token();output.space_before_token=true;return}var lines=split_linebreaks(current_token.text);var j;var javadoc=false;var starless=false;var lastIndent=current_token.whitespace_before;var lastIndentLength=lastIndent.length;print_newline(false,true);if(lines.length>1){if(all_lines_start_with(lines.slice(1),"*")){javadoc=true}else if(each_line_matches_indent(lines.slice(1),lastIndent)){starless=true}}print_token(lines[0]);for(j=1;j<lines.length;j++){print_newline(false,true);if(javadoc){print_token(" "+ltrim(lines[j]))}else if(starless&&lines[j].length>lastIndentLength){print_token(lines[j].substring(lastIndentLength))}else{output.add_token(lines[j])}}print_newline(false,true)}function handle_comment(){if(current_token.wanted_newline){print_newline(false,true)}else{output.trim(true)}output.space_before_token=true;print_token();print_newline(false,true)}function handle_dot(){if(start_of_statement()){}if(last_type==="TK_RESERVED"&&is_special_word(flags.last_text)){output.space_before_token=true}else{allow_wrap_or_preserved_newline(flags.last_text===")"&&opt.break_chained_methods)}print_token()}function handle_unknown(){print_token();if(current_token.text[current_token.text.length-1]==="\n"){print_newline()}}function handle_eof(){while(flags.mode===MODE.Statement){restore_mode()}}}function OutputLine(parent){var _character_count=0;var _indent_count=-1;var _items=[];var _empty=true;this.set_indent=function(level){_character_count=parent.baseIndentLength+level*parent.indent_length;_indent_count=level};this.get_character_count=function(){return _character_count};this.is_empty=function(){return _empty};this.last=function(){if(!this._empty){return _items[_items.length-1]}else{return null}};this.push=function(input){_items.push(input);_character_count+=input.length;_empty=false};this.pop=function(){var item=null;if(!_empty){item=_items.pop();_character_count-=item.length;_empty=_items.length===0}return item};this.remove_indent=function(){if(_indent_count>0){_indent_count-=1;_character_count-=parent.indent_length}};this.trim=function(){while(this.last()===" "){var item=_items.pop();_character_count-=1}_empty=_items.length===0};this.toString=function(){var result="";if(!this._empty){if(_indent_count>=0){result=parent.indent_cache[_indent_count]}result+=_items.join("")}return result}}function Output(indent_string,baseIndentString){baseIndentString=baseIndentString||"";this.indent_cache=[baseIndentString];this.baseIndentLength=baseIndentString.length;this.indent_length=indent_string.length;this.raw=false;var lines=[];this.baseIndentString=baseIndentString;this.indent_string=indent_string;this.previous_line=null;this.current_line=null;this.space_before_token=false;this.add_outputline=function(){this.previous_line=this.current_line;this.current_line=new OutputLine(this);lines.push(this.current_line)};this.add_outputline();this.get_line_number=function(){return lines.length};this.add_new_line=function(force_newline){if(this.get_line_number()===1&&this.just_added_newline()){return false}if(force_newline||!this.just_added_newline()){if(!this.raw){this.add_outputline()}return true}return false};this.get_code=function(){var sweet_code=lines.join("\n").replace(/[\r\n\t ]+$/,"");return sweet_code};this.set_indent=function(level){if(lines.length>1){while(level>=this.indent_cache.length){this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string)}this.current_line.set_indent(level);return true}this.current_line.set_indent(0);return false};this.add_raw_token=function(token){for(var x=0;x<token.newlines;x++){this.add_outputline()}this.current_line.push(token.whitespace_before);this.current_line.push(token.text);this.space_before_token=false};this.add_token=function(printable_token){this.add_space_before_token();this.current_line.push(printable_token)};this.add_space_before_token=function(){if(this.space_before_token&&!this.just_added_newline()){this.current_line.push(" ")}this.space_before_token=false};this.remove_redundant_indentation=function(frame){if(frame.multiline_frame||frame.mode===MODE.ForInitializer||frame.mode===MODE.Conditional){return}var index=frame.start_line_index;var line;var output_length=lines.length;while(index<output_length){lines[index].remove_indent();index++}};this.trim=function(eat_newlines){eat_newlines=eat_newlines===undefined?false:eat_newlines;this.current_line.trim(indent_string,baseIndentString);while(eat_newlines&&lines.length>1&&this.current_line.is_empty()){lines.pop();this.current_line=lines[lines.length-1];this.current_line.trim()}this.previous_line=lines.length>1?lines[lines.length-2]:null};this.just_added_newline=function(){return this.current_line.is_empty()};this.just_added_blankline=function(){if(this.just_added_newline()){if(lines.length===1){return true}var line=lines[lines.length-2];return line.is_empty()}return false}}var Token=function(type,text,newlines,whitespace_before,mode,parent){this.type=type;this.text=text;this.comments_before=[];this.newlines=newlines||0;this.wanted_newline=newlines>0;this.whitespace_before=whitespace_before||"";this.parent=null;this.opened=null;this.directives=null};function tokenizer(input,opts,indent_string){var whitespace="\n\r ".split("");var digit=/[0-9]/;var digit_bin=/[01]/;var digit_oct=/[01234567]/;var digit_hex=/[0123456789abcdefABCDEF]/;var punct="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: => **".split(" ");this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var reserved_words=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]);var block_comment_pattern=/([\s\S]*?)((?:\*\/)|$)/g;var comment_pattern=/([^\n\r\u2028\u2029]*)/g;var directives_block_pattern=/\/\* beautify( \w+[:]\w+)+ \*\//g;var directive_pattern=/ (\w+)[:](\w+)/g;var directives_end_ignore_pattern=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g;var template_pattern=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;var n_newlines,whitespace_before_token,in_html_comment,tokens,parser_pos;var input_length;this.tokenize=function(){input_length=input.length;parser_pos=0;in_html_comment=false;tokens=[];var next,last;var token_values;var open=null;var open_stack=[];var comments=[];while(!(last&&last.type==="TK_EOF")){token_values=tokenize_next();next=new Token(token_values[1],token_values[0],n_newlines,whitespace_before_token);while(next.type==="TK_COMMENT"||next.type==="TK_BLOCK_COMMENT"||next.type==="TK_UNKNOWN"){if(next.type==="TK_BLOCK_COMMENT"){next.directives=token_values[2]}comments.push(next);token_values=tokenize_next();next=new Token(token_values[1],token_values[0],n_newlines,whitespace_before_token)}if(comments.length){next.comments_before=comments;comments=[]}if(next.type==="TK_START_BLOCK"||next.type==="TK_START_EXPR"){next.parent=last;open_stack.push(open);open=next}else if((next.type==="TK_END_BLOCK"||next.type==="TK_END_EXPR")&&(open&&(next.text==="]"&&open.text==="["||next.text===")"&&open.text==="("||next.text==="}"&&open.text==="{"))){next.parent=open.parent;next.opened=open;open=open_stack.pop()}tokens.push(next);last=next}return tokens};function get_directives(text){if(!text.match(directives_block_pattern)){return null}var directives={};directive_pattern.lastIndex=0;var directive_match=directive_pattern.exec(text);while(directive_match){directives[directive_match[1]]=directive_match[2];directive_match=directive_pattern.exec(text)}return directives}function tokenize_next(){var i,resulting_string;var whitespace_on_this_line=[];n_newlines=0;whitespace_before_token="";if(parser_pos>=input_length){return["","TK_EOF"]}var last_token;if(tokens.length){last_token=tokens[tokens.length-1]}else{last_token=new Token("TK_START_BLOCK","{")}var c=input.charAt(parser_pos);parser_pos+=1;while(in_array(c,whitespace)){if(acorn.newline.test(c)){if(!(c==="\n"&&input.charAt(parser_pos-2)==="\r")){n_newlines+=1;whitespace_on_this_line=[]}}else{whitespace_on_this_line.push(c)}if(parser_pos>=input_length){return["","TK_EOF"]}c=input.charAt(parser_pos);parser_pos+=1}if(whitespace_on_this_line.length){whitespace_before_token=whitespace_on_this_line.join("")}if(digit.test(c)||c==="."&&digit.test(input.charAt(parser_pos))){var allow_decimal=true;var allow_e=true;var local_digit=digit;if(c==="0"&&parser_pos<input_length&&/[XxOoBb]/.test(input.charAt(parser_pos))){allow_decimal=false;allow_e=false;if(/[Bb]/.test(input.charAt(parser_pos))){local_digit=digit_bin}else if(/[Oo]/.test(input.charAt(parser_pos))){local_digit=digit_oct}else{local_digit=digit_hex}c+=input.charAt(parser_pos);parser_pos+=1}else if(c==="."){allow_decimal=false}else{c="";parser_pos-=1}while(parser_pos<input_length&&local_digit.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(allow_decimal&&parser_pos<input_length&&input.charAt(parser_pos)==="."){c+=input.charAt(parser_pos);parser_pos+=1;allow_decimal=false}else if(allow_e&&parser_pos<input_length&&/[Ee]/.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos<input_length&&/[+-]/.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1}allow_e=false;allow_decimal=false}}return[c,"TK_WORD"]}if(acorn.isIdentifierStart(input.charCodeAt(parser_pos-1))){if(parser_pos<input_length){while(acorn.isIdentifierChar(input.charCodeAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos===input_length){break}}}if(!(last_token.type==="TK_DOT"||last_token.type==="TK_RESERVED"&&in_array(last_token.text,["set","get"]))&&in_array(c,reserved_words)){if(c==="in"){return[c,"TK_OPERATOR"]}return[c,"TK_RESERVED"]}return[c,"TK_WORD"]}if(c==="("||c==="["){return[c,"TK_START_EXPR"]}if(c===")"||c==="]"){return[c,"TK_END_EXPR"]}if(c==="{"){return[c,"TK_START_BLOCK"]}if(c==="}"){return[c,"TK_END_BLOCK"]}if(c===";"){return[c,"TK_SEMICOLON"]}if(c==="/"){var comment="";if(input.charAt(parser_pos)==="*"){parser_pos+=1;block_comment_pattern.lastIndex=parser_pos;var comment_match=block_comment_pattern.exec(input);comment="/*"+comment_match[0];parser_pos+=comment_match[0].length;var directives=get_directives(comment);if(directives&&directives["ignore"]==="start"){directives_end_ignore_pattern.lastIndex=parser_pos;comment_match=directives_end_ignore_pattern.exec(input);comment+=comment_match[0];parser_pos+=comment_match[0].length}comment=comment.replace(acorn.allLineBreaks,"\n");return[comment,"TK_BLOCK_COMMENT",directives]}if(input.charAt(parser_pos)==="/"){parser_pos+=1;comment_pattern.lastIndex=parser_pos;var comment_match=comment_pattern.exec(input);comment="//"+comment_match[0];parser_pos+=comment_match[0].length;return[comment,"TK_COMMENT"]}}var startXmlRegExp=/^<([-a-zA-Z:0-9_.]+|{.+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{.+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.+?}))*\s*(\/?)\s*>/;if(c==="`"||c==="'"||c==='"'||(c==="/"||opts.e4x&&c==="<"&&input.slice(parser_pos-1).match(startXmlRegExp))&&(last_token.type==="TK_RESERVED"&&in_array(last_token.text,["return","case","throw","else","do","typeof","yield"])||last_token.type==="TK_END_EXPR"&&last_token.text===")"&&last_token.parent&&last_token.parent.type==="TK_RESERVED"&&in_array(last_token.parent.text,["if","while","for"])||in_array(last_token.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var sep=c,esc=false,has_char_escapes=false;resulting_string=c;if(sep==="/"){var in_char_class=false;while(parser_pos<input_length&&((esc||in_char_class||input.charAt(parser_pos)!==sep)&&!acorn.newline.test(input.charAt(parser_pos)))){resulting_string+=input.charAt(parser_pos);if(!esc){esc=input.charAt(parser_pos)==="\\";if(input.charAt(parser_pos)==="["){in_char_class=true}else if(input.charAt(parser_pos)==="]"){in_char_class=false}}else{esc=false}parser_pos+=1}}else if(opts.e4x&&sep==="<"){var xmlRegExp=/<(\/?)([-a-zA-Z:0-9_.]+|{.+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{.+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.+?}))*\s*(\/?)\s*>/g;var xmlStr=input.slice(parser_pos-1);var match=xmlRegExp.exec(xmlStr);if(match&&match.index===0){var rootTag=match[2];var depth=0;while(match){var isEndTag=!!match[1];var tagName=match[2];var isSingletonTag=!!match[match.length-1]||tagName.slice(0,8)==="![CDATA[";if(tagName===rootTag&&!isSingletonTag){if(isEndTag){--depth}else{++depth}}if(depth<=0){break}match=xmlRegExp.exec(xmlStr)}var xmlLength=match?match.index+match[0].length:xmlStr.length;xmlStr=xmlStr.slice(0,xmlLength);parser_pos+=xmlLength-1;xmlStr=xmlStr.replace(acorn.allLineBreaks,"\n");return[xmlStr,"TK_STRING"]}}else{var parse_string=function(delimiter,allow_unescaped_newlines,start_sub){var current_char;while(parser_pos<input_length){current_char=input.charAt(parser_pos);if(!(esc||current_char!==delimiter&&(allow_unescaped_newlines||!acorn.newline.test(current_char)))){break}if((esc||allow_unescaped_newlines)&&acorn.newline.test(current_char)){if(current_char==="\r"&&input.charAt(parser_pos+1)==="\n"){parser_pos+=1;current_char=input.charAt(parser_pos)}resulting_string+="\n"}else{resulting_string+=current_char}if(esc){if(current_char==="x"||current_char==="u"){has_char_escapes=true}esc=false}else{esc=current_char==="\\"}parser_pos+=1;if(start_sub&&resulting_string.indexOf(start_sub,resulting_string.length-start_sub.length)!==-1){if(delimiter==="`"){parse_string("}",allow_unescaped_newlines,"`")}else{parse_string("`",allow_unescaped_newlines,"${")}}}};if(sep==="`"){parse_string("`",true,"${")}else{parse_string(sep)}}if(has_char_escapes&&opts.unescape_strings){resulting_string=unescape_string(resulting_string)}if(parser_pos<input_length&&input.charAt(parser_pos)===sep){resulting_string+=sep;parser_pos+=1;if(sep==="/"){while(parser_pos<input_length&&acorn.isIdentifierStart(input.charCodeAt(parser_pos))){resulting_string+=input.charAt(parser_pos);parser_pos+=1}}}return[resulting_string,"TK_STRING"]}if(c==="#"){if(tokens.length===0&&input.charAt(parser_pos)==="!"){resulting_string=c;while(parser_pos<input_length&&c!=="\n"){c=input.charAt(parser_pos);resulting_string+=c;parser_pos+=1}return[trim(resulting_string)+"\n","TK_UNKNOWN"]}var sharp="#";if(parser_pos<input_length&&digit.test(input.charAt(parser_pos))){do{c=input.charAt(parser_pos);sharp+=c;parser_pos+=1}while(parser_pos<input_length&&c!=="#"&&c!=="=");if(c==="#"){}else if(input.charAt(parser_pos)==="["&&input.charAt(parser_pos+1)==="]"){sharp+="[]";parser_pos+=2}else if(input.charAt(parser_pos)==="{"&&input.charAt(parser_pos+1)==="}"){sharp+="{}";parser_pos+=2}return[sharp,"TK_WORD"]}}if(c==="<"&&(input.charAt(parser_pos)==="?"||input.charAt(parser_pos)==="%")){template_pattern.lastIndex=parser_pos-1;var template_match=template_pattern.exec(input);if(template_match){c=template_match[0];parser_pos+=c.length-1;c=c.replace(acorn.allLineBreaks,"\n");return[c,"TK_STRING"]}}if(c==="<"&&input.substring(parser_pos-1,parser_pos+3)==="<!--"){parser_pos+=3;c="<!--";while(!acorn.newline.test(input.charAt(parser_pos))&&parser_pos<input_length){c+=input.charAt(parser_pos);parser_pos++}in_html_comment=true;return[c,"TK_COMMENT"]}if(c==="-"&&in_html_comment&&input.substring(parser_pos-1,parser_pos+2)==="-->"){in_html_comment=false;parser_pos+=2;return["-->","TK_COMMENT"]}if(c==="."){return[c,"TK_DOT"]}if(in_array(c,punct)){while(parser_pos<input_length&&in_array(c+input.charAt(parser_pos),punct)){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos>=input_length){break}}if(c===","){return[c,"TK_COMMA"]}else if(c==="="){return[c,"TK_EQUALS"]}else{return[c,"TK_OPERATOR"]}}return[c,"TK_UNKNOWN"]}function unescape_string(s){var esc=false,out="",pos=0,s_hex="",escaped=0,c;while(esc||pos<s.length){c=s.charAt(pos);pos++;if(esc){esc=false;if(c==="x"){s_hex=s.substr(pos,2);pos+=2}else if(c==="u"){s_hex=s.substr(pos,4);pos+=4}else{out+="\\"+c;continue}if(!s_hex.match(/^[0123456789abcdefABCDEF]+$/)){return s}escaped=parseInt(s_hex,16);if(escaped>=0&&escaped<32){if(c==="x"){out+="\\x"+s_hex}else{out+="\\u"+s_hex}continue}else if(escaped===34||escaped===39||escaped===92){out+="\\"+String.fromCharCode(escaped)}else if(c==="x"&&escaped>126&&escaped<=255){return s}else{out+=String.fromCharCode(escaped)}}else if(c==="\\"){esc=true}else{out+=c}}return out}}if(typeof define==="function"&&define.amd){define([],function(){return{js_beautify:js_beautify}})}else if(typeof exports!=="undefined"){exports.js_beautify=js_beautify}else if(typeof window!=="undefined"){window.js_beautify=js_beautify}else if(typeof global!=="undefined"){global.js_beautify=js_beautify}})()}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],"esformatter-jsx":[function(require,module,exports){module.exports=require("./lib/plugin")},{"./lib/plugin":7}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";var format=require("./format");var disparity=require("disparity");var hr="=================================================================="+"==============";disparity.added="expected";disparity.removed="actual";exports.chars=chars;function chars(str,opts,fileName){var result=disparity.chars(str,format(str,opts));if(!result){return""}return getHeader(fileName)+result+"\n"}function getHeader(fileName){return fileName?cyan(fileName)+"\n"+cyan(hr)+"\n":""}function cyan(str){return"[36m"+str+"[39m"}exports.unified=unified;function unified(str,opts,fileName){return disparity.unified(str,format(str,opts),{paths:[fileName]})}exports.unifiedNoColor=unifiedNoColor;function unifiedNoColor(str,opts,fileName){return disparity.unifiedNoColor(str,format(str,opts),{paths:[fileName]})}},{"./format":2,disparity:305}],2:[function(require,module,exports){"use strict";var _options=require("./options");var acornToEsprima=require("acorn-to-esprima");var babelTraverse=require("babel-traverse").default;var babylon=require("babylon");var npmRun=require("npm-run");var plugins=require("./plugins");var rocambole=require("rocambole");var transform=require("./transform");rocambole.BYPASS_RECURSION.loc=true;rocambole.BYPASS_RECURSION.leadingComments=true;rocambole.BYPASS_RECURSION.trailingComments=true;exports=module.exports=format;function format(str,opts){_options.set(opts);var prefix=getShebang(str);if(prefix&&!_options.get("esformatter.allowShebang")){throw new Error("shebang not allowed! Set esformatter.allowShebang to true if you "+"want to support it.")}str=str.replace(prefix,"");var pipeCommands=_options.get("pipe");if(pipeCommands){str=pipe(pipeCommands.before,str).toString()}str=doFormat(str,opts);if(pipeCommands){str=pipe(pipeCommands.after,str).toString()}return prefix+str}exports.parseFn=function(str,opts){var ast=babylon.parse(str,opts);ast.tokens.pop();ast.tokens=acornToEsprima.toTokens(ast.tokens,babylon.tokTypes,str);acornToEsprima.convertComments(ast.comments);acornToEsprima.toAST(ast,babelTraverse,str);ast.type="Program";ast.sourceType=ast.program.sourceType;ast.directives=ast.program.directives;ast.body=ast.program.body;delete ast.program;delete ast._paths;acornToEsprima.attachComments(ast,ast.comments,ast.tokens);return ast};exports.parseContext=null;exports.parseOptions={allowImportExportEverywhere:false,allowReturnOutsideFunction:true,allowSuperOutsideMethod:true,locations:true,onComment:[],onToken:[],plugins:["asyncFunctions","asyncGenerators","classConstructorCall","classProperties","decorators","doExpressions","exponentiationOperator","exportExtensions","flow","functionBind","functionSent","jsx","objectRestSpread","trailingFunctionCommas"],ranges:true,sourceType:"module",strictMode:true};function getShebang(str){var result=/^#!.+\n/.exec(str);return result?result[0]:""}function doFormat(str){str=plugins.stringBefore(str);rocambole.parseFn=exports.parseFn;rocambole.parseContext=exports.parseContext;var ast=rocambole.parse(str,exports.parseOptions);transform(ast,transform.BYPASS_OPTIONS);str=ast.toString();str=plugins.stringAfter(str);return str}function pipe(commands,input){if(!commands){return input}return commands.reduce(function(input,cmd){return npmRun.sync(cmd,{input:input})},input)}},{"./options":47,"./plugins":48,"./transform":51,"acorn-to-esprima":54,"babel-traverse":61,babylon:303,"npm-run":333,rocambole:412}],3:[function(require,module,exports){"use strict";exports.shouldIndentChild=shouldIndentChild;function shouldIndentChild(parent,child,opts){if(!child||!opts[parent.type+"."+child.type]){return false}var left=child.left;var right=child.right;return!right||!opts[right.type]&&!opts[left.type]}},{}],4:[function(require,module,exports){"use strict";exports.ArrayExpression=require("./hooks/ArrayExpression");exports.ArrayPattern=require("./hooks/ArrayPattern");exports.ArrowFunctionExpression=require("./hooks/ArrowFunctionExpression");exports.AssignmentExpression=require("./hooks/AssignmentExpression");exports.BinaryExpression=require("./hooks/BinaryExpression");exports.CallExpression=exports.NewExpression=require("./hooks/CallExpression");exports.CatchClause=require("./hooks/CatchClause");exports.ClassDeclaration=exports.ClassExpression=require("./hooks/ClassDeclarationAndExpression");exports.ConditionalExpression=require("./hooks/ConditionalExpression");exports.DoWhileStatement=require("./hooks/DoWhileStatement");exports.ExportAllDeclaration=require("./hooks/ExportAllDeclaration");exports.ExportDefaultDeclaration=require("./hooks/ExportDefaultDeclaration");exports.ExportNamedDeclaration=require("./hooks/ExportNamedDeclaration");exports.ExportSpecifier=require("./hooks/ExportSpecifier");exports.ForInStatement=require("./hooks/ForInStatement");exports.ForOfStatement=require("./hooks/ForOfStatement");exports.ForStatement=require("./hooks/ForStatement");exports.FunctionDeclaration=require("./hooks/FunctionDeclaration");exports.FunctionExpression=require("./hooks/FunctionExpression");exports.IfStatement=require("./hooks/IfStatement");exports.ImportDeclaration=require("./hooks/ImportDeclaration");exports.ImportSpecifier=require("./hooks/ImportSpecifier");exports.LogicalExpression=require("./hooks/LogicalExpression");exports.MemberExpression=require("./hooks/MemberExpression");exports.MethodDefinition=require("./hooks/MethodDefinition");exports.ObjectExpression=require("./hooks/ObjectExpression");exports.ObjectPattern=require("./hooks/ObjectPattern");exports.ReturnStatement=require("./hooks/ReturnStatement");exports.SequenceExpression=require("./hooks/SequenceExpression");exports.SwitchStatement=require("./hooks/SwitchStatement");exports.SwitchCase=require("./hooks/SwitchCase");exports.ThrowStatement=require("./hooks/ThrowStatement");exports.TryStatement=require("./hooks/TryStatement");exports.UnaryExpression=require("./hooks/UnaryExpression");exports.UpdateExpression=require("./hooks/UpdateExpression");exports.VariableDeclaration=require("./hooks/VariableDeclaration");exports.WhileStatement=require("./hooks/WhileStatement")},{"./hooks/ArrayExpression":5,"./hooks/ArrayPattern":6,"./hooks/ArrowFunctionExpression":7,"./hooks/AssignmentExpression":8,"./hooks/BinaryExpression":9,"./hooks/CallExpression":10,"./hooks/CatchClause":11,"./hooks/ClassDeclarationAndExpression":12,"./hooks/ConditionalExpression":13,"./hooks/DoWhileStatement":14,"./hooks/ExportAllDeclaration":15,"./hooks/ExportDefaultDeclaration":16,"./hooks/ExportNamedDeclaration":17,"./hooks/ExportSpecifier":18,"./hooks/ForInStatement":19,"./hooks/ForOfStatement":20,"./hooks/ForStatement":21,"./hooks/FunctionDeclaration":22,"./hooks/FunctionExpression":23,"./hooks/IfStatement":24,"./hooks/ImportDeclaration":25,"./hooks/ImportSpecifier":26,"./hooks/LogicalExpression":27,"./hooks/MemberExpression":28,"./hooks/MethodDefinition":29,"./hooks/ObjectExpression":30,"./hooks/ObjectPattern":31,"./hooks/ReturnStatement":33,"./hooks/SequenceExpression":34,"./hooks/SwitchCase":35,"./hooks/SwitchStatement":36,"./hooks/ThrowStatement":37,"./hooks/TryStatement":38,"./hooks/UnaryExpression":39,"./hooks/UpdateExpression":40,"./hooks/VariableDeclaration":41,"./hooks/WhileStatement":42}],5:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function ArrayExpression(node){if(node.elements.length){_limit.around(node.startToken,"ArrayExpressionOpening");_limit.around(node.endToken,"ArrayExpressionClosing");node.elements.forEach(function(el){if(!el)return;var prev=_tk.findPrevNonEmpty(el.startToken);if(prev.value===","){_limit.around(prev,"ArrayExpressionComma")}})}else{_limit.after(node.startToken,0)}};exports.getIndentEdges=function(node){var start;var prev=node.startToken;node.elements.some(function(el,i,els){if(i){var prevEl=els[i-1];prev=prevEl?prevEl.endToken:_tk.findNextNonEmpty(prev)}var next=el?el.startToken:_tk.findNextNonEmpty(prev);if(_tk.findInBetween(prev,next,_tk.isBr)){start=prev;return true}});var end=node.endToken.prev;var sibling=_tk.findPrevNonEmpty(node.endToken);if(!_tk.findInBetween(sibling,node.endToken,_tk.isBr)){end=node.endToken}return start?{startToken:start,endToken:end}:false}},{"../limit":45,"rocambole-token":401}],6:[function(require,module,exports){"use strict";var limit=require("../limit");var tk=require("rocambole-token");exports.format=function ArrayPattern(node){limit.around(node.startToken,"ArrayPatternOpening");limit.around(node.endToken,"ArrayPatternClosing");node.elements.forEach(function(el){var comma=tk.findNext(el.endToken,[",","]"]);if(comma.value===","){limit.around(comma,"ArrayPatternComma")}})}},{"../limit":45,"rocambole-token":401}],7:[function(require,module,exports){"use strict";var tk=require("rocambole-token");var limit=require("../limit");var _params=require("./Params");exports.format=function ArrowFunctionExpression(node){var body=node.body;if(body.type==="BlockStatement"){limit.around(body.startToken,"ArrowFunctionExpressionOpeningBrace");limit.around(body.endToken,"ArrowFunctionExpressionClosingBrace")}var arrow=tk.findPrev(body.startToken,"=>");limit.around(arrow,"ArrowFunctionExpressionArrow");if(shouldHandleParams(node)){_params.format(node)}};exports.getIndentEdges=function(node,opts){var edges=[];if(shouldIndentBody(node,opts)){var arrow=tk.findPrev(node.body.startToken,"=>");edges.push({startToken:arrow,endToken:node.endToken})}if(shouldHandleParams(node)){edges.push(_params.getIndentEdges(node,opts))}return edges};function shouldHandleParams(node){var arrow=tk.findPrev(node.body.startToken,"=>");return tk.findPrevNonEmpty(arrow).value===")"}function shouldIndentBody(node,opts){return node.body.type==="BlockStatement"||!opts[node.body.type]}},{"../limit":45,"./Params":32,"rocambole-token":401}],8:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _br=require("rocambole-linebreak");var helpers=require("../helpers");exports.format=function AssignmentExpression(node){var operator=_tk.findNext(node.left.endToken,node.operator);_br.limit(operator,"AssignmentOperator");_ws.limit(operator,"AssignmentOperator")};exports.getIndentEdges=function(node,opts){var operator=_tk.findNext(node.left.endToken,node.operator);if(_tk.findInBetween(operator,node.right.startToken,_tk.isBr)||helpers.shouldIndentChild(node,node.right,opts)&&_tk.findInBetween(operator,node.right.endToken,_tk.isBr)){return{level:opts["AssignmentExpression."+node.right.type],startToken:operator,endToken:node.endToken.type!=="Punctuator"?node.endToken.next:node.endToken}}}},{"../helpers":3,"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],9:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function BinaryExpression(node){var operator=_tk.findNext(node.left.endToken,node.operator);_ws.limit(operator,"BinaryExpressionOperator")};exports.getIndentEdges=function(node){if(node.parent.type==="BinaryExpression"){return}return{startToken:node.startToken.next,endToken:node.endToken.next||node.endToken | |
}}},{"rocambole-token":401,"rocambole-whitespace":410}],10:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _br=require("rocambole-linebreak");var _ws=require("rocambole-whitespace");var _limit=require("../limit");var _parens=require("./expressionParentheses");exports.format=function CallExpression(node){var openingParentheses=_tk.findNext(node.callee.endToken,_tk.isCode);var closingParentheses=node.endToken;var hasParentheses=closingParentheses.value===")";if(node.type==="NewExpression"){_br.limitAfter(node.startToken,0);_ws.limitAfter(node.startToken,1)}if(hasParentheses){_limit.around(openingParentheses,"CallExpressionOpeningParentheses");_limit.around(closingParentheses,"CallExpressionClosingParentheses")}var args=node["arguments"];if(args.length){_limit.before(_tk.findNextNonEmpty(openingParentheses),"ArgumentList");args.forEach(function(arg){var next=_tk.findInBetween(arg.endToken,closingParentheses,",");if(next&&next.value===","){_limit.around(next,"ArgumentComma")}});_limit.after(_tk.findPrevNonEmpty(closingParentheses),"ArgumentList")}else if(hasParentheses){_limit.after(openingParentheses,0);_limit.before(closingParentheses,0)}if(node.callee.type!=="FunctionExpression"){return}var parens=_parens.getParentheses({type:"Special",startToken:node.startToken,endToken:node.endToken});if(parens){_limit.after(parens.opening,"IIFEOpeningParentheses");_limit.before(parens.closing,"IIFEClosingParentheses")}};exports.getIndentEdges=function(node,opts){var openingParentheses=_tk.findNext(node.callee.endToken,_tk.isCode);if(openingParentheses.value!=="(")return;if(!node.arguments.length){return{startToken:openingParentheses,endToken:_tk.findNext(openingParentheses,")")}}var start;function hasBr(start,end){return _tk.findInBetween(start,end,_tk.isBr)}node.arguments.some(function(arg,i,args){var prev=i?args[i-1].endToken.next:openingParentheses;if(hasBr(prev,arg.startToken)){start=prev;return true}});if(!start){node.arguments.some(function(arg){if(opts["CallExpression."+arg.type]&&hasBr(arg.startToken,arg.endToken)){start=arg.startToken.next;return true}})}return start?{startToken:start,endToken:node.endToken}:false}},{"../limit":45,"./expressionParentheses":43,"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],11:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function CatchClause(node){_limit.around(node.startToken,"CatchKeyword");_limit.before(node.param.startToken,"CatchParameterList");_limit.after(node.param.endToken,"CatchParameterList");_limit.around(node.body.startToken,"CatchOpeningBrace");_limit.around(node.body.endToken,"CatchClosingBrace");if(!node.body.body.length&&!containsCommentsInside(node.body)){_tk.removeEmptyInBetween(node.body.startToken,node.body.endToken)}};function containsCommentsInside(node){return!!_tk.findInBetween(node.startToken,node.endToken,_tk.isComment)}exports.getIndentEdges=function(node){return node.body}},{"../limit":45,"rocambole-token":401}],12:[function(require,module,exports){"use strict";var tk=require("rocambole-token");var ws=require("rocambole-whitespace");var limit=require("../limit");exports.format=function ClassDeclarationAndExpression(node){var classKeyword=node.startToken;var opening=tk.findNext(node.startToken,"{");var closing=node.endToken;tk.removeInBetween(classKeyword,opening,tk.isBr);ws.limitAfter(classKeyword,1);var extendsKeyword=tk.findInBetween(classKeyword,opening,"extends");if(extendsKeyword){ws.limit(extendsKeyword,1)}limit.around(opening,"ClassOpeningBrace");limit.around(closing,"ClassClosingBrace")};exports.getIndentEdges=function(node){return node}},{"../limit":45,"rocambole-token":401,"rocambole-whitespace":410}],13:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ConditionalExpression(node){var questionMark=_tk.findNext(node.test.endToken,"?");var colon=_tk.findNext(node.consequent.endToken,":");_ws.limitBefore(questionMark,_ws.expectedAfter("ConditionalExpressionTest"));_ws.limitAfter(questionMark,_ws.expectedBefore("ConditionalExpressionConsequent"));_ws.limitBefore(colon,_ws.expectedAfter("ConditionalExpressionConsequent"));_ws.limitAfter(colon,_ws.expectedBefore("ConditionalExpressionAlternate"))};exports.getIndentEdges=function(node){if(_tk.findInBetween(node.test.endToken,node.consequent.startToken,_tk.isBr)){return{startToken:node.test.endToken.next,endToken:node.endToken.next}}if(_tk.findInBetween(node.consequent.endToken,node.alternate.startToken,_tk.isBr)){return{startToken:node.consequent.endToken.next,endToken:node.endToken.next}}}},{"rocambole-token":401,"rocambole-whitespace":410}],14:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");var _ws=require("rocambole-whitespace");exports.format=function DoWhileStatement(node){if(node.body.type==="BlockStatement"){_limit.around(node.body.startToken,"DoWhileStatementOpeningBrace");_limit.around(node.body.endToken,"DoWhileStatementClosingBrace")}else{_ws.limitAfter(node.startToken,1)}var whileKeyword=_tk.findPrev(node.test.startToken,"while");_ws.limit(whileKeyword,1)};exports.getIndentEdges=function(node){var edges=[{startToken:node.startToken.next,endToken:node.body.endToken},{startToken:_tk.findNext(node.body.endToken,"("),endToken:node.endToken.value===")"?node.endToken:_tk.findPrev(node.endToken,")")}];return edges}},{"../limit":45,"rocambole-token":401,"rocambole-whitespace":410}],15:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ExportAllDeclaration(node){var star=_tk.findNext(node.startToken,"*");_br.limit(star,0);_ws.limit(star,1);var fromKeyword=_tk.findNext(node.startToken,"from");_br.limit(fromKeyword,0);_ws.limit(fromKeyword,1)}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],16:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ExportDefaultDeclaration(node){var def=_tk.findNext(node.startToken,"default");_br.limit(def,0);_ws.limit(def,1)}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],17:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ExportNamedDeclaration(node){_br.limitAfter(node.startToken,0);_ws.limitAfter(node.startToken,1);if(!node.specifiers.length)return;var fromKeyword=_tk.findPrev(node.endToken,"from");if(fromKeyword){_br.limit(fromKeyword,0);_ws.limit(fromKeyword,1)}}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],18:[function(require,module,exports){"use strict";module.exports=require("./ImportSpecifier")},{"./ImportSpecifier":26}],19:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ForInStatement(node){var expressionStart=_tk.findNext(node.startToken,"(");var expressionEnd=_tk.findPrev(node.body.startToken,")");_br.limit(expressionStart,"ForInStatementExpressionOpening");_ws.limit(expressionStart,"ForInStatementExpressionOpening");_br.limit(expressionEnd,"ForInStatementExpressionClosing");_ws.limit(expressionEnd,"ForInStatementExpressionClosing");if(node.body.type==="BlockStatement"&&node.body.body.length){var bodyStart=node.body.startToken;var bodyEnd=node.body.endToken;_br.limit(bodyStart,"ForInStatementOpeningBrace");_ws.limit(bodyStart,"ForInStatementOpeningBrace");_br.limit(bodyEnd,"ForInStatementClosingBrace");_ws.limit(bodyEnd,"ForInStatementClosingBrace");_ws.limitAfter(expressionEnd,"ForInStatementExpression")}_ws.limitAfter(node.left.endToken,1);_ws.limitBefore(node.right.startToken,1)};exports.getIndentEdges=function(node){var edges=[];edges.push({startToken:node.left.startToken,endToken:node.right.endToken});if(node.body.type==="BlockStatement"){edges.push(node.body)}else{edges.push({startToken:_tk.findNext(node.right.endToken,")").next,endToken:node.endToken})}return edges}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],20:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ForOfStatement(node){var expressionStart=_tk.findNext(node.startToken,"(");var expressionEnd=_tk.findPrev(node.body.startToken,")");_br.limit(expressionStart,"ForOfStatementExpressionOpening");_ws.limit(expressionStart,"ForOfStatementExpressionOpening");_br.limit(expressionEnd,"ForOfStatementExpressionClosing");_ws.limit(expressionEnd,"ForOfStatementExpressionClosing");if(node.body.type==="BlockStatement"&&node.body.body.length){var bodyStart=node.body.startToken;var bodyEnd=node.body.endToken;_br.limit(bodyStart,"ForOfStatementOpeningBrace");_ws.limit(bodyStart,"ForOfStatementOpeningBrace");_br.limit(bodyEnd,"ForOfStatementClosingBrace");_ws.limit(bodyEnd,"ForOfStatementClosingBrace");_ws.limitAfter(expressionEnd,"ForOfStatementExpression")}_ws.limitAfter(node.left.endToken,1);_ws.limitBefore(node.right.startToken,1)};exports.getIndentEdges=function(node){var edges=[];edges.push({startToken:node.left.startToken,endToken:node.right.endToken});if(node.body.type==="BlockStatement"){edges.push(node.body)}else{edges.push({startToken:_tk.findNext(node.right.endToken,")").next,endToken:node.endToken})}return edges}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],21:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _limit=require("../limit");exports.format=function ForStatement(node){var semi_1=_tk.findNext(node.startToken,";");var semi_2=_tk.findPrev(node.body.startToken,";");_ws.limit(semi_1,"ForStatementSemicolon");_ws.limit(semi_2,"ForStatementSemicolon");var expressionStart=_tk.findNext(node.startToken,"(");var expressionEnd=_tk.findPrev(node.body.startToken,")");_limit.around(expressionStart,"ForStatementExpressionOpening");_limit.around(expressionEnd,"ForStatementExpressionClosing");if(node.body.type==="BlockStatement"){var bodyStart=node.body.startToken;var bodyEnd=node.body.endToken;_limit.around(bodyStart,"ForStatementOpeningBrace");_limit.around(bodyEnd,"ForStatementClosingBrace")}};exports.getIndentEdges=function(node){var edges=[];var args={startToken:_tk.findNext(node.startToken,"("),endToken:_tk.findPrev(node.body.startToken,")")};edges.push(args);if(node.body.type==="BlockStatement"){edges.push(node.body)}else{edges.push({startToken:args.endToken,endToken:node.endToken})}return edges}},{"../limit":45,"rocambole-token":401,"rocambole-whitespace":410}],22:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _limit=require("../limit");var _params=require("./Params");exports.format=function FunctionDeclaration(node){if(node.id){_limit.around(node.id.startToken,"FunctionName")}if(node.generator&&!node.async){var genToken=_tk.findNextNonEmpty(node.startToken);_ws.limitBefore(genToken,"FunctionGeneratorAsterisk")}_params.format(node);_limit.around(node.body.startToken,"FunctionDeclarationOpeningBrace");_limit.around(node.body.endToken,"FunctionDeclarationClosingBrace")};exports.getIndentEdges=function(node,opts){return[_params.getIndentEdges(node,opts),node.body]}},{"../limit":45,"./Params":32,"rocambole-token":401,"rocambole-whitespace":410}],23:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _params=require("./Params");var _limit=require("../limit");exports.format=function FunctionExpression(node){_limit.around(node.body.startToken,"FunctionExpressionOpeningBrace");_limit.around(node.endToken,"FunctionExpressionClosingBrace");var startToken=node.startToken;if(node.id){_ws.limit(node.id.startToken,"FunctionName")}else if(startToken.value==="function"){if(node.generator){startToken=_tk.findNextNonEmpty(startToken);_ws.limitBefore(startToken,"FunctionGeneratorAsterisk")}_ws.limit(startToken,"FunctionReservedWord")}if(_tk.isWs(node.endToken.next)&&_tk.isSemiColon(node.endToken.next.next)){_tk.remove(node.endToken.next)}if(node.parent.type==="CallExpression"){_ws.limitAfter(node.endToken,0)}var bodyFirstNonEmpty=_tk.findNextNonEmpty(node.body.startToken);if(bodyFirstNonEmpty.value==="}"){_limit.after(node.body.startToken,0)}_params.format(node)};exports.getIndentEdges=function(node,opts){var params=_params.getIndentEdges(node,opts);if(!opts.TopLevelFunctionBlock&&isTopLevelFunctionBlock(node)){return params}return[params,{startToken:node.body.startToken,endToken:_tk.findPrevNonEmpty(node.body.endToken).next}]};function isTopLevelFunctionBlock(node){return!(node.params.length===1&&node.params[0].name==="factory")&&(isOfType(node.parent,"CallExpression")||isOfType(node.parent,"AssignmentExpression"))&&!isOfType(node.parent.callee,"MemberExpression")&&isOfType(node.parent.parent,"ExpressionStatement")&&isOfType(node.parent.parent.parent,"Program")}function isOfType(node,type){return node&&node.type===type}},{"../limit":45,"./Params":32,"rocambole-token":401,"rocambole-whitespace":410}],24:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _limit=require("../limit");exports.format=function IfStatement(node){var startBody=node.consequent.startToken;var endBody=node.consequent.endToken;var conditionalStart=_tk.findPrev(node.test.startToken,"(");var conditionalEnd=_tk.findNext(node.test.endToken,")");_ws.limit(conditionalStart,"IfStatementConditionalOpening");_ws.limit(conditionalEnd,"IfStatementConditionalClosing");var alt=node.alternate;if(alt){var elseKeyword=_tk.findPrev(alt.startToken,"else");if(alt.type==="IfStatement"){_br.limitBefore(alt.startToken,0);_ws.limitBefore(alt.startToken,1);if(alt.consequent.type==="BlockStatement"){_br.limitBefore(alt.consequent.startToken,"ElseIfStatementOpeningBrace");_br.limitBefore(alt.consequent.endToken,"ElseIfStatementClosingBrace")}_br.limitBefore(elseKeyword,"ElseIfStatement");if(!alt.alternate){_br.limitAfter(alt.consequent.endToken,"ElseIfStatement")}}else if(alt.type==="BlockStatement"){_limit.around(alt.startToken,"ElseStatementOpeningBrace");_br.limitBefore(elseKeyword,"ElseStatement");_br.limitAfter(alt.endToken,"ElseStatement");_ws.limitBefore(elseKeyword,1);_limit.around(alt.endToken,"ElseStatementClosingBrace")}else{_ws.limitAfter(elseKeyword,1)}}if(node.consequent.type==="BlockStatement"){_limit.around(startBody,"IfStatementOpeningBrace");if(!alt){_br.limit(endBody,"IfStatementClosingBrace")}else{_br.limitBefore(endBody,"IfStatementClosingBrace")}_ws.limit(endBody,"IfStatementClosingBrace")}};exports.getIndentEdges=function(node,opts){var edges=[];var test=node.test;var consequent=node.consequent;var alt=node.alternate;edges.push({level:opts.IfStatementConditional,startToken:_tk.findNext(node.startToken,"("),endToken:_tk.findPrev(consequent.startToken,")")});function isExecutable(token){return _tk.isNotEmpty(token)&&!_tk.isComment(token)}edges.push({startToken:consequent.type==="BlockStatement"?consequent.startToken:test.endToken.next,endToken:alt&&_tk.isComment(_tk.findPrevNonEmpty(consequent.endToken))?_tk.findPrev(consequent.endToken,isExecutable).next:consequent.endToken});if(alt&&alt.type!=="IfStatement"){edges.push({startToken:alt.type==="BlockStatement"?alt.startToken:_tk.findPrevNonEmpty(alt.startToken).next,endToken:alt.endToken})}return edges}},{"../limit":45,"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],25:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ImportDeclaration(node){_br.limitAfter(node.startToken,0);_ws.limitAfter(node.startToken,1);if(!node.specifiers.length)return;var fromKeyword=_tk.findPrev(node.endToken,"from");_br.limit(fromKeyword,0);_ws.limit(fromKeyword,1)}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],26:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function(node){var braceStart=_tk.findPrev(node.startToken,_tk.isCode);var braceEnd=_tk.findNext(node.endToken,_tk.isCode);if(braceStart.value==="{"||braceStart.value===","){_br.limit(braceStart,0);_ws.limitBefore(braceStart,braceStart.value==="{"?1:0);_ws.limitAfter(braceStart,braceStart.value==="{"?"ModuleSpecifierOpeningBrace":1)}if(braceEnd.value==="}"||braceEnd.value===","){var next=_tk.findNextNonEmpty(braceEnd);var followedBySemi=next&&next.value===";";if(followedBySemi){_br.limit(braceEnd,0)}_ws.limitAfter(braceEnd,followedBySemi?0:1);_ws.limitBefore(braceEnd,braceEnd.value==="}"?"ModuleSpecifierClosingBrace":0)}_br.limit(node.startToken,0);if(node.startToken.value!==node.endToken.value){_br.limit(node.endToken,0);_ws.limitAfter(node.startToken,1);_ws.limitBefore(node.endToken,1)}}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],27:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function LogicalExpression(node){var operator=_tk.findNext(node.left.endToken,node.operator);_ws.limit(operator,"LogicalExpressionOperator");if(node.parent.type==="ExpressionStatement"){var prev=_tk.findPrevNonEmpty(node.left.startToken);if(prev&&prev.value==="("){_br.limit(prev,"ExpressionOpeningParentheses");_ws.limit(prev,"ExpressionOpeningParentheses");node.startToken=prev}var next=_tk.findNextNonEmpty(node.right.endToken);if(next&&next.value===")"){_br.limit(next,"ExpressionClosingParentheses");_ws.limit(next,"ExpressionClosingParentheses");node.endToken=next}}}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],28:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function MemberExpression(node){var opening=_tk.findPrevNonEmpty(node.property.startToken),closing=_tk.findNextNonEmpty(node.property.endToken);if(opening&&closing&&opening.value==="["&&closing.value==="]"){_limit.around(opening,"MemberExpressionOpening");_limit.around(closing,"MemberExpressionClosing")}if(opening&&opening.value==="."){_limit.around(opening,"MemberExpressionPeriod")}};exports.getIndentEdges=function(node){var edge={};edge.startToken=node.object.endToken;if(node.object.type!=="CallExpression"){edge.startToken=edge.startToken.next}edge.endToken=node.endToken;if(node.parent.type==="CallExpression"&&node.parent.callee.type==="MemberExpression"){edge.endToken=node.parent.endToken}if(!_tk.findInBetween(edge.startToken,node.property.startToken,_tk.isBr)){return false}return edge}},{"../limit":45,"rocambole-token":401}],29:[function(require,module,exports){"use strict";var ws=require("rocambole-whitespace");var br=require("rocambole-linebreak");exports.format=function MethodDefinition(node){br.limitAfter(node.startToken,0);if(node.startToken!==node.key){ws.limitAfter(node.startToken,1)}ws.limitAfter(node.key.endToken,"MethodDefinitionName")}},{"rocambole-linebreak":399,"rocambole-whitespace":410}],30:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _limit=require("../limit");exports.format=function ObjectExpression(node){if(!node.properties.length)return;var shouldBeSingleLine=node.parent.type==="ForInStatement"||node.parent.type==="ForOfStatement";if(!shouldBeSingleLine){_limit.around(node.startToken,"ObjectExpressionOpeningBrace")}else{_tk.removeEmptyInBetween(node.startToken,node.endToken)}node.properties.forEach(function(prop){var valueStart=getValueStart(prop);var valueEnd=getValueEnd(prop);var keyStart=getKeyStart(prop);var keyEnd=getKeyEnd(prop);var comma=_tk.findNext(valueEnd,[",","}"]);if(_tk.isComma(comma)){_tk.removeInBetween(valueEnd,comma,_tk.isBr);_tk.remove(comma);_tk.after(valueEnd,comma)}if(!shouldBeSingleLine){_br.limitBefore(keyStart,"PropertyName");_br.limitAfter(keyEnd,"PropertyName");if(valueStart){_br.limitBefore(valueStart,"PropertyValue");_br.limitAfter(valueEnd,"PropertyValue")}}else if(keyStart.prev.value!=="{"){_ws.limitBefore(keyStart,"Property")}if(prop.kind==="get"||prop.kind==="set"){_ws.limitBefore(keyStart,1);_ws.limitAfter(keyEnd,0);return}_ws.limitBefore(keyStart,"PropertyName");_ws.limitAfter(keyEnd,"PropertyName");if(valueStart){_ws.limitBefore(valueStart,"PropertyValue");_ws.limitAfter(valueEnd,"PropertyValue")}});if(!shouldBeSingleLine){_limit.around(node.endToken,"ObjectExpressionClosingBrace")}};function getKeyStart(prop){var start=prop.key.startToken;start=_tk.findPrev(start,["{",","]);return _tk.findNext(start,_tk.isCode)}function getKeyEnd(prop){var end=prop.key.endToken;end=_tk.findNext(end,[":","(",",","}"]);return _tk.findPrev(end,_tk.isCode)}function getValueStart(prop){if(prop.key.startToken===prop.value.startToken){return null}var start=prop.value.startToken;return prop.kind==="get"||prop.kind==="set"?start:_tk.findNext(_tk.findPrev(start,":"),_tk.isCode)}function getValueEnd(prop){if(prop.key.startToken===prop.value.startToken){return null}var end=_tk.findNext(prop.value.endToken,[",","}"]);return _tk.findPrev(end,_tk.isCode)}exports.getIndentEdges=function(node,opts){var edges=[{startToken:node.startToken,endToken:_tk.findInBetweenFromEnd(node.startToken,node.endToken,_tk.isBr)}];node.properties.forEach(function(property){if(!opts["ObjectExpression."+property.value.type])return;edges.push({startToken:getValueStart(property),endToken:getValueEnd(property)})});return edges}},{"../limit":45,"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],31:[function(require,module,exports){"use strict";var limit=require("../limit");var tk=require("rocambole-token");exports.format=function ObjectPattern(node){limit.around(node.startToken,"ObjectPatternOpeningBrace");limit.around(node.endToken,"ObjectPatternClosingBrace");node.properties.forEach(function(prop){var comma=tk.findNext(prop.endToken,[",","}"]);if(comma.value===","){limit.around(comma,"ObjectPatternComma")}})}},{"../limit":45,"rocambole-token":401}],32:[function(require,module,exports){"use strict";var _ws=require("rocambole-whitespace");var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function Params(node){var params=node.params;var opening=node.startToken.value==="("?node.startToken:_tk.findNext(node.startToken,"(");var closing=_tk.findPrev(node.body.startToken,")");if(params.length){_ws.limitBefore(_tk.findNextNonEmpty(opening),"ParameterList");params.forEach(function(param,i){if(i<params.length-1){_limit.around(_tk.findNext(param.startToken,","),"ParameterComma")}if(param.type==="AssignmentPattern"&¶m.right){_limit.around(_tk.findPrev(param.right.startToken,"="),"AssignmentPattern")}});_ws.limitAfter(_tk.findPrevNonEmpty(closing),"ParameterList")}else{_limit.after(opening,0)}};exports.getIndentEdges=function(node,opts){var params=node.params;if(params.length&&opts.ParameterList){var start=node.parent.type==="Property"?node.parent.startToken:node.startToken;return{startToken:start.value==="("?start:_tk.findNext(start,"("),endToken:_tk.findPrev(node.body.startToken,")"),level:opts.ParameterList}}return null}},{"../limit":45,"rocambole-token":401,"rocambole-whitespace":410}],33:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var expressionParentheses=require("./expressionParentheses");exports.format=function ReturnStatement(node){var nonEmpty=_tk.findInBetween(node.startToken.next,node.endToken,_tk.isNotEmpty);if(nonEmpty)_tk.removeEmptyInBetween(node.startToken,nonEmpty);_ws.limitAfter(node.startToken,1);if(_tk.isSemiColon(node.endToken)){_tk.removeEmptyInBetween(_tk.findPrevNonEmpty(node.endToken),node.endToken)}if(node.argument){expressionParentheses.addSpaceInside(node.argument)}};var _specialArguments={BinaryExpression:true};exports.getIndentEdges=function(node,opts){if(!node.argument||opts[node.argument.type]&&!_specialArguments[node.argument.type]){return false}var parentheses=expressionParentheses.getParentheses(node.argument);return parentheses?{startToken:parentheses.opening,endToken:parentheses.closing}:{startToken:node.startToken.next,endToken:_tk.isEmpty(node.endToken)?_tk.findPrevNonEmpty(node.endToken):node.endToken}}},{"./expressionParentheses":43,"rocambole-token":401,"rocambole-whitespace":410}],34:[function(require,module,exports){"use strict";var _ws=require("rocambole-whitespace");exports.format=function SequenceExpression(node){node.expressions.forEach(function(expr,i){if(i){var operator=expr.startToken.prev;while(operator.value!==","){operator=operator.prev}_ws.limit(operator,"CommaOperator")}})}},{"rocambole-whitespace":410}],35:[function(require,module,exports){"use strict";var _ws=require("rocambole-whitespace");var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var limit=require("../limit");exports.format=function SwitchCase(node){if(node.test){_br.limitBefore(node.test.startToken,0);_ws.limitBefore(node.test.startToken,1)}var endToken=node.endToken;var colon=_tk.findNext(node.startToken,":");limit.before(colon,"SwitchCaseColon");limit.after(colon,"SwitchCaseColon");var breakKeyword=_tk.findInBetweenFromEnd(node.startToken,endToken.next,"break");if(breakKeyword){limit.before(breakKeyword,"BreakKeyword");limit.after(endToken,"BreakKeyword")}};exports.getIndentEdges=function(node){return{startToken:node.startToken,endToken:_tk.findNext(node.endToken,["}","case","break","default"]).prev}}},{"../limit":45,"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],36:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function SwitchStatement(node){var opening=_tk.findPrev(node.discriminant.startToken,"(");var closing=_tk.findNext(node.discriminant.endToken,")");var openingBrace=_tk.findNext(closing,"{");var closingBrace=node.endToken;_limit.around(openingBrace,"SwitchOpeningBrace");_limit.around(closingBrace,"SwitchClosingBrace");_limit.around(opening,"SwitchDiscriminantOpening");_limit.around(closing,"SwitchDiscriminantClosing")};exports.getIndentEdges=function(node){return{startToken:_tk.findNext(node.discriminant.endToken,"{"),endToken:node.endToken}}},{"../limit":45,"rocambole-token":401}],37:[function(require,module,exports){"use strict";var _ws=require("rocambole-whitespace");exports.format=function ThrowStatement(node){_ws.limit(node.startToken,"ThrowKeyword")}},{"rocambole-whitespace":410}],38:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function TryStatement(node){var finalizer=node.finalizer;if(finalizer){var finallyKeyword=_tk.findPrev(finalizer.startToken,"finally");_limit.around(finallyKeyword,"FinallyKeyword");_limit.around(finalizer.startToken,"FinallyOpeningBrace");_limit.around(finalizer.endToken,"FinallyClosingBrace");if(!finalizer.body.length&&!containsCommentsInside(finalizer)){_tk.removeEmptyInBetween(finalizer.startToken,finalizer.endToken)}}_limit.around(node.startToken,"TryKeyword");_limit.around(node.block.startToken,"TryOpeningBrace");_limit.around(node.block.endToken,"TryClosingBrace")};function containsCommentsInside(node){return!!_tk.findInBetween(node.startToken,node.endToken,_tk.isComment)}exports.getIndentEdges=function(node){var edges=[node.block];if(node.finalizer){edges.push(node.finalizer)}return edges}},{"../limit":45,"rocambole-token":401}],39:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function UnaryExpression(node){if(node.operator==="delete"){_ws.limitAfter(node.startToken,1);_br.limitBefore(node.startToken,"DeleteOperator");var endToken=node.endToken;if(_tk.isWs(endToken.next)){_ws.limitAfter(endToken,0)}if(_tk.isSemiColon(endToken.next)){endToken=endToken.next}_br.limitAfter(endToken,"DeleteOperator")}else if(node.operator==="typeof"||node.operator==="void"){_ws.limitAfter(node.startToken,1)}else{_ws.limit(node.startToken,"UnaryExpressionOperator")}}},{"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],40:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");exports.format=function UpdateExpression(node){_tk.removeEmptyInBetween(node.startToken,node.endToken)}},{"rocambole-token":401}],41:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var helpers=require("../helpers");exports.format=function VariableDeclaration(node){var insideFor=node.parent.type==="ForStatement";node.declarations.forEach(function(declarator,i){var idStartToken=declarator.id.startToken;var prevNonEmpty=_tk.findPrevNonEmpty(idStartToken);if(i&&prevNonEmpty.value===","){if(_tk.isBr(prevNonEmpty.prev)||_tk.isBr(prevNonEmpty.prev.prev)){var beforeComma=_tk.findPrev(prevNonEmpty,function(t){return!_tk.isEmpty(t)&&!_tk.isComment(t)});_ws.limit(prevNonEmpty,0);_tk.remove(prevNonEmpty);_tk.after(beforeComma,prevNonEmpty)}}if(!i&&!_tk.isComment(_tk.findPrevNonEmpty(idStartToken))){_tk.removeEmptyAdjacentBefore(idStartToken)}else if(!insideFor){_br.limit(idStartToken,declarator.init?"VariableName":"VariableDeclarationWithoutInit")}_ws.limitBefore(idStartToken,"VariableName");if(declarator.init){_ws.limitAfter(declarator.id.endToken,"VariableName");var equalSign=_tk.findNext(declarator.id.endToken,"=");var valueStart=_tk.findNextNonEmpty(equalSign);_br.limitBefore(valueStart,"VariableValue");_ws.limitBefore(valueStart,"VariableValue");_br.limitAfter(declarator.endToken,"VariableValue");_ws.limitAfter(declarator.endToken,"VariableValue")}});_ws.limitAfter(node.startToken,1);if(_tk.isSemiColon(node.endToken)){_br.limit(node.endToken,"VariableDeclarationSemiColon");_ws.limit(node.endToken,"VariableDeclarationSemiColon")}};exports.getIndentEdges=function(node,opts){var edges=[];var isMulti=node.declarations.length>1;if(opts.MultipleVariableDeclaration&&isMulti||opts.SingleVariableDeclaration&&!isMulti){edges.push(node)}node.declarations.forEach(function(declaration){var init=declaration.init;if(helpers.shouldIndentChild(node,init,opts)){var end=init.endToken.value===")"?_tk.findPrevNonEmpty(init.endToken):init.endToken.next;edges.push({level:opts["VariableDeclaration."+init.type],startToken:init.startToken,endToken:end})}});return edges}},{"../helpers":3,"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],42:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function WhileStatement(node){var conditionalStart=_tk.findNext(node.startToken,"(");var conditionalEnd=_tk.findPrev(node.body.startToken,")");_limit.around(conditionalStart,"WhileStatementConditionalOpening");if(node.body.type==="BlockStatement"){var bodyStart=node.body.startToken;var bodyEnd=node.body.endToken;_limit.around(bodyStart,"WhileStatementOpeningBrace");_limit.around(bodyEnd,"WhileStatementClosingBrace");_limit.around(conditionalEnd,"WhileStatementConditionalClosing"); | |
}else{var next=_tk.findNextNonEmpty(conditionalEnd);_limit.before(conditionalEnd,"WhileStatementConditionalClosing");if(_tk.isSemiColon(next)){_limit.after(conditionalEnd,0)}else{_limit.after(conditionalEnd,"WhileStatementConditionalClosing")}}};exports.getIndentEdges=function(node){var edges=[{startToken:_tk.findNext(node.startToken,"("),endToken:_tk.findPrev(node.body.startToken,")")}];if(node.body.type!=="EmptyStatement"){edges.push(node.body)}return edges}},{"../limit":45,"rocambole-token":401}],43:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var debug=require("debug")("esformatter:parentheses");exports.addSpaceInside=addSpaceInsideExpressionParentheses;function addSpaceInsideExpressionParentheses(node){var parentheses=getParentheses(node);if(parentheses){_ws.limitAfter(parentheses.opening,"ExpressionOpeningParentheses");_ws.limitBefore(parentheses.closing,"ExpressionClosingParentheses")}}exports.getParentheses=getParentheses;function getParentheses(node){if(!isValidExpression(node)){debug("not valid expression: %s",node.type);return}var opening=node.startToken;if(/^(?:Binary|Logical)Expression$/.test(node.type)||opening.value!=="("){opening=_tk.findPrevNonEmpty(opening)}if(!opening||opening.value!=="("){debug('opening is not a parentheses; type: %s, opening: "%s"',node.type,opening&&opening.value);return}var token=opening;var count=0;var closing;while(token){if(token.value==="("){count+=1}else if(token.value===")"){count-=1}if(count===0){closing=token;break}token=token.next}if(!closing){debug("not inside parentheses",count);return}debug('found parentheses; type: %s, opening: "%s", closing: "%s"',node.type,opening&&opening.value,closing&&closing.value);return{opening:opening,closing:closing}}var needExpressionParenthesesSpaces={Literal:true,CallExpression:false,FunctionExpression:false,ArrayExpression:false,ObjectExpression:false,Special:true};function isValidExpression(node){var needSpaces=needExpressionParenthesesSpaces[node.type];if(needSpaces){return true}if(needSpaces==null&&node.type.indexOf("Expression")!==-1){if(node.type==="ExpressionStatement"&&(node.expression.callee&&node.expression.callee.type==="FunctionExpression")){return false}return true}return false}},{debug:304,"rocambole-token":401,"rocambole-whitespace":410}],44:[function(require,module,exports){"use strict";var rocambole=require("rocambole");var indent=require("rocambole-indent");var debug=require("debug")("esformatter:indent");var hooks=require("./hooks");var _opts;var _specialTypes={VariableDeclaration:["SingleVariableDeclaration","MultipleVariableDeclaration"]};exports.setOptions=setOptions;function setOptions(opts){_opts=opts;indent.setOptions(opts)}exports.transform=transform;function transform(ast){rocambole.walk(ast,transformNode);indent.sanitize(ast);if(_opts.alignComments){indent.alignComments(ast)}return ast}function transformNode(node){var indentLevel=getIndentLevel(node);if(indentLevel){var type=node.type;var edges;if(type in hooks&&hooks[type].getIndentEdges){edges=hooks[type].getIndentEdges(node,_opts);if(!edges){debug("[transformNode]: hook returned no edges");return}}else{edges=node}debug('[transformNode] type: %s, edges: "%s", "%s"',node.type,edges&&edges.startToken&&edges.startToken.value,edges&&edges.endToken&&edges.endToken.value);if(Array.isArray(edges)){edges.forEach(function(edge){if(!edge){return}indentEdge(edge,indentLevel)})}else{indentEdge(edges,indentLevel)}}}function indentEdge(edge,level){indent.inBetween(edge.startToken,edge.endToken,edge.level||level)}function getIndentLevel(node){var value=_opts[node.type];debug("[getIndentLevel] type: %s, value: %s",node.type,value);if(value==null&&node.type in _specialTypes){var specials=_specialTypes[node.type];specials.some(function(type){value=_opts[type];return value>0});debug("[specialNodeType] indent: %s",value)}return value}},{"./hooks":4,debug:304,rocambole:412,"rocambole-indent":394}],45:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _ws=require("rocambole-whitespace");exports.before=limitBefore;function limitBefore(token,typeOrValue){_br.limitBefore(token,typeOrValue);_ws.limitBefore(token,typeOrValue)}exports.after=limitAfter;function limitAfter(token,typeOrValue){_br.limitAfter(token,typeOrValue);_ws.limitAfter(token,typeOrValue)}exports.around=limitAround;function limitAround(token,typeOrValue){_br.limit(token,typeOrValue);_ws.limit(token,typeOrValue)}},{"rocambole-linebreak":399,"rocambole-whitespace":410}],46:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _br=require("rocambole-linebreak");var debugAround=require("debug")("esformatter:br:around");module.exports=aroundNodeIfNeeded;function aroundNodeIfNeeded(node){var shouldLimit=shouldLimitLineBreakAroundNode(node);debugAround("[aroundNodeIfNeeded] type: %s, shouldLimit: %s, ",node.type,shouldLimit);if(!shouldLimit)return;var type=node.type;_br.limitBefore(node.startToken,type);if(_tk.isSemiColon(node.endToken)){_br.limitAfter(node.endToken,type)}}var CONTEXTUAL_LINE_BREAK={AssignmentExpression:1,ConditionalExpression:1,CallExpression:1,ExpressionStatement:1,SequenceExpression:1,LogicalExpression:1,VariableDeclaration:1};var BYPASS_CHILD_LINE_BREAK={CallExpression:1,DoWhileStatement:1,IfStatement:1,WhileStatement:1,ForStatement:1,ForInStatement:1,ForOfStatement:1,ReturnStatement:1,ThrowStatement:1};var CONTEXTUAL_LINE_BREAK_GREAT_PARENTS={Program:1,BlockStatement:1,IfStatement:1,FunctionExpression:1};function shouldLimitLineBreakAroundNode(node){if(node.parent){if(node.parent.prev&&node.parent.prev.type==="EmptyStatement"){return false}if(node.parent.type==="Program"){return true}if(isInsideIfTest(node)){return false}}if(!(node.type in CONTEXTUAL_LINE_BREAK)){return true}if(node.parent.type in BYPASS_CHILD_LINE_BREAK){return false}if(node.type==="CallExpression"&&node.callee.type==="FunctionExpression"){return false}var gp=node.parent.parent;if(gp&&gp.type in CONTEXTUAL_LINE_BREAK_GREAT_PARENTS){return true}return false}function isInsideIfTest(node){if(node.parent&&node.parent.type==="IfStatement"){return node===node.parent.test}var greatParent=node.parent&&node.parent.parent;return greatParent&&greatParent.type==="IfStatement"&&node.parent===greatParent.test}},{debug:304,"rocambole-linebreak":399,"rocambole-token":401}],47:[function(require,module,exports){(function(process){"use strict";var stripJsonComments=require("strip-json-comments");var fs=require("fs");var path=require("path");var _ws=require("rocambole-whitespace");var _br=require("rocambole-linebreak");var indent=require("./indent");var plugins=require("./plugins");var deepMixIn=require("mout/object/deepMixIn");var merge=require("mout/object/merge");var get=require("mout/object/get");var isObject=require("mout/lang/isObject");var userHome=require("user-home");var isEmpty=require("mout/lang/isEmpty");var _curOpts;exports.presets={"default":require("./preset/default.json"),jquery:require("./preset/jquery.json")};exports.set=function(opts){var preset=opts&&opts.preset?opts.preset:"default";_curOpts=mergeOptions(preset,opts);if(_curOpts.indent&&"AlignComments"in _curOpts.indent){_curOpts.indent.alignComments=_curOpts.indent.AlignComments}_ws.setOptions(_curOpts.whiteSpace);_br.setOptions(_curOpts.lineBreak);indent.setOptions(_curOpts.indent);plugins.setOptions(_curOpts);if(opts){_curOpts=deepMixIn(_curOpts,opts)}};function mergeOptions(preset,opts){if(!(preset in exports.presets)){throw new Error('Invalid preset file "'+preset+'".')}var baseOpts=exports.presets[preset];if(baseOpts.preset){baseOpts=mergeOptions(baseOpts.preset,baseOpts)}return merge({},baseOpts,opts)}exports.get=function(prop){return prop?get(_curOpts,prop):_curOpts};exports.getRc=getRc;function getRc(filePath,customOptions){if(isTopLevel(customOptions)){return customOptions}if(isObject(filePath)){customOptions=filePath;filePath=null}var basedir=filePath?path.dirname(filePath):process.cwd();var cwd=process.cwd();var rc=findAndMergeConfigs(basedir);if(isEmpty(rc)&&basedir!==cwd){rc=findAndMergeConfigs(cwd)}var tmpConfig=!isEmpty(rc)?rc:getGlobalConfig();return merge(tmpConfig,customOptions)}function findAndMergeConfigs(basedir){if(!basedir||!basedir.length)return;var configFiles=[".esformatter","package.json"];var config;configFiles.some(function(name){var filePath=path.join(basedir,name);if(!fs.existsSync(filePath))return;var cur=loadAndParseConfig(filePath);if(name==="package.json"){cur=cur.esformatter}if(!cur)return;config=config?merge(cur,config):cur;if(isTopLevel(config))return true});if(isTopLevel(config)){return config}var parentDir=path.resolve(basedir,"..");var parentConfig=parentDir&&parentDir!==basedir?findAndMergeConfigs(parentDir):{};return merge(parentConfig,config)}function isTopLevel(config){return config&&(config.root||config.preset)}function getGlobalConfig(){if(!userHome){return{}}var file=path.join(userHome,".esformatter");return fs.existsSync(file)?loadAndParseConfig(file):{}}exports.loadAndParseConfig=loadAndParseConfig;function loadAndParseConfig(file){try{return JSON.parse(stripJsonComments(fs.readFileSync(file).toString()))}catch(e){throw new Error("Can't parse configuration file '"+file+"'. Exception: "+e.message)}}}).call(this,require("_process"))},{"./indent":44,"./plugins":48,"./preset/default.json":49,"./preset/jquery.json":50,_process:429,fs:416,"mout/lang/isEmpty":320,"mout/lang/isObject":322,"mout/object/deepMixIn":326,"mout/object/get":329,"mout/object/merge":331,path:428,"rocambole-linebreak":399,"rocambole-whitespace":410,"strip-json-comments":413,"user-home":414}],48:[function(require,module,exports){"use strict";var partial=require("mout/function/partial");var remove=require("mout/array/remove");var _plugins=[];exports.register=register;function register(plugin){if(_plugins.indexOf(plugin)===-1){_plugins.push(plugin)}}exports.unregister=partial(remove,_plugins);exports.unregisterAll=unregisterAll;function unregisterAll(){_plugins=[]}exports.setOptions=function(opts){loadAndRegister(opts&&opts.plugins);exec("setOptions",opts,require("./esformatter"))};exports.loadAndRegister=loadAndRegister;function loadAndRegister(ids){ids=ids||[];ids.forEach(function(id){var module;try{module=require(id)}catch(e){throw new Error("Error: Cannot find plugin '"+id+"'."+" Make sure "+"you used the correct name on the config file or run `npm install "+"--save-dev "+id+"` to add it as a project dependency.")}register(module)})}exportMethods(["tokenBefore","tokenAfter","nodeBefore","nodeAfter","transform","transformAfter","transformBefore"],exec);exportMethods(["stringBefore","stringAfter"],pipe);function exportMethods(arr,fn){arr.forEach(function(methodName){exports[methodName]=partial(fn,methodName)})}function exec(methodName){var args=Array.prototype.slice.call(arguments,1);_plugins.forEach(function(plugin){if(methodName in plugin){plugin[methodName].apply(plugin,args)}})}function pipe(methodName,input){return _plugins.reduce(function(output,plugin){return methodName in plugin?plugin[methodName](output):output},input)}},{"./esformatter":undefined,"mout/array/remove":313,"mout/function/partial":316}],49:[function(require,module,exports){module.exports={esformatter:{allowShebang:true},indent:{value:" ",alignComments:true,ArrayExpression:1,ArrayPattern:1,ArrowFunctionExpression:1,AssignmentExpression:1,"AssignmentExpression.BinaryExpression":1,"AssignmentExpression.LogicalExpression":1,"AssignmentExpression.UnaryExpression":1,CallExpression:1,"CallExpression.BinaryExpression":1,"CallExpression.LogicalExpression":1,"CallExpression.UnaryExpression":1,CatchClause:1,ConditionalExpression:1,CommentInsideEmptyBlock:1,ClassDeclaration:1,ClassExpression:1,DoWhileStatement:1,ForInStatement:1,ForOfStatement:1,ForStatement:1,FunctionDeclaration:1,FunctionExpression:1,IfStatement:1,MemberExpression:1,MultipleVariableDeclaration:1,NewExpression:1,ObjectExpression:1,"ObjectExpression.BinaryExpression":1,"ObjectExpression.LogicalExpression":1,"ObjectExpression.UnaryExpression":1,ObjectPattern:1,ParameterList:1,ReturnStatement:1,SingleVariableDeclaration:0,SwitchCase:1,SwitchStatement:1,TopLevelFunctionBlock:1,TryStatement:1,"VariableDeclaration.BinaryExpression":1,"VariableDeclaration.LogicalExpression":1,"VariableDeclaration.UnaryExpression":1,WhileStatement:1},lineBreak:{value:"\n",before:{AssignmentExpression:">=1",AssignmentOperator:0,AssignmentPattern:0,ArrayPatternOpening:0,ArrayPatternClosing:0,ArrayPatternComma:0,ArrowFunctionExpressionArrow:0,ArrowFunctionExpressionOpeningBrace:0,ArrowFunctionExpressionClosingBrace:">=1",BlockStatement:0,BreakKeyword:">=1",CallExpression:-1,CallExpressionOpeningParentheses:0,CallExpressionClosingParentheses:-1,ClassDeclaration:">=1",ClassExpression:">=1",ClassOpeningBrace:0,ClassClosingBrace:">=1",ConditionalExpression:">=1",CatchOpeningBrace:0,CatchClosingBrace:">=1",CatchKeyword:0,DeleteOperator:">=1",DoWhileStatement:">=1",DoWhileStatementOpeningBrace:0,DoWhileStatementClosingBrace:">=1",EndOfFile:-1,EmptyStatement:-1,ExportAllDeclaration:">=1",ExportDefaultDeclaration:">=1",ExportNamedDeclaration:">=1",FinallyKeyword:-1,FinallyOpeningBrace:0,FinallyClosingBrace:">=1",ForInStatement:">=1",ForInStatementExpressionOpening:0,ForInStatementExpressionClosing:0,ForInStatementOpeningBrace:0,ForInStatementClosingBrace:">=1",ForOfStatement:">=1",ForOfStatementExpressionOpening:0,ForOfStatementExpressionClosing:0,ForOfStatementOpeningBrace:0,ForOfStatementClosingBrace:">=1",ForStatement:">=1",ForStatementExpressionOpening:0,ForStatementExpressionClosing:"<2",ForStatementOpeningBrace:0,ForStatementClosingBrace:">=1",FunctionExpression:-1,FunctionExpressionOpeningBrace:0,FunctionExpressionClosingBrace:">=1",FunctionDeclaration:">=1",FunctionDeclarationOpeningBrace:0,FunctionDeclarationClosingBrace:">=1",IIFEClosingParentheses:0,IfStatement:">=1",IfStatementOpeningBrace:0,IfStatementClosingBrace:">=1",ElseIfStatement:0,ElseIfStatementOpeningBrace:0,ElseIfStatementClosingBrace:">=1",ElseStatement:0,ElseStatementOpeningBrace:0,ElseStatementClosingBrace:">=1",LogicalExpression:-1,MethodDefinition:">=1",MemberExpressionOpening:0,MemberExpressionClosing:"<2",MemberExpressionPeriod:-1,ObjectExpressionClosingBrace:">=1",ObjectPatternOpeningBrace:0,ObjectPatternClosingBrace:0,ObjectPatternComma:0,Property:">=1",PropertyValue:0,ReturnStatement:-1,SwitchOpeningBrace:0,SwitchClosingBrace:">=1",SwitchCaseColon:0,ThisExpression:-1,ThrowStatement:">=1",TryKeyword:-1,TryOpeningBrace:0,TryClosingBrace:">=1",VariableName:">=1",VariableValue:0,VariableDeclaration:">=1",VariableDeclarationSemiColon:0,VariableDeclarationWithoutInit:">=1",WhileStatement:">=1",WhileStatementOpeningBrace:0,WhileStatementClosingBrace:">=1"},after:{AssignmentExpression:">=1",AssignmentOperator:0,AssignmentPattern:0,ArrayPatternOpening:0,ArrayPatternClosing:0,ArrayPatternComma:0,ArrowFunctionExpressionArrow:0,ArrowFunctionExpressionOpeningBrace:">=1",ArrowFunctionExpressionClosingBrace:-1,BlockStatement:0,BreakKeyword:-1,CallExpression:-1,CallExpressionOpeningParentheses:-1,CallExpressionClosingParentheses:-1,ClassDeclaration:">=1",ClassExpression:">=1",ClassOpeningBrace:">=1",ClassClosingBrace:">=1",CatchOpeningBrace:">=1",CatchClosingBrace:">=0",CatchKeyword:0,ConditionalExpression:">=1",DeleteOperator:">=1",DoWhileStatement:">=1",DoWhileStatementOpeningBrace:">=1",DoWhileStatementClosingBrace:0,EmptyStatement:-1,FinallyKeyword:-1,FinallyOpeningBrace:">=1",FinallyClosingBrace:">=1",ForInStatement:">=1",ForInStatementExpressionOpening:"<2",ForInStatementExpressionClosing:-1,ForInStatementOpeningBrace:">=1",ForInStatementClosingBrace:">=1",ForOfStatement:">=1",ForOfStatementExpressionOpening:"<2",ForOfStatementExpressionClosing:-1,ForOfStatementOpeningBrace:">=1",ForOfStatementClosingBrace:">=1",ForStatement:">=1",ForStatementExpressionOpening:"<2",ForStatementExpressionClosing:-1,ForStatementOpeningBrace:">=1",ForStatementClosingBrace:">=1",FunctionExpression:">=1",FunctionExpressionOpeningBrace:">=1",FunctionExpressionClosingBrace:-1,FunctionDeclaration:">=1",FunctionDeclarationOpeningBrace:">=1",FunctionDeclarationClosingBrace:">=1",IIFEOpeningParentheses:0,IfStatement:">=1",IfStatementOpeningBrace:">=1",IfStatementClosingBrace:">=1",ElseIfStatement:">=1",ElseIfStatementOpeningBrace:">=1",ElseIfStatementClosingBrace:">=1",ElseStatement:">=1",ElseStatementOpeningBrace:">=1",ElseStatementClosingBrace:">=1",LogicalExpression:-1,MethodDefinition:">=1",MemberExpressionOpening:"<2",MemberExpressionClosing:"<2",MemberExpressionPeriod:0,ObjectExpressionOpeningBrace:">=1",ObjectPatternOpeningBrace:0,ObjectPatternClosingBrace:0,ObjectPatternComma:0,Property:0,PropertyName:0,ReturnStatement:-1,SwitchOpeningBrace:">=1",SwitchClosingBrace:">=1",SwitchCaseColon:">=1",ThisExpression:0,ThrowStatement:">=1",TryKeyword:-1,TryOpeningBrace:">=1",TryClosingBrace:0,VariableValue:-1,VariableDeclaration:">=1",VariableDeclarationSemiColon:">=1",WhileStatement:">=1",WhileStatementOpeningBrace:">=1",WhileStatementClosingBrace:">=1"}},whiteSpace:{value:" ",removeTrailing:1,before:{AssignmentPattern:1,ArrayExpressionOpening:0,ArrayExpressionClosing:0,ArrayExpressionComma:0,ArrayPatternOpening:1,ArrayPatternClosing:0,ArrayPatternComma:0,ArrowFunctionExpressionArrow:1,ArrowFunctionExpressionOpeningBrace:1,ArrowFunctionExpressionClosingBrace:0,ArgumentComma:0,ArgumentList:0,AssignmentOperator:1,BinaryExpression:0,BinaryExpressionOperator:1,BlockComment:1,CallExpression:-1,CallExpressionOpeningParentheses:0,CallExpressionClosingParentheses:-1,CatchParameterList:0,CatchOpeningBrace:1,CatchClosingBrace:1,CatchKeyword:1,CommaOperator:0,ClassOpeningBrace:1,ClassClosingBrace:1,ConditionalExpressionConsequent:1,ConditionalExpressionAlternate:1,DoWhileStatementOpeningBrace:1,DoWhileStatementClosingBrace:1,DoWhileStatementConditional:1,EmptyStatement:0,ExpressionClosingParentheses:0,FinallyKeyword:-1,FinallyOpeningBrace:1,FinallyClosingBrace:1,ForInStatement:1,ForInStatementExpressionOpening:1,ForInStatementExpressionClosing:0,ForInStatementOpeningBrace:1,ForInStatementClosingBrace:1,ForOfStatement:1,ForOfStatementExpressionOpening:1,ForOfStatementExpressionClosing:0,ForOfStatementOpeningBrace:1,ForOfStatementClosingBrace:1,ForStatement:1,ForStatementExpressionOpening:1,ForStatementExpressionClosing:0,ForStatementOpeningBrace:1,ForStatementClosingBrace:1,ForStatementSemicolon:0,FunctionDeclarationOpeningBrace:1,FunctionDeclarationClosingBrace:1,FunctionExpressionOpeningBrace:1,FunctionExpressionClosingBrace:1,FunctionGeneratorAsterisk:0,FunctionName:1,IIFEClosingParentheses:0,IfStatementConditionalOpening:1,IfStatementConditionalClosing:0,IfStatementOpeningBrace:1,IfStatementClosingBrace:1,ModuleSpecifierClosingBrace:1,ElseStatementOpeningBrace:1,ElseStatementClosingBrace:1,ElseIfStatementOpeningBrace:1,ElseIfStatementClosingBrace:1,LineComment:1,LogicalExpressionOperator:1,MemberExpressionOpening:0,MemberExpressionClosing:0,MemberExpressionPeriod:0,ObjectExpressionOpeningBrace:-1,ObjectExpressionClosingBrace:0,ObjectPatternOpeningBrace:1,ObjectPatternClosingBrace:0,ObjectPatternComma:0,Property:1,PropertyValue:1,ParameterComma:0,ParameterList:0,SwitchDiscriminantOpening:1,SwitchDiscriminantClosing:0,SwitchCaseColon:0,ThrowKeyword:1,TryKeyword:-1,TryOpeningBrace:1,TryClosingBrace:1,UnaryExpressionOperator:0,VariableName:1,VariableValue:1,VariableDeclarationSemiColon:0,WhileStatementConditionalOpening:1,WhileStatementConditionalClosing:0,WhileStatementOpeningBrace:1,WhileStatementClosingBrace:1},after:{AssignmentPattern:1,ArrayExpressionOpening:0,ArrayExpressionClosing:0,ArrayExpressionComma:1,ArrayPatternOpening:0,ArrayPatternClosing:1,ArrayPatternComma:1,ArrowFunctionExpressionArrow:1,ArrowFunctionExpressionOpeningBrace:0,ArrowFunctionExpressionClosingBrace:0,ArgumentComma:1,ArgumentList:0,AssignmentOperator:1,BinaryExpression:0,BinaryExpressionOperator:1,BlockComment:1,CallExpression:-1,CallExpressionOpeningParentheses:-1,CallExpressionClosingParentheses:-1,CatchParameterList:0,CatchOpeningBrace:1,CatchClosingBrace:1,CatchKeyword:1,ClasOpeningBrace:1,ClassClosingBrace:1,CommaOperator:1,ConditionalExpressionConsequent:1,ConditionalExpressionTest:1,DoWhileStatementOpeningBrace:1,DoWhileStatementClosingBrace:1,DoWhileStatementBody:1,EmptyStatement:0,ExpressionOpeningParentheses:0,FinallyKeyword:-1,FinallyOpeningBrace:1,FinallyClosingBrace:1,ForInStatement:1,ForInStatementExpressionOpening:0,ForInStatementExpressionClosing:1,ForInStatementOpeningBrace:1,ForInStatementClosingBrace:1,ForOfStatement:1,ForOfStatementExpressionOpening:0,ForOfStatementExpressionClosing:1,ForOfStatementOpeningBrace:1,ForOfStatementClosingBrace:1,ForStatement:1,ForStatementExpressionOpening:0,ForStatementExpressionClosing:1,ForStatementClosingBrace:1,ForStatementOpeningBrace:1,ForStatementSemicolon:1,FunctionReservedWord:0,FunctionName:0,FunctionExpressionOpeningBrace:1,FunctionExpressionClosingBrace:0,FunctionDeclarationOpeningBrace:1,FunctionDeclarationClosingBrace:1,IIFEOpeningParentheses:0,IfStatementConditionalOpening:0,IfStatementConditionalClosing:1,IfStatementOpeningBrace:1,IfStatementClosingBrace:1,ModuleSpecifierOpeningBrace:1,ElseStatementOpeningBrace:1,ElseStatementClosingBrace:1,ElseIfStatementOpeningBrace:1,ElseIfStatementClosingBrace:1,MemberExpressionClosing:0,MemberExpressionOpening:0,MemberExpressionPeriod:0,MethodDefinitionName:0,LogicalExpressionOperator:1,ObjectExpressionOpeningBrace:0,ObjectExpressionClosingBrace:0,ObjectPatternOpeningBrace:0,ObjectPatternClosingBrace:1,ObjectPatternComma:1,PropertyName:0,PropertyValue:0,ParameterComma:1,ParameterList:0,SwitchDiscriminantOpening:0,SwitchDiscriminantClosing:1,ThrowKeyword:1,TryKeyword:-1,TryOpeningBrace:1,TryClosingBrace:1,UnaryExpressionOperator:0,VariableName:1,VariableValue:0,VariableDeclarationSemiColon:0,WhileStatementConditionalOpening:0,WhileStatementConditionalClosing:1,WhileStatementOpeningBrace:1,WhileStatementClosingBrace:1}}}},{}],50:[function(require,module,exports){module.exports={preset:"default",indent:{value:" ",IfStatementConditional:2,SwitchStatement:0,TopLevelFunctionBlock:0},lineBreak:{before:{ObjectExpressionOpeningBrace:-1,ObjectExpressionClosingBrace:-1,Property:-1,VariableDeclarationWithoutInit:0},after:{AssignmentOperator:-1,ObjectExpressionOpeningBrace:-1,ObjectExpressionClosingBrace:-1,Property:-1}},whiteSpace:{before:{ArgumentList:1,ArrayExpressionClosing:1,CatchParameterList:1,ExpressionClosingParentheses:1,ForInStatementExpressionClosing:1,ForOfStatementExpressionClosing:1,ForStatementExpressionClosing:1,IfStatementConditionalClosing:1,IIFEClosingParentheses:1,MemberExpressionClosing:1,ObjectExpressionClosingBrace:1,ParameterList:1,SwitchDiscriminantClosing:1,WhileStatementConditionalClosing:1},after:{ArgumentList:1,ArrayExpressionOpening:1,CatchParameterList:1,ExpressionOpeningParentheses:1,ForInStatementExpressionOpening:1,ForOfStatementExpressionOpening:1,ForStatementExpressionOpening:1,IfStatementConditionalOpening:1,IIFEOpeningParentheses:1,MemberExpressionOpening:1,ObjectExpressionOpeningBrace:1,ParameterList:1,PropertyValue:-1,SwitchDiscriminantOpening:1,WhileStatementConditionalOpening:1}}}},{}],51:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _options=require("./options");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var addBrAroundNode=require("./lineBreakAroundNode");var expressionParentheses=require("./hooks/expressionParentheses");var hooks=require("./hooks");var indent=require("./indent");var plugins=require("./plugins");var rocambole=require("rocambole");var _shouldRemoveTrailingWs;exports=module.exports=transform;exports.BYPASS_OPTIONS={};function transform(ast,opts){if(opts!==exports.BYPASS_OPTIONS){_options.set(opts)}_shouldRemoveTrailingWs=Boolean(_options.get("whiteSpace.removeTrailing"));plugins.transformBefore(ast);_tk.eachInBetween(ast.startToken,ast.endToken,preprocessToken);rocambole.moonwalk(ast,transformNode);_tk.eachInBetween(ast.startToken,ast.endToken,postprocessToken);_br.limitBeforeEndOfFile(ast);indent.transform(ast);plugins.transform(ast);plugins.transformAfter(ast);return ast}function transformNode(node){plugins.nodeBefore(node);addBrAroundNode(node);var hook=hooks[node.type];if(hook&&"format"in hook){hook.format(node)}if(node.startToken){_ws.limitBefore(node.startToken,node.type);_ws.limitAfter(node.endToken,node.type)}expressionParentheses.addSpaceInside(node);plugins.nodeAfter(node)}function preprocessToken(token){if(_tk.isComment(token)){_br.limit(token,token.type)}plugins.tokenBefore(token)}function postprocessToken(token){if(_tk.isComment(token)){processComment(token)}else if(_shouldRemoveTrailingWs&&_tk.isWs(token)){removeTrailingWs(token)}plugins.tokenAfter(token)}function processComment(token){_ws.limitBefore(token,token.type);if(token.type==="BlockComment"){_ws.limitAfter(token,token.type);return}var prev=_tk.findPrevNonEmpty(token);var next=_tk.findNextNonEmpty(token);if(!_tk.isComment(prev)){_br.limitBefore(token,"CommentGroup")}if(!_tk.isComment(next)){_br.limitAfter(token,"CommentGroup")}}function removeTrailingWs(token){if(_tk.isBr(token.next)||!token.next){_tk.remove(token)}}},{"./hooks":4,"./hooks/expressionParentheses":43,"./indent":44,"./lineBreakAroundNode":46,"./options":47,"./plugins":48,rocambole:412,"rocambole-linebreak":399,"rocambole-token":401,"rocambole-whitespace":410}],52:[function(require,module,exports){module.exports=function(ast,comments,tokens){if(comments.length){var firstComment=comments[0];var lastComment=comments[comments.length-1];if(!tokens.length){ast.start=lastComment.end;ast.loc.start.line=lastComment.loc.end.line;ast.loc.start.column=lastComment.loc.end.column;if(ast.leadingComments===null&&ast.innerComments.length){ast.leadingComments=ast.innerComments}}else if(firstComment.start<tokens[0].start){var token=tokens[0];ast.start=token.start;ast.loc.start.line=token.loc.start.line;ast.loc.start.column=token.loc.start.column;if(ast.body.length){var node=ast.body[0];node.leadingComments=[];var firstTokenStart=token.start;var len=comments.length;for(var i=0;i<len&&comments[i].start<firstTokenStart;i++){node.leadingComments.push(comments[i])}}}if(tokens.length){var lastToken=tokens[tokens.length-1];if(lastComment.end>lastToken.end){ast.end=lastToken.end;ast.loc.end.line=lastToken.loc.end.line;ast.loc.end.column=lastToken.loc.end.column}}}else{if(!tokens.length){ast.loc.start.line=0;ast.loc.end.line=0}}if(ast.body&&ast.body.length>0){ast.loc.start.line=ast.body[0].loc.start.line;ast.start=ast.body[0].start}ast.range[0]=ast.start;ast.range[1]=ast.end}},{}],53:[function(require,module,exports){module.exports=function(tokens,tt){var startingToken=0;var currentToken=0;var numBraces=0;var numBackQuotes=0;function isBackQuote(token){return tokens[token].type===tt.backQuote}function isTemplateStarter(token){return isBackQuote(token)||tokens[token].type===tt.braceR&&numBackQuotes>0}function isTemplateEnder(token){return isBackQuote(token)||tokens[token].type===tt.dollarBraceL}function createTemplateValue(start,end){var value="";while(start<=end){if(tokens[start].value){value+=tokens[start].value}else if(tokens[start].type!==tt.template){value+=tokens[start].type.label}start++}return value}function replaceWithTemplateType(start,end){var templateToken={type:"Template",value:createTemplateValue(start,end),start:tokens[start].start,end:tokens[end].end,loc:{start:tokens[start].loc.start,end:tokens[end].loc.end}};tokens.splice(start,end-start+1,templateToken)}function trackNumBraces(token){if(tokens[token].type===tt.braceL){numBraces++}else if(tokens[token].type===tt.braceR){numBraces--}}while(startingToken<tokens.length){if(isTemplateStarter(startingToken)&&numBraces===0){if(isBackQuote(startingToken)){numBackQuotes++}currentToken=startingToken+1;if(currentToken>=tokens.length-1||tokens[currentToken].type!==tt.template){break}while(!isTemplateEnder(currentToken)){if(currentToken>=tokens.length-1){break}currentToken++}if(isBackQuote(currentToken)){numBackQuotes--}replaceWithTemplateType(startingToken,currentToken)}else if(numBackQuotes>0){trackNumBraces(startingToken)}startingToken++}}},{}],54:[function(require,module,exports){exports.attachComments=require("./attachComments");exports.toTokens=require("./toTokens");exports.toAST=require("./toAST");exports.convertComments=function(comments){for(var i=0;i<comments.length;i++){var comment=comments[i];if(comment.type==="CommentBlock"){comment.type="Block"}else if(comment.type==="CommentLine"){comment.type="Line"}if(!comment.range){comment.range=[comment.start,comment.end]}}}},{"./attachComments":52,"./toAST":55,"./toTokens":57}],55:[function(require,module,exports){var source;module.exports=function(ast,traverse,code){source=code;ast.sourceType="module";ast.range=[ast.start,ast.end];traverse(ast,astTransformVisitor)};function changeToLiteral(node){node.type="Literal";if(!node.raw){if(node.extra&&node.extra.raw){node.raw=node.extra.raw}else{node.raw=source.slice(node.start,node.end)}}}var astTransformVisitor={noScope:true,enter:function(path){var node=path.node;node.range=[node.start,node.end];node._babelType=node.type;if(node.innerComments){node.trailingComments=node.innerComments;delete node.innerComments}if(node.trailingComments){for(var i=0;i<node.trailingComments.length;i++){var comment=node.trailingComments[i];if(comment.type==="CommentLine"){comment.type="Line"}else if(comment.type==="CommentBlock"){comment.type="Block"}comment.range=[comment.start,comment.end]}}if(node.leadingComments){for(var i=0;i<node.leadingComments.length;i++){var comment=node.leadingComments[i];if(comment.type==="CommentLine"){comment.type="Line"}else if(comment.type==="CommentBlock"){comment.type="Block"}comment.range=[comment.start,comment.end]}}Object.defineProperty(node,"_paths",{value:node._paths,writable:true})},exit:function(path){var node=path.node;[fixDirectives].forEach(function(fixer){fixer(path)});if(path.isJSXText()){node.type="Literal";node.raw=node.value}if(path.isNumericLiteral()||path.isStringLiteral()){changeToLiteral(node)}if(path.isBooleanLiteral()){node.type="Literal";node.raw=String(node.value)}if(path.isNullLiteral()){node.type="Literal";node.raw="null";node.value=null}if(path.isRegExpLiteral()){node.type="Literal";node.raw=node.extra.raw;node.value={};node.regex={pattern:node.pattern,flags:node.flags};delete node.extra;delete node.pattern;delete node.flags}if(path.isObjectProperty()){node.type="Property";node.kind="init"}if(path.isClassMethod()||path.isObjectMethod()){var code=source.slice(node.key.end,node.body.start);var offset=code.indexOf("(");node.value={type:"FunctionExpression",id:node.id,params:node.params,body:node.body,async:node.async,generator:node.generator,expression:node.expression,defaults:[],loc:{start:{line:node.key.loc.start.line,column:node.key.loc.end.column+offset},end:node.body.loc.end}};node.value.range=[node.key.end+offset,node.body.end];if(node.returnType){node.value.returnType=node.returnType}if(node.typeParameters){node.value.typeParameters=node.typeParameters}if(path.isClassMethod()){node.type="MethodDefinition"}if(path.isObjectMethod()){node.type="Property";if(node.kind==="method"){node.kind="init"}}delete node.body;delete node.id;delete node.async;delete node.generator;delete node.expression;delete node.params;delete node.returnType;delete node.typeParameters}if(path.isRestProperty()||path.isSpreadProperty()){node.type="SpreadProperty";node.key=node.value=node.argument}if(path.isQualifiedTypeIdentifier()){delete node.id}if(path.isObjectTypeProperty()){delete node.key}if(path.isObjectTypeIndexer()){delete node.id}if(path.isFunctionTypeParam()){delete node.name}if(path.isImportDeclaration()){delete node.isType}if(path.isExportDeclaration()){var declar=path.get("declaration");if(declar.isClassExpression()){node.declaration.type="ClassDeclaration"}else if(declar.isFunctionExpression()){ | |
node.declaration.type="FunctionDeclaration"}}if(path.isClassProperty()){delete node.key}if(path.isFunction()){if(node.async)node.generator=true}if(path.isFunction()){if(!node.defaults){node.defaults=[]}}if(path.isAwaitExpression()){node.type="YieldExpression";node.delegate=node.all;delete node.all}if(path.isTemplateLiteral()){node.quasis.forEach(function(q){q.range[0]-=1;if(q.tail){q.range[1]+=1}else{q.range[1]+=2}q.loc.start.column-=1;if(q.tail){q.loc.end.column+=1}else{q.loc.end.column+=2}})}}};function fixDirectives(path){if(!(path.isProgram()||path.isFunction()))return;var node=path.node;var directivesContainer=node;var body=node.body;if(node.type!=="Program"){directivesContainer=body;body=body.body}if(!directivesContainer.directives)return;directivesContainer.directives.reverse().forEach(function(directive){directive.type="ExpressionStatement";directive.expression=directive.value;delete directive.value;directive.expression.type="Literal";changeToLiteral(directive.expression);body.unshift(directive)});delete directivesContainer.directives}},{}],56:[function(require,module,exports){module.exports=function(token,tt,source){var type=token.type;token.range=[token.start,token.end];if(type===tt.name){token.type="Identifier"}else if(type===tt.semi||type===tt.comma||type===tt.parenL||type===tt.parenR||type===tt.braceL||type===tt.braceR||type===tt.slash||type===tt.dot||type===tt.bracketL||type===tt.bracketR||type===tt.ellipsis||type===tt.arrow||type===tt.star||type===tt.incDec||type===tt.colon||type===tt.question||type===tt.template||type===tt.backQuote||type===tt.dollarBraceL||type===tt.at||type===tt.logicalOR||type===tt.logicalAND||type===tt.bitwiseOR||type===tt.bitwiseXOR||type===tt.bitwiseAND||type===tt.equality||type===tt.relational||type===tt.bitShift||type===tt.plusMin||type===tt.modulo||type===tt.exponent||type===tt.prefix||type===tt.doubleColon||type.isAssign){token.type="Punctuator";if(!token.value)token.value=type.label}else if(type===tt.jsxTagStart){token.type="Punctuator";token.value="<"}else if(type===tt.jsxTagEnd){token.type="Punctuator";token.value=">"}else if(type===tt.jsxName){token.type="JSXIdentifier"}else if(type===tt.jsxText){token.type="JSXText"}else if(type.keyword==="null"){token.type="Null"}else if(type.keyword==="false"||type.keyword==="true"){token.type="Boolean"}else if(type.keyword){token.type="Keyword"}else if(type===tt.num){token.type="Numeric";token.value=source.slice(token.start,token.end)}else if(type===tt.string){token.type="String";token.value=source.slice(token.start,token.end)}else if(type===tt.regexp){token.type="RegularExpression";var value=token.value;token.regex={pattern:value.pattern,flags:value.flags};token.value="/"+value.pattern+"/"+value.flags}return token}},{}],57:[function(require,module,exports){var convertTemplateType=require("./convertTemplateType");var toToken=require("./toToken");module.exports=function(tokens,tt,code){convertTemplateType(tokens,tt);var transformedTokens=tokens.filter(function(token){return token.type!=="CommentLine"&&token.type!=="CommentBlock"});for(var i=0,l=transformedTokens.length;i<l;i++){transformedTokens[i]=toToken(transformedTokens[i],tt,code)}return transformedTokens}},{"./convertTemplateType":53,"./toToken":56}],58:[function(require,module,exports){"use strict";var _WeakMap=require("babel-runtime/core-js/weak-map")["default"];exports.__esModule=true;exports.clear=clear;var path=new _WeakMap;exports.path=path;var scope=new _WeakMap;exports.scope=scope;function clear(){exports.path=path=new _WeakMap;exports.scope=scope=new _WeakMap}},{"babel-runtime/core-js/weak-map":112}],59:[function(require,module,exports){(function(process){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;var _path=require("./path");var _path2=_interopRequireDefault(_path);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var testing=process.env.NODE_ENV==="test";var TraversalContext=function(){function TraversalContext(scope,opts,state,parentPath){_classCallCheck(this,TraversalContext);this.queue=null;this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalContext.prototype.shouldVisit=function shouldVisit(node){var opts=this.opts;if(opts.enter||opts.exit)return true;if(opts[node.type])return true;var keys=t.VISITOR_KEYS[node.type];if(!keys||!keys.length)return false;for(var _iterator=keys,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var key=_ref;if(node[key])return true}return false};TraversalContext.prototype.create=function create(node,obj,key,listKey){return _path2["default"].get({parentPath:this.parentPath,parent:node,container:obj,key:key,listKey:listKey})};TraversalContext.prototype.maybeQueue=function maybeQueue(path,notPriority){if(this.trap){throw new Error("Infinite cycle detected")}if(this.queue){if(notPriority){this.queue.push(path)}else{this.priorityQueue.push(path)}}};TraversalContext.prototype.visitMultiple=function visitMultiple(container,parent,listKey){if(container.length===0)return false;var queue=[];for(var key=0;key<container.length;key++){var node=container[key];if(node&&this.shouldVisit(node)){queue.push(this.create(parent,container,key,listKey))}}return this.visitQueue(queue)};TraversalContext.prototype.visitSingle=function visitSingle(node,key){if(this.shouldVisit(node[key])){return this.visitQueue([this.create(node,node,key)])}else{return false}};TraversalContext.prototype.visitQueue=function visitQueue(queue){this.queue=queue;this.priorityQueue=[];var visited=[];var stop=false;for(var _i2=0;_i2<queue.length;_i2++){var path=queue[_i2];path.resync();if(path.contexts.length===0||path.contexts[path.contexts.length-1]!==this){path.pushContext(this)}if(path.key===null)continue;if(testing&&queue.length>=1e3){this.trap=true}if(visited.indexOf(path.node)>=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}if(this.priorityQueue.length){stop=this.visitQueue(this.priorityQueue);this.priorityQueue=[];this.queue=queue;if(stop)break}}for(var _i3=0;_i3<queue.length;_i3++){var path=queue[_i3];path.popContext()}this.queue=null;return stop};TraversalContext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return false;if(Array.isArray(nodes)){return this.visitMultiple(nodes,node,key)}else{return this.visitSingle(node,key)}};return TraversalContext}();exports["default"]=TraversalContext;module.exports=exports["default"]}).call(this,require("_process"))},{"./path":68,_process:429,"babel-runtime/core-js/get-iterator":102,"babel-runtime/helpers/class-call-check":113,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],60:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];exports.__esModule=true;var Hub=function Hub(file,options){_classCallCheck(this,Hub);this.file=file;this.options=options};exports["default"]=Hub;module.exports=exports["default"]},{"babel-runtime/helpers/class-call-check":113}],61:[function(require,module,exports){"use strict";var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _Symbol=require("babel-runtime/core-js/symbol")["default"];var _Object$getOwnPropertySymbols=require("babel-runtime/core-js/object/get-own-property-symbols")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];var _interopRequire=require("babel-runtime/helpers/interop-require")["default"];exports.__esModule=true;exports["default"]=traverse;var _context=require("./context");var _context2=_interopRequireDefault(_context);var _visitors=require("./visitors");var visitors=_interopRequireWildcard(_visitors);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _cache=require("./cache");var cache=_interopRequireWildcard(_cache);var _path=require("./path");exports.NodePath=_interopRequire(_path);var _scope=require("./scope");exports.Scope=_interopRequire(_scope);var _hub=require("./hub");exports.Hub=_interopRequire(_hub);exports.visitors=visitors;function traverse(parent,opts,scope,state,parentPath){if(!parent)return;if(!opts)opts={};if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error(messages.get("traverseNeedsParent",parent.type))}}visitors.explode(opts);traverse.node(parent,opts,scope,state,parentPath)}traverse.visitors=visitors;traverse.verify=visitors.verify;traverse.explode=visitors.explode;traverse.NodePath=require("./path");traverse.Scope=require("./scope");traverse.Hub=require("./hub");traverse.cheap=function(node,enter){if(!node)return;var keys=t.VISITOR_KEYS[node.type];if(!keys)return;enter(node);for(var _iterator=keys,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var key=_ref;var subNode=node[key];if(Array.isArray(subNode)){for(var _iterator2=subNode,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:_getIterator(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var _node=_ref2;traverse.cheap(_node,enter)}}else{traverse.cheap(subNode,enter)}}};traverse.node=function(node,opts,scope,state,parentPath,skipKeys){var keys=t.VISITOR_KEYS[node.type];if(!keys)return;var context=new _context2["default"](scope,opts,state,parentPath);for(var _i3=0;_i3<keys.length;_i3++){var key=keys[_i3];if(skipKeys&&skipKeys[key])continue;if(context.visit(node,key))return}};var CLEAR_KEYS=t.COMMENT_KEYS.concat(["tokens","comments","start","end","loc","raw","rawValue"]);traverse.clearNode=function(node){for(var _i4=0;_i4<CLEAR_KEYS.length;_i4++){var key=CLEAR_KEYS[_i4];if(node[key]!=null)node[key]=undefined}for(var key in node){if(key[0]==="_"&&node[key]!=null)node[key]=undefined}cache.path["delete"](node);var syms=_Object$getOwnPropertySymbols(node);for(var _i5=0;_i5<syms.length;_i5++){var sym=syms[_i5];node[sym]=null}};traverse.removeProperties=function(tree){traverse.cheap(tree,traverse.clearNode);return tree};function hasBlacklistedType(path,state){if(path.node.type===state.type){state.has=true;path.skip()}}traverse.hasType=function(tree,scope,type,blacklistTypes){if(_lodashCollectionIncludes2["default"](blacklistTypes,tree.type))return false;if(tree.type===type)return true;var state={has:false,type:type};traverse(tree,{blacklist:blacklistTypes,enter:hasBlacklistedType},scope,state);return state.has};traverse.clearCache=function(){cache.clear()};traverse.copyCache=function(source,destination){if(cache.path.has(source)){cache.path.set(destination,cache.path.get(source))}}},{"./cache":58,"./context":59,"./hub":60,"./path":68,"./scope":80,"./visitors":82,"babel-messages":101,"babel-runtime/core-js/get-iterator":102,"babel-runtime/core-js/object/get-own-property-symbols":108,"babel-runtime/core-js/symbol":110,"babel-runtime/helpers/interop-require":119,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201,"lodash/collection/includes":221}],62:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;exports.findParent=findParent;exports.find=find;exports.getFunctionParent=getFunctionParent;exports.getStatementParent=getStatementParent;exports.getEarliestCommonAncestorFrom=getEarliestCommonAncestorFrom;exports.getDeepestCommonAncestorFrom=getDeepestCommonAncestorFrom;exports.getAncestry=getAncestry;exports.inType=inType;exports.inShadow=inShadow;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _index=require("./index");var _index2=_interopRequireDefault(_index);function findParent(callback){var path=this;while(path=path.parentPath){if(callback(path))return path}return null}function find(callback){var path=this;do{if(callback(path))return path}while(path=path.parentPath);return null}function getFunctionParent(){return this.findParent(function(path){return path.isFunction()||path.isProgram()})}function getStatementParent(){var path=this;do{if(Array.isArray(path.container)){return path}}while(path=path.parentPath)}function getEarliestCommonAncestorFrom(paths){return this.getDeepestCommonAncestorFrom(paths,function(deepest,i,ancestries){var earliest=undefined;var keys=t.VISITOR_KEYS[deepest.type];var _arr=ancestries;for(var _i=0;_i<_arr.length;_i++){var ancestry=_arr[_i];var path=ancestry[i+1];if(!earliest){earliest=path;continue}if(path.listKey&&earliest.listKey===path.listKey){if(path.key<earliest.key){earliest=path;continue}}var earliestKeyIndex=keys.indexOf(earliest.parentKey);var currentKeyIndex=keys.indexOf(path.parentKey);if(earliestKeyIndex>currentKeyIndex){earliest=path}}return earliest})}function getDeepestCommonAncestorFrom(paths,filter){var _this=this;if(!paths.length){return this}if(paths.length===1){return paths[0]}var minDepth=Infinity;var lastCommonIndex=undefined,lastCommon=undefined;var ancestries=paths.map(function(path){var ancestry=[];do{ancestry.unshift(path)}while((path=path.parentPath)&&path!==_this);if(ancestry.length<minDepth){minDepth=ancestry.length}return ancestry});var first=ancestries[0];depthLoop:for(var i=0;i<minDepth;i++){var shouldMatch=first[i];var _arr2=ancestries;for(var _i2=0;_i2<_arr2.length;_i2++){var ancestry=_arr2[_i2];if(ancestry[i]!==shouldMatch){break depthLoop}}lastCommonIndex=i;lastCommon=shouldMatch}if(lastCommon){if(filter){return filter(lastCommon,lastCommonIndex,ancestries)}else{return lastCommon}}else{throw new Error("Couldn't find intersection")}}function getAncestry(){var path=this;var paths=[];do{paths.push(path)}while(path=path.parentPath);return paths}function inType(){var path=this;while(path){var _arr3=arguments;for(var _i3=0;_i3<_arr3.length;_i3++){var type=_arr3[_i3];if(path.node.type===type)return true}path=path.parentPath}return false}function inShadow(key){var parentFn=this.isFunction()?this:this.findParent(function(p){return p.isFunction()});if(!parentFn)return;if(parentFn.isFunctionExpression()||parentFn.isFunctionDeclaration()){var shadow=parentFn.node.shadow;if(shadow&&(!key||shadow[key]!==false)){return parentFn}}else if(parentFn.isArrowFunctionExpression()){return parentFn}return null}},{"./index":68,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],63:[function(require,module,exports){"use strict";exports.__esModule=true;exports.shareCommentsWithSiblings=shareCommentsWithSiblings;exports.addComment=addComment;exports.addComments=addComments;function shareCommentsWithSiblings(){var node=this.node;if(!node)return;var trailing=node.trailingComments;var leading=node.leadingComments;if(!trailing&&!leading)return;var prev=this.getSibling(this.key-1);var next=this.getSibling(this.key+1);if(!prev.node)prev=next;if(!next.node)next=prev;prev.addComments("trailing",leading);next.addComments("leading",trailing)}function addComment(type,content,line){this.addComments(type,[{type:line?"CommentLine":"CommentBlock",value:content}])}function addComments(type,comments){if(!comments)return;var node=this.node;if(!node)return;var key=type+"Comments";if(node[key]){node[key]=node[key].concat(comments)}else{node[key]=comments}}},{}],64:[function(require,module,exports){"use strict";var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;exports.call=call;exports._call=_call;exports.isBlacklisted=isBlacklisted;exports.visit=visit;exports.skip=skip;exports.skipKey=skipKey;exports.stop=stop;exports.setScope=setScope;exports.setContext=setContext;exports.resync=resync;exports._resyncParent=_resyncParent;exports._resyncKey=_resyncKey;exports._resyncList=_resyncList;exports._resyncRemoved=_resyncRemoved;exports.popContext=popContext;exports.pushContext=pushContext;exports.setup=setup;exports.setKey=setKey;exports.requeue=requeue;exports._getQueueContexts=_getQueueContexts;var _index=require("../index");var _index2=_interopRequireDefault(_index);function call(key){var opts=this.opts;this.debug(function(){return key});if(this.node){if(this._call(opts[key]))return true}if(this.node){return this._call(opts[this.node.type]&&opts[this.node.type][key])}return false}function _call(fns){if(!fns)return false;for(var _i=0;_i<fns.length;_i++){var fn=fns[_i];if(!fn)continue;var node=this.node;if(!node)return true;var ret=fn.call(this.state,this,this.state);if(ret)throw new Error("Unexpected return value from visitor method "+fn);if(this.node!==node)return true;if(this.shouldStop||this.shouldSkip||this.removed)return true}return false}function isBlacklisted(){var blacklist=this.opts.blacklist;return blacklist&&blacklist.indexOf(this.node.type)>-1}function visit(){if(!this.node){return false}if(this.isBlacklisted()){return false}if(this.opts.shouldSkip&&this.opts.shouldSkip(this)){return false}if(this.call("enter")||this.shouldSkip){this.debug(function(){return"Skip..."});return this.shouldStop}this.debug(function(){return"Recursing into..."});_index2["default"].node(this.node,this.opts,this.scope,this.state,this,this.skipKeys);this.call("exit");return this.shouldStop}function skip(){this.shouldSkip=true}function skipKey(key){this.skipKeys[key]=true}function stop(){this.shouldStop=true;this.shouldSkip=true}function setScope(){if(this.opts&&this.opts.noScope)return;var target=this.context&&this.context.scope;if(!target){var path=this.parentPath;while(path&&!target){if(path.opts&&path.opts.noScope)return;target=path.scope;path=path.parentPath}}this.scope=this.getScope(target);if(this.scope)this.scope.init()}function setContext(context){this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.skipKeys={};if(context){this.context=context;this.state=context.state;this.opts=context.opts}this.setScope();return this}function resync(){if(this.removed)return;this._resyncParent();this._resyncList();this._resyncKey()}function _resyncParent(){if(this.parentPath){this.parent=this.parentPath.node}}function _resyncKey(){if(!this.container)return;if(this.node===this.container[this.key])return;if(Array.isArray(this.container)){for(var i=0;i<this.container.length;i++){if(this.container[i]===this.node){return this.setKey(i)}}}else{for(var key in this.container){if(this.container[key]===this.node){return this.setKey(key)}}}this.key=null}function _resyncList(){if(!this.parent||!this.inList)return;var newContainer=this.parent[this.listKey];if(this.container===newContainer)return;this.container=newContainer||null}function _resyncRemoved(){if(this.key==null||!this.container||this.container[this.key]!==this.node){this._markRemoved()}}function popContext(){this.contexts.pop();this.setContext(this.contexts[this.contexts.length-1])}function pushContext(context){this.contexts.push(context);this.setContext(context)}function setup(parentPath,container,listKey,key){this.inList=!!listKey;this.listKey=listKey;this.parentKey=listKey||key;this.container=container;this.parentPath=parentPath||this.parentPath;this.setKey(key)}function setKey(key){this.key=key;this.node=this.container[this.key];this.type=this.node&&this.node.type}function requeue(){var pathToQueue=arguments.length<=0||arguments[0]===undefined?this:arguments[0];if(pathToQueue.removed)return;var contexts=this.contexts;for(var _iterator=contexts,_isArray=Array.isArray(_iterator),_i2=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i2>=_iterator.length)break;_ref=_iterator[_i2++]}else{_i2=_iterator.next();if(_i2.done)break;_ref=_i2.value}var context=_ref;context.maybeQueue(pathToQueue)}}function _getQueueContexts(){var path=this;var contexts=this.contexts;while(!contexts.length){path=path.parentPath;contexts=path.contexts}return contexts}},{"../index":61,"babel-runtime/core-js/get-iterator":102,"babel-runtime/helpers/interop-require-default":117}],65:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.ensureBlock=ensureBlock;exports.arrowFunctionToShadowed=arrowFunctionToShadowed;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function toComputedKey(){var node=this.node;var key=undefined;if(this.isMemberExpression()){key=node.property}else if(this.isProperty()||this.isMethod()){key=node.key}else{throw new ReferenceError("todo")}if(!node.computed){if(t.isIdentifier(key))key=t.stringLiteral(key.name)}return key}function ensureBlock(){return t.ensureBlock(this.node)}function arrowFunctionToShadowed(){if(!this.isArrowFunctionExpression())return;this.ensureBlock();var node=this.node;node.expression=false;node.type="FunctionExpression";node.shadow=node.shadow||true}},{"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],66:[function(require,module,exports){(function(global){"use strict";exports.__esModule=true;exports.evaluateTruthy=evaluateTruthy;exports.evaluate=evaluate;var VALID_CALLEES=["String","Number","Math"];var INVALID_METHODS=["random"];function evaluateTruthy(){var res=this.evaluate();if(res.confident)return!!res.value}function evaluate(){var confident=true;var deoptPath=undefined;function deopt(path){if(!confident)return;deoptPath=path;confident=false}var value=evaluate(this);if(!confident)value=undefined;return{confident:confident,deopt:deoptPath,value:value};function evaluate(path){if(!confident)return;var node=path.node;if(path.isSequenceExpression()){var exprs=path.get("expressions");return evaluate(exprs[exprs.length-1])}if(path.isStringLiteral()||path.isNumericLiteral()||path.isBooleanLiteral()){return node.value}if(path.isNullLiteral()){return null}if(path.isTemplateLiteral()){var str="";var i=0;var exprs=path.get("expressions");var _arr=node.quasis;for(var _i=0;_i<_arr.length;_i++){var elem=_arr[_i];if(!confident)break;str+=elem.value.cooked;var expr=exprs[i++];if(expr)str+=String(evaluate(expr))}if(!confident)return;return str}if(path.isConditionalExpression()){var testResult=evaluate(path.get("test"));if(!confident)return;if(testResult){return evaluate(path.get("consequent"))}else{return evaluate(path.get("alternate"))}}if(path.isExpressionWrapper()){return evaluate(path.get("expression"))}if(path.isMemberExpression()&&!path.parentPath.isCallExpression({callee:node})){var property=path.get("property");var object=path.get("object");if(object.isLiteral()&&property.isIdentifier()){var _value=object.node.value;var type=typeof _value;if(type==="number"||type==="string"){return _value[property.node.name]}}}if(path.isReferencedIdentifier()){var binding=path.scope.getBinding(node.name);if(binding&&binding.hasValue){return binding.value}else{if(node.name==="undefined"){return undefined}else if(node.name==="Infinity"){return Infinity}else if(node.name==="NaN"){return NaN}var resolved=path.resolve();if(resolved===path){return deopt(path)}else{return evaluate(resolved)}}}if(path.isUnaryExpression({prefix:true})){if(node.operator==="void"){return undefined}var argument=path.get("argument");if(node.operator==="typeof"&&(argument.isFunction()||argument.isClass())){return"function"}var arg=evaluate(argument);if(!confident)return;switch(node.operator){case"!":return!arg;case"+":return+arg;case"-":return-arg;case"~":return~arg;case"typeof":return typeof arg}}if(path.isArrayExpression()){var arr=[];var elems=path.get("elements");for(var _i2=0;_i2<elems.length;_i2++){var elem=elems[_i2];elem=elem.evaluate();if(elem.confident){arr.push(elem.value)}else{return deopt(elem)}}return arr}if(path.isObjectExpression()){}if(path.isLogicalExpression()){var wasConfident=confident;var left=evaluate(path.get("left"));var leftConfident=confident;confident=wasConfident;var right=evaluate(path.get("right"));var rightConfident=confident;confident=leftConfident&&rightConfident;switch(node.operator){case"||":if(left&&leftConfident){confident=true;return left}if(!confident)return;return left||right;case"&&":if(!left&&leftConfident||!right&&rightConfident){confident=true}if(!confident)return;return left&&right}}if(path.isBinaryExpression()){var left=evaluate(path.get("left"));if(!confident)return;var right=evaluate(path.get("right"));if(!confident)return;switch(node.operator){case"-":return left-right;case"+":return left+right;case"/":return left/right;case"*":return left*right;case"%":return left%right;case"**":return Math.pow(left,right);case"<":return left<right;case">":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right;case"|":return left|right;case"&":return left&right;case"^":return left^right;case"<<":return left<<right;case">>":return left>>right;case">>>":return left>>>right}}if(path.isCallExpression()){var callee=path.get("callee");var context=undefined;var func=undefined;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name,true)&&VALID_CALLEES.indexOf(callee.node.name)>=0){func=global[node.callee.name]}if(callee.isMemberExpression()){var object=callee.get("object");var property=callee.get("property");if(object.isIdentifier()&&property.isIdentifier()&&VALID_CALLEES.indexOf(object.node.name)>=0&&INVALID_METHODS.indexOf(property.node.name)<0){context=global[object.node.name];func=context[property.node.name]}if(object.isLiteral()&&property.isIdentifier()){var type=typeof object.node.value;if(type==="string"||type==="number"){context=object.node.value;func=context[property.node.name]}}}if(func){var args=path.get("arguments").map(evaluate);if(!confident)return;return func.apply(context,args)}}deopt(path)}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],67:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.getStatementParent=getStatementParent;exports.getOpposite=getOpposite;exports.getCompletionRecords=getCompletionRecords;exports.getSibling=getSibling;exports.get=get;exports._getKey=_getKey;exports._getPattern=_getPattern;exports.getBindingIdentifiers=getBindingIdentifiers;exports.getOuterBindingIdentifiers=getOuterBindingIdentifiers;var _index=require("./index");var _index2=_interopRequireDefault(_index);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function getStatementParent(){var path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement()){break}else{path=path.parentPath}}while(path);if(path&&(path.isProgram()||path.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return path}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}}function getCompletionRecords(){var paths=[];var add=function add(path){if(path)paths=paths.concat(path.getCompletionRecords())};if(this.isIfStatement()){add(this.get("consequent"));add(this.get("alternate"))}else if(this.isDoExpression()||this.isFor()||this.isWhile()){add(this.get("body"))}else if(this.isProgram()||this.isBlockStatement()){add(this.get("body").pop())}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else if(this.isTryStatement()){add(this.get("block"));add(this.get("handler"));add(this.get("finalizer"))}else{paths.push(this)}return paths}function getSibling(key){return _index2["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key})}function get(key,context){if(context===true)context=this.context;var parts=key.split(".");if(parts.length===1){return this._getKey(key,context)}else{return this._getPattern(parts,context)}}function _getKey(key,context){var _this=this;var node=this.node;var container=node[key];if(Array.isArray(container)){return container.map(function(_,i){return _index2["default"].get({listKey:key,parentPath:_this,parent:node,container:container,key:i}).setContext(context)})}else{return _index2["default"].get({parentPath:this,parent:node,container:node,key:key}).setContext(context)}}function _getPattern(parts,context){var path=this;var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];if(part==="."){path=path.parentPath}else{if(Array.isArray(path)){path=path[part]}else{path=path.get(part,context)}}}return path}function getBindingIdentifiers(duplicates){return t.getBindingIdentifiers(this.node,duplicates)}function getOuterBindingIdentifiers(duplicates){return t.getOuterBindingIdentifiers(this.node,duplicates)}},{"./index":68,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],68:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;var _libVirtualTypes=require("./lib/virtual-types");var virtualTypes=_interopRequireWildcard(_libVirtualTypes);var _debug2=require("debug");var _debug3=_interopRequireDefault(_debug2);var _invariant=require("invariant");var _invariant2=_interopRequireDefault(_invariant);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _scope=require("../scope");var _scope2=_interopRequireDefault(_scope);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _cache=require("../cache");var _debug=_debug3["default"]("babel");var NodePath=function(){function NodePath(hub,parent){_classCallCheck(this,NodePath);this.parent=parent;this.hub=hub;this.contexts=[];this.data={};this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.state=null;this.opts=null;this.skipKeys=null;this.parentPath=null;this.context=null;this.container=null;this.listKey=null;this.inList=false;this.parentKey=null;this.key=null;this.node=null;this.scope=null;this.type=null;this.typeAnnotation=null}NodePath.get=function get(_ref){var hub=_ref.hub;var parentPath=_ref.parentPath;var parent=_ref.parent;var container=_ref.container;var listKey=_ref.listKey;var key=_ref.key;if(!hub&&parentPath){hub=parentPath.hub}_invariant2["default"](parent,"To get a node path the parent needs to exist");var targetNode=container[key];var paths=_cache.path.get(parent)||[]; | |
if(!_cache.path.has(parent)){_cache.path.set(parent,paths)}var path=undefined;for(var i=0;i<paths.length;i++){var pathCheck=paths[i];if(pathCheck.node===targetNode){path=pathCheck;break}}if(path&&!(path instanceof NodePath)){if(path.constructor.name==="NodePath"){path=null}else{throw new Error("We found a path that isn't a NodePath instance. Possibly due to bad serialisation.")}}if(!path){path=new NodePath(hub,parent);paths.push(path)}path.setup(parentPath,container,listKey,key);return path};NodePath.prototype.getScope=function getScope(scope){var ourScope=scope;if(this.isScope()){ourScope=new _scope2["default"](this,scope)}return ourScope};NodePath.prototype.setData=function setData(key,val){return this.data[key]=val};NodePath.prototype.getData=function getData(key,def){var val=this.data[key];if(!val&&def)val=this.data[key]=def;return val};NodePath.prototype.buildCodeFrameError=function buildCodeFrameError(msg){var Error=arguments.length<=1||arguments[1]===undefined?SyntaxError:arguments[1];return this.hub.file.buildCodeFrameError(this.node,msg,Error)};NodePath.prototype.traverse=function traverse(visitor,state){_index2["default"](this.node,visitor,this.scope,state,this)};NodePath.prototype.mark=function mark(type,message){this.hub.file.metadata.marked.push({type:type,message:message,loc:this.node.loc})};NodePath.prototype.set=function set(key,node){t.validate(this.node,key,node);this.node[key]=node};NodePath.prototype.getPathLocation=function getPathLocation(){var parts=[];var path=this;do{var key=path.key;if(path.inList)key=path.listKey+"["+key+"]";parts.unshift(key)}while(path=path.parentPath);return parts.join(".")};NodePath.prototype.debug=function debug(buildMessage){if(!_debug.enabled)return;_debug(this.getPathLocation()+" "+this.type+": "+buildMessage())};return NodePath}();exports["default"]=NodePath;_lodashObjectAssign2["default"](NodePath.prototype,require("./ancestry"));_lodashObjectAssign2["default"](NodePath.prototype,require("./inference"));_lodashObjectAssign2["default"](NodePath.prototype,require("./replacement"));_lodashObjectAssign2["default"](NodePath.prototype,require("./evaluation"));_lodashObjectAssign2["default"](NodePath.prototype,require("./conversion"));_lodashObjectAssign2["default"](NodePath.prototype,require("./introspection"));_lodashObjectAssign2["default"](NodePath.prototype,require("./context"));_lodashObjectAssign2["default"](NodePath.prototype,require("./removal"));_lodashObjectAssign2["default"](NodePath.prototype,require("./modification"));_lodashObjectAssign2["default"](NodePath.prototype,require("./family"));_lodashObjectAssign2["default"](NodePath.prototype,require("./comments"));var _arr=t.TYPES;var _loop=function(){var type=_arr[_i];var typeKey="is"+type;NodePath.prototype[typeKey]=function(opts){return t[typeKey](this.node,opts)};NodePath.prototype["assert"+type]=function(opts){if(!this[typeKey](opts)){throw new TypeError("Expected node path of type "+type)}}};for(var _i=0;_i<_arr.length;_i++){_loop()}var _loop2=function(type){if(type[0]==="_")return"continue";if(t.TYPES.indexOf(type)<0)t.TYPES.push(type);var virtualType=virtualTypes[type];NodePath.prototype["is"+type]=function(opts){return virtualType.checkPath(this,opts)}};for(var type in virtualTypes){var _ret2=_loop2(type);if(_ret2==="continue")continue}module.exports=exports["default"]},{"../cache":58,"../index":61,"../scope":80,"./ancestry":62,"./comments":63,"./context":64,"./conversion":65,"./evaluation":66,"./family":67,"./inference":69,"./introspection":72,"./lib/virtual-types":75,"./modification":76,"./removal":77,"./replacement":78,"babel-runtime/helpers/class-call-check":113,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201,debug:210,invariant:215,"lodash/object/assign":292}],69:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.getTypeAnnotation=getTypeAnnotation;exports._getTypeAnnotation=_getTypeAnnotation;exports.isBaseType=isBaseType;exports.couldBeBaseType=couldBeBaseType;exports.baseTypeStrictlyMatches=baseTypeStrictlyMatches;exports.isGenericType=isGenericType;var _inferers=require("./inferers");var inferers=_interopRequireWildcard(_inferers);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function getTypeAnnotation(){if(this.typeAnnotation)return this.typeAnnotation;var type=this._getTypeAnnotation()||t.anyTypeAnnotation();if(t.isTypeAnnotation(type))type=type.typeAnnotation;return this.typeAnnotation=type}function _getTypeAnnotation(){var node=this.node;if(!node){if(this.key==="init"&&this.parentPath.isVariableDeclarator()){var declar=this.parentPath.parentPath;var declarParent=declar.parentPath;if(declar.key==="left"&&declarParent.isForInStatement()){return t.stringTypeAnnotation()}if(declar.key==="left"&&declarParent.isForOfStatement()){return t.anyTypeAnnotation()}return t.voidTypeAnnotation()}else{return}}if(node.typeAnnotation){return node.typeAnnotation}var inferer=inferers[node.type];if(inferer){return inferer.call(this,node)}inferer=inferers[this.parentPath.type];if(inferer&&inferer.validParent){return this.parentPath.getTypeAnnotation()}}function isBaseType(baseName,soft){return _isBaseType(baseName,this.getTypeAnnotation(),soft)}function _isBaseType(baseName,type,soft){if(baseName==="string"){return t.isStringTypeAnnotation(type)}else if(baseName==="number"){return t.isNumberTypeAnnotation(type)}else if(baseName==="boolean"){return t.isBooleanTypeAnnotation(type)}else if(baseName==="any"){return t.isAnyTypeAnnotation(type)}else if(baseName==="mixed"){return t.isMixedTypeAnnotation(type)}else if(baseName==="void"){return t.isVoidTypeAnnotation(type)}else{if(soft){return false}else{throw new Error("Unknown base type "+baseName)}}}function couldBeBaseType(name){var type=this.getTypeAnnotation();if(t.isAnyTypeAnnotation(type))return true;if(t.isUnionTypeAnnotation(type)){var _arr=type.types;for(var _i=0;_i<_arr.length;_i++){var type2=_arr[_i];if(t.isAnyTypeAnnotation(type2)||_isBaseType(name,type2,true)){return true}}return false}else{return _isBaseType(name,type,true)}}function baseTypeStrictlyMatches(right){var left=this.getTypeAnnotation();right=right.getTypeAnnotation();if(!t.isAnyTypeAnnotation(left)&&t.isFlowBaseAnnotation(left)){return right.type===left.type}}function isGenericType(genericName){var type=this.getTypeAnnotation();return t.isGenericTypeAnnotation(type)&&t.isIdentifier(type.id,{name:genericName})}},{"./inferers":71,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],70:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);exports["default"]=function(node){if(!this.isReferenced())return;var binding=this.scope.getBinding(node.name);if(binding){if(binding.identifier.typeAnnotation){return binding.identifier.typeAnnotation}else{return getTypeAnnotationBindingConstantViolations(this,node.name)}}if(node.name==="undefined"){return t.voidTypeAnnotation()}else if(node.name==="NaN"||node.name==="Infinity"){return t.numberTypeAnnotation()}else if(node.name==="arguments"){}};function getTypeAnnotationBindingConstantViolations(path,name){var binding=path.scope.getBinding(name);var types=[];path.typeAnnotation=t.unionTypeAnnotation(types);var functionConstantViolations=[];var constantViolations=getConstantViolationsBefore(binding,path,functionConstantViolations);var testType=getConditionalAnnotation(path,name);if(testType){(function(){var testConstantViolations=getConstantViolationsBefore(binding,testType.ifStatement);constantViolations=constantViolations.filter(function(path){return testConstantViolations.indexOf(path)<0});types.push(testType.typeAnnotation)})()}if(constantViolations.length){constantViolations=constantViolations.concat(functionConstantViolations);var _arr=constantViolations;for(var _i=0;_i<_arr.length;_i++){var violation=_arr[_i];types.push(violation.getTypeAnnotation())}}if(types.length){return t.createUnionTypeAnnotation(types)}}function getConstantViolationsBefore(binding,path,functions){var violations=binding.constantViolations.slice();violations.unshift(binding.path);return violations.filter(function(violation){violation=violation.resolve();var status=violation._guessExecutionStatusRelativeTo(path);if(functions&&status==="function")functions.push(violation);return status==="before"})}function inferAnnotationFromBinaryExpression(name,path){var operator=path.node.operator;var right=path.get("right").resolve();var left=path.get("left").resolve();var target=undefined;if(left.isIdentifier({name:name})){target=right}else if(right.isIdentifier({name:name})){target=left}if(target){if(operator==="==="){return target.getTypeAnnotation()}else if(t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else{return}}else{if(operator!=="===")return}var typeofPath=undefined;var typePath=undefined;if(left.isUnaryExpression({operator:"typeof"})){typeofPath=left;typePath=right}else if(right.isUnaryExpression({operator:"typeof"})){typeofPath=right;typePath=left}if(!typePath&&!typeofPath)return;typePath=typePath.resolve();if(!typePath.isLiteral())return;var typeValue=typePath.node.value;if(typeof typeValue!=="string")return;if(!typeofPath.get("argument").isIdentifier({name:name}))return;return t.createTypeAnnotationBasedOnTypeof(typePath.node.value)}function getParentConditionalPath(path){var parentPath=undefined;while(parentPath=path.parentPath){if(parentPath.isIfStatement()||parentPath.isConditionalExpression()){if(path.key==="test"){return}else{return parentPath}}else{path=parentPath}}}function getConditionalAnnotation(path,name){var ifStatement=getParentConditionalPath(path);if(!ifStatement)return;var test=ifStatement.get("test");var paths=[test];var types=[];do{var _path=paths.shift().resolve();if(_path.isLogicalExpression()){paths.push(_path.get("left"));paths.push(_path.get("right"))}if(_path.isBinaryExpression()){var type=inferAnnotationFromBinaryExpression(name,_path);if(type)types.push(type)}}while(paths.length);if(types.length){return{typeAnnotation:t.createUnionTypeAnnotation(types),ifStatement:ifStatement}}else{return getConditionalAnnotation(ifStatement,name)}}module.exports=exports["default"]},{"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],71:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];var _interopRequire=require("babel-runtime/helpers/interop-require")["default"];exports.__esModule=true;exports.VariableDeclarator=VariableDeclarator;exports.TypeCastExpression=TypeCastExpression;exports.NewExpression=NewExpression;exports.TemplateLiteral=TemplateLiteral;exports.UnaryExpression=UnaryExpression;exports.BinaryExpression=BinaryExpression;exports.LogicalExpression=LogicalExpression;exports.ConditionalExpression=ConditionalExpression;exports.SequenceExpression=SequenceExpression;exports.AssignmentExpression=AssignmentExpression;exports.UpdateExpression=UpdateExpression;exports.StringLiteral=StringLiteral;exports.NumericLiteral=NumericLiteral;exports.BooleanLiteral=BooleanLiteral;exports.NullLiteral=NullLiteral;exports.RegExpLiteral=RegExpLiteral;exports.ObjectExpression=ObjectExpression;exports.ArrayExpression=ArrayExpression;exports.RestElement=RestElement;exports.CallExpression=CallExpression;exports.TaggedTemplateExpression=TaggedTemplateExpression;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _infererReference=require("./inferer-reference");exports.Identifier=_interopRequire(_infererReference);function VariableDeclarator(){var id=this.get("id");if(id.isIdentifier()){return this.get("init").getTypeAnnotation()}else{return}}function TypeCastExpression(node){return node.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(node){if(this.get("callee").isIdentifier()){return t.genericTypeAnnotation(node.callee)}}function TemplateLiteral(){return t.stringTypeAnnotation()}function UnaryExpression(node){var operator=node.operator;if(operator==="void"){return t.voidTypeAnnotation()}else if(t.NUMBER_UNARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.STRING_UNARY_OPERATORS.indexOf(operator)>=0){return t.stringTypeAnnotation()}else if(t.BOOLEAN_UNARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}}function BinaryExpression(node){var operator=node.operator;if(t.NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.BOOLEAN_BINARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}else if(operator==="+"){var right=this.get("right");var left=this.get("left");if(left.isBaseType("number")&&right.isBaseType("number")){return t.numberTypeAnnotation()}else if(left.isBaseType("string")||right.isBaseType("string")){return t.stringTypeAnnotation()}return t.unionTypeAnnotation([t.stringTypeAnnotation(),t.numberTypeAnnotation()])}}function LogicalExpression(){return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function ConditionalExpression(){return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function SequenceExpression(){return this.get("expressions").pop().getTypeAnnotation()}function AssignmentExpression(){return this.get("right").getTypeAnnotation()}function UpdateExpression(node){var operator=node.operator;if(operator==="++"||operator==="--"){return t.numberTypeAnnotation()}}function StringLiteral(){return t.stringTypeAnnotation()}function NumericLiteral(){return t.numberTypeAnnotation()}function BooleanLiteral(){return t.booleanTypeAnnotation()}function NullLiteral(){return t.nullLiteralTypeAnnotation()}function RegExpLiteral(){return t.genericTypeAnnotation(t.identifier("RegExp"))}function ObjectExpression(){return t.genericTypeAnnotation(t.identifier("Object"))}function ArrayExpression(){return t.genericTypeAnnotation(t.identifier("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return t.genericTypeAnnotation(t.identifier("Function"))}exports.Function=Func;exports.Class=Func;function CallExpression(){return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(callee){callee=callee.resolve();if(callee.isFunction()){if(callee.is("async")){if(callee.is("generator")){return t.genericTypeAnnotation(t.identifier("AsyncIterator"))}else{return t.genericTypeAnnotation(t.identifier("Promise"))}}else{if(callee.node.returnType){return callee.node.returnType}else{}}}}},{"./inferer-reference":70,"babel-runtime/helpers/interop-require":119,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],72:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.matchesPattern=matchesPattern;exports.has=has;exports.isStatic=isStatic;exports.isnt=isnt;exports.equals=equals;exports.isNodeType=isNodeType;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;exports.isCompletionRecord=isCompletionRecord;exports.isStatementOrBlock=isStatementOrBlock;exports.referencesImport=referencesImport;exports.getSource=getSource;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports._guessExecutionStatusRelativeToDifferentFunctions=_guessExecutionStatusRelativeToDifferentFunctions;exports.resolve=resolve;exports._resolve=_resolve;var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function matchesPattern(pattern,allowPartial){if(!this.isMemberExpression())return false;var parts=pattern.split(".");var search=[this.node];var i=0;function matches(name){var part=parts[i];return part==="*"||name===part}while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(!matches(node.name))return false}else if(t.isLiteral(node)){if(!matches(node.value))return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.unshift(node.property);search.unshift(node.object);continue}}else if(t.isThisExpression(node)){if(!matches("this"))return false}else{return false}if(++i>parts.length){return false}}return i===parts.length}function has(key){var val=this.node&&this.node[key];if(val&&Array.isArray(val)){return!!val.length}else{return!!val}}function isStatic(){return this.scope.isStatic(this.node)}var is=has;exports.is=is;function isnt(key){return!this.has(key)}function equals(key,value){return this.node[key]===value}function isNodeType(type){return t.isType(this.type,type)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(replacement){if(this.key!=="body"||!this.parentPath.isArrowFunctionExpression()){return false}if(this.isExpression()){return t.isBlockStatement(replacement)}else if(this.isBlockStatement()){return t.isExpression(replacement)}return false}function isCompletionRecord(allowInsideFunction){var path=this;var first=true;do{var container=path.container;if(path.isFunction()&&!first){return!!allowInsideFunction}first=false;if(Array.isArray(container)&&path.key!==container.length-1){return false}}while((path=path.parentPath)&&!path.isProgram());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||t.isBlockStatement(this.container)){return false}else{return _lodashCollectionIncludes2["default"](t.STATEMENT_OR_BLOCK_KEYS,this.key)}}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier())return false;var binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return false;var path=binding.path;var parent=path.parentPath;if(!parent.isImportDeclaration())return false;if(parent.node.source.value===moduleSource){if(!importName)return true}else{return false}if(path.isImportDefaultSpecifier()&&importName==="default"){return true}if(path.isImportNamespaceSpecifier()&&importName==="*"){return true}if(path.isImportSpecifier()&&path.node.imported.name===importName){return true}return false}function getSource(){var node=this.node;if(node.end){return this.hub.file.code.slice(node.start,node.end)}else{return""}}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function _guessExecutionStatusRelativeTo(target){var targetFuncParent=target.scope.getFunctionParent();var selfFuncParent=this.scope.getFunctionParent();if(targetFuncParent.node!==selfFuncParent.node){var _status=this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent);if(_status){return _status}else{target=targetFuncParent.path}}var targetPaths=target.getAncestry();if(targetPaths.indexOf(this)>=0)return"after";var selfPaths=this.getAncestry();var commonPath=undefined;var targetIndex=undefined;var selfIndex=undefined;for(selfIndex=0;selfIndex<selfPaths.length;selfIndex++){var selfPath=selfPaths[selfIndex];targetIndex=targetPaths.indexOf(selfPath);if(targetIndex>=0){commonPath=selfPath;break}}if(!commonPath){return"before"}var targetRelationship=targetPaths[targetIndex-1];var selfRelationship=selfPaths[selfIndex-1];if(!targetRelationship||!selfRelationship){return"before"}if(targetRelationship.listKey&&targetRelationship.container===selfRelationship.container){return targetRelationship.key>selfRelationship.key?"before":"after"}var targetKeyPosition=t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key);var selfKeyPosition=t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key);return targetKeyPosition>selfKeyPosition?"before":"after"}function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent){var targetFuncPath=targetFuncParent.path;if(!targetFuncPath.isFunctionDeclaration())return;var binding=targetFuncPath.scope.getBinding(targetFuncPath.node.id.name);if(!binding.references)return"before";var referencePaths=binding.referencePaths;for(var _i=0;_i<referencePaths.length;_i++){var path=referencePaths[_i];if(path.key!=="callee"||!path.parentPath.isCallExpression()){return}}var allStatus=undefined;for(var _i2=0;_i2<referencePaths.length;_i2++){var path=referencePaths[_i2];var childOfFunction=!!path.find(function(path){return path.node===targetFuncPath.node});if(childOfFunction)continue;var _status2=this._guessExecutionStatusRelativeTo(path);if(allStatus){if(allStatus!==_status2)return}else{allStatus=_status2}}return allStatus}function resolve(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){var _this=this;if(resolved&&resolved.indexOf(this)>=0)return;resolved=resolved||[];resolved.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(dangerous,resolved)}else{}}else if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if(binding.kind==="module")return;if(binding.path!==this){var _ret=function(){var ret=binding.path.resolve(dangerous,resolved);if(_this.find(function(parent){return parent.node===ret.node}))return{v:undefined};return{v:ret}}();if(typeof _ret==="object")return _ret.v}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(dangerous,resolved)}else if(dangerous&&this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){var props=target.get("properties");var _arr=props;for(var _i3=0;_i3<_arr.length;_i3++){var prop=_arr[_i3];if(!prop.isProperty())continue;var key=prop.get("key");var match=prop.isnt("computed")&&key.isIdentifier({name:targetName});match=match||key.isLiteral({value:targetName});if(match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){var elems=target.get("elements");var elem=elems[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}},{"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201,"lodash/collection/includes":221}],73:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(path,state){if(path.isJSXIdentifier()&&_babelTypes.react.isCompatTag(path.node.name)){return}var binding=path.scope.getBinding(path.node.name);if(!binding)return;if(binding!==state.scope.getBinding(path.node.name))return;if(binding.constant){state.bindings[path.node.name]=binding}else{var _arr=binding.constantViolations;for(var _i=0;_i<_arr.length;_i++){var violationPath=_arr[_i];state.breakOnScopePaths=state.breakOnScopePaths.concat(violationPath.getAncestry())}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.breakOnScopePaths=[];this.bindings={};this.scopes=[];this.scope=scope;this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var scope=this.path.scope;do{if(this.isCompatibleScope(scope)){this.scopes.push(scope)}else{break}if(this.breakOnScopePaths.indexOf(scope.path)>=0){break}}while(scope=scope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(!scope)return;if(scope.path.isFunction()){if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;return scope.path.get("body").get("body")[0]}else{return this.getNextScopeStatementParent()}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasOwnParamBindings=function hasOwnParamBindings(scope){for(var _name in this.bindings){if(!scope.hasOwnBinding(_name))continue;var binding=this.bindings[_name];if(binding.kind==="param")return true}return false};PathHoister.prototype.run=function run(){var node=this.path.node;if(node._hoisted)return;node._hoisted=true;this.path.traverse(referenceVisitor,this);this.getCompatibleScopes();var attachTo=this.getAttachmentPath();if(!attachTo)return;if(attachTo.getFunctionParent()===this.path.getFunctionParent())return;var uid=attachTo.scope.generateUidIdentifier("ref");attachTo.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);var parent=this.path.parentPath;if(parent.isJSXElement()&&this.path.container===parent.node.children){uid=t.JSXExpressionContainer(uid)}this.path.replaceWith(uid)};return PathHoister}();exports["default"]=PathHoister;module.exports=exports["default"]},{"babel-runtime/helpers/class-call-check":113,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],74:[function(require,module,exports){"use strict";exports.__esModule=true;var hooks=[function(self,parent){if(self.key==="body"&&parent.isArrowFunctionExpression()){self.replaceWith(self.scope.buildUndefinedNode());return true}},function(self,parent){var removeParent=false;removeParent=removeParent||self.key==="test"&&(parent.isWhile()||parent.isSwitchCase());removeParent=removeParent||self.key==="declaration"&&parent.isExportDeclaration();removeParent=removeParent||self.key==="body"&&parent.isLabeledStatement();removeParent=removeParent||self.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===1;removeParent=removeParent||self.key==="expression"&&parent.isExpressionStatement();if(removeParent){parent.remove();return true}},function(self,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1){parent.replaceWith(parent.node.expressions[0]);return true}},function(self,parent){if(parent.isBinary()){if(self.key==="left"){parent.replaceWith(parent.node.right)}else{parent.replaceWith(parent.node.left)}return true}}];exports.hooks=hooks},{}],75:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function checkPath(_ref,opts){var node=_ref.node;var parent=_ref.parent;if(!t.isIdentifier(node,opts)){if(t.isJSXIdentifier(node,opts)){if(_babelTypes.react.isCompatTag(node.name))return false}else{return false}}return t.isReferenced(node,parent)}};exports.ReferencedIdentifier=ReferencedIdentifier;var ReferencedMemberExpression={types:["MemberExpression"],checkPath:function checkPath(_ref2){var node=_ref2.node;var parent=_ref2.parent;return t.isMemberExpression(node)&&t.isReferenced(node,parent)}};exports.ReferencedMemberExpression=ReferencedMemberExpression;var BindingIdentifier={types:["Identifier"],checkPath:function checkPath(_ref3){var node=_ref3.node;var parent=_ref3.parent;return t.isIdentifier(node)&&t.isBinding(node,parent)}};exports.BindingIdentifier=BindingIdentifier;var Statement={types:["Statement"],checkPath:function checkPath(_ref4){var node=_ref4.node;var parent=_ref4.parent;if(t.isStatement(node)){if(t.isVariableDeclaration(node)){if(t.isForXStatement(parent,{left:node}))return false;if(t.isForStatement(parent,{init:node}))return false}return true}else{return false}}};exports.Statement=Statement;var Expression={types:["Expression"],checkPath:function checkPath(path){if(path.isIdentifier()){return path.isReferencedIdentifier()}else{return t.isExpression(path.node)}}};exports.Expression=Expression;var Scope={types:["Scopable"],checkPath:function checkPath(path){return t.isScope(path.node,path.parent)}};exports.Scope=Scope;var Referenced={checkPath:function checkPath(path){return t.isReferenced(path.node,path.parent)}};exports.Referenced=Referenced;var BlockScoped={checkPath:function checkPath(path){return t.isBlockScoped(path.node)}};exports.BlockScoped=BlockScoped;var Var={types:["VariableDeclaration"],checkPath:function checkPath(path){return t.isVar(path.node)}};exports.Var=Var;var User={checkPath:function checkPath(path){return path.node&&!!path.node.loc}};exports.User=User;var Generated={checkPath:function checkPath(path){return!path.isUser()}};exports.Generated=Generated;var Pure={checkPath:function checkPath(path,opts){return path.scope.isPure(path.node,opts)}};exports.Pure=Pure;var Flow={types:["Flow","ImportDeclaration","ExportDeclaration"],checkPath:function checkPath(_ref5){var node=_ref5.node;if(t.isFlow(node)){return true}else if(t.isImportDeclaration(node)){return node.importKind==="type"||node.importKind==="typeof"}else if(t.isExportDeclaration(node)){return node.exportKind==="type"}else{return false}}};exports.Flow=Flow},{"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],76:[function(require,module,exports){"use strict";var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.insertBefore=insertBefore;exports._containerInsert=_containerInsert;exports._containerInsertBefore=_containerInsertBefore;exports._containerInsertAfter=_containerInsertAfter;exports._maybePopFromStatements=_maybePopFromStatements;exports.insertAfter=insertAfter;exports.updateSiblingKeys=updateSiblingKeys;exports._verifyNodeList=_verifyNodeList;exports.unshiftContainer=unshiftContainer;exports.pushContainer=pushContainer;exports.hoist=hoist;var _cache=require("../cache");var _libHoister=require("./lib/hoister");var _libHoister2=_interopRequireDefault(_libHoister);var _index=require("./index");var _index2=_interopRequireDefault(_index);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function insertBefore(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertBefore(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node)nodes.push(this.node);this.replaceExpressionWithStatements(nodes)}else{this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertBefore(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.push(this.node);this._replaceWith(t.blockStatement(nodes))}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?"); | |
}}return[this]}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);var paths=[];for(var i=0;i<nodes.length;i++){var to=from+i;var node=nodes[i];this.container.splice(to,0,node);if(this.context){var path=this.context.create(this.parent,this.container,to,this.listKey);if(this.context.queue)path.pushContext(this.context);paths.push(path)}else{paths.push(_index2["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:to}))}}var contexts=this._getQueueContexts();for(var _iterator=paths,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var path=_ref;path.setScope();path.debug(function(){return"Inserted."});for(var _iterator2=contexts,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:_getIterator(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var context=_ref2;context.maybeQueue(path,true)}}return paths}function _containerInsertBefore(nodes){return this._containerInsert(this.key,nodes)}function _containerInsertAfter(nodes){return this._containerInsert(this.key+1,nodes)}function _maybePopFromStatements(nodes){var last=nodes[nodes.length-1];var isIdentifier=t.isIdentifier(last)||t.isExpressionStatement(last)&&t.isIdentifier(last.expression);if(isIdentifier&&!this.isCompletionRecord()){nodes.pop()}}function insertAfter(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertAfter(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node){var temp=this.scope.generateDeclaredUidIdentifier();nodes.unshift(t.expressionStatement(t.assignmentExpression("=",temp,this.node)));nodes.push(t.expressionStatement(temp))}this.replaceExpressionWithStatements(nodes)}else{this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertAfter(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.unshift(this.node);this._replaceWith(t.blockStatement(nodes))}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}return[this]}function updateSiblingKeys(fromIndex,incrementBy){if(!this.parent)return;var paths=_cache.path.get(this.parent);for(var i=0;i<paths.length;i++){var path=paths[i];if(path.key>=fromIndex){path.key+=incrementBy}}}function _verifyNodeList(nodes){if(!nodes){return[]}if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i<nodes.length;i++){var node=nodes[i];var msg=undefined;if(!node){msg="has falsy node"}else if(typeof node!=="object"){msg="contains a non-object node"}else if(!node.type){msg="without a type"}else if(node instanceof _index2["default"]){msg="has a NodePath when it expected a raw object"}if(msg){var type=Array.isArray(node)?"array":typeof node;throw new Error("Node list "+msg+" with the index of "+i+" and type of "+type)}}return nodes}function unshiftContainer(listKey,nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);var path=_index2["default"].get({parentPath:this,parent:this.node,container:this.node[listKey],listKey:listKey,key:0});return path.insertBefore(nodes)}function pushContainer(listKey,nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);var container=this.node[listKey];var path=_index2["default"].get({parentPath:this,parent:this.node,container:container,listKey:listKey,key:container.length});return path.replaceWithMultiple(nodes)}function hoist(){var scope=arguments.length<=0||arguments[0]===undefined?this.scope:arguments[0];var hoister=new _libHoister2["default"](this,scope);return hoister.run()}},{"../cache":58,"./index":68,"./lib/hoister":73,"babel-runtime/core-js/get-iterator":102,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],77:[function(require,module,exports){"use strict";exports.__esModule=true;exports.remove=remove;exports._callRemovalHooks=_callRemovalHooks;exports._remove=_remove;exports._markRemoved=_markRemoved;exports._assertUnremoved=_assertUnremoved;var _libRemovalHooks=require("./lib/removal-hooks");function remove(){this._assertUnremoved();this.resync();if(this._callRemovalHooks()){this._markRemoved();return}this.shareCommentsWithSiblings();this._remove();this._markRemoved()}function _callRemovalHooks(){var _arr=_libRemovalHooks.hooks;for(var _i=0;_i<_arr.length;_i++){var fn=_arr[_i];if(fn(this,this.parentPath))return true}}function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this._replaceWith(null)}}function _markRemoved(){this.shouldSkip=true;this.removed=true;this.node=null}function _assertUnremoved(){if(this.removed){throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}},{"./lib/removal-hooks":74}],78:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.replaceWithMultiple=replaceWithMultiple;exports.replaceWithSourceString=replaceWithSourceString;exports.replaceWith=replaceWith;exports._replaceWith=_replaceWith;exports.replaceExpressionWithStatements=replaceExpressionWithStatements;exports.replaceInline=replaceInline;var _babelCodeFrame=require("babel-code-frame");var _babelCodeFrame2=_interopRequireDefault(_babelCodeFrame);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _index3=require("./index");var _index4=_interopRequireDefault(_index3);var _babylon=require("babylon");var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var hoistVariablesVisitor={Function:function Function(path){path.skip()},VariableDeclaration:function VariableDeclaration(path){if(path.node.kind!=="var")return;var bindings=path.getBindingIdentifiers();for(var key in bindings){path.scope.push({id:bindings[key]})}var exprs=[];var _arr=path.node.declarations;for(var _i=0;_i<_arr.length;_i++){var declar=_arr[_i];if(declar.init){exprs.push(t.expressionStatement(t.assignmentExpression("=",declar.id,declar.init)))}}path.replaceWithMultiple(exprs)}};function replaceWithMultiple(nodes){this.resync();nodes=this._verifyNodeList(nodes);t.inheritLeadingComments(nodes[0],this.node);t.inheritTrailingComments(nodes[nodes.length-1],this.node);this.node=this.container[this.key]=null;this.insertAfter(nodes);if(this.node){this.requeue()}else{this.remove()}}function replaceWithSourceString(replacement){this.resync();try{replacement="("+replacement+")";replacement=_babylon.parse(replacement)}catch(err){var loc=err.loc;if(loc){err.message+=" - make sure this is an expression.";err.message+="\n"+_babelCodeFrame2["default"](replacement,loc.line,loc.column+1)}throw err}replacement=replacement.program.body[0].expression;_index2["default"].removeProperties(replacement);return this.replaceWith(replacement)}function replaceWith(replacement){this.resync();if(this.removed){throw new Error("You can't replace this node, we've already removed it")}if(replacement instanceof _index4["default"]){replacement=replacement.node}if(!replacement){throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead")}if(this.node===replacement){return}if(this.isProgram()&&!t.isProgram(replacement)){throw new Error("You can only replace a Program root node with another Program node")}if(Array.isArray(replacement)){throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`")}if(typeof replacement==="string"){throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`")}if(this.isNodeType("Statement")&&t.isExpression(replacement)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(replacement)){replacement=t.expressionStatement(replacement)}}if(this.isNodeType("Expression")&&t.isStatement(replacement)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(replacement)){return this.replaceExpressionWithStatements([replacement])}}var oldNode=this.node;if(oldNode){t.inheritsComments(replacement,oldNode);t.removeComments(oldNode)}this._replaceWith(replacement);this.type=replacement.type;this.setScope();this.requeue()}function _replaceWith(node){if(!this.container){throw new ReferenceError("Container is falsy")}if(this.inList){t.validate(this.parent,this.key,[node])}else{t.validate(this.parent,this.key,node)}this.debug(function(){return"Replace with "+(node&&node.type)});this.node=this.container[this.key]=node}function replaceExpressionWithStatements(nodes){this.resync();var toSequenceExpression=t.toSequenceExpression(nodes,this.scope);if(t.isSequenceExpression(toSequenceExpression)){var exprs=toSequenceExpression.expressions;if(exprs.length>=2&&this.parentPath.isExpressionStatement()){this._maybePopFromStatements(exprs)}if(exprs.length===1){this.replaceWith(exprs[0])}else{this.replaceWith(toSequenceExpression)}}else if(toSequenceExpression){this.replaceWith(toSequenceExpression)}else{var container=t.functionExpression(null,[],t.blockStatement(nodes));container.shadow=true;this.replaceWith(t.callExpression(container,[]));this.traverse(hoistVariablesVisitor);var completionRecords=this.get("callee").getCompletionRecords();for(var _i2=0;_i2<completionRecords.length;_i2++){var path=completionRecords[_i2];if(!path.isExpressionStatement())continue;var loop=path.findParent(function(path){return path.isLoop()});if(loop){var callee=this.get("callee");var uid=callee.scope.generateDeclaredUidIdentifier("ret");callee.get("body").pushContainer("body",t.returnStatement(uid));path.get("expression").replaceWith(t.assignmentExpression("=",uid,path.node.expression))}else{path.replaceWith(t.returnStatement(path.node.expression))}}return this.node}}function replaceInline(nodes){this.resync();if(Array.isArray(nodes)){if(Array.isArray(this.container)){nodes=this._verifyNodeList(nodes);this._containerInsertAfter(nodes);return this.remove()}else{return this.replaceWithMultiple(nodes)}}else{return this.replaceWith(nodes)}}},{"../index":61,"./index":68,"babel-code-frame":83,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201,babylon:303}],79:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];exports.__esModule=true;var Binding=function(){function Binding(_ref){var existing=_ref.existing;var identifier=_ref.identifier;var scope=_ref.scope;var path=_ref.path;var kind=_ref.kind;_classCallCheck(this,Binding);this.identifier=identifier;this.scope=scope;this.path=path;this.kind=kind;this.constantViolations=[];this.constant=true;this.referencePaths=[];this.referenced=false;this.references=0;this.clearValue();if(existing){this.constantViolations=[].concat(existing.path,existing.constantViolations,this.constantViolations)}}Binding.prototype.deoptValue=function deoptValue(){this.clearValue();this.hasDeoptedValue=true};Binding.prototype.setValue=function setValue(value){if(this.hasDeoptedValue)return;this.hasValue=true;this.value=value};Binding.prototype.clearValue=function clearValue(){this.hasDeoptedValue=false;this.hasValue=false;this.value=null};Binding.prototype.reassign=function reassign(path){this.constant=false;if(this.constantViolations.indexOf(path)!==-1){return}this.constantViolations.push(path)};Binding.prototype.reference=function reference(path){this.referenced=true;this.references++;this.referencePaths.push(path)};Binding.prototype.dereference=function dereference(){this.references--;this.referenced=!!this.references};return Binding}();exports["default"]=Binding;module.exports=exports["default"]},{"babel-runtime/helpers/class-call-check":113}],80:[function(require,module,exports){"use strict";var _createClass=require("babel-runtime/helpers/create-class")["default"];var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _Object$create=require("babel-runtime/core-js/object/create")["default"];var _Object$keys=require("babel-runtime/core-js/object/keys")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _libRenamer=require("./lib/renamer");var _libRenamer2=_interopRequireDefault(_libRenamer);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _lodashObjectDefaults=require("lodash/object/defaults");var _lodashObjectDefaults2=_interopRequireDefault(_lodashObjectDefaults);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _binding=require("./binding");var _binding2=_interopRequireDefault(_binding);var _globals=require("globals");var _globals2=_interopRequireDefault(_globals);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _cache=require("../cache");var _crawlCallsCount=0;function getCache(path,parentScope,self){var scopes=_cache.scope.get(path.node)||[];for(var _i=0;_i<scopes.length;_i++){var scope=scopes[_i];if(scope.parent===parentScope&&scope.path===path)return scope}scopes.push(self);if(!_cache.scope.has(path.node)){_cache.scope.set(path.node,scopes)}}var collectorVisitor={For:function For(path){var _arr=t.FOR_INIT_KEYS;for(var _i2=0;_i2<_arr.length;_i2++){var key=_arr[_i2];var declar=path.get(key);if(declar.isVar())path.scope.getFunctionParent().registerBinding("var",declar)}},Declaration:function Declaration(path){if(path.isBlockScoped())return;if(path.isExportDeclaration()&&path.get("declaration").isDeclaration())return;path.scope.getFunctionParent().registerDeclaration(path)},ReferencedIdentifier:function ReferencedIdentifier(path,state){state.references.push(path)},ForXStatement:function ForXStatement(path,state){var left=path.get("left");if(left.isPattern()||left.isIdentifier()){state.constantViolations.push(left)}},ExportDeclaration:{exit:function exit(_ref5){var node=_ref5.node;var scope=_ref5.scope;var declar=node.declaration;if(t.isClassDeclaration(declar)||t.isFunctionDeclaration(declar)){var _id=declar.id;if(!_id)return;var binding=scope.getBinding(_id.name);if(binding)binding.reference()}else if(t.isVariableDeclaration(declar)){var _arr2=declar.declarations;for(var _i3=0;_i3<_arr2.length;_i3++){var decl=_arr2[_i3];var ids=t.getBindingIdentifiers(decl);for(var _name in ids){var binding=scope.getBinding(_name);if(binding)binding.reference()}}}}},LabeledStatement:function LabeledStatement(path){path.scope.getProgramParent().addGlobal(path.node);path.scope.getBlockParent().registerDeclaration(path)},AssignmentExpression:function AssignmentExpression(path,state){state.assignments.push(path)},UpdateExpression:function UpdateExpression(path,state){state.constantViolations.push(path.get("argument"))},UnaryExpression:function UnaryExpression(path,state){if(path.node.operator==="delete"){state.constantViolations.push(path.get("argument"))}},BlockScoped:function BlockScoped(path){var scope=path.scope;if(scope.path===path)scope=scope.parent;scope.getBlockParent().registerDeclaration(path)},ClassDeclaration:function ClassDeclaration(path){var id=path.node.id;if(!id)return;var name=id.name;path.scope.bindings[name]=path.scope.getBinding(name)},Block:function Block(path){var paths=path.get("body");var _arr3=paths;for(var _i4=0;_i4<_arr3.length;_i4++){var bodyPath=_arr3[_i4];if(bodyPath.isFunctionDeclaration()){path.scope.getBlockParent().registerDeclaration(bodyPath)}}}};var uid=0;var Scope=function(){function Scope(path,parentScope){_classCallCheck(this,Scope);if(parentScope&&parentScope.block===path.node){return parentScope}var cached=getCache(path,parentScope,this);if(cached)return cached;this.uid=uid++;this.parent=parentScope;this.hub=path.hub;this.parentBlock=path.parent;this.block=path.node;this.path=path}Scope.prototype.traverse=function traverse(node,opts,state){_index2["default"](node,opts,this,state,this.path)};Scope.prototype.generateDeclaredUidIdentifier=function generateDeclaredUidIdentifier(){var name=arguments.length<=0||arguments[0]===undefined?"temp":arguments[0];var id=this.generateUidIdentifier(name);this.push({id:id});return id};Scope.prototype.generateUidIdentifier=function generateUidIdentifier(){var name=arguments.length<=0||arguments[0]===undefined?"temp":arguments[0];return t.identifier(this.generateUid(name))};Scope.prototype.generateUid=function generateUid(){var name=arguments.length<=0||arguments[0]===undefined?"temp":arguments[0];name=t.toIdentifier(name).replace(/^_+/,"").replace(/[0-9]+$/g,"");var uid=undefined;var i=0;do{uid=this._generateUid(name,i);i++}while(this.hasBinding(uid)||this.hasGlobal(uid)||this.hasReference(uid));var program=this.getProgramParent();program.references[uid]=true;program.uids[uid]=true;return uid};Scope.prototype._generateUid=function _generateUid(name,i){var id=name;if(i>1)id+=i;return"_"+id};Scope.prototype.generateUidIdentifierBasedOnNode=function generateUidIdentifierBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isObjectProperty(node)||t.isObjectMethod(node)){node=node.key}var parts=[];var add=function add(node){if(t.isModuleDeclaration(node)){if(node.source){add(node.source)}else if(node.specifiers&&node.specifiers.length){var _arr4=node.specifiers;for(var _i5=0;_i5<_arr4.length;_i5++){var specifier=_arr4[_i5];add(specifier)}}else if(node.declaration){add(node.declaration)}}else if(t.isModuleSpecifier(node)){add(node.local)}else if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}else if(t.isObjectExpression(node)||t.isObjectPattern(node)){var _arr5=node.properties;for(var _i6=0;_i6<_arr5.length;_i6++){var prop=_arr5[_i6];add(prop.key||prop.argument)}}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||defaultName||"ref";return this.generateUidIdentifier(id.slice(0,20))};Scope.prototype.isStatic=function isStatic(node){if(t.isThisExpression(node)||t.isSuper(node)){return true}if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding){return binding.constant}else{return this.hasBinding(node.name)}}return false};Scope.prototype.maybeGenerateMemoised=function maybeGenerateMemoised(node,dontPush){if(this.isStatic(node)){return null}else{var _id2=this.generateUidIdentifierBasedOnNode(node);if(!dontPush)this.push({id:_id2});return _id2}};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(local,kind,name,id){if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;var duplicate=false;if(!duplicate)duplicate=kind==="let"||local.kind==="let"||local.kind==="const"||local.kind==="module";if(!duplicate)duplicate=local.kind==="param"&&(kind==="let"||kind==="const");if(duplicate){throw this.hub.file.buildCodeFrameError(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName,block){var binding=this.getBinding(oldName);if(binding){newName=newName||this.generateUidIdentifier(oldName).name;return new _libRenamer2["default"](binding,oldName,newName).rename(block)}};Scope.prototype._renameFromMap=function _renameFromMap(map,oldName,newName,value){if(map[oldName]){map[newName]=value;map[oldName]=null}};Scope.prototype.dump=function dump(){var sep=_repeating2["default"]("-",60);console.log(sep);var scope=this;do{console.log("#",scope.block.type);for(var _name2 in scope.bindings){var binding=scope.bindings[_name2];console.log(" -",_name2,{constant:binding.constant,references:binding.references,violations:binding.constantViolations.length,kind:binding.kind})}}while(scope=scope.parent);console.log(sep)};Scope.prototype.toArray=function toArray(node,i){var file=this.hub.file;if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"),t.identifier("prototype")),t.identifier("slice")),t.identifier("call")),[node])}var helperName="toArray";var args=[node];if(i===true){helperName="toConsumableArray"}else if(i){args.push(t.numericLiteral(i));helperName="slicedToArray"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.registerDeclaration=function registerDeclaration(path){if(path.isLabeledStatement()){this.registerBinding("label",path)}else if(path.isFunctionDeclaration()){this.registerBinding("hoisted",path.get("id"),path)}else if(path.isVariableDeclaration()){var declarations=path.get("declarations");var _arr6=declarations;for(var _i7=0;_i7<_arr6.length;_i7++){var declar=_arr6[_i7];this.registerBinding(path.node.kind,declar)}}else if(path.isClassDeclaration()){this.registerBinding("let",path)}else if(path.isImportDeclaration()){var specifiers=path.get("specifiers");var _arr7=specifiers;for(var _i8=0;_i8<_arr7.length;_i8++){var specifier=_arr7[_i8];this.registerBinding("module",specifier)}}else if(path.isExportDeclaration()){var declar=path.get("declaration");if(declar.isClassDeclaration()||declar.isFunctionDeclaration()||declar.isVariableDeclaration()){this.registerDeclaration(declar)}}else{this.registerBinding("unknown",path)}};Scope.prototype.buildUndefinedNode=function buildUndefinedNode(){if(this.hasBinding("undefined")){return t.unaryExpression("void",t.numericLiteral(0),true)}else{return t.identifier("undefined")}};Scope.prototype.registerConstantViolation=function registerConstantViolation(path){var ids=path.getBindingIdentifiers();for(var _name3 in ids){var binding=this.getBinding(_name3);if(binding)binding.reassign(path)}};Scope.prototype.registerBinding=function registerBinding(kind,path){var bindingPath=arguments.length<=2||arguments[2]===undefined?path:arguments[2];return function(){if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){var declarators=path.get("declarations");for(var _i9=0;_i9<declarators.length;_i9++){var declar=declarators[_i9];this.registerBinding(kind,declar)}return}var parent=this.getProgramParent();var ids=path.getBindingIdentifiers(true);for(var _name4 in ids){var _arr8=ids[_name4];for(var _i10=0;_i10<_arr8.length;_i10++){var _id3=_arr8[_i10];var local=this.getOwnBinding(_name4);if(local){if(local.identifier===_id3)continue;this.checkBlockScopedCollisions(local,kind,_name4,_id3)}if(local&&local.path.isFlow())local=null;parent.references[_name4]=true;this.bindings[_name4]=new _binding2["default"]({identifier:_id3,existing:local,scope:this,path:bindingPath,kind:kind})}}}.apply(this,arguments)};Scope.prototype.addGlobal=function addGlobal(node){this.globals[node.name]=node};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.uids[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasGlobal=function hasGlobal(name){var scope=this;do{if(scope.globals[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasReference=function hasReference(name){var scope=this;do{if(scope.references[name])return true}while(scope=scope.parent);return false};Scope.prototype.isPure=function isPure(node,constantsOnly){if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(!binding)return false;if(constantsOnly)return binding.constant;return true}else if(t.isClass(node)){if(node.superClass&&!this.isPure(node.superClass,constantsOnly))return false;return this.isPure(node.body,constantsOnly)}else if(t.isClassBody(node)){for(var _iterator=node.body,_isArray=Array.isArray(_iterator),_i11=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i11>=_iterator.length)break;_ref=_iterator[_i11++]}else{_i11=_iterator.next();if(_i11.done)break;_ref=_i11.value}var method=_ref;if(!this.isPure(method,constantsOnly))return false}return true}else if(t.isBinary(node)){return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly)}else if(t.isArrayExpression(node)){var _arr9=node.elements;for(var _i12=0;_i12<_arr9.length;_i12++){var elem=_arr9[_i12];if(!this.isPure(elem,constantsOnly))return false}return true}else if(t.isObjectExpression(node)){var _arr10=node.properties;for(var _i13=0;_i13<_arr10.length;_i13++){var prop=_arr10[_i13];if(!this.isPure(prop,constantsOnly))return false}return true}else if(t.isClassMethod(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;if(node.kind==="get"||node.kind==="set")return false;return true}else if(t.isClassProperty(node)||t.isObjectProperty(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;return this.isPure(node.value,constantsOnly)}else if(t.isUnaryExpression(node)){return this.isPure(node.argument,constantsOnly)}else{return t.isPureish(node)}};Scope.prototype.setData=function setData(key,val){return this.data[key]=val};Scope.prototype.getData=function getData(key){var scope=this;do{var data=scope.data[key];if(data!=null)return data}while(scope=scope.parent)};Scope.prototype.removeData=function removeData(key){var scope=this;do{var data=scope.data[key];if(data!=null)scope.data[key]=null}while(scope=scope.parent)};Scope.prototype.init=function init(){if(!this.references)this.crawl()};Scope.prototype.crawl=function crawl(){_crawlCallsCount++;this._crawl();_crawlCallsCount--};Scope.prototype._crawl=function _crawl(){var path=this.path;this.references=_Object$create(null);this.bindings=_Object$create(null);this.globals=_Object$create(null);this.uids=_Object$create(null);this.data=_Object$create(null);if(path.isLoop()){var _arr11=t.FOR_INIT_KEYS;for(var _i14=0;_i14<_arr11.length;_i14++){var key=_arr11[_i14];var node=path.get(key);if(node.isBlockScoped())this.registerBinding(node.node.kind,node)}}if(path.isFunctionExpression()&&path.has("id")){if(!path.get("id").node[t.NOT_LOCAL_BINDING]){this.registerBinding("local",path.get("id"),path)}}if(path.isClassExpression()&&path.has("id")){if(!path.get("id").node[t.NOT_LOCAL_BINDING]){this.registerBinding("local",path)}}if(path.isFunction()){var params=path.get("params");for(var _i15=0;_i15<params.length;_i15++){var param=params[_i15];this.registerBinding("param",param)}}if(path.isCatchClause()){this.registerBinding("let",path)}var parent=this.getProgramParent();if(parent.crawling)return;var state={references:[],constantViolations:[],assignments:[]};this.crawling=true;path.traverse(collectorVisitor,state);this.crawling=false;for(var _iterator2=state.assignments,_isArray2=Array.isArray(_iterator2),_i16=0,_iterator2=_isArray2?_iterator2:_getIterator(_iterator2);;){var _ref2;if(_isArray2){if(_i16>=_iterator2.length)break;_ref2=_iterator2[_i16++]}else{_i16=_iterator2.next();if(_i16.done)break;_ref2=_i16.value}var _path=_ref2;var ids=_path.getBindingIdentifiers();var programParent=undefined;for(var _name5 in ids){if(_path.scope.getBinding(_name5))continue;programParent=programParent||_path.scope.getProgramParent();programParent.addGlobal(ids[_name5])}_path.scope.registerConstantViolation(_path)}for(var _iterator3=state.references,_isArray3=Array.isArray(_iterator3),_i17=0,_iterator3=_isArray3?_iterator3:_getIterator(_iterator3);;){var _ref3;if(_isArray3){if(_i17>=_iterator3.length)break;_ref3=_iterator3[_i17++]}else{_i17=_iterator3.next();if(_i17.done)break;_ref3=_i17.value}var ref=_ref3;var binding=ref.scope.getBinding(ref.node.name);if(binding){binding.reference(ref)}else{ref.scope.getProgramParent().addGlobal(ref.node)}}for(var _iterator4=state.constantViolations,_isArray4=Array.isArray(_iterator4),_i18=0,_iterator4=_isArray4?_iterator4:_getIterator(_iterator4);;){var _ref4;if(_isArray4){if(_i18>=_iterator4.length)break;_ref4=_iterator4[_i18++]}else{_i18=_iterator4.next();if(_i18.done)break;_ref4=_i18.value}var _path2=_ref4;_path2.scope.registerConstantViolation(_path2)}};Scope.prototype.push=function push(opts){var path=this.path;if(!path.isBlockStatement()&&!path.isProgram()){path=this.getBlockParent().path}if(path.isSwitchStatement()){path=this.getFunctionParent().path}if(path.isLoop()||path.isCatchClause()||path.isFunction()){t.ensureBlock(path.node);path=path.get("body")}var unique=opts.unique;var kind=opts.kind||"var";var blockHoist=opts._blockHoist==null?2:opts._blockHoist;var dataKey="declaration:"+kind+":"+blockHoist;var declarPath=!unique&&path.getData(dataKey);if(!declarPath){var declar=t.variableDeclaration(kind,[]);declar._generated=true;declar._blockHoist=blockHoist;var _path$unshiftContainer=path.unshiftContainer("body",[declar]);declarPath=_path$unshiftContainer[0];if(!unique)path.setData(dataKey,declarPath)}var declarator=t.variableDeclarator(opts.id,opts.init);declarPath.node.declarations.push(declarator);this.registerBinding(kind,declarPath.get("declarations").pop())};Scope.prototype.getProgramParent=function getProgramParent(){var scope=this;do{if(scope.path.isProgram()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getFunctionParent=function getFunctionParent(){var scope=this;do{if(scope.path.isFunctionParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getBlockParent=function getBlockParent(){var scope=this;do{if(scope.path.isBlockParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")};Scope.prototype.getAllBindings=function getAllBindings(){var ids=_Object$create(null);var scope=this;do{_lodashObjectDefaults2["default"](ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllBindingsOfKind=function getAllBindingsOfKind(){var ids=_Object$create(null);var _arr12=arguments;for(var _i19=0;_i19<_arr12.length;_i19++){var kind=_arr12[_i19];var scope=this;do{for(var _name6 in scope.bindings){var binding=scope.bindings[_name6];if(binding.kind===kind)ids[_name6]=binding}scope=scope.parent}while(scope)}return ids};Scope.prototype.bindingIdentifierEquals=function bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node};Scope.prototype.warnOnFlowBinding=function warnOnFlowBinding(binding){if(_crawlCallsCount===0&&binding&&binding.path.isFlow()){console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 6.8. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n ")}return binding};Scope.prototype.getBinding=function getBinding(name){var scope=this;do{var binding=scope.getOwnBinding(name);if(binding)return this.warnOnFlowBinding(binding)}while(scope=scope.parent)};Scope.prototype.getOwnBinding=function getOwnBinding(name){return this.warnOnFlowBinding(this.bindings[name])};Scope.prototype.getBindingIdentifier=function getBindingIdentifier(name){ | |
var info=this.getBinding(name);return info&&info.identifier};Scope.prototype.getOwnBindingIdentifier=function getOwnBindingIdentifier(name){var binding=this.bindings[name];return binding&&binding.identifier};Scope.prototype.hasOwnBinding=function hasOwnBinding(name){return!!this.getOwnBinding(name)};Scope.prototype.hasBinding=function hasBinding(name,noGlobals){if(!name)return false;if(this.hasOwnBinding(name))return true;if(this.parentHasBinding(name,noGlobals))return true;if(this.hasUid(name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.globals,name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.contextVariables,name))return true;return false};Scope.prototype.parentHasBinding=function parentHasBinding(name,noGlobals){return this.parent&&this.parent.hasBinding(name,noGlobals)};Scope.prototype.moveBindingTo=function moveBindingTo(name,scope){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name);info.scope=scope;scope.bindings[name]=info}};Scope.prototype.removeOwnBinding=function removeOwnBinding(name){delete this.bindings[name]};Scope.prototype.removeBinding=function removeBinding(name){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name)}var scope=this;do{if(scope.uids[name]){scope.uids[name]=false}}while(scope=scope.parent)};_createClass(Scope,null,[{key:"globals",value:_Object$keys(_globals2["default"].builtin),enumerable:true},{key:"contextVariables",value:["arguments","undefined","Infinity","NaN"],enumerable:true}]);return Scope}();exports["default"]=Scope;module.exports=exports["default"]},{"../cache":58,"../index":61,"./binding":79,"./lib/renamer":81,"babel-messages":101,"babel-runtime/core-js/get-iterator":102,"babel-runtime/core-js/object/create":104,"babel-runtime/core-js/object/keys":109,"babel-runtime/helpers/class-call-check":113,"babel-runtime/helpers/create-class":114,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201,globals:214,"lodash/collection/includes":221,"lodash/object/defaults":293,repeating:300}],81:[function(require,module,exports){"use strict";var _classCallCheck=require("babel-runtime/helpers/class-call-check")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;var _binding=require("../binding");var _binding2=_interopRequireDefault(_binding);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var renameVisitor={ReferencedIdentifier:function ReferencedIdentifier(_ref,state){var node=_ref.node;if(node.name===state.oldName){node.name=state.newName}},Scope:function Scope(path,state){if(!path.scope.bindingIdentifierEquals(state.oldName,state.binding.identifier)){path.skip()}},"AssignmentExpression|Declaration":function AssignmentExpressionDeclaration(path,state){var ids=path.getOuterBindingIdentifiers();for(var _name in ids){if(_name===state.oldName)ids[_name].name=state.newName}}};var Renamer=function(){function Renamer(binding,oldName,newName){_classCallCheck(this,Renamer);this.newName=newName;this.oldName=oldName;this.binding=binding}Renamer.prototype.maybeConvertFromExportDeclaration=function maybeConvertFromExportDeclaration(parentDeclar){var exportDeclar=parentDeclar.parentPath.isExportDeclaration()&&parentDeclar.parentPath;if(!exportDeclar)return;var isDefault=exportDeclar.isExportDefaultDeclaration();if(isDefault&&(parentDeclar.isFunctionDeclaration()||parentDeclar.isClassDeclaration())&&!parentDeclar.node.id){parentDeclar.node.id=parentDeclar.scope.generateUidIdentifier("default")}var bindingIdentifiers=parentDeclar.getOuterBindingIdentifiers();var specifiers=[];for(var _name2 in bindingIdentifiers){var localName=_name2===this.oldName?this.newName:_name2;var exportedName=isDefault?"default":_name2;specifiers.push(t.exportSpecifier(t.identifier(localName),t.identifier(exportedName)))}var aliasDeclar=t.exportNamedDeclaration(null,specifiers);if(parentDeclar.isFunctionDeclaration()){aliasDeclar._blockHoist=3}exportDeclar.insertAfter(aliasDeclar);exportDeclar.replaceWith(parentDeclar.node)};Renamer.prototype.maybeConvertFromClassFunctionDeclaration=function maybeConvertFromClassFunctionDeclaration(path){return;if(!path.isFunctionDeclaration()&&!path.isClassDeclaration())return;if(this.binding.kind!=="hoisted")return;path.node.id=t.identifier(this.oldName);path.node._blockHoist=3;path.replaceWith(t.variableDeclaration("let",[t.variableDeclarator(t.identifier(this.newName),t.toExpression(path.node))]))};Renamer.prototype.maybeConvertFromClassFunctionExpression=function maybeConvertFromClassFunctionExpression(path){return;if(!path.isFunctionExpression()&&!path.isClassExpression())return;if(this.binding.kind!=="local")return;path.node.id=t.identifier(this.oldName);this.binding.scope.parent.push({id:t.identifier(this.newName)});path.replaceWith(t.assignmentExpression("=",t.identifier(this.newName),path.node))};Renamer.prototype.rename=function rename(block){var binding=this.binding;var oldName=this.oldName;var newName=this.newName;var scope=binding.scope;var path=binding.path;var parentDeclar=path.find(function(path){return path.isDeclaration()||path.isFunctionExpression()});if(parentDeclar){this.maybeConvertFromExportDeclaration(parentDeclar)}scope.traverse(block||scope.block,renameVisitor,this);if(!block){scope.removeOwnBinding(oldName);scope.bindings[newName]=binding;this.binding.identifier.name=newName}if(binding.type==="hoisted"){}if(parentDeclar){this.maybeConvertFromClassFunctionDeclaration(parentDeclar);this.maybeConvertFromClassFunctionExpression(parentDeclar)}};return Renamer}();exports["default"]=Renamer;module.exports=exports["default"]},{"../binding":79,"babel-runtime/helpers/class-call-check":113,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201}],82:[function(require,module,exports){"use strict";var _Object$keys=require("babel-runtime/core-js/object/keys")["default"];var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;exports.explode=explode;exports.verify=verify;exports.merge=merge;var _pathLibVirtualTypes=require("./path/lib/virtual-types");var virtualTypes=_interopRequireWildcard(_pathLibVirtualTypes);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);function explode(visitor){if(visitor._exploded)return visitor;visitor._exploded=true;for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var parts=nodeType.split("|");if(parts.length===1)continue;var fns=visitor[nodeType];delete visitor[nodeType];for(var _i=0;_i<parts.length;_i++){var part=parts[_i];visitor[part]=fns}}verify(visitor);delete visitor.__esModule;ensureEntranceObjects(visitor);ensureCallbackArrays(visitor);var _arr=_Object$keys(visitor);for(var _i2=0;_i2<_arr.length;_i2++){var nodeType=_arr[_i2];if(shouldIgnoreKey(nodeType))continue;var wrapper=virtualTypes[nodeType];if(!wrapper)continue;var fns=visitor[nodeType];for(var type in fns){fns[type]=wrapCheck(wrapper,fns[type])}delete visitor[nodeType];if(wrapper.types){var _arr2=wrapper.types;for(var _i4=0;_i4<_arr2.length;_i4++){var type=_arr2[_i4];if(visitor[type]){mergePair(visitor[type],fns)}else{visitor[type]=fns}}}else{mergePair(visitor,fns)}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var fns=visitor[nodeType];var aliases=t.FLIPPED_ALIAS_KEYS[nodeType];var deprecratedKey=t.DEPRECATED_KEYS[nodeType];if(deprecratedKey){console.trace("Visitor defined for "+nodeType+" but it has been renamed to "+deprecratedKey);aliases=[deprecratedKey]}if(!aliases)continue;delete visitor[nodeType];for(var _iterator=aliases,_isArray=Array.isArray(_iterator),_i3=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i3>=_iterator.length)break;_ref=_iterator[_i3++]}else{_i3=_iterator.next();if(_i3.done)break;_ref=_i3.value}var alias=_ref;var existing=visitor[alias];if(existing){mergePair(existing,fns)}else{visitor[alias]=_lodashLangClone2["default"](fns)}}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;ensureCallbackArrays(visitor[nodeType])}return visitor}function verify(visitor){if(visitor._verified)return;if(typeof visitor==="function"){throw new Error(messages.get("traverseVerifyRootFunction"))}for(var nodeType in visitor){if(nodeType==="enter"||nodeType==="exit"){validateVisitorMethods(nodeType,visitor[nodeType])}if(shouldIgnoreKey(nodeType))continue;if(t.TYPES.indexOf(nodeType)<0){throw new Error(messages.get("traverseVerifyNodeType",nodeType))}var visitors=visitor[nodeType];if(typeof visitors==="object"){for(var visitorKey in visitors){if(visitorKey==="enter"||visitorKey==="exit"){validateVisitorMethods(nodeType+"."+visitorKey,visitors[visitorKey])}else{throw new Error(messages.get("traverseVerifyVisitorProperty",nodeType,visitorKey))}}}}visitor._verified=true}function validateVisitorMethods(path,val){var fns=[].concat(val);for(var _iterator2=fns,_isArray2=Array.isArray(_iterator2),_i5=0,_iterator2=_isArray2?_iterator2:_getIterator(_iterator2);;){var _ref2;if(_isArray2){if(_i5>=_iterator2.length)break;_ref2=_iterator2[_i5++]}else{_i5=_iterator2.next();if(_i5.done)break;_ref2=_i5.value}var fn=_ref2;if(typeof fn!=="function"){throw new TypeError("Non-function found defined in "+path+" with type "+typeof fn)}}}function merge(visitors){var states=arguments.length<=1||arguments[1]===undefined?[]:arguments[1];var rootVisitor={};for(var i=0;i<visitors.length;i++){var visitor=visitors[i];var state=states[i];explode(visitor);for(var type in visitor){var visitorType=visitor[type];if(state)visitorType=wrapWithState(visitorType,state);var nodeVisitor=rootVisitor[type]=rootVisitor[type]||{};mergePair(nodeVisitor,visitorType)}}return rootVisitor}function wrapWithState(oldVisitor,state){var newVisitor={};for(var key in oldVisitor){var fns=oldVisitor[key];if(!Array.isArray(fns))continue;fns=fns.map(function(fn){var newFn=function newFn(path){return fn.call(state,path,state)};newFn.toString=function(){return fn.toString()};return newFn});newVisitor[key]=fns}return newVisitor}function ensureEntranceObjects(obj){for(var key in obj){if(shouldIgnoreKey(key))continue;var fns=obj[key];if(typeof fns==="function"){obj[key]={enter:fns}}}}function ensureCallbackArrays(obj){if(obj.enter&&!Array.isArray(obj.enter))obj.enter=[obj.enter];if(obj.exit&&!Array.isArray(obj.exit))obj.exit=[obj.exit]}function wrapCheck(wrapper,fn){var newFn=function newFn(path){if(wrapper.checkPath(path)){return fn.apply(this,arguments)}};newFn.toString=function(){return fn.toString()};return newFn}function shouldIgnoreKey(key){if(key[0]==="_")return true;if(key==="enter"||key==="exit"||key==="shouldSkip")return true;if(key==="blacklist"||key==="noScope"||key==="skipKeys")return true;return false}function mergePair(dest,src){for(var key in src){dest[key]=[].concat(dest[key]||[],src[key])}}},{"./path/lib/virtual-types":75,"babel-messages":101,"babel-runtime/core-js/get-iterator":102,"babel-runtime/core-js/object/keys":109,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-types":201,"lodash/lang/clone":281}],83:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];exports.__esModule=true;var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _jsTokens=require("js-tokens");var _jsTokens2=_interopRequireDefault(_jsTokens);var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _chalk=require("chalk");var _chalk2=_interopRequireDefault(_chalk);function lineNumbers(lines){return lines}var defs={string:_chalk2["default"].red,punctuator:_chalk2["default"].bold,curly:_chalk2["default"].green,parens:_chalk2["default"].blue.bold,square:_chalk2["default"].yellow,keyword:_chalk2["default"].cyan,number:_chalk2["default"].magenta,regex:_chalk2["default"].magenta,comment:_chalk2["default"].grey,invalid:_chalk2["default"].inverse};var NEWLINE=/\r\n|[\n\r\u2028\u2029]/;function getTokenType(match){var token=_jsTokens2["default"].matchToToken(match);if(token.type==="name"&&_esutils2["default"].keyword.isReservedWordES6(token.value)){return"keyword"}if(token.type==="punctuator"){switch(token.value){case"{":case"}":return"curly";case"(":case")":return"parens";case"[":case"]":return"square"}}return token.type}function highlight(text){return text.replace(_jsTokens2["default"],function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var type=getTokenType(args);var colorize=defs[type];if(colorize){return args[0].split(NEWLINE).map(function(str){return colorize(str)}).join("\n")}else{return args[0]}})}exports["default"]=function(rawLines,lineNumber,colNumber){var opts=arguments.length<=3||arguments[3]===undefined?{}:arguments[3];colNumber=Math.max(colNumber,0);var highlighted=opts.highlightCode&&_chalk2["default"].supportsColor;if(highlighted)rawLines=highlight(rawLines);var lines=rawLines.split(NEWLINE);var start=Math.max(lineNumber-3,0);var end=Math.min(lines.length,lineNumber+3);if(!lineNumber&&!colNumber){start=0;end=lines.length}var frame=lineNumbers(lines.slice(start,end),{start:start+1,before:" ",after:" | ",transform:function transform(params){if(params.number!==lineNumber){return}if(colNumber){params.line+="\n"+params.before+_repeating2["default"](" ",params.width)+params.after+_repeating2["default"](" ",colNumber-1)+"^"}params.before=params.before.replace(/^./,">")}}).join("\n");if(highlighted){return _chalk2["default"].reset(frame)}else{return frame}};module.exports=exports["default"]},{"babel-runtime/helpers/interop-require-default":117,chalk:84,esutils:99,"js-tokens":100,repeating:300}],84:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;var isSimpleWindowsTerm=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(isSimpleWindowsTerm){ansiStyles.blue.open="[94m"}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function build(_styles){var builder=function(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a<argsLen;a++){str+=" "+args[a]}}if(!this.enabled||!str){return str}var nestedStyles=this._styles;var i=nestedStyles.length;var originalDim=ansiStyles.dim.open;if(isSimpleWindowsTerm&&(nestedStyles.indexOf("gray")!==-1||nestedStyles.indexOf("grey")!==-1)){ansiStyles.dim.open=""}while(i--){var code=ansiStyles[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close}ansiStyles.dim.open=originalDim;return str}function init(){var ret={};Object.keys(styles).forEach(function(name){ret[name]={get:function(){return build.call(this,[name])}}});return ret}defineProps(Chalk.prototype,init());module.exports=new Chalk;module.exports.styles=ansiStyles;module.exports.hasColor=hasAnsi;module.exports.stripColor=stripAnsi;module.exports.supportsColor=supportsColor}).call(this,require("_process"))},{_process:429,"ansi-styles":85,"escape-string-regexp":90,"has-ansi":91,"strip-ansi":93,"supports-color":95}],85:[function(require,module,exports){"use strict";var colorConvert=require("color-convert");function wrapAnsi16(fn,offset){return function(){var code=fn.apply(colorConvert,arguments);return"["+(code+offset)+"m"}}function wrapAnsi256(fn,offset){return function(){var code=fn.apply(colorConvert,arguments);return"["+(38+offset)+";5;"+code+"m"}}function wrapAnsi16m(fn,offset){return function(){var rgb=fn.apply(colorConvert,arguments);return"["+(38+offset)+";2;"+rgb[0]+";"+rgb[1]+";"+rgb[2]+"m"}}function assembleStyles(){var styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};styles.color.grey=styles.color.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]=group[styleName]={open:"["+style[0]+"m",close:"["+style[1]+"m"}});Object.defineProperty(styles,groupName,{value:group,enumerable:false})});function rgb2rgb(r,g,b){return[r,g,b]}styles.color.close="[39m";styles.bgColor.close="[49m";styles.color.ansi={};styles.color.ansi256={};styles.color.ansi16m={rgb:wrapAnsi16m(rgb2rgb,0)};styles.bgColor.ansi={};styles.bgColor.ansi256={};styles.bgColor.ansi16m={rgb:wrapAnsi16m(rgb2rgb,10)};for(var key in colorConvert){if(!colorConvert.hasOwnProperty(key)||typeof colorConvert[key]!=="object"){continue}var suite=colorConvert[key];if("ansi16"in suite){styles.color.ansi[key]=wrapAnsi16(suite.ansi16,0);styles.bgColor.ansi[key]=wrapAnsi16(suite.ansi16,10)}if("ansi256"in suite){styles.color.ansi256[key]=wrapAnsi256(suite.ansi256,0);styles.bgColor.ansi256[key]=wrapAnsi256(suite.ansi256,10)}if("rgb"in suite){styles.color.ansi16m[key]=wrapAnsi16m(suite.rgb,0);styles.bgColor.ansi16m[key]=wrapAnsi16m(suite.rgb,10)}}return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})},{"color-convert":88}],86:[function(require,module,exports){var cssKeywords=require("./css-keywords");var reverseKeywords={};for(var key in cssKeywords){if(cssKeywords.hasOwnProperty(key)){reverseKeywords[cssKeywords[key].join()]=key}}var convert=module.exports={rgb:{},hsl:{},hsv:{},hwb:{},cmyk:{},xyz:{},lab:{},lch:{},hex:{},keyword:{},ansi16:{},ansi256:{}};convert.rgb.hsl=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var min=Math.min(r,g,b);var max=Math.max(r,g,b);var delta=max-min;var h;var s;var l;if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}l=(min+max)/2;if(max===min){s=0}else if(l<=.5){s=delta/(max+min)}else{s=delta/(2-max-min)}return[h,s*100,l*100]};convert.rgb.hsv=function(rgb){var r=rgb[0];var g=rgb[1];var b=rgb[2];var min=Math.min(r,g,b);var max=Math.max(r,g,b);var delta=max-min;var h;var s;var v;if(max===0){s=0}else{s=delta/max*1e3/10}if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}v=max/255*1e3/10;return[h,s,v]};convert.rgb.hwb=function(rgb){var r=rgb[0];var g=rgb[1];var b=rgb[2];var h=convert.rgb.hsl(rgb)[0];var w=1/255*Math.min(r,Math.min(g,b));b=1-1/255*Math.max(r,Math.max(g,b));return[h,w*100,b*100]};convert.rgb.cmyk=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var c;var m;var y;var k;k=Math.min(1-r,1-g,1-b);c=(1-r-k)/(1-k)||0;m=(1-g-k)/(1-k)||0;y=(1-b-k)/(1-k)||0;return[c*100,m*100,y*100,k*100]};convert.rgb.keyword=function(rgb){return reverseKeywords[rgb.join()]};convert.keyword.rgb=function(keyword){return cssKeywords[keyword]};convert.rgb.xyz=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;g=g>.04045?Math.pow((g+.055)/1.055,2.4):g/12.92;b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92;var x=r*.4124+g*.3576+b*.1805;var y=r*.2126+g*.7152+b*.0722;var z=r*.0193+g*.1192+b*.9505;return[x*100,y*100,z*100]};convert.rgb.lab=function(rgb){var xyz=convert.rgb.xyz(rgb);var x=xyz[0];var y=xyz[1];var z=xyz[2];var l;var a;var b;x/=95.047;y/=100;z/=108.883;x=x>.008856?Math.pow(x,1/3):7.787*x+16/116;y=y>.008856?Math.pow(y,1/3):7.787*y+16/116;z=z>.008856?Math.pow(z,1/3):7.787*z+16/116;l=116*y-16;a=500*(x-y);b=200*(y-z);return[l,a,b]};convert.hsl.rgb=function(hsl){var h=hsl[0]/360;var s=hsl[1]/100;var l=hsl[2]/100;var t1;var t2;var t3;var rgb;var val;if(s===0){val=l*255;return[val,val,val]}if(l<.5){t2=l*(1+s)}else{t2=l+s-l*s}t1=2*l-t2;rgb=[0,0,0];for(var i=0;i<3;i++){t3=h+1/3*-(i-1);if(t3<0){t3++}if(t3>1){t3--}if(6*t3<1){val=t1+(t2-t1)*6*t3}else if(2*t3<1){val=t2}else if(3*t3<2){val=t1+(t2-t1)*(2/3-t3)*6}else{val=t1}rgb[i]=val*255}return rgb};convert.hsl.hsv=function(hsl){var h=hsl[0];var s=hsl[1]/100;var l=hsl[2]/100;var sv;var v;if(l===0){return[0,0,0]}l*=2;s*=l<=1?l:2-l;v=(l+s)/2;sv=2*s/(l+s);return[h,sv*100,v*100]};convert.hsv.rgb=function(hsv){var h=hsv[0]/60;var s=hsv[1]/100;var v=hsv[2]/100;var hi=Math.floor(h)%6;var f=h-Math.floor(h);var p=255*v*(1-s);var q=255*v*(1-s*f);var t=255*v*(1-s*(1-f));v*=255;switch(hi){case 0:return[v,t,p];case 1:return[q,v,p];case 2:return[p,v,t];case 3:return[p,q,v];case 4:return[t,p,v];case 5:return[v,p,q]}};convert.hsv.hsl=function(hsv){var h=hsv[0];var s=hsv[1]/100;var v=hsv[2]/100;var sl;var l;l=(2-s)*v;sl=s*v;sl/=l<=1?l:2-l;sl=sl||0;l/=2;return[h,sl*100,l*100]};convert.hwb.rgb=function(hwb){var h=hwb[0]/360;var wh=hwb[1]/100;var bl=hwb[2]/100;var ratio=wh+bl;var i;var v;var f;var n;if(ratio>1){wh/=ratio;bl/=ratio}i=Math.floor(6*h);v=1-bl;f=6*h-i;if((i&1)!==0){f=1-f}n=wh+f*(v-wh);var r;var g;var b;switch(i){default:case 6:case 0:r=v;g=n;b=wh;break;case 1:r=n;g=v;b=wh;break;case 2:r=wh;g=v;b=n;break;case 3:r=wh;g=n;b=v;break;case 4:r=n;g=wh;b=v;break;case 5:r=v;g=wh;b=n;break}return[r*255,g*255,b*255]};convert.cmyk.rgb=function(cmyk){var c=cmyk[0]/100;var m=cmyk[1]/100;var y=cmyk[2]/100;var k=cmyk[3]/100;var r;var g;var b;r=1-Math.min(1,c*(1-k)+k);g=1-Math.min(1,m*(1-k)+k);b=1-Math.min(1,y*(1-k)+k);return[r*255,g*255,b*255]};convert.xyz.rgb=function(xyz){var x=xyz[0]/100;var y=xyz[1]/100;var z=xyz[2]/100;var r;var g;var b;r=x*3.2406+y*-1.5372+z*-.4986;g=x*-.9689+y*1.8758+z*.0415;b=x*.0557+y*-.204+z*1.057;r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92;g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g*=12.92;b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:b*=12.92;r=Math.min(Math.max(0,r),1);g=Math.min(Math.max(0,g),1);b=Math.min(Math.max(0,b),1);return[r*255,g*255,b*255]};convert.xyz.lab=function(xyz){var x=xyz[0];var y=xyz[1];var z=xyz[2];var l;var a;var b;x/=95.047;y/=100;z/=108.883;x=x>.008856?Math.pow(x,1/3):7.787*x+16/116;y=y>.008856?Math.pow(y,1/3):7.787*y+16/116;z=z>.008856?Math.pow(z,1/3):7.787*z+16/116;l=116*y-16;a=500*(x-y);b=200*(y-z);return[l,a,b]};convert.lab.xyz=function(lab){var l=lab[0];var a=lab[1];var b=lab[2];var x;var y;var z;var y2;if(l<=8){y=l*100/903.3;y2=7.787*(y/100)+16/116}else{y=100*Math.pow((l+16)/116,3);y2=Math.pow(y/100,1/3)}x=x/95.047<=.008856?x=95.047*(a/500+y2-16/116)/7.787:95.047*Math.pow(a/500+y2,3);z=z/108.883<=.008859?z=108.883*(y2-b/200-16/116)/7.787:108.883*Math.pow(y2-b/200,3);return[x,y,z]};convert.lab.lch=function(lab){var l=lab[0];var a=lab[1];var b=lab[2];var hr;var h;var c;hr=Math.atan2(b,a);h=hr*360/2/Math.PI;if(h<0){h+=360}c=Math.sqrt(a*a+b*b);return[l,c,h]};convert.lch.lab=function(lch){var l=lch[0];var c=lch[1];var h=lch[2];var a;var b;var hr;hr=h/360*2*Math.PI;a=c*Math.cos(hr);b=c*Math.sin(hr);return[l,a,b]};convert.rgb.ansi16=function(args){var r=args[0];var g=args[1];var b=args[2];var value=1 in arguments?arguments[1]:convert.rgb.hsv(args)[2];value=Math.round(value/50);if(value===0){return 30}var ansi=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(r/255));if(value===2){ansi+=60}return ansi};convert.hsv.ansi16=function(args){return convert.rgb.ansi16(convert.hsv.rgb(args),args[2])};convert.rgb.ansi256=function(args){var r=args[0];var g=args[1];var b=args[2];if(r===g&&g===b){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}var ansi=16+36*Math.round(r/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5);return ansi};convert.ansi16.rgb=function(args){var color=args%10;if(color===0||color===7){if(args>50){color+=3.5}color=color/10.5*255;return[color,color,color]}var mult=(~~(args>50)+1)*.5;var r=(color&1)*mult*255;var g=(color>>1&1)*mult*255;var b=(color>>2&1)*mult*255;return[r,g,b]};convert.ansi256.rgb=function(args){if(args>=232){var c=(args-232)*10+8;return[c,c,c]}args-=16;var rem;var r=Math.floor(args/36)/5*255;var g=Math.floor((rem=args%36)/6)/5*255;var b=rem%6/5*255;return[r,g,b]};convert.rgb.hex=function(args){var integer=((Math.round(args[0])&255)<<16)+((Math.round(args[1])&255)<<8)+(Math.round(args[2])&255);var string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.hex.rgb=function(args){var match=args.toString(16).match(/[a-f0-9]{6}/i);if(!match){return[0,0,0]}var integer=parseInt(match[0],16);var r=integer>>16&255;var g=integer>>8&255;var b=integer&255;return[r,g,b]}},{"./css-keywords":87}],87:[function(require,module,exports){module.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],88:[function(require,module,exports){var conversions=require("./conversions");var route=require("./route");var convert={};var models=Object.keys(conversions);function wrapRaw(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}return fn(args)};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}function wrapRounded(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}var result=fn(args);if(typeof result==="object"){for(var len=result.length,i=0;i<len;i++){result[i]=Math.round(result[i])}}return result};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}models.forEach(function(fromModel){convert[fromModel]={};var routes=route(fromModel);var routeModels=Object.keys(routes);routeModels.forEach(function(toModel){var fn=routes[toModel];convert[fromModel][toModel]=wrapRounded(fn);convert[fromModel][toModel].raw=wrapRaw(fn)})});module.exports=convert},{"./conversions":86,"./route":89}],89:[function(require,module,exports){var conversions=require("./conversions");var models=Object.keys(conversions);function buildGraph(){var graph={};for(var len=models.length,i=0;i<len;i++){graph[models[i]]={distance:-1,parent:null}}return graph}function deriveBFS(fromModel){var graph=buildGraph();var queue=[fromModel];graph[fromModel].distance=0;while(queue.length){var current=queue.pop();var adjacents=Object.keys(conversions[current]);for(var len=adjacents.length,i=0;i<len;i++){var adjacent=adjacents[i];var node=graph[adjacent];if(node.distance===-1){node.distance=graph[current].distance+1;node.parent=current;queue.unshift(adjacent)}}}return graph}function link(from,to){return function(args){return to(from(args))}}function wrapConversion(toModel,graph){var path=[graph[toModel].parent,toModel];var fn=conversions[graph[toModel].parent][toModel];var cur=graph[toModel].parent;while(graph[cur].parent){path.unshift(graph[cur].parent);fn=link(conversions[graph[cur].parent][cur],fn);cur=graph[cur].parent}fn.conversion=path;return fn}module.exports=function(fromModel){var graph=deriveBFS(fromModel);var conversion={};var models=Object.keys(graph);for(var len=models.length,i=0;i<len;i++){var toModel=models[i];var node=graph[toModel];if(node.parent===null){continue}conversion[toModel]=wrapConversion(toModel,graph)}return conversion}},{"./conversions":86}],90:[function(require,module,exports){"use strict";var matchOperatorsRe=/[|\\{}()[\]^$+*?.]/g;module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}return str.replace(matchOperatorsRe,"\\$&"); | |
}},{}],91:[function(require,module,exports){"use strict";var ansiRegex=require("ansi-regex");var re=new RegExp(ansiRegex().source);module.exports=re.test.bind(re)},{"ansi-regex":92}],92:[function(require,module,exports){"use strict";module.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],93:[function(require,module,exports){"use strict";var ansiRegex=require("ansi-regex")();module.exports=function(str){return typeof str==="string"?str.replace(ansiRegex,""):str}},{"ansi-regex":94}],94:[function(require,module,exports){module.exports=require(92)},{}],95:[function(require,module,exports){(function(process){"use strict";var argv=process.argv;var terminator=argv.indexOf("--");var hasFlag=function(flag){flag="--"+flag;var pos=argv.indexOf(flag);return pos!==-1&&(terminator!==-1?pos<terminator:true)};module.exports=function(){if("FORCE_COLOR"in process.env){return true}if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")){return false}if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}()}).call(this,require("_process"))},{_process:429}],96:[function(require,module,exports){(function(){"use strict";function isExpression(node){if(node==null){return false}switch(node.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return true}return false}function isIterationStatement(node){if(node==null){return false}switch(node.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return true}return false}function isStatement(node){if(node==null){return false}switch(node.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return true}return false}function isSourceElement(node){return isStatement(node)||node!=null&&node.type==="FunctionDeclaration"}function trailingStatement(node){switch(node.type){case"IfStatement":if(node.alternate!=null){return node.alternate}return node.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return node.body}return null}function isProblematicIfStatement(node){var current;if(node.type!=="IfStatement"){return false}if(node.alternate==null){return false}current=node.consequent;do{if(current.type==="IfStatement"){if(current.alternate==null){return true}}current=trailingStatement(current)}while(current);return false}module.exports={isExpression:isExpression,isStatement:isStatement,isIterationStatement:isIterationStatement,isSourceElement:isSourceElement,isProblematicIfStatement:isProblematicIfStatement,trailingStatement:trailingStatement}})()},{}],97:[function(require,module,exports){(function(){"use strict";var ES6Regex,ES5Regex,NON_ASCII_WHITESPACES,IDENTIFIER_START,IDENTIFIER_PART,ch;ES5Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/};ES6Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function isDecimalDigit(ch){return 48<=ch&&ch<=57}function isHexDigit(ch){return 48<=ch&&ch<=57||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function fromCodePoint(cp){if(cp<=65535){return String.fromCharCode(cp)}var cu1=String.fromCharCode(Math.floor((cp-65536)/1024)+55296);var cu2=String.fromCharCode((cp-65536)%1024+56320);return cu1+cu2}IDENTIFIER_START=new Array(128);for(ch=0;ch<128;++ch){IDENTIFIER_START[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95}IDENTIFIER_PART=new Array(128);for(ch=0;ch<128;++ch){IDENTIFIER_PART[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95}function isIdentifierStartES5(ch){return ch<128?IDENTIFIER_START[ch]:ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))}function isIdentifierPartES5(ch){return ch<128?IDENTIFIER_PART[ch]:ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))}function isIdentifierStartES6(ch){return ch<128?IDENTIFIER_START[ch]:ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))}function isIdentifierPartES6(ch){return ch<128?IDENTIFIER_PART[ch]:ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStartES5:isIdentifierStartES5,isIdentifierPartES5:isIdentifierPartES5,isIdentifierStartES6:isIdentifierStartES6,isIdentifierPartES6:isIdentifierPartES6}})()},{}],98:[function(require,module,exports){(function(){"use strict";var code=require("./code");function isStrictModeReservedWordES6(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return true;default:return false}}function isKeywordES5(id,strict){if(!strict&&id==="yield"){return false}return isKeywordES6(id,strict)}function isKeywordES6(id,strict){if(strict&&isStrictModeReservedWordES6(id)){return true}switch(id.length){case 2:return id==="if"||id==="in"||id==="do";case 3:return id==="var"||id==="for"||id==="new"||id==="try";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||id==="yield"||id==="class"||id==="super";case 6:return id==="return"||id==="typeof"||id==="delete"||id==="switch"||id==="export"||id==="import";case 7:return id==="default"||id==="finally"||id==="extends";case 8:return id==="function"||id==="continue"||id==="debugger";case 10:return id==="instanceof";default:return false}}function isReservedWordES5(id,strict){return id==="null"||id==="true"||id==="false"||isKeywordES5(id,strict)}function isReservedWordES6(id,strict){return id==="null"||id==="true"||id==="false"||isKeywordES6(id,strict)}function isRestrictedWord(id){return id==="eval"||id==="arguments"}function isIdentifierNameES5(id){var i,iz,ch;if(id.length===0){return false}ch=id.charCodeAt(0);if(!code.isIdentifierStartES5(ch)){return false}for(i=1,iz=id.length;i<iz;++i){ch=id.charCodeAt(i);if(!code.isIdentifierPartES5(ch)){return false}}return true}function decodeUtf16(lead,trail){return(lead-55296)*1024+(trail-56320)+65536}function isIdentifierNameES6(id){var i,iz,ch,lowCh,check;if(id.length===0){return false}check=code.isIdentifierStartES6;for(i=0,iz=id.length;i<iz;++i){ch=id.charCodeAt(i);if(55296<=ch&&ch<=56319){++i;if(i>=iz){return false}lowCh=id.charCodeAt(i);if(!(56320<=lowCh&&lowCh<=57343)){return false}ch=decodeUtf16(ch,lowCh)}if(!check(ch)){return false}check=code.isIdentifierPartES6}return true}function isIdentifierES5(id,strict){return isIdentifierNameES5(id)&&!isReservedWordES5(id,strict)}function isIdentifierES6(id,strict){return isIdentifierNameES6(id)&&!isReservedWordES6(id,strict)}module.exports={isKeywordES5:isKeywordES5,isKeywordES6:isKeywordES6,isReservedWordES5:isReservedWordES5,isReservedWordES6:isReservedWordES6,isRestrictedWord:isRestrictedWord,isIdentifierNameES5:isIdentifierNameES5,isIdentifierNameES6:isIdentifierNameES6,isIdentifierES5:isIdentifierES5,isIdentifierES6:isIdentifierES6}})()},{"./code":97}],99:[function(require,module,exports){(function(){"use strict";exports.ast=require("./ast");exports.code=require("./code");exports.keyword=require("./keyword")})()},{"./ast":96,"./code":97,"./keyword":98}],100:[function(require,module,exports){module.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g; | |
module.exports.matchToToken=function(match){var token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}},{}],101:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.get=get;exports.parseArgs=parseArgs;var _util=require("util");var util=_interopRequireWildcard(_util);var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3",pluginUnknown:"Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[i-1]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{"babel-runtime/helpers/interop-require-wildcard":118,util:449}],102:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/get-iterator"),__esModule:true}},{"core-js/library/fn/get-iterator":120}],103:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/number/max-safe-integer"),__esModule:true}},{"core-js/library/fn/number/max-safe-integer":121}],104:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/object/create"),__esModule:true}},{"core-js/library/fn/object/create":122}],105:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/object/define-property"),__esModule:true}},{"core-js/library/fn/object/define-property":123}],106:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/object/get-own-property-descriptor"),__esModule:true}},{"core-js/library/fn/object/get-own-property-descriptor":124}],107:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/object/get-own-property-names"),__esModule:true}},{"core-js/library/fn/object/get-own-property-names":125}],108:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/object/get-own-property-symbols"),__esModule:true}},{"core-js/library/fn/object/get-own-property-symbols":126}],109:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/object/keys"),__esModule:true}},{"core-js/library/fn/object/keys":127}],110:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/symbol"),__esModule:true}},{"core-js/library/fn/symbol":129}],111:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/symbol/for"),__esModule:true}},{"core-js/library/fn/symbol/for":128}],112:[function(require,module,exports){module.exports={"default":require("core-js/library/fn/weak-map"),__esModule:true}},{"core-js/library/fn/weak-map":130}],113:[function(require,module,exports){"use strict";exports["default"]=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true},{}],114:[function(require,module,exports){"use strict";var _Object$defineProperty=require("babel-runtime/core-js/object/define-property")["default"];exports["default"]=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;_Object$defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();exports.__esModule=true},{"babel-runtime/core-js/object/define-property":105}],115:[function(require,module,exports){"use strict";var _Object$getOwnPropertyNames=require("babel-runtime/core-js/object/get-own-property-names")["default"];var _Object$getOwnPropertyDescriptor=require("babel-runtime/core-js/object/get-own-property-descriptor")["default"];var _Object$defineProperty=require("babel-runtime/core-js/object/define-property")["default"];exports["default"]=function(obj,defaults){var keys=_Object$getOwnPropertyNames(defaults);for(var i=0;i<keys.length;i++){var key=keys[i];var value=_Object$getOwnPropertyDescriptor(defaults,key);if(value&&value.configurable&&obj[key]===undefined){_Object$defineProperty(obj,key,value)}}return obj};exports.__esModule=true},{"babel-runtime/core-js/object/define-property":105,"babel-runtime/core-js/object/get-own-property-descriptor":106,"babel-runtime/core-js/object/get-own-property-names":107}],116:[function(require,module,exports){"use strict";exports["default"]=function(obj,defaults){var newObj=defaults({},obj);delete newObj["default"];return newObj};exports.__esModule=true},{}],117:[function(require,module,exports){"use strict";exports["default"]=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.__esModule=true},{}],118:[function(require,module,exports){"use strict";exports["default"]=function(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}};exports.__esModule=true},{}],119:[function(require,module,exports){"use strict";exports["default"]=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.__esModule=true},{}],120:[function(require,module,exports){require("../modules/web.dom.iterable");require("../modules/es6.string.iterator");module.exports=require("../modules/core.get-iterator")},{"../modules/core.get-iterator":179,"../modules/es6.string.iterator":186,"../modules/web.dom.iterable":189}],121:[function(require,module,exports){require("../../modules/es6.number.max-safe-integer");module.exports=9007199254740991},{"../../modules/es6.number.max-safe-integer":181}],122:[function(require,module,exports){var $=require("../../modules/$");module.exports=function create(P,D){return $.create(P,D)}},{"../../modules/$":161}],123:[function(require,module,exports){var $=require("../../modules/$");module.exports=function defineProperty(it,key,desc){return $.setDesc(it,key,desc)}},{"../../modules/$":161}],124:[function(require,module,exports){var $=require("../../modules/$");require("../../modules/es6.object.get-own-property-descriptor");module.exports=function getOwnPropertyDescriptor(it,key){return $.getDesc(it,key)}},{"../../modules/$":161,"../../modules/es6.object.get-own-property-descriptor":182}],125:[function(require,module,exports){var $=require("../../modules/$");require("../../modules/es6.object.get-own-property-names");module.exports=function getOwnPropertyNames(it){return $.getNames(it)}},{"../../modules/$":161,"../../modules/es6.object.get-own-property-names":183}],126:[function(require,module,exports){require("../../modules/es6.symbol");module.exports=require("../../modules/$.core").Object.getOwnPropertySymbols},{"../../modules/$.core":140,"../../modules/es6.symbol":187}],127:[function(require,module,exports){require("../../modules/es6.object.keys");module.exports=require("../../modules/$.core").Object.keys},{"../../modules/$.core":140,"../../modules/es6.object.keys":184}],128:[function(require,module,exports){require("../../modules/es6.symbol");module.exports=require("../../modules/$.core").Symbol["for"]},{"../../modules/$.core":140,"../../modules/es6.symbol":187}],129:[function(require,module,exports){require("../../modules/es6.symbol");require("../../modules/es6.object.to-string");module.exports=require("../../modules/$.core").Symbol},{"../../modules/$.core":140,"../../modules/es6.object.to-string":185,"../../modules/es6.symbol":187}],130:[function(require,module,exports){require("../modules/es6.object.to-string");require("../modules/web.dom.iterable");require("../modules/es6.weak-map");module.exports=require("../modules/$.core").WeakMap},{"../modules/$.core":140,"../modules/es6.object.to-string":185,"../modules/es6.weak-map":188,"../modules/web.dom.iterable":189}],131:[function(require,module,exports){module.exports=function(it){if(typeof it!="function")throw TypeError(it+" is not a function!");return it}},{}],132:[function(require,module,exports){module.exports=function(){}},{}],133:[function(require,module,exports){var isObject=require("./$.is-object");module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},{"./$.is-object":155}],134:[function(require,module,exports){var ctx=require("./$.ctx"),IObject=require("./$.iobject"),toObject=require("./$.to-object"),toLength=require("./$.to-length"),asc=require("./$.array-species-create");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function($this,callbackfn,that){var O=toObject($this),self=IObject(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=IS_MAP?asc($this,length):IS_FILTER?asc($this,0):undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$.array-species-create":135,"./$.ctx":141,"./$.iobject":152,"./$.to-length":174,"./$.to-object":175}],135:[function(require,module,exports){var isObject=require("./$.is-object"),isArray=require("./$.is-array"),SPECIES=require("./$.wks")("species");module.exports=function(original,length){var C;if(isArray(original)){C=original.constructor;if(typeof C=="function"&&(C===Array||isArray(C.prototype)))C=undefined;if(isObject(C)){C=C[SPECIES];if(C===null)C=undefined}}return new(C===undefined?Array:C)(length)}},{"./$.is-array":154,"./$.is-object":155,"./$.wks":177}],136:[function(require,module,exports){var cof=require("./$.cof"),TAG=require("./$.wks")("toStringTag"),ARG=cof(function(){return arguments}())=="Arguments";module.exports=function(it){var O,T,B;return it===undefined?"Undefined":it===null?"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:ARG?cof(O):(B=cof(O))=="Object"&&typeof O.callee=="function"?"Arguments":B}},{"./$.cof":137,"./$.wks":177}],137:[function(require,module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},{}],138:[function(require,module,exports){"use strict";var hide=require("./$.hide"),redefineAll=require("./$.redefine-all"),anObject=require("./$.an-object"),isObject=require("./$.is-object"),strictNew=require("./$.strict-new"),forOf=require("./$.for-of"),createArrayMethod=require("./$.array-methods"),$has=require("./$.has"),WEAK=require("./$.uid")("weak"),isExtensible=Object.isExtensible||isObject,arrayFind=createArrayMethod(5),arrayFindIndex=createArrayMethod(6),id=0;var frozenStore=function(that){return that._l||(that._l=new FrozenStore)};var FrozenStore=function(){this.a=[]};var findFrozen=function(store,key){return arrayFind(store.a,function(it){return it[0]===key})};FrozenStore.prototype={get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.a.push([key,value])},"delete":function(key){var index=arrayFindIndex(this.a,function(it){return it[0]===key});if(~index)this.a.splice(index,1);return!!~index}};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){strictNew(that,C,NAME);that._i=id++;that._l=undefined;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});redefineAll(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(!isExtensible(key))return frozenStore(this)["delete"](key);return $has(key,WEAK)&&$has(key[WEAK],this._i)&&delete key[WEAK][this._i]},has:function has(key){if(!isObject(key))return false;if(!isExtensible(key))return frozenStore(this).has(key);return $has(key,WEAK)&&$has(key[WEAK],this._i)}});return C},def:function(that,key,value){if(!isExtensible(anObject(key))){frozenStore(that).set(key,value)}else{$has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that._i]=value}return that},frozenStore:frozenStore,WEAK:WEAK}},{"./$.an-object":133,"./$.array-methods":134,"./$.for-of":147,"./$.has":150,"./$.hide":151,"./$.is-object":155,"./$.redefine-all":166,"./$.strict-new":170,"./$.uid":176}],139:[function(require,module,exports){"use strict";var $=require("./$"),global=require("./$.global"),$export=require("./$.export"),fails=require("./$.fails"),hide=require("./$.hide"),redefineAll=require("./$.redefine-all"),forOf=require("./$.for-of"),strictNew=require("./$.strict-new"),isObject=require("./$.is-object"),setToStringTag=require("./$.set-to-string-tag"),DESCRIPTORS=require("./$.descriptors");module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};if(!DESCRIPTORS||typeof C!="function"||!(IS_WEAK||proto.forEach&&!fails(function(){(new C).entries().next()}))){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);redefineAll(C.prototype,methods)}else{C=wrapper(function(target,iterable){strictNew(target,C,NAME);target._c=new Base;if(iterable!=undefined)forOf(iterable,IS_MAP,target[ADDER],target)});$.each.call("add,clear,delete,forEach,get,has,set,keys,values,entries".split(","),function(KEY){var IS_ADDER=KEY=="add"||KEY=="set";if(KEY in proto&&!(IS_WEAK&&KEY=="clear"))hide(C.prototype,KEY,function(a,b){if(!IS_ADDER&&IS_WEAK&&!isObject(a))return KEY=="get"?undefined:false;var result=this._c[KEY](a===0?0:a,b);return IS_ADDER?this:result})});if("size"in proto)$.setDesc(C.prototype,"size",{get:function(){return this._c.size}})}setToStringTag(C,NAME);O[NAME]=C;$export($export.G+$export.W+$export.F,O);if(!IS_WEAK)common.setStrong(C,NAME,IS_MAP);return C}},{"./$":161,"./$.descriptors":143,"./$.export":145,"./$.fails":146,"./$.for-of":147,"./$.global":149,"./$.hide":151,"./$.is-object":155,"./$.redefine-all":166,"./$.set-to-string-tag":168,"./$.strict-new":170}],140:[function(require,module,exports){var core=module.exports={version:"1.2.6"};if(typeof __e=="number")__e=core},{}],141:[function(require,module,exports){var aFunction=require("./$.a-function");module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.a-function":131}],142:[function(require,module,exports){module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}},{}],143:[function(require,module,exports){module.exports=!require("./$.fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./$.fails":146}],144:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getSymbols=$.getSymbols;if(getSymbols){var symbols=getSymbols(it),isEnum=$.isEnum,i=0,key;while(symbols.length>i)if(isEnum.call(it,key=symbols[i++]))keys.push(key)}return keys}},{"./$":161}],145:[function(require,module,exports){var global=require("./$.global"),core=require("./$.core"),ctx=require("./$.ctx"),PROTOTYPE="prototype";var $export=function(type,name,source){var IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{})[PROTOTYPE],key,own,out;if(IS_GLOBAL)source=name;for(key in source){own=!IS_FORCED&&target&&key in target;if(own&&key in exports)continue;out=own?target[key]:source[key];exports[key]=IS_GLOBAL&&typeof target[key]!="function"?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?function(C){var F=function(param){return this instanceof C?new C(param):C(param)};F[PROTOTYPE]=C[PROTOTYPE];return F}(out):IS_PROTO&&typeof out=="function"?ctx(Function.call,out):out;if(IS_PROTO)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out}};$export.F=1;$export.G=2;$export.S=4;$export.P=8;$export.B=16;$export.W=32;module.exports=$export},{"./$.core":140,"./$.ctx":141,"./$.global":149}],146:[function(require,module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return true}}},{}],147:[function(require,module,exports){var ctx=require("./$.ctx"),call=require("./$.iter-call"),isArrayIter=require("./$.is-array-iter"),anObject=require("./$.an-object"),toLength=require("./$.to-length"),getIterFn=require("./core.get-iterator-method");module.exports=function(iterable,entries,fn,that){var iterFn=getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0,length,step,iterator;if(typeof iterFn!="function")throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++){entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index])}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;){call(iterator,f,step.value,entries)}}},{"./$.an-object":133,"./$.ctx":141,"./$.is-array-iter":153,"./$.iter-call":156,"./$.to-length":174,"./core.get-iterator-method":178}],148:[function(require,module,exports){var toIObject=require("./$.to-iobject"),getNames=require("./$").getNames,toString={}.toString;var windowNames=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];var getWindowNames=function(it){try{return getNames(it)}catch(e){return windowNames.slice()}};module.exports.get=function getOwnPropertyNames(it){if(windowNames&&toString.call(it)=="[object Window]")return getWindowNames(it);return getNames(toIObject(it))}},{"./$":161,"./$.to-iobject":173}],149:[function(require,module,exports){var global=module.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();if(typeof __g=="number")__g=global},{}],150:[function(require,module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},{}],151:[function(require,module,exports){var $=require("./$"),createDesc=require("./$.property-desc");module.exports=require("./$.descriptors")?function(object,key,value){return $.setDesc(object,key,createDesc(1,value))}:function(object,key,value){object[key]=value;return object}},{"./$":161,"./$.descriptors":143,"./$.property-desc":165}],152:[function(require,module,exports){var cof=require("./$.cof");module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return cof(it)=="String"?it.split(""):Object(it)}},{"./$.cof":137}],153:[function(require,module,exports){var Iterators=require("./$.iterators"),ITERATOR=require("./$.wks")("iterator"),ArrayProto=Array.prototype;module.exports=function(it){return it!==undefined&&(Iterators.Array===it||ArrayProto[ITERATOR]===it)}},{"./$.iterators":160,"./$.wks":177}],154:[function(require,module,exports){var cof=require("./$.cof");module.exports=Array.isArray||function(arg){return cof(arg)=="Array"}},{"./$.cof":137}],155:[function(require,module,exports){module.exports=function(it){return typeof it==="object"?it!==null:typeof it==="function"}},{}],156:[function(require,module,exports){var anObject=require("./$.an-object");module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator["return"];if(ret!==undefined)anObject(ret.call(iterator));throw e}}},{"./$.an-object":133}],157:[function(require,module,exports){"use strict";var $=require("./$"),descriptor=require("./$.property-desc"),setToStringTag=require("./$.set-to-string-tag"),IteratorPrototype={};require("./$.hide")(IteratorPrototype,require("./$.wks")("iterator"),function(){return this});module.exports=function(Constructor,NAME,next){Constructor.prototype=$.create(IteratorPrototype,{next:descriptor(1,next)});setToStringTag(Constructor,NAME+" Iterator")}},{"./$":161,"./$.hide":151,"./$.property-desc":165,"./$.set-to-string-tag":168,"./$.wks":177}],158:[function(require,module,exports){"use strict";var LIBRARY=require("./$.library"),$export=require("./$.export"),redefine=require("./$.redefine"),hide=require("./$.hide"),has=require("./$.has"),Iterators=require("./$.iterators"),$iterCreate=require("./$.iter-create"),setToStringTag=require("./$.set-to-string-tag"),getProto=require("./$").getProto,ITERATOR=require("./$.wks")("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values";var returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var getMethod=function(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case KEYS:return function keys(){return new Constructor(this,kind)};case VALUES:return function values(){return new Constructor(this,kind)}}return function entries(){return new Constructor(this,kind)}};var TAG=NAME+" Iterator",DEF_VALUES=DEFAULT==VALUES,VALUES_BUG=false,proto=Base.prototype,$native=proto[ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],$default=$native||getMethod(DEFAULT),methods,key;if($native){var IteratorPrototype=getProto($default.call(new Base));setToStringTag(IteratorPrototype,TAG,true);if(!LIBRARY&&has(proto,FF_ITERATOR))hide(IteratorPrototype,ITERATOR,returnThis);if(DEF_VALUES&&$native.name!==VALUES){VALUES_BUG=true;$default=function values(){return $native.call(this)}}}if((!LIBRARY||FORCED)&&(BUGGY||VALUES_BUG||!proto[ITERATOR])){hide(proto,ITERATOR,$default)}Iterators[NAME]=$default;Iterators[TAG]=returnThis;if(DEFAULT){methods={values:DEF_VALUES?$default:getMethod(VALUES),keys:IS_SET?$default:getMethod(KEYS),entries:!DEF_VALUES?$default:getMethod("entries")};if(FORCED)for(key in methods){if(!(key in proto))redefine(proto,key,methods[key])}else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods)}return methods}},{"./$":161,"./$.export":145,"./$.has":150,"./$.hide":151,"./$.iter-create":157,"./$.iterators":160,"./$.library":163,"./$.redefine":167,"./$.set-to-string-tag":168,"./$.wks":177}],159:[function(require,module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},{}],160:[function(require,module,exports){module.exports={}},{}],161:[function(require,module,exports){var $Object=Object;module.exports={create:$Object.create,getProto:$Object.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:$Object.getOwnPropertyDescriptor,setDesc:$Object.defineProperty,setDescs:$Object.defineProperties,getKeys:$Object.keys,getNames:$Object.getOwnPropertyNames,getSymbols:$Object.getOwnPropertySymbols,each:[].forEach}},{}],162:[function(require,module,exports){var $=require("./$"),toIObject=require("./$.to-iobject");module.exports=function(object,el){var O=toIObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":161,"./$.to-iobject":173}],163:[function(require,module,exports){module.exports=true},{}],164:[function(require,module,exports){var $export=require("./$.export"),core=require("./$.core"),fails=require("./$.fails");module.exports=function(KEY,exec){var fn=(core.Object||{})[KEY]||Object[KEY],exp={};exp[KEY]=exec(fn);$export($export.S+$export.F*fails(function(){fn(1)}),"Object",exp)}},{"./$.core":140,"./$.export":145,"./$.fails":146}],165:[function(require,module,exports){module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}},{}],166:[function(require,module,exports){var redefine=require("./$.redefine");module.exports=function(target,src){for(var key in src)redefine(target,key,src[key]);return target}},{"./$.redefine":167}],167:[function(require,module,exports){module.exports=require("./$.hide")},{"./$.hide":151}],168:[function(require,module,exports){var def=require("./$").setDesc,has=require("./$.has"),TAG=require("./$.wks")("toStringTag");module.exports=function(it,tag,stat){if(it&&!has(it=stat?it:it.prototype,TAG))def(it,TAG,{configurable:true,value:tag})}},{"./$":161,"./$.has":150,"./$.wks":177}],169:[function(require,module,exports){var global=require("./$.global"),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},{"./$.global":149}],170:[function(require,module,exports){module.exports=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it}},{}],171:[function(require,module,exports){var toInteger=require("./$.to-integer"),defined=require("./$.defined");module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$.defined":142,"./$.to-integer":172}],172:[function(require,module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},{}],173:[function(require,module,exports){var IObject=require("./$.iobject"),defined=require("./$.defined");module.exports=function(it){return IObject(defined(it))}},{"./$.defined":142,"./$.iobject":152}],174:[function(require,module,exports){var toInteger=require("./$.to-integer"),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},{"./$.to-integer":172}],175:[function(require,module,exports){var defined=require("./$.defined");module.exports=function(it){return Object(defined(it))}},{"./$.defined":142}],176:[function(require,module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(key===undefined?"":key,")_",(++id+px).toString(36))}},{}],177:[function(require,module,exports){var store=require("./$.shared")("wks"),uid=require("./$.uid"),Symbol=require("./$.global").Symbol;module.exports=function(name){return store[name]||(store[name]=Symbol&&Symbol[name]||(Symbol||uid)("Symbol."+name))}},{"./$.global":149,"./$.shared":169,"./$.uid":176}],178:[function(require,module,exports){var classof=require("./$.classof"),ITERATOR=require("./$.wks")("iterator"),Iterators=require("./$.iterators");module.exports=require("./$.core").getIteratorMethod=function(it){if(it!=undefined)return it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]}},{"./$.classof":136,"./$.core":140,"./$.iterators":160,"./$.wks":177}],179:[function(require,module,exports){var anObject=require("./$.an-object"),get=require("./core.get-iterator-method");module.exports=require("./$.core").getIterator=function(it){var iterFn=get(it);if(typeof iterFn!="function")throw TypeError(it+" is not iterable!");return anObject(iterFn.call(it))}},{"./$.an-object":133,"./$.core":140,"./core.get-iterator-method":178}],180:[function(require,module,exports){"use strict";var addToUnscopables=require("./$.add-to-unscopables"),step=require("./$.iter-step"),Iterators=require("./$.iterators"),toIObject=require("./$.to-iobject");module.exports=require("./$.iter-define")(Array,"Array",function(iterated,kind){this._t=toIObject(iterated);this._i=0;this._k=kind},function(){var O=this._t,kind=this._k,index=this._i++;if(!O||index>=O.length){this._t=undefined;return step(1)}if(kind=="keys")return step(0,index);if(kind=="values")return step(0,O[index]);return step(0,[index,O[index]])},"values");Iterators.Arguments=Iterators.Array;addToUnscopables("keys");addToUnscopables("values");addToUnscopables("entries")},{"./$.add-to-unscopables":132,"./$.iter-define":158,"./$.iter-step":159,"./$.iterators":160,"./$.to-iobject":173}],181:[function(require,module,exports){var $export=require("./$.export");$export($export.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./$.export":145}],182:[function(require,module,exports){var toIObject=require("./$.to-iobject");require("./$.object-sap")("getOwnPropertyDescriptor",function($getOwnPropertyDescriptor){return function getOwnPropertyDescriptor(it,key){return $getOwnPropertyDescriptor(toIObject(it),key)}})},{"./$.object-sap":164,"./$.to-iobject":173}],183:[function(require,module,exports){require("./$.object-sap")("getOwnPropertyNames",function(){return require("./$.get-names").get})},{"./$.get-names":148,"./$.object-sap":164}],184:[function(require,module,exports){var toObject=require("./$.to-object");require("./$.object-sap")("keys",function($keys){return function keys(it){return $keys(toObject(it))}})},{"./$.object-sap":164,"./$.to-object":175}],185:[function(require,module,exports){},{}], | |
186:[function(require,module,exports){"use strict";var $at=require("./$.string-at")(true);require("./$.iter-define")(String,"String",function(iterated){this._t=String(iterated);this._i=0},function(){var O=this._t,index=this._i,point;if(index>=O.length)return{value:undefined,done:true};point=$at(O,index);this._i+=point.length;return{value:point,done:false}})},{"./$.iter-define":158,"./$.string-at":171}],187:[function(require,module,exports){"use strict";var $=require("./$"),global=require("./$.global"),has=require("./$.has"),DESCRIPTORS=require("./$.descriptors"),$export=require("./$.export"),redefine=require("./$.redefine"),$fails=require("./$.fails"),shared=require("./$.shared"),setToStringTag=require("./$.set-to-string-tag"),uid=require("./$.uid"),wks=require("./$.wks"),keyOf=require("./$.keyof"),$names=require("./$.get-names"),enumKeys=require("./$.enum-keys"),isArray=require("./$.is-array"),anObject=require("./$.an-object"),toIObject=require("./$.to-iobject"),createDesc=require("./$.property-desc"),getDesc=$.getDesc,setDesc=$.setDesc,_create=$.create,getNames=$names.get,$Symbol=global.Symbol,$JSON=global.JSON,_stringify=$JSON&&$JSON.stringify,setter=false,HIDDEN=wks("_hidden"),isEnum=$.isEnum,SymbolRegistry=shared("symbol-registry"),AllSymbols=shared("symbols"),useNative=typeof $Symbol=="function",ObjectProto=Object.prototype;var setSymbolDesc=DESCRIPTORS&&$fails(function(){return _create(setDesc({},"a",{get:function(){return setDesc(this,"a",{value:7}).a}})).a!=7})?function(it,key,D){var protoDesc=getDesc(ObjectProto,key);if(protoDesc)delete ObjectProto[key];setDesc(it,key,D);if(protoDesc&&it!==ObjectProto)setDesc(ObjectProto,key,protoDesc)}:setDesc;var wrap=function(tag){var sym=AllSymbols[tag]=_create($Symbol.prototype);sym._k=tag;DESCRIPTORS&&setter&&setSymbolDesc(ObjectProto,tag,{configurable:true,set:function(value){if(has(this,HIDDEN)&&has(this[HIDDEN],tag))this[HIDDEN][tag]=false;setSymbolDesc(this,tag,createDesc(1,value))}});return sym};var isSymbol=function(it){return typeof it=="symbol"};var $defineProperty=function defineProperty(it,key,D){if(D&&has(AllSymbols,key)){if(!D.enumerable){if(!has(it,HIDDEN))setDesc(it,HIDDEN,createDesc(1,{}));it[HIDDEN][key]=true}else{if(has(it,HIDDEN)&&it[HIDDEN][key])it[HIDDEN][key]=false;D=_create(D,{enumerable:createDesc(0,false)})}return setSymbolDesc(it,key,D)}return setDesc(it,key,D)};var $defineProperties=function defineProperties(it,P){anObject(it);var keys=enumKeys(P=toIObject(P)),i=0,l=keys.length,key;while(l>i)$defineProperty(it,key=keys[i++],P[key]);return it};var $create=function create(it,P){return P===undefined?_create(it):$defineProperties(_create(it),P)};var $propertyIsEnumerable=function propertyIsEnumerable(key){var E=isEnum.call(this,key);return E||!has(this,key)||!has(AllSymbols,key)||has(this,HIDDEN)&&this[HIDDEN][key]?E:true};var $getOwnPropertyDescriptor=function getOwnPropertyDescriptor(it,key){var D=getDesc(it=toIObject(it),key);if(D&&has(AllSymbols,key)&&!(has(it,HIDDEN)&&it[HIDDEN][key]))D.enumerable=true;return D};var $getOwnPropertyNames=function getOwnPropertyNames(it){var names=getNames(toIObject(it)),result=[],i=0,key;while(names.length>i)if(!has(AllSymbols,key=names[i++])&&key!=HIDDEN)result.push(key);return result};var $getOwnPropertySymbols=function getOwnPropertySymbols(it){var names=getNames(toIObject(it)),result=[],i=0,key;while(names.length>i)if(has(AllSymbols,key=names[i++]))result.push(AllSymbols[key]);return result};var $stringify=function stringify(it){if(it===undefined||isSymbol(it))return;var args=[it],i=1,$$=arguments,replacer,$replacer;while($$.length>i)args.push($$[i++]);replacer=args[1];if(typeof replacer=="function")$replacer=replacer;if($replacer||!isArray(replacer))replacer=function(key,value){if($replacer)value=$replacer.call(this,key,value);if(!isSymbol(value))return value};args[1]=replacer;return _stringify.apply($JSON,args)};var buggyJSON=$fails(function(){var S=$Symbol();return _stringify([S])!="[null]"||_stringify({a:S})!="{}"||_stringify(Object(S))!="{}"});if(!useNative){$Symbol=function Symbol(){if(isSymbol(this))throw TypeError("Symbol is not a constructor");return wrap(uid(arguments.length>0?arguments[0]:undefined))};redefine($Symbol.prototype,"toString",function toString(){return this._k});isSymbol=function(it){return it instanceof $Symbol};$.create=$create;$.isEnum=$propertyIsEnumerable;$.getDesc=$getOwnPropertyDescriptor;$.setDesc=$defineProperty;$.setDescs=$defineProperties;$.getNames=$names.get=$getOwnPropertyNames;$.getSymbols=$getOwnPropertySymbols;if(DESCRIPTORS&&!require("./$.library")){redefine(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,true)}}var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=$Symbol(key)},keyFor:function keyFor(key){return keyOf(SymbolRegistry,key)},useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=wks(it);symbolStatics[it]=useNative?sym:wrap(sym)});setter=true;$export($export.G+$export.W,{Symbol:$Symbol});$export($export.S,"Symbol",symbolStatics);$export($export.S+$export.F*!useNative,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols});$JSON&&$export($export.S+$export.F*(!useNative||buggyJSON),"JSON",{stringify:$stringify});setToStringTag($Symbol,"Symbol");setToStringTag(Math,"Math",true);setToStringTag(global.JSON,"JSON",true)},{"./$":161,"./$.an-object":133,"./$.descriptors":143,"./$.enum-keys":144,"./$.export":145,"./$.fails":146,"./$.get-names":148,"./$.global":149,"./$.has":150,"./$.is-array":154,"./$.keyof":162,"./$.library":163,"./$.property-desc":165,"./$.redefine":167,"./$.set-to-string-tag":168,"./$.shared":169,"./$.to-iobject":173,"./$.uid":176,"./$.wks":177}],188:[function(require,module,exports){"use strict";var $=require("./$"),redefine=require("./$.redefine"),weak=require("./$.collection-weak"),isObject=require("./$.is-object"),has=require("./$.has"),frozenStore=weak.frozenStore,WEAK=weak.WEAK,isExtensible=Object.isExtensible||isObject,tmp={};var $WeakMap=require("./$.collection")("WeakMap",function(get){return function WeakMap(){return get(this,arguments.length>0?arguments[0]:undefined)}},{get:function get(key){if(isObject(key)){if(!isExtensible(key))return frozenStore(this).get(key);if(has(key,WEAK))return key[WEAK][this._i]}},set:function set(key,value){return weak.def(this,key,value)}},weak,true,true);if((new $WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var proto=$WeakMap.prototype,method=proto[key];redefine(proto,key,function(a,b){if(isObject(a)&&!isExtensible(a)){var result=frozenStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)})})}},{"./$":161,"./$.collection":139,"./$.collection-weak":138,"./$.has":150,"./$.is-object":155,"./$.redefine":167}],189:[function(require,module,exports){require("./es6.array.iterator");var Iterators=require("./$.iterators");Iterators.NodeList=Iterators.HTMLCollection=Iterators.Array},{"./$.iterators":160,"./es6.array.iterator":180}],190:[function(require,module,exports){"use strict";var _Symbol$for=require("babel-runtime/core-js/symbol/for")["default"];exports.__esModule=true;var STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"];exports.STATEMENT_OR_BLOCK_KEYS=STATEMENT_OR_BLOCK_KEYS;var FLATTENABLE_KEYS=["body","expressions"];exports.FLATTENABLE_KEYS=FLATTENABLE_KEYS;var FOR_INIT_KEYS=["left","init"];exports.FOR_INIT_KEYS=FOR_INIT_KEYS;var COMMENT_KEYS=["leadingComments","trailingComments","innerComments"];exports.COMMENT_KEYS=COMMENT_KEYS;var LOGICAL_OPERATORS=["||","&&"];exports.LOGICAL_OPERATORS=LOGICAL_OPERATORS;var UPDATE_OPERATORS=["++","--"];exports.UPDATE_OPERATORS=UPDATE_OPERATORS;var BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="];exports.BOOLEAN_NUMBER_BINARY_OPERATORS=BOOLEAN_NUMBER_BINARY_OPERATORS;var EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="];exports.EQUALITY_BINARY_OPERATORS=EQUALITY_BINARY_OPERATORS;var COMPARISON_BINARY_OPERATORS=[].concat(EQUALITY_BINARY_OPERATORS,["in","instanceof"]);exports.COMPARISON_BINARY_OPERATORS=COMPARISON_BINARY_OPERATORS;var BOOLEAN_BINARY_OPERATORS=[].concat(COMPARISON_BINARY_OPERATORS,BOOLEAN_NUMBER_BINARY_OPERATORS);exports.BOOLEAN_BINARY_OPERATORS=BOOLEAN_BINARY_OPERATORS;var NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"];exports.NUMBER_BINARY_OPERATORS=NUMBER_BINARY_OPERATORS;var BINARY_OPERATORS=["+"].concat(NUMBER_BINARY_OPERATORS,BOOLEAN_BINARY_OPERATORS);exports.BINARY_OPERATORS=BINARY_OPERATORS;var BOOLEAN_UNARY_OPERATORS=["delete","!"];exports.BOOLEAN_UNARY_OPERATORS=BOOLEAN_UNARY_OPERATORS;var NUMBER_UNARY_OPERATORS=["+","-","++","--","~"];exports.NUMBER_UNARY_OPERATORS=NUMBER_UNARY_OPERATORS;var STRING_UNARY_OPERATORS=["typeof"];exports.STRING_UNARY_OPERATORS=STRING_UNARY_OPERATORS;var UNARY_OPERATORS=["void"].concat(BOOLEAN_UNARY_OPERATORS,NUMBER_UNARY_OPERATORS,STRING_UNARY_OPERATORS);exports.UNARY_OPERATORS=UNARY_OPERATORS;var INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};exports.INHERIT_KEYS=INHERIT_KEYS;var BLOCK_SCOPED_SYMBOL=_Symbol$for("var used to be block scoped");exports.BLOCK_SCOPED_SYMBOL=BLOCK_SCOPED_SYMBOL;var NOT_LOCAL_BINDING=_Symbol$for("should not be considered a local binding");exports.NOT_LOCAL_BINDING=NOT_LOCAL_BINDING},{"babel-runtime/core-js/symbol/for":111}],191:[function(require,module,exports){"use strict";var _Number$MAX_SAFE_INTEGER=require("babel-runtime/core-js/number/max-safe-integer")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.toSequenceExpression=toSequenceExpression;exports.toKeyAlias=toKeyAlias;exports.toIdentifier=toIdentifier;exports.toBindingIdentifierName=toBindingIdentifierName;exports.toStatement=toStatement;exports.toExpression=toExpression;exports.toBlock=toBlock;exports.valueToNode=valueToNode;var _lodashLangIsPlainObject=require("lodash/lang/isPlainObject");var _lodashLangIsPlainObject2=_interopRequireDefault(_lodashLangIsPlainObject);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _babelTraverse=require("babel-traverse");var _babelTraverse2=_interopRequireDefault(_babelTraverse);var _index=require("./index");var t=_interopRequireWildcard(_index);function toComputedKey(node){var key=arguments.length<=1||arguments[1]===undefined?node.key||node.property:arguments[1];return function(){if(!node.computed){if(t.isIdentifier(key))key=t.stringLiteral(key.name)}return key}()}function toSequenceExpression(nodes,scope){if(!nodes||!nodes.length)return;var declars=[];var bailed=false;var result=convert(nodes);if(bailed)return;for(var i=0;i<declars.length;i++){scope.push(declars[i])}return result;function convert(nodes){var ensureLastUndefined=false;var exprs=[];var _arr=nodes;for(var _i=0;_i<_arr.length;_i++){var node=_arr[_i];if(t.isExpression(node)){exprs.push(node)}else if(t.isExpressionStatement(node)){exprs.push(node.expression)}else if(t.isVariableDeclaration(node)){if(node.kind!=="var")return bailed=true;var _arr2=node.declarations;for(var _i2=0;_i2<_arr2.length;_i2++){var declar=_arr2[_i2];var bindings=t.getBindingIdentifiers(declar);for(var key in bindings){declars.push({kind:node.kind,id:bindings[key]})}if(declar.init){exprs.push(t.assignmentExpression("=",declar.id,declar.init))}}ensureLastUndefined=true;continue}else if(t.isIfStatement(node)){var consequent=node.consequent?convert([node.consequent]):scope.buildUndefinedNode();var alternate=node.alternate?convert([node.alternate]):scope.buildUndefinedNode();if(!consequent||!alternate)return bailed=true;exprs.push(t.conditionalExpression(node.test,consequent,alternate))}else if(t.isBlockStatement(node)){exprs.push(convert(node.body))}else if(t.isEmptyStatement(node)){ensureLastUndefined=true;continue}else{return bailed=true}ensureLastUndefined=false}if(ensureLastUndefined||exprs.length===0){exprs.push(scope.buildUndefinedNode())}if(exprs.length===1){return exprs[0]}else{return t.sequenceExpression(exprs)}}}function toKeyAlias(node){var key=arguments.length<=1||arguments[1]===undefined?node.key:arguments[1];return function(){var alias=undefined;if(node.kind==="method"){return toKeyAlias.increment()+""}else if(t.isIdentifier(key)){alias=key.name}else if(t.isStringLiteral(key)){alias=JSON.stringify(key.value)}else{alias=JSON.stringify(_babelTraverse2["default"].removeProperties(t.cloneDeep(key)))}if(node.computed){alias="["+alias+"]"}if(node["static"]){alias="static:"+alias}return alias}()}toKeyAlias.uid=0;toKeyAlias.increment=function(){if(toKeyAlias.uid>=_Number$MAX_SAFE_INTEGER){return toKeyAlias.uid=0}else{return toKeyAlias.uid++}};function toIdentifier(name){name=name+"";name=name.replace(/[^a-zA-Z0-9$_]/g,"-");name=name.replace(/^[-0-9]+/,"");name=name.replace(/[-\s]+(.)?/g,function(match,c){return c?c.toUpperCase():""});if(!t.isValidIdentifier(name)){name="_"+name}return name||"_"}function toBindingIdentifierName(name){name=toIdentifier(name);if(name==="eval"||name==="arguments")name="_"+name;return name}function toStatement(node,ignore){if(t.isStatement(node)){return node}var mustHaveId=false;var newType=undefined;if(t.isClass(node)){mustHaveId=true;newType="ClassDeclaration"}else if(t.isFunction(node)){mustHaveId=true;newType="FunctionDeclaration"}else if(t.isAssignmentExpression(node)){return t.expressionStatement(node)}if(mustHaveId&&!node.id){newType=false}if(!newType){if(ignore){return false}else{throw new Error("cannot turn "+node.type+" to a statement")}}node.type=newType;return node}function toExpression(node){if(t.isExpressionStatement(node)){node=node.expression}if(t.isClass(node)){node.type="ClassExpression"}else if(t.isFunction(node)){node.type="FunctionExpression"}if(t.isExpression(node)){return node}else{throw new Error("cannot turn "+node.type+" to an expression")}}function toBlock(node,parent){if(t.isBlockStatement(node)){return node}if(t.isEmptyStatement(node)){node=[]}if(!Array.isArray(node)){if(!t.isStatement(node)){if(t.isFunction(parent)){node=t.returnStatement(node)}else{node=t.expressionStatement(node)}}node=[node]}return t.blockStatement(node)}function valueToNode(value){if(value===undefined){return t.identifier("undefined")}if(value===true||value===false){return t.booleanLiteral(value)}if(value===null){return t.nullLiteral()}if(_lodashLangIsString2["default"](value)){return t.stringLiteral(value)}if(_lodashLangIsNumber2["default"](value)){return t.numericLiteral(value)}if(_lodashLangIsRegExp2["default"](value)){var pattern=value.source;var flags=value.toString().match(/\/([a-z]+|)$/)[1];return t.regExpLiteral(pattern,flags)}if(Array.isArray(value)){return t.arrayExpression(value.map(t.valueToNode))}if(_lodashLangIsPlainObject2["default"](value)){var props=[];for(var key in value){var nodeKey=undefined;if(t.isValidIdentifier(key)){nodeKey=t.identifier(key)}else{nodeKey=t.stringLiteral(key)}props.push(t.objectProperty(nodeKey,t.valueToNode(value[key])))}return t.objectExpression(props)}throw new Error("don't know how to turn this value into a node")}},{"./index":201,"babel-runtime/core-js/number/max-safe-integer":103,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-traverse":61,"lodash/lang/isNumber":286,"lodash/lang/isPlainObject":288,"lodash/lang/isRegExp":289,"lodash/lang/isString":290}],192:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _index=require("../index");var t=_interopRequireWildcard(_index);var _constants=require("../constants");var _index2=require("./index");var _index3=_interopRequireDefault(_index2);_index3["default"]("ArrayExpression",{fields:{elements:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeOrValueType("null","Expression","SpreadElement"))),"default":[]}},visitor:["elements"],aliases:["Expression"]});_index3["default"]("AssignmentExpression",{fields:{operator:{validate:_index2.assertValueType("string")},left:{validate:_index2.assertNodeType("LVal")},right:{validate:_index2.assertNodeType("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});_index3["default"]("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:_index2.assertOneOf.apply(undefined,_constants.BINARY_OPERATORS)},left:{validate:_index2.assertNodeType("Expression")},right:{validate:_index2.assertNodeType("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]});_index3["default"]("Directive",{visitor:["value"],fields:{value:{validate:_index2.assertNodeType("DirectiveLiteral")}}});_index3["default"]("DirectiveLiteral",{builder:["value"],fields:{value:{validate:_index2.assertValueType("string")}}});_index3["default"]("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Directive"))),"default":[]},body:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]});_index3["default"]("BreakStatement",{visitor:["label"],fields:{label:{validate:_index2.assertNodeType("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});_index3["default"]("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:_index2.assertNodeType("Expression")},arguments:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Expression","SpreadElement")))}},aliases:["Expression"]});_index3["default"]("CatchClause",{visitor:["param","body"],fields:{param:{validate:_index2.assertNodeType("Identifier")},body:{validate:_index2.assertNodeType("BlockStatement")}},aliases:["Scopable"]});_index3["default"]("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:_index2.assertNodeType("Expression")},consequent:{validate:_index2.assertNodeType("Expression")},alternate:{validate:_index2.assertNodeType("Expression")}},aliases:["Expression","Conditional"]});_index3["default"]("ContinueStatement",{visitor:["label"],fields:{label:{validate:_index2.assertNodeType("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});_index3["default"]("DebuggerStatement",{aliases:["Statement"]});_index3["default"]("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:_index2.assertNodeType("Expression")},body:{validate:_index2.assertNodeType("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});_index3["default"]("EmptyStatement",{aliases:["Statement"]});_index3["default"]("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:_index2.assertNodeType("Expression")}},aliases:["Statement","ExpressionWrapper"]});_index3["default"]("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:_index2.assertNodeType("Program")}}});_index3["default"]("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:_index2.assertNodeType("VariableDeclaration","LVal")},right:{validate:_index2.assertNodeType("Expression")},body:{validate:_index2.assertNodeType("Statement")}}});_index3["default"]("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:_index2.assertNodeType("VariableDeclaration","Expression"),optional:true},test:{validate:_index2.assertNodeType("Expression"),optional:true},update:{validate:_index2.assertNodeType("Expression"),optional:true},body:{validate:_index2.assertNodeType("Statement")}}});_index3["default"]("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:_index2.assertNodeType("Identifier")},params:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("LVal")))},body:{validate:_index2.assertNodeType("BlockStatement")},generator:{"default":false,validate:_index2.assertValueType("boolean")},async:{"default":false,validate:_index2.assertValueType("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]});_index3["default"]("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:_index2.assertNodeType("Identifier"),optional:true},params:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("LVal")))},body:{validate:_index2.assertNodeType("BlockStatement")},generator:{"default":false,validate:_index2.assertValueType("boolean")},async:{"default":false,validate:_index2.assertValueType("boolean")}}});_index3["default"]("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function validate(node,key,val){if(!t.isValidIdentifier(val)){}}}}});_index3["default"]("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:_index2.assertNodeType("Expression")},consequent:{validate:_index2.assertNodeType("Statement")},alternate:{optional:true,validate:_index2.assertNodeType("Statement")}}});_index3["default"]("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:_index2.assertNodeType("Identifier")},body:{validate:_index2.assertNodeType("Statement")}}});_index3["default"]("StringLiteral",{builder:["value"],fields:{value:{validate:_index2.assertValueType("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});_index3["default"]("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:_index2.assertValueType("number")}},aliases:["Expression","Pureish","Literal","Immutable"]});_index3["default"]("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});_index3["default"]("BooleanLiteral",{builder:["value"],fields:{value:{validate:_index2.assertValueType("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});_index3["default"]("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:_index2.assertValueType("string")},flags:{validate:_index2.assertValueType("string"),"default":""}}});_index3["default"]("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:_index2.assertOneOf.apply(undefined,_constants.LOGICAL_OPERATORS)},left:{validate:_index2.assertNodeType("Expression")},right:{validate:_index2.assertNodeType("Expression")}}});_index3["default"]("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:_index2.assertNodeType("Expression")},property:{validate:function validate(node,key,val){var expectedType=node.computed?"Expression":"Identifier";_index2.assertNodeType(expectedType)(node,key,val)}},computed:{"default":false}}});_index3["default"]("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:_index2.assertNodeType("Expression")},arguments:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Expression","SpreadElement")))}}});_index3["default"]("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Directive"))),"default":[]},body:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]});_index3["default"]("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("ObjectMethod","ObjectProperty","SpreadProperty")))}}});_index3["default"]("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:_index2.chain(_index2.assertValueType("string"),_index2.assertOneOf("method","get","set")),"default":"method"},computed:{validate:_index2.assertValueType("boolean"),"default":false},key:{validate:function validate(node,key,val){var expectedTypes=node.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];_index2.assertNodeType.apply(undefined,expectedTypes)(node,key,val)}},decorators:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Decorator")))},body:{validate:_index2.assertNodeType("BlockStatement")},generator:{"default":false,validate:_index2.assertValueType("boolean")},async:{"default":false,validate:_index2.assertValueType("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]});_index3["default"]("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:_index2.assertValueType("boolean"),"default":false},key:{validate:function validate(node,key,val){var expectedTypes=node.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];_index2.assertNodeType.apply(undefined,expectedTypes)(node,key,val)}},value:{validate:_index2.assertNodeType("Expression")},shorthand:{validate:_index2.assertValueType("boolean"),"default":false},decorators:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Decorator"))),optional:true}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]});_index3["default"]("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:_index2.assertNodeType("LVal")}}});_index3["default"]("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:_index2.assertNodeType("Expression"),optional:true}}});_index3["default"]("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Expression")))}},aliases:["Expression"]});_index3["default"]("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:_index2.assertNodeType("Expression"),optional:true},consequent:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("Statement")))}}});_index3["default"]("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:_index2.assertNodeType("Expression")},cases:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("SwitchCase")))}}});_index3["default"]("ThisExpression",{aliases:["Expression"]});_index3["default"]("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:_index2.assertNodeType("Expression")}}});_index3["default"]("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:_index2.assertNodeType("BlockStatement")},handler:{optional:true,handler:_index2.assertNodeType("BlockStatement")},finalizer:{optional:true,validate:_index2.assertNodeType("BlockStatement")}}});_index3["default"]("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{"default":true},argument:{validate:_index2.assertNodeType("Expression")},operator:{validate:_index2.assertOneOf.apply(undefined,_constants.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});_index3["default"]("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{"default":false},argument:{validate:_index2.assertNodeType("Expression")},operator:{validate:_index2.assertOneOf.apply(undefined,_constants.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]});_index3["default"]("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:_index2.chain(_index2.assertValueType("string"),_index2.assertOneOf("var","let","const"))},declarations:{validate:_index2.chain(_index2.assertValueType("array"),_index2.assertEach(_index2.assertNodeType("VariableDeclarator")))}}});_index3["default"]("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:_index2.assertNodeType("LVal")},init:{optional:true,validate:_index2.assertNodeType("Expression")}}});_index3["default"]("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:_index2.assertNodeType("Expression")},body:{validate:_index2.assertNodeType("BlockStatement","Statement")}}});_index3["default"]("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:_index2.assertNodeType("Expression")},body:{validate:_index2.assertNodeType("BlockStatement","Statement")}}})},{"../constants":190,"../index":201,"./index":196,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118}],193:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _index=require("./index");var _index2=_interopRequireDefault(_index);_index2["default"]("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:_index.assertNodeType("Identifier")},right:{validate:_index.assertNodeType("Expression")}}});_index2["default"]("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("Expression")))}}});_index2["default"]("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("LVal")))},body:{validate:_index.assertNodeType("BlockStatement","Expression")},async:{validate:_index.assertValueType("boolean"),"default":false}}});_index2["default"]("ClassBody",{visitor:["body"],fields:{body:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("ClassMethod","ClassProperty")))}}});_index2["default"]("ClassDeclaration",{builder:["id","superClass","body","decorators"], | |
visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:_index.assertNodeType("Identifier")},body:{validate:_index.assertNodeType("ClassBody")},superClass:{optional:true,validate:_index.assertNodeType("Expression")},decorators:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("Decorator")))}}});_index2["default"]("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:true,validate:_index.assertNodeType("Identifier")},body:{validate:_index.assertNodeType("ClassBody")},superClass:{optional:true,validate:_index.assertNodeType("Expression")},decorators:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("Decorator")))}}});_index2["default"]("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:_index.assertNodeType("StringLiteral")}}});_index2["default"]("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:_index.assertNodeType("FunctionDeclaration","ClassDeclaration","Expression")}}});_index2["default"]("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:_index.assertNodeType("Declaration"),optional:true},specifiers:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("ExportSpecifier")))},source:{validate:_index.assertNodeType("StringLiteral"),optional:true}}});_index2["default"]("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:_index.assertNodeType("Identifier")},exported:{validate:_index.assertNodeType("Identifier")}}});_index2["default"]("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:_index.assertNodeType("VariableDeclaration","LVal")},right:{validate:_index.assertNodeType("Expression")},body:{validate:_index.assertNodeType("Statement")}}});_index2["default"]("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:_index.assertNodeType("StringLiteral")}}});_index2["default"]("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:_index.assertNodeType("Identifier")}}});_index2["default"]("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:_index.assertNodeType("Identifier")}}});_index2["default"]("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:_index.assertNodeType("Identifier")},imported:{validate:_index.assertNodeType("Identifier")}}});_index2["default"]("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:_index.assertValueType("string")},property:{validate:_index.assertValueType("string")}}});_index2["default"]("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:_index.chain(_index.assertValueType("string"),_index.assertOneOf("get","set","method","constructor")),"default":"method"},computed:{"default":false,validate:_index.assertValueType("boolean")},"static":{"default":false,validate:_index.assertValueType("boolean")},key:{validate:function validate(node,key,val){var expectedTypes=node.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];_index.assertNodeType.apply(undefined,expectedTypes)(node,key,val)}},params:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("LVal")))},body:{validate:_index.assertNodeType("BlockStatement")},generator:{"default":false,validate:_index.assertValueType("boolean")},async:{"default":false,validate:_index.assertValueType("boolean")}}});_index2["default"]("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("RestProperty","Property")))}}});_index2["default"]("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:_index.assertNodeType("Expression")}}});_index2["default"]("Super",{aliases:["Expression"]});_index2["default"]("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:_index.assertNodeType("Expression")},quasi:{validate:_index.assertNodeType("TemplateLiteral")}}});_index2["default"]("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:_index.assertValueType("boolean"),"default":false}}});_index2["default"]("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("TemplateElement")))},expressions:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("Expression")))}}});_index2["default"]("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:_index.assertValueType("boolean"),"default":false},argument:{optional:true,validate:_index.assertNodeType("Expression")}}})},{"./index":196,"babel-runtime/helpers/interop-require-default":117}],194:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _index=require("./index");var _index2=_interopRequireDefault(_index);_index2["default"]("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:_index.assertNodeType("Expression")}}});_index2["default"]("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}});_index2["default"]("Decorator",{visitor:["expression"],fields:{expression:{validate:_index.assertNodeType("Expression")}}});_index2["default"]("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:_index.assertNodeType("BlockStatement")}}});_index2["default"]("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:_index.assertNodeType("Identifier")}}});_index2["default"]("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:_index.assertNodeType("Identifier")}}});_index2["default"]("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:_index.assertNodeType("LVal")}}});_index2["default"]("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:_index.assertNodeType("Expression")}}})},{"./index":196,"babel-runtime/helpers/interop-require-default":117}],195:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _index=require("./index");var _index2=_interopRequireDefault(_index);_index2["default"]("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});_index2["default"]("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}});_index2["default"]("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});_index2["default"]("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}});_index2["default"]("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});_index2["default"]("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}});_index2["default"]("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],aliases:["Flow","Property"],fields:{}});_index2["default"]("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});_index2["default"]("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});_index2["default"]("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});_index2["default"]("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});_index2["default"]("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});_index2["default"]("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});_index2["default"]("ExistentialTypeParam",{aliases:["Flow"]});_index2["default"]("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}});_index2["default"]("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}});_index2["default"]("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}});_index2["default"]("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}});_index2["default"]("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});_index2["default"]("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}});_index2["default"]("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]});_index2["default"]("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}});_index2["default"]("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}});_index2["default"]("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});_index2["default"]("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}});_index2["default"]("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});_index2["default"]("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});_index2["default"]("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}});_index2["default"]("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}});_index2["default"]("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});_index2["default"]("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}});_index2["default"]("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}});_index2["default"]("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}});_index2["default"]("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}});_index2["default"]("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}});_index2["default"]("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}});_index2["default"]("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}});_index2["default"]("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}});_index2["default"]("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}});_index2["default"]("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}});_index2["default"]("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":196,"babel-runtime/helpers/interop-require-default":117}],196:[function(require,module,exports){"use strict";var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.assertEach=assertEach;exports.assertOneOf=assertOneOf;exports.assertNodeType=assertNodeType;exports.assertNodeOrValueType=assertNodeOrValueType;exports.assertValueType=assertValueType;exports.chain=chain;exports["default"]=defineType;var _index=require("../index");var t=_interopRequireWildcard(_index);var VISITOR_KEYS={};exports.VISITOR_KEYS=VISITOR_KEYS;var ALIAS_KEYS={};exports.ALIAS_KEYS=ALIAS_KEYS;var NODE_FIELDS={};exports.NODE_FIELDS=NODE_FIELDS;var BUILDER_KEYS={};exports.BUILDER_KEYS=BUILDER_KEYS;var DEPRECATED_KEYS={};exports.DEPRECATED_KEYS=DEPRECATED_KEYS;function getType(val){if(Array.isArray(val)){return"array"}else if(val===null){return"null"}else if(val===undefined){return"undefined"}else{return typeof val}}function assertEach(callback){function validator(node,key,val){if(!Array.isArray(val))return;for(var i=0;i<val.length;i++){callback(node,key+"["+i+"]",val[i])}}validator.each=callback;return validator}function assertOneOf(){for(var _len=arguments.length,vals=Array(_len),_key=0;_key<_len;_key++){vals[_key]=arguments[_key]}function validate(node,key,val){if(vals.indexOf(val)<0){throw new TypeError("Property "+key+" expected value to be one of "+JSON.stringify(vals)+" but got "+JSON.stringify(val))}}validate.oneOf=vals;return validate}function assertNodeType(){for(var _len2=arguments.length,types=Array(_len2),_key2=0;_key2<_len2;_key2++){types[_key2]=arguments[_key2]}function validate(node,key,val){var valid=false;for(var _iterator=types,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var type=_ref;if(t.is(type,val)){valid=true;break}}if(!valid){throw new TypeError("Property "+key+" of "+node.type+" expected node to be of a type "+JSON.stringify(types)+" "+("but instead got "+JSON.stringify(val&&val.type)))}}validate.oneOfNodeTypes=types;return validate}function assertNodeOrValueType(){for(var _len3=arguments.length,types=Array(_len3),_key3=0;_key3<_len3;_key3++){types[_key3]=arguments[_key3]}function validate(node,key,val){var valid=false;for(var _iterator2=types,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:_getIterator(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var type=_ref2;if(getType(val)===type||t.is(type,val)){valid=true;break}}if(!valid){throw new TypeError("Property "+key+" of "+node.type+" expected node to be of a type "+JSON.stringify(types)+" "+("but instead got "+JSON.stringify(val&&val.type)))}}validate.oneOfNodeOrValueTypes=types;return validate}function assertValueType(type){function validate(node,key,val){var valid=getType(val)===type;if(!valid){throw new TypeError("Property "+key+" expected type of "+type+" but got "+getType(val))}}validate.type=type;return validate}function chain(){for(var _len4=arguments.length,fns=Array(_len4),_key4=0;_key4<_len4;_key4++){fns[_key4]=arguments[_key4]}function validate(){for(var _iterator3=fns,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:_getIterator(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var fn=_ref3;fn.apply(undefined,arguments)}}validate.chainOf=fns;return validate}function defineType(type){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var inherits=opts.inherits&&store[opts.inherits]||{};opts.fields=opts.fields||inherits.fields||{};opts.visitor=opts.visitor||inherits.visitor||[];opts.aliases=opts.aliases||inherits.aliases||[];opts.builder=opts.builder||inherits.builder||opts.visitor||[];if(opts.deprecatedAlias){DEPRECATED_KEYS[opts.deprecatedAlias]=type}var _arr=opts.visitor.concat(opts.builder);for(var _i4=0;_i4<_arr.length;_i4++){var key=_arr[_i4];opts.fields[key]=opts.fields[key]||{}}for(var key in opts.fields){var field=opts.fields[key];if(field["default"]===undefined){field["default"]=null}else if(!field.validate){field.validate=assertValueType(getType(field["default"]))}}VISITOR_KEYS[type]=opts.visitor;BUILDER_KEYS[type]=opts.builder;NODE_FIELDS[type]=opts.fields;ALIAS_KEYS[type]=opts.aliases;store[type]=opts}var store={}},{"../index":201,"babel-runtime/core-js/get-iterator":102,"babel-runtime/helpers/interop-require-wildcard":118}],197:[function(require,module,exports){"use strict";require("./index");require("./core");require("./es2015");require("./flow");require("./jsx");require("./misc");require("./experimental")},{"./core":192,"./es2015":193,"./experimental":194,"./flow":195,"./index":196,"./jsx":198,"./misc":199}],198:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _index=require("./index");var _index2=_interopRequireDefault(_index);_index2["default"]("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:_index.assertNodeType("JSXIdentifier","JSXNamespacedName")},value:{optional:true,validate:_index.assertNodeType("JSXElement","StringLiteral","JSXExpressionContainer")}}});_index2["default"]("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:_index.assertNodeType("JSXIdentifier","JSXMemberExpression")}}});_index2["default"]("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:_index.assertNodeType("JSXOpeningElement")},closingElement:{optional:true,validate:_index.assertNodeType("JSXClosingElement")},children:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("JSXText","JSXExpressionContainer","JSXElement")))}}});_index2["default"]("JSXEmptyExpression",{aliases:["JSX","Expression"]});_index2["default"]("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:_index.assertNodeType("Expression")}}});_index2["default"]("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:_index.assertValueType("string")}}});_index2["default"]("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:_index.assertNodeType("JSXMemberExpression","JSXIdentifier")},property:{validate:_index.assertNodeType("JSXIdentifier")}}});_index2["default"]("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:_index.assertNodeType("JSXIdentifier")},name:{validate:_index.assertNodeType("JSXIdentifier")}}});_index2["default"]("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:_index.assertNodeType("JSXIdentifier","JSXMemberExpression")},selfClosing:{"default":false,validate:_index.assertValueType("boolean")},attributes:{validate:_index.chain(_index.assertValueType("array"),_index.assertEach(_index.assertNodeType("JSXAttribute","JSXSpreadAttribute")))}}});_index2["default"]("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:_index.assertNodeType("Expression")}}});_index2["default"]("JSXText",{aliases:["JSX"],builder:["value"],fields:{value:{validate:_index.assertValueType("string")}}})},{"./index":196,"babel-runtime/helpers/interop-require-default":117}],199:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _index=require("./index");var _index2=_interopRequireDefault(_index);_index2["default"]("Noop",{visitor:[]});_index2["default"]("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:_index.assertNodeType("Expression")}}})},{"./index":196,"babel-runtime/helpers/interop-require-default":117}],200:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.createUnionTypeAnnotation=createUnionTypeAnnotation;exports.removeTypeDuplicates=removeTypeDuplicates;exports.createTypeAnnotationBasedOnTypeof=createTypeAnnotationBasedOnTypeof;var _index=require("./index");var t=_interopRequireWildcard(_index);function createUnionTypeAnnotation(types){var flattened=removeTypeDuplicates(types);if(flattened.length===1){return flattened[0]}else{return t.unionTypeAnnotation(flattened)}}function removeTypeDuplicates(nodes){var generics={};var bases={};var typeGroups=[];var types=[];for(var i=0;i<nodes.length;i++){var node=nodes[i];if(!node)continue;if(types.indexOf(node)>=0){continue}if(t.isAnyTypeAnnotation(node)){return[node]}if(t.isFlowBaseAnnotation(node)){bases[node.type]=node;continue}if(t.isUnionTypeAnnotation(node)){if(typeGroups.indexOf(node.types)<0){nodes=nodes.concat(node.types);typeGroups.push(node.types)}continue}if(t.isGenericTypeAnnotation(node)){var _name=node.id.name;if(generics[_name]){var existing=generics[_name];if(existing.typeParameters){if(node.typeParameters){existing.typeParameters.params=removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params))}}else{existing=node.typeParameters}}else{generics[_name]=node}continue}types.push(node)}for(var type in bases){types.push(bases[type])}for(var _name2 in generics){types.push(generics[_name2])}return types}function createTypeAnnotationBasedOnTypeof(type){if(type==="string"){return t.stringTypeAnnotation()}else if(type==="number"){return t.numberTypeAnnotation()}else if(type==="undefined"){return t.voidTypeAnnotation()}else if(type==="boolean"){return t.booleanTypeAnnotation()}else if(type==="function"){return t.genericTypeAnnotation(t.identifier("Function"))}else if(type==="object"){return t.genericTypeAnnotation(t.identifier("Object"))}else if(type==="symbol"){return t.genericTypeAnnotation(t.identifier("Symbol"))}else{throw new Error("Invalid typeof value")}}},{"./index":201,"babel-runtime/helpers/interop-require-wildcard":118}],201:[function(require,module,exports){"use strict";var _Object$keys=require("babel-runtime/core-js/object/keys")["default"];var _getIterator=require("babel-runtime/core-js/get-iterator")["default"];var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];var _defaults=require("babel-runtime/helpers/defaults")["default"];var _interopExportWildcard=require("babel-runtime/helpers/interop-export-wildcard")["default"];exports.__esModule=true;exports.is=is;exports.isType=isType;exports.validate=validate;exports.shallowEqual=shallowEqual;exports.appendToMemberExpression=appendToMemberExpression;exports.prependToMemberExpression=prependToMemberExpression;exports.ensureBlock=ensureBlock;exports.clone=clone;exports.cloneWithoutLoc=cloneWithoutLoc;exports.cloneDeep=cloneDeep;exports.buildMatchMemberExpression=buildMatchMemberExpression;exports.removeComments=removeComments;exports.inheritsComments=inheritsComments;exports.inheritTrailingComments=inheritTrailingComments;exports.inheritLeadingComments=inheritLeadingComments;exports.inheritInnerComments=inheritInnerComments;exports.inherits=inherits;exports.assertNode=assertNode;exports.isNode=isNode;var _toFastProperties=require("to-fast-properties");var _toFastProperties2=_interopRequireDefault(_toFastProperties);var _lodashArrayCompact=require("lodash/array/compact");var _lodashArrayCompact2=_interopRequireDefault(_lodashArrayCompact);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashArrayUniq=require("lodash/array/uniq");var _lodashArrayUniq2=_interopRequireDefault(_lodashArrayUniq);require("./definitions/init");var _definitions=require("./definitions");var _react2=require("./react");var _react=_interopRequireWildcard(_react2);var t=exports;function registerType(type){var is=t["is"+type]=function(node,opts){return t.is(type,node,opts)};t["assert"+type]=function(node,opts){opts=opts||{};if(!is(node,opts)){throw new Error("Expected type "+JSON.stringify(type)+" with option "+JSON.stringify(opts))}}}var _constants=require("./constants");_defaults(exports,_interopExportWildcard(_constants,_defaults));exports.VISITOR_KEYS=_definitions.VISITOR_KEYS;exports.ALIAS_KEYS=_definitions.ALIAS_KEYS;exports.NODE_FIELDS=_definitions.NODE_FIELDS;exports.BUILDER_KEYS=_definitions.BUILDER_KEYS;exports.DEPRECATED_KEYS=_definitions.DEPRECATED_KEYS;exports.react=_react;for(var type in t.VISITOR_KEYS){registerType(type)}t.FLIPPED_ALIAS_KEYS={};_lodashCollectionEach2["default"](t.ALIAS_KEYS,function(aliases,type){_lodashCollectionEach2["default"](aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});_lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type)});var TYPES=_Object$keys(t.VISITOR_KEYS).concat(_Object$keys(t.FLIPPED_ALIAS_KEYS)).concat(_Object$keys(t.DEPRECATED_KEYS));exports.TYPES=TYPES;function is(type,node,opts){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases){if(aliases[0]===nodeType)return true;for(var _iterator=aliases,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_getIterator(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var alias=_ref;if(nodeType===alias)return true}}return false}_lodashCollectionEach2["default"](t.BUILDER_KEYS,function(keys,type){function builder(){if(arguments.length>keys.length){throw new Error("t."+type+": Too many arguments passed. Received "+arguments.length+" but can receive "+("no more than "+keys.length))}var node={};node.type=type;var i=0;var _arr=keys;for(var _i2=0;_i2<_arr.length;_i2++){var key=_arr[_i2];var field=t.NODE_FIELDS[type][key];var arg=arguments[i++];if(arg===undefined)arg=_lodashLangClone2["default"](field["default"]);node[key]=arg}for(var key in node){validate(node,key,node[key])}return node}t[type]=builder;t[type[0].toLowerCase()+type.slice(1)]=builder});var _loop=function(type){var proxy=function proxy(fn){return function(){console.trace("The node type "+type+" has been renamed to "+newType);return fn.apply(this,arguments)}};var newType=t.DEPRECATED_KEYS[type];t[type]=t[type[0].toLowerCase()+type.slice(1)]=proxy(t[newType]);t["is"+type]=proxy(t["is"+newType]);t["assert"+type]=proxy(t["assert"+newType])};for(var type in t.DEPRECATED_KEYS){_loop(type)}function validate(node,key,val){if(!node)return;var fields=t.NODE_FIELDS[node.type];if(!fields)return;var field=fields[key];if(!field||!field.validate)return;if(field.optional&&val==null)return;field.validate(node,key,val)}function shallowEqual(actual,expected){var keys=_Object$keys(expected);var _arr2=keys;for(var _i3=0;_i3<_arr2.length;_i3++){var key=_arr2[_i3];if(actual[key]!==expected[key]){return false}}return true}function appendToMemberExpression(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member}function prependToMemberExpression(member,prepend){member.object=t.memberExpression(prepend,member.object);return member}function ensureBlock(node){var key=arguments.length<=1||arguments[1]===undefined?"body":arguments[1];return node[key]=t.toBlock(node[key],node)}function clone(node){var newNode={};for(var key in node){if(key[0]==="_")continue;newNode[key]=node[key]}return newNode}function cloneWithoutLoc(node){var newNode=clone(node);delete newNode.loc;return newNode}function cloneDeep(node){var newNode={};for(var key in node){if(key[0]==="_")continue;var val=node[key];if(val){if(val.type){val=t.cloneDeep(val)}else if(Array.isArray(val)){val=val.map(t.cloneDeep)}}newNode[key]=val}return newNode}function buildMatchMemberExpression(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isStringLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isStringLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){return false}}return true}}function removeComments(node){for(var _iterator2=t.COMMENT_KEYS,_isArray2=Array.isArray(_iterator2),_i4=0,_iterator2=_isArray2?_iterator2:_getIterator(_iterator2);;){var _ref2;if(_isArray2){if(_i4>=_iterator2.length)break;_ref2=_iterator2[_i4++]}else{_i4=_iterator2.next();if(_i4.done)break;_ref2=_i4.value}var key=_ref2;delete node[key]}return node}function inheritsComments(child,parent){inheritTrailingComments(child,parent);inheritLeadingComments(child,parent);inheritInnerComments(child,parent);return child}function inheritTrailingComments(child,parent){_inheritComments("trailingComments",child,parent)}function inheritLeadingComments(child,parent){_inheritComments("leadingComments",child,parent)}function inheritInnerComments(child,parent){_inheritComments("innerComments",child,parent)}function _inheritComments(key,child,parent){if(child&&parent){child[key]=_lodashArrayUniq2["default"](_lodashArrayCompact2["default"]([].concat(child[key],parent[key])))}}var traverse=require("babel-traverse")["default"];function inherits(child,parent){if(!child||!parent)return child;var _arr3=t.INHERIT_KEYS.optional;for(var _i5=0;_i5<_arr3.length;_i5++){var key=_arr3[_i5];if(child[key]==null){child[key]=parent[key]}}for(var key in parent){if(key[0]==="_")child[key]=parent[key]}var _arr4=t.INHERIT_KEYS.force;for(var _i6=0;_i6<_arr4.length;_i6++){var key=_arr4[_i6];child[key]=parent[key]}t.inheritsComments(child,parent);traverse.copyCache(parent,child);return child}function assertNode(node){if(!isNode(node)){throw new TypeError("Not a valid node "+(node&&node.type))}}function isNode(node){return!!(node&&_definitions.VISITOR_KEYS[node.type])}_toFastProperties2["default"](t);_toFastProperties2["default"](t.VISITOR_KEYS);var _retrievers=require("./retrievers");_defaults(exports,_interopExportWildcard(_retrievers,_defaults));var _validators=require("./validators");_defaults(exports,_interopExportWildcard(_validators,_defaults));var _converters=require("./converters");_defaults(exports,_interopExportWildcard(_converters,_defaults));var _flow=require("./flow");_defaults(exports,_interopExportWildcard(_flow,_defaults))},{"./constants":190,"./converters":191,"./definitions":196,"./definitions/init":197,"./flow":200,"./react":202,"./retrievers":203,"./validators":204,"babel-runtime/core-js/get-iterator":102,"babel-runtime/core-js/object/keys":109, | |
"babel-runtime/helpers/defaults":115,"babel-runtime/helpers/interop-export-wildcard":116,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,"babel-traverse":61,"lodash/array/compact":216,"lodash/array/uniq":218,"lodash/collection/each":219,"lodash/lang/clone":281,"to-fast-properties":209}],202:[function(require,module,exports){"use strict";var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.isCompatTag=isCompatTag;exports.buildChildren=buildChildren;var _index=require("./index");var t=_interopRequireWildcard(_index);var isReactComponent=t.buildMatchMemberExpression("React.Component");exports.isReactComponent=isReactComponent;function isCompatTag(tagName){return!!tagName&&/^[a-z]|\-/.test(tagName)}function cleanJSXElementLiteralChild(child,args){var lines=child.value.split(/\r\n|\n|\r/);var lastNonEmptyLine=0;for(var i=0;i<lines.length;i++){if(lines[i].match(/[^ \t]/)){lastNonEmptyLine=i}}var str="";for(var i=0;i<lines.length;i++){var line=lines[i];var isFirstLine=i===0;var isLastLine=i===lines.length-1;var isLastNonEmptyLine=i===lastNonEmptyLine;var trimmedLine=line.replace(/\t/g," ");if(!isFirstLine){trimmedLine=trimmedLine.replace(/^[ ]+/,"")}if(!isLastLine){trimmedLine=trimmedLine.replace(/[ ]+$/,"")}if(trimmedLine){if(!isLastNonEmptyLine){trimmedLine+=" "}str+=trimmedLine}}if(str)args.push(t.stringLiteral(str))}function buildChildren(node){var elems=[];for(var i=0;i<node.children.length;i++){var child=node.children[i];if(t.isJSXText(child)){cleanJSXElementLiteralChild(child,elems);continue}if(t.isJSXExpressionContainer(child))child=child.expression;if(t.isJSXEmptyExpression(child))continue;elems.push(child)}return elems}},{"./index":201,"babel-runtime/helpers/interop-require-wildcard":118}],203:[function(require,module,exports){"use strict";var _Object$create=require("babel-runtime/core-js/object/create")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.getBindingIdentifiers=getBindingIdentifiers;exports.getOuterBindingIdentifiers=getOuterBindingIdentifiers;var _index=require("./index");var t=_interopRequireWildcard(_index);function getBindingIdentifiers(node,duplicates,outerOnly){var search=[].concat(node);var ids=_Object$create(null);while(search.length){var id=search.shift();if(!id)continue;var keys=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){if(duplicates){var _ids=ids[id.name]=ids[id.name]||[];_ids.push(id)}else{ids[id.name]=id}continue}if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}continue}if(outerOnly){if(t.isFunctionDeclaration(id)){search.push(id.id);continue}if(t.isFunctionExpression(id)){continue}}if(keys){for(var i=0;i<keys.length;i++){var key=keys[i];if(id[key]){search=search.concat(id[key])}}}}return ids}getBindingIdentifiers.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],RestProperty:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]};function getOuterBindingIdentifiers(node,duplicates){return getBindingIdentifiers(node,duplicates,true)}},{"./index":201,"babel-runtime/core-js/object/create":104,"babel-runtime/helpers/interop-require-wildcard":118}],204:[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"];var _interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=true;exports.isBinding=isBinding;exports.isReferenced=isReferenced;exports.isValidIdentifier=isValidIdentifier;exports.isLet=isLet;exports.isBlockScoped=isBlockScoped;exports.isVar=isVar;exports.isSpecifierDefault=isSpecifierDefault;exports.isScope=isScope;exports.isImmutable=isImmutable;var _retrievers=require("./retrievers");var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _index=require("./index");var t=_interopRequireWildcard(_index);var _constants=require("./constants");function isBinding(node,parent){var keys=_retrievers.getBindingIdentifiers.keys[parent.type];if(keys){for(var i=0;i<keys.length;i++){var key=keys[i];var val=parent[key];if(Array.isArray(val)){if(val.indexOf(node)>=0)return true}else{if(val===node)return true}}}return false}function isReferenced(node,parent){switch(parent.type){case"BindExpression":return parent.object===node||parent.callee===node;case"MemberExpression":case"JSXMemberExpression":if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}case"MetaProperty":return false;case"ObjectProperty":if(parent.key===node){return parent.computed}case"VariableDeclarator":return parent.id!==node;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var _arr=parent.params;for(var _i=0;_i<_arr.length;_i++){var param=_arr[_i];if(param===node)return false}return parent.id!==node;case"ExportSpecifier":if(parent.source){return false}else{return parent.local===node}case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return false;case"JSXAttribute":return parent.name!==node;case"ClassProperty":return parent.value===node;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"ClassDeclaration":case"ClassExpression":return parent.id!==node;case"ClassMethod":case"ObjectMethod":return parent.key===node&&parent.computed;case"LabeledStatement":return false;case"CatchClause":return parent.param!==node;case"RestElement":return false;case"AssignmentExpression":return parent.right===node;case"AssignmentPattern":return parent.right===node;case"ObjectPattern":case"ArrayPattern":return false}return true}function isValidIdentifier(name){if(typeof name!=="string"||_esutils2["default"].keyword.isReservedWordES6(name,true)){return false}else{return _esutils2["default"].keyword.isIdentifierNameES6(name)}}function isLet(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node[_constants.BLOCK_SCOPED_SYMBOL])}function isBlockScoped(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)}function isVar(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node[_constants.BLOCK_SCOPED_SYMBOL]}function isSpecifierDefault(specifier){return t.isImportDefaultSpecifier(specifier)||t.isIdentifier(specifier.imported||specifier.exported,{name:"default"})}function isScope(node,parent){if(t.isBlockStatement(node)&&t.isFunction(parent,{body:node})){return false}return t.isScopable(node)}function isImmutable(node){if(t.isType(node.type,"Immutable"))return true;if(t.isIdentifier(node)){if(node.name==="undefined"){return true}else{return false}}return false}},{"./constants":190,"./index":201,"./retrievers":203,"babel-runtime/helpers/interop-require-default":117,"babel-runtime/helpers/interop-require-wildcard":118,esutils:208}],205:[function(require,module,exports){module.exports=require(96)},{}],206:[function(require,module,exports){module.exports=require(97)},{}],207:[function(require,module,exports){module.exports=require(98)},{"./code":206}],208:[function(require,module,exports){module.exports=require(99)},{"./ast":205,"./code":206,"./keyword":207}],209:[function(require,module,exports){"use strict";module.exports=function toFastProperties(obj){function f(){}f.prototype=obj;new f;return;eval(obj)}},{}],210:[function(require,module,exports){exports=module.exports=require("./debug");exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}exports.formatters.j=function(v){return JSON.stringify(v)};function formatArgs(){var args=arguments;var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return args;var c="color: "+this.color;args=[args[0],c,"color: inherit"].concat(Array.prototype.slice.call(args,1));var index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match){lastC=index}});args.splice(lastC,0,c);return args}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces){exports.storage.removeItem("debug")}else{exports.storage.debug=namespaces}}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}},{"./debug":211}],211:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;if(null==self.useColors)self.useColors=exports.useColors();if(null==self.color&&self.useColors)self.color=selectColor();var args=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]);if("string"!==typeof args[0]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});if("function"===typeof exports.formatArgs){args=exports.formatArgs.apply(self,args)}var logFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}enabled.enabled=true;var fn=exports.enabled(namespace)?enabled:disabled;fn.namespace=namespace;return fn}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i<len;i++){if(!split[i])continue;namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-"){exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"))}else{exports.names.push(new RegExp("^"+namespaces+"$"))}}}function disable(){exports.enable("")}function enabled(name){var i,len;for(i=0,len=exports.skips.length;i<len;i++){if(exports.skips[i].test(name)){return false}}for(i=0,len=exports.names.length;i<len;i++){if(exports.names[i].test(name)){return true}}return false}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{ms:212}],212:[function(require,module,exports){var s=1e3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};if("string"==typeof val)return parse(val);return options.long?long(val):short(val)};function parse(str){str=""+str;if(str.length>1e4)return;var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}function short(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n)return;if(ms<n*1.5)return Math.floor(ms/n)+" "+name;return Math.ceil(ms/n)+" "+name+"s"}},{}],213:[function(require,module,exports){module.exports={builtin:{Array:false,ArrayBuffer:false,Boolean:false,constructor:false,DataView:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,escape:false,eval:false,EvalError:false,Float32Array:false,Float64Array:false,Function:false,hasOwnProperty:false,Infinity:false,Int16Array:false,Int32Array:false,Int8Array:false,isFinite:false,isNaN:false,isPrototypeOf:false,JSON:false,Map:false,Math:false,NaN:false,Number:false,Object:false,parseFloat:false,parseInt:false,Promise:false,propertyIsEnumerable:false,Proxy:false,RangeError:false,ReferenceError:false,Reflect:false,RegExp:false,Set:false,String:false,Symbol:false,SyntaxError:false,System:false,toLocaleString:false,toString:false,TypeError:false,Uint16Array:false,Uint32Array:false,Uint8Array:false,Uint8ClampedArray:false,undefined:false,unescape:false,URIError:false,valueOf:false,WeakMap:false,WeakSet:false},es5:{Array:false,Boolean:false,constructor:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,escape:false,eval:false,EvalError:false,Float32Array:false,Float64Array:false,Function:false,hasOwnProperty:false,Infinity:false,isFinite:false,isNaN:false,isPrototypeOf:false,JSON:false,Math:false,NaN:false,Number:false,Object:false,parseFloat:false,parseInt:false,propertyIsEnumerable:false,RangeError:false,ReferenceError:false,RegExp:false,String:false,SyntaxError:false,toLocaleString:false,toString:false,TypeError:false,undefined:false,unescape:false,URIError:false,valueOf:false},es6:{Array:false,ArrayBuffer:false,Boolean:false,constructor:false,DataView:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,escape:false,eval:false,EvalError:false,Float32Array:false,Float64Array:false,Function:false,hasOwnProperty:false,Infinity:false,Int16Array:false,Int32Array:false,Int8Array:false,isFinite:false,isNaN:false,isPrototypeOf:false,JSON:false,Map:false,Math:false,NaN:false,Number:false,Object:false,parseFloat:false,parseInt:false,Promise:false,propertyIsEnumerable:false,Proxy:false,RangeError:false,ReferenceError:false,Reflect:false,RegExp:false,Set:false,String:false,Symbol:false,SyntaxError:false,System:false,toLocaleString:false,toString:false,TypeError:false,Uint16Array:false,Uint32Array:false,Uint8Array:false,Uint8ClampedArray:false,undefined:false,unescape:false,URIError:false,valueOf:false,WeakMap:false,WeakSet:false},browser:{addEventListener:false,alert:false,AnalyserNode:false,AnimationEvent:false,applicationCache:false,ApplicationCache:false,ApplicationCacheErrorEvent:false,atob:false,Attr:false,Audio:false,AudioBuffer:false,AudioBufferSourceNode:false,AudioContext:false,AudioDestinationNode:false,AudioListener:false,AudioNode:false,AudioParam:false,AudioProcessingEvent:false,AutocompleteErrorEvent:false,BarProp:false,BatteryManager:false,BeforeUnloadEvent:false,BiquadFilterNode:false,Blob:false,blur:false,btoa:false,Cache:false,caches:false,CacheStorage:false,cancelAnimationFrame:false,CanvasGradient:false,CanvasPattern:false,CanvasRenderingContext2D:false,CDATASection:false,ChannelMergerNode:false,ChannelSplitterNode:false,CharacterData:false,clearInterval:false,clearTimeout:false,clientInformation:false,ClientRect:false,ClientRectList:false,ClipboardEvent:false,close:false,closed:false,CloseEvent:false,Comment:false,CompositionEvent:false,confirm:false,console:false,ConvolverNode:false,crypto:false,Crypto:false,CryptoKey:false,CSS:false,CSSFontFaceRule:false,CSSImportRule:false,CSSKeyframeRule:false,CSSKeyframesRule:false,CSSMediaRule:false,CSSPageRule:false,CSSRule:false,CSSRuleList:false,CSSStyleDeclaration:false,CSSStyleRule:false,CSSStyleSheet:false,CSSSupportsRule:false,CSSUnknownRule:false,CSSViewportRule:false,CustomEvent:false,DataTransfer:false,DataTransferItem:false,DataTransferItemList:false,Debug:false,defaultStatus:false,defaultstatus:false,DelayNode:false,DeviceMotionEvent:false,DeviceOrientationEvent:false,devicePixelRatio:false,dispatchEvent:false,document:false,Document:false,DocumentFragment:false,DocumentType:false,DOMError:false,DOMException:false,DOMImplementation:false,DOMParser:false,DOMSettableTokenList:false,DOMStringList:false,DOMStringMap:false,DOMTokenList:false,DragEvent:false,DynamicsCompressorNode:false,Element:false,ElementTimeControl:false,ErrorEvent:false,event:false,Event:false,EventSource:false,EventTarget:false,external:false,fetch:false,File:false,FileError:false,FileList:false,FileReader:false,find:false,focus:false,FocusEvent:false,FontFace:false,FormData:false,frameElement:false,frames:false,GainNode:false,Gamepad:false,GamepadButton:false,GamepadEvent:false,getComputedStyle:false,getSelection:false,HashChangeEvent:false,Headers:false,history:false,History:false,HTMLAllCollection:false,HTMLAnchorElement:false,HTMLAppletElement:false,HTMLAreaElement:false,HTMLAudioElement:false,HTMLBaseElement:false,HTMLBlockquoteElement:false,HTMLBodyElement:false,HTMLBRElement:false,HTMLButtonElement:false,HTMLCanvasElement:false,HTMLCollection:false,HTMLContentElement:false,HTMLDataListElement:false,HTMLDetailsElement:false,HTMLDialogElement:false,HTMLDirectoryElement:false,HTMLDivElement:false,HTMLDListElement:false,HTMLDocument:false,HTMLElement:false,HTMLEmbedElement:false,HTMLFieldSetElement:false,HTMLFontElement:false,HTMLFormControlsCollection:false,HTMLFormElement:false,HTMLFrameElement:false,HTMLFrameSetElement:false,HTMLHeadElement:false,HTMLHeadingElement:false,HTMLHRElement:false,HTMLHtmlElement:false,HTMLIFrameElement:false,HTMLImageElement:false,HTMLInputElement:false,HTMLIsIndexElement:false,HTMLKeygenElement:false,HTMLLabelElement:false,HTMLLayerElement:false,HTMLLegendElement:false,HTMLLIElement:false,HTMLLinkElement:false,HTMLMapElement:false,HTMLMarqueeElement:false,HTMLMediaElement:false,HTMLMenuElement:false,HTMLMetaElement:false,HTMLMeterElement:false,HTMLModElement:false,HTMLObjectElement:false,HTMLOListElement:false,HTMLOptGroupElement:false,HTMLOptionElement:false,HTMLOptionsCollection:false,HTMLOutputElement:false,HTMLParagraphElement:false,HTMLParamElement:false,HTMLPictureElement:false,HTMLPreElement:false,HTMLProgressElement:false,HTMLQuoteElement:false,HTMLScriptElement:false,HTMLSelectElement:false,HTMLShadowElement:false,HTMLSourceElement:false,HTMLSpanElement:false,HTMLStyleElement:false,HTMLTableCaptionElement:false,HTMLTableCellElement:false,HTMLTableColElement:false,HTMLTableElement:false,HTMLTableRowElement:false,HTMLTableSectionElement:false,HTMLTemplateElement:false,HTMLTextAreaElement:false,HTMLTitleElement:false,HTMLTrackElement:false,HTMLUListElement:false,HTMLUnknownElement:false,HTMLVideoElement:false,IDBCursor:false,IDBCursorWithValue:false,IDBDatabase:false,IDBEnvironment:false,IDBFactory:false,IDBIndex:false,IDBKeyRange:false,IDBObjectStore:false,IDBOpenDBRequest:false,IDBRequest:false,IDBTransaction:false,IDBVersionChangeEvent:false,Image:false,ImageBitmap:false,ImageData:false,indexedDB:false,innerHeight:false,innerWidth:false,InputEvent:false,InputMethodContext:false,Intl:false,KeyboardEvent:false,length:false,localStorage:false,location:false,Location:false,locationbar:false,matchMedia:false,MediaElementAudioSourceNode:false,MediaEncryptedEvent:false,MediaError:false,MediaKeyError:false,MediaKeyEvent:false,MediaKeyMessageEvent:false,MediaKeys:false,MediaKeySession:false,MediaKeyStatusMap:false,MediaKeySystemAccess:false,MediaList:false,MediaQueryList:false,MediaQueryListEvent:false,MediaSource:false,MediaStreamAudioDestinationNode:false,MediaStreamAudioSourceNode:false,MediaStreamEvent:false,MediaStreamTrack:false,menubar:false,MessageChannel:false,MessageEvent:false,MessagePort:false,MIDIAccess:false,MIDIConnectionEvent:false,MIDIInput:false,MIDIInputMap:false,MIDIMessageEvent:false,MIDIOutput:false,MIDIOutputMap:false,MIDIPort:false,MimeType:false,MimeTypeArray:false,MouseEvent:false,moveBy:false,moveTo:false,MutationEvent:false,MutationObserver:false,MutationRecord:false,name:false,NamedNodeMap:false,navigator:false,Navigator:false,Node:false,NodeFilter:false,NodeIterator:false,NodeList:false,Notification:false,OfflineAudioCompletionEvent:false,OfflineAudioContext:false,offscreenBuffering:false,onbeforeunload:true,onblur:true,onerror:true,onfocus:true,onload:true,onresize:true,onunload:true,open:false,openDatabase:false,opener:false,opera:false,Option:false,OscillatorNode:false,outerHeight:false,outerWidth:false,PageTransitionEvent:false,pageXOffset:false,pageYOffset:false,parent:false,Path2D:false,performance:false,Performance:false,PerformanceEntry:false,PerformanceMark:false,PerformanceMeasure:false,PerformanceNavigation:false,PerformanceResourceTiming:false,PerformanceTiming:false,PeriodicWave:false,Permissions:false,PermissionStatus:false,personalbar:false,Plugin:false,PluginArray:false,PopStateEvent:false,postMessage:false,print:false,ProcessingInstruction:false,ProgressEvent:false,prompt:false,PushManager:false,PushSubscription:false,RadioNodeList:false,Range:false,ReadableByteStream:false,ReadableStream:false,removeEventListener:false,Request:false,requestAnimationFrame:false,resizeBy:false,resizeTo:false,Response:false,RTCIceCandidate:false,RTCSessionDescription:false,screen:false,Screen:false,screenLeft:false,ScreenOrientation:false,screenTop:false,screenX:false,screenY:false,ScriptProcessorNode:false,scroll:false,scrollbars:false,scrollBy:false,scrollTo:false,scrollX:false,scrollY:false,SecurityPolicyViolationEvent:false,Selection:false,self:false,ServiceWorker:false,ServiceWorkerContainer:false,ServiceWorkerRegistration:false,sessionStorage:false,setInterval:false,setTimeout:false,ShadowRoot:false,SharedWorker:false,showModalDialog:false,speechSynthesis:false,SpeechSynthesisEvent:false,SpeechSynthesisUtterance:false,status:false,statusbar:false,stop:false,Storage:false,StorageEvent:false,styleMedia:false,StyleSheet:false,StyleSheetList:false,SubtleCrypto:false,SVGAElement:false,SVGAltGlyphDefElement:false,SVGAltGlyphElement:false,SVGAltGlyphItemElement:false,SVGAngle:false,SVGAnimateColorElement:false,SVGAnimatedAngle:false,SVGAnimatedBoolean:false,SVGAnimatedEnumeration:false,SVGAnimatedInteger:false,SVGAnimatedLength:false,SVGAnimatedLengthList:false,SVGAnimatedNumber:false,SVGAnimatedNumberList:false,SVGAnimatedPathData:false,SVGAnimatedPoints:false,SVGAnimatedPreserveAspectRatio:false,SVGAnimatedRect:false,SVGAnimatedString:false,SVGAnimatedTransformList:false,SVGAnimateElement:false,SVGAnimateMotionElement:false,SVGAnimateTransformElement:false,SVGAnimationElement:false,SVGCircleElement:false,SVGClipPathElement:false,SVGColor:false,SVGColorProfileElement:false,SVGColorProfileRule:false,SVGComponentTransferFunctionElement:false,SVGCSSRule:false,SVGCursorElement:false,SVGDefsElement:false,SVGDescElement:false,SVGDiscardElement:false,SVGDocument:false,SVGElement:false,SVGElementInstance:false,SVGElementInstanceList:false,SVGEllipseElement:false,SVGEvent:false,SVGExternalResourcesRequired:false,SVGFEBlendElement:false,SVGFEColorMatrixElement:false,SVGFEComponentTransferElement:false,SVGFECompositeElement:false,SVGFEConvolveMatrixElement:false,SVGFEDiffuseLightingElement:false,SVGFEDisplacementMapElement:false,SVGFEDistantLightElement:false,SVGFEDropShadowElement:false,SVGFEFloodElement:false,SVGFEFuncAElement:false,SVGFEFuncBElement:false,SVGFEFuncGElement:false,SVGFEFuncRElement:false,SVGFEGaussianBlurElement:false,SVGFEImageElement:false,SVGFEMergeElement:false,SVGFEMergeNodeElement:false,SVGFEMorphologyElement:false,SVGFEOffsetElement:false,SVGFEPointLightElement:false,SVGFESpecularLightingElement:false,SVGFESpotLightElement:false,SVGFETileElement:false,SVGFETurbulenceElement:false,SVGFilterElement:false,SVGFilterPrimitiveStandardAttributes:false,SVGFitToViewBox:false,SVGFontElement:false,SVGFontFaceElement:false,SVGFontFaceFormatElement:false,SVGFontFaceNameElement:false,SVGFontFaceSrcElement:false,SVGFontFaceUriElement:false,SVGForeignObjectElement:false,SVGGElement:false,SVGGeometryElement:false,SVGGlyphElement:false,SVGGlyphRefElement:false,SVGGradientElement:false,SVGGraphicsElement:false,SVGHKernElement:false,SVGICCColor:false,SVGImageElement:false,SVGLangSpace:false,SVGLength:false,SVGLengthList:false,SVGLinearGradientElement:false,SVGLineElement:false,SVGLocatable:false,SVGMarkerElement:false,SVGMaskElement:false,SVGMatrix:false,SVGMetadataElement:false,SVGMissingGlyphElement:false,SVGMPathElement:false,SVGNumber:false,SVGNumberList:false,SVGPaint:false,SVGPathElement:false,SVGPathSeg:false,SVGPathSegArcAbs:false,SVGPathSegArcRel:false,SVGPathSegClosePath:false,SVGPathSegCurvetoCubicAbs:false,SVGPathSegCurvetoCubicRel:false,SVGPathSegCurvetoCubicSmoothAbs:false,SVGPathSegCurvetoCubicSmoothRel:false,SVGPathSegCurvetoQuadraticAbs:false,SVGPathSegCurvetoQuadraticRel:false,SVGPathSegCurvetoQuadraticSmoothAbs:false,SVGPathSegCurvetoQuadraticSmoothRel:false,SVGPathSegLinetoAbs:false,SVGPathSegLinetoHorizontalAbs:false,SVGPathSegLinetoHorizontalRel:false,SVGPathSegLinetoRel:false,SVGPathSegLinetoVerticalAbs:false,SVGPathSegLinetoVerticalRel:false,SVGPathSegList:false,SVGPathSegMovetoAbs:false,SVGPathSegMovetoRel:false,SVGPatternElement:false,SVGPoint:false,SVGPointList:false,SVGPolygonElement:false,SVGPolylineElement:false,SVGPreserveAspectRatio:false,SVGRadialGradientElement:false,SVGRect:false,SVGRectElement:false,SVGRenderingIntent:false,SVGScriptElement:false,SVGSetElement:false,SVGStopElement:false,SVGStringList:false,SVGStylable:false,SVGStyleElement:false,SVGSVGElement:false,SVGSwitchElement:false,SVGSymbolElement:false,SVGTests:false,SVGTextContentElement:false,SVGTextElement:false,SVGTextPathElement:false,SVGTextPositioningElement:false,SVGTitleElement:false,SVGTransform:false,SVGTransformable:false,SVGTransformList:false,SVGTRefElement:false,SVGTSpanElement:false,SVGUnitTypes:false,SVGURIReference:false,SVGUseElement:false,SVGViewElement:false,SVGViewSpec:false,SVGVKernElement:false,SVGZoomAndPan:false,SVGZoomEvent:false,Text:false,TextDecoder:false,TextEncoder:false,TextEvent:false,TextMetrics:false,TextTrack:false,TextTrackCue:false,TextTrackCueList:false,TextTrackList:false,TimeEvent:false,TimeRanges:false,toolbar:false,top:false,Touch:false,TouchEvent:false,TouchList:false,TrackEvent:false,TransitionEvent:false,TreeWalker:false,UIEvent:false,URL:false,ValidityState:false,VTTCue:false,WaveShaperNode:false,WebGLActiveInfo:false,WebGLBuffer:false,WebGLContextEvent:false,WebGLFramebuffer:false,WebGLProgram:false,WebGLRenderbuffer:false,WebGLRenderingContext:false,WebGLShader:false,WebGLShaderPrecisionFormat:false,WebGLTexture:false,WebGLUniformLocation:false,WebSocket:false,WheelEvent:false,window:false,Window:false,Worker:false,XDomainRequest:false,XMLDocument:false,XMLHttpRequest:false,XMLHttpRequestEventTarget:false,XMLHttpRequestProgressEvent:false,XMLHttpRequestUpload:false,XMLSerializer:false,XPathEvaluator:false,XPathException:false,XPathExpression:false,XPathNamespace:false,XPathNSResolver:false,XPathResult:false,XSLTProcessor:false},worker:{applicationCache:false,atob:false,Blob:false,BroadcastChannel:false,btoa:false,Cache:false,caches:false,clearInterval:false,clearTimeout:false,close:true,console:false,fetch:false,FileReaderSync:false,FormData:false,Headers:false,IDBCursor:false,IDBCursorWithValue:false,IDBDatabase:false,IDBFactory:false,IDBIndex:false,IDBKeyRange:false,IDBObjectStore:false,IDBOpenDBRequest:false,IDBRequest:false,IDBTransaction:false,IDBVersionChangeEvent:false,ImageData:false,importScripts:true,indexedDB:false,location:false,MessageChannel:false,MessagePort:false,name:false,navigator:false,Notification:false,onclose:true,onconnect:true,onerror:true,onlanguagechange:true,onmessage:true,onoffline:true,ononline:true,onrejectionhandled:true,onunhandledrejection:true,performance:false,Performance:false,PerformanceEntry:false,PerformanceMark:false,PerformanceMeasure:false,PerformanceNavigation:false,PerformanceResourceTiming:false,PerformanceTiming:false,postMessage:true,Promise:false,Request:false,Response:false,self:true,ServiceWorkerRegistration:false,setInterval:false,setTimeout:false,TextDecoder:false,TextEncoder:false,URL:false,WebSocket:false,Worker:false,XMLHttpRequest:false},node:{__dirname:false,__filename:false,arguments:false,Buffer:false,clearImmediate:false,clearInterval:false,clearTimeout:false,console:false,exports:true,GLOBAL:false,global:false,module:false,process:false,require:false,root:false,setImmediate:false,setInterval:false,setTimeout:false},commonjs:{exports:true,module:false,require:false,global:false},amd:{define:false,require:false},mocha:{after:false,afterEach:false,before:false,beforeEach:false,context:false,describe:false,it:false,mocha:false,setup:false,specify:false,suite:false,suiteSetup:false,suiteTeardown:false,teardown:false,test:false,xcontext:false,xdescribe:false,xit:false,xspecify:false},jasmine:{afterAll:false,afterEach:false,beforeAll:false,beforeEach:false,describe:false,expect:false,fail:false,fdescribe:false,fit:false,it:false,jasmine:false,pending:false,runs:false,spyOn:false,waits:false,waitsFor:false,xdescribe:false,xit:false},jest:{afterEach:false,beforeEach:false,describe:false,expect:false,it:false,jest:false,pit:false,require:false,xdescribe:false,xit:false},qunit:{asyncTest:false,deepEqual:false,equal:false,expect:false,module:false,notDeepEqual:false,notEqual:false,notOk:false,notPropEqual:false,notStrictEqual:false,ok:false,propEqual:false,QUnit:false,raises:false,start:false,stop:false,strictEqual:false,test:false,"throws":false},phantomjs:{console:true,exports:true,phantom:true,require:true,WebPage:true},couch:{emit:false,exports:false,getRow:false,log:false,module:false,provides:false,require:false,respond:false,send:false,start:false,sum:false},rhino:{defineClass:false,deserialize:false,gc:false,help:false,importClass:false,importPackage:false,java:false,load:false,loadClass:false,Packages:false,print:false,quit:false,readFile:false,readUrl:false,runCommand:false,seal:false,serialize:false,spawn:false,sync:false,toint32:false,version:false},nashorn:{__DIR__:false,__FILE__:false,__LINE__:false,com:false,edu:false,exit:false,Java:false,java:false,javafx:false,JavaImporter:false,javax:false,JSAdapter:false,load:false,loadWithNewGlobal:false,org:false,Packages:false,print:false,quit:false},wsh:{ActiveXObject:true,Enumerator:true,GetObject:true,ScriptEngine:true,ScriptEngineBuildVersion:true,ScriptEngineMajorVersion:true,ScriptEngineMinorVersion:true,VBArray:true,WScript:true,WSH:true,XDomainRequest:true},jquery:{$:false,jQuery:false},yui:{Y:false,YUI:false,YUI_config:false},shelljs:{cat:false,cd:false,chmod:false,config:false,cp:false,dirs:false,echo:false,env:false, | |
error:false,exec:false,exit:false,find:false,grep:false,ls:false,ln:false,mkdir:false,mv:false,popd:false,pushd:false,pwd:false,rm:false,sed:false,target:false,tempdir:false,test:false,which:false},prototypejs:{$:false,$$:false,$A:false,$break:false,$continue:false,$F:false,$H:false,$R:false,$w:false,Abstract:false,Ajax:false,Autocompleter:false,Builder:false,Class:false,Control:false,Draggable:false,Draggables:false,Droppables:false,Effect:false,Element:false,Enumerable:false,Event:false,Field:false,Form:false,Hash:false,Insertion:false,ObjectRange:false,PeriodicalExecuter:false,Position:false,Prototype:false,Scriptaculous:false,Selector:false,Sortable:false,SortableObserver:false,Sound:false,Template:false,Toggle:false,Try:false},meteor:{$:false,_:false,Accounts:false,App:false,Assets:false,Blaze:false,check:false,Cordova:false,DDP:false,DDPServer:false,Deps:false,EJSON:false,Email:false,HTTP:false,Log:false,Match:false,Meteor:false,Mongo:false,MongoInternals:false,Npm:false,Package:false,Plugin:false,process:false,Random:false,ReactiveDict:false,ReactiveVar:false,Router:false,Session:false,share:false,Spacebars:false,Template:false,Tinytest:false,Tracker:false,UI:false,Utils:false,WebApp:false,WebAppInternals:false},mongo:{_isWindows:false,_rand:false,BulkWriteResult:false,cat:false,cd:false,connect:false,db:false,getHostName:false,getMemInfo:false,hostname:false,listFiles:false,load:false,ls:false,md5sumFile:false,mkdir:false,Mongo:false,ObjectId:false,PlanCache:false,print:false,printjson:false,pwd:false,quit:false,removeFile:false,rs:false,sh:false,UUID:false,version:false,WriteResult:false},applescript:{$:false,Application:false,Automation:false,console:false,delay:false,Library:false,ObjC:false,ObjectSpecifier:false,Path:false,Progress:false,Ref:false},serviceworker:{caches:false,Cache:false,CacheStorage:false,Client:false,clients:false,Clients:false,ExtendableEvent:false,ExtendableMessageEvent:false,FetchEvent:false,importScripts:false,registration:false,self:false,ServiceWorker:false,ServiceWorkerContainer:false,ServiceWorkerGlobalScope:false,ServiceWorkerMessageEvent:false,ServiceWorkerRegistration:false,skipWaiting:false,WindowClient:false},atomtest:{advanceClock:false,fakeClearInterval:false,fakeClearTimeout:false,fakeSetInterval:false,fakeSetTimeout:false,resetTimeouts:false,waitsForPromise:false},embertest:{andThen:false,click:false,currentPath:false,currentRouteName:false,currentURL:false,fillIn:false,find:false,findWithAssert:false,keyEvent:false,pauseTest:false,triggerEvent:false,visit:false},protractor:{$:false,$$:false,browser:false,By:false,by:false,DartObject:false,element:false,protractor:false},"shared-node-browser":{clearInterval:false,clearTimeout:false,console:false,setInterval:false,setTimeout:false},webextensions:{browser:false,chrome:false,opr:false},greasemonkey:{GM_addStyle:false,GM_deleteValue:false,GM_getResourceText:false,GM_getResourceURL:false,GM_getValue:false,GM_info:false,GM_listValues:false,GM_log:false,GM_openInTab:false,GM_registerMenuCommand:false,GM_setClipboard:false,GM_setValue:false,GM_xmlhttpRequest:false,unsafeWindow:false}}},{}],214:[function(require,module,exports){module.exports=require("./globals.json")},{"./globals.json":213}],215:[function(require,module,exports){(function(process){"use strict";var invariant=function(condition,format,a,b,c,d,e,f){if(process.env.NODE_ENV!=="production"){if(format===undefined){throw new Error("invariant requires an error message argument")}}if(!condition){var error;if(format===undefined){error=new Error("Minified exception occurred; use the non-minified dev environment "+"for the full error message and additional helpful warnings.")}else{var args=[a,b,c,d,e,f];var argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]}));error.name="Invariant Violation"}error.framesToPop=1;throw error}};module.exports=invariant}).call(this,require("_process"))},{_process:429}],216:[function(require,module,exports){function compact(array){var index=-1,length=array?array.length:0,resIndex=-1,result=[];while(++index<length){var value=array[index];if(value){result[++resIndex]=value}}return result}module.exports=compact},{}],217:[function(require,module,exports){function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}module.exports=last},{}],218:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?undefined:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":230,"../internal/baseUniq":248,"../internal/isIterateeCall":272,"../internal/sortedUniq":278}],219:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":220}],220:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),createForEach=require("../internal/createForEach");var forEach=createForEach(arrayEach,baseEach);module.exports=forEach},{"../internal/arrayEach":225,"../internal/baseEach":233,"../internal/createForEach":259}],221:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),getLength=require("../internal/getLength"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;if(!isLength(length)){collection=values(collection);length=collection.length}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex<=length&&collection.indexOf(target,fromIndex)>-1:!!length&&baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":238,"../internal/getLength":263,"../internal/isIterateeCall":272,"../internal/isLength":274,"../lang/isArray":283,"../lang/isString":290,"../object/values":297}],222:[function(require,module,exports){var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max;function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(start===undefined?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++index<length){rest[index]=args[start+index]}switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);index=-1;while(++index<start){otherArgs[index]=args[index]}otherArgs[start]=rest;return func.apply(this,otherArgs)}}module.exports=restParam},{}],223:[function(require,module,exports){(function(global){var cachePush=require("./cachePush"),getNative=require("./getNative");var Set=getNative(global,"Set");var nativeCreate=getNative(Object,"create");function SetCache(values){var length=values?values.length:0;this.data={hash:nativeCreate(null),set:new Set};while(length--){this.push(values[length])}}SetCache.prototype.push=cachePush;module.exports=SetCache}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./cachePush":253,"./getNative":265}],224:[function(require,module,exports){function arrayCopy(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}module.exports=arrayCopy},{}],225:[function(require,module,exports){function arrayEach(array,iteratee){var index=-1,length=array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}module.exports=arrayEach},{}],226:[function(require,module,exports){function arraySome(array,predicate){var index=-1,length=array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}module.exports=arraySome},{}],227:[function(require,module,exports){function assignDefaults(objectValue,sourceValue){return objectValue===undefined?sourceValue:objectValue}module.exports=assignDefaults},{}],228:[function(require,module,exports){var keys=require("../object/keys");function assignWith(object,source,customizer){var index=-1,props=keys(source),length=props.length;while(++index<length){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);if((result===result?result!==value:value===value)||value===undefined&&!(key in object)){object[key]=result}}return object}module.exports=assignWith},{"../object/keys":294}],229:[function(require,module,exports){var baseCopy=require("./baseCopy"),keys=require("../object/keys");function baseAssign(object,source){return source==null?object:baseCopy(source,keys(source),object)}module.exports=baseAssign},{"../object/keys":294,"./baseCopy":232}],230:[function(require,module,exports){var baseMatches=require("./baseMatches"),baseMatchesProperty=require("./baseMatchesProperty"),bindCallback=require("./bindCallback"),identity=require("../utility/identity"),property=require("../utility/property");function baseCallback(func,thisArg,argCount){var type=typeof func;if(type=="function"){return thisArg===undefined?func:bindCallback(func,thisArg,argCount)}if(func==null){return identity}if(type=="object"){return baseMatches(func)}return thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}module.exports=baseCallback},{"../utility/identity":298,"../utility/property":299,"./baseMatches":242,"./baseMatchesProperty":243,"./bindCallback":250}],231:[function(require,module,exports){var arrayCopy=require("./arrayCopy"),arrayEach=require("./arrayEach"),baseAssign=require("./baseAssign"),baseForOwn=require("./baseForOwn"),initCloneArray=require("./initCloneArray"),initCloneByTag=require("./initCloneByTag"),initCloneObject=require("./initCloneObject"),isArray=require("../lang/isArray"),isObject=require("../lang/isObject");var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=false;var objectProto=Object.prototype;var objToString=objectProto.toString;function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer){result=object?customizer(value,key,object):customizer(value)}if(result!==undefined){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return arrayCopy(value,result)}}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag==objectTag||tag==argsTag||isFunc&&!object){result=initCloneObject(isFunc?{}:value);if(!isDeep){return baseAssign(result,value)}}else{return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{}}}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}stackA.push(value);stackB.push(result);(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)});return result}module.exports=baseClone},{"../lang/isArray":283,"../lang/isObject":287,"./arrayCopy":224,"./arrayEach":225,"./baseAssign":229,"./baseForOwn":236,"./initCloneArray":267,"./initCloneByTag":268,"./initCloneObject":269}],232:[function(require,module,exports){function baseCopy(source,props,object){object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];object[key]=source[key]}return object}module.exports=baseCopy},{}],233:[function(require,module,exports){var baseForOwn=require("./baseForOwn"),createBaseEach=require("./createBaseEach");var baseEach=createBaseEach(baseForOwn);module.exports=baseEach},{"./baseForOwn":236,"./createBaseEach":255}],234:[function(require,module,exports){var createBaseFor=require("./createBaseFor");var baseFor=createBaseFor();module.exports=baseFor},{"./createBaseFor":256}],235:[function(require,module,exports){var baseFor=require("./baseFor"),keysIn=require("../object/keysIn");function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}module.exports=baseForIn},{"../object/keysIn":295,"./baseFor":234}],236:[function(require,module,exports){var baseFor=require("./baseFor"),keys=require("../object/keys");function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}module.exports=baseForOwn},{"../object/keys":294,"./baseFor":234}],237:[function(require,module,exports){var toObject=require("./toObject");function baseGet(object,path,pathKey){if(object==null){return}if(pathKey!==undefined&&pathKey in toObject(object)){path=[pathKey]}var index=0,length=path.length;while(object!=null&&index<length){object=object[path[index++]]}return index&&index==length?object:undefined}module.exports=baseGet},{"./toObject":279}],238:[function(require,module,exports){var indexOfNaN=require("./indexOfNaN");function baseIndexOf(array,value,fromIndex){if(value!==value){return indexOfNaN(array,fromIndex)}var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}module.exports=baseIndexOf},{"./indexOfNaN":266}],239:[function(require,module,exports){var baseIsEqualDeep=require("./baseIsEqualDeep"),isObject=require("../lang/isObject"),isObjectLike=require("./isObjectLike");function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other){return true}if(value==null||other==null||!isObject(value)&&!isObjectLike(other)){return value!==value&&other!==other}return baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}module.exports=baseIsEqual},{"../lang/isObject":287,"./baseIsEqualDeep":240,"./isObjectLike":275}],240:[function(require,module,exports){var equalArrays=require("./equalArrays"),equalByTag=require("./equalByTag"),equalObjects=require("./equalObjects"),isArray=require("../lang/isArray"),isTypedArray=require("../lang/isTypedArray");var argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;if(!objIsArr){objTag=objToString.call(object);if(objTag==argsTag){objTag=objectTag}else if(objTag!=objectTag){objIsArr=isTypedArray(object)}}if(!othIsArr){othTag=objToString.call(other);if(othTag==argsTag){othTag=objectTag}else if(othTag!=objectTag){othIsArr=isTypedArray(other)}}var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!(objIsArr||objIsObj)){return equalByTag(object,other,objTag)}if(!isLoose){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){return equalFunc(objIsWrapped?object.value():object,othIsWrapped?other.value():other,customizer,isLoose,stackA,stackB)}}if(!isSameTag){return false}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==object){return stackB[length]==other}}stackA.push(object);stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);stackA.pop();stackB.pop();return result}module.exports=baseIsEqualDeep},{"../lang/isArray":283,"../lang/isTypedArray":291,"./equalArrays":260,"./equalByTag":261,"./equalObjects":262}],241:[function(require,module,exports){var baseIsEqual=require("./baseIsEqual"),toObject=require("./toObject");function baseIsMatch(object,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object==null){return!length}object=toObject(object);while(index--){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object)){return false}}else{var result=customizer?customizer(objValue,srcValue,key):undefined;if(!(result===undefined?baseIsEqual(srcValue,objValue,customizer,true):result)){return false}}}return true}module.exports=baseIsMatch},{"./baseIsEqual":239,"./toObject":279}],242:[function(require,module,exports){var baseIsMatch=require("./baseIsMatch"),getMatchData=require("./getMatchData"),toObject=require("./toObject");function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){var key=matchData[0][0],value=matchData[0][1];return function(object){if(object==null){return false}return object[key]===value&&(value!==undefined||key in toObject(object))}}return function(object){return baseIsMatch(object,matchData)}}module.exports=baseMatches},{"./baseIsMatch":241,"./getMatchData":264,"./toObject":279}],243:[function(require,module,exports){var baseGet=require("./baseGet"),baseIsEqual=require("./baseIsEqual"),baseSlice=require("./baseSlice"),isArray=require("../lang/isArray"),isKey=require("./isKey"),isStrictComparable=require("./isStrictComparable"),last=require("../array/last"),toObject=require("./toObject"),toPath=require("./toPath");function baseMatchesProperty(path,srcValue){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(srcValue),pathKey=path+"";path=toPath(path);return function(object){if(object==null){return false}var key=pathKey;object=toObject(object);if((isArr||!isCommon)&&!(key in object)){object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));if(object==null){return false}key=last(path);object=toObject(object)}return object[key]===srcValue?srcValue!==undefined||key in object:baseIsEqual(srcValue,object[key],undefined,true)}}module.exports=baseMatchesProperty},{"../array/last":217,"../lang/isArray":283,"./baseGet":237,"./baseIsEqual":239,"./baseSlice":246,"./isKey":273,"./isStrictComparable":276,"./toObject":279,"./toPath":280}],244:[function(require,module,exports){function baseProperty(key){return function(object){return object==null?undefined:object[key]}}module.exports=baseProperty},{}],245:[function(require,module,exports){var baseGet=require("./baseGet"),toPath=require("./toPath");function basePropertyDeep(path){var pathKey=path+"";path=toPath(path);return function(object){return baseGet(object,path,pathKey)}}module.exports=basePropertyDeep},{"./baseGet":237,"./toPath":280}],246:[function(require,module,exports){function baseSlice(array,start,end){var index=-1,length=array.length;start=start==null?0:+start||0;if(start<0){start=-start>length?0:length+start}end=end===undefined||end>length?length:+end||0;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start]}return result}module.exports=baseSlice},{}],247:[function(require,module,exports){function baseToString(value){return value==null?"":value+""}module.exports=baseToString},{}],248:[function(require,module,exports){var baseIndexOf=require("./baseIndexOf"),cacheIndexOf=require("./cacheIndexOf"),createCache=require("./createCache");var LARGE_ARRAY_SIZE=200;function baseUniq(array,iteratee){var index=-1,indexOf=baseIndexOf,length=array.length,isCommon=true,isLarge=isCommon&&length>=LARGE_ARRAY_SIZE,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(isCommon&&value===value){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer}}if(iteratee){seen.push(computed)}result.push(value)}else if(indexOf(seen,computed,0)<0){if(iteratee||isLarge){seen.push(computed)}result.push(value)}}return result}module.exports=baseUniq},{"./baseIndexOf":238,"./cacheIndexOf":252,"./createCache":257}],249:[function(require,module,exports){function baseValues(object,props){var index=-1,length=props.length,result=Array(length);while(++index<length){result[index]=object[props[index]]}return result}module.exports=baseValues},{}],250:[function(require,module,exports){var identity=require("../utility/identity");function bindCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(thisArg===undefined){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}module.exports=bindCallback},{"../utility/identity":298}],251:[function(require,module,exports){(function(global){var ArrayBuffer=global.ArrayBuffer,Uint8Array=global.Uint8Array;function bufferClone(buffer){var result=new ArrayBuffer(buffer.byteLength),view=new Uint8Array(result);view.set(new Uint8Array(buffer));return result}module.exports=bufferClone}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],252:[function(require,module,exports){var isObject=require("../lang/isObject");function cacheIndexOf(cache,value){var data=cache.data,result=typeof value=="string"||isObject(value)?data.set.has(value):data.hash[value];return result?0:-1}module.exports=cacheIndexOf},{"../lang/isObject":287}],253:[function(require,module,exports){var isObject=require("../lang/isObject");function cachePush(value){var data=this.data;if(typeof value=="string"||isObject(value)){data.set.add(value)}else{data.hash[value]=true}}module.exports=cachePush},{"../lang/isObject":287}],254:[function(require,module,exports){var bindCallback=require("./bindCallback"),isIterateeCall=require("./isIterateeCall"),restParam=require("../function/restParam");function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=object==null?0:sources.length,customizer=length>2?sources[length-2]:undefined,guard=length>2?sources[2]:undefined,thisArg=length>1?sources[length-1]:undefined;if(typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=typeof thisArg=="function"?thisArg:undefined;length-=customizer?1:0}if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1}while(++index<length){var source=sources[index];if(source){assigner(object,source,customizer)}}return object})}module.exports=createAssigner},{"../function/restParam":222,"./bindCallback":250,"./isIterateeCall":272}],255:[function(require,module,exports){var getLength=require("./getLength"),isLength=require("./isLength"),toObject=require("./toObject");function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length)){return eachFunc(collection,iteratee)}var index=fromRight?length:-1,iterable=toObject(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}module.exports=createBaseEach},{"./getLength":263,"./isLength":274,"./toObject":279}],256:[function(require,module,exports){var toObject=require("./toObject");function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;while(fromRight?index--:++index<length){var key=props[index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}module.exports=createBaseFor},{"./toObject":279}],257:[function(require,module,exports){(function(global){var SetCache=require("./SetCache"),getNative=require("./getNative");var Set=getNative(global,"Set");var nativeCreate=getNative(Object,"create");function createCache(values){return nativeCreate&&Set?new SetCache(values):null}module.exports=createCache}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./SetCache":223,"./getNative":265}],258:[function(require,module,exports){var restParam=require("../function/restParam");function createDefaults(assigner,customizer){return restParam(function(args){var object=args[0];if(object==null){return object}args.push(customizer);return assigner.apply(undefined,args)})}module.exports=createDefaults},{"../function/restParam":222}],259:[function(require,module,exports){var bindCallback=require("./bindCallback"),isArray=require("../lang/isArray");function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return typeof iteratee=="function"&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}module.exports=createForEach},{"../lang/isArray":283,"./bindCallback":250}],260:[function(require,module,exports){var arraySome=require("./arraySome");function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength)){return false}while(++index<arrLength){var arrValue=array[index],othValue=other[index],result=customizer?customizer(isLoose?othValue:arrValue,isLoose?arrValue:othValue,index):undefined;if(result!==undefined){if(result){continue}return false}if(isLoose){if(!arraySome(other,function(othValue){return arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)})){return false}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))){return false}}return true}module.exports=equalArrays},{"./arraySome":226}],261:[function(require,module,exports){var boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",numberTag="[object Number]",regexpTag="[object RegExp]",stringTag="[object String]";function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:object==+other;case regexpTag:case stringTag:return object==other+""}return false}module.exports=equalByTag},{}],262:[function(require,module,exports){var keys=require("../object/keys");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isLoose?key in other:hasOwnProperty.call(other,key))){return false}}var skipCtor=isLoose;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key],result=customizer?customizer(isLoose?othValue:objValue,isLoose?objValue:othValue,key):undefined;if(!(result===undefined?equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB):result)){return false}skipCtor||(skipCtor=key=="constructor")}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&("constructor"in object&&"constructor"in other)&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){return false}}return true}module.exports=equalObjects},{"../object/keys":294}],263:[function(require,module,exports){var baseProperty=require("./baseProperty");var getLength=baseProperty("length");module.exports=getLength},{"./baseProperty":244}],264:[function(require,module,exports){var isStrictComparable=require("./isStrictComparable"),pairs=require("../object/pairs");function getMatchData(object){var result=pairs(object),length=result.length;while(length--){result[length][2]=isStrictComparable(result[length][1])}return result}module.exports=getMatchData},{"../object/pairs":296,"./isStrictComparable":276}],265:[function(require,module,exports){var isNative=require("../lang/isNative");function getNative(object,key){var value=object==null?undefined:object[key];return isNative(value)?value:undefined}module.exports=getNative},{"../lang/isNative":285}],266:[function(require,module,exports){function indexOfNaN(array,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?0:-1);while(fromRight?index--:++index<length){var other=array[index];if(other!==other){return index}}return-1}module.exports=indexOfNaN},{}],267:[function(require,module,exports){var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty.call(array,"index")){result.index=array.index;result.input=array.input}return result}module.exports=initCloneArray},{}],268:[function(require,module,exports){var bufferClone=require("./bufferClone");var boolTag="[object Boolean]",dateTag="[object Date]",numberTag="[object Number]",regexpTag="[object RegExp]",stringTag="[object String]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var reFlags=/\w*$/;function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object)); | |
result.lastIndex=object.lastIndex}return result}module.exports=initCloneByTag},{"./bufferClone":251}],269:[function(require,module,exports){function initCloneObject(object){var Ctor=object.constructor;if(!(typeof Ctor=="function"&&Ctor instanceof Ctor)){Ctor=Object}return new Ctor}module.exports=initCloneObject},{}],270:[function(require,module,exports){var getLength=require("./getLength"),isLength=require("./isLength");function isArrayLike(value){return value!=null&&isLength(getLength(value))}module.exports=isArrayLike},{"./getLength":263,"./isLength":274}],271:[function(require,module,exports){var reIsUint=/^\d+$/;var MAX_SAFE_INTEGER=9007199254740991;function isIndex(value,length){value=typeof value=="number"||reIsUint.test(value)?+value:-1;length=length==null?MAX_SAFE_INTEGER:length;return value>-1&&value%1==0&&value<length}module.exports=isIndex},{}],272:[function(require,module,exports){var isArrayLike=require("./isArrayLike"),isIndex=require("./isIndex"),isObject=require("../lang/isObject");function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){var other=object[index];return value===value?value===other:other!==other}return false}module.exports=isIterateeCall},{"../lang/isObject":287,"./isArrayLike":270,"./isIndex":271}],273:[function(require,module,exports){var isArray=require("../lang/isArray"),toObject=require("./toObject");var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(value,object){var type=typeof value;if(type=="string"&&reIsPlainProp.test(value)||type=="number"){return true}if(isArray(value)){return false}var result=!reIsDeepProp.test(value);return result||object!=null&&value in toObject(object)}module.exports=isKey},{"../lang/isArray":283,"./toObject":279}],274:[function(require,module,exports){var MAX_SAFE_INTEGER=9007199254740991;function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],275:[function(require,module,exports){function isObjectLike(value){return!!value&&typeof value=="object"}module.exports=isObjectLike},{}],276:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&!isObject(value)}module.exports=isStrictComparable},{"../lang/isObject":287}],277:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object));var index=-1,result=[];while(++index<propsLength){var key=props[index];if(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key)){result.push(key)}}return result}module.exports=shimKeys},{"../lang/isArguments":282,"../lang/isArray":283,"../object/keysIn":295,"./isIndex":271,"./isLength":274}],278:[function(require,module,exports){function sortedUniq(array,iteratee){var seen,index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(!index||seen!==computed){seen=computed;result[++resIndex]=value}}return result}module.exports=sortedUniq},{}],279:[function(require,module,exports){var isObject=require("../lang/isObject");function toObject(value){return isObject(value)?value:Object(value)}module.exports=toObject},{"../lang/isObject":287}],280:[function(require,module,exports){var baseToString=require("./baseToString"),isArray=require("../lang/isArray");var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;var reEscapeChar=/\\(\\)?/g;function toPath(value){if(isArray(value)){return value}var result=[];baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)});return result}module.exports=toPath},{"../lang/isArray":283,"./baseToString":247}],281:[function(require,module,exports){var baseClone=require("../internal/baseClone"),bindCallback=require("../internal/bindCallback"),isIterateeCall=require("../internal/isIterateeCall");function clone(value,isDeep,customizer,thisArg){if(isDeep&&typeof isDeep!="boolean"&&isIterateeCall(value,isDeep,customizer)){isDeep=false}else if(typeof isDeep=="function"){thisArg=customizer;customizer=isDeep;isDeep=false}return typeof customizer=="function"?baseClone(value,isDeep,bindCallback(customizer,thisArg,3)):baseClone(value,isDeep)}module.exports=clone},{"../internal/baseClone":231,"../internal/bindCallback":250,"../internal/isIterateeCall":272}],282:[function(require,module,exports){var isArrayLike=require("../internal/isArrayLike"),isObjectLike=require("../internal/isObjectLike");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var propertyIsEnumerable=objectProto.propertyIsEnumerable;function isArguments(value){return isObjectLike(value)&&isArrayLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")}module.exports=isArguments},{"../internal/isArrayLike":270,"../internal/isObjectLike":275}],283:[function(require,module,exports){var getNative=require("../internal/getNative"),isLength=require("../internal/isLength"),isObjectLike=require("../internal/isObjectLike");var arrayTag="[object Array]";var objectProto=Object.prototype;var objToString=objectProto.toString;var nativeIsArray=getNative(Array,"isArray");var isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};module.exports=isArray},{"../internal/getNative":265,"../internal/isLength":274,"../internal/isObjectLike":275}],284:[function(require,module,exports){var isObject=require("./isObject");var funcTag="[object Function]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}module.exports=isFunction},{"./isObject":287}],285:[function(require,module,exports){var isFunction=require("./isFunction"),isObjectLike=require("../internal/isObjectLike");var reIsHostCtor=/^\[object .+?Constructor\]$/;var objectProto=Object.prototype;var fnToString=Function.prototype.toString;var hasOwnProperty=objectProto.hasOwnProperty;var reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function isNative(value){if(value==null){return false}if(isFunction(value)){return reIsNative.test(fnToString.call(value))}return isObjectLike(value)&&reIsHostCtor.test(value)}module.exports=isNative},{"../internal/isObjectLike":275,"./isFunction":284}],286:[function(require,module,exports){var isObjectLike=require("../internal/isObjectLike");var numberTag="[object Number]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isNumber(value){return typeof value=="number"||isObjectLike(value)&&objToString.call(value)==numberTag}module.exports=isNumber},{"../internal/isObjectLike":275}],287:[function(require,module,exports){function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}module.exports=isObject},{}],288:[function(require,module,exports){var baseForIn=require("../internal/baseForIn"),isArguments=require("./isArguments"),isObjectLike=require("../internal/isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function isPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag&&!isArguments(value))||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return result===undefined||hasOwnProperty.call(value,result)}module.exports=isPlainObject},{"../internal/baseForIn":235,"../internal/isObjectLike":275,"./isArguments":282}],289:[function(require,module,exports){var isObject=require("./isObject");var regexpTag="[object RegExp]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isRegExp(value){return isObject(value)&&objToString.call(value)==regexpTag}module.exports=isRegExp},{"./isObject":287}],290:[function(require,module,exports){var isObjectLike=require("../internal/isObjectLike");var stringTag="[object String]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isString(value){return typeof value=="string"||isObjectLike(value)&&objToString.call(value)==stringTag}module.exports=isString},{"../internal/isObjectLike":275}],291:[function(require,module,exports){var isLength=require("../internal/isLength"),isObjectLike=require("../internal/isObjectLike");var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;var objectProto=Object.prototype;var objToString=objectProto.toString;function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}module.exports=isTypedArray},{"../internal/isLength":274,"../internal/isObjectLike":275}],292:[function(require,module,exports){var assignWith=require("../internal/assignWith"),baseAssign=require("../internal/baseAssign"),createAssigner=require("../internal/createAssigner");var assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)});module.exports=assign},{"../internal/assignWith":228,"../internal/baseAssign":229,"../internal/createAssigner":254}],293:[function(require,module,exports){var assign=require("./assign"),assignDefaults=require("../internal/assignDefaults"),createDefaults=require("../internal/createDefaults");var defaults=createDefaults(assign,assignDefaults);module.exports=defaults},{"../internal/assignDefaults":227,"../internal/createDefaults":258,"./assign":292}],294:[function(require,module,exports){var getNative=require("../internal/getNative"),isArrayLike=require("../internal/isArrayLike"),isObject=require("../lang/isObject"),shimKeys=require("../internal/shimKeys");var nativeKeys=getNative(Object,"keys");var keys=!nativeKeys?shimKeys:function(object){var Ctor=object==null?undefined:object.constructor;if(typeof Ctor=="function"&&Ctor.prototype===object||typeof object!="function"&&isArrayLike(object)){return shimKeys(object)}return isObject(object)?nativeKeys(object):[]};module.exports=keys},{"../internal/getNative":265,"../internal/isArrayLike":270,"../internal/shimKeys":277,"../lang/isObject":287}],295:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("../internal/isIndex"),isLength=require("../internal/isLength"),isObject=require("../lang/isObject");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function keysIn(object){if(object==null){return[]}if(!isObject(object)){object=Object(object)}var length=object.length;length=length&&isLength(length)&&(isArray(object)||isArguments(object))&&length||0;var Ctor=object.constructor,index=-1,isProto=typeof Ctor=="function"&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;while(++index<length){result[index]=index+""}for(var key in object){if(!(skipIndexes&&isIndex(key,length))&&!(key=="constructor"&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key)}}return result}module.exports=keysIn},{"../internal/isIndex":271,"../internal/isLength":274,"../lang/isArguments":282,"../lang/isArray":283,"../lang/isObject":287}],296:[function(require,module,exports){var keys=require("./keys"),toObject=require("../internal/toObject");function pairs(object){object=toObject(object);var index=-1,props=keys(object),length=props.length,result=Array(length);while(++index<length){var key=props[index];result[index]=[key,object[key]]}return result}module.exports=pairs},{"../internal/toObject":279,"./keys":294}],297:[function(require,module,exports){var baseValues=require("../internal/baseValues"),keys=require("./keys");function values(object){return baseValues(object,keys(object))}module.exports=values},{"../internal/baseValues":249,"./keys":294}],298:[function(require,module,exports){function identity(value){return value}module.exports=identity},{}],299:[function(require,module,exports){var baseProperty=require("../internal/baseProperty"),basePropertyDeep=require("../internal/basePropertyDeep"),isKey=require("../internal/isKey");function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}module.exports=property},{"../internal/baseProperty":244,"../internal/basePropertyDeep":245,"../internal/isKey":273}],300:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":301}],301:[function(require,module,exports){"use strict";var numberIsNan=require("number-is-nan");module.exports=Number.isFinite||function(val){return!(typeof val!=="number"||numberIsNan(val)||val===Infinity||val===-Infinity)}},{"number-is-nan":302}],302:[function(require,module,exports){"use strict";module.exports=Number.isNaN||function(x){return x!==x}},{}],303:[function(require,module,exports){(function(global){(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.babylon=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){"use strict";var _interopRequireDefault=_dereq_(25)["default"];exports.__esModule=true;exports.parse=parse;var _parser=_dereq_(5);var _parser2=_interopRequireDefault(_parser);_dereq_(10);_dereq_(9);_dereq_(7);_dereq_(4);_dereq_(8);_dereq_(6);_dereq_(3);var _tokenizerTypes=_dereq_(17);_dereq_(15);_dereq_(14);var _pluginsFlow=_dereq_(11);var _pluginsFlow2=_interopRequireDefault(_pluginsFlow);var _pluginsJsx=_dereq_(12);var _pluginsJsx2=_interopRequireDefault(_pluginsJsx);_parser.plugins.flow=_pluginsFlow2["default"];_parser.plugins.jsx=_pluginsJsx2["default"];function parse(input,options){return new _parser2["default"](options,input).parse()}exports.tokTypes=_tokenizerTypes.types},{10:10,11:11,12:12,14:14,15:15,17:17,25:25,3:3,4:4,5:5,6:6,7:7,8:8,9:9}],2:[function(_dereq_,module,exports){"use strict";exports.__esModule=true;exports.getOptions=getOptions;var defaultOptions={sourceType:"script",sourceFilename:undefined,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowSuperOutsideMethod:false,plugins:[],strictMode:null};exports.defaultOptions=defaultOptions;function getOptions(opts){var options={};for(var key in defaultOptions){options[key]=opts&&key in opts?opts[key]:defaultOptions[key]}return options}},{}],3:[function(_dereq_,module,exports){"use strict";var _interopRequireDefault=_dereq_(25)["default"];var _index=_dereq_(5);var _index2=_interopRequireDefault(_index);function last(stack){return stack[stack.length-1]}var pp=_index2["default"].prototype;pp.addComment=function(comment){this.state.trailingComments.push(comment);this.state.leadingComments.push(comment)};pp.processComment=function(node){if(node.type==="Program"&&node.body.length>0)return;var stack=this.state.commentStack;var lastChild=undefined,trailingComments=undefined,i=undefined;if(this.state.trailingComments.length>0){if(this.state.trailingComments[0].start>=node.end){trailingComments=this.state.trailingComments;this.state.trailingComments=[]}else{this.state.trailingComments.length=0}}else{var lastInStack=last(stack);if(stack.length>0&&lastInStack.trailingComments&&lastInStack.trailingComments[0].start>=node.end){trailingComments=lastInStack.trailingComments;lastInStack.trailingComments=null}}while(stack.length>0&&last(stack).start>=node.start){lastChild=stack.pop()}if(lastChild){if(lastChild.leadingComments){if(lastChild!==node&&last(lastChild.leadingComments).end<=node.start){node.leadingComments=lastChild.leadingComments;lastChild.leadingComments=null}else{for(i=lastChild.leadingComments.length-2;i>=0;--i){if(lastChild.leadingComments[i].end<=node.start){node.leadingComments=lastChild.leadingComments.splice(0,i+1);break}}}}}else if(this.state.leadingComments.length>0){if(last(this.state.leadingComments).end<=node.start){node.leadingComments=this.state.leadingComments;this.state.leadingComments=[]}else{for(i=0;i<this.state.leadingComments.length;i++){if(this.state.leadingComments[i].end>node.start){break}}node.leadingComments=this.state.leadingComments.slice(0,i);if(node.leadingComments.length===0){node.leadingComments=null}trailingComments=this.state.leadingComments.slice(i);if(trailingComments.length===0){trailingComments=null}}}if(trailingComments){if(trailingComments.length&&trailingComments[0].start>=node.start&&last(trailingComments).end<=node.end){node.innerComments=trailingComments}else{node.trailingComments=trailingComments}}stack.push(node)}},{25:25,5:5}],4:[function(_dereq_,module,exports){"use strict";var _Object$create=_dereq_(21)["default"];var _interopRequireDefault=_dereq_(25)["default"];var _tokenizerTypes=_dereq_(17);var _index=_dereq_(5);var _index2=_interopRequireDefault(_index);var _utilIdentifier=_dereq_(18);var pp=_index2["default"].prototype;pp.checkPropClash=function(prop,propHash){if(prop.computed)return;var key=prop.key;var name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"StringLiteral":case"NumericLiteral":name=String(key.value);break;default:return}if(name==="__proto__"&&prop.kind==="init"){if(propHash.proto)this.raise(key.start,"Redefinition of __proto__ property");propHash.proto=true}};pp.parseExpression=function(noIn,refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.match(_tokenizerTypes.types.comma)){var node=this.startNodeAt(startPos,startLoc);node.expressions=[expr];while(this.eat(_tokenizerTypes.types.comma)){node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos))}this.toReferencedList(node.expressions);return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.match(_tokenizerTypes.types._yield)&&this.state.inGenerator){return this.parseYield()}var failOnShorthandAssign=undefined;if(refShorthandDefaultPos){failOnShorthandAssign=false}else{refShorthandDefaultPos={start:0};failOnShorthandAssign=true}var startPos=this.state.start;var startLoc=this.state.startLoc;if(this.match(_tokenizerTypes.types.parenL)||this.match(_tokenizerTypes.types.name)){this.state.potentialArrowAt=this.state.start}var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,startPos,startLoc);if(this.state.type.isAssign){var node=this.startNodeAt(startPos,startLoc);node.operator=this.state.value;node.left=this.match(_tokenizerTypes.types.eq)?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.extra&&left.extra.parenthesized){var errorMsg=undefined;if(left.type==="ObjectPattern"){errorMsg="`({a}) = 0` use `({a} = 0)`"}else if(left.type==="ArrayPattern"){errorMsg="`([a]) = 0` use `([a] = 0)`"}if(errorMsg){this.raise(left.start,"You're trying to assign to a parenthesized expression, eg. instead of "+errorMsg)}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(_tokenizerTypes.types.question)){var node=this.startNodeAt(startPos,startLoc);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(_tokenizerTypes.types.colon);node.alternate=this.parseMaybeAssign(noIn);return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start){return expr}else{return this.parseExprOp(expr,startPos,startLoc,-1,noIn)}};pp.parseExprOp=function(left,leftStartPos,leftStartLoc,minPrec,noIn){var prec=this.state.type.binop;if(prec!=null&&(!noIn||!this.match(_tokenizerTypes.types._in))){if(prec>minPrec){var node=this.startNodeAt(leftStartPos,leftStartLoc);node.left=left;node.operator=this.state.value;if(node.operator==="**"&&left.type==="UnaryExpression"&&left.extra&&!left.extra.parenthesizedArgument){this.raise(left.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.")}var op=this.state.type;this.next();var startPos=this.state.start;var startLoc=this.state.startLoc;node.right=this.parseExprOp(this.parseMaybeUnary(),startPos,startLoc,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===_tokenizerTypes.types.logicalOR||op===_tokenizerTypes.types.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStartPos,leftStartLoc,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.state.type.prefix){var node=this.startNode();var update=this.match(_tokenizerTypes.types.incDec);node.operator=this.state.value;node.prefix=true;this.next();var argType=this.state.type;this.addExtra(node,"parenthesizedArgument",argType===_tokenizerTypes.types.parenL);node.argument=this.parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}if(update){this.checkLVal(node.argument)}else if(this.state.strict&&node.operator==="delete"&&node.argument.type==="Identifier"){this.raise(node.start,"Deleting local variable in strict mode")}return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.state.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(startPos,startLoc);node.operator=this.state.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var potentialArrowAt=this.state.potentialArrowAt;var expr=this.parseExprAtom(refShorthandDefaultPos);if(expr.type==="ArrowFunctionExpression"&&expr.start===potentialArrowAt){return expr}if(refShorthandDefaultPos&&refShorthandDefaultPos.start){return expr}return this.parseSubscripts(expr,startPos,startLoc)};pp.parseSubscripts=function(base,startPos,startLoc,noCalls){for(;;){if(!noCalls&&this.eat(_tokenizerTypes.types.doubleColon)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.callee=this.parseNoCallExpr();return this.parseSubscripts(this.finishNode(node,"BindExpression"),startPos,startLoc,noCalls)}else if(this.eat(_tokenizerTypes.types.dot)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.property=this.parseIdentifier(true);node.computed=false;base=this.finishNode(node,"MemberExpression")}else if(this.eat(_tokenizerTypes.types.bracketL)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(_tokenizerTypes.types.bracketR);base=this.finishNode(node,"MemberExpression")}else if(!noCalls&&this.match(_tokenizerTypes.types.parenL)){var possibleAsync=this.state.potentialArrowAt===base.start&&base.type==="Identifier"&&base.name==="async"&&!this.canInsertSemicolon();this.next();var node=this.startNodeAt(startPos,startLoc);node.callee=base;node.arguments=this.parseCallExpressionArguments(_tokenizerTypes.types.parenR,this.hasPlugin("trailingFunctionCommas"),possibleAsync);base=this.finishNode(node,"CallExpression");if(possibleAsync&&this.shouldParseAsyncArrow()){return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos,startLoc),node)}else{this.toReferencedList(node.arguments)}}else if(this.match(_tokenizerTypes.types.backQuote)){var node=this.startNodeAt(startPos,startLoc);node.tag=base;node.quasi=this.parseTemplate();base=this.finishNode(node,"TaggedTemplateExpression")}else{return base}}};pp.parseCallExpressionArguments=function(close,allowTrailingComma,possibleAsyncArrow){var innerParenStart=undefined;var elts=[],first=true;while(!this.eat(close)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma);if(allowTrailingComma&&this.eat(close))break}if(this.match(_tokenizerTypes.types.parenL)&&!innerParenStart){innerParenStart=this.state.start}elts.push(this.parseExprListItem())}if(possibleAsyncArrow&&innerParenStart&&this.shouldParseAsyncArrow()){this.unexpected()}return elts};pp.shouldParseAsyncArrow=function(){return this.match(_tokenizerTypes.types.arrow)};pp.parseAsyncArrowFromCallExpression=function(node,call){if(!this.hasPlugin("asyncFunctions"))this.unexpected();this.expect(_tokenizerTypes.types.arrow);return this.parseArrowExpression(node,call.arguments,true)};pp.parseNoCallExpr=function(){var startPos=this.state.start,startLoc=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),startPos,startLoc,true)};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined,canBeArrow=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case _tokenizerTypes.types._super:if(!this.state.inMethod&&!this.options.allowSuperOutsideMethod){this.raise(this.state.start,"'super' outside of function or class")}node=this.startNode();this.next();if(!this.match(_tokenizerTypes.types.parenL)&&!this.match(_tokenizerTypes.types.bracketL)&&!this.match(_tokenizerTypes.types.dot)){this.unexpected()}if(this.match(_tokenizerTypes.types.parenL)&&this.state.inMethod!=="constructor"&&!this.options.allowSuperOutsideMethod){this.raise(node.start,"super() outside of class constructor")}return this.finishNode(node,"Super");case _tokenizerTypes.types._this:node=this.startNode();this.next();return this.finishNode(node,"ThisExpression");case _tokenizerTypes.types._yield:if(this.state.inGenerator)this.unexpected();case _tokenizerTypes.types.name:node=this.startNode();var allowAwait=this.hasPlugin("asyncFunctions")&&this.state.value==="await"&&this.state.inAsync;var allowYield=this.shouldAllowYieldIdentifier();var id=this.parseIdentifier(allowAwait||allowYield);if(this.hasPlugin("asyncFunctions")){if(id.name==="await"){if(this.state.inAsync||this.inModule){return this.parseAwait(node)}}else if(id.name==="async"&&this.match(_tokenizerTypes.types._function)&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}else if(canBeArrow&&id.name==="async"&&this.match(_tokenizerTypes.types.name)){var params=[this.parseIdentifier()];this.expect(_tokenizerTypes.types.arrow);return this.parseArrowExpression(node,params,true)}}if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokenizerTypes.types.arrow)){return this.parseArrowExpression(node,[id])}return id;case _tokenizerTypes.types._do:if(this.hasPlugin("doExpressions")){var _node=this.startNode();this.next();var oldInFunction=this.state.inFunction;var oldLabels=this.state.labels;this.state.labels=[];this.state.inFunction=false;_node.body=this.parseBlock(false,true);this.state.inFunction=oldInFunction;this.state.labels=oldLabels;return this.finishNode(_node,"DoExpression")}case _tokenizerTypes.types.regexp:var value=this.state.value;node=this.parseLiteral(value.value,"RegExpLiteral");node.pattern=value.pattern;node.flags=value.flags;return node;case _tokenizerTypes.types.num:return this.parseLiteral(this.state.value,"NumericLiteral");case _tokenizerTypes.types.string:return this.parseLiteral(this.state.value,"StringLiteral");case _tokenizerTypes.types._null:node=this.startNode();this.next();return this.finishNode(node,"NullLiteral");case _tokenizerTypes.types._true:case _tokenizerTypes.types._false:node=this.startNode();node.value=this.match(_tokenizerTypes.types._true);this.next();return this.finishNode(node,"BooleanLiteral");case _tokenizerTypes.types.parenL:return this.parseParenAndDistinguishExpression(null,null,canBeArrow);case _tokenizerTypes.types.bracketL:node=this.startNode();this.next();node.elements=this.parseExprList(_tokenizerTypes.types.bracketR,true,true,refShorthandDefaultPos);this.toReferencedList(node.elements);return this.finishNode(node,"ArrayExpression");case _tokenizerTypes.types.braceL:return this.parseObj(false,refShorthandDefaultPos);case _tokenizerTypes.types._function:return this.parseFunctionExpression();case _tokenizerTypes.types.at:this.parseDecorators();case _tokenizerTypes.types._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case _tokenizerTypes.types._new:return this.parseNew();case _tokenizerTypes.types.backQuote:return this.parseTemplate();case _tokenizerTypes.types.doubleColon:node=this.startNode();this.next();node.object=null;var callee=node.callee=this.parseNoCallExpr();if(callee.type==="MemberExpression"){return this.finishNode(node,"BindExpression")}else{this.raise(callee.start,"Binding should be performed on object property.")}default:this.unexpected(); | |
}};pp.parseFunctionExpression=function(){var node=this.startNode();var meta=this.parseIdentifier(true);if(this.state.inGenerator&&this.eat(_tokenizerTypes.types.dot)&&this.hasPlugin("functionSent")){return this.parseMetaProperty(node,meta,"sent")}else{return this.parseFunction(node,false)}};pp.parseMetaProperty=function(node,meta,propertyName){node.meta=meta;node.property=this.parseIdentifier(true);if(node.property.name!==propertyName){this.raise(node.property.start,"The only valid meta property for new is "+meta.name+"."+propertyName)}return this.finishNode(node,"MetaProperty")};pp.parseLiteral=function(value,type){var node=this.startNode();this.addExtra(node,"rawValue",value);this.addExtra(node,"raw",this.input.slice(this.state.start,this.state.end));node.value=value;this.next();return this.finishNode(node,type)};pp.parseParenExpression=function(){this.expect(_tokenizerTypes.types.parenL);var val=this.parseExpression();this.expect(_tokenizerTypes.types.parenR);return val};pp.parseParenAndDistinguishExpression=function(startPos,startLoc,canBeArrow,isAsync,allowOptionalCommaStart){startPos=startPos||this.state.start;startLoc=startLoc||this.state.startLoc;var val=undefined;this.next();var innerStartPos=this.state.start,innerStartLoc=this.state.startLoc;var exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,optionalCommaStart=undefined;while(!this.match(_tokenizerTypes.types.parenR)){if(first){first=false}else{this.expect(_tokenizerTypes.types.comma);if(this.match(_tokenizerTypes.types.parenR)&&this.hasPlugin("trailingFunctionCommas")){optionalCommaStart=this.state.start;break}}if(this.match(_tokenizerTypes.types.ellipsis)){var spreadNodeStartPos=this.state.start,spreadNodeStartLoc=this.state.startLoc;spreadStart=this.state.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStartLoc,spreadNodeStartPos));break}else{exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEndPos=this.state.start;var innerEndLoc=this.state.startLoc;this.expect(_tokenizerTypes.types.parenR);if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokenizerTypes.types.arrow)){for(var _i=0;_i<exprList.length;_i++){var param=exprList[_i];if(param.extra&¶m.extra.parenthesized)this.unexpected(param.extra.parenStart)}return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.state.lastTokStart)}}if(optionalCommaStart&&!allowOptionalCommaStart)this.unexpected(optionalCommaStart);if(spreadSt |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment