diff --git a/demo.html b/demo.html index 93869ed..4810099 100644 --- a/demo.html +++ b/demo.html @@ -1,75 +1,69 @@ - - - - - - - Pluggable Editor Demo - - - - - - -
-
This is a demo for the Orion Code Edit widget. This demo consumes the build version of the widget.
-
Keep editing in this demo and try:
-
1.content assist. E.g., put cursor after "foo." at the last line and press CTRL+space.
-
2.probem validations. E.g., modify something and you will see new validation markers coming up, if any
-
3.hover service. Hover on any error markers or inside the eidtor.
-
4.syntax highlighting
-
5.Quick fix. Hover on a problem inside the eidtor, not on the ruler, e.g., (char, from) in this demo. Click on the quick fix and see.
-
6.Find declaration. Select a variable and press f3.
-
7.new tooling features coming while Orion is being improved...
-
-
- Loading language tooling plugins... -
- -
-
- + + + + + + + Pluggable Editor Demo + + + + + + + +
+
This is a demo for the Orion Code Edit widget. This demo consumes the build version of the widget.
+
Keep editing in this demo and try:
+
1.content assist. E.g., put cursor after "foo." at the last line and press CTRL+space.
+
2.probem validations. E.g., modify something and you will see new validation markers coming up, if any
+
3.hover service. Hover on any error markers or inside the eidtor.
+
4.syntax highlighting
+
5.Quick fix. Hover on a problem inside the eidtor, not on the ruler, e.g., (char, from) in this demo. Click on the quick fix and see.
+
6.Find declaration. Select a variable and press f3.
+
7.new tooling features coming while Orion is being improved...
+
+
+ Loading language tooling plugins... +
+
+
+ \ No newline at end of file diff --git a/editorBuild/built-codeEdit.zip b/editorBuild/built-codeEdit.zip deleted file mode 100644 index 9946878..0000000 Binary files a/editorBuild/built-codeEdit.zip and /dev/null differ diff --git a/editorBuild/code_edit/built-codeEdit.css b/editorBuild/code_edit/built-codeEdit.css index 32bf492..84218cd 100644 --- a/editorBuild/code_edit/built-codeEdit.css +++ b/editorBuild/code_edit/built-codeEdit.css @@ -1,3 +1,4 @@ +@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,600); .textview { background-color: white; font-family: "Consolas", "Monaco", "Vera Mono", monospace; @@ -130,7 +131,7 @@ .textviewTooltip p { word-wrap: break-word; } -.textviewTooltip em { +.textviewTooltip multi_anno { font-style: normal; font-weight: bold; } @@ -149,6 +150,9 @@ padding-left: 3px; vertical-align: middle; } +.textviewTooltip .hoverTooltipTitle { + font-weight: normal; +} .textviewTooltip .commandButton { border: 1px solid #325C80; background-color: inherit; @@ -164,6 +168,7 @@ .textViewTooltipOnHover { overflow: auto; } + .textViewFind { background-color: #ddd; position: absolute; @@ -215,6 +220,7 @@ } .contentassist { font-size:12px; + font-family: "Open+Sans", "Consolas", "Monaco", "Vera Mono", monospace; display: none; background-color: white; position: fixed; @@ -238,6 +244,7 @@ } .contentassist .proposal-emphasis { font-weight: normal; + position: relative; } .contentassist hr{ border: 0; @@ -282,6 +289,31 @@ visibility: visible; z-index: 1000; } +.contentassist .proposalTag { + display: inline-block; + line-height: 11px; + height: 10px; + border-radius: 2px; + background: #325C80; + padding: 2px; + margin-right: 3px; + text-align: center; + color: white; +} +.contentassist .iconTagGreen { + display: inline-block; + font-size: 10px; + font-weight: bold; + line-height: 13px; + height: 12px; + width: 12px; + border-radius: 50%; + background: green; + padding: 1px; + margin-right: 3px; + text-align: center; + color: white; +} .contentassist>div { padding: 1px 3px 1px 5px; } @@ -401,6 +433,7 @@ .cm-bracket { color: white; background-color: gray; } .cm-tag { color: #3f7f7f; } .cm-attribute { color: #7f007f; } + .annotation { } .annotation.error, @@ -687,6 +720,7 @@ .annotationLine.currentLine { background-color: #EAF2FE; } + .headerLayout { height: 60px; } @@ -1027,7 +1061,7 @@ left: 33%; height: 100%; z-index: 51; - width: 1px; + width: 3px; cursor: e-resize; visibility: hidden; } @@ -1036,7 +1070,7 @@ top: 33%; width: 100%; z-index: 51; - height: 1px; + height: 3px; cursor: n-resize; visibility: hidden; } @@ -1833,7 +1867,7 @@ a.breadcrumb.currentLocation { .commandInactiveItem { } .split { - background: #263238; + background: #37474F; } .splitTracking { background: #37474F; @@ -1943,7 +1977,6 @@ a.breadcrumb.currentLocation { width: 12px; } .dropdownMenuItem .dropdownKeyBinding { - color: grey !important; flex-grow: 0; -webkit-flex-grow: 0; font-size: 11px; @@ -2158,3 +2191,16 @@ a.breadcrumb.currentLocation { outline: none; vertical-align: top; } +.proposal-belongsTo{ + position: absolute; + display: block; + top: 0px; + right: 5px; + background-color: #ffffff; + font-size: 11px; + color: #909090; +} + +.proposal-emphasis.selected .proposal-belongsTo{ + display: none; +} \ No newline at end of file diff --git a/editorBuild/code_edit/built-codeEdit.js b/editorBuild/code_edit/built-codeEdit.js index fc844b5..3af58a3 100644 --- a/editorBuild/code_edit/built-codeEdit.js +++ b/editorBuild/code_edit/built-codeEdit.js @@ -1,5 +1,12 @@ - (function (root, factory) { if (typeof define === 'function' && define.amd) { define([], factory); } else { root.orion = root.orion || {}; - root.orion.codeEdit = factory(); } }(this, function () { /** +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define([], factory); + } else { + root.orion = root.orion || {}; + root.orion.codeEdit = factory(); + } +}(this, function () { +/** * almond 0.2.4 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/almond for details @@ -810,7 +817,6 @@ define("almond", function(){}); return Deferred; })); - /******************************************************************************* * @license * Copyright (c) 2013 IBM Corporation and others. @@ -1033,7 +1039,6 @@ define("almond", function(){}); global.TextDecoder = global.TextDecoder || TextDecoder; global.TextEncoder = global.TextEncoder || TextEncoder; }((typeof global === "undefined") ? this || self : global)); - define("orion/encoding-shim", function(){}); /******************************************************************************* @@ -1675,7 +1680,6 @@ define("orion/encoding-shim", function(){}); } self.URL = URL; }()); - define("orion/URL-shim", function(){}); /******************************************************************************* @@ -1785,7 +1789,6 @@ define('embeddedEditor/helper/embeddedFileImpl',["orion/Deferred", "orion/encodi return EmbeddedFileImpl; }); - /******************************************************************************* * @license * Copyright (c) 2012 IBM Corporation and others. @@ -1885,7 +1888,6 @@ define('orion/EventTarget',[],function() { return EventTarget; }); - /******************************************************************************* * @license * Copyright (c) 2011, 2013 IBM Corporation and others. @@ -2290,7 +2292,6 @@ define('orion/serviceregistry',["orion/Deferred", "orion/EventTarget"], function ServiceRegistry: ServiceRegistry }; }); - /******************************************************************************* * @license * Copyright (c) 2012 IBM Corporation and others. @@ -2364,7 +2365,6 @@ define('orion/util',[],function() { platformDelimiter: platformDelimiter }; }); - /******************************************************************************* * @license * Copyright (c) 2012 IBM Corporation and others. @@ -2865,7 +2865,7 @@ define('orion/splash',[ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ - +/* eslint-disable missing-nls */ /*eslint-env browser, amd*/ /*global URL*/ define('orion/pluginregistry',["orion/Deferred", "orion/EventTarget", 'orion/splash', "orion/URL-shim"], function(Deferred, EventTarget, splash) { @@ -3193,8 +3193,7 @@ define('orion/pluginregistry',["orion/Deferred", "orion/EventTarget", 'orion/spl var service = _serviceReferences[message.serviceId]; if (!service) { _throwError(message.id, "service not found"); - } - if (method in service) { + } else if (method in service) { _callMethod(message.id, service, service[method], params); } else { _throwError(message.id, "method not found"); @@ -3203,8 +3202,7 @@ define('orion/pluginregistry',["orion/Deferred", "orion/EventTarget", 'orion/spl var object = _objectReferences[message.objectId]; if (!object) { _throwError(message.id, "object not found"); - } - if (method in object) { + } else if (method in object) { _callMethod(message.id, object, object[method], params); } else { _throwError(message.id, "method not found"); @@ -4320,7 +4318,6 @@ define('orion/pluginregistry',["orion/Deferred", "orion/EventTarget", 'orion/spl PluginRegistry: PluginRegistry }; }); - /******************************************************************************* * @license * Copyright (c) 2011, 2012 IBM Corporation and others. @@ -4408,7 +4405,7 @@ define('embeddedEditor/helper/bootstrap',[ plugins[pluginURL.href] = {autostart: "lazy"}; }); - pluginsToLoad = (options && options.userPlugins) ? options.defaultPlugins : []; + pluginsToLoad = (options && options.userPlugins) ? options.userPlugins : []; pluginsToLoad.forEach(function(pluginURLString){ plugins[pluginURLString] = {autostart: "lazy"}; }); @@ -6468,7 +6465,7 @@ define('orion/webui/dropdown',['orion/webui/littlelib', 'orion/EventTarget'], fu java, location, Components, FileUtils */ define('text',['module'], function (module) { - + 'use strict'; var text, fs, Cc, Ci, xpcIsWindows, progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], @@ -7197,7 +7194,6 @@ define('orion/webui/tooltip',['orion/webui/littlelib'], function(lib) { //return the module exports return {Tooltip: Tooltip}; }); - /******************************************************************************* * @license * Copyright (c) 2014 IBM Corporation and others. @@ -7326,7 +7322,7 @@ define('orion/commands',[ var invocation = binding.invocation; if (invocation) { var command = binding.command; - if (command.hrefCallback) { + if (typeof(command.hrefCallback) === 'function') { var href = command.hrefCallback.call(invocation.handler || window, invocation); if (href.then){ href.then(function(l){ @@ -7519,7 +7515,7 @@ define('orion/commands',[ } }; - if (command.hrefCallback) { + if (typeof(command.hrefCallback) === 'function') { element = clickTarget = document.createElement("a"); //$NON-NLS-0$ element.id = id; if (useImage && command.hasImage()) { @@ -7659,7 +7655,7 @@ define('orion/commands',[ function createCommandMenuItem(parent, command, commandInvocation, keyBinding, callback, keyBindingString) { var element, li; var dropdown = parent.dropdown; - if (command.hrefCallback) { + if (typeof(command.hrefCallback) === 'function') { li = Dropdown.createMenuItem(command.name, "a"); //$NON-NLS-0$ element = li.firstElementChild; var href = command.hrefCallback.call(commandInvocation.handler, commandInvocation); @@ -8134,7 +8130,6 @@ define('orion/PageUtil',[],function(){ validateURLScheme: validateURLScheme }; }); - /** * @license RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. @@ -8172,7 +8167,7 @@ define('orion/PageUtil',[],function(){ * for the nls/fr-fr/colors bundle to be that mixed in locale. */ (function () { - + 'use strict'; //regexp for reconstructing the master bundle name from parts of the regexp match //nlsRegExp.exec("foo/bar/baz/nls/en-ca/foo") gives: @@ -8362,13 +8357,14 @@ define('orion/nls/root/messages',{//Default message bundle "Sites": "Sites", "Shell": "Shell", "ShellLinkWorkspace": "Shell", - "Get Plugins": "Get Plugins", + "Get Plugins": "Get Plug-ins", "Global": "Global", "Editor": "Editor", "EditorRelatedLink": "Show Current Folder", "EditorRelatedLinkParent": "Show Enclosing Folder", "EditorLinkWorkspace": "Edit", "EditorRelatedLinkProj": "Show Project", + "navigationBar": "Navigation Bar", "Filter bindings": "Filter bindings", "orionClientLabel": "Orion client repository", "Orion Editor": "Orion Editor", @@ -8383,7 +8379,7 @@ define('orion/nls/root/messages',{//Default message bundle "HideShowBannerFooter": "Hide or show the page banner", "Toggle banner and footer": "Toggle banner", "ChooseFileOpenEditor": "Choose a file by name and open an editor on it", - "FindFile": "Find File Named...", + "FindFile": "Open File...", "System Configuration Details": "System Configuration Details", "System Config Tooltip": "Go to the System Configuration Details page", "Background Operations": "Background Operations", @@ -8425,8 +8421,8 @@ define('orion/nls/root/messages',{//Default message bundle "Toggle Sidebar" : "Toggle Sidebar", "Sample HTML5 Site": "Sample HTML5 Site", "Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.": "Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.", - "Sample Orion Plugin": "Sample Orion Plugin", - "Generate a sample plugin for integrating with Orion.": "Generate a sample plugin for integrating with Orion.", + "Sample Orion Plugin": "Sample Orion Plug-in", + "Generate a sample plugin for integrating with Orion.": "Generate a sample plug-in for integrating with Orion.", "Browser": "Web Browser", "OutlineProgress": "Getting outline for ${0} from ${1}", "outlineTimeout": "Outline service timed out. Try reloading the page and opening the outline again.", @@ -8541,7 +8537,6 @@ define('orion/i18nUtil',[], function() { formatMessage: formatMessage }; }); - /******************************************************************************* * @license * Copyright (c) 2009, 2012 IBM Corporation and others. @@ -10392,7 +10387,8 @@ define('orion/edit/nls/root/messages',{//Default message bundle "switchEditor": "Switch Editor", //$NON-NLS-1$ //$NON-NLS-0$ "Fetching": "Fetching: ${0}", //$NON-NLS-1$ //$NON-NLS-0$ "confirmUnsavedChanges": "There are unsaved changes. Do you still want to navigate away?", //$NON-NLS-1$ //$NON-NLS-0$ - "searchFiles": "Quick Search...", //$NON-NLS-1$ //$NON-NLS-0$ + "searchFilesCommand": "Quick Search...", //$NON-NLS-1$ //$NON-NLS-0$ + "searchFiles": "Quick Search in ${0}", //$NON-NLS-1$ //$NON-NLS-0$ "searchTerm": "Enter search term:", //$NON-NLS-1$ //$NON-NLS-0$ "unsavedChanges": "There are unsaved changes.", //$NON-NLS-1$ //$NON-NLS-0$ "unsavedAutoSaveChanges": "Please stay on the page until Auto Save is complete.", //$NON-NLS-1$ //$NON-NLS-0$ @@ -10410,11 +10406,14 @@ define('orion/edit/nls/root/messages',{//Default message bundle "readonly": "Read Only.", //$NON-NLS-1$ //$NON-NLS-0$ "saveFile": "Save this file", //$NON-NLS-1$ //$NON-NLS-0$ "toggleZoomRuler": "Toggle Zoom Ruler", //$NON-NLS-1$ //$NON-NLS-0$ - "gotoLine": "Go to line...", //$NON-NLS-1$ //$NON-NLS-0$ + "gotoLine": "Go To Line...", //$NON-NLS-1$ //$NON-NLS-0$ "gotoLineTooltip": "Go to specified line number", //$NON-NLS-1$ //$NON-NLS-0$ "gotoLinePrompt": "Go to line:", //$NON-NLS-1$ //$NON-NLS-0$ "Undo": "Undo", //$NON-NLS-1$ //$NON-NLS-0$ "Redo": "Redo", //$NON-NLS-1$ //$NON-NLS-0$ + "Cut": "Cut", //$NON-NLS-1$ //$NON-NLS-0$ + "Copy": "Copy", //$NON-NLS-1$ //$NON-NLS-0$ + "Paste": "Paste", //$NON-NLS-1$ //$NON-NLS-0$ "Find": "Find...", //$NON-NLS-1$ //$NON-NLS-0$ "noResponse": "No response from server. Check your internet connection and try again.", //$NON-NLS-1$ //$NON-NLS-0$ "savingFile": "Saving file ${0}", //$NON-NLS-1$ //$NON-NLS-0$ @@ -10451,7 +10450,7 @@ define('orion/edit/nls/root/messages',{//Default message bundle "Deploy As": "Deploy As", //$NON-NLS-1$ //$NON-NLS-0$ "Import": "Import", //$NON-NLS-1$ //$NON-NLS-0$ "Export": "Export", //$NON-NLS-1$ //$NON-NLS-0$ - "OpenWith": "Open with", //$NON-NLS-1$ //$NON-NLS-0$ + "OpenWith": "Open With", //$NON-NLS-1$ //$NON-NLS-0$ "OpenRelated": "Open related", //$NON-NLS-1$ //$NON-NLS-0$ "Dependency": "Dependency", //$NON-NLS-1$ //$NON-NLS-0$ "UnnamedCommand": "Unnamed", //$NON-NLS-1$ //$NON-NLS-0$ @@ -10471,7 +10470,6 @@ define('orion/edit/nls/root/messages',{//Default message bundle "emptyDeploymentInfoMessage": "Use the Launch Configurations dropdown to deploy this project" //$NON-NLS-1$ //$NON-NLS-0$ }); - /******************************************************************************* * @license * Copyright (c) 2014 IBM Corporation and others. All rights reserved. This @@ -10490,7 +10488,6 @@ define('orion/explorers/navigatorRenderer',[], function() { } }; }); - /******************************************************************************* * @license * Copyright (c) 2013 IBM Corporation and others. @@ -10562,7 +10559,6 @@ define('orion/objects',[], function() { } }; }); - /******************************************************************************* * @license * Copyright (c) 2010, 2013 IBM Corporation and others. @@ -10593,23 +10589,23 @@ define('orion/inputManager',[ //TODO: remove listeners if there are no clients //TODO: add support for multiple clients with different timeouts var events = ["mousedown", "keypress","keydown","keyup"]; //$NON-NLS-0$ //$NON-NLS-1$ //$NON-NLS-2$ - var reset = function (e) { this._resetTimer(); }.bind(this); + var reset = function () { this._resetTimer(); }.bind(this); for (var i = 0; i < events.length; i++) { - var event = events[i]; - this._document.addEventListener(event, reset, true); + var evt = events[i]; + this._document.addEventListener(evt, reset, true); } EventTarget.attach(this); } Idle.prototype = { _resetTimer: function() { - var window = this._document.defaultView || this._document.parentWindow; + var win = this._document.defaultView || this._document.parentWindow; if (this._timer) { - window.clearTimeout(this._timer); + win.clearTimeout(this._timer); this._timer = null; } if (this._timeout !== -1) { - this._timer = window.setTimeout(function() { + this._timer = win.setTimeout(function() { this.onIdle({type:"Idle"}); //$NON-NLS-0$ this._timer = null; this._resetTimer(); @@ -10700,9 +10696,9 @@ define('orion/inputManager',[ * Wrapper for fileClient.read() that tolerates a filesystem root URL passed as location. If location is indeed * a filesystem root URL, the original read() operation is instead performed on the workspace. */ - _read: function(location /**, readArgs*/) { + _read: function(loc /**, readArgs*/) { var cachedMetadata = this.cachedMetadata || mNavigatorRenderer.getClickedItem(); - if (cachedMetadata && cachedMetadata.Location === location && + if (cachedMetadata && cachedMetadata.Location === loc && cachedMetadata.Parents && cachedMetadata.Attributes && cachedMetadata.ETag ) { @@ -10710,13 +10706,13 @@ define('orion/inputManager',[ } var fileClient = this.fileClient; var readArgs = Array.prototype.slice.call(arguments, 1); - return this._maybeLoadWorkspace(location).then(function(newLocation) { + return this._maybeLoadWorkspace(loc).then(function(newLocation) { return fileClient.read.apply(fileClient, [newLocation].concat(readArgs)); }); }, - _isSameParent: function(location) { + _isSameParent: function(loc) { if (this._lastMetadata && this._lastMetadata.Parents && this._lastMetadata.Parents.length > 0) { - var parentLocation = location.substring(0, location.lastIndexOf("/", location.length - (location[location.length - 1] === "/" ? 2 : 1)) + 1); + var parentLocation = loc.substring(0, loc.lastIndexOf("/", loc.length - (loc[loc.length - 1] === "/" ? 2 : 1)) + 1); return this._lastMetadata.Parents[0].Location === parentLocation; } return false; @@ -10736,7 +10732,7 @@ define('orion/inputManager',[ //Reload if out of sync, unless we are already in the process of saving if (!this._fileMetadata._saving && !this._fileMetadata.Directory && !this.getReadOnly()) { progress(fileClient.read(resource, true), messages.ReadingMetadata, fileURI).then(function(data) { - if (this._fileMetadata && this._fileMetadata.Location === data.Location && this._fileMetadata.ETag !== data.ETag) { + if (this._fileMetadata && !this._fileMetadata._saving && this._fileMetadata.Location === data.Location && this._fileMetadata.ETag !== data.ETag) { this._fileMetadata = objects.mixin(this._fileMetadata, data); if (!editor.isDirty() || window.confirm(messages.loadOutOfSync)) { progress(fileClient.read(resource), messages.Reading, fileURI).then(function(contents) { @@ -10752,14 +10748,14 @@ define('orion/inputManager',[ progressTimeout = null; this.reportStatus(i18nUtil.formatMessage(messages.Fetching, fileURI)); }.bind(this), 800); - var clearTimeout = function() { + var clearProgressTimeout = function() { this.reportStatus(""); if (progressTimeout) { window.clearTimeout(progressTimeout); } }.bind(this); var errorHandler = function(error) { - clearTimeout(); + clearProgressTimeout(); var statusService = null; if(this.serviceRegistry) { statusService = this.serviceRegistry.getService("orion.page.message"); //$NON-NLS-0$ @@ -10783,7 +10779,7 @@ define('orion/inputManager',[ } else if (metadata.Directory) { // Fetch children Deferred.when(metadata.Children || progress(fileClient.fetchChildren(metadata.ChildrenLocation), messages.Reading, fileURI), function(contents) { - clearTimeout(); + clearProgressTimeout(); metadata.Children = contents; this._setInputContents(this._parsedLocation, fileURI, contents, metadata); }.bind(this), errorHandler); @@ -10792,7 +10788,7 @@ define('orion/inputManager',[ if (this._isText(metadata)) { // Read text contents progress(fileClient.read(resource, false, true), messages.Reading, fileURI).then(function(contents) { - clearTimeout(); + clearProgressTimeout(); if (typeof contents !== "string") { //$NON-NLS-0$ this._acceptPatch = contents.acceptPatch; contents = contents.result; @@ -10801,7 +10797,7 @@ define('orion/inputManager',[ }.bind(this), errorHandler); } else { progress(fileClient._getService(resource).readBlob(resource), messages.Reading, fileURI).then(function(contents) { - clearTimeout(); + clearProgressTimeout(); this._setInputContents(this._parsedLocation, fileURI, contents, metadata); }.bind(this), errorHandler); } @@ -10847,7 +10843,7 @@ define('orion/inputManager',[ getContentType: function() { return this._contentType; }, - onFocus: function(e) { + onFocus: function() { // If there was an error while auto saving, auto save is temporarily disabled and // we retry saving every time the editor gets focus if (this._autoSaveEnabled && this._errorSaving) { @@ -10869,7 +10865,7 @@ define('orion/inputManager',[ var metadata = this.getFileMetadata(); if (!metadata) return new Deferred().reject(); if (metadata._saving) { return metadata._savingDeferred; } - var self = this; + var that = this; metadata._savingDeferred = new Deferred(); metadata._saving = true; function done(result) { @@ -10898,11 +10894,11 @@ define('orion/inputManager',[ if (this._getSaveDiffsEnabled() && !this._errorSaving) { var changes = this._getUnsavedChanges(); if (changes) { - var length = 0; + var len = 0; for (var i = 0; i < changes.length; i++) { - length += changes[i].text.length; + len += changes[i].text.length; } - if (contents.length > length) { + if (contents.length > len) { data = { diff: changes }; @@ -10925,24 +10921,24 @@ define('orion/inputManager',[ def = progress.progress(def, i18nUtil.formatMessage(messages.savingFile, input)); } function successHandler(result) { - if (input === self.getInput()) { + if (input === that.getInput()) { metadata.ETag = result.ETag; editor.setInput(input, null, contents, true); } - self.reportStatus(""); + that.reportStatus(""); if (failedSaving && statusService) { statusService.setProgressResult({Message:messages.Saved, Severity:"Normal"}); //$NON-NLS-0$ } - if (self.postSave) { - self.postSave(closing); + if (that.postSave) { + that.postSave(closing); } return done(result); } function errorHandler(error) { - self.reportStatus(""); + that.reportStatus(""); var errorMsg = handleError(statusService, error); - mMetrics.logEvent("status", "exception", (self._autoSaveActive ? "Auto-save: " : "Save: ") + errorMsg.Message); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ - self._errorSaving = true; + mMetrics.logEvent("status", "exception", (that._autoSaveActive ? "Auto-save: " : "Save: ") + errorMsg.Message); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ + that._errorSaving = true; return done(); } def.then(successHandler, function(error) { @@ -10952,11 +10948,11 @@ define('orion/inputManager',[ var forceSave = window.confirm(messages.saveOutOfSync); if (forceSave) { // repeat save operation, but without ETag - var def = self.fileClient.write(resource, contents); + var redef = that.fileClient.write(resource, contents); if (progress) { - def = progress.progress(def, i18nUtil.formatMessage(messages.savingFile, input)); + redef = progress.progress(redef, i18nUtil.formatMessage(messages.savingFile, input)); } - def.then(successHandler, errorHandler); + redef.then(successHandler, errorHandler); } else { return done(); } @@ -10999,19 +10995,19 @@ define('orion/inputManager',[ setContentType: function(contentType) { this._contentType = contentType; }, - setInput: function(location) { + setInput: function(loc) { if (this._ignoreInput) { return; } - if (!location) { - location = PageUtil.hash(); + if (!loc) { + loc = PageUtil.hash(); } - if (typeof location !== "string") { //$NON-NLS-0$ + if (typeof loc !== "string") { //$NON-NLS-0$ return; } var editor = this.getEditor(); - if (location && location[0] !== "#") { //$NON-NLS-0$ - location = "#" + location; //$NON-NLS-0$ + if (loc && loc[0] !== "#") { //$NON-NLS-0$ + loc = "#" + loc; //$NON-NLS-0$ } - var input = PageUtil.matchResourceParameters(location), oldInput = this._parsedLocation || {}; + var input = PageUtil.matchResourceParameters(loc), oldInput = this._parsedLocation || {}; if (editor && editor.isDirty()) { var oldLocation = this._location; var oldResource = oldInput.resource; @@ -11026,11 +11022,11 @@ define('orion/inputManager',[ } } var editorChanged = editor && oldInput.editor !== input.editor; - this._location = location; + this._location = loc; this._parsedLocation = input; this._ignoreInput = true; if(this.selection) { - this.selection.setSelections(location); + this.selection.setSelections(loc); } this._ignoreInput = false; var evt = { @@ -11038,8 +11034,14 @@ define('orion/inputManager',[ input: input }; this.dispatchEvent(evt); + function saveSession() { + if (evt.session) { + evt.session.save(); + } + } var fileURI = input.resource; if (evt.metadata) { + saveSession(); this.reportStatus(""); this._input = fileURI; var metadata = evt.metadata; @@ -11048,13 +11050,22 @@ define('orion/inputManager',[ } if (fileURI) { if (fileURI === this._input) { + if (!this._parametersProcessed) { + saveSession(); + } if (editorChanged) { this.reportStatus(""); this._setInputContents(input, fileURI, null, this._fileMetadata, this._isText(this._fileMetadata)); } else { - this.processParameters(input); + this._parametersProcessed = this.processParameters(input); + if (!this._parametersProcessed) { + if (evt.session) { + evt.session.apply(true); + } + } } } else { + saveSession(); this._input = fileURI; this._readonly = false; this._lastMetadata = this._fileMetadata; @@ -11062,6 +11073,7 @@ define('orion/inputManager',[ this.load(); } } else { + saveSession(); this._setNoInput(true); } }, @@ -11090,18 +11102,18 @@ define('orion/inputManager',[ if (contentType) { label = contentType.id; } else if (metadata) { - var name = metadata.Name; - var index = name.lastIndexOf("."); //$NON-NLS-0$ + var _name = metadata.Name; + var index = _name.lastIndexOf("."); //$NON-NLS-0$ if (index >= 0) { - label = "unregistered: " + name.substring(index); //$NON-NLS-0$ + label = "unregistered: " + _name.substring(index); //$NON-NLS-0$ } else { - switch (name) { + switch (_name) { case "AUTHORS": //$NON-NLS-0$ case "config": //$NON-NLS-0$ case "LICENSE": //$NON-NLS-0$ case "make": //$NON-NLS-0$ case "Makefile": { //$NON-NLS-0$ - label = "unregistered: " + name; //$NON-NLS-0$ + label = "unregistered: " + _name; //$NON-NLS-0$ break; } } @@ -11133,19 +11145,19 @@ define('orion/inputManager',[ this.dispatchEvent({ type: "InputChanged", input: null }); //$NON-NLS-0$ }, _setInputContents: function(input, title, contents, metadata, noSetInput) { - var name, isDir = false; + var _name, isDir = false; if (metadata) { this._fileMetadata = metadata; this.setTitle(metadata.Location || String(metadata)); this.setContentType(this.contentTypeRegistry.getFileContentType(metadata)); - name = metadata.Name; + _name = metadata.Name; isDir = metadata.Directory; } else { // No metadata this._fileMetadata = null; this.setTitle(title); this.setContentType(this.contentTypeRegistry.getFilenameContentType(this.getTitle())); - name = this.getTitle(); + _name = this.getTitle(); } var editor = this.getEditor(); if (this._focusListener) { @@ -11157,7 +11169,7 @@ define('orion/inputManager',[ var evt = { type: "InputChanged", //$NON-NLS-0$ input: input, - name: name, + name: _name, title: title, contentType: this.getContentType(), metadata: metadata, @@ -11176,7 +11188,8 @@ define('orion/inputManager',[ textView.addEventListener("Focus", this._focusListener = this.onFocus.bind(this)); //$NON-NLS-0$ } this._clearUnsavedChanges(); - if (!this.processParameters(input)) { + this._parametersProcessed = this.processParameters(input); + if (!this._parametersProcessed) { if (evt.session) { evt.session.apply(); } @@ -11371,7 +11384,7 @@ define('orion/navigate/nls/root/messages',{//Default message bundle "createAProjectFromAn": "Create a project from an SFTP site.", 'readMeCommandName': 'Readme File', //$NON-NLS-0$ //$NON-NLS-1$ 'readMeCommandTooltip': 'Create a README.md file in this project', //$NON-NLS-0$ //$NON-NLS-1$ - 'zipArchiveCommandName': 'Zip archive', //$NON-NLS-0$ //$NON-NLS-1$ + 'zipArchiveCommandName': 'Zip Archive', //$NON-NLS-0$ //$NON-NLS-1$ 'zipArchiveCommandTooltip': 'Create a project from a local zip archive.', //$NON-NLS-0$ //$NON-NLS-1$ 'Url:': 'Url:', //$NON-NLS-0$ //$NON-NLS-1$ 'notZip' : 'The following files are not zip files: ${0}. Would you like to continue the import?', //$NON-NLS-0$ //$NON-NLS-1$ @@ -11547,7 +11560,8 @@ define('orion/fileClient',['i18n!orion/navigate/nls/messages', "orion/Deferred", Name: _references[j].getProperty("Name") || _references[j].getProperty("NameKey") //$NON-NLS-0$ }; - var patternStringArray = _references[j].getProperty("pattern") || _references[j].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); //$NON-NLS-1$ //$NON-NLS-0$ + var filetop = _references[j].getProperty("top"); + var patternStringArray = _references[j].getProperty("pattern") || (filetop ? filetop.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1") : ""); //$NON-NLS-1$ //$NON-NLS-0$ if (!Array.isArray(patternStringArray)) { patternStringArray = [patternStringArray]; } @@ -12120,7 +12134,6 @@ define('orion/contentTypes',[], function() { getFilenameContentType: getFilenameContentType }; }); - /******************************************************************************* * @license * Copyright (c) 2010, 2012 IBM Corporation and others. @@ -12840,7 +12853,6 @@ define("orion/editor/keyModes", [ //$NON-NLS-0$ DefaultKeyMode: DefaultKeyMode }; }); - /******************************************************************************* * @license * Copyright (c) 2013,2014 IBM Corporation and others. @@ -13209,7 +13221,6 @@ define("orion/editor/util", [], function() { //$NON-NLS-0$ Animation: Animation }; }); - /******************************************************************************* * @license * Copyright (c) 2010, 2015 IBM Corporation and others. @@ -13225,23 +13236,23 @@ define("orion/editor/util", [], function() { //$NON-NLS-0$ ******************************************************************************/ /*eslint-env browser, amd*/ -define("orion/editor/textView", [ //$NON-NLS-0$ - 'i18n!orion/editor/nls/messages', //$NON-NLS-0$ - 'orion/editor/textModel', //$NON-NLS-0$ - 'orion/editor/keyModes', //$NON-NLS-0$ - 'orion/editor/eventTarget', //$NON-NLS-0$ - 'orion/editor/textTheme', //$NON-NLS-0$ - 'orion/editor/util', //$NON-NLS-0$ - 'orion/util', //$NON-NLS-0$ - 'orion/metrics' //$NON-NLS-0$ +define("orion/editor/textView", [ //$NON-NLS-1$ + 'i18n!orion/editor/nls/messages', //$NON-NLS-1$ + 'orion/editor/textModel', //$NON-NLS-1$ + 'orion/editor/keyModes', //$NON-NLS-1$ + 'orion/editor/eventTarget', //$NON-NLS-1$ + 'orion/editor/textTheme', //$NON-NLS-1$ + 'orion/editor/util', //$NON-NLS-1$ + 'orion/util', //$NON-NLS-1$ + 'orion/metrics' //$NON-NLS-1$ ], function(messages, mTextModel, mKeyModes, mEventTarget, mTextTheme, textUtil, util, mMetrics) { /** @private */ - function getWindow(document) { - return document.defaultView || document.parentWindow; + function getWindow(doc) { + return doc.defaultView || doc.parentWindow; } - function newArray(length) { - return new Array(length); + function newArray(len) { + return new Array(len); } var addHandler = textUtil.addEventListener; var removeHandler = textUtil.removeEventListener; @@ -13334,10 +13345,10 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } /** @private */ function convertDelimiter(text, addTextFunc, addDelimiterFunc) { - var cr = 0, lf = 0, index = 0, length = text.length; - while (index < length) { - if (cr !== -1 && cr <= index) { cr = text.indexOf("\r", index); } //$NON-NLS-0$ - if (lf !== -1 && lf <= index) { lf = text.indexOf("\n", index); } //$NON-NLS-0$ + var cr = 0, lf = 0, index = 0, len = text.length; + while (index < len) { + if (cr !== -1 && cr <= index) { cr = text.indexOf("\r", index); } //$NON-NLS-1$ + if (lf !== -1 && lf <= index) { lf = text.indexOf("\n", index); } //$NON-NLS-1$ var start = index, end; if (lf === -1 && cr === -1) { addTextFunc(text.substring(index)); @@ -13362,52 +13373,52 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (addDelimiterFunc) { addDelimiterFunc(); } else { - if (index === length) addTextFunc(""); + if (index === len) addTextFunc(""); } } } /** @private */ function getBorder(node) { - var left,top,right,bottom; - var window = getWindow(node.ownerDocument); - if (window.getComputedStyle) { - var style = window.getComputedStyle(node, null); - left = style.getPropertyValue("border-left-width"); //$NON-NLS-0$ - top = style.getPropertyValue("border-top-width"); //$NON-NLS-0$ - right = style.getPropertyValue("border-right-width"); //$NON-NLS-0$ - bottom = style.getPropertyValue("border-bottom-width"); //$NON-NLS-0$ + var left,_top,right,bottom; + var win = getWindow(node.ownerDocument); + if (win.getComputedStyle) { + var style = win.getComputedStyle(node, null); + left = style.getPropertyValue("border-left-width"); //$NON-NLS-1$ + _top = style.getPropertyValue("border-top-width"); //$NON-NLS-1$ + right = style.getPropertyValue("border-right-width"); //$NON-NLS-1$ + bottom = style.getPropertyValue("border-bottom-width"); //$NON-NLS-1$ } else if (node.currentStyle) { left = node.currentStyle.borderLeftWidth; - top = node.currentStyle.borderTopWidth; + _top = node.currentStyle.borderTopWidth; right = node.currentStyle.borderRightWidth; bottom = node.currentStyle.borderBottomWidth; } return { left: parseInt(left, 10) || 0, - top: parseInt(top, 10) || 0, + top: parseInt(_top, 10) || 0, right: parseInt(right, 10) || 0, bottom: parseInt(bottom, 10) || 0 }; } /** @private */ function getPadding(node) { - var left,top,right,bottom; - var window = getWindow(node.ownerDocument); - if (window.getComputedStyle) { - var style = window.getComputedStyle(node, null); - left = style.getPropertyValue("padding-left"); //$NON-NLS-0$ - top = style.getPropertyValue("padding-top"); //$NON-NLS-0$ - right = style.getPropertyValue("padding-right"); //$NON-NLS-0$ - bottom = style.getPropertyValue("padding-bottom"); //$NON-NLS-0$ + var left,_top,right,bottom; + var win = getWindow(node.ownerDocument); + if (win.getComputedStyle) { + var style = win.getComputedStyle(node, null); + left = style.getPropertyValue("padding-left"); //$NON-NLS-1$ + _top = style.getPropertyValue("padding-top"); //$NON-NLS-1$ + right = style.getPropertyValue("padding-right"); //$NON-NLS-1$ + bottom = style.getPropertyValue("padding-bottom"); //$NON-NLS-1$ } else if (node.currentStyle) { left = node.currentStyle.paddingLeft; - top = node.currentStyle.paddingTop; + _top = node.currentStyle.paddingTop; right = node.currentStyle.paddingRight; bottom = node.currentStyle.paddingBottom; } return { left: parseInt(left, 10) || 0, - top: parseInt(top, 10) || 0, + top: parseInt(_top, 10) || 0, right: parseInt(right, 10) || 0, bottom: parseInt(bottom, 10) || 0 }; @@ -13427,46 +13438,46 @@ define("orion/editor/textView", [ //$NON-NLS-0$ return trim; } /** @private */ - function DOMReady(document, parent, className, callback) { - className = "_" + className + "DOMReady"; //$NON-NLS-1$ //$NON-NLS-0$ - parent.className = parent.className ? parent.className + " " + className : className; //$NON-NLS-0$ - parent.__DOMReady = callback; - var id = className + "Style"; //$NON-NLS-0$ - if (document.getElementById(id)) { return; } - var animationName = className + "Animation"; //$NON-NLS-0$ - function insertListener(event) { - if (event.animationName === animationName) { - var target = event.target; - if (typeof target.__DOMReady === "function") { //$NON-NLS-0$ - getWindow(document).setTimeout(function() { + function DOMReady(doc, _parent, className, callback) { + className = "_" + className + "DOMReady"; //$NON-NLS-1$ //$NON-NLS-1$ + _parent.className = _parent.className ? _parent.className + " " + className : className; //$NON-NLS-1$ + _parent.__DOMReady = callback; + var id = className + "Style"; //$NON-NLS-1$ + if (doc.getElementById(id)) { return; } + var animationName = className + "Animation"; //$NON-NLS-1$ + function insertListener(evt) { + if (evt.animationName === animationName) { + var target = evt.target; + if (typeof target.__DOMReady === "function") { //$NON-NLS-1$ + getWindow(doc).setTimeout(function() { target.__DOMReady(); }, 0); } } } function template(className, animationName) { - var props = ["", "-webkit-", "-moz-", "-ms-", "-o-"]; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ - var frames = "", classRule = "body ." + className + " {\n"; //$NON-NLS-1$ //$NON-NLS-0$ + var props = ["", "-webkit-", "-moz-", "-ms-", "-o-"]; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-4$ + var _frames = "", classRule = "body ." + className + " {\n"; //$NON-NLS-1$ //$NON-NLS-2$ for (var i=0; i 1) { var sel2Div = this._divs[1]; - sel2Div.style.left = (left - hd) + "px"; //$NON-NLS-0$ - sel2Div.style.top = (sel1Bottom - vd) + "px"; //$NON-NLS-0$ - sel2Div.style.width = Math.max(0, right - left) + "px"; //$NON-NLS-0$ - sel2Div.style.height = Math.max(0, sel3Top - sel1Bottom) + "px"; //$NON-NLS-0$ + sel2Div.style.left = (left - hd) + "px"; //$NON-NLS-1$ + sel2Div.style.top = (sel1Bottom - vd) + "px"; //$NON-NLS-1$ + sel2Div.style.width = Math.max(0, right - left) + "px"; //$NON-NLS-1$ + sel2Div.style.height = Math.max(0, sel3Top - sel1Bottom) + "px"; //$NON-NLS-1$ } } } @@ -13858,7 +13869,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ TextRect.prototype = /** @lends orion.editor.TextRect.prototype */ { /** @private */ toString: function() { - return "{l=" + this.left + ", t=" + this.top + ", r=" + this.right + ", b=" + this.bottom + "}"; //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ + return "{l=" + this.left + ", t=" + this.top + ", r=" + this.right + ", b=" + this.bottom + "}"; //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ } }; /** @@ -13888,26 +13899,26 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } TextLine.prototype = /** @lends orion.editor.TextLine.prototype */ { /** @private */ - create: function(parent, div) { + create: function(_parent, div) { if (this._lineDiv) { return; } - var child = this._lineDiv = this._createLine(parent, div, this.lineIndex); + var child = this._lineDiv = this._createLine(_parent, div, this.lineIndex); child._line = this; return child; }, - _createLine: function(parent, div, lineIndex) { + _createLine: function(_parent, div, lineIndex) { var view = this.view; var model = view._model; var lineText = model.getLine(lineIndex); var lineStart = model.getLineStart(lineIndex); - var e = {type:"LineStyle", textView: view, lineIndex: lineIndex, lineText: lineText, lineStart: lineStart}; //$NON-NLS-0$ + var e = {type:"LineStyle", textView: view, lineIndex: lineIndex, lineText: lineText, lineStart: lineStart}; //$NON-NLS-1$ view.onLineStyle(e); - var document = parent.ownerDocument; - var lineDiv = div || util.createElement(document, "div"); //$NON-NLS-0$ + var doc = _parent.ownerDocument; + var lineDiv = div || util.createElement(doc, "div"); //$NON-NLS-1$ if (!div || !compare(div.viewStyle, e.style)) { applyStyle(e.style, lineDiv, div); if (div) { div._trim = null; } lineDiv.viewStyle = e.style; - lineDiv.setAttribute("role", "presentation"); //$NON-NLS-1$ //$NON-NLS-0$ + lineDiv.setAttribute("role", "presentation"); //$NON-NLS-1$ //$NON-NLS-2$ } lineDiv.lineIndex = lineIndex; @@ -13929,17 +13940,17 @@ define("orion/editor/textView", [ //$NON-NLS-0$ * selection at the end of the line when the line is fully selected. * 3. The height of a div with only an empty span is zero. */ - var c = " "; //$NON-NLS-0$ + var c = " "; //$NON-NLS-1$ if (!view._fullSelection && util.isIE < 9) { /* * IE8 already selects extra space at end of a line fully selected, * adding another space at the end of the line causes the selection * to look too big. The fix is to use a zero-width space (\uFEFF) instead. */ - c = "\uFEFF"; //$NON-NLS-0$ + c = "\uFEFF"; //$NON-NLS-1$ } var range = {text: c, style: view._metrics.largestFontStyle, ignoreChars: 1}; - if (ranges.length === 0 || !ranges[ranges.length - 1].style || ranges[ranges.length - 1].style.tagName !== "div") { //$NON-NLS-0$ + if (ranges.length === 0 || !ranges[ranges.length - 1].style || ranges[ranges.length - 1].style.tagName !== "div") { //$NON-NLS-1$ ranges.push(range); } else { ranges.splice(ranges.length - 1, 0, range); @@ -13951,7 +13962,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ lineDiv.innerHTML = ""; div.lineWidth = undefined; } - var frag = document.createDocumentFragment(); + var frag = doc.createDocumentFragment(); for (i = 0; i < ranges.length; i++) { range = ranges[i]; text = range.text; @@ -13996,9 +14007,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ spanEnd -= changeCount; } var t = oldSpan.firstChild.data; - var length = t ? t.length : 0; - if (oldEnd + length > spanEnd) { break; } - oldEnd += length; + var len = t ? t.length : 0; + if (oldEnd + len > spanEnd) { break; } + oldEnd += len; } next = oldSpan.nextSibling; lineDiv.removeChild(oldSpan); @@ -14026,7 +14037,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } if (!lineDiv.parentNode) { - parent.appendChild(lineDiv); + _parent.appendChild(lineDiv); } return lineDiv; }, @@ -14065,7 +14076,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (start > end) { return; } var tabSize = this.view._customTabSize, range; if (tabSize && tabSize !== 8) { - var tabIndex = text.indexOf("\t", start); //$NON-NLS-0$ + var tabIndex = text.indexOf("\t", start); //$NON-NLS-1$ while (tabIndex !== -1 && tabIndex < end) { if (start < tabIndex) { range = {text: text.substring(start, tabIndex), style: style}; @@ -14075,9 +14086,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var spacesCount = tabSize - (data.tabOffset % tabSize); if (spacesCount > 0) { //TODO hack to preserve tabs in getDOMText() - var spaces = "\u00A0"; //$NON-NLS-0$ + var spaces = "\u00A0"; //$NON-NLS-1$ for (var i = 1; i < spacesCount; i++) { - spaces += " "; //$NON-NLS-0$ + spaces += " "; //$NON-NLS-1$ } range = {text: spaces, style: style, ignoreChars: spacesCount - 1}; data.ranges.push(range); @@ -14087,7 +14098,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (start === end) { return; } - tabIndex = text.indexOf("\t", start); //$NON-NLS-0$ + tabIndex = text.indexOf("\t", start); //$NON-NLS-1$ } } if (start <= end) { @@ -14096,20 +14107,20 @@ define("orion/editor/textView", [ //$NON-NLS-0$ data.tabOffset += range.text.length; } }, - _createSpan: function(parent, text, style, ignoreChars) { + _createSpan: function(_parent, text, style, ignoreChars) { var view = this.view; - var tagName = "span"; //$NON-NLS-0$ + var tagName = "span"; //$NON-NLS-1$ if (style && style.tagName) { tagName = style.tagName.toLowerCase(); } - var isLink = tagName === "a"; //$NON-NLS-0$ + var isLink = tagName === "a"; //$NON-NLS-1$ if (isLink) { this.hasLink = true; } if (isLink && !view._linksVisible) { - tagName = "span"; //$NON-NLS-0$ + tagName = "span"; //$NON-NLS-1$ } - var document = parent.ownerDocument; - var child = util.createElement(parent.ownerDocument, tagName); - child.appendChild(document.createTextNode(style && style.text ? style.text : text)); + var doc = _parent.ownerDocument; + var child = util.createElement(_parent.ownerDocument, tagName); + child.appendChild(doc.createTextNode(style && style.text ? style.text : text)); if (style && style.html) { child.innerHTML = style.html; child.ignore = true; @@ -14118,9 +14129,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ child.ignore = true; } applyStyle(style, child); - if (tagName === "a") { //$NON-NLS-0$ - var window = view._getWindow(); - addHandler(child, "click", function(e) { return view._handleLinkClick(e ? e : window.event); }, false); //$NON-NLS-0$ + if (tagName === "a") { //$NON-NLS-1$ + var win = view._getWindow(); + addHandler(child, "click", function(e) { return view._handleLinkClick(e ? e : win.event); }, false); //$NON-NLS-1$ } child.viewStyle = style; if (ignoreChars) { @@ -14140,7 +14151,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ return this._getLineBoundingClientRect(child, true); } var model = view._model; - var document = child.ownerDocument; + var doc = child.ownerDocument; var lineIndex = this.lineIndex; var result = null; if (offset < model.getLineEnd(lineIndex)) { @@ -14154,12 +14165,12 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (textNode.length === 1) { result = new TextRect(lineChild.getBoundingClientRect()); } else if (view._isRangeRects) { - range = document.createRange(); + range = doc.createRange(); range.setStart(textNode, index); range.setEnd(textNode, index + 1); result = new TextRect(range.getBoundingClientRect()); } else if (util.isIE) { - range = document.body.createTextRange(); + range = doc.body.createTextRange(); range.moveToElementText(lineChild); range.collapse(); /* @@ -14169,8 +14180,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ */ var fixIE8 = index === 0 && util.isIE === 8; if (fixIE8) { index = 1; } - range.moveEnd("character", index + 1); //$NON-NLS-0$ - range.moveStart("character", index); //$NON-NLS-0$ + range.moveEnd("character", index + 1); //$NON-NLS-1$ + range.moveStart("character", index); //$NON-NLS-1$ result = new TextRect(range.getBoundingClientRect()); if (fixIE8) { result.left = lineChild.getClientRects()[0].left; @@ -14178,11 +14189,11 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } else { var text = textNode.data; lineChild.removeChild(textNode); - lineChild.appendChild(document.createTextNode(text.substring(0, index))); - var span = util.createElement(document, "span"); //$NON-NLS-0$ - span.appendChild(document.createTextNode(text.substring(index, index + 1))); + lineChild.appendChild(doc.createTextNode(text.substring(0, index))); + var span = util.createElement(doc, "span"); //$NON-NLS-1$ + span.appendChild(doc.createTextNode(text.substring(index, index + 1))); lineChild.appendChild(span); - lineChild.appendChild(document.createTextNode(text.substring(index + 1))); + lineChild.appendChild(doc.createTextNode(text.substring(index + 1))); result = new TextRect(span.getBoundingClientRect()); lineChild.innerHTML = ""; lineChild.appendChild(textNode); @@ -14199,9 +14210,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } if (util.isIE < 11) { - var window = getWindow(child.ownerDocument); - var xFactor = window.screen.logicalXDPI / window.screen.deviceXDPI; - var yFactor = window.screen.logicalYDPI / window.screen.deviceYDPI; + var win = getWindow(child.ownerDocument); + var xFactor = win.screen.logicalXDPI / win.screen.deviceXDPI; + var yFactor = win.screen.logicalYDPI / win.screen.deviceYDPI; result.left = result.left * xFactor; result.right = result.right * xFactor; result.top = result.top * yFactor; @@ -14356,11 +14367,11 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _nodeLength: function(lineChild) { if (!lineChild || lineChild.ignore) return 0; - var length = lineChild.firstChild.length; + var len = lineChild.firstChild.length; if (lineChild.ignoreChars) { - length -= lineChild.ignoreChars; + len -= lineChild.ignoreChars; } - return length; + return len; }, getModelOffset: function(node, offset) { if (!node) { return 0; } @@ -14413,10 +14424,10 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (data) { for (var i = data.length - 1; i >= 0; i--) { var ch = data.substring(i, i + 1); - if (ignored < lineChild.ignoreChars && (ch === " " || ch === "\uFEFF")) { //$NON-NLS-1$ //$NON-NLS-0$ + if (ignored < lineChild.ignoreChars && (ch === " " || ch === "\uFEFF")) { //$NON-NLS-1$ //$NON-NLS-1$ ignored++; } else { - childText.push(ch === "\u00A0" ? "\t" : ch); //$NON-NLS-1$ //$NON-NLS-0$ + childText.push(ch === "\u00A0" ? "\t" : ch); //$NON-NLS-1$ //$NON-NLS-1$ } } } @@ -14457,19 +14468,19 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var child = this._ensureCreated(); var lineRect = this.getBoundingClientRect(); - var self = this; + var that = this; function hitChild(lineChild, offset, rect) { var textNode = lineChild.firstChild; - var nodeLength = self._nodeLength(lineChild); - var document = child.ownerDocument; - var window = getWindow(document); - var xFactor = util.isIE < 11 ? window.screen.logicalXDPI / window.screen.deviceXDPI : 1; - var yFactor = util.isIE < 11 ? window.screen.logicalYDPI / window.screen.deviceYDPI : 1; + var nodeLength = that._nodeLength(lineChild); + var doc = child.ownerDocument; + var win = getWindow(doc); + var xFactor = util.isIE < 11 ? win.screen.logicalXDPI / win.screen.deviceXDPI : 1; + var yFactor = util.isIE < 11 ? win.screen.logicalYDPI / win.screen.deviceYDPI : 1; var rangeLeft, rangeTop, rangeRight, rangeBottom; var range, start, end; var rl = rect.left + lineRect.left, fixIE8, rects1; if (util.isIE || view._isRangeRects) { - range = view._isRangeRects ? document.createRange() : document.body.createTextRange(); + range = view._isRangeRects ? doc.createRange() : doc.body.createTextRange(); var high = nodeLength; var low = -1; while ((high - low) > 1) { @@ -14488,8 +14499,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } else { if (fixIE8) { start = 1; } range.moveToElementText(lineChild); - range.move("character", start); //$NON-NLS-0$ - range.moveEnd("character", end - start); //$NON-NLS-0$ + range.move("character", start); //$NON-NLS-1$ + range.moveEnd("character", end - start); //$NON-NLS-1$ } rects1 = range.getClientRects(); var found = false; @@ -14518,8 +14529,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ range.setEnd(textNode, end); } else { range.moveToElementText(lineChild); - range.move("character", start); //$NON-NLS-0$ - range.moveEnd("character", end - start); //$NON-NLS-0$ + range.move("character", start); //$NON-NLS-1$ + range.moveEnd("character", end - start); //$NON-NLS-1$ } rects1 = range.getClientRects(); var trailing = false; @@ -14555,13 +14566,13 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } else { var newText = []; for (var q = 0; q < nodeLength; q++) { - newText.push(""); //$NON-NLS-0$ + newText.push(""); //$NON-NLS-1$ if (q === nodeLength - 1) { newText.push(textNode.data.substring(q)); } else { newText.push(textNode.data.substring(q, q + 1)); } - newText.push(""); //$NON-NLS-0$ + newText.push(""); //$NON-NLS-1$ } lineChild.innerHTML = newText.join(""); var rangeChild = lineChild.firstChild; @@ -14579,7 +14590,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ offset++; rangeChild = rangeChild.nextSibling; } - if (!self._createdDiv) { + if (!that._createdDiv) { lineChild.innerHTML = ""; lineChild.appendChild(textNode); /* @@ -14617,7 +14628,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ function hitRects(child) { if (child.ignore) return null; - var rects1 = self._getClientRects(child, lineRect); + var rects1 = that._getClientRects(child, lineRect); for (var j = 0; j < rects1.length; j++) { var rect1 = rects1[j]; if (rect1.left <= x && x < rect1.right && (!view._wrapMode || (rect1.top <= y && y <= rect1.bottom))) { @@ -14639,7 +14650,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ while (previousChild || nextChild) { if (previousChild) { previousOffset -= this._nodeLength(previousChild); - if (rect = hitRects(previousChild)) { + if ((rect = hitRects(previousChild))) { lineChild = previousChild; offset = previousOffset; break; @@ -14647,7 +14658,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ previousChild = previousChild.previousSibling; } if (nextChild) { - if (rect = hitRects(nextChild)) { + if ((rect = hitRects(nextChild))) { lineChild = nextChild; offset = nextOffset; break; @@ -14662,7 +14673,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ offset = lineStart; this.forEach(function(c) { lineChild = c; - if (rect = hitRects(lineChild)) { + if ((rect = hitRects(lineChild))) { return false; } offset += this._nodeLength(lineChild); @@ -14682,7 +14693,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, /** @private */ getNextOffset: function (offset, data) { - if (data.unit === "line") { //$NON-NLS-0$ + if (data.unit === "line") { //$NON-NLS-1$ var view = this.view; var model = view._model; var lineIndex = model.getLineAtOffset(offset); @@ -14693,7 +14704,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ data.count++; return model.getLineStart(lineIndex); } - if (data.unit === "wordend" || data.unit === "wordWS" || data.unit === "wordendWS") { //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ + if (data.unit === "wordend" || data.unit === "wordWS" || data.unit === "wordendWS") { //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ return this._getNextOffset_W3C(offset, data); } return util.isIE ? this._getNextOffset_IE(offset, data) : this._getNextOffset_W3C(offset, data); @@ -14716,7 +14727,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var offsetInLine = offset - lineStart; var c; var step = data.count < 0 ? -1 : 1; - if (data.unit === "word" || data.unit === "wordend" || data.unit === "wordWS" || data.unit === "wordendWS") { //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ + if (data.unit === "word" || data.unit === "wordend" || data.unit === "wordWS" || data.unit === "wordendWS") { //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ var previousPunctuation, previousLetterOrDigit, punctuation, letterOrDigit; while (data.count !== 0) { if (data.count > 0) { @@ -14727,9 +14738,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ offsetInLine++; while (offsetInLine < lineLength) { c = lineText.charCodeAt(offsetInLine); - if (data.unit !== "wordWS" && data.unit !== "wordendWS") { //$NON-NLS-1$ //$NON-NLS-0$ + if (data.unit !== "wordWS" && data.unit !== "wordendWS") { //$NON-NLS-1$ //$NON-NLS-1$ punctuation = _isPunctuation(c); - if (data.unit === "wordend") { //$NON-NLS-0$ + if (data.unit === "wordend") { //$NON-NLS-1$ if (!punctuation && previousPunctuation) { break; } } else { if (punctuation && !previousPunctuation) { break; } @@ -14738,7 +14749,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } else { letterOrDigit = !_isWhitespace(c); } - if (data.unit === "wordend" || data.unit === "wordendWS") { //$NON-NLS-1$ //$NON-NLS-0$ + if (data.unit === "wordend" || data.unit === "wordendWS") { //$NON-NLS-1$ //$NON-NLS-1$ if (!letterOrDigit && previousLetterOrDigit) { break; } } else { if (letterOrDigit && !previousLetterOrDigit) { break; } @@ -14755,9 +14766,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ previousLetterOrDigit = !previousPunctuation && !_isWhitespace(c); while (0 < offsetInLine) { c = lineText.charCodeAt(offsetInLine - 1); - if (data.unit !== "wordWS" && data.unit !== "wordendWS") { //$NON-NLS-1$ //$NON-NLS-0$ + if (data.unit !== "wordWS" && data.unit !== "wordendWS") { //$NON-NLS-1$ //$NON-NLS-1$ punctuation = _isPunctuation(c); - if (data.unit === "wordend") { //$NON-NLS-0$ + if (data.unit === "wordend") { //$NON-NLS-1$ if (punctuation && !previousPunctuation) { break; } } else { if (!punctuation && previousPunctuation) { break; } @@ -14766,7 +14777,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } else { letterOrDigit = !_isWhitespace(c); } - if (data.unit === "wordend" || data.unit === "wordendWS") { //$NON-NLS-1$ //$NON-NLS-0$ + if (data.unit === "wordend" || data.unit === "wordendWS") { //$NON-NLS-1$ //$NON-NLS-1$ if (letterOrDigit && !previousLetterOrDigit) { break; } } else { if (!letterOrDigit && previousLetterOrDigit) { break; } @@ -14805,11 +14816,11 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var view = this.view; var model = view._model; var lineIndex = this.lineIndex; - var result = 0, range, length; + var result = 0, range, len; var lineOffset = model.getLineStart(lineIndex); var lineText = model.getLine(lineIndex); var lineStart = model.getLineStart(lineIndex); - var document = child.ownerDocument; + var doc = child.ownerDocument; var lineChild; var step = data.count < 0 ? -1 : 1; if (offset === model.getLineEnd(lineIndex)) { @@ -14820,11 +14831,11 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (!lineChild) { return lineOffset; } - range = document.body.createTextRange(); + range = doc.body.createTextRange(); range.moveToElementText(lineChild); - length = range.text.length; + len = range.text.length; range.moveEnd(data.unit, step); - result = offset + range.text.length - length; + result = offset + range.text.length - len; } else if (offset === lineOffset && data.count < 0) { result = lineOffset; } else { @@ -14832,7 +14843,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ while (lineChild) { var nodeLength = this._nodeLength(lineChild); if (lineOffset + nodeLength > offset) { - range = document.body.createTextRange(); + range = doc.body.createTextRange(); if (offset === lineOffset && data.count < 0) { var temp = lineChild.previousSibling; // skip empty nodes @@ -14846,11 +14857,11 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } else { range.moveToElementText(lineChild); range.collapse(); - range.moveEnd("character", offset - lineOffset); //$NON-NLS-0$ + range.moveEnd("character", offset - lineOffset); //$NON-NLS-1$ } - length = range.text.length; + len = range.text.length; range.moveEnd(data.unit, step); - result = offset + range.text.length - length; + result = offset + range.text.length - len; break; } lineOffset = nodeLength + lineOffset; @@ -14875,11 +14886,11 @@ define("orion/editor/textView", [ //$NON-NLS-0$ updateLinks: function() { var child = this._ensureCreated(); if (!this.hasLink) { return; } - var self = this; + var that = this; this.forEach(function(span) { var style = span.viewStyle; - if (style && style.tagName && style.tagName.toLowerCase() === "a") { //$NON-NLS-0$ - child.replaceChild(self._createSpan(child, span.firstChild.data, style), span); + if (style && style.tagName && style.tagName.toLowerCase() === "a") { //$NON-NLS-1$ + child.replaceChild(that._createSpan(child, span.firstChild.data, style), span); } return true; }); @@ -14998,7 +15009,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ * reset to the appropriate value further down. */ if (util.isWebkit) { - clientDiv.style.width = "0x7fffffffpx"; //$NON-NLS-0$ + clientDiv.style.width = "0x7fffffffpx"; //$NON-NLS-1$ } var lineCount = model.getLineCount(); for (var lineIndex=0; lineIndextrue if the operation succeded. + * @since 10.0 + */ + copy: function() { + if (!this._clientDiv) { return false; } + return this._doCopy(); + }, + /** + * Moves the selected text to the clipboard in plain text format. + * @returns {Boolean} true if the operation succeded. + * @since 10.0 + */ + cut: function() { + if (!this._clientDiv) { return false; } + return this._doCut(); + }, /** * Destroys the text view. *

@@ -15082,7 +15111,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ this._destroyView(); - var e = {type: "Destroy"}; //$NON-NLS-0$ + var e = {type: "Destroy"}; //$NON-NLS-1$ this.onDestroy(e); this._parent = null; @@ -15301,8 +15330,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ */ getClientArea: function() { if (!this._clientDiv) { return {x: 0, y: 0, width: 0, height: 0}; } - var scroll = this._getScroll(); - return {x: scroll.x, y: scroll.y, width: this._getClientWidth(), height: this._getClientHeight()}; + var _scroll = this._getScroll(); + return {x: _scroll.x, y: _scroll.y, width: this._getClientWidth(), height: this._getClientHeight()}; }, /** * Returns the horizontal pixel. @@ -15479,8 +15508,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ options = this._defaultOptions(); } else if (arguments.length === 1) { var arg = arguments[0]; - if (typeof arg === "string") { //$NON-NLS-0$ - return clone(this["_" + arg]); //$NON-NLS-0$ + if (typeof arg === "string") { //$NON-NLS-1$ + return clone(this["_" + arg]); //$NON-NLS-1$ } options = arg; } else { @@ -15493,7 +15522,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } for (var option in options) { if (options.hasOwnProperty(option)) { - options[option] = clone(this["_" + option]); //$NON-NLS-0$ + options[option] = clone(this["_" + option]); //$NON-NLS-1$ } } return options; @@ -15580,11 +15609,11 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, getSelectionText: function(delimiter) { var text = []; - var self = this; + var that = this; var selections = this._getSelections(); selections.forEach(function(selection) { if (!selection.isEmpty()) { - text.push(self._getBaseText(selection.start, selection.end)); + text.push(that._getBaseText(selection.start, selection.end)); } }); return text.join(delimiter !== undefined ? delimiter : this._model.getLineDelimiter()); @@ -15665,7 +15694,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var action = this._actions[actionID]; if (action) { if (action.actionDescription && action.actionDescription.id) { - mMetrics.logEvent("editor", "action", action.actionDescription.id); //$NON-NLS-1$ //$NON-NLS-0$ + mMetrics.logEvent("editor", "action", action.actionDescription.id); //$NON-NLS-1$ //$NON-NLS-2$ } if (!defaultAction && action.handler) { if (action.handler(actionOptions)) { @@ -15673,7 +15702,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } if (action.defaultHandler) { - return typeof action.defaultHandler(actionOptions) === "boolean"; //$NON-NLS-0$ + return typeof action.defaultHandler(actionOptions) === "boolean"; //$NON-NLS-1$ } } return false; @@ -16074,6 +16103,18 @@ define("orion/editor/textView", [ //$NON-NLS-0$ onBlur: function(blurEvent) { return this.dispatchEvent(blurEvent); }, + /** + * Replaces the selection with the text on the clipboard or, if there is no selection, inserts the text at the current caret offset. + *

+ * If the single mode is on and the clipboard text contains more than one line, all lines will be concatenated. + *

+ * @returns {Boolean} true if the operation succeded. + * @since 10.0 + */ + paste: function() { + if (!this._clientDiv) { return false; } + return this._doPaste(); + }, /** * Redraws the entire view, including rulers. * @@ -16135,7 +16176,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (!ruler && this._imeOffset !== -1) { imeLineIndex = this._model.getLineAtOffset(this._imeOffset); } - if (!ruler || ruler.getOverview() === "page") { //$NON-NLS-0$ + if (!ruler || ruler.getOverview() === "page") { //$NON-NLS-1$ var child = div.firstChild; while (child) { var lineIndex = child.lineIndex; @@ -16154,7 +16195,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } } - this.dispatchEvent({type: "Redraw", startLine: startLine, endLine: endLine, ruler: ruler}); //$NON-NLS-0$ + this.dispatchEvent({type: "Redraw", startLine: startLine, endLine: endLine, ruler: ruler}); //$NON-NLS-1$ this._queueUpdate(); }, /** @@ -16339,15 +16380,15 @@ define("orion/editor/textView", [ //$NON-NLS-0$ setModel: function(model) { if (model === this._model) { return; } model = model || new mTextModel.TextModel(); - this._model.removeEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-0$ - this._model.removeEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-0$ + this._model.removeEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-1$ + this._model.removeEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-1$ var oldLineCount = this._model.getLineCount(); var oldCharCount = this._model.getCharCount(); var newLineCount = model.getLineCount(); var newCharCount = model.getCharCount(); var newText = model.getText(); var e = { - type: "ModelChanging", //$NON-NLS-0$ + type: "ModelChanging", //$NON-NLS-1$ text: newText, start: 0, removedCharCount: oldCharCount, @@ -16358,7 +16399,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ this.onModelChanging(e); this._model = model; e = { - type: "ModelChanged", //$NON-NLS-0$ + type: "ModelChanged", //$NON-NLS-1$ start: 0, removedCharCount: oldCharCount, addedCharCount: newCharCount, @@ -16366,8 +16407,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ addedLineCount: newLineCount }; this.onModelChanged(e); - this._model.addEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-0$ - this._model.addEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-0$ + this._model.addEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-1$ + this._model.addEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-1$ this._reset(); this._update(); }, @@ -16382,17 +16423,17 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var defaultOptions = this._defaultOptions(); for (var option in options) { if (options.hasOwnProperty(option)) { - var newValue = options[option], oldValue = this["_" + option]; //$NON-NLS-0$ + var newValue = options[option], oldValue = this["_" + option]; //$NON-NLS-1$ if (compare(oldValue, newValue)) { continue; } var update = defaultOptions[option] ? defaultOptions[option].update : null; if (update) { update.call(this, newValue); continue; } - this["_" + option] = clone(newValue); //$NON-NLS-0$ + this["_" + option] = clone(newValue); //$NON-NLS-1$ } } - this.onOptions({type: "Options", options: options}); //$NON-NLS-0$ + this.onOptions({type: "Options", options: options}); //$NON-NLS-1$ }, /** * @class This object describes the selection show options. @@ -16502,7 +16543,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ * @see orion.editor.TextView#getText */ setText: function (text, start, end, show, callback) { - var isSingle = typeof text === "string"; //$NON-NLS-0$ + var isSingle = typeof text === "string"; //$NON-NLS-1$ var reset = start === undefined && end === undefined && isSingle; var edit; if (isSingle) { @@ -16618,7 +16659,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (topNode === temp) { return; } - if (temp.className && temp.className.indexOf("textViewFind") !== -1) { //$NON-NLS-0$ + if (temp.className && temp.className.indexOf("textViewFind") !== -1) { //$NON-NLS-1$ return; } temp = temp.parentNode; @@ -16631,10 +16672,10 @@ define("orion/editor/textView", [ //$NON-NLS-0$ * during mouse down event using usual API. The workaround is to give * focus back to the client div. */ - var self = this; - var window = this._getWindow(); - window.setTimeout(function() { - self._clientDiv.focus(); + var that = this; + var win = this._getWindow(); + win.setTimeout(function() { + that._clientDiv.focus(); }, 0); } }, @@ -16670,22 +16711,22 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (util.isIE < 9) { if (!this._getSelections()[0].isEmpty()) { var rootDiv = this._rootDiv; - var child = util.createElement(rootDiv.ownerDocument, "div"); //$NON-NLS-0$ + var child = util.createElement(rootDiv.ownerDocument, "div"); //$NON-NLS-1$ rootDiv.appendChild(child); rootDiv.removeChild(child); } } if (this._cursorDiv) { - this._cursorDiv.style.display = "none"; //$NON-NLS-0$ + this._cursorDiv.style.display = "none"; //$NON-NLS-1$ } if (this._domSelection) { this._domSelection.forEach(function(domSelection) { domSelection.update(); }); /* Clear browser selection if selection is within clientDiv */ var temp; - var window = this._getWindow(); - var document = this._parent.ownerDocument; - if (window.getSelection) { - var sel = window.getSelection(); + var win = this._getWindow(); + var doc = this._parent.ownerDocument; + if (win.getSelection) { + var sel = win.getSelection(); temp = sel.anchorNode; while (temp) { if (temp === this._clientDiv) { @@ -16694,12 +16735,12 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } temp = temp.parentNode; } - } else if (document.selection) { + } else if (doc.selection) { this._ignoreSelect = false; - temp = document.selection.createRange().parentElement(); + temp = doc.selection.createRange().parentElement(); while (temp) { if (temp === this._clientDiv) { - document.selection.empty(); + doc.selection.empty(); break; } temp = temp.parentNode; @@ -16708,14 +16749,14 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } if (!this._ignoreFocus) { - this.onBlur({type: "Blur"}); //$NON-NLS-0$ + this.onBlur({type: "Blur"}); //$NON-NLS-1$ } }, _handleCompositionStart: function (e) { if (this._ignoreEvent(e)) { return; } if (this._imeTimeout) { - var window = this._getWindow(); - window.clearTimeout(this._imeTimeout); + var win = this._getWindow(); + win.clearTimeout(this._imeTimeout); this._imeTimeout = null; } if (this._imeText) { @@ -16735,8 +16776,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _handleCompositionEnd: function (e) { if (this._ignoreEvent(e)) { return; } this._imeText = e.data; - var window = this._getWindow(); - this._imeTimeout = window.setTimeout(function() { + var win = this._getWindow(); + this._imeTimeout = win.setTimeout(function() { this._commitIME(this._imeText); this._imeText = this._imeTimeout = null; }.bind(this), 0); @@ -16749,9 +16790,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ // See bug 366312 and 376508. this._updateDOMSelection(); } - var preventDefault = false; - if (this.isListening("ContextMenu")) { //$NON-NLS-0$ - var evt = this._createMouseEvent("ContextMenu", e); //$NON-NLS-0$ + var preventDefault = true; + if (this.isListening("ContextMenu")) { //$NON-NLS-1$ + var evt = this._createMouseEvent("ContextMenu", e); //$NON-NLS-1$ evt.screenX = e.screenX; evt.screenY = e.screenY; this.onContextMenu(evt); @@ -16804,17 +16845,17 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _handleDragStart: function (e) { if (this._ignoreEvent(e)) { return; } if (util.isFirefox < 13) { - var self = this; - var window = this._getWindow(); - window.setTimeout(function() { - self._clientDiv.contentEditable = true; - self._clientDiv.draggable = false; - self._ignoreBlur = false; + var that = this; + var win = this._getWindow(); + win.setTimeout(function() { + that._clientDiv.contentEditable = true; + that._clientDiv.draggable = false; + that._ignoreBlur = false; }, 0); } - if (this.isListening("DragStart") && this._dragOffset !== -1) { //$NON-NLS-0$ + if (this.isListening("DragStart") && this._dragOffset !== -1) { //$NON-NLS-1$ this._isMouseDown = false; - this.onDragStart(this._createMouseEvent("DragStart", e)); //$NON-NLS-0$ + this.onDragStart(this._createMouseEvent("DragStart", e)); //$NON-NLS-1$ this._dragOffset = -1; } else { if (e.preventDefault) { e.preventDefault(); } @@ -16823,16 +16864,16 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _handleDrag: function (e) { if (this._ignoreEvent(e)) { return; } - if (this.isListening("Drag")) { //$NON-NLS-0$ - this.onDrag(this._createMouseEvent("Drag", e)); //$NON-NLS-0$ + if (this.isListening("Drag")) { //$NON-NLS-1$ + this.onDrag(this._createMouseEvent("Drag", e)); //$NON-NLS-1$ } }, _handleDragEnd: function (e) { if (this._ignoreEvent(e)) { return; } this._dropTarget = false; this._dragOffset = -1; - if (this.isListening("DragEnd")) { //$NON-NLS-0$ - this.onDragEnd(this._createMouseEvent("DragEnd", e)); //$NON-NLS-0$ + if (this.isListening("DragEnd")) { //$NON-NLS-1$ + this.onDragEnd(this._createMouseEvent("DragEnd", e)); //$NON-NLS-1$ } if (util.isFirefox < 13) { this._fixCaret(); @@ -16841,7 +16882,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ * selection is dropped onto itself. The fix is to detected the case and * call fixCaret() a second time. */ - if (e.dataTransfer.dropEffect === "none" && !e.dataTransfer.mozUserCancelled) { //$NON-NLS-0$ + if (e.dataTransfer.dropEffect === "none" && !e.dataTransfer.mozUserCancelled) { //$NON-NLS-1$ this._fixCaret(); } } @@ -16850,9 +16891,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (this._ignoreEvent(e)) { return; } var prevent = true; this._dropTarget = true; - if (this.isListening("DragEnter")) { //$NON-NLS-0$ + if (this.isListening("DragEnter")) { //$NON-NLS-1$ prevent = false; - this.onDragEnter(this._createMouseEvent("DragEnter", e)); //$NON-NLS-0$ + this.onDragEnter(this._createMouseEvent("DragEnter", e)); //$NON-NLS-1$ } /* * Webkit will not send drop events if this event is not prevented, as spec in HTML5. @@ -16867,9 +16908,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _handleDragOver: function (e) { if (this._ignoreEvent(e)) { return; } var prevent = true; - if (this.isListening("DragOver")) { //$NON-NLS-0$ + if (this.isListening("DragOver")) { //$NON-NLS-1$ prevent = false; - this.onDragOver(this._createMouseEvent("DragOver", e)); //$NON-NLS-0$ + this.onDragOver(this._createMouseEvent("DragOver", e)); //$NON-NLS-1$ } /* * Webkit will not send drop events if this event is not prevented, as spec in HTML5. @@ -16877,7 +16918,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ * event will result is loss of functionality (insertion mark, etc). */ if (util.isWebkit || prevent) { - if (prevent) { e.dataTransfer.dropEffect = "none"; } //$NON-NLS-0$ + if (prevent) { e.dataTransfer.dropEffect = "none"; } //$NON-NLS-1$ if (e.preventDefault) { e.preventDefault(); } return false; } @@ -16885,15 +16926,15 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _handleDragLeave: function (e) { if (this._ignoreEvent(e)) { return; } this._dropTarget = false; - if (this.isListening("DragLeave")) { //$NON-NLS-0$ - this.onDragLeave(this._createMouseEvent("DragLeave", e)); //$NON-NLS-0$ + if (this.isListening("DragLeave")) { //$NON-NLS-1$ + this.onDragLeave(this._createMouseEvent("DragLeave", e)); //$NON-NLS-1$ } }, _handleDrop: function (e) { if (this._ignoreEvent(e)) { return; } this._dropTarget = false; - if (this.isListening("Drop")) { //$NON-NLS-0$ - this.onDrop(this._createMouseEvent("Drop", e)); //$NON-NLS-0$ + if (this.isListening("Drop")) { //$NON-NLS-1$ + this.onDrop(this._createMouseEvent("Drop", e)); //$NON-NLS-1$ } /* * This event must be prevented otherwise the user agent will modify @@ -16914,21 +16955,21 @@ define("orion/editor/textView", [ //$NON-NLS-0$ this._updateDOMSelection(); } if (this._cursorDiv) { - this._cursorDiv.style.display = "block"; //$NON-NLS-0$ + this._cursorDiv.style.display = "block"; //$NON-NLS-1$ } if (this._domSelection) { this._domSelection.forEach(function(domSelection) { domSelection.update(); }); } if (!this._ignoreFocus) { - this.onFocus({type: "Focus"}); //$NON-NLS-0$ + this.onFocus({type: "Focus"}); //$NON-NLS-1$ } }, _handleKeyDown: function (e) { this._cancelCheckSelection(); if (this._ignoreEvent(e)) { return; } - if (this.isListening("KeyDown")) { //$NON-NLS-0$ - var keyEvent = this._createKeyEvent("KeyDown", e); //$NON-NLS-0$ - this.onKeyDown(keyEvent); //$NON-NLS-0$ + if (this.isListening("KeyDown")) { //$NON-NLS-1$ + var keyEvent = this._createKeyEvent("KeyDown", e); //$NON-NLS-1$ + this.onKeyDown(keyEvent); //$NON-NLS-1$ if (keyEvent.defaultPrevented) { /* * Feature in Firefox. Keypress events still happen even if the keydown event @@ -17056,9 +17097,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } } - if (this.isListening("KeyPress")) { //$NON-NLS-0$ - var keyEvent = this._createKeyEvent("KeyPress", e); //$NON-NLS-0$ - this.onKeyPress(keyEvent); //$NON-NLS-0$ + if (this.isListening("KeyPress")) { //$NON-NLS-1$ + var keyEvent = this._createKeyEvent("KeyPress", e); //$NON-NLS-1$ + this.onKeyPress(keyEvent); //$NON-NLS-1$ if (keyEvent.defaultPrevented) { e.preventDefault(); return; @@ -17104,9 +17145,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _handleKeyUp: function (e) { if (this._ignoreEvent(e)) { return; } - if (this.isListening("KeyUp")) { //$NON-NLS-0$ - var keyEvent = this._createKeyEvent("KeyUp", e); //$NON-NLS-0$ - this.onKeyUp(keyEvent); //$NON-NLS-0$ + if (this.isListening("KeyUp")) { //$NON-NLS-1$ + var keyEvent = this._createKeyEvent("KeyUp", e); //$NON-NLS-1$ + this.onKeyUp(keyEvent); //$NON-NLS-1$ if (keyEvent.defaultPrevented) { e.preventDefault(); return; @@ -17126,18 +17167,18 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } }, _handleMouse: function (e) { - var window = this._getWindow(); + var win = this._getWindow(); var result = true; - var target = window; + var target = win; if (util.isIE || (util.isFirefox && !this._overlayDiv)) { target = this._clientDiv; } if (this._overlayDiv) { if (this._hasFocus) { this._ignoreFocus = true; } - var self = this; - window.setTimeout(function () { - self.focus(); - self._ignoreFocus = false; + var that = this; + win.setTimeout(function () { + that.focus(); + that._ignoreFocus = false; }, 0); } var extend = e.shiftKey; @@ -17145,7 +17186,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var add = util.isMac ? e.metaKey : e.ctrlKey; this._blockSelection = this._doubleClickSelection = null; if (this._clickCount === 1) { - var drag = (!util.isOpera || util.isOpera >= 12.16) && this._hasFocus && this.isListening("DragStart"); //$NON-NLS-0$ + var drag = (!util.isOpera || util.isOpera >= 12.16) && this._hasFocus && this.isListening("DragStart"); //$NON-NLS-1$ result = this._setSelectionTo(e.clientX, e.clientY, true, extend, add, drag); if (result) { this._setGrab(target); } } else { @@ -17176,7 +17217,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (this._ignoreEvent(e)) { return; } if (this._linksVisible) { var target = e.target || e.srcElement; - if (target.tagName !== "A") { //$NON-NLS-0$ + if (target.tagName !== "A") { //$NON-NLS-1$ this._setLinksVisible(false); } else { return; @@ -17211,8 +17252,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ this._clickCount = 1; } } - if (this.isListening("MouseDown")) { //$NON-NLS-0$ - var mouseEvent = this._createMouseEvent("MouseDown", e); //$NON-NLS-0$ + if (this.isListening("MouseDown")) { //$NON-NLS-1$ + var mouseEvent = this._createMouseEvent("MouseDown", e); //$NON-NLS-1$ this.onMouseDown(mouseEvent); if (mouseEvent.defaultPrevented) { e.preventDefault(); @@ -17237,23 +17278,23 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _handleMouseOver: function (e) { if (this._ignoreEvent(e)) { return; } if (this._animation) { return; } - if (this.isListening("MouseOver")) { //$NON-NLS-0$ - this.onMouseOver(this._createMouseEvent("MouseOver", e)); //$NON-NLS-0$ + if (this.isListening("MouseOver")) { //$NON-NLS-1$ + this.onMouseOver(this._createMouseEvent("MouseOver", e)); //$NON-NLS-1$ } }, _handleMouseOut: function (e) { if (this._ignoreEvent(e)) { return; } if (this._animation) { return; } - if (this.isListening("MouseOut")) { //$NON-NLS-0$ - this.onMouseOut(this._createMouseEvent("MouseOut", e)); //$NON-NLS-0$ + if (this.isListening("MouseOut")) { //$NON-NLS-1$ + this.onMouseOut(this._createMouseEvent("MouseOut", e)); //$NON-NLS-1$ } }, _handleMouseMove: function (e) { if (this._animation) { return; } var inClient = this._isClientDiv(e); - if (this.isListening("MouseMove")) { //$NON-NLS-0$ + if (this.isListening("MouseMove")) { //$NON-NLS-1$ if (inClient || this._isMouseDown){ - var mouseEvent = this._createMouseEvent("MouseMove", e); //$NON-NLS-0$ + var mouseEvent = this._createMouseEvent("MouseMove", e); //$NON-NLS-1$ this.onMouseMove(mouseEvent); if (mouseEvent.defaultPrevented) { e.preventDefault(); @@ -17319,13 +17360,13 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var rightEdge = viewRect.left + viewPad.left + width; var bottomEdge = viewRect.top + viewPad.top + height; if (y < topEdge) { - this._doAutoScroll("up", x, y - topEdge); //$NON-NLS-0$ + this._doAutoScroll("up", x, y - topEdge); //$NON-NLS-1$ } else if (y > bottomEdge) { - this._doAutoScroll("down", x, y - bottomEdge); //$NON-NLS-0$ + this._doAutoScroll("down", x, y - bottomEdge); //$NON-NLS-1$ } else if (x < leftEdge && !this._wrapMode) { - this._doAutoScroll("left", x - leftEdge, y); //$NON-NLS-0$ + this._doAutoScroll("left", x - leftEdge, y); //$NON-NLS-1$ } else if (x > rightEdge && !this._wrapMode) { - this._doAutoScroll("right", x - rightEdge, y); //$NON-NLS-0$ + this._doAutoScroll("right", x - rightEdge, y); //$NON-NLS-1$ } else { this._endAutoScroll(); this._setSelectionTo(x, y, false, true); @@ -17352,7 +17393,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }; }, _createMouseEvent: function(type, e) { - var pt = this.convert({x: e.clientX, y: e.clientY}, "page", "document"); //$NON-NLS-1$ //$NON-NLS-0$ + var pt = this.convert({x: e.clientX, y: e.clientY}, "page", "document"); //$NON-NLS-1$ //$NON-NLS-2$ return { type: type, event: e, @@ -17365,7 +17406,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }; }, _createTouchEvent: function(type, e) { - var pt = e.touches.length ? this.convert({x: e.touches[0].clientX, y: e.touches[0].clientY}, "page", "document") : {}; //$NON-NLS-1$ //$NON-NLS-0$ + var pt = e.touches.length ? this.convert({x: e.touches[0].clientX, y: e.touches[0].clientY}, "page", "document") : {}; //$NON-NLS-1$ //$NON-NLS-2$ return { type: type, event: e, @@ -17379,9 +17420,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _handleMouseUp: function (e) { var left = e.which ? e.button === 0 : e.button === 1; - if (this.isListening("MouseUp")) { //$NON-NLS-0$ + if (this.isListening("MouseUp")) { //$NON-NLS-1$ if (this._isClientDiv(e) || (left && this._isMouseDown)) { - var mouseEvent = this._createMouseEvent("MouseUp", e); //$NON-NLS-0$ + var mouseEvent = this._createMouseEvent("MouseUp", e); //$NON-NLS-1$ this.onMouseUp(mouseEvent); if (mouseEvent.defaultPrevented) { e.preventDefault(); @@ -17431,7 +17472,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ * Note that on Chrome and IE, the caret stops blicking if mouse up is * prevented. */ - if (left && util.isFirefox) { + if (left && this._isMouseDown && util.isFirefox) { this._updateDOMSelection(); e.preventDefault(); } @@ -17445,7 +17486,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ pixelY = (-e.wheelDelta / 40) * lineHeight; } else if (util.isFirefox) { var limit = 256; - if (e.type === "wheel") { //$NON-NLS-0$ + if (e.type === "wheel") { //$NON-NLS-1$ if (e.deltaMode) { // page or line pixelX = Math.max(-limit, Math.min(limit, e.deltaX)) * lineHeight; pixelY = Math.max(-limit, Math.min(limit, e.deltaY)) * lineHeight; @@ -17542,12 +17583,12 @@ define("orion/editor/textView", [ //$NON-NLS-0$ /* * Bug in IE, */ - var self = this; + var that = this; this._ignoreFocus = true; - var window = this._getWindow(); - window.setTimeout(function() { - self._updateDOMSelection(); - self._ignoreFocus = false; + var win = this._getWindow(); + win.setTimeout(function() { + that._updateDOMSelection(); + that._ignoreFocus = false; }, 0); } if (e.preventDefault) { e.preventDefault(); } @@ -17592,7 +17633,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } else { this._update(); } - this.dispatchEvent({type: "Resize"}); //$NON-NLS-0$ + this.dispatchEvent({type: "Resize"}); //$NON-NLS-1$ } }, _handleRulerEvent: function (e) { @@ -17606,7 +17647,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ element = element.parentNode; } var ruler = element ? element._ruler : null; - if (lineIndex === undefined && ruler && ruler.getOverview() === "document") { //$NON-NLS-0$ + if (lineIndex === undefined && ruler && ruler.getOverview() === "document") { //$NON-NLS-1$ var clientHeight = this._getClientHeight (); var lineCount = this._model.getLineCount (); var viewPad = this._getViewPadding(); @@ -17629,19 +17670,19 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } if (ruler) { switch (e.type) { - case "click": //$NON-NLS-0$ + case "click": //$NON-NLS-1$ if (ruler.onClick) { ruler.onClick(lineIndex, e); } break; - case "dblclick": //$NON-NLS-0$ + case "dblclick": //$NON-NLS-1$ if (ruler.onDblClick) { ruler.onDblClick(lineIndex, e); } break; - case "mousemove": //$NON-NLS-0$ + case "mousemove": //$NON-NLS-1$ if (ruler.onMouseMove) { ruler.onMouseMove(lineIndex, e); } break; - case "mouseover": //$NON-NLS-0$ + case "mouseover": //$NON-NLS-1$ if (ruler.onMouseOver) { ruler.onMouseOver(lineIndex, e); } break; - case "mouseout": //$NON-NLS-0$ + case "mouseout": //$NON-NLS-1$ if (ruler.onMouseOut) { var tmp = e.relatedTarget; while (tmp && tmp !== this._rootDiv) { @@ -17658,18 +17699,18 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _handleScroll: function () { this._lastScrollTime = new Date().getTime(); - var scroll = this._getScroll(false); + var _scroll = this._getScroll(false); var oldX = this._hScroll; var oldY = this._vScroll; - if (oldX !== scroll.x || oldY !== scroll.y) { - this._hScroll = scroll.x; - this._vScroll = scroll.y; + if (oldX !== _scroll.x || oldY !== _scroll.y) { + this._hScroll = _scroll.x; + this._vScroll = _scroll.y; this._commitIME(); - this._update(oldY === scroll.y); + this._update(oldY === _scroll.y); var e = { - type: "Scroll", //$NON-NLS-0$ + type: "Scroll", //$NON-NLS-1$ oldValue: {x: oldX, y: oldY}, - newValue: scroll + newValue: _scroll }; this.onScroll(e); } @@ -17689,7 +17730,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _getModelOffset: function(node, offset) { if (!node) { return; } var lineNode; - if (node.tagName === "DIV") { //$NON-NLS-0$ + if (node.tagName === "DIV") { //$NON-NLS-1$ lineNode = node; } else { lineNode = node.parentNode.parentNode; @@ -17703,8 +17744,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (!(util.isIOS || util.isAndroid || this._checkSelectionChange)) { return false; } - var window = this._getWindow(); - var selection = window.getSelection(); + var win = this._getWindow(); + var selection = win.getSelection(); var start = this._getModelOffset(selection.anchorNode, selection.anchorOffset); var end = this._getModelOffset(selection.focusNode, selection.focusOffset); var sel = this._getSelections()[0]; @@ -17745,16 +17786,16 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _cancelPollSelectionChange: function() { if (this._selPollTimer) { - var window = this._getWindow(); - window.clearTimeout(this._selPollTimer); + var win = this._getWindow(); + win.clearTimeout(this._selPollTimer); this._selPollTimer = null; } }, _pollSelectionChange: function(retryPoll) { var that = this; - var window = this._getWindow(); + var win = this._getWindow(); this._cancelPollSelectionChange(); - this._selPollTimer = window.setTimeout(function() { + this._selPollTimer = win.setTimeout(function() { that._selPollTimer = null; if (!that._clientDiv) { return; } var changed = that._updateSelectionFromDOM(); @@ -17845,8 +17886,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ e.preventDefault(); }, _handleTouchStart: function (e) { - if (this.isListening("TouchStart")) { //$NON-NLS-0$ - var touchEvent = this._createTouchEvent("TouchStart", e); //$NON-NLS-0$ + if (this.isListening("TouchStart")) { //$NON-NLS-1$ + var touchEvent = this._createTouchEvent("TouchStart", e); //$NON-NLS-1$ this.onTouchStart(touchEvent); if (touchEvent.defaultPrevented) { e.preventDefault(); @@ -17857,11 +17898,11 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } this._commitIME(); - var window = this._getWindow(); + var win = this._getWindow(); if (this._touchScrollTimer) { - this._vScrollDiv.style.display = "none"; //$NON-NLS-0$ - this._hScrollDiv.style.display = "none"; //$NON-NLS-0$ - window.clearInterval(this._touchScrollTimer); + this._vScrollDiv.style.display = "none"; //$NON-NLS-1$ + this._hScrollDiv.style.display = "none"; //$NON-NLS-1$ + win.clearInterval(this._touchScrollTimer); this._touchScrollTimer = null; } var touches = e.touches; @@ -17875,20 +17916,20 @@ define("orion/editor/textView", [ //$NON-NLS-0$ * Bug in Android 4. The clientX/Y coordinates of the touch events * include the page scrolling offsets. */ - if (y < (touch.pageY - window.pageYOffset) || x < (touch.pageX - window.pageXOffset) ) { - x = touch.pageX - window.pageXOffset; - y = touch.pageY - window.pageYOffset; + if (y < (touch.pageY - win.pageYOffset) || x < (touch.pageX - win.pageXOffset) ) { + x = touch.pageX - win.pageXOffset; + y = touch.pageY - win.pageYOffset; } } - var pt = this.convert({x: x, y: y}, "page", "document"); //$NON-NLS-1$ //$NON-NLS-0$ + var pt = this.convert({x: x, y: y}, "page", "document"); //$NON-NLS-1$ //$NON-NLS-2$ this._lastTouchOffset = this.getOffsetAtLocation(pt.x, pt.y); this._touchStartTime = e.timeStamp; this._touching = true; } }, _handleTouchMove: function (e) { - if (this.isListening("TouchMove")) { //$NON-NLS-0$ - var touchEvent = this._createTouchEvent("TouchMove", e); //$NON-NLS-0$ + if (this.isListening("TouchMove")) { //$NON-NLS-1$ + var touchEvent = this._createTouchEvent("TouchMove", e); //$NON-NLS-1$ this.onTouchMove(touchEvent); if (touchEvent.defaultPrevented) { e.preventDefault(); @@ -17905,36 +17946,36 @@ define("orion/editor/textView", [ //$NON-NLS-0$ this._touchCurrentY = touch.clientY; var interval = 10; if (!this._touchScrollTimer && (e.timeStamp - this._touchStartTime) < (interval*20)) { - this._vScrollDiv.style.display = "block"; //$NON-NLS-0$ + this._vScrollDiv.style.display = "block"; //$NON-NLS-1$ if (!this._wrapMode) { - this._hScrollDiv.style.display = "block"; //$NON-NLS-0$ + this._hScrollDiv.style.display = "block"; //$NON-NLS-1$ } - var self = this; - var window = this._getWindow(); - this._touchScrollTimer = window.setInterval(function() { + var that = this; + var win = this._getWindow(); + this._touchScrollTimer = win.setInterval(function() { var deltaX = 0, deltaY = 0; - if (self._touching) { - deltaX = self._touchStartX - self._touchCurrentX; - deltaY = self._touchStartY - self._touchCurrentY; - self._touchSpeedX = deltaX / interval; - self._touchSpeedY = deltaY / interval; - self._touchStartX = self._touchCurrentX; - self._touchStartY = self._touchCurrentY; + if (that._touching) { + deltaX = that._touchStartX - that._touchCurrentX; + deltaY = that._touchStartY - that._touchCurrentY; + that._touchSpeedX = deltaX / interval; + that._touchSpeedY = deltaY / interval; + that._touchStartX = that._touchCurrentX; + that._touchStartY = that._touchCurrentY; } else { - if (Math.abs(self._touchSpeedX) < 0.1 && Math.abs(self._touchSpeedY) < 0.1) { - self._vScrollDiv.style.display = "none"; //$NON-NLS-0$ - self._hScrollDiv.style.display = "none"; //$NON-NLS-0$ - window.clearInterval(self._touchScrollTimer); - self._touchScrollTimer = null; + if (Math.abs(that._touchSpeedX) < 0.1 && Math.abs(that._touchSpeedY) < 0.1) { + that._vScrollDiv.style.display = "none"; //$NON-NLS-1$ + that._hScrollDiv.style.display = "none"; //$NON-NLS-1$ + win.clearInterval(that._touchScrollTimer); + that._touchScrollTimer = null; return; } else { - deltaX = self._touchSpeedX * interval; - deltaY = self._touchSpeedY * interval; - self._touchSpeedX *= 0.95; - self._touchSpeedY *= 0.95; + deltaX = that._touchSpeedX * interval; + deltaY = that._touchSpeedY * interval; + that._touchSpeedX *= 0.95; + that._touchSpeedY *= 0.95; } } - self._scrollView(deltaX, deltaY); + that._scrollView(deltaX, deltaY); }, interval); } if (this._touchScrollTimer) { @@ -17943,8 +17984,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } }, _handleTouchEnd: function (e) { - if (this.isListening("TouchEnd")) { //$NON-NLS-0$ - var touchEvent = this._createTouchEvent("TouchEnd", e); //$NON-NLS-0$ + if (this.isListening("TouchEnd")) { //$NON-NLS-1$ + var touchEvent = this._createTouchEvent("TouchEnd", e); //$NON-NLS-1$ this.onTouchEnd(touchEvent); if (touchEvent.defaultPrevented) { e.preventDefault(); @@ -17966,7 +18007,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var keyModes = this._keyModes; for (i = keyModes.length - 1 ; i >= 0; i--) { mode = keyModes[i]; - if (typeof mode.match === "function") { //$NON-NLS-0$ + if (typeof mode.match === "function") { //$NON-NLS-1$ var actionID = mode.match(e); if (actionID !== undefined) { return this.invokeAction(actionID); @@ -17986,7 +18027,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var lineStart = model.getLineStart(lineIndex); if (args.count < 0 && caret === lineStart) { if (lineIndex > 0) { - if (args.unit === "character") { //$NON-NLS-0$ + if (args.unit === "character") { //$NON-NLS-1$ args.count++; } lineIndex--; @@ -17996,7 +18037,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } else if (args.count > 0 && caret === model.getLineEnd(lineIndex)) { if (lineIndex + 1 < model.getLineCount()) { - if (args.unit === "character") { //$NON-NLS-0$ + if (args.unit === "character") { //$NON-NLS-1$ args.count--; } lineIndex++; @@ -18006,7 +18047,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } } else { var removeTab = false; - if (args.expandTab && args.unit === "character" && (caret - lineStart) % this._tabSize === 0) { //$NON-NLS-0$ + if (args.expandTab && args.unit === "character" && (caret - lineStart) % this._tabSize === 0) { //$NON-NLS-1$ var lineText = model.getText(lineStart, caret); removeTab = !/[^ ]/.test(lineText); // Only spaces between line start and caret. } @@ -18024,7 +18065,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ return selection; }, _doBackspace: function (args) { - var self = this; + var that = this; var selections = this._getSelections(); selections.forEach(function(selection) { if (selection.isEmpty()) { @@ -18032,24 +18073,24 @@ define("orion/editor/textView", [ //$NON-NLS-0$ args.count = 1; } args.count *= -1; - args.expandTab = self._expandTab; - self._doMove(args, selection); + args.expandTab = that._expandTab; + that._doMove(args, selection); } }); this._modifyContent({text: "", selection: selections}, true); return true; }, _doCase: function (args) { - var self = this; + var that = this; var selections = this._getSelections(); var changes = []; selections.forEach(function(selection) { - self._doMove(args, selection); - var text = self.getText(selection.start, selection.end); + that._doMove(args, selection); + var text = that.getText(selection.start, selection.end); switch (args.type) { - case "lower": text = text.toLowerCase(); break; //$NON-NLS-0$ - case "capitalize": text = text.replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); }); break; //$NON-NLS-0$ - case "reverse": //$NON-NLS-0$ + case "lower": text = text.toLowerCase(); break; //$NON-NLS-1$ + case "capitalize": text = text.replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); }); break; //$NON-NLS-1$ + case "reverse": //$NON-NLS-1$ var newText = ""; for (var i=0; i verticalMaximum) { scrollOffset = verticalMaximum - clientHeight; } - pageScroll = pageScroll !== undefined ? Math.min(pageScroll, scrollOffset - scroll.y) : scrollOffset - scroll.y; + pageScroll = pageScroll !== undefined ? Math.min(pageScroll, scrollOffset - _scroll.y) : scrollOffset - _scroll.y; } } }); @@ -18373,10 +18416,10 @@ define("orion/editor/textView", [ //$NON-NLS-0$ return true; }, _doPageUp: function (args) { - var self = this; + var that = this; var model = this._model; var selections = this._getSelections(); - var scroll = this._getScroll(); + var _scroll = this._getScroll(); var clientHeight = this._getClientHeight(); var lineHeight = this._getLineHeight(); var lines = Math.floor(clientHeight / lineHeight); @@ -18384,15 +18427,15 @@ define("orion/editor/textView", [ //$NON-NLS-0$ selections.forEach(function(selection) { var caret = selection.getCaret(); var caretLine = model.getLineAtOffset(caret); - if (self._lineHeight) { + if (that._lineHeight) { x = selection._columnX; - var caretRect = self._getBoundsAtOffset(caret); + var caretRect = that._getBoundsAtOffset(caret); if (x === -1 || (args.select && util.isIE)) { x = selection._columnX = caretRect.left; } - var lineIndex = self._getLineIndex(caretRect.bottom - clientHeight); - line = self._getLine(lineIndex); - var linePixel = self._getLinePixel(lineIndex); + var lineIndex = that._getLineIndex(caretRect.bottom - clientHeight); + line = that._getLine(lineIndex); + var linePixel = that._getLinePixel(lineIndex); var y = (caretRect.bottom - clientHeight) - linePixel; caret = line.getOffset(x, y); var rect = line.getBoundingClientRect(caret); @@ -18405,16 +18448,16 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var scrollLines = Math.max(1, Math.min(caretLine, lines)); x = selection._columnX; if (x === -1 || (args.select && util.isIE)) { - line = self._getLine(caretLine); + line = that._getLine(caretLine); x = selection._columnX = line.getBoundingClientRect(caret).left; line.destroy(); } - line = self._getLine(caretLine - scrollLines); - selection.extend(line.getOffset(x, self._getLineHeight(caretLine - scrollLines) - 1)); + line = that._getLine(caretLine - scrollLines); + selection.extend(line.getOffset(x, that._getLineHeight(caretLine - scrollLines) - 1)); line.destroy(); if (!args.select) { selection.collapse(); } - var scrollOffset = Math.max(0, scroll.y - scrollLines * lineHeight); - pageScroll = pageScroll !== undefined ? Math.max(pageScroll, scrollOffset - scroll.y) : scrollOffset - scroll.y; + var scrollOffset = Math.max(0, _scroll.y - scrollLines * lineHeight); + pageScroll = pageScroll !== undefined ? Math.max(pageScroll, scrollOffset - _scroll.y) : scrollOffset - _scroll.y; } } }); @@ -18422,18 +18465,18 @@ define("orion/editor/textView", [ //$NON-NLS-0$ return true; }, _doPaste: function(e) { - var self = this; + var that = this; var result = this._getClipboardText(e, function(text) { if (text.length) { - if (util.isLinux && self._lastMouseButton === 2) { - var timeDiff = new Date().getTime() - self._lastMouseTime; - if (timeDiff <= self._clickTime) { - self._setSelectionTo(self._lastMouseX, self._lastMouseY, true); + if (util.isLinux && that._lastMouseButton === 2) { + var timeDiff = new Date().getTime() - that._lastMouseTime; + if (timeDiff <= that._clickTime) { + that._setSelectionTo(that._lastMouseX, that._lastMouseY, true); } } - var selections = self._getSelections(); - var delimiter = self._singleMode ? "" : self._model.getLineDelimiter(); - self._doContent(selections.length > 1 && selections.length === text.length ? text : text.join(delimiter)); + var selections = that._getSelections(); + var delimiter = that._singleMode ? "" : that._model.getLineDelimiter(); + that._doContent(selections.length > 1 && selections.length === text.length ? text : text.join(delimiter)); } }); return result !== null; @@ -18448,13 +18491,13 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var verticalScrollOffset = this._getScroll().y; var pixel; switch (type) { - case "textStart": pixel = 0; break; //$NON-NLS-0$ - case "textEnd": pixel = verticalMaximum - clientHeight; break; //$NON-NLS-0$ - case "pageDown": pixel = verticalScrollOffset + clientHeight; break; //$NON-NLS-0$ - case "pageUp": pixel = verticalScrollOffset - clientHeight; break; //$NON-NLS-0$ - case "lineDown": pixel = verticalScrollOffset + lineHeight; break; //$NON-NLS-0$ - case "lineUp": pixel = verticalScrollOffset - lineHeight; break; //$NON-NLS-0$ - case "centerLine": //$NON-NLS-0$ + case "textStart": pixel = 0; break; //$NON-NLS-1$ + case "textEnd": pixel = verticalMaximum - clientHeight; break; //$NON-NLS-1$ + case "pageDown": pixel = verticalScrollOffset + clientHeight; break; //$NON-NLS-1$ + case "pageUp": pixel = verticalScrollOffset - clientHeight; break; //$NON-NLS-1$ + case "lineDown": pixel = verticalScrollOffset + lineHeight; break; //$NON-NLS-1$ + case "lineUp": pixel = verticalScrollOffset - lineHeight; break; //$NON-NLS-1$ + case "centerLine": //$NON-NLS-1$ var selection = this._getSelections()[0]; var lineStart = model.getLineAtOffset(selection.start); var lineEnd = model.getLineAtOffset(selection.end); @@ -18475,7 +18518,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _doTab: function () { if (!this._tabMode || this._readonly) { return; } - var text = "\t"; //$NON-NLS-0$ + var text = "\t"; //$NON-NLS-1$ var selections = this._getSelections(); if (this._expandTab) { text = []; @@ -18486,7 +18529,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var lineIndex = model.getLineAtOffset(caret); var lineStart = model.getLineStart(lineIndex); var spaces = tabSize - ((caret - lineStart) % tabSize); - text.push((newArray(spaces + 1)).join(" ")); //$NON-NLS-0$ + text.push((newArray(spaces + 1)).join(" ")); //$NON-NLS-1$ }); } return this._modifyContent({text: text, selection: selections, _ignoreDOMSelection: true}, true); @@ -18497,7 +18540,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _doOverwriteMode: function () { if (this._readonly) { return; } - this.setOptions({overwriteMode: !this.getOptions("overwriteMode")}); //$NON-NLS-0$ + this.setOptions({overwriteMode: !this.getOptions("overwriteMode")}); //$NON-NLS-1$ return true; }, _doTabMode: function () { @@ -18505,7 +18548,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ return true; }, _doWrapMode: function () { - this.setOptions({wrapMode: !this.getOptions("wrapMode")}); //$NON-NLS-0$ + this.setOptions({wrapMode: !this.getOptions("wrapMode")}); //$NON-NLS-1$ return true; }, @@ -18513,17 +18556,17 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _autoScroll: function () { var model = this._model; var selections = this._getSelections(); - var selection = Selection.editing(selections, this._autoScrollDir === "down"); //$NON-NLS-0$ - var pt = this.convert({x: this._autoScrollX, y: this._autoScrollY}, "page", "document"); //$NON-NLS-1$ //$NON-NLS-0$ + var selection = Selection.editing(selections, this._autoScrollDir === "down"); //$NON-NLS-1$ + var pt = this.convert({x: this._autoScrollX, y: this._autoScrollY}, "page", "document"); //$NON-NLS-1$ //$NON-NLS-2$ var caret = selection.getCaret(); var lineCount = model.getLineCount(); var caretLine = model.getLineAtOffset(caret), lineIndex, line; - if (this._autoScrollDir === "up" || this._autoScrollDir === "down") { //$NON-NLS-1$ //$NON-NLS-0$ - var scroll = this._autoScrollY / this._getLineHeight(); - scroll = scroll < 0 ? Math.floor(scroll) : Math.ceil(scroll); + if (this._autoScrollDir === "up" || this._autoScrollDir === "down") { //$NON-NLS-1$ //$NON-NLS-1$ + var _scroll = this._autoScrollY / this._getLineHeight(); + _scroll = _scroll < 0 ? Math.floor(_scroll) : Math.ceil(_scroll); lineIndex = caretLine; - lineIndex = Math.max(0, Math.min(lineCount - 1, lineIndex + scroll)); - } else if (this._autoScrollDir === "left" || this._autoScrollDir === "right") { //$NON-NLS-1$ //$NON-NLS-0$ + lineIndex = Math.max(0, Math.min(lineCount - 1, lineIndex + _scroll)); + } else if (this._autoScrollDir === "left" || this._autoScrollDir === "right") { //$NON-NLS-1$ //$NON-NLS-1$ lineIndex = this._getLineIndex(pt.y); line = this._getLine(caretLine); pt.x += line.getBoundingClientRect(caret, false).left; @@ -18544,9 +18587,9 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _autoScrollTimer: function () { this._autoScroll(); - var self = this; - var window = this._getWindow(); - this._autoScrollTimerID = window.setTimeout(function () {self._autoScrollTimer();}, this._AUTO_SCROLL_RATE); + var that = this; + var win = this._getWindow(); + this._autoScrollTimerID = win.setTimeout(function () {that._autoScrollTimer();}, this._AUTO_SCROLL_RATE); }, _calculateLineHeightTimer: function(calculate) { if (!this._lineHeight) { return; } @@ -18570,17 +18613,17 @@ define("orion/editor/textView", [ //$NON-NLS-0$ this.redrawRulers(0, lineCount); this._queueUpdate(); } - var window = this._getWindow(); + var win = this._getWindow(); if (i !== lineCount) { - var self = this; - this._calculateLHTimer = window.setTimeout(function() { - self._calculateLHTimer = null; - self._calculateLineHeightTimer(true); + var that = this; + this._calculateLHTimer = win.setTimeout(function() { + that._calculateLHTimer = null; + that._calculateLineHeightTimer(true); }, 0); return; } if (this._calculateLHTimer) { - window.clearTimeout(this._calculateLHTimer); + win.clearTimeout(this._calculateLHTimer); this._calculateLHTimer = undefined; } }, @@ -18591,35 +18634,35 @@ define("orion/editor/textView", [ //$NON-NLS-0$ return Math.max(1, rect.bottom - rect.top); }, _calculateMetrics: function() { - var parent = this._clientDiv; - var document = parent.ownerDocument; - var c = " "; //$NON-NLS-0$ - var line = util.createElement(document, "div"); //$NON-NLS-0$ - line.style.lineHeight = "normal"; //$NON-NLS-0$ + var _parent = this._clientDiv; + var doc = _parent.ownerDocument; + var c = " "; //$NON-NLS-1$ + var line = util.createElement(doc, "div"); //$NON-NLS-1$ + line.style.lineHeight = "normal"; //$NON-NLS-1$ var model = this._model; var lineText = model.getLine(0); - var e = {type:"LineStyle", textView: this, 0: 0, lineText: lineText, lineStart: 0}; //$NON-NLS-0$ + var e = {type:"LineStyle", textView: this, 0: 0, lineText: lineText, lineStart: 0}; //$NON-NLS-1$ this.onLineStyle(e); applyStyle(e.style, line); - line.style.position = "fixed"; //$NON-NLS-0$ - line.style.left = "-1000px"; //$NON-NLS-0$ - var span1 = util.createElement(document, "span"); //$NON-NLS-0$ - span1.appendChild(document.createTextNode(c)); + line.style.position = "fixed"; //$NON-NLS-1$ + line.style.left = "-1000px"; //$NON-NLS-1$ + var span1 = util.createElement(doc, "span"); //$NON-NLS-1$ + span1.appendChild(doc.createTextNode(c)); line.appendChild(span1); - var span2 = util.createElement(document, "span"); //$NON-NLS-0$ - span2.style.fontStyle = "italic"; //$NON-NLS-0$ - span2.appendChild(document.createTextNode(c)); + var span2 = util.createElement(doc, "span"); //$NON-NLS-1$ + span2.style.fontStyle = "italic"; //$NON-NLS-1$ + span2.appendChild(doc.createTextNode(c)); line.appendChild(span2); - var span3 = util.createElement(document, "span"); //$NON-NLS-0$ - span3.style.fontWeight = "bold"; //$NON-NLS-0$ - span3.appendChild(document.createTextNode(c)); + var span3 = util.createElement(doc, "span"); //$NON-NLS-1$ + span3.style.fontWeight = "bold"; //$NON-NLS-1$ + span3.appendChild(doc.createTextNode(c)); line.appendChild(span3); - var span4 = util.createElement(document, "span"); //$NON-NLS-0$ - span4.style.fontWeight = "bold"; //$NON-NLS-0$ - span4.style.fontStyle = "italic"; //$NON-NLS-0$ - span4.appendChild(document.createTextNode(c)); + var span4 = util.createElement(doc, "span"); //$NON-NLS-1$ + span4.style.fontWeight = "bold"; //$NON-NLS-1$ + span4.style.fontStyle = "italic"; //$NON-NLS-1$ + span4.appendChild(doc.createTextNode(c)); line.appendChild(span4); - parent.appendChild(line); + _parent.appendChild(line); var lineRect = line.getBoundingClientRect(); var spanRect1 = span1.getBoundingClientRect(); var spanRect2 = span2.getBoundingClientRect(); @@ -18645,43 +18688,43 @@ define("orion/editor/textView", [ //$NON-NLS-0$ if (fontStyle !== 0) { style = {style: {}}; if ((fontStyle & 1) !== 0) { - style.style.fontStyle = "italic"; //$NON-NLS-0$ + style.style.fontStyle = "italic"; //$NON-NLS-1$ } if ((fontStyle & 2) !== 0) { - style.style.fontWeight = "bold"; //$NON-NLS-0$ + style.style.fontWeight = "bold"; //$NON-NLS-1$ } } var trim = getLineTrim(line); - parent.removeChild(line); + _parent.removeChild(line); // calculate pad and scroll width var pad = getPadding(this._viewDiv); - var div1 = util.createElement(document, "div"); //$NON-NLS-0$ - div1.style.position = "fixed"; //$NON-NLS-0$ - div1.style.left = "-1000px"; //$NON-NLS-0$ - div1.style.paddingLeft = pad.left + "px"; //$NON-NLS-0$ - div1.style.paddingTop = pad.top + "px"; //$NON-NLS-0$ - div1.style.paddingRight = pad.right + "px"; //$NON-NLS-0$ - div1.style.paddingBottom = pad.bottom + "px"; //$NON-NLS-0$ - div1.style.width = "100px"; //$NON-NLS-0$ - div1.style.height = "100px"; //$NON-NLS-0$ - var div2 = util.createElement(document, "div"); //$NON-NLS-0$ - div2.style.width = "100%"; //$NON-NLS-0$ - div2.style.height = "100%"; //$NON-NLS-0$ + var div1 = util.createElement(doc, "div"); //$NON-NLS-1$ + div1.style.position = "fixed"; //$NON-NLS-1$ + div1.style.left = "-1000px"; //$NON-NLS-1$ + div1.style.paddingLeft = pad.left + "px"; //$NON-NLS-1$ + div1.style.paddingTop = pad.top + "px"; //$NON-NLS-1$ + div1.style.paddingRight = pad.right + "px"; //$NON-NLS-1$ + div1.style.paddingBottom = pad.bottom + "px"; //$NON-NLS-1$ + div1.style.width = "100px"; //$NON-NLS-1$ + div1.style.height = "100px"; //$NON-NLS-1$ + var div2 = util.createElement(doc, "div"); //$NON-NLS-1$ + div2.style.width = "100%"; //$NON-NLS-1$ + div2.style.height = "100%"; //$NON-NLS-1$ div1.appendChild(div2); - parent.appendChild(div1); + _parent.appendChild(div1); var rect1 = div1.getBoundingClientRect(); var rect2 = div2.getBoundingClientRect(); var scrollWidth = 0; if (!this._singleMode && !this._noScroll) { - div1.style.overflow = 'hidden'; //$NON-NLS-0$ - div2.style.height = "200px"; //$NON-NLS-0$ + div1.style.overflow = 'hidden'; //$NON-NLS-1$ + div2.style.height = "200px"; //$NON-NLS-1$ var w1 = div1.clientWidth; - div1.style.overflow = 'scroll'; //$NON-NLS-0$ + div1.style.overflow = 'scroll'; //$NON-NLS-1$ var w2 = div1.clientWidth; scrollWidth = w1 - w2; } - parent.removeChild(div1); + _parent.removeChild(div1); pad = { left: rect2.left - rect1.left, top: rect2.top - rect1.top, @@ -18690,22 +18733,22 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }; var wrapWidth = 0, marginWidth = 0, charWidth = 0; if (!invalid) { - div1 = util.createElement(document, "div"); //$NON-NLS-0$ - div1.style.position = "fixed"; //$NON-NLS-0$ - div1.style.left = "-1000px"; //$NON-NLS-0$ - parent.appendChild(div1); - div1.innerHTML = newArray(2).join("a"); //$NON-NLS-0$ + div1 = util.createElement(doc, "div"); //$NON-NLS-1$ + div1.style.position = "fixed"; //$NON-NLS-1$ + div1.style.left = "-1000px"; //$NON-NLS-1$ + _parent.appendChild(div1); + div1.innerHTML = newArray(2).join("a"); //$NON-NLS-1$ rect1 = div1.getBoundingClientRect(); charWidth = Math.ceil(rect1.right - rect1.left); if (this._wrapOffset || this._marginOffset) { - div1.innerHTML = newArray(this._wrapOffset + 1 + (util.isWebkit ? 0 : 1)).join(" "); //$NON-NLS-0$ + div1.innerHTML = newArray(this._wrapOffset + 1 + (util.isWebkit ? 0 : 1)).join(" "); //$NON-NLS-1$ rect1 = div1.getBoundingClientRect(); wrapWidth = Math.ceil(rect1.right - rect1.left); - div1.innerHTML = newArray(this._marginOffset + 1).join(" "); //$NON-NLS-0$ + div1.innerHTML = newArray(this._marginOffset + 1).join(" "); //$NON-NLS-1$ rect2 = div1.getBoundingClientRect(); marginWidth = Math.ceil(rect2.right - rect2.left); } - parent.removeChild(div1); + _parent.removeChild(div1); } return { lineHeight: lineHeight, @@ -18728,7 +18771,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _clearSelection: function (direction) { var selections = this._getSelections(); selections.forEach(function(selection) { - if (direction === "next") { //$NON-NLS-0$ + if (direction === "next") { //$NON-NLS-1$ selection.start = selection.end; } else { selection.end = selection.start; @@ -18769,84 +18812,84 @@ define("orion/editor/textView", [ //$NON-NLS-0$ _createActions: function () { this.addKeyMode(new mKeyModes.DefaultKeyMode(this)); //1 to 1, no duplicates - var self = this; + var that = this; this._actions = { - "noop": {defaultHandler: function() {return self._doNoop();}}, //$NON-NLS-0$ - - "lineUp": {defaultHandler: function(data) {return self._doLineUp(merge(data,{select: false}));}, actionDescription: {name: messages.lineUp}}, //$NON-NLS-0$ - "lineDown": {defaultHandler: function(data) {return self._doLineDown(merge(data,{select: false}));}, actionDescription: {name: messages.lineDown}}, //$NON-NLS-0$ - "lineStart": {defaultHandler: function(data) {return self._doHome(merge(data,{select: false, ctrl:false}));}, actionDescription: {name: messages.lineStart}}, //$NON-NLS-0$ - "lineEnd": {defaultHandler: function(data) {return self._doEnd(merge(data,{select: false, ctrl:false}));}, actionDescription: {name: messages.lineEnd}}, //$NON-NLS-0$ - "charPrevious": {defaultHandler: function(data) {return self._doCursorPrevious(merge(data,{select: false, unit:"character"}));}, actionDescription: {name: messages.charPrevious}}, //$NON-NLS-1$ //$NON-NLS-0$ - "charNext": {defaultHandler: function(data) {return self._doCursorNext(merge(data,{select: false, unit:"character"}));}, actionDescription: {name: messages.charNext}}, //$NON-NLS-1$ //$NON-NLS-0$ - "pageUp": {defaultHandler: function(data) {return self._doPageUp(merge(data,{select: false}));}, actionDescription: {name: messages.pageUp}}, //$NON-NLS-0$ - "pageDown": {defaultHandler: function(data) {return self._doPageDown(merge(data,{select: false}));}, actionDescription: {name: messages.pageDown}}, //$NON-NLS-0$ - "scrollPageUp": {defaultHandler: function(data) {return self._doScroll(merge(data,{type: "pageUp"}));}, actionDescription: {name: messages.scrollPageUp}}, //$NON-NLS-1$ //$NON-NLS-0$ - "scrollPageDown": {defaultHandler: function(data) {return self._doScroll(merge(data,{type: "pageDown"}));}, actionDescription: {name: messages.scrollPageDown}}, //$NON-NLS-1$ //$NON-NLS-0$ - "scrollLineUp": {defaultHandler: function(data) {return self._doScroll(merge(data,{type: "lineUp"}));}, actionDescription: {name: messages.scrollLineUp}}, //$NON-NLS-1$ //$NON-NLS-0$ - "scrollLineDown": {defaultHandler: function(data) {return self._doScroll(merge(data,{type: "lineDown"}));}, actionDescription: {name: messages.scrollLineDown}}, //$NON-NLS-1$ //$NON-NLS-0$ - "wordPrevious": {defaultHandler: function(data) {return self._doCursorPrevious(merge(data,{select: false, unit:"word"}));}, actionDescription: {name: messages.wordPrevious}}, //$NON-NLS-1$ //$NON-NLS-0$ - "wordNext": {defaultHandler: function(data) {return self._doCursorNext(merge(data,{select: false, unit:"word"}));}, actionDescription: {name: messages.wordNext}}, //$NON-NLS-1$ //$NON-NLS-0$ - "textStart": {defaultHandler: function(data) {return self._doHome(merge(data,{select: false, ctrl:true}));}, actionDescription: {name: messages.textStart}}, //$NON-NLS-0$ - "textEnd": {defaultHandler: function(data) {return self._doEnd(merge(data,{select: false, ctrl:true}));}, actionDescription: {name: messages.textEnd}}, //$NON-NLS-0$ - "scrollTextStart": {defaultHandler: function(data) {return self._doScroll(merge(data,{type: "textStart"}));}, actionDescription: {name: messages.scrollTextStart}}, //$NON-NLS-1$ //$NON-NLS-0$ - "scrollTextEnd": {defaultHandler: function(data) {return self._doScroll(merge(data,{type: "textEnd"}));}, actionDescription: {name: messages.scrollTextEnd}}, //$NON-NLS-1$ //$NON-NLS-0$ - "centerLine": {defaultHandler: function(data) {return self._doScroll(merge(data,{type: "centerLine"}));}, actionDescription: {name: messages.centerLine}}, //$NON-NLS-1$ //$NON-NLS-0$ + "noop": {defaultHandler: function() {return that._doNoop();}}, //$NON-NLS-1$ + + "lineUp": {defaultHandler: function(data) {return that._doLineUp(merge(data,{select: false}));}, actionDescription: {name: messages.lineUp}}, //$NON-NLS-1$ + "lineDown": {defaultHandler: function(data) {return that._doLineDown(merge(data,{select: false}));}, actionDescription: {name: messages.lineDown}}, //$NON-NLS-1$ + "lineStart": {defaultHandler: function(data) {return that._doHome(merge(data,{select: false, ctrl:false}));}, actionDescription: {name: messages.lineStart}}, //$NON-NLS-1$ + "lineEnd": {defaultHandler: function(data) {return that._doEnd(merge(data,{select: false, ctrl:false}));}, actionDescription: {name: messages.lineEnd}}, //$NON-NLS-1$ + "charPrevious": {defaultHandler: function(data) {return that._doCursorPrevious(merge(data,{select: false, unit:"character"}));}, actionDescription: {name: messages.charPrevious}}, //$NON-NLS-1$ //$NON-NLS-1$ + "charNext": {defaultHandler: function(data) {return that._doCursorNext(merge(data,{select: false, unit:"character"}));}, actionDescription: {name: messages.charNext}}, //$NON-NLS-1$ //$NON-NLS-1$ + "pageUp": {defaultHandler: function(data) {return that._doPageUp(merge(data,{select: false}));}, actionDescription: {name: messages.pageUp}}, //$NON-NLS-1$ + "pageDown": {defaultHandler: function(data) {return that._doPageDown(merge(data,{select: false}));}, actionDescription: {name: messages.pageDown}}, //$NON-NLS-1$ + "scrollPageUp": {defaultHandler: function(data) {return that._doScroll(merge(data,{type: "pageUp"}));}, actionDescription: {name: messages.scrollPageUp}}, //$NON-NLS-1$ //$NON-NLS-1$ + "scrollPageDown": {defaultHandler: function(data) {return that._doScroll(merge(data,{type: "pageDown"}));}, actionDescription: {name: messages.scrollPageDown}}, //$NON-NLS-1$ //$NON-NLS-1$ + "scrollLineUp": {defaultHandler: function(data) {return that._doScroll(merge(data,{type: "lineUp"}));}, actionDescription: {name: messages.scrollLineUp}}, //$NON-NLS-1$ //$NON-NLS-1$ + "scrollLineDown": {defaultHandler: function(data) {return that._doScroll(merge(data,{type: "lineDown"}));}, actionDescription: {name: messages.scrollLineDown}}, //$NON-NLS-1$ //$NON-NLS-1$ + "wordPrevious": {defaultHandler: function(data) {return that._doCursorPrevious(merge(data,{select: false, unit:"word"}));}, actionDescription: {name: messages.wordPrevious}}, //$NON-NLS-1$ //$NON-NLS-1$ + "wordNext": {defaultHandler: function(data) {return that._doCursorNext(merge(data,{select: false, unit:"word"}));}, actionDescription: {name: messages.wordNext}}, //$NON-NLS-1$ //$NON-NLS-1$ + "textStart": {defaultHandler: function(data) {return that._doHome(merge(data,{select: false, ctrl:true}));}, actionDescription: {name: messages.textStart}}, //$NON-NLS-1$ + "textEnd": {defaultHandler: function(data) {return that._doEnd(merge(data,{select: false, ctrl:true}));}, actionDescription: {name: messages.textEnd}}, //$NON-NLS-1$ + "scrollTextStart": {defaultHandler: function(data) {return that._doScroll(merge(data,{type: "textStart"}));}, actionDescription: {name: messages.scrollTextStart}}, //$NON-NLS-1$ //$NON-NLS-1$ + "scrollTextEnd": {defaultHandler: function(data) {return that._doScroll(merge(data,{type: "textEnd"}));}, actionDescription: {name: messages.scrollTextEnd}}, //$NON-NLS-1$ //$NON-NLS-1$ + "centerLine": {defaultHandler: function(data) {return that._doScroll(merge(data,{type: "centerLine"}));}, actionDescription: {name: messages.centerLine}}, //$NON-NLS-1$ //$NON-NLS-1$ - "selectLineUp": {defaultHandler: function(data) {return self._doLineUp(merge(data,{select: true}));}, actionDescription: {name: messages.selectLineUp}}, //$NON-NLS-0$ - "selectLineDown": {defaultHandler: function(data) {return self._doLineDown(merge(data,{select: true}));}, actionDescription: {name: messages.selectLineDown}}, //$NON-NLS-0$ - "selectWholeLineUp": {defaultHandler: function(data) {return self._doLineUp(merge(data,{select: true, wholeLine: true}));}, actionDescription: {name: messages.selectWholeLineUp}}, //$NON-NLS-0$ - "selectWholeLineDown": {defaultHandler: function(data) {return self._doLineDown(merge(data,{select: true, wholeLine: true}));}, actionDescription: {name: messages.selectWholeLineDown}}, //$NON-NLS-0$ - "selectLineStart": {defaultHandler: function(data) {return self._doHome(merge(data,{select: true, ctrl:false}));}, actionDescription: {name: messages.selectLineStart}}, //$NON-NLS-0$ - "selectLineEnd": {defaultHandler: function(data) {return self._doEnd(merge(data,{select: true, ctrl:false}));}, actionDescription: {name: messages.selectLineEnd}}, //$NON-NLS-0$ - "selectCharPrevious": {defaultHandler: function(data) {return self._doCursorPrevious(merge(data,{select: true, unit:"character"}));}, actionDescription: {name: messages.selectCharPrevious}}, //$NON-NLS-1$ //$NON-NLS-0$ - "selectCharNext": {defaultHandler: function(data) {return self._doCursorNext(merge(data,{select: true, unit:"character"}));}, actionDescription: {name: messages.selectCharNext}}, //$NON-NLS-1$ //$NON-NLS-0$ - "selectPageUp": {defaultHandler: function(data) {return self._doPageUp(merge(data,{select: true}));}, actionDescription: {name: messages.selectPageUp}}, //$NON-NLS-0$ - "selectPageDown": {defaultHandler: function(data) {return self._doPageDown(merge(data,{select: true}));}, actionDescription: {name: messages.selectPageDown}}, //$NON-NLS-0$ - "selectWordPrevious": {defaultHandler: function(data) {return self._doCursorPrevious(merge(data,{select: true, unit:"word"}));}, actionDescription: {name: messages.selectWordPrevious}}, //$NON-NLS-1$ //$NON-NLS-0$ - "selectWordNext": {defaultHandler: function(data) {return self._doCursorNext(merge(data,{select: true, unit:"word"}));}, actionDescription: {name: messages.selectWordNext}}, //$NON-NLS-1$ //$NON-NLS-0$ - "selectTextStart": {defaultHandler: function(data) {return self._doHome(merge(data,{select: true, ctrl:true}));}, actionDescription: {name: messages.selectTextStart}}, //$NON-NLS-0$ - "selectTextEnd": {defaultHandler: function(data) {return self._doEnd(merge(data,{select: true, ctrl:true}));}, actionDescription: {name: messages.selectTextEnd}}, //$NON-NLS-0$ - - "deletePrevious": {defaultHandler: function(data) {return self._doBackspace(merge(data,{unit:"character"}));}, actionDescription: {name: messages.deletePrevious}}, //$NON-NLS-1$ //$NON-NLS-0$ - "deleteNext": {defaultHandler: function(data) {return self._doDelete(merge(data,{unit:"character"}));}, actionDescription: {name: messages.deleteNext}}, //$NON-NLS-1$ //$NON-NLS-0$ - "deleteWordPrevious": {defaultHandler: function(data) {return self._doBackspace(merge(data,{unit:"word"}));}, actionDescription: {name: messages.deleteWordPrevious}}, //$NON-NLS-1$ //$NON-NLS-0$ - "deleteWordNext": {defaultHandler: function(data) {return self._doDelete(merge(data,{unit:"word"}));}, actionDescription: {name: messages.deleteWordNext}}, //$NON-NLS-1$ //$NON-NLS-0$ - "deleteLineStart": {defaultHandler: function(data) {return self._doBackspace(merge(data,{unit: "line"}));}, actionDescription: {name: messages.deleteLineStart}}, //$NON-NLS-1$ //$NON-NLS-0$ - "deleteLineEnd": {defaultHandler: function(data) {return self._doDelete(merge(data,{unit: "line"}));}, actionDescription: {name: messages.deleteLineEnd}}, //$NON-NLS-1$ //$NON-NLS-0$ - "tab": {defaultHandler: function(data) {return self._doTab(merge(data,{}));}, actionDescription: {name: messages.tab}}, //$NON-NLS-0$ - "shiftTab": {defaultHandler: function(data) {return self._doShiftTab(merge(data,{}));}, actionDescription: {name: messages.shiftTab}}, //$NON-NLS-0$ - "enter": {defaultHandler: function(data) {return self._doEnter(merge(data,{}));}, actionDescription: {name: messages.enter}}, //$NON-NLS-0$ - "enterNoCursor": {defaultHandler: function(data) {return self._doEnter(merge(data,{noCursor:true}));}, actionDescription: {name: messages.enterNoCursor}}, //$NON-NLS-0$ - "escape": {defaultHandler: function(data) {return self._doEscape(merge(data,{}));}, actionDescription: {name: messages.escape}}, //$NON-NLS-0$ - "selectAll": {defaultHandler: function(data) {return self._doSelectAll(merge(data,{}));}, actionDescription: {name: messages.selectAll}}, //$NON-NLS-0$ - "copy": {defaultHandler: function(data) {return self._doCopy(merge(data,{}));}, actionDescription: {name: messages.copy}}, //$NON-NLS-0$ - "cut": {defaultHandler: function(data) {return self._doCut(merge(data,{}));}, actionDescription: {name: messages.cut}}, //$NON-NLS-0$ - "paste": {defaultHandler: function(data) {return self._doPaste(merge(data,{}));}, actionDescription: {name: messages.paste}}, //$NON-NLS-0$ + "selectLineUp": {defaultHandler: function(data) {return that._doLineUp(merge(data,{select: true}));}, actionDescription: {name: messages.selectLineUp}}, //$NON-NLS-1$ + "selectLineDown": {defaultHandler: function(data) {return that._doLineDown(merge(data,{select: true}));}, actionDescription: {name: messages.selectLineDown}}, //$NON-NLS-1$ + "selectWholeLineUp": {defaultHandler: function(data) {return that._doLineUp(merge(data,{select: true, wholeLine: true}));}, actionDescription: {name: messages.selectWholeLineUp}}, //$NON-NLS-1$ + "selectWholeLineDown": {defaultHandler: function(data) {return that._doLineDown(merge(data,{select: true, wholeLine: true}));}, actionDescription: {name: messages.selectWholeLineDown}}, //$NON-NLS-1$ + "selectLineStart": {defaultHandler: function(data) {return that._doHome(merge(data,{select: true, ctrl:false}));}, actionDescription: {name: messages.selectLineStart}}, //$NON-NLS-1$ + "selectLineEnd": {defaultHandler: function(data) {return that._doEnd(merge(data,{select: true, ctrl:false}));}, actionDescription: {name: messages.selectLineEnd}}, //$NON-NLS-1$ + "selectCharPrevious": {defaultHandler: function(data) {return that._doCursorPrevious(merge(data,{select: true, unit:"character"}));}, actionDescription: {name: messages.selectCharPrevious}}, //$NON-NLS-1$ //$NON-NLS-1$ + "selectCharNext": {defaultHandler: function(data) {return that._doCursorNext(merge(data,{select: true, unit:"character"}));}, actionDescription: {name: messages.selectCharNext}}, //$NON-NLS-1$ //$NON-NLS-1$ + "selectPageUp": {defaultHandler: function(data) {return that._doPageUp(merge(data,{select: true}));}, actionDescription: {name: messages.selectPageUp}}, //$NON-NLS-1$ + "selectPageDown": {defaultHandler: function(data) {return that._doPageDown(merge(data,{select: true}));}, actionDescription: {name: messages.selectPageDown}}, //$NON-NLS-1$ + "selectWordPrevious": {defaultHandler: function(data) {return that._doCursorPrevious(merge(data,{select: true, unit:"word"}));}, actionDescription: {name: messages.selectWordPrevious}}, //$NON-NLS-1$ //$NON-NLS-1$ + "selectWordNext": {defaultHandler: function(data) {return that._doCursorNext(merge(data,{select: true, unit:"word"}));}, actionDescription: {name: messages.selectWordNext}}, //$NON-NLS-1$ //$NON-NLS-1$ + "selectTextStart": {defaultHandler: function(data) {return that._doHome(merge(data,{select: true, ctrl:true}));}, actionDescription: {name: messages.selectTextStart}}, //$NON-NLS-1$ + "selectTextEnd": {defaultHandler: function(data) {return that._doEnd(merge(data,{select: true, ctrl:true}));}, actionDescription: {name: messages.selectTextEnd}}, //$NON-NLS-1$ + + "deletePrevious": {defaultHandler: function(data) {return that._doBackspace(merge(data,{unit:"character"}));}, actionDescription: {name: messages.deletePrevious}}, //$NON-NLS-1$ //$NON-NLS-1$ + "deleteNext": {defaultHandler: function(data) {return that._doDelete(merge(data,{unit:"character"}));}, actionDescription: {name: messages.deleteNext}}, //$NON-NLS-1$ //$NON-NLS-1$ + "deleteWordPrevious": {defaultHandler: function(data) {return that._doBackspace(merge(data,{unit:"word"}));}, actionDescription: {name: messages.deleteWordPrevious}}, //$NON-NLS-1$ //$NON-NLS-1$ + "deleteWordNext": {defaultHandler: function(data) {return that._doDelete(merge(data,{unit:"word"}));}, actionDescription: {name: messages.deleteWordNext}}, //$NON-NLS-1$ //$NON-NLS-1$ + "deleteLineStart": {defaultHandler: function(data) {return that._doBackspace(merge(data,{unit: "line"}));}, actionDescription: {name: messages.deleteLineStart}}, //$NON-NLS-1$ //$NON-NLS-1$ + "deleteLineEnd": {defaultHandler: function(data) {return that._doDelete(merge(data,{unit: "line"}));}, actionDescription: {name: messages.deleteLineEnd}}, //$NON-NLS-1$ //$NON-NLS-1$ + "tab": {defaultHandler: function(data) {return that._doTab(merge(data,{}));}, actionDescription: {name: messages.tab}}, //$NON-NLS-1$ + "shiftTab": {defaultHandler: function(data) {return that._doShiftTab(merge(data,{}));}, actionDescription: {name: messages.shiftTab}}, //$NON-NLS-1$ + "enter": {defaultHandler: function(data) {return that._doEnter(merge(data,{}));}, actionDescription: {name: messages.enter}}, //$NON-NLS-1$ + "enterNoCursor": {defaultHandler: function(data) {return that._doEnter(merge(data,{noCursor:true}));}, actionDescription: {name: messages.enterNoCursor}}, //$NON-NLS-1$ + "escape": {defaultHandler: function(data) {return that._doEscape(merge(data,{}));}, actionDescription: {name: messages.escape}}, //$NON-NLS-1$ + "selectAll": {defaultHandler: function(data) {return that._doSelectAll(merge(data,{}));}, actionDescription: {name: messages.selectAll}}, //$NON-NLS-1$ + "copy": {defaultHandler: function(data) {return that._doCopy(merge(data,{}));}, actionDescription: {name: messages.copy}}, //$NON-NLS-1$ + "cut": {defaultHandler: function(data) {return that._doCut(merge(data,{}));}, actionDescription: {name: messages.cut}}, //$NON-NLS-1$ + "paste": {defaultHandler: function(data) {return that._doPaste(merge(data,{}));}, actionDescription: {name: messages.paste}}, //$NON-NLS-1$ - "uppercase": {defaultHandler: function(data) {return self._doCase(merge(data,{type: "upper"}));}, actionDescription: {name: messages.uppercase}}, //$NON-NLS-1$ //$NON-NLS-0$ - "lowercase": {defaultHandler: function(data) {return self._doCase(merge(data,{type: "lower"}));}, actionDescription: {name: messages.lowercase}}, //$NON-NLS-1$ //$NON-NLS-0$ - "capitalize": {defaultHandler: function(data) {return self._doCase(merge(data,{unit: "word", type: "capitalize"}));}, actionDescription: {name: messages.capitalize}}, //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ - "reversecase": {defaultHandler: function(data) {return self._doCase(merge(data,{type: "reverse"}));}, actionDescription: {name: messages.reversecase}}, //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ + "uppercase": {defaultHandler: function(data) {return that._doCase(merge(data,{type: "upper"}));}, actionDescription: {name: messages.uppercase}}, //$NON-NLS-1$ //$NON-NLS-1$ + "lowercase": {defaultHandler: function(data) {return that._doCase(merge(data,{type: "lower"}));}, actionDescription: {name: messages.lowercase}}, //$NON-NLS-1$ //$NON-NLS-1$ + "capitalize": {defaultHandler: function(data) {return that._doCase(merge(data,{unit: "word", type: "capitalize"}));}, actionDescription: {name: messages.capitalize}}, //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ + "reversecase": {defaultHandler: function(data) {return that._doCase(merge(data,{type: "reverse"}));}, actionDescription: {name: messages.reversecase}}, //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ - "toggleOverwriteMode": {defaultHandler: function(data) {return self._doOverwriteMode(merge(data,{}));}, actionDescription: {name: messages.toggleOverwriteMode}}, //$NON-NLS-0$ - "toggleTabMode": {defaultHandler: function(data) {return self._doTabMode(merge(data,{}));}, actionDescription: {name: messages.toggleTabMode}}, //$NON-NLS-0$ - "toggleWrapMode": {defaultHandler: function(data) {return self._doWrapMode(merge(data,{}));}, actionDescription: {name: messages.toggleWrapMode}} //$NON-NLS-0$ + "toggleOverwriteMode": {defaultHandler: function(data) {return that._doOverwriteMode(merge(data,{}));}, actionDescription: {name: messages.toggleOverwriteMode}}, //$NON-NLS-1$ + "toggleTabMode": {defaultHandler: function(data) {return that._doTabMode(merge(data,{}));}, actionDescription: {name: messages.toggleTabMode}}, //$NON-NLS-1$ + "toggleWrapMode": {defaultHandler: function(data) {return that._doWrapMode(merge(data,{}));}, actionDescription: {name: messages.toggleWrapMode}} //$NON-NLS-1$ }; }, - _createRulerParent: function(document, className) { - var div = util.createElement(document, "div"); //$NON-NLS-0$ + _createRulerParent: function(doc, className) { + var div = util.createElement(doc, "div"); //$NON-NLS-1$ div.className = className; div.tabIndex = -1; - div.style.overflow = "hidden"; //$NON-NLS-0$ - div.style.MozUserSelect = "none"; //$NON-NLS-0$ - div.style.WebkitUserSelect = "none"; //$NON-NLS-0$ - div.style.position = "absolute"; //$NON-NLS-0$ - div.style.top = "0px"; //$NON-NLS-0$ - div.style.bottom = "0px"; //$NON-NLS-0$ - div.style.cursor = "default"; //$NON-NLS-0$ - div.style.display = "none"; //$NON-NLS-0$ - div.setAttribute("aria-hidden", "true"); //$NON-NLS-1$ //$NON-NLS-0$ + div.style.overflow = "hidden"; //$NON-NLS-1$ + div.style.MozUserSelect = "none"; //$NON-NLS-1$ + div.style.WebkitUserSelect = "none"; //$NON-NLS-1$ + div.style.position = "absolute"; //$NON-NLS-1$ + div.style.top = "0px"; //$NON-NLS-1$ + div.style.bottom = "0px"; //$NON-NLS-1$ + div.style.cursor = "default"; //$NON-NLS-1$ + div.style.display = "none"; //$NON-NLS-1$ + div.setAttribute("aria-hidden", "true"); //$NON-NLS-1$ //$NON-NLS-2$ this._rootDiv.appendChild(div); return div; }, @@ -18855,17 +18898,17 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var rulerParent = this._getRulerParent(ruler); if (!rulerParent) { return; } if (rulerParent !== this._marginDiv || this._marginOffset) { - rulerParent.style.display = "block"; //$NON-NLS-0$ + rulerParent.style.display = "block"; //$NON-NLS-1$ } rulerParent.rulerWidth = undefined; - var div = util.createElement(rulerParent.ownerDocument, "div"); //$NON-NLS-0$ + var div = util.createElement(rulerParent.ownerDocument, "div"); //$NON-NLS-1$ div._ruler = ruler; ruler.node = div; div.rulerChanged = true; - div.style.position = "relative"; //$NON-NLS-0$ - div.style.cssFloat = "left"; //$NON-NLS-0$ - div.style.styleFloat = "left"; //$NON-NLS-0$ - div.style.outline = "none"; //$NON-NLS-0$ + div.style.position = "relative"; //$NON-NLS-1$ + div.style.cssFloat = "left"; //$NON-NLS-1$ + div.style.styleFloat = "left"; //$NON-NLS-1$ + div.style.outline = "none"; //$NON-NLS-1$ if (index === undefined || index < 0 || index >= rulerParent.children.length) { rulerParent.appendChild(div); } else { @@ -18877,158 +18920,158 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } }, _createSelectionDiv: function() { - var div = util.createElement(this._parent.ownerDocument, "div"); //$NON-NLS-0$ - div.className = "textviewSelection"; //$NON-NLS-0$ - div.style.position = "absolute"; //$NON-NLS-0$ - div.style.borderWidth = "0px"; //$NON-NLS-0$ - div.style.margin = "0px"; //$NON-NLS-0$ - div.style.padding = "0px"; //$NON-NLS-0$ - div.style.outline = "none"; //$NON-NLS-0$ - div.style.width = "0px"; //$NON-NLS-0$ - div.style.height = "0px"; //$NON-NLS-0$ - div.style.zIndex = "0"; //$NON-NLS-0$ + var div = util.createElement(this._parent.ownerDocument, "div"); //$NON-NLS-1$ + div.className = "textviewSelection"; //$NON-NLS-1$ + div.style.position = "absolute"; //$NON-NLS-1$ + div.style.borderWidth = "0px"; //$NON-NLS-1$ + div.style.margin = "0px"; //$NON-NLS-1$ + div.style.padding = "0px"; //$NON-NLS-1$ + div.style.outline = "none"; //$NON-NLS-1$ + div.style.width = "0px"; //$NON-NLS-1$ + div.style.height = "0px"; //$NON-NLS-1$ + div.style.zIndex = "0"; //$NON-NLS-1$ return div; }, _createView: function() { if (this._clientDiv) { return; } - var parent = this._parent; - while (parent.hasChildNodes()) { parent.removeChild(parent.lastChild); } + var _parent = this._parent; + while (_parent.hasChildNodes()) { _parent.removeChild(_parent.lastChild); } - var document = parent.ownerDocument; - var rootDiv = util.createElement(document, "div"); //$NON-NLS-0$ + var doc = _parent.ownerDocument; + var rootDiv = util.createElement(doc, "div"); //$NON-NLS-1$ this._rootDiv = rootDiv; rootDiv.tabIndex = -1; - rootDiv.style.position = "relative"; //$NON-NLS-0$ - rootDiv.style.overflow = "hidden"; //$NON-NLS-0$ - rootDiv.style.width = "100%"; //$NON-NLS-0$ - rootDiv.style.height = "100%"; //$NON-NLS-0$ - rootDiv.style.overflow = "hidden"; //$NON-NLS-0$ - rootDiv.style.WebkitTextSizeAdjust = "100%"; //$NON-NLS-0$ - rootDiv.setAttribute("role", "application"); //$NON-NLS-1$ //$NON-NLS-0$ - parent.appendChild(rootDiv); - - var leftDiv = this._createRulerParent(document, "textviewLeftRuler"); //$NON-NLS-0$ + rootDiv.style.position = "relative"; //$NON-NLS-1$ + rootDiv.style.overflow = "hidden"; //$NON-NLS-1$ + rootDiv.style.width = "100%"; //$NON-NLS-1$ + rootDiv.style.height = "100%"; //$NON-NLS-1$ + rootDiv.style.overflow = "hidden"; //$NON-NLS-1$ + rootDiv.style.WebkitTextSizeAdjust = "100%"; //$NON-NLS-1$ + rootDiv.setAttribute("role", "application"); //$NON-NLS-1$ //$NON-NLS-2$ + _parent.appendChild(rootDiv); + + var leftDiv = this._createRulerParent(doc, "textviewLeftRuler"); //$NON-NLS-1$ this._leftDiv = leftDiv; - var viewDiv = util.createElement(document, "div"); //$NON-NLS-0$ - viewDiv.className = "textviewScroll"; //$NON-NLS-0$ + var viewDiv = util.createElement(doc, "div"); //$NON-NLS-1$ + viewDiv.className = "textviewScroll"; //$NON-NLS-1$ this._viewDiv = viewDiv; viewDiv.tabIndex = -1; - viewDiv.style.position = "absolute"; //$NON-NLS-0$ - viewDiv.style.top = "0px"; //$NON-NLS-0$ - viewDiv.style.bottom = "0px"; //$NON-NLS-0$ - viewDiv.style.borderWidth = "0px"; //$NON-NLS-0$ - viewDiv.style.margin = "0px"; //$NON-NLS-0$ - viewDiv.style.outline = "none"; //$NON-NLS-0$ - viewDiv.style.background = "transparent"; //$NON-NLS-0$ + viewDiv.style.position = "absolute"; //$NON-NLS-1$ + viewDiv.style.top = "0px"; //$NON-NLS-1$ + viewDiv.style.bottom = "0px"; //$NON-NLS-1$ + viewDiv.style.borderWidth = "0px"; //$NON-NLS-1$ + viewDiv.style.margin = "0px"; //$NON-NLS-1$ + viewDiv.style.outline = "none"; //$NON-NLS-1$ + viewDiv.style.background = "transparent"; //$NON-NLS-1$ rootDiv.appendChild(viewDiv); - var rightDiv = this._createRulerParent(document, "textviewRightRuler"); //$NON-NLS-0$ + var rightDiv = this._createRulerParent(doc, "textviewRightRuler"); //$NON-NLS-1$ this._rightDiv = rightDiv; - rightDiv.style.right = "0px"; //$NON-NLS-0$ + rightDiv.style.right = "0px"; //$NON-NLS-1$ - var innerRightDiv = this._createRulerParent(document, "textviewInnerRightRuler"); //$NON-NLS-0$ + var innerRightDiv = this._createRulerParent(doc, "textviewInnerRightRuler"); //$NON-NLS-1$ this._innerRightDiv = innerRightDiv; - innerRightDiv.style.zIndex = "1"; //$NON-NLS-0$ + innerRightDiv.style.zIndex = "1"; //$NON-NLS-1$ - var scrollDiv = util.createElement(document, "div"); //$NON-NLS-0$ + var scrollDiv = util.createElement(doc, "div"); //$NON-NLS-1$ this._scrollDiv = scrollDiv; - scrollDiv.style.margin = "0px"; //$NON-NLS-0$ - scrollDiv.style.borderWidth = "0px"; //$NON-NLS-0$ - scrollDiv.style.padding = "0px"; //$NON-NLS-0$ + scrollDiv.style.margin = "0px"; //$NON-NLS-1$ + scrollDiv.style.borderWidth = "0px"; //$NON-NLS-1$ + scrollDiv.style.padding = "0px"; //$NON-NLS-1$ viewDiv.appendChild(scrollDiv); - var marginDiv = this._marginDiv = this._createRulerParent(document, "textviewMarginRuler"); //$NON-NLS-0$ - marginDiv.style.zIndex = "4"; //$NON-NLS-0$ + var marginDiv = this._marginDiv = this._createRulerParent(doc, "textviewMarginRuler"); //$NON-NLS-1$ + marginDiv.style.zIndex = "4"; //$NON-NLS-1$ if (!util.isIE && !util.isIOS) { - var clipDiv = util.createElement(document, "div"); //$NON-NLS-0$ + var clipDiv = util.createElement(doc, "div"); //$NON-NLS-1$ this._clipDiv = clipDiv; - clipDiv.style.position = "absolute"; //$NON-NLS-0$ - clipDiv.style.overflow = "hidden"; //$NON-NLS-0$ - clipDiv.style.margin = "0px"; //$NON-NLS-0$ - clipDiv.style.borderWidth = "0px"; //$NON-NLS-0$ - clipDiv.style.padding = "0px"; //$NON-NLS-0$ - clipDiv.style.background = "transparent"; //$NON-NLS-0$ + clipDiv.style.position = "absolute"; //$NON-NLS-1$ + clipDiv.style.overflow = "hidden"; //$NON-NLS-1$ + clipDiv.style.margin = "0px"; //$NON-NLS-1$ + clipDiv.style.borderWidth = "0px"; //$NON-NLS-1$ + clipDiv.style.padding = "0px"; //$NON-NLS-1$ + clipDiv.style.background = "transparent"; //$NON-NLS-1$ rootDiv.appendChild(clipDiv); - var clipScrollDiv = util.createElement(document, "div"); //$NON-NLS-0$ + var clipScrollDiv = util.createElement(doc, "div"); //$NON-NLS-1$ this._clipScrollDiv = clipScrollDiv; - clipScrollDiv.style.position = "absolute"; //$NON-NLS-0$ - clipScrollDiv.style.height = "1px"; //$NON-NLS-0$ - clipScrollDiv.style.top = "-1000px"; //$NON-NLS-0$ - clipScrollDiv.style.background = "transparent"; //$NON-NLS-0$ + clipScrollDiv.style.position = "absolute"; //$NON-NLS-1$ + clipScrollDiv.style.height = "1px"; //$NON-NLS-1$ + clipScrollDiv.style.top = "-1000px"; //$NON-NLS-1$ + clipScrollDiv.style.background = "transparent"; //$NON-NLS-1$ clipDiv.appendChild(clipScrollDiv); } - var clientDiv = util.createElement(document, "div"); //$NON-NLS-0$ - clientDiv.className = "textviewContent"; //$NON-NLS-0$ + var clientDiv = util.createElement(doc, "div"); //$NON-NLS-1$ + clientDiv.className = "textviewContent"; //$NON-NLS-1$ this._clientDiv = clientDiv; clientDiv.tabIndex = 0; - clientDiv.style.position = "absolute"; //$NON-NLS-0$ - clientDiv.style.borderWidth = "0px"; //$NON-NLS-0$ - clientDiv.style.margin = "0px"; //$NON-NLS-0$ - clientDiv.style.padding = "0px"; //$NON-NLS-0$ - clientDiv.style.outline = "none"; //$NON-NLS-0$ - clientDiv.style.zIndex = "1"; //$NON-NLS-0$ - clientDiv.style.WebkitUserSelect = "text"; //$NON-NLS-0$ - clientDiv.setAttribute("spellcheck", "false"); //$NON-NLS-1$ //$NON-NLS-0$ + clientDiv.style.position = "absolute"; //$NON-NLS-1$ + clientDiv.style.borderWidth = "0px"; //$NON-NLS-1$ + clientDiv.style.margin = "0px"; //$NON-NLS-1$ + clientDiv.style.padding = "0px"; //$NON-NLS-1$ + clientDiv.style.outline = "none"; //$NON-NLS-1$ + clientDiv.style.zIndex = "1"; //$NON-NLS-1$ + clientDiv.style.WebkitUserSelect = "text"; //$NON-NLS-1$ + clientDiv.setAttribute("spellcheck", "false"); //$NON-NLS-1$ //$NON-NLS-2$ if (util.isIOS || util.isAndroid) { - clientDiv.style.WebkitTapHighlightColor = "transparent"; //$NON-NLS-0$ + clientDiv.style.WebkitTapHighlightColor = "transparent"; //$NON-NLS-1$ } (this._clipDiv || rootDiv).appendChild(clientDiv); this._setFullSelection(this._fullSelection, true); if (util.isIOS || util.isAndroid) { - var vScrollDiv = util.createElement(document, "div"); //$NON-NLS-0$ + var vScrollDiv = util.createElement(doc, "div"); //$NON-NLS-1$ this._vScrollDiv = vScrollDiv; - vScrollDiv.style.position = "absolute"; //$NON-NLS-0$ - vScrollDiv.style.borderWidth = "1px"; //$NON-NLS-0$ - vScrollDiv.style.borderColor = "white"; //$NON-NLS-0$ - vScrollDiv.style.borderStyle = "solid"; //$NON-NLS-0$ - vScrollDiv.style.borderRadius = "4px"; //$NON-NLS-0$ - vScrollDiv.style.backgroundColor = "black"; //$NON-NLS-0$ - vScrollDiv.style.opacity = "0.5"; //$NON-NLS-0$ - vScrollDiv.style.margin = "0px"; //$NON-NLS-0$ - vScrollDiv.style.padding = "0px"; //$NON-NLS-0$ - vScrollDiv.style.outline = "none"; //$NON-NLS-0$ - vScrollDiv.style.zIndex = "3"; //$NON-NLS-0$ - vScrollDiv.style.width = "8px"; //$NON-NLS-0$ - vScrollDiv.style.display = "none"; //$NON-NLS-0$ + vScrollDiv.style.position = "absolute"; //$NON-NLS-1$ + vScrollDiv.style.borderWidth = "1px"; //$NON-NLS-1$ + vScrollDiv.style.borderColor = "white"; //$NON-NLS-1$ + vScrollDiv.style.borderStyle = "solid"; //$NON-NLS-1$ + vScrollDiv.style.borderRadius = "4px"; //$NON-NLS-1$ + vScrollDiv.style.backgroundColor = "black"; //$NON-NLS-1$ + vScrollDiv.style.opacity = "0.5"; //$NON-NLS-1$ + vScrollDiv.style.margin = "0px"; //$NON-NLS-1$ + vScrollDiv.style.padding = "0px"; //$NON-NLS-1$ + vScrollDiv.style.outline = "none"; //$NON-NLS-1$ + vScrollDiv.style.zIndex = "3"; //$NON-NLS-1$ + vScrollDiv.style.width = "8px"; //$NON-NLS-1$ + vScrollDiv.style.display = "none"; //$NON-NLS-1$ rootDiv.appendChild(vScrollDiv); - var hScrollDiv = util.createElement(document, "div"); //$NON-NLS-0$ + var hScrollDiv = util.createElement(doc, "div"); //$NON-NLS-1$ this._hScrollDiv = hScrollDiv; - hScrollDiv.style.position = "absolute"; //$NON-NLS-0$ - hScrollDiv.style.borderWidth = "1px"; //$NON-NLS-0$ - hScrollDiv.style.borderColor = "white"; //$NON-NLS-0$ - hScrollDiv.style.borderStyle = "solid"; //$NON-NLS-0$ - hScrollDiv.style.borderRadius = "4px"; //$NON-NLS-0$ - hScrollDiv.style.backgroundColor = "black"; //$NON-NLS-0$ - hScrollDiv.style.opacity = "0.5"; //$NON-NLS-0$ - hScrollDiv.style.margin = "0px"; //$NON-NLS-0$ - hScrollDiv.style.padding = "0px"; //$NON-NLS-0$ - hScrollDiv.style.outline = "none"; //$NON-NLS-0$ - hScrollDiv.style.zIndex = "3"; //$NON-NLS-0$ - hScrollDiv.style.height = "8px"; //$NON-NLS-0$ - hScrollDiv.style.display = "none"; //$NON-NLS-0$ + hScrollDiv.style.position = "absolute"; //$NON-NLS-1$ + hScrollDiv.style.borderWidth = "1px"; //$NON-NLS-1$ + hScrollDiv.style.borderColor = "white"; //$NON-NLS-1$ + hScrollDiv.style.borderStyle = "solid"; //$NON-NLS-1$ + hScrollDiv.style.borderRadius = "4px"; //$NON-NLS-1$ + hScrollDiv.style.backgroundColor = "black"; //$NON-NLS-1$ + hScrollDiv.style.opacity = "0.5"; //$NON-NLS-1$ + hScrollDiv.style.margin = "0px"; //$NON-NLS-1$ + hScrollDiv.style.padding = "0px"; //$NON-NLS-1$ + hScrollDiv.style.outline = "none"; //$NON-NLS-1$ + hScrollDiv.style.zIndex = "3"; //$NON-NLS-1$ + hScrollDiv.style.height = "8px"; //$NON-NLS-1$ + hScrollDiv.style.display = "none"; //$NON-NLS-1$ rootDiv.appendChild(hScrollDiv); } if (util.isFirefox && !clientDiv.setCapture) { - var overlayDiv = util.createElement(document, "div"); //$NON-NLS-0$ + var overlayDiv = util.createElement(doc, "div"); //$NON-NLS-1$ this._overlayDiv = overlayDiv; overlayDiv.style.position = clientDiv.style.position; overlayDiv.style.borderWidth = clientDiv.style.borderWidth; overlayDiv.style.margin = clientDiv.style.margin; overlayDiv.style.padding = clientDiv.style.padding; - overlayDiv.style.cursor = "text"; //$NON-NLS-0$ - overlayDiv.style.zIndex = "2"; //$NON-NLS-0$ + overlayDiv.style.cursor = "text"; //$NON-NLS-1$ + overlayDiv.style.zIndex = "2"; //$NON-NLS-1$ (this._clipDiv || rootDiv).appendChild(overlayDiv); } - clientDiv.contentEditable = "true"; //$NON-NLS-0$ - clientDiv.setAttribute("role", "textbox"); //$NON-NLS-1$ //$NON-NLS-0$ - clientDiv.setAttribute("aria-multiline", "true"); //$NON-NLS-1$ //$NON-NLS-0$ + clientDiv.contentEditable = "true"; //$NON-NLS-1$ + clientDiv.setAttribute("role", "textbox"); //$NON-NLS-1$ //$NON-NLS-2$ + clientDiv.setAttribute("aria-multiline", "true"); //$NON-NLS-1$ //$NON-NLS-2$ this._setWrapMode(this._wrapMode, true); this._setReadOnly(this._readonly); this._setThemeClass(this._themeClass, true); @@ -19041,17 +19084,17 @@ define("orion/editor/textView", [ //$NON-NLS-0$ } this._update(); // Detect when the parent is attached to the DOM or display - var self = this; + var that = this; function checkDOMReady() { - if (!self._rootDiv) { return; } - self.update(true); - if (self._metrics.invalid) { - self._getWindow().setTimeout(function() { + if (!that._rootDiv) { return; } + that.update(true); + if (that._metrics.invalid) { + that._getWindow().setTimeout(function() { checkDOMReady(); }, 100); } } - DOMReady(document, rootDiv, "textview", checkDOMReady); //$NON-NLS-0$ + DOMReady(doc, rootDiv, "textview", checkDOMReady); //$NON-NLS-1$ }, _defaultOptions: function() { return { @@ -19085,7 +19128,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ div._ruler = undefined; rulerParent.removeChild(div); if (rulerParent.children.length === 0 && (rulerParent !== this._marginDiv || !this._marginOffset)) { - rulerParent.style.display = "none"; //$NON-NLS-0$ + rulerParent.style.display = "none"; //$NON-NLS-1$ } rulerParent.rulerWidth = undefined; break; @@ -19101,25 +19144,25 @@ define("orion/editor/textView", [ //$NON-NLS-0$ this._unhookEvents(); /* Destroy timers */ - var window = this._getWindow(); + var win = this._getWindow(); if (this._autoScrollTimerID) { - window.clearTimeout(this._autoScrollTimerID); + win.clearTimeout(this._autoScrollTimerID); this._autoScrollTimerID = null; } if (this._updateTimer) { - window.clearTimeout(this._updateTimer); + win.clearTimeout(this._updateTimer); this._updateTimer = null; } if (this._calculateLHTimer) { - window.clearTimeout(this._calculateLHTimer); + win.clearTimeout(this._calculateLHTimer); this._calculateLHTimer = null; } if (this._cursorTimer) { - window.clearInterval(this._cursorTimer); + win.clearInterval(this._cursorTimer); this._cursorTimer = null; } if (this._imeTimeout) { - window.clearInterval(this._imeTimeout); + win.clearInterval(this._imeTimeout); this._imeTimeout = null; } @@ -19154,8 +19197,8 @@ define("orion/editor/textView", [ //$NON-NLS-0$ }, _endAutoScroll: function () { if (this._autoScrollTimerID) { - var window = this._getWindow(); - window.clearTimeout(this._autoScrollTimerID); + var win = this._getWindow(); + win.clearTimeout(this._autoScrollTimerID); } this._autoScrollDir = undefined; this._autoScrollTimerID = undefined; @@ -19243,13 +19286,13 @@ define("orion/editor/textView", [ //$NON-NLS-0$ var innerRightWidth = this._getInnerRightWidth(); return Math.max(0, this._viewDiv.clientWidth - viewPad.left - viewPad.right - innerRightWidth); }, - _getClipboardText: function (event, handler) { + _getClipboardText: function (evt, handler) { // IE - var window = this._getWindow(); - var clipboardData = window.clipboardData; + var win = this._getWindow(); + var clipboardData = win.clipboardData; // WebKit and Firefox > 21 - if (!clipboardData && event) { - clipboardData = event.clipboardData; + if (!clipboardData && evt) { + clipboardData = evt.clipboardData; } function convert(wholeText) { var clipboadText = []; @@ -19258,25 +19301,25 @@ define("orion/editor/textView", [ //$NON-NLS-0$ return clipboadText; } if (clipboardData) { - return convert(clipboardData.getData(util.isIE ? "Text" : "text/plain")); //$NON-NLS-1$"//$NON-NLS-0$ + return convert(clipboardData.getData(util.isIE ? "Text" : "text/plain")); //$NON-NLS-1$"//$NON-NLS-2$ } if (util.isFirefox) { this._ignoreFocus = true; var clipboardDiv = this._clipboardDiv; - var document = this._rootDiv.ownerDocument; + var doc = this._rootDiv.ownerDocument; if (!clipboardDiv) { - clipboardDiv = util.createElement(document, "div"); //$NON-NLS-0$ + clipboardDiv = util.createElement(doc, "div"); //$NON-NLS-1$ this._clipboardDiv = clipboardDiv; - clipboardDiv.style.position = "fixed"; //$NON-NLS-0$ - clipboardDiv.style.whiteSpace = "pre"; //$NON-NLS-0$ - clipboardDiv.style.left = "-1000px"; //$NON-NLS-0$ + clipboardDiv.style.position = "fixed"; //$NON-NLS-1$ + clipboardDiv.style.whiteSpace = "pre"; //$NON-NLS-1$ + clipboardDiv.style.left = "-1000px"; //$NON-NLS-1$ this._rootDiv.appendChild(clipboardDiv); } - clipboardDiv.innerHTML = "
"; //$NON-NLS-0$
+				clipboardDiv.innerHTML = "
"; //$NON-NLS-1$
 				clipboardDiv.firstChild.focus();
-				var self = this;
+				var that = this;
 				var _getText = function() {
-					var noteText = self._getTextFromElement(clipboardDiv);
+					var noteText = that._getTextFromElement(clipboardDiv);
 					clipboardDiv.innerHTML = "";
 					return convert(noteText);
 				};
@@ -19288,7 +19331,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				/* Do not try execCommand if middle-click is used, because if we do, we get the clipboard text, not the primary selection text. */
 				if (!util.isLinux || this._lastMouseButton !== 2) {
 					try {
-						result = document.execCommand("paste", false, null); //$NON-NLS-0$
+						result = doc.execCommand("paste", false, null); //$NON-NLS-1$
 					} catch (ex) {
 						/* Firefox can throw even when execCommand() works, see bug 362835. */
 						result = clipboardDiv.childNodes.length > 1 || clipboardDiv.firstChild && clipboardDiv.firstChild.childNodes.length > 0;
@@ -19297,11 +19340,11 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				this._ignorePaste = false;
 				if (!result) {
 					/* Try native paste in DOM, works for firefox during the paste event. */
-					if (event) {
-						window.setTimeout(function() {
-							self.focus();
+					if (evt) {
+						win.setTimeout(function() {
+							that.focus();
 							_getText();
-							self._ignoreFocus = false;
+							that._ignoreFocus = false;
 						}, 0);
 						return null;
 					} else {
@@ -19321,16 +19364,16 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			return child._line.getText(offsetNode);
 		},
 		_getTextFromElement: function(element) {
-			var document = element.ownerDocument;
-			var window = document.defaultView;
-			if (!window.getSelection) {
+			var doc = element.ownerDocument;
+			var win = doc.defaultView;
+			if (!win.getSelection) {
 				return element.innerText || element.textContent;
 			}
 
-			var newRange = document.createRange();
+			var newRange = doc.createRange();
 			newRange.selectNode(element);
 
-			var selection = window.getSelection();
+			var selection = win.getSelection();
 			var oldRanges = [], i;
 			for (i = 0; i < selection.rangeCount; i++) {
 				oldRanges.push(selection.getRangeAt(i));
@@ -19457,10 +19500,10 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		},
 		_getRulerParent: function(ruler) {
 			switch (ruler.getLocation()) {
-				case "left": return this._leftDiv; //$NON-NLS-0$
-				case "right": return this._rightDiv; //$NON-NLS-0$
-				case "innerRight": return this._innerRightDiv; //$NON-NLS-0$
-				case "margin": return this._marginDiv; //$NON-NLS-0$
+				case "left": return this._leftDiv; //$NON-NLS-1$
+				case "right": return this._rightDiv; //$NON-NLS-1$
+				case "innerRight": return this._innerRightDiv; //$NON-NLS-1$
+				case "margin": return this._marginDiv; //$NON-NLS-1$
 			}
 			return null;
 		},
@@ -19492,96 +19535,96 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			return child.lineIndex;
 		},
 		_hookEvents: function() {
-			var self = this;
+			var that = this;
 			this._modelListener = {
 				/** @private */
 				onChanging: function(modelChangingEvent) {
-					self._onModelChanging(modelChangingEvent);
+					that._onModelChanging(modelChangingEvent);
 				},
 				/** @private */
 				onChanged: function(modelChangedEvent) {
-					self._onModelChanged(modelChangedEvent);
+					that._onModelChanged(modelChangedEvent);
 				}
 			};
-			this._model.addEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-0$
-			this._model.addEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-0$
+			this._model.addEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-1$
+			this._model.addEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-1$
 			
 			this._themeListener = {
 				onChanged: function() {
-					self._setThemeClass(self._themeClass);
+					that._setThemeClass(that._themeClass);
 				}
 			};
-			this._theme.addEventListener("ThemeChanged", this._themeListener.onChanged); //$NON-NLS-0$
+			this._theme.addEventListener("ThemeChanged", this._themeListener.onChanged); //$NON-NLS-1$
 			
 			var handlers = this._handlers = [];
 			var clientDiv = this._clientDiv, viewDiv = this._viewDiv, rootDiv = this._rootDiv;
 			var topNode = this._overlayDiv || clientDiv;
-			var document = clientDiv.ownerDocument;
-			var window = this._getWindow();
-			var grabNode = util.isIE ? document : window;
-			handlers.push({target: window, type: "resize", handler: function(e) { return self._handleResize(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "blur", handler: function(e) { return self._handleBlur(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "focus", handler: function(e) { return self._handleFocus(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: viewDiv, type: "focus", handler: function() { clientDiv.focus(); }}); //$NON-NLS-0$
-			handlers.push({target: viewDiv, type: "scroll", handler: function(e) { return self._handleScroll(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "textInput", handler: function(e) { return self._handleTextInput(e ? e : window.event); }}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "keydown", handler: function(e) { return self._handleKeyDown(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "keypress", handler: function(e) { return self._handleKeyPress(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "keyup", handler: function(e) { return self._handleKeyUp(e ? e : window.event);}}); //$NON-NLS-0$
+			var doc = clientDiv.ownerDocument;
+			var win = this._getWindow();
+			var grabNode = util.isIE ? doc : win;
+			handlers.push({target: win, type: "resize", handler: function(e) { return that._handleResize(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "blur", handler: function(e) { return that._handleBlur(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "focus", handler: function(e) { return that._handleFocus(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: viewDiv, type: "focus", handler: function() { clientDiv.focus(); }}); //$NON-NLS-1$
+			handlers.push({target: viewDiv, type: "scroll", handler: function(e) { return that._handleScroll(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "textInput", handler: function(e) { return that._handleTextInput(e ? e : win.event); }}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "keydown", handler: function(e) { return that._handleKeyDown(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "keypress", handler: function(e) { return that._handleKeyPress(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "keyup", handler: function(e) { return that._handleKeyUp(e ? e : win.event);}}); //$NON-NLS-1$
 			if (util.isIE) {
-				handlers.push({target: document, type: "keyup", handler: function(e) { return self._handleDocKeyUp(e ? e : window.event);}}); //$NON-NLS-0$
+				handlers.push({target: doc, type: "keyup", handler: function(e) { return that._handleDocKeyUp(e ? e : win.event);}}); //$NON-NLS-1$
 			}
-			handlers.push({target: clientDiv, type: "contextmenu", handler: function(e) { return self._handleContextMenu(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "copy", handler: function(e) { return self._handleCopy(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "cut", handler: function(e) { return self._handleCut(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: clientDiv, type: "paste", handler: function(e) { return self._handlePaste(e ? e : window.event);}}); //$NON-NLS-0$
-			handlers.push({target: document, type: "selectionchange", handler: function(e) { return self._handleSelectionChange(e ? e : window.event); }}); //$NON-NLS-0$
+			handlers.push({target: clientDiv, type: "contextmenu", handler: function(e) { return that._handleContextMenu(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "copy", handler: function(e) { return that._handleCopy(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "cut", handler: function(e) { return that._handleCut(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: clientDiv, type: "paste", handler: function(e) { return that._handlePaste(e ? e : win.event);}}); //$NON-NLS-1$
+			handlers.push({target: doc, type: "selectionchange", handler: function(e) { return that._handleSelectionChange(e ? e : win.event); }}); //$NON-NLS-1$
 			if (util.isIOS || util.isAndroid) {
-				handlers.push({target: clientDiv, type: "touchstart", handler: function(e) { return self._handleTouchStart(e ? e : window.event); }}); //$NON-NLS-0$
-				handlers.push({target: clientDiv, type: "touchmove", handler: function(e) { return self._handleTouchMove(e ? e : window.event); }}); //$NON-NLS-0$
-				handlers.push({target: clientDiv, type: "touchend", handler: function(e) { return self._handleTouchEnd(e ? e : window.event); }}); //$NON-NLS-0$
+				handlers.push({target: clientDiv, type: "touchstart", handler: function(e) { return that._handleTouchStart(e ? e : win.event); }}); //$NON-NLS-1$
+				handlers.push({target: clientDiv, type: "touchmove", handler: function(e) { return that._handleTouchMove(e ? e : win.event); }}); //$NON-NLS-1$
+				handlers.push({target: clientDiv, type: "touchend", handler: function(e) { return that._handleTouchEnd(e ? e : win.event); }}); //$NON-NLS-1$
 			} else {
-				handlers.push({target: clientDiv, type: "selectstart", handler: function(e) { return self._handleSelectStart(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: clientDiv, type: "mousedown", handler: function(e) { return self._handleMouseDown(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: clientDiv, type: "mouseover", handler: function(e) { return self._handleMouseOver(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: clientDiv, type: "mouseout", handler: function(e) { return self._handleMouseOut(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: grabNode, type: "mouseup", handler: function(e) { return self._handleMouseUp(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: grabNode, type: "mousemove", handler: function(e) { return self._handleMouseMove(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: rootDiv, type: "mousedown", handler: function(e) { return self._handleRootMouseDown(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: rootDiv, type: "mouseup", handler: function(e) { return self._handleRootMouseUp(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: topNode, type: "dragstart", handler: function(e) { return self._handleDragStart(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: topNode, type: "drag", handler: function(e) { return self._handleDrag(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: topNode, type: "dragend", handler: function(e) { return self._handleDragEnd(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: topNode, type: "dragenter", handler: function(e) { return self._handleDragEnter(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: topNode, type: "dragover", handler: function(e) { return self._handleDragOver(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: topNode, type: "dragleave", handler: function(e) { return self._handleDragLeave(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: topNode, type: "drop", handler: function(e) { return self._handleDrop(e ? e : window.event);}}); //$NON-NLS-0$
-				handlers.push({target: this._clientDiv, type: util.isFirefox > 26 ? "wheel" : util.isFirefox ? "DOMMouseScroll" : "mousewheel", handler: function(e) { return self._handleMouseWheel(e ? e : window.event); }}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+				handlers.push({target: clientDiv, type: "selectstart", handler: function(e) { return that._handleSelectStart(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: clientDiv, type: "mousedown", handler: function(e) { return that._handleMouseDown(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: clientDiv, type: "mouseover", handler: function(e) { return that._handleMouseOver(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: clientDiv, type: "mouseout", handler: function(e) { return that._handleMouseOut(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: grabNode, type: "mouseup", handler: function(e) { return that._handleMouseUp(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: grabNode, type: "mousemove", handler: function(e) { return that._handleMouseMove(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: rootDiv, type: "mousedown", handler: function(e) { return that._handleRootMouseDown(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: rootDiv, type: "mouseup", handler: function(e) { return that._handleRootMouseUp(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: topNode, type: "dragstart", handler: function(e) { return that._handleDragStart(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: topNode, type: "drag", handler: function(e) { return that._handleDrag(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: topNode, type: "dragend", handler: function(e) { return that._handleDragEnd(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: topNode, type: "dragenter", handler: function(e) { return that._handleDragEnter(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: topNode, type: "dragover", handler: function(e) { return that._handleDragOver(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: topNode, type: "dragleave", handler: function(e) { return that._handleDragLeave(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: topNode, type: "drop", handler: function(e) { return that._handleDrop(e ? e : win.event);}}); //$NON-NLS-1$
+				handlers.push({target: this._clientDiv, type: util.isFirefox > 26 ? "wheel" : util.isFirefox ? "DOMMouseScroll" : "mousewheel", handler: function(e) { return that._handleMouseWheel(e ? e : win.event); }}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$
 				if (this._clipDiv) {
-					handlers.push({target: this._clipDiv, type: util.isFirefox > 26 ? "wheel" : util.isFirefox ? "DOMMouseScroll" : "mousewheel", handler: function(e) { return self._handleMouseWheel(e ? e : window.event); }}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+					handlers.push({target: this._clipDiv, type: util.isFirefox > 26 ? "wheel" : util.isFirefox ? "DOMMouseScroll" : "mousewheel", handler: function(e) { return that._handleMouseWheel(e ? e : win.event); }}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$
 				}
 				if (util.isFirefox && (!util.isWindows || util.isFirefox >= 15)) {
-					var MutationObserver = window.MutationObserver || window.MozMutationObserver;
-					if (MutationObserver) {
-						this._mutationObserver = new MutationObserver(function(mutations) { self._handleDataModified(mutations); });
+					var MO = win.MutationObserver || win.MozMutationObserver;
+					if (MO) {
+						this._mutationObserver = new MO(function(mutations) { that._handleDataModified(mutations); });
 						this._mutationObserver.observe(clientDiv, {subtree: true, characterData: true});
 					} else {
-						handlers.push({target: this._clientDiv, type: "DOMCharacterDataModified", handler: function (e) { return self._handleDataModified(e ? e : window.event); }}); //$NON-NLS-0$
+						handlers.push({target: this._clientDiv, type: "DOMCharacterDataModified", handler: function (e) { return that._handleDataModified(e ? e : win.event); }}); //$NON-NLS-1$
 					}
 				}
 				if ((util.isFirefox && (!util.isWindows || util.isFirefox >= 15)) || util.isIE || util.isWebkit) {
-					handlers.push({target: this._clientDiv, type: "compositionstart", handler: function (e) { return self._handleCompositionStart(e ? e : window.event); }}); //$NON-NLS-0$
-					handlers.push({target: this._clientDiv, type: "compositionend", handler: function (e) { return self._handleCompositionEnd(e ? e : window.event); }}); //$NON-NLS-0$
-					handlers.push({target: this._clientDiv, type: "compositionupdate", handler: function (e) { return self._handleCompositionUpdate(e ? e : window.event); }}); //$NON-NLS-0$
+					handlers.push({target: this._clientDiv, type: "compositionstart", handler: function (e) { return that._handleCompositionStart(e ? e : win.event); }}); //$NON-NLS-1$
+					handlers.push({target: this._clientDiv, type: "compositionend", handler: function (e) { return that._handleCompositionEnd(e ? e : win.event); }}); //$NON-NLS-1$
+					handlers.push({target: this._clientDiv, type: "compositionupdate", handler: function (e) { return that._handleCompositionUpdate(e ? e : win.event); }}); //$NON-NLS-1$
 				}
 				if (this._overlayDiv) {
-					handlers.push({target: this._overlayDiv, type: "mousedown", handler: function(e) { return self._handleMouseDown(e ? e : window.event);}}); //$NON-NLS-0$
-					handlers.push({target: this._overlayDiv, type: "mouseover", handler: function(e) { return self._handleMouseOver(e ? e : window.event);}}); //$NON-NLS-0$
-					handlers.push({target: this._overlayDiv, type: "mouseout", handler: function(e) { return self._handleMouseOut(e ? e : window.event);}}); //$NON-NLS-0$
-					handlers.push({target: this._overlayDiv, type: "contextmenu", handler: function(e) { return self._handleContextMenu(e ? e : window.event); }}); //$NON-NLS-0$
+					handlers.push({target: this._overlayDiv, type: "mousedown", handler: function(e) { return that._handleMouseDown(e ? e : win.event);}}); //$NON-NLS-1$
+					handlers.push({target: this._overlayDiv, type: "mouseover", handler: function(e) { return that._handleMouseOver(e ? e : win.event);}}); //$NON-NLS-1$
+					handlers.push({target: this._overlayDiv, type: "mouseout", handler: function(e) { return that._handleMouseOut(e ? e : win.event);}}); //$NON-NLS-1$
+					handlers.push({target: this._overlayDiv, type: "contextmenu", handler: function(e) { return that._handleContextMenu(e ? e : win.event); }}); //$NON-NLS-1$
 				}
 				if (!this._isW3CEvents) {
-					handlers.push({target: this._clientDiv, type: "dblclick", handler: function(e) { return self._handleDblclick(e ? e : window.event); }}); //$NON-NLS-0$
+					handlers.push({target: this._clientDiv, type: "dblclick", handler: function(e) { return that._handleDblclick(e ? e : win.event); }}); //$NON-NLS-1$
 				}
 			}
 
@@ -19597,17 +19640,17 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		},
 		_hookRulerEvents: function(div, handlers) {
 			if (!div) { return; }
-			var self = this;
-			var window = this._getWindow();
+			var that = this;
+			var win = this._getWindow();
 			if (util.isIE) {
-				handlers.push({target: div, type: "selectstart", handler: function() {return false;}}); //$NON-NLS-0$
+				handlers.push({target: div, type: "selectstart", handler: function() {return false;}}); //$NON-NLS-1$
 			}
-			handlers.push({target: div, type: util.isFirefox > 26 ? "wheel" : util.isFirefox ? "DOMMouseScroll" : "mousewheel", handler: function(e) { return self._handleMouseWheel(e ? e : window.event); }}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-			handlers.push({target: div, type: "click", handler: function(e) { self._handleRulerEvent(e ? e : window.event); }}); //$NON-NLS-0$
-			handlers.push({target: div, type: "dblclick", handler: function(e) { self._handleRulerEvent(e ? e : window.event); }}); //$NON-NLS-0$
-			handlers.push({target: div, type: "mousemove", handler: function(e) { self._handleRulerEvent(e ? e : window.event); }}); //$NON-NLS-0$
-			handlers.push({target: div, type: "mouseover", handler: function(e) { self._handleRulerEvent(e ? e : window.event); }}); //$NON-NLS-0$
-			handlers.push({target: div, type: "mouseout", handler: function(e) { self._handleRulerEvent(e ? e : window.event); }}); //$NON-NLS-0$
+			handlers.push({target: div, type: util.isFirefox > 26 ? "wheel" : util.isFirefox ? "DOMMouseScroll" : "mousewheel", handler: function(e) { return that._handleMouseWheel(e ? e : win.event); }}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$
+			handlers.push({target: div, type: "click", handler: function(e) { that._handleRulerEvent(e ? e : win.event); }}); //$NON-NLS-1$
+			handlers.push({target: div, type: "dblclick", handler: function(e) { that._handleRulerEvent(e ? e : win.event); }}); //$NON-NLS-1$
+			handlers.push({target: div, type: "mousemove", handler: function(e) { that._handleRulerEvent(e ? e : win.event); }}); //$NON-NLS-1$
+			handlers.push({target: div, type: "mouseover", handler: function(e) { that._handleRulerEvent(e ? e : win.event); }}); //$NON-NLS-1$
+			handlers.push({target: div, type: "mouseout", handler: function(e) { that._handleRulerEvent(e ? e : win.event); }}); //$NON-NLS-1$
 		},
 		_getWindow: function() {
 			return getWindow(this._parent.ownerDocument);
@@ -19621,12 +19664,12 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			return false;
 		},
 		_init: function(options) {
-			var parent = options.parent;
-			if (typeof(parent) === "string") { //$NON-NLS-0$
-				parent = (options.document || document).getElementById(parent);
+			var _parent = options.parent;
+			if (typeof(_parent) === "string") { //$NON-NLS-1$
+				_parent = (options.document || document).getElementById(_parent);
 			}
-			if (!parent) { throw new Error("no parent"); } //$NON-NLS-0$
-			options.parent = parent;
+			if (!_parent) { throw new Error("no parent"); } //$NON-NLS-1$
+			options.parent = _parent;
 			options.model = options.model || new mTextModel.TextModel();
 			var defaultOptions = this._defaultOptions();
 			for (var option in defaultOptions) {
@@ -19637,7 +19680,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 					} else {
 						value = defaultOptions[option].value;
 					}
-					this["_" + option] = value; //$NON-NLS-0$
+					this["_" + option] = value; //$NON-NLS-1$
 				}
 			}
 			this._keyModes = [];
@@ -19651,8 +19694,8 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			this._ignoreFocus = false;
 			this._hasFocus = false;
 			this._dragOffset = -1;
-			this._isRangeRects = (!util.isIE || util.isIE >= 9) && typeof parent.ownerDocument.createRange().getBoundingClientRect === "function"; //$NON-NLS-0$
-			this._isW3CEvents = parent.addEventListener;
+			this._isRangeRects = (!util.isIE || util.isIE >= 9) && typeof _parent.ownerDocument.createRange().getBoundingClientRect === "function"; //$NON-NLS-1$
+			this._isW3CEvents = _parent.addEventListener;
 
 			/* Auto scroll */
 			this._autoScrollX = null;
@@ -19690,9 +19733,9 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 					var viewDiv = this._viewDiv;
 					var overlay = this._isOverOverlayScroll();
 					if (overlay.vertical || overlay.horizontal) {
-						viewDiv.style.pointerEvents = ""; //$NON-NLS-0$
+						viewDiv.style.pointerEvents = ""; //$NON-NLS-1$
 					} else {
-						viewDiv.style.pointerEvents = "none"; //$NON-NLS-0$
+						viewDiv.style.pointerEvents = "none"; //$NON-NLS-1$
 					}
 				}
 			}	
@@ -19713,10 +19756,10 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		},
 		_startUndo: function() {
 			if (this._undoStack) {
-				var self = this;
+				var that = this;
 				this._compoundChange = this._undoStack.startCompoundChange({
 					end: function() {
-						self._compoundChange = null;
+						that._compoundChange = null;
 					}
 				});
 			}
@@ -19730,7 +19773,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			if (this._readonly && !e._code) {
 				return false;
 			}
-			e.type = "Verify"; //$NON-NLS-0$
+			e.type = "Verify"; //$NON-NLS-1$
 			var oldStart = e.start = e.selection[0].start;
 			var oldEnd = e.end = e.selection[0].end;
 			this.onVerify(e);
@@ -19774,13 +19817,13 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			
 			if (e.selection.length > 1) this.setRedraw(true);
 
-			this.onModify({type: "Modify"}); //$NON-NLS-0$
+			this.onModify({type: "Modify"}); //$NON-NLS-1$
 			return true;
 		},
 		_onModelChanged: function(modelChangedEvent) {
-			modelChangedEvent.type = "ModelChanged"; //$NON-NLS-0$
+			modelChangedEvent.type = "ModelChanged"; //$NON-NLS-1$
 			this.onModelChanged(modelChangedEvent);
-			modelChangedEvent.type = "Changed"; //$NON-NLS-0$
+			modelChangedEvent.type = "Changed"; //$NON-NLS-1$
 			var start = modelChangedEvent.start;
 			var addedCharCount = modelChangedEvent.addedCharCount;
 			var removedCharCount = modelChangedEvent.removedCharCount;
@@ -19837,17 +19880,17 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			this._update();
 		},
 		_onModelChanging: function(modelChangingEvent) {
-			modelChangingEvent.type = "ModelChanging"; //$NON-NLS-0$
+			modelChangingEvent.type = "ModelChanging"; //$NON-NLS-1$
 			this.onModelChanging(modelChangingEvent);
-			modelChangingEvent.type = "Changing"; //$NON-NLS-0$
+			modelChangingEvent.type = "Changing"; //$NON-NLS-1$
 		},
 		_queueUpdate: function() {
 			if (this._updateTimer || this._ignoreQueueUpdate) { return; }
-			var self = this;
-			var window = this._getWindow();
-			this._updateTimer = window.setTimeout(function() { 
-				self._updateTimer = null;
-				self._update();
+			var that = this;
+			var win = this._getWindow();
+			this._updateTimer = win.setTimeout(function() { 
+				that._updateTimer = null;
+				that._update();
 			}, 0);
 		},
 		_rangesToSelections: function(ranges) {
@@ -19929,23 +19972,23 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			}
 		},
 		_scrollViewAnimated: function (pixelX, pixelY, callback) {
-			var window = this._getWindow();
+			var win = this._getWindow();
 			if (callback && this._scrollAnimation) {
-				var self = this;
+				var that = this;
 				this._animation = new Animation({
-					window: window,
+					window: win,
 					duration: this._scrollAnimation,
 					curve: [pixelY, 0],
 					onAnimate: function(x) {
 						var deltaY = pixelY - Math.floor(x);
-						self._scrollView (0, deltaY);
+						that._scrollView (0, deltaY);
 						pixelY -= deltaY;
 					},
 					onEnd: function() {
-						self._animation = null;
-						self._scrollView (pixelX, pixelY);
+						that._animation = null;
+						that._scrollView (pixelX, pixelY);
 						if (callback) {
-							window.setTimeout(callback, 0);
+							win.setTimeout(callback, 0);
 						}
 					}
 				});
@@ -19953,7 +19996,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			} else {
 				this._scrollView (pixelX, pixelY);
 				if (callback) {
-					window.setTimeout(callback, 0);
+					win.setTimeout(callback, 0);
 				}
 			}
 		}, 
@@ -19977,53 +20020,54 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			if (pixelX) { viewDiv.scrollLeft += pixelX; }
 			if (pixelY) { viewDiv.scrollTop += pixelY; }
 		},
-		_setClipboardText: function (text, event) {
+		_setClipboardText: function (text, evt) {
 			var clipboardText;
 			// IE
-			var window = this._getWindow();
-			var clipboardData = window.clipboardData;
+			var win = this._getWindow();
+			var clipboardData = win.clipboardData;
 			// WebKit and Firefox > 21
-			if (!clipboardData && event) {
-				clipboardData = event.clipboardData;
+			if (!clipboardData && evt) {
+				clipboardData = evt.clipboardData;
 			}
 			if (clipboardData) {
 				clipboardText = [];
 				convertDelimiter(text, function(t) {clipboardText.push(t);}, function() {clipboardText.push(util.platformDelimiter);});
 				/*
-				* Note that setData() succeeds on Firefox 22 and greater, but the return value is not a boolean like IE and Chrome.
+				* Note that setData() succeeds on Firefox > 21 and WebKit, but the return value is not a boolean like IE.
 				*/
-				var success = clipboardData.setData(util.isIE ? "Text" : "text/plain", clipboardText.join("")); //$NON-NLS-1$ //$NON-NLS-0$
-				if (success || util.isFirefox > 21) {
+				var success = clipboardData.setData(util.isIE ? "Text" : "text/plain", clipboardText.join("")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (success || (evt && (util.isFirefox > 21 || util.isWebkit))) {
 					return true;
 				}
+				if (!evt) return false;
 			}
-			var document = this._parent.ownerDocument;
-			var child = util.createElement(document, "pre"); //$NON-NLS-0$
-			child.style.position = "fixed"; //$NON-NLS-0$
-			child.style.left = "-1000px"; //$NON-NLS-0$
+			var doc = this._parent.ownerDocument;
+			var child = util.createElement(doc, "pre"); //$NON-NLS-1$
+			child.style.position = "fixed"; //$NON-NLS-1$
+			child.style.left = "-1000px"; //$NON-NLS-1$
 			convertDelimiter(text, 
 				function(t) {
-					child.appendChild(document.createTextNode(t));
+					child.appendChild(doc.createTextNode(t));
 				}, 
 				function() {
-					child.appendChild(util.createElement(document, "br")); //$NON-NLS-0$
+					child.appendChild(util.createElement(doc, "br")); //$NON-NLS-1$
 				}
 			);
-			child.appendChild(document.createTextNode(" ")); //$NON-NLS-0$
+			child.appendChild(doc.createTextNode(" ")); //$NON-NLS-1$
 			this._clientDiv.appendChild(child);
-			var range = document.createRange();
+			var range = doc.createRange();
 			range.setStart(child.firstChild, 0);
 			range.setEndBefore(child.lastChild);
-			var sel = window.getSelection();
+			var sel = win.getSelection();
 			if (sel.rangeCount > 0) { sel.removeAllRanges(); }
 			sel.addRange(range);
-			var self = this;
+			var that = this;
 			/** @ignore */
 			var cleanup = function() {
-				if (child && child.parentNode === self._clientDiv) {
-					self._clientDiv.removeChild(child);
+				if (child && child.parentNode === that._clientDiv) {
+					that._clientDiv.removeChild(child);
 				}
-				self._updateDOMSelection();
+				that._updateDOMSelection();
 			};
 			var result = false;
 			/* 
@@ -20032,12 +20076,12 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			*/
 			this._ignoreCopy = true;
 			try {
-				result = document.execCommand("copy", false, null); //$NON-NLS-0$
+				result = doc.execCommand("copy", false, null); //$NON-NLS-1$
 			} catch (e) {}
 			this._ignoreCopy = false;
 			if (!result) {
-				if (event) {
-					window.setTimeout(cleanup, 0);
+				if (evt) {
+					win.setTimeout(cleanup, 0);
 					return false;
 				}
 			}
@@ -20073,7 +20117,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				clientDiv.focus();
 			}
 			if (this._overlayDiv) {
-				this._overlayDiv.style.zIndex = visible ? "-1" : "1"; //$NON-NLS-1$ //$NON-NLS-0$
+				this._overlayDiv.style.zIndex = visible ? "-1" : "1"; //$NON-NLS-1$ //$NON-NLS-2$
 			}
 			var line = this._getLineNext();
 			while (line) {
@@ -20082,7 +20126,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			}
 			this._updateDOMSelection();
 		},
-		_setSelection: function (selection, scroll, update, callback, pageScroll, add, preserveCursorX) {
+		_setSelection: function (selection, _scroll, update, callback, pageScroll, add, preserveCursorX) {
 			if (selection) {
 				if (update === undefined) { update = true; }
 				var oldSelection = this._getSelections(), newSelection;
@@ -20107,7 +20151,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				* keyboard navigation when the selection does not chanage. For example, line down
 				* when the caret is already at the last line.
 				*/
-				if (scroll !== false) { /*update = !*/this._showCaret(false, callback, scroll, pageScroll); }
+				if (_scroll !== false) { /*update = !*/this._showCaret(false, callback, _scroll, pageScroll); }
 				
 				/* 
 				* Sometimes the browser changes the selection 
@@ -20119,7 +20163,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				
 				if (!Selection.compare(oldSelection, newSelection)) {
 					var e = {
-						type: "Selection", //$NON-NLS-0$
+						type: "Selection", //$NON-NLS-1$
 						oldValue: Selection.convert(oldSelection),
 						newValue: Selection.convert(newSelection)
 					};
@@ -20130,7 +20174,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		_setSelectionTo: function (x, y, down, extent, add, drag) {
 			var model = this._model;
 			var selections = this._getSelections();
-			var pt = this.convert({x: x, y: y}, "page", "document"); //$NON-NLS-1$ //$NON-NLS-0$
+			var pt = this.convert({x: x, y: y}, "page", "document"); //$NON-NLS-1$ //$NON-NLS-2$
 			var lineIndex = this._getLineIndex(pt.y);
 			var line = this._getLine(lineIndex);
 			var offset = line.getOffset(pt.x, pt.y - this._getLinePixel(lineIndex));
@@ -20170,14 +20214,14 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 						if (this._doubleClickSelection) {
 							if (offset >= this._doubleClickSelection.start) {
 								start = this._doubleClickSelection.start;
-								end = line.getNextOffset(offset, {unit:"wordend", count:1}); //$NON-NLS-0$
+								end = line.getNextOffset(offset, {unit:"wordend", count:1}); //$NON-NLS-1$
 							} else {
-								start = line.getNextOffset(offset, {unit:"word", count:-1}); //$NON-NLS-0$
+								start = line.getNextOffset(offset, {unit:"word", count:-1}); //$NON-NLS-1$
 								end = this._doubleClickSelection.end;
 							}
 						} else {
-							start = line.getNextOffset(offset, {unit:"word", count:-1}); //$NON-NLS-0$
-							end = line.getNextOffset(start, {unit:"wordend", count:1}); //$NON-NLS-0$
+							start = line.getNextOffset(offset, {unit:"word", count:-1}); //$NON-NLS-1$
+							end = line.getNextOffset(start, {unit:"wordend", count:1}); //$NON-NLS-1$
 						}
 					} else {
 						if (this._doubleClickSelection) {
@@ -20227,15 +20271,15 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			if (this._blockCursorVisible || this._overwriteMode) {
 				if (!this._cursorDiv) {
 					var viewDiv = this._viewDiv;
-					var cursorDiv = util.createElement(viewDiv.ownerDocument, "div"); //$NON-NLS-0$
-					cursorDiv.className = "textviewBlockCursor"; //$NON-NLS-0$
+					var cursorDiv = util.createElement(viewDiv.ownerDocument, "div"); //$NON-NLS-1$
+					cursorDiv.className = "textviewBlockCursor"; //$NON-NLS-1$
 					this._cursorDiv = cursorDiv;
 					cursorDiv.tabIndex = -1;
-					cursorDiv.style.zIndex = "2"; //$NON-NLS-0$
-					cursorDiv.style.color = "transparent"; //$NON-NLS-0$
-					cursorDiv.style.position = "absolute"; //$NON-NLS-0$
-					cursorDiv.style.pointerEvents = "none"; //$NON-NLS-0$
-					cursorDiv.innerHTML = " "; //$NON-NLS-0$
+					cursorDiv.style.zIndex = "2"; //$NON-NLS-1$
+					cursorDiv.style.color = "transparent"; //$NON-NLS-1$
+					cursorDiv.style.position = "absolute"; //$NON-NLS-1$
+					cursorDiv.style.pointerEvents = "none"; //$NON-NLS-1$
+					cursorDiv.innerHTML = " "; //$NON-NLS-1$
 					viewDiv.appendChild(cursorDiv);
 					this._updateDOMSelection();
 				}
@@ -20248,7 +20292,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		},
 		_setMarginOffset: function(marginOffset, init) {
 			this._marginOffset = marginOffset;
-			this._marginDiv.style.display = marginOffset ? "block" : "none"; //$NON-NLS-1$ //$NON-NLS-0$
+			this._marginDiv.style.display = marginOffset ? "block" : "none"; //$NON-NLS-1$ //$NON-NLS-2$
 			if (!init) {
 				this._metrics = this._calculateMetrics();
 				this._queueUpdate();
@@ -20263,7 +20307,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		},
 		_setReadOnly: function (readOnly) {
 			this._readonly = readOnly;
-			this._clientDiv.setAttribute("aria-readonly", readOnly ? "true" : "false"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			this._clientDiv.setAttribute("aria-readonly", readOnly ? "true" : "false"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$
 		},
 		_setSingleMode: function (singleMode, init) {
 			this._singleMode = singleMode;
@@ -20295,20 +20339,20 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		},
 		_setTheme: function(theme) {
 			if (this._theme) {
-				this._theme.removeEventListener("ThemeChanged", this._themeListener.onChanged); //$NON-NLS-0$
+				this._theme.removeEventListener("ThemeChanged", this._themeListener.onChanged); //$NON-NLS-1$
 			}
 			this._theme = theme;
 			if (this._theme) {
-				this._theme.addEventListener("ThemeChanged", this._themeListener.onChanged); //$NON-NLS-0$
+				this._theme.addEventListener("ThemeChanged", this._themeListener.onChanged); //$NON-NLS-1$
 			}
 			this._setThemeClass(this._themeClass);
 		},
 		_setThemeClass: function (themeClass, init) {
 			this._themeClass = themeClass;
-			var viewContainerClass = "textview"; //$NON-NLS-0$
+			var viewContainerClass = "textview"; //$NON-NLS-1$
 			var globalThemeClass = this._theme.getThemeClass();
-			if (globalThemeClass) { viewContainerClass += " " + globalThemeClass; } //$NON-NLS-0$
-			if (this._themeClass && globalThemeClass !== this._themeClass) { viewContainerClass += " " + this._themeClass; } //$NON-NLS-0$
+			if (globalThemeClass) { viewContainerClass += " " + globalThemeClass; } //$NON-NLS-1$
+			if (this._themeClass && globalThemeClass !== this._themeClass) { viewContainerClass += " " + this._themeClass; } //$NON-NLS-1$
 			this._rootDiv.className = viewContainerClass;
 			this._updateStyle(init);
 		},
@@ -20319,11 +20363,11 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			this._wrapMode = wrapMode && this._wrappable;
 			var clientDiv = this._clientDiv;
 			if (this._wrapMode) {
-				clientDiv.style.whiteSpace = "pre-wrap"; //$NON-NLS-0$
-				clientDiv.style.wordWrap = "break-word"; //$NON-NLS-0$
+				clientDiv.style.whiteSpace = "pre-wrap"; //$NON-NLS-1$
+				clientDiv.style.wordWrap = "break-word"; //$NON-NLS-1$
 			} else {
-				clientDiv.style.whiteSpace = "pre"; //$NON-NLS-0$
-				clientDiv.style.wordWrap = "normal"; //$NON-NLS-0$
+				clientDiv.style.whiteSpace = "pre"; //$NON-NLS-1$
+				clientDiv.style.wordWrap = "normal"; //$NON-NLS-1$
 			}
 			this._updateOverflow();
 			if (!init) {
@@ -20339,8 +20383,8 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			if (this._imeOffset !== -1) return;
 			var model = this._model;
 			var selections = this._getSelections();
-			var selection = Selection.editing(selections, this._autoScrollDir === "down"); //$NON-NLS-0$
-			var scroll = this._getScroll();
+			var selection = Selection.editing(selections, this._autoScrollDir === "down"); //$NON-NLS-1$
+			var _scroll = this._getScroll();
 			var caret = selection.getCaret();
 			var start = selection.start;
 			var end = selection.end;
@@ -20353,15 +20397,15 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			var bounds = this._getBoundsAtOffset(caret === start ? start : endInclusive);
 			var left = bounds.left;
 			var right = bounds.right;
-			var top = bounds.top;
+			var _top = bounds.top;
 			var bottom = bounds.bottom;
 			var selectionHeight = 0;
-			var hasShowOptions = typeof showOptions === "object"; //$NON-NLS-0$
+			var hasShowOptions = typeof showOptions === "object"; //$NON-NLS-1$
 			if ((allSelection || hasShowOptions) && !selection.isEmpty()) {
 				bounds = this._getBoundsAtOffset(caret === end ? start : endInclusive);
-				selectionHeight = (bounds.bottom > bottom ? bounds.bottom : bottom) - (bounds.top < top ? bounds.top : top);
+				selectionHeight = (bounds.bottom > bottom ? bounds.bottom : bottom) - (bounds.top < _top ? bounds.top : _top);
 				if (allSelection) {
-					if (bounds.top === top) {
+					if (bounds.top === _top) {
 						if (caret === start) {
 							right = left + Math.min(bounds.right - left, clientWidth);
 						} else {
@@ -20369,25 +20413,25 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 						}
 					} else {
 						if (caret === start) {
-							bottom = top + Math.min(bounds.bottom - top, clientHeight);
+							bottom = _top + Math.min(bounds.bottom - _top, clientHeight);
 						} else {
-							top = bottom - Math.min(bottom - bounds.top, clientHeight);
+							_top = bottom - Math.min(bottom - bounds.top, clientHeight);
 						}
 					}
 				}
 			}
 			var pixelX = 0;
-			if (left < scroll.x) {
-				pixelX = Math.min(left - scroll.x, -minScroll);
+			if (left < _scroll.x) {
+				pixelX = Math.min(left - _scroll.x, -minScroll);
 			}
-			if (right > scroll.x + clientWidth) {
-				pixelX = Math.max(right - scroll.x - clientWidth, minScroll);
+			if (right > _scroll.x + clientWidth) {
+				pixelX = Math.max(right - _scroll.x - clientWidth, minScroll);
 			}
 			var pixelY = 0;
-			if (top < scroll.y) {
-				pixelY = top - scroll.y;
-			} else if (bottom > scroll.y + clientHeight) {
-				pixelY = bottom - scroll.y - clientHeight;
+			if (_top < _scroll.y) {
+				pixelY = _top - _scroll.y;
+			} else if (bottom > _scroll.y + clientHeight) {
+				pixelY = bottom - _scroll.y - clientHeight;
 			}
 			if (pageScroll) {
 				if (pageScroll > 0) {
@@ -20400,38 +20444,38 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 					}
 				}
 			}
-			var alwaysScroll = hasShowOptions && showOptions.scrollPolicy === "always"; //$NON-NLS-0$
+			var alwaysScroll = hasShowOptions && showOptions.scrollPolicy === "always"; //$NON-NLS-1$
 			if (pixelX !== 0 || pixelY !== 0 || alwaysScroll) {
 				if (hasShowOptions) {
 					var flag = pixelY > 0;
 					if (pixelY === 0) {
-						pixelY = top - scroll.y;
+						pixelY = _top - _scroll.y;
 					}
 					var viewAnchor = showOptions.viewAnchor;
 					var selectionAnchor = showOptions.selectionAnchor;
 					var viewAnchorOffset = Math.min(Math.max(0, showOptions.viewAnchorOffset || 0));
 //					var selectionAnchorOffset = Math.min(Math.max(0, showOptions.selectionAnchorOffset || 0));
-					if (viewAnchor === "top") { //$NON-NLS-0$
+					if (viewAnchor === "top") { //$NON-NLS-1$
 						pixelY += Math.floor(flag ? (1 - viewAnchorOffset) * clientHeight : -viewAnchorOffset * clientHeight);
-					} else if (viewAnchor === "bottom") { //$NON-NLS-0$
+					} else if (viewAnchor === "bottom") { //$NON-NLS-1$
 						pixelY += Math.floor(flag ? viewAnchorOffset * clientHeight : -(1 - viewAnchorOffset) * clientHeight);
-					} else if (viewAnchor === "center") { //$NON-NLS-0$
+					} else if (viewAnchor === "center") { //$NON-NLS-1$
 						pixelY += Math.floor(flag ? clientHeight / 2 + viewAnchorOffset * clientHeight : clientHeight / 2  - (1 - viewAnchorOffset) * clientHeight);
 					} else { // caret is the default
 						pixelY += Math.floor(flag ? viewAnchorOffset * clientHeight : -viewAnchorOffset * clientHeight);
 					}
 					if (startLine !== endLine) {
-						if (selectionAnchor === "top" && caret !== start) { //$NON-NLS-0$
+						if (selectionAnchor === "top" && caret !== start) { //$NON-NLS-1$
 							pixelY += Math.floor(-selectionHeight);
-						} else if (selectionAnchor === "bottom" && caret !== end) { //$NON-NLS-0$
+						} else if (selectionAnchor === "bottom" && caret !== end) { //$NON-NLS-1$
 							pixelY += Math.floor(selectionHeight);
-						} else if (selectionAnchor === "center") { //$NON-NLS-0$
+						} else if (selectionAnchor === "center") { //$NON-NLS-1$
 							pixelY += Math.floor(selectionHeight / 2);
 						} else {
 							// caret is the default
 						}
 					}
-				} else if (pixelY !== 0 && typeof showOptions === "number") { //$NON-NLS-0$
+				} else if (pixelY !== 0 && typeof showOptions === "number") { //$NON-NLS-1$
 					if (showOptions < 0) { showOptions = 0; }
 					if (showOptions > 1) { showOptions = 1; }
 					pixelY += Math.floor(pixelY > 0 ? showOptions * clientHeight : -showOptions * clientHeight);
@@ -20469,9 +20513,9 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			this._imeOffset = selections[0].start;
 		},
 		_unhookEvents: function() {
-			this._model.removeEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-0$
-			this._model.removeEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-0$
-			this._theme.removeEventListener("ThemeChanged", this._themeListener.onChanged); //$NON-NLS-0$
+			this._model.removeEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-1$
+			this._model.removeEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-1$
+			this._theme.removeEventListener("ThemeChanged", this._themeListener.onChanged); //$NON-NLS-1$
 			this._modelListener = null;
 			for (var i=0; i 1) {
 				if (!this._cursorTimer) {
-					this._cursorTimer = window.setInterval(function() {
-						self._cursorVisible = !self._cursorVisible;
-						self._domSelection.forEach(function(domSelection) { domSelection.update(); });
+					this._cursorTimer = win.setInterval(function() {
+						that._cursorVisible = !that._cursorVisible;
+						that._domSelection.forEach(function(domSelection) { domSelection.update(); });
 					}, 500);
 				}
 			} else {
 				if (this._cursorTimer) {
-					window.clearInterval(this._cursorTimer);
+					win.clearInterval(this._cursorTimer);
 					this._cursorTimer = null;
 				}
 			}
@@ -20521,8 +20565,8 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		_update: function(hScrollOnly) {
 			if (this._redrawCount > 0) { return; }
 			if (this._updateTimer) {
-				var window = this._getWindow();
-				window.clearTimeout(this._updateTimer);
+				var win = this._getWindow();
+				win.clearTimeout(this._updateTimer);
 				this._updateTimer = null;
 				hScrollOnly = false;
 			}
@@ -20535,7 +20579,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				this._ignoreQueueUpdate = false;
 			}
 			var model = this._model;
-			var scroll = this._getScroll(false);
+			var _scroll = this._getScroll(false);
 			var viewPad = this._getViewPadding();
 			var lineCount = model.getLineCount();
 			var lineHeight = this._getLineHeight();
@@ -20544,7 +20588,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			var scrollbarWidth = this._metrics.scrollWidth;
 			
 			if (this._wrapMode) {
-				clientDiv.style.width = (this._metrics.wrapWidth || this._getClientWidth()) + "px"; //$NON-NLS-0$
+				clientDiv.style.width = (this._metrics.wrapWidth || this._getClientWidth()) + "px"; //$NON-NLS-1$
 			}
 			
 			/*
@@ -20553,14 +20597,14 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 			* topIndexY - portion of the top line that is NOT visible.
 			* top - topIndexY plus height of the line before top line (if any)
 			*/
-			var topIndex, lineStart, top, topIndexY,
+			var topIndex, lineStart, _top, topIndexY,
 				leftWidth, leftRect,
 				clientWidth, clientHeight, scrollWidth, scrollHeight,
 				totalHeight = 0, totalLineIndex = 0, tempLineHeight;
 			if (this._lineHeight) {
 				while (totalLineIndex < lineCount) {
 					tempLineHeight = this._getLineHeight(totalLineIndex);
-					if (totalHeight + tempLineHeight > scroll.y) {
+					if (totalHeight + tempLineHeight > _scroll.y) {
 						break;
 					}
 					totalHeight += tempLineHeight;
@@ -20568,15 +20612,15 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				}
 				topIndex = totalLineIndex;
 				lineStart = Math.max(0, topIndex - 1);
-				topIndexY = top = scroll.y - totalHeight;
+				topIndexY = _top = _scroll.y - totalHeight;
 				if (topIndex > 0) {
-					top += this._getLineHeight(topIndex - 1);
+					_top += this._getLineHeight(topIndex - 1);
 				}
 			} else {
-				var firstLine = Math.max(0, scroll.y) / lineHeight;
+				var firstLine = Math.max(0, _scroll.y) / lineHeight;
 				topIndex = Math.floor(firstLine);
 				lineStart = Math.max(0, topIndex - 1);
-				top = Math.round((firstLine - lineStart) * lineHeight);
+				_top = Math.round((firstLine - lineStart) * lineHeight);
 				topIndexY = Math.round((firstLine - topIndex) * lineHeight);
 				scrollHeight = lineCount * lineHeight;
 			}
@@ -20620,7 +20664,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 					var nextChild = child.nextSibling;
 					if (!(lineStart <= lineIndex && lineIndex <= lineEnd) || child.lineRemoved || child.lineIndex === -1) {
 						if (this._mouseWheelLine === child) {
-							child.style.display = "none"; //$NON-NLS-0$
+							child.style.display = "none"; //$NON-NLS-1$
 							child.lineIndex = -1;
 						} else {
 							clientDiv.removeChild(child);
@@ -20630,15 +20674,15 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				}
 	
 				child = this._getLineNext();
-				var document = viewDiv.ownerDocument;
-				var frag = document.createDocumentFragment();
+				var doc = viewDiv.ownerDocument;
+				var frag = doc.createDocumentFragment();
 				for (lineIndex=lineStart; lineIndex<=lineEnd; lineIndex++) {
 					if (!child || child.lineIndex > lineIndex) {
 						new TextLine(this, lineIndex).create(frag, null);
 					} else {
 						if (frag.firstChild) {
 							clientDiv.insertBefore(frag, child);
-							frag = document.createDocumentFragment();
+							frag = doc.createDocumentFragment();
 						}
 						if (child && child.lineChanged) {
 							child = new TextLine(this, lineIndex).create(frag, child);
@@ -20658,12 +20702,12 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				* reset to the appropriate value further down.
 				*/ 
 				if (util.isWebkit && !this._wrapMode) {
-					clientDiv.style.width = "0x7fffffffpx"; //$NON-NLS-0$
+					clientDiv.style.width = "0x7fffffffpx"; //$NON-NLS-1$
 				}
 	
 				var rect;
 				child = this._getLineNext();
-				var bottomHeight = clientHeight + top;
+				var bottomHeight = clientHeight + _top;
 				var foundBottomIndex = false;
 				while (child) {
 					lineWidth = child.lineWidth;
@@ -20735,24 +20779,24 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 					var rightRect = this._rightDiv.getBoundingClientRect();
 					rightWidth = rightRect.right - rightRect.left;
 				}
-				viewDiv.style.left = leftWidth + "px"; //$NON-NLS-0$
-				viewDiv.style.right = rightWidth + "px"; //$NON-NLS-0$
+				viewDiv.style.left = leftWidth + "px"; //$NON-NLS-1$
+				viewDiv.style.right = rightWidth + "px"; //$NON-NLS-1$
 
 				/* Need to set the height first in order for the width to consider the vertical scrollbar */
 				var scrollDiv = this._scrollDiv;
-				scrollDiv.style.height = (scrollHeight + (util.isWebkit ? 0 : viewPad.bottom)) + "px"; //$NON-NLS-0$
+				scrollDiv.style.height = (scrollHeight + (util.isWebkit ? 0 : viewPad.bottom)) + "px"; //$NON-NLS-1$
 				
 				clientWidth = this._getClientWidth();
 				if (!this._singleMode && !this._wrapMode && !this._noScroll) {
 					var clientHeightNoScroll = clientHeight, clientHeightScroll = clientHeight;
-					var oldHScroll = viewDiv.style.overflowX === "scroll"; //$NON-NLS-0$
+					var oldHScroll = viewDiv.style.overflowX === "scroll"; //$NON-NLS-1$
 					if (oldHScroll) {
 						clientHeightNoScroll += scrollbarWidth;
 					} else {
 						clientHeightScroll -= scrollbarWidth;
 					}
 					var clientWidthNoScroll = clientWidth, clientWidthScroll = clientWidth;
-					var oldVScroll = viewDiv.style.overflowY === "scroll"; //$NON-NLS-0$
+					var oldVScroll = viewDiv.style.overflowY === "scroll"; //$NON-NLS-1$
 					if (oldVScroll) {
 						clientWidthNoScroll += scrollbarWidth;
 					} else {
@@ -20773,10 +20817,10 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 						}
 					}
 					if (oldHScroll !== hScroll) {
-						viewDiv.style.overflowX = hScroll ? "scroll" : "hidden"; //$NON-NLS-1$ //$NON-NLS-0$
+						viewDiv.style.overflowX = hScroll ? "scroll" : "hidden"; //$NON-NLS-1$ //$NON-NLS-2$
 					}
 					if (oldVScroll !== vScroll) {
-						viewDiv.style.overflowY = vScroll ? "scroll" : "hidden"; //$NON-NLS-1$ //$NON-NLS-0$
+						viewDiv.style.overflowY = vScroll ? "scroll" : "hidden"; //$NON-NLS-1$ //$NON-NLS-2$
 					}
 					needUpdate = oldHScroll !== hScroll || oldVScroll !== vScroll;
 				}
@@ -20795,42 +20839,42 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				*/
 				scrollWidth = width;
 				if ((!util.isIE || util.isIE >= 9) && this._maxLineWidth > clientWidth) { width += viewPad.right + viewPad.left; }
-				scrollDiv.style.width = width + "px"; //$NON-NLS-0$
+				scrollDiv.style.width = width + "px"; //$NON-NLS-1$
 				if (this._clipScrollDiv) {
-					this._clipScrollDiv.style.width = width + "px"; //$NON-NLS-0$
+					this._clipScrollDiv.style.width = width + "px"; //$NON-NLS-1$
 				}
 				/* Get the left scroll after setting the width of the scrollDiv as this can change the horizontal scroll offset. */
-				scroll = this._getScroll(false);
+				_scroll = this._getScroll(false);
 
 				var innerRightDiv = this._innerRightDiv;
 				if (innerRightDiv) {
-					innerRightDiv.style.right = rightWidth + (viewDiv.style.overflowY === "scroll" ? this._metrics.scrollWidth : 0) + "px"; //$NON-NLS-1$ //$NON-NLS-0$
-					innerRightDiv.style.bottom = (viewDiv.style.overflowX === "scroll" ? scrollbarWidth : 0) + "px"; //$NON-NLS-1$ //$NON-NLS-0$
+					innerRightDiv.style.right = rightWidth + (viewDiv.style.overflowY === "scroll" ? this._metrics.scrollWidth : 0) + "px"; //$NON-NLS-1$ //$NON-NLS-1$
+					innerRightDiv.style.bottom = (viewDiv.style.overflowX === "scroll" ? scrollbarWidth : 0) + "px"; //$NON-NLS-1$ //$NON-NLS-1$
 				}
 			}
 			this._scrollHeight = scrollHeight;
 			if (this._vScrollDiv) {
 				var trackHeight = clientHeight - 8;
 				var thumbHeight = Math.max(15, Math.ceil(Math.min(1, trackHeight / (scrollHeight + viewPad.top + viewPad.bottom)) * trackHeight));
-				this._vScrollDiv.style.left = (leftWidth + clientWidth - 8) + "px"; //$NON-NLS-0$
-				this._vScrollDiv.style.top = Math.floor(Math.max(0, (scroll.y * trackHeight / scrollHeight))) + "px"; //$NON-NLS-0$
-				this._vScrollDiv.style.height = thumbHeight + "px"; //$NON-NLS-0$
+				this._vScrollDiv.style.left = (leftWidth + clientWidth - 8) + "px"; //$NON-NLS-1$
+				this._vScrollDiv.style.top = Math.floor(Math.max(0, (_scroll.y * trackHeight / scrollHeight))) + "px"; //$NON-NLS-1$
+				this._vScrollDiv.style.height = thumbHeight + "px"; //$NON-NLS-1$
 			}
 			if (!this._wrapMode && this._hScrollDiv) {
 				var trackWidth = clientWidth - 8;
 				var thumbWidth = Math.max(15, Math.ceil(Math.min(1, trackWidth / (this._maxLineWidth + viewPad.left + viewPad.right)) * trackWidth));
-				this._hScrollDiv.style.left = leftWidth + Math.floor(Math.max(0, Math.floor(scroll.x * trackWidth / this._maxLineWidth))) + "px"; //$NON-NLS-0$
-				this._hScrollDiv.style.top = (clientHeight - 9) + "px"; //$NON-NLS-0$
-				this._hScrollDiv.style.width = thumbWidth + "px"; //$NON-NLS-0$
+				this._hScrollDiv.style.left = leftWidth + Math.floor(Math.max(0, Math.floor(_scroll.x * trackWidth / this._maxLineWidth))) + "px"; //$NON-NLS-1$
+				this._hScrollDiv.style.top = (clientHeight - 9) + "px"; //$NON-NLS-1$
+				this._hScrollDiv.style.width = thumbWidth + "px"; //$NON-NLS-1$
 			}
-			var left = scroll.x;	
+			var left = _scroll.x;	
 			var clipDiv = this._clipDiv;
 			var overlayDiv = this._overlayDiv;
 			var marginDiv = this._marginDiv;
 			var clipLeft, clipTop;
 			if (marginDiv) {
-				marginDiv.style.left = (-left + leftWidth + this._metrics.marginWidth + viewPad.left) + "px"; //$NON-NLS-0$
-				marginDiv.style.bottom = (viewDiv.style.overflowX === "scroll" ? scrollbarWidth : 0) + "px"; //$NON-NLS-1$ //$NON-NLS-0$
+				marginDiv.style.left = (-left + leftWidth + this._metrics.marginWidth + viewPad.left) + "px"; //$NON-NLS-1$
+				marginDiv.style.bottom = (viewDiv.style.overflowX === "scroll" ? scrollbarWidth : 0) + "px"; //$NON-NLS-1$ //$NON-NLS-1$
 			}
 			if (clipDiv) {
 				clipDiv.scrollLeft = left;
@@ -20839,31 +20883,31 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				clipTop = viewPad.top;
 				var clipWidth = clientWidth;
 				var clipHeight = clientHeight;
-				var clientLeft = 0, clientTop = -top;
-				if (scroll.x === 0) {
+				var clientLeft = 0, clientTop = -_top;
+				if (_scroll.x === 0) {
 					clipLeft -= viewPad.left;
 					clipWidth += viewPad.left;
 					clientLeft = viewPad.left;
 				} 
-				if (scroll.x + clientWidth === scrollWidth) {
+				if (_scroll.x + clientWidth === scrollWidth) {
 					clipWidth += viewPad.right;
 				}
-				if (scroll.y === 0) {
+				if (_scroll.y === 0) {
 					clipTop -= viewPad.top;
 					clipHeight += viewPad.top;
 					clientTop += viewPad.top;
 				}
-				if (scroll.y + clientHeight === scrollHeight) { 
+				if (_scroll.y + clientHeight === scrollHeight) { 
 					clipHeight += viewPad.bottom; 
 				}
-				clipDiv.style.left = clipLeft + "px"; //$NON-NLS-0$
-				clipDiv.style.top = clipTop + "px"; //$NON-NLS-0$
-				clipDiv.style.right = (rootWidth - clipWidth - clipLeft) + "px"; //$NON-NLS-0$
-				clipDiv.style.bottom = (rootHeight - clipHeight - clipTop) + "px"; //$NON-NLS-0$
-				clientDiv.style.left = clientLeft + "px"; //$NON-NLS-0$
-				clientDiv.style.top = clientTop + "px"; //$NON-NLS-0$
-				clientDiv.style.width = scrollWidth + "px"; //$NON-NLS-0$
-				clientDiv.style.height = (clientHeight + top) + "px"; //$NON-NLS-0$
+				clipDiv.style.left = clipLeft + "px"; //$NON-NLS-1$
+				clipDiv.style.top = clipTop + "px"; //$NON-NLS-1$
+				clipDiv.style.right = (rootWidth - clipWidth - clipLeft) + "px"; //$NON-NLS-1$
+				clipDiv.style.bottom = (rootHeight - clipHeight - clipTop) + "px"; //$NON-NLS-1$
+				clientDiv.style.left = clientLeft + "px"; //$NON-NLS-1$
+				clientDiv.style.top = clientTop + "px"; //$NON-NLS-1$
+				clientDiv.style.width = scrollWidth + "px"; //$NON-NLS-1$
+				clientDiv.style.height = (clientHeight + _top) + "px"; //$NON-NLS-1$
 				if (overlayDiv) {
 					overlayDiv.style.left = clientDiv.style.left;
 					overlayDiv.style.top = clientDiv.style.top;
@@ -20872,19 +20916,19 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				}
 			} else {
 				clipLeft = left;
-				clipTop = top;
+				clipTop = _top;
 				var clipRight = left + clientWidth;
-				var clipBottom = top + clientHeight;
+				var clipBottom = _top + clientHeight;
 				if (clipLeft === 0) { clipLeft -= viewPad.left; }
 				if (clipTop === 0) { clipTop -= viewPad.top; }
 				if (clipRight === scrollWidth) { clipRight += viewPad.right; }
-				if (scroll.y + clientHeight === scrollHeight) { clipBottom += viewPad.bottom; }
-				clientDiv.style.clip = "rect(" + clipTop + "px," + clipRight + "px," + clipBottom + "px," + clipLeft + "px)"; //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-				clientDiv.style.left = (-left + leftWidth + viewPad.left) + "px"; //$NON-NLS-0$
-				clientDiv.style.width = (this._wrapMode || util.isWebkit ? scrollWidth : clientWidth + left) + "px"; //$NON-NLS-0$
+				if (_scroll.y + clientHeight === scrollHeight) { clipBottom += viewPad.bottom; }
+				clientDiv.style.clip = "rect(" + clipTop + "px," + clipRight + "px," + clipBottom + "px," + clipLeft + "px)"; //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-5$
+				clientDiv.style.left = (-left + leftWidth + viewPad.left) + "px"; //$NON-NLS-1$
+				clientDiv.style.width = (this._wrapMode || util.isWebkit ? scrollWidth : clientWidth + left) + "px"; //$NON-NLS-1$
 				if (!hScrollOnly) {
-					clientDiv.style.top = (-top + viewPad.top) + "px"; //$NON-NLS-0$
-					clientDiv.style.height = (clientHeight + top) + "px"; //$NON-NLS-0$
+					clientDiv.style.top = (-_top + viewPad.top) + "px"; //$NON-NLS-1$
+					clientDiv.style.height = (clientHeight + _top) + "px"; //$NON-NLS-1$
 				}
 				if (overlayDiv) {
 					overlayDiv.style.clip = clientDiv.style.clip;
@@ -20910,17 +20954,17 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		_updateOverflow: function() {
 			var viewDiv = this._viewDiv;
 			if (this._noScroll) {
-				viewDiv.style.overflow = "hidden"; //$NON-NLS-0$
+				viewDiv.style.overflow = "hidden"; //$NON-NLS-1$
 			} else if (this._wrapMode) {
-				viewDiv.style.overflowX = "hidden"; //$NON-NLS-0$
-				viewDiv.style.overflowY = "scroll"; //$NON-NLS-0$
+				viewDiv.style.overflowX = "hidden"; //$NON-NLS-1$
+				viewDiv.style.overflowY = "scroll"; //$NON-NLS-1$
 			} else {
-				viewDiv.style.overflow = "hidden"; //$NON-NLS-0$
+				viewDiv.style.overflow = "hidden"; //$NON-NLS-1$
 			}
 		},
 		_updateRuler: function (divRuler, topIndex, bottomIndex, rootHeight) {
 			if (!divRuler) { return; }
-			var document = this._parent.ownerDocument;
+			var doc = this._parent.ownerDocument;
 			var lineHeight = this._getLineHeight();
 			var viewPad = this._getViewPadding();
 			var div = divRuler.firstChild;
@@ -20931,15 +20975,15 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 					applyStyle(ruler.getRulerStyle(), div);
 					divRuler.rulerWidth = undefined;
 				}
-				if (overview === "fixed") { //$NON-NLS-0$
+				if (overview === "fixed") { //$NON-NLS-1$
 					div.rulerChanged = false;
 					div = div.nextSibling;
 					continue;
 				}
 				var offset = lineHeight;
-				if (overview === "page") { offset += this._topIndexY; } //$NON-NLS-0$
-				div.style.top = -offset + "px"; //$NON-NLS-0$
-				div.style.height = (rootHeight + offset) + "px"; //$NON-NLS-0$
+				if (overview === "page") { offset += this._topIndexY; } //$NON-NLS-1$
+				div.style.top = -offset + "px"; //$NON-NLS-1$
+				div.style.height = (rootHeight + offset) + "px"; //$NON-NLS-1$
 				
 				
 				var widthDiv;
@@ -20948,8 +20992,8 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 					widthDiv = child;
 					child = child.nextSibling;
 				} else {
-					widthDiv = util.createElement(document, "div"); //$NON-NLS-0$
-					widthDiv.style.visibility = "hidden"; //$NON-NLS-0$
+					widthDiv = util.createElement(doc, "div"); //$NON-NLS-1$
+					widthDiv.style.visibility = "hidden"; //$NON-NLS-1$
 					div.appendChild(widthDiv);
 				}
 				var lineIndex, annotation;
@@ -20964,12 +21008,12 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 							}
 						}
 						widthDiv.lineIndex = lineIndex;
-						widthDiv.style.height = (lineHeight + viewPad.top) + "px"; //$NON-NLS-0$
+						widthDiv.style.height = (lineHeight + viewPad.top) + "px"; //$NON-NLS-1$
 					}
 				}
 
 				var lineDiv, frag, annotations;
-				if (overview === "page") { //$NON-NLS-0$
+				if (overview === "page") { //$NON-NLS-1$
 					annotations = ruler.getAnnotations(topIndex, bottomIndex + 1);
 					while (child) {
 						lineIndex = child.lineIndex;
@@ -20980,10 +21024,10 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 						child = nextChild;
 					}
 					child = div.firstChild.nextSibling;
-					frag = document.createDocumentFragment();
+					frag = doc.createDocumentFragment();
 					for (lineIndex=topIndex; lineIndex<=bottomIndex; lineIndex++) {
 						if (!child || child.lineIndex > lineIndex) {
-							lineDiv = util.createElement(document, "div"); //$NON-NLS-0$
+							lineDiv = util.createElement(doc, "div"); //$NON-NLS-1$
 							annotation = annotations[lineIndex];
 							if (annotation) {
 								applyStyle(annotation.style, lineDiv);
@@ -20993,12 +21037,12 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 								lineDiv.annotation = annotation;
 							}
 							lineDiv.lineIndex = lineIndex;
-							lineDiv.style.height = this._getLineHeight(lineIndex) + "px"; //$NON-NLS-0$
+							lineDiv.style.height = this._getLineHeight(lineIndex) + "px"; //$NON-NLS-1$
 							frag.appendChild(lineDiv);
 						} else {
 							if (frag.firstChild) {
 								div.insertBefore(frag, child);
-								frag = document.createDocumentFragment();
+								frag = doc.createDocumentFragment();
 							}
 							if (child) {
 								child = child.nextSibling;
@@ -21026,15 +21070,15 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 							count--;
 						}
 						annotations = ruler.getAnnotations(0, lineCount);
-						frag = document.createDocumentFragment();
+						frag = doc.createDocumentFragment();
 						for (var prop in annotations) {
 							lineIndex = prop >>> 0;
 							if (lineIndex < 0) { continue; }
-							lineDiv = util.createElement(document, "div"); //$NON-NLS-0$
+							lineDiv = util.createElement(doc, "div"); //$NON-NLS-1$
 							annotation = annotations[prop];
 							applyStyle(annotation.style, lineDiv);
-							lineDiv.style.position = "absolute"; //$NON-NLS-0$
-							lineDiv.style.top = arrowWidth + lineHeight + Math.floor(lineIndex * divHeight) + "px"; //$NON-NLS-0$
+							lineDiv.style.position = "absolute"; //$NON-NLS-1$
+							lineDiv.style.top = arrowWidth + lineHeight + Math.floor(lineIndex * divHeight) + "px"; //$NON-NLS-1$
 							if (annotation.html) {
 								lineDiv.innerHTML = annotation.html;
 							}
@@ -21046,7 +21090,7 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 					} else if (div._oldTrackHeight !== trackHeight) {
 						lineDiv = div.firstChild ? div.firstChild.nextSibling : null;
 						while (lineDiv) {
-							lineDiv.style.top = this._metrics.scrollWidth + lineHeight + Math.floor(lineDiv.lineIndex * divHeight) + "px"; //$NON-NLS-0$
+							lineDiv.style.top = this._metrics.scrollWidth + lineHeight + Math.floor(lineDiv.lineIndex * divHeight) + "px"; //$NON-NLS-1$
 							lineDiv = lineDiv.nextSibling;
 						}
 					}
@@ -21059,26 +21103,26 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 		_updateStyleSheet: function() {
 			var styleText = "";
 			if (util.isWebkit && this._metrics.scrollWidth > 0) {
-				styleText += "\n.textview ::-webkit-scrollbar-corner {background: #eeeeee;}"; //$NON-NLS-0$
+				styleText += "\n.textview ::-webkit-scrollbar-corner {background: #eeeeee;}"; //$NON-NLS-1$
 			}
 			if (styleText) {
-				var document = this._clientDiv.ownerDocument;
-				var node = document.getElementById("_textviewStyle"); //$NON-NLS-0$
+				var doc = this._clientDiv.ownerDocument;
+				var node = doc.getElementById("_textviewStyle"); //$NON-NLS-1$
 				if (!node) {
-					node = util.createElement(document, "style"); //$NON-NLS-0$
-					node.id = "_textviewStyle"; //$NON-NLS-0$
-					var head = document.getElementsByTagName("head")[0] || document.documentElement; //$NON-NLS-0$
-					node.appendChild(document.createTextNode(styleText));
+					node = util.createElement(doc, "style"); //$NON-NLS-1$
+					node.id = "_textviewStyle"; //$NON-NLS-1$
+					var head = doc.getElementsByTagName("head")[0] || doc.documentElement; //$NON-NLS-1$
+					node.appendChild(doc.createTextNode(styleText));
 					head.insertBefore(node, head.firstChild);
 				} else {
 					node.removeChild(node.firstChild);
-					node.appendChild(document.createTextNode(styleText));
+					node.appendChild(doc.createTextNode(styleText));
 				}
 			}
 		},
 		_updateStyle: function (init, metrics) {
 			if (!init && util.isIE) {
-				this._rootDiv.style.lineHeight = "normal"; //$NON-NLS-0$
+				this._rootDiv.style.lineHeight = "normal"; //$NON-NLS-1$
 			}
 			metrics = this._metrics = metrics || this._calculateMetrics();
 			if (this._variableLineHeight) {
@@ -21086,19 +21130,19 @@ define("orion/editor/textView", [  //$NON-NLS-0$
 				this._resetLineHeight();
 			}
 			if (util.isIE) {
-				this._rootDiv.style.lineHeight = (metrics.lineHeight - (metrics.lineTrim.top + metrics.lineTrim.bottom)) + "px"; //$NON-NLS-0$
+				this._rootDiv.style.lineHeight = (metrics.lineHeight - (metrics.lineTrim.top + metrics.lineTrim.bottom)) + "px"; //$NON-NLS-1$
 			} else {
-				this._rootDiv.style.lineHeight = "normal"; //$NON-NLS-0$
+				this._rootDiv.style.lineHeight = "normal"; //$NON-NLS-1$
 			}
 			this._updateStyleSheet();
 			if (util.isMac && util.isWebkit) {
 				var viewDiv = this._viewDiv;
 				if (!metrics.invalid && metrics.scrollWidth === 0) {
-					viewDiv.style.pointerEvents = "none"; //$NON-NLS-0$
-					viewDiv.style.zIndex = "2"; //$NON-NLS-0$
+					viewDiv.style.pointerEvents = "none"; //$NON-NLS-1$
+					viewDiv.style.zIndex = "2"; //$NON-NLS-1$
 				} else {
-					viewDiv.style.pointerEvents = ""; //$NON-NLS-0$
-					viewDiv.style.zIndex = ""; //$NON-NLS-0$
+					viewDiv.style.pointerEvents = ""; //$NON-NLS-1$
+					viewDiv.style.zIndex = ""; //$NON-NLS-1$
 				}
 			}
 			if (!init) {
@@ -21777,6 +21821,7 @@ function Tooltip (view) {
 			tooltipDiv.setAttribute("aria-live", "assertive"); //$NON-NLS-1$ //$NON-NLS-0$
 			tooltipDiv.setAttribute("aria-atomic", "true"); //$NON-NLS-1$ //$NON-NLS-0$
 			this._tooltipDiv.style.visibility = "hidden"; //$NON-NLS-0$
+			this._tipShowing = false;
 			document.body.appendChild(tooltipDiv);
 			var self = this;
 			textUtil.addEventListener(document, "mousedown", this._mouseDownHandler = function(event) { //$NON-NLS-0$
@@ -21849,15 +21894,18 @@ function Tooltip (view) {
 		 * @name update
 		 * @description Updates the information in an already visible tooltip
 		 * @function
-		 * @param target The target through which the info is obtained
-		 * @param locked If true locks the tooltip (never hides unless 'hide' is called)
-		 * @param giveFocus If true forces the focus onto the tooltip (used for F2 processing)
+		 * @param tooltipInfo a function that will return the parameters need to update the information
+		 * @param noContent If true makes no attempt to gather new info and just updates the tooltip's position
 		 */
-		update: function(tooltipInfo) {
+		update: function(tooltipInfo, noContent) {
 			if (!tooltipInfo){
 				return;
 			}
-			this._processInfo(tooltipInfo.getTooltipInfo(), true);
+			if (noContent) {
+				this._showContents(null, tooltipInfo.getTooltipInfo(), true);
+			} else {
+				this._processInfo(tooltipInfo.getTooltipInfo(), true);
+			}
 		},
 		
 		/**
@@ -21889,8 +21937,12 @@ function Tooltip (view) {
 		 * @function
 		 * @public
 		*/
-		hide: function() {
-			if (!this.isVisible()){
+		hide: function(clearLock) {
+			if (clearLock) {
+				this._locked = undefined;
+			}
+			
+			if (this._locked || !this.isVisible()){
 				return;
 			}
 				
@@ -21901,10 +21953,6 @@ function Tooltip (view) {
 			if (this._hasFocus()) {
 				this._view.focus();
 			}
-			if (this._contentsView) {
-				this._contentsView.destroy();
-				this._contentsView = null;
-			}
 			if (this._tooltipContents) {
 				this._tooltipDiv.removeChild(this._tooltipContents);
 				this._tooltipContents = null;
@@ -21916,6 +21964,7 @@ function Tooltip (view) {
 			this._tooltipDiv.classList.remove("textviewTooltipOnFocus"); //$NON-NLS-0$
 			
 			this._tooltipDiv.style.visibility = "hidden"; //$NON-NLS-0$
+			this._tipShowing = false;
 			this._tooltipDiv.style.left = "";
 			this._tooltipDiv.style.right = "";
 			this._tooltipDiv.style.top = "";
@@ -21928,7 +21977,6 @@ function Tooltip (view) {
 			this._tooltipDiv.style.overflowY = "";		 //$NON-NLS-0$	
 			
 			this._giveFocus = undefined;
-			this._locked = undefined;
 			
 			this._anchorArea = undefined;  // Area of text/ruler/etc. we are showing a tooltip for
 			this._tooltipArea = undefined;  // The area the tooltip covers
@@ -21956,7 +22004,7 @@ function Tooltip (view) {
 		 * @returns {boolean} 'true' iff the tooltip is currently visible
 		*/
 		isVisible: function() {
-			return this._tooltipDiv && this._tooltipDiv.style.visibility === "visible"; //$NON-NLS-0$
+			return this._tipShowing;
 		},
 		
 		/**
@@ -22065,8 +22113,13 @@ function Tooltip (view) {
 				}
 			}
 			
-			this._tooltipContents = newContentsDiv;
-			this._tooltipDiv.appendChild(newContentsDiv);
+			if (newContentsDiv) {
+				if (this._tooltipContents) {
+					this._tooltipDiv.removeChild(this._tooltipContents);
+				}
+				this._tooltipContents = newContentsDiv;
+				this._tooltipDiv.appendChild(newContentsDiv);				
+			}
 			
 			if (!this._anchorArea){
 				this._anchorArea = this._computeAnchorArea(info);
@@ -22080,6 +22133,7 @@ function Tooltip (view) {
 			}
 
 			this._tooltipDiv.style.visibility = "visible"; //$NON-NLS-0$
+			this._tipShowing = true;
 			
 			if (this._giveFocus) {
 				this._setInitialFocus(this._tooltipDiv);
@@ -22105,13 +22159,19 @@ function Tooltip (view) {
 			
 			if (info.context){
 				if (info.context.offsetStart && info.context.offsetEnd){
-					return this._computeRectangleFromOffset(info.context.offsetStart, info.context.offsetEnd);
+					// The full text content of the editor is given to the plug-in hover service, so we must adjust the offsets
+					// for the projection model as folded comments will change the offsets/coordinates in the displayed editor
+					var mappedStart = this.mapOffset(info.context.offsetStart, false);
+					var mappedEnd = this.mapOffset(info.context.offsetEnd, false);
+					return this._computeRectangleFromOffset(mappedStart, mappedEnd);
 				}
 				
 				if (info.context.offset >= 0){
-					// Use the enclosing word
-					var start = this._view.getNextOffset(info.context.offset, { unit: "word", count: -1}); //$NON-NLS-0$
-					var end = this._view.getNextOffset(info.context.offset, { unit: "word", count: 0}); //$NON-NLS-0$
+					// The provided offset is based on the full text content, not the projection model
+					// Adjust the offset before finding the closest enclosing word
+					var mappedOffset = this.mapOffset(info.context.offset, false);
+					var end = this._view.getNextOffset(mappedOffset, { unit: "wordend", count: 0}); //$NON-NLS-0$
+					var start = this._view.getNextOffset(end, { unit: "word", count: -1}); //$NON-NLS-0$
 					return this._computeRectangleFromOffset(start, end);
 				}
 			}
@@ -22327,11 +22387,10 @@ function Tooltip (view) {
 			}
 			return offset;
 		},
+		/**
+		 * Note that the offsets passed here must already be mapped to the base model being displayed (i.e. reduced by collapsed comments)
+		 */
 		_computeRectangleFromOffset: function(start, end) {
-			// The offsets from annotations/hovering don't account for the projection model (folded comments) Bug 456715
-			start = this.mapOffset(start);
-			end = this.mapOffset(end);
-			
 			var tv = this._view;
 			var curLine = tv.getLineAtOffset(start);
 			var endLine = tv.getLineAtOffset(end);
@@ -22369,6 +22428,7 @@ function Tooltip (view) {
 			if (data.title) {
 				var titleDiv = util.createElement(document, "div"); //$NON-NLS-0$;
 				titleDiv.innerHTML = this.hover.renderMarkDown ? this.hover.renderMarkDown(data.title) : data.title;
+				titleDiv.classList.add("hoverTooltipTitle"); //$NON-NLS-0$
 				sectionDiv.appendChild(titleDiv);
 			}
 			var contentDiv = util.createElement(document, "div"); //$NON-NLS-0$
@@ -22546,7 +22606,7 @@ function Tooltip (view) {
 				return html;
 			} else {
 				var tooltipHTML = util.createElement(document, "div"); //$NON-NLS-0$
-				var em = util.createElement(document, "em"); //$NON-NLS-0$
+				var em = util.createElement(document, "multi_anno"); //$NON-NLS-0$
 				em.appendChild(document.createTextNode(messages.multipleAnnotations));
 				tooltipHTML.appendChild(em);
 				for (var i = 0; i < annotations.length; i++) {
@@ -25733,7 +25793,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 		var offset = 0;
 		var editor = actions.editor;
 		var selections = editor.getSelections();
-		if (!noUndo && (compound || selections.length > 1)) actions.startUndo();
+		if (!noUndo && (compound || selections.length > 1)){ actions.startUndo(); }
 		function setText(text, start, end) {
 			editor.setText(text, start, end);
 			offset += (start - end) + text.length;
@@ -25744,7 +25804,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 			callback(selection, setText);
 		});
 		editor.setSelections(selections);
-		if (!noUndo && (compound || selections.length > 1)) actions.endUndo();
+		if (!noUndo && (compound || selections.length > 1)){ actions.endUndo(); }
 	}
 
 	/**
@@ -25802,7 +25862,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				return false;
 			}.bind(this), {name: messages.redo});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("f", true), "find"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("f", true), "find"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("find", function() { //$NON-NLS-0$
 				if (this._find) {
 					var selection = this.editor.getSelection();
@@ -25812,7 +25872,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				return false;
 			}.bind(this), {name: messages.find});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("k", true), "findNext"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("k", true), "findNext"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("findNext", function(options) { //$NON-NLS-0$
 				if (this._find){
 					this._find.find(true, options);
@@ -25821,7 +25881,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				return false;
 			}.bind(this), {name: messages.findNext});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("k", true, true), "findPrevious"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("k", true, true), "findPrevious"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("findPrevious", function(options) { //$NON-NLS-0$
 				if (this._find){
 					this._find.find(false, options);
@@ -25830,7 +25890,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				return false;
 			}.bind(this), {name: messages.findPrevious});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("j", true), "incrementalFind"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("j", true), "incrementalFind"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("incrementalFind", function() { //$NON-NLS-0$
 				if (this._incrementalFind) {
 					this._incrementalFind.find(true);
@@ -25838,7 +25898,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				return true;
 			}.bind(this), {name: messages.incrementalFind});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("j", true, true), "incrementalFindReverse"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("j", true, true), "incrementalFindReverse"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("incrementalFindReverse", function() { //$NON-NLS-0$
 				if (this._incrementalFind) {
 					this._incrementalFind.find(false);
@@ -25874,12 +25934,12 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				return this.copyLinesDown();
 			}.bind(this), {name: messages.copyLinesDown});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding('d', true, false, false), "deleteLines"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding('d', true, false, false), "deleteLines"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("deleteLines", function(data) { //$NON-NLS-0$
 				return this.deleteLines(data);
 			}.bind(this), {name: messages.deleteLines});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("l", !util.isMac, false, false, util.isMac), "gotoLine"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("l", !util.isMac, false, false, util.isMac), "gotoLine"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("gotoLine", function() { //$NON-NLS-0$
 				return this.gotoLine();
 			}.bind(this), {name: messages.gotoLine});
@@ -25894,27 +25954,27 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				return this.nextAnnotation(false);
 			}.bind(this), {name: messages.prevAnnotation});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("e", true, false, true, false), "expand"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("e", true, false, true, false), "expand"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("expand", function() { //$NON-NLS-0$
 				return this.expandAnnotation(true);
 			}.bind(this), {name: messages.expand});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("c", true, false, true, false), "collapse"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("c", true, false, true, false), "collapse"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("collapse", function() { //$NON-NLS-0$
 				return this.expandAnnotation(false);
 			}.bind(this), {name: messages.collapse});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("e", true, true, true, false), "expandAll"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("e", true, true, true, false), "expandAll"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("expandAll", function() { //$NON-NLS-0$
 				return this.expandAnnotations(true);
 			}.bind(this), {name: messages.expandAll});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("c", true, true, true, false), "collapseAll"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("c", true, true, true, false), "collapseAll"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("collapseAll", function() { //$NON-NLS-0$
 				return this.expandAnnotations(false);
 			}.bind(this), {name: messages.collapseAll});
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("q", !util.isMac, false, false, util.isMac), "lastEdit"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("q", !util.isMac, false, false, util.isMac), "lastEdit"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("lastEdit", function() { //$NON-NLS-0$
 				return this.gotoLastEdit();
 			}.bind(this), {name: messages.lastEdit});
@@ -26050,36 +26110,40 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 			var model = editor.getModel();
 			var offset = 0;
 			var selections = editor.getSelections();
-			if (selections.length > 1) this.startUndo();
-			if (selections.some(function(selection) {
-				selection.start += offset;
-				selection.end += offset;
-				var firstLine = model.getLineAtOffset(selection.start);
-				var lastLine = model.getLineAtOffset(selection.end > selection.start ? selection.end - 1 : selection.end);
-				if (firstLine !== lastLine || selections.length > 1) {
-					var lines = [];
-					lines.push("");
-					for (var i = firstLine; i <= lastLine; i++) {
-						lines.push(model.getLine(i, true));
+			if (selections.length > 1) { this.startUndo(); }
+			if (selections.some(
+				function(selection) {
+					selection.start += offset;
+					selection.end += offset;
+					var firstLine = model.getLineAtOffset(selection.start);
+					var lastLine = model.getLineAtOffset(selection.end > selection.start ? selection.end - 1 : selection.end);
+					if (firstLine !== lastLine || selections.length > 1) {
+						var lines = [];
+						lines.push("");
+						for (var i = firstLine; i <= lastLine; i++) {
+							lines.push(model.getLine(i, true));
+						}
+						var lineStart = model.getLineStart(firstLine);
+						var lineEnd = model.getLineEnd(lastLine, true);
+						var options = textView.getOptions("tabSize", "expandTab"); //$NON-NLS-1$ //$NON-NLS-2$
+						var tab = options.expandTab ? new Array(options.tabSize + 1).join(" ") : "\t"; //$NON-NLS-1$ //$NON-NLS-2$
+						var text = lines.join(tab);
+						editor.setText(text, lineStart, lineEnd);
+						var start = lineStart === selection.start ? selection.start : selection.start + tab.length;
+						var end = selection.end + ((lastLine - firstLine + 1) * tab.length);
+						offset += (lineStart - lineEnd) + text.length;
+						selection.start = start;
+						selection.end = end;
+					} else {
+						return true;
 					}
-					var lineStart = model.getLineStart(firstLine);
-					var lineEnd = model.getLineEnd(lastLine, true);
-					var options = textView.getOptions("tabSize", "expandTab"); //$NON-NLS-1$ //$NON-NLS-0$
-					var tab = options.expandTab ? new Array(options.tabSize + 1).join(" ") : "\t"; //$NON-NLS-1$ //$NON-NLS-0$
-					var text = lines.join(tab);
-					editor.setText(text, lineStart, lineEnd);
-					var start = lineStart === selection.start ? selection.start : selection.start + tab.length;
-					var end = selection.end + ((lastLine - firstLine + 1) * tab.length);
-					offset += (lineStart - lineEnd) + text.length;
-					selection.start = start;
-					selection.end = end;
-				} else {
-					return true;
+					return false;
 				}
+			)){
 				return false;
-			})) return false;
+			}
 			editor.setSelections(selections);
-			if (selections.length > 1) this.endUndo();
+			if (selections.length > 1) { this.endUndo(); }
 			return true;
 		},
 		gotoLastEdit: function() {
@@ -26213,7 +26277,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 							var tooltipCoords = view.convert({
 								x: view.getLocationAtOffset(foundAnnotation.start).x,
 								y: view.getLocationAtOffset(model.getLineStart(nextLine)).y
-							}, "document", "page"); //$NON-NLS-1$ //$NON-NLS-0$
+							}, "document", "page"); //$NON-NLS-1$ //$NON-NLS-2$
 							return {
 								contents: foundAnnotations,
 								x: tooltipCoords.x,
@@ -26308,7 +26372,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				return this.autoIndent();
 			}.bind(this));
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("t", true, false, true), "trimTrailingWhitespaces"); //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("t", true, false, true), "trimTrailingWhitespaces"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("trimTrailingWhitespaces", function() { //$NON-NLS-0$
 				return this.trimTrailingWhitespaces();
 			}.bind(this), {name: messages.trimTrailingWhitespaces});
@@ -26329,59 +26393,59 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 			}.bind(this), {name: messages.removeBlockComment});
 
 			// Autocomplete square brackets []
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("[", false, false, false, false, "keypress"), "autoPairSquareBracket"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("[", false, false, false, false, "keypress"), "autoPairSquareBracket"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("autoPairSquareBracket", function() { //$NON-NLS-0$
-				return this.autoPairBrackets("[", "]"); //$NON-NLS-1$ //$NON-NLS-0$
+				return this.autoPairBrackets("[", "]"); //$NON-NLS-1$ //$NON-NLS-2$
 			}.bind(this));
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding(']', false, false, false, false, "keypress"), "skipClosingSquareBracket"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding(']', false, false, false, false, "keypress"), "skipClosingSquareBracket"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("skipClosingSquareBracket", function() { //$NON-NLS-0$
-				return this.skipClosingBracket(']'); //$NON-NLS-0$
+				return this.handleClosingBracket(']'); //$NON-NLS-0$
 			}.bind(this));
 
 			// Autocomplete angle brackets <>
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("<", false, false, false, false, "keypress"), "autoPairAngleBracket"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("<", false, false, false, false, "keypress"), "autoPairAngleBracket"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("autoPairAngleBracket", function() { //$NON-NLS-0$
-				return this.autoPairBrackets("<", ">"); //$NON-NLS-1$ //$NON-NLS-0$
+				return this.autoPairBrackets("<", ">"); //$NON-NLS-1$ //$NON-NLS-2$
 			}.bind(this));
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding('>', false, false, false, false, "keypress"), "skipClosingAngleBracket"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding('>', false, false, false, false, "keypress"), "skipClosingAngleBracket"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("skipClosingAngleBracket", function() { //$NON-NLS-0$
-				return this.skipClosingBracket('>'); //$NON-NLS-0$
+				return this.handleClosingBracket('>'); //$NON-NLS-0$
 			}.bind(this));
 
 			// Autocomplete parentheses ()
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("(", false, false, false, false, "keypress"), "autoPairParentheses"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("(", false, false, false, false, "keypress"), "autoPairParentheses"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("autoPairParentheses", function() { //$NON-NLS-0$
-				return this.autoPairBrackets("(", ")"); //$NON-NLS-1$ //$NON-NLS-0$
+				return this.autoPairBrackets("(", ")"); //$NON-NLS-1$ //$NON-NLS-2$
 			}.bind(this));
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding(')', false, false, false, false, "keypress"), "skipClosingParenthesis"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding(')', false, false, false, false, "keypress"), "skipClosingParenthesis"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("skipClosingParenthesis", function() { //$NON-NLS-0$
-				return this.skipClosingBracket(")"); //$NON-NLS-0$
+				return this.handleClosingBracket(")"); //$NON-NLS-0$
 			}.bind(this));
 
 			// Autocomplete braces {}
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("{", false, false, false, false, "keypress"), "autoPairBraces"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("{", false, false, false, false, "keypress"), "autoPairBraces"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("autoPairBraces", function() { //$NON-NLS-0$
-				return this.autoPairBrackets("{", "}"); //$NON-NLS-1$ //$NON-NLS-0$
+				return this.autoPairBrackets("{", "}"); //$NON-NLS-1$ //$NON-NLS-2$
 			}.bind(this));
 
-			textView.setKeyBinding(new mKeyBinding.KeyBinding('}', false, false, false, false, "keypress"), "skipClosingBrace"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding('}', false, false, false, false, "keypress"), "skipClosingBrace"); //$NON-NLS-1$ //$NON-NLS-2$
 			textView.setAction("skipClosingBrace", function() { //$NON-NLS-0$
-				return this.skipClosingBracket("}"); //$NON-NLS-0$
+				return this.handleClosingBracket("}"); //$NON-NLS-0$
 			}.bind(this));
 
 			// Autocomplete single quotations
-			textView.setKeyBinding(new mKeyBinding.KeyBinding("'", false, false, false, false, "keypress"), "autoPairSingleQuotation"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding("'", false, false, false, false, "keypress"), "autoPairSingleQuotation"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			textView.setAction("autoPairSingleQuotation", function() { //$NON-NLS-0$
-				return this.autoPairQuotations("'"); //$NON-NLS-1$ //$NON-NLS-0$
+				return this.autoPairQuotations("'"); //$NON-NLS-1$ //$NON-NLS-2$
 			}.bind(this));
 
 			// Autocomplete double quotations
-			textView.setKeyBinding(new mKeyBinding.KeyBinding('"', false, false, false, false, "keypress"), "autoPairDblQuotation"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			textView.setKeyBinding(new mKeyBinding.KeyBinding('"', false, false, false, false, "keypress"), "autoPairDblQuotation"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			textView.setAction("autoPairDblQuotation", function() { //$NON-NLS-0$
-				return this.autoPairQuotations('"'); //$NON-NLS-1$ //$NON-NLS-0$
+				return this.autoPairQuotations('"'); //$NON-NLS-1$ //$NON-NLS-2$
 			}.bind(this));
 
 			textView.setAction("deletePrevious", function() { //$NON-NLS-0$
@@ -26394,8 +26458,8 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 			if (textView.getOptions("readonly")) { return false; } //$NON-NLS-0$
 			if (textView.getOptions("singleMode")) { return false; } //$NON-NLS-0$
 			var model = editor.getModel();
-			var options = textView.getOptions("tabSize", "expandTab"); //$NON-NLS-1$ //$NON-NLS-0$
-			var tab = options.expandTab ? new Array(options.tabSize + 1).join(" ") : "\t"; //$NON-NLS-1$ //$NON-NLS-0$
+			var options = textView.getOptions("tabSize", "expandTab"); //$NON-NLS-1$ //$NON-NLS-2$
+			var tab = options.expandTab ? new Array(options.tabSize + 1).join(" ") : "\t"; //$NON-NLS-1$ //$NON-NLS-2$
 			var lineDelimiter = model.getLineDelimiter();
 			var matchCommentStart = /^[\s]*\/\*[\*]*[\s]*$/;
 			var matchCommentDelimiter = /^[\s]*\*/;
@@ -26523,7 +26587,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 			var textView = editor.getTextView();
 			if (textView.getOptions("readonly")) { return false; } //$NON-NLS-0$
 			var model = editor.getModel();
-			var open = "/*", close = "*/", commentTags = new RegExp("/\\*" + "|" + "\\*/", "g"); //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+			var open = "/*", close = "*/", commentTags = new RegExp("/\\*" + "|" + "\\*/", "g"); //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-2$
 			var self = this;
 			forEachSelection(this, false, function(selection, setText) {
 				var result = self._findEnclosingComment(model, selection.start, selection.end);
@@ -26699,19 +26763,19 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				var prevChar = (selection.start === 0) ? "" : model.getText(selection.start - 1, selection.start); //$NON-NLS-0$
 				var nextChar = (selection.start === model.getCharCount()) ? "" : model.getText(selection.start, selection.start + 1); //$NON-NLS-0$
 	
-				if ((prevChar === "(" && nextChar === ")") || //$NON-NLS-1$ //$NON-NLS-0$
-					(prevChar === "[" && nextChar === "]") || //$NON-NLS-1$ //$NON-NLS-0$
-					(prevChar === "{" && nextChar === "}") || //$NON-NLS-1$ //$NON-NLS-0$
-					(prevChar === "<" && nextChar === ">") || //$NON-NLS-1$ //$NON-NLS-0$
-					(prevChar === '"' && nextChar === '"') || //$NON-NLS-1$ //$NON-NLS-0$
-					(prevChar === "'" && nextChar === "'")) { //$NON-NLS-1$ //$NON-NLS-0$
+				if ((prevChar === "(" && nextChar === ")") || //$NON-NLS-1$ //$NON-NLS-2$
+					(prevChar === "[" && nextChar === "]") || //$NON-NLS-1$ //$NON-NLS-2$
+					(prevChar === "{" && nextChar === "}") || //$NON-NLS-1$ //$NON-NLS-2$
+					(prevChar === "<" && nextChar === ">") || //$NON-NLS-1$ //$NON-NLS-2$
+					(prevChar === '"' && nextChar === '"') || //$NON-NLS-1$ //$NON-NLS-2$
+					(prevChar === "'" && nextChar === "'")) { //$NON-NLS-1$ //$NON-NLS-2$
 					setText("", selection.start, selection.start + 1); //$NON-NLS-0$
 				}
 			}, true);
 			return false;
 		},
 		_findEnclosingComment: function(model, start, end) {
-			var open = "/*", close = "*/"; //$NON-NLS-1$ //$NON-NLS-0$
+			var open = "/*", close = "*/"; //$NON-NLS-1$ //$NON-NLS-2$
 			var firstLine = model.getLineAtOffset(start);
 			var lastLine = model.getLineAtOffset(end);
 			var i, line, extent, openPos, closePos;
@@ -26771,7 +26835,7 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 			var textView = editor.getTextView();
 			if (textView.getOptions("readonly")) { return false; } //$NON-NLS-0$
 			var model = editor.getModel();
-			var open = "/*", close = "*/"; //$NON-NLS-1$ //$NON-NLS-0$
+			var open = "/*", close = "*/"; //$NON-NLS-1$ //$NON-NLS-2$
 			var self  = this;
 			forEachSelection(this, false, function(selection, setText) {
 
@@ -26904,19 +26968,52 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 				this.undoStack.startCompoundChange();
 			}
 		},
-		skipClosingBracket: function(closingChar) {
+		/**
+		 * @name handleClosingBracket
+		 * @description When the user types a closing bracket we should skip auto-paired brackets and reduce indenting if
+		 * 				we are on a new line.
+		 * @function
+		 * @param closingChar {String} the closing bracket character
+		 * @returns returns true to skip printing the closing bracket, false to print it
+		 */
+		handleClosingBracket: function(closingChar) {
 			var editor = this.editor;
 			var textView = editor.getTextView();
 			if (textView.getOptions("readonly")) { return false; } //$NON-NLS-0$
 			var model = editor.getModel();
 			var selections = editor.getSelections();
 			if (selections.length === 1 && selections[0].start === selections[0].end) {
+				// If the next character is the same bracket close, skip it
 				var nextChar = selections[0].start === model.getCharCount() ? "" : model.getText(selections[0].start, selections[0].start + 1); //$NON-NLS-0$
 				if (nextChar === closingChar) {
 					selections[0].start = selections[0].end = selections[0].start + 1;
 					editor.setSelections(selections);
 					return true;
 				}
+				// If the close bracket is on a new line, reduce the indentation
+				var lineNum = model.getLineAtOffset(selections[0].start);
+				var line = model.getLine(lineNum, true);
+				if (line.match(/^\s*$/)){
+					if(textView.getOptions("tabMode")){ //$NON-NLS-1$
+						var tabSize = textView.getOptions("tabSize"); //$NON-NLS-1$
+						var spaceTab = new Array(tabSize + 1).join(" "); //$NON-NLS-1$
+						var lineStart = model.getLineStart(lineNum);
+						var lineEnd = model.getLineEnd(lineNum);
+						if (lineStart !== lineEnd) {
+							if (line.indexOf("\t") === 0) { //$NON-NLS-1$
+								line = line.substring(1);
+								model.setText(line, lineStart, lineEnd);
+								editor.setSelection(selections[0].start-1, selections[0].end-1);
+								return false;
+							} else if (line.indexOf(spaceTab) === 0) {
+								line = line.substring(tabSize);
+								model.setText(line, lineStart, lineEnd);
+								editor.setSelection(selections[0].start-tabSize, selections[0].end-tabSize);
+								return false;
+							}
+						}
+					}
+				}
 			}
 			return false;
 		},
@@ -26965,7 +27062,6 @@ define("orion/editor/actions", [ //$NON-NLS-0$
 
 	return exports;
 });
-
 /*******************************************************************************
  * @license
  * Copyright (c) 2010, 2012 IBM Corporation and others.
@@ -28358,7 +28454,6 @@ define("orion/editor/textDND", ['orion/util'], function(util) { //$NON-NLS-1$ //
 
 	return {TextDND: TextDND};
 });
-
 /*******************************************************************************
  * @license
  * Copyright (c) 2013 IBM Corporation and others.
@@ -28968,7 +29063,6 @@ define("orion/editor/factories", [ //$NON-NLS-0$
 	
 	return exports;
 });
-
 /*******************************************************************************
  * @license
  * Copyright (c) 2011, 2013 IBM Corporation and others.
@@ -30677,6 +30771,41 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 			this._computedProposals = null;
 			
 			this._computeProposals(this._initialCaretOffset).then(function(proposals) {
+            
+            
+            //add a new property to the proposal called 'proposal_belongsTo'
+            //make 'proposal_belongsTo' equal to its scripting language name
+            //i.e proposal 'RegExp' will have 'ecma5' as 'proposal_belongsTo'
+            var proposal_noemphasis_title = "";
+            var proposals_with_emphasis = proposals[0].filter(function(obj) {
+               if (obj.style === "noemphasis_title"){
+                  proposal_noemphasis_title = obj.description;
+               }else{
+                  obj.proposal_belongsTo = proposal_noemphasis_title;
+               }
+               
+               return obj.style !== "noemphasis_title";
+            });
+
+            proposals[0] = proposals_with_emphasis;
+            
+            //conbine and sort all proposals
+            proposals[0] = proposals[0].sort(function(a,b) {
+               
+               if(!a.hasOwnProperty("name")){
+                  return 1;
+               }else if(!b.hasOwnProperty("name")){
+                  return -1;
+               }else if (a.name.toLowerCase() < b.name.toLowerCase()){
+                  return -1;
+               }else if (a.name.toLowerCase() > b.name.toLowerCase()){
+                  return 1;
+               }else{
+                  return 0;
+               }
+               
+            });
+            
 				if (this.isActive()) {
 					var flatProposalArray = this._flatten(proposals);
 					//check if flattened proposals form a valid array with at least one entry
@@ -30783,7 +30912,7 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 					var foundProposal = false;
 					if (proposals && proposals.length > 0){
 						for (var i=0; i 0){
+							if (Array.isArray(proposals[i]) && proposals[i].length > 0){
 								foundProposal = true;
 								break;
 							}
@@ -30836,24 +30965,29 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 								} else {
 									return false; // unknown format
 								}
-			
-								return (0 === proposalString.indexOf(prefixText + this._filterText));
+                        //make selecting proposals case insensitive
+								return (0 === proposalString.toLowerCase().indexOf(prefixText.toLowerCase() + this._filterText.toLowerCase()));
 								
 							} else if (proposal.name || proposal.proposal) {
+                        
+                        
 								var activated = false;
 								// try matching name
 								if (proposal.name) {
-									activated = (0 === proposal.name.indexOf(prefixText + this._filterText));	
+                           //make selecting proposals case insensitive
+									activated = (0 === proposal.name.toLowerCase().indexOf(prefixText.toLowerCase() + this._filterText.toLowerCase()));	
 								}
 								
 								// try matching proposal text
 								if (!activated && proposal.proposal) {
-									activated = (0 === proposal.proposal.indexOf(this._filterText));
+                           //make selecting proposals case insensitive
+									activated = (0 === proposal.proposal.toLowerCase().indexOf(this._filterText.toLowerCase()));
 								}
 								
 								return activated;
 							} else if (typeof proposal === "string") { //$NON-NLS-0$
-								return 0 === proposal.indexOf(this._filterText);
+                        //make selecting proposals case insensitive
+								return 0 === proposal.toLowerCase().indexOf(this._filterText.toLowerCase());
 							} else {
 								return false;
 							}
@@ -31042,20 +31176,21 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 						last = filteredArray;
 					}
 					
-					if (first.length > 0) {
-						var firstArrayStyle = first[first.length - 1].style;
-						if (firstArrayStyle && (STYLES.hr !== STYLES[firstArrayStyle])) {
-							// add separator between proposals from different providers 
-							// if the previous array didn't already end with a separator
-							first = first.concat({
-								proposal: '',
-								name: '',
-								description: '---------------------------------', //$NON-NLS-0$
-								style: 'hr', //$NON-NLS-0$
-								unselectable: true
-							});
-						}
-					}
+               //since proposals are all grouped into one, this is not required
+//					if (first.length > 0) {
+//						var firstArrayStyle = first[first.length - 1].style;
+//						if (firstArrayStyle && (STYLES.hr !== STYLES[firstArrayStyle])) {
+//							// add separator between proposals from different providers 
+//							// if the previous array didn't already end with a separator
+//							first = first.concat({
+//								proposal: '',
+//								name: '',
+//								description: '---------------------------------', //$NON-NLS-0$
+//								style: 'hr', //$NON-NLS-0$
+//								unselectable: true
+//							});
+//						}
+//					}
 					
 					returnValue = first.concat(last);
 				}
@@ -31373,7 +31508,7 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 			return true;
 		},
 		
-		_showTooltip: function(update) {
+		_showTooltip: function(update, noContent) {
 			var tooltip = mTooltip.Tooltip.getTooltip(this.contentAssist.textView);
 			var self = this;
 			var target = {
@@ -31397,7 +31532,7 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 			};
 			
 			if (update) {
-				tooltip.update(target);
+				tooltip.update(target, noContent);
 			} else {
 				tooltip.show(target, true, false);
 			}
@@ -31405,7 +31540,7 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 		
 		_hideTooltip: function() {
 			var tooltip = mTooltip.Tooltip.getTooltip(this.contentAssist.textView);
-			tooltip.hide();
+			tooltip.hide(true); // Clear the lock
 		},
 
 		pageUp: function() {
@@ -31466,6 +31601,7 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 		this.textView = this.contentAssist.getTextView();
 		this.textViewListenerAdded = false;
 		this.isShowing = false;
+		this._useResizeTimer = false;
 		var document = this.textView.getOptions("parent").ownerDocument; //$NON-NLS-0$
 		this.parentNode = typeof parentNode === "string" ? document.getElementById(parentNode) : parentNode; //$NON-NLS-0$
 		if (!this.parentNode) {
@@ -31478,6 +31614,15 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 				throw new Error("parentNode is required"); //$NON-NLS-0$
 			}
 		}
+		var MO = window.MutationObserver || window.MozMutationObserver;
+		if (MO && util.isFirefox) {//MutationObserver does not work in chrome for resize https://code.google.com/p/chromium/issues/detail?id=293948
+			this._mutationObserver = new MO(function(mutations) {
+				//TODO: code edit widget : separate a finer API to only reposition and resize the tooltips
+				this._contentAssistMode._showTooltip(true);
+			}.bind(this));
+		} else {
+			this._useResizeTimer = true;
+		}
 		
 		textUtil.addEventListener(this.parentNode, "scroll", this.onScroll.bind(this)); //$NON-NLS-0$
 		
@@ -31498,8 +31643,10 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 		this.scrollListener = function(e) {
 			if (self.isShowing) {
 				self.position();
+				//TODO: code edit widget : redo the tooltip positioning by the same new api
 			}
 		};
+		//TODO: code edit widget : clean up the code to remove the listener here
 		textUtil.addEventListener(document, "scroll", this.scrollListener); //$NON-NLS-0$
 	}
 	ContentAssistWidget.prototype = /** @lends orion.editor.ContentAssistWidget.prototype */ {
@@ -31522,13 +31669,13 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 			var document = parent.ownerDocument;
 			var div = util.createElement(document, "div"); //$NON-NLS-0$
 			div.id = "contentoption" + itemIndex; //$NON-NLS-0$
-			div.setAttribute("role", "option"); //$NON-NLS-1$ //$NON-NLS-0$
+			div.setAttribute("role", "option"); //$NON-NLS-1$ //$NON-NLS-2$
 			div.className = STYLES[proposal.style] ? STYLES[proposal.style] : STYLES.dfault;
 			var node;
 			if (proposal.style === "hr") { //$NON-NLS-0$
 				node = util.createElement(document, "hr"); //$NON-NLS-0$
 			} else {
-				node = this._createDisplayNode(div, proposal, itemIndex);
+				node = this._createDisplayNode(proposal, itemIndex);
 				div.contentAssistProposalIndex = itemIndex; // make div clickable
 			}
 			div.appendChild(node);
@@ -31565,38 +31712,80 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 			});
 		},
 		/** @private */
-		_createDisplayNode: function(div, proposal, index) {
-			var node = null;
-			var plainString = null;
-			
-			if (typeof proposal === "string") { //$NON-NLS-0$
-				//for simple string content assist, the display string is just the proposal
-				plainString = proposal;
-			} else if (proposal.description && typeof proposal.description === "string") { //$NON-NLS-0$
-				if (proposal.name && typeof proposal.name === "string") { //$NON-NLS-0$
-					var nameNode = this._createNameNode(proposal.name);
-					nameNode.contentAssistProposalIndex = index;
-					
-					node = document.createElement("span"); //$NON-NLS-0$
-					node.appendChild(nameNode);
-					
-					var descriptionNode = document.createTextNode(proposal.description);
-					node.appendChild(descriptionNode);
-				} else {
-					plainString = proposal.description;
-				}
-			} else {
-				//by default return the straight proposal text
-				plainString = proposal.proposal;
+		_createDisplayNode: function(proposal, index) {
+			var node = document.createElement("span"); //$NON-NLS-0$
+			
+			if (!proposal){
+				return node;
+			}
+			
+			if (typeof proposal === "string"){
+				var simpleName = this._createNameNode(proposal);
+				simpleName.contentAssistProposalIndex = index;
+				return simpleName;
 			}
 			
-			if (plainString) {
-				node = this._createNameNode(plainString);
+			var nameNode;
+			var usingDescription; // Proposals are allowed to use the description as the name
+			if (proposal.name && typeof proposal.name === "string") {
+				nameNode = this._createNameNode(proposal.name);
+			} else if (proposal.description && typeof proposal.description === "string"){
+				nameNode = this._createNameNode(proposal.description);
+				usingDescription = true;
+			} else if (proposal.proposal && typeof proposal.proposal === "string"){
+				nameNode = this._createNameNode(proposal.proposal);
+			} else {
+				// Must have a name
+				return node;
 			}
 			
+			var tagsNode = this._createTagsNode(proposal.tags);
+			
+			var descriptionNode;
+			if (!usingDescription && proposal.description && typeof proposal.description === "string") {
+				descriptionNode = document.createTextNode(proposal.description);
+			}
+
+			if (tagsNode) { node.appendChild(tagsNode); }
+			node.appendChild(nameNode);
+			if (descriptionNode) { node.appendChild(descriptionNode); }
+         
+         //show which js language each proposal belongs to
+         //(will be displayed to the right of each proposal)
+         if (typeof nameNode === "object" && nameNode){
+            var node_proposal_belongsTo = document.createElement("span");
+            node_proposal_belongsTo.classList.add("proposal-belongsTo");
+            node_proposal_belongsTo.appendChild(document.createTextNode(proposal.proposal_belongsTo));
+            node.appendChild(node_proposal_belongsTo);
+         }
+			nameNode.contentAssistProposalIndex = index;
 			node.contentAssistProposalIndex = index;
 			
-			return node;
+			return node;		
+		},
+		/** @private */
+		_stopResizeTimer: function() {
+			if (this._resizeTimer) {
+				window.clearInterval(this._resizeTimer);
+				this._resizeTimer = null; 
+			}
+		},
+		_startResizeTimer: function() {
+			this._stopResizeTimer();
+			this._cachedResizeBound = this.parentNode.getBoundingClientRect();
+			this._resizeTimer = window.setInterval(function() {
+				if(this._contentAssistMode) {
+					var bound = this.parentNode.getBoundingClientRect();
+					if(bound.left === this._cachedResizeBound.left && 
+					   bound.top === this._cachedResizeBound.top &&
+					   bound.width === this._cachedResizeBound.width &&
+					   bound.height === this._cachedResizeBound.height) {
+						return;   	
+					}
+					this._cachedResizeBound = bound;
+					this._contentAssistMode._showTooltip(true, true);
+				}
+			}.bind(this), 100);
 		},
 		/** @private */
 		_createNameNode: function(name) {
@@ -31605,6 +31794,33 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
 			node.appendChild(document.createTextNode(name));
 			return node;
 		},
+		/**
+		 * @private
+		 * @param tags {Array} The array of tags to display
+		 * @returns {Object} the dom node for the tags or null
+		 */
+		_createTagsNode: function(tags) {
+			var tagsNode = null;
+			if (tags && tags.constructor === Array && tags.length > 0){
+				tagsNode = document.createElement("span");	 //$NON-NLS-1$
+				for (var i=0; icreate.
 		 * @name orion.editor.EditOptions
@@ -41996,7 +42306,6 @@ define('embeddedEditor/builder/embeddedEditor',[
 			});
 		}
 	});
-	return Editor;
+	return CodeEdit;
 });
-
-				return require('embeddedEditor/builder/embeddedEditor');			}));		
+return require('embeddedEditor/builder/embeddedEditor');}));
\ No newline at end of file
diff --git a/editorBuild/code_edit/built-codeEdit.min.js b/editorBuild/code_edit/built-codeEdit.min.js
deleted file mode 100644
index 3367ad6..0000000
--- a/editorBuild/code_edit/built-codeEdit.min.js
+++ /dev/null
@@ -1,1883 +0,0 @@
-/*
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: 
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010,2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
- RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
- Available via the MIT or new BSD license.
- see: http://github.com/requirejs/text for details
-
- Copyright (c) 2012, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010,2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2009, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
-
- Copyright (c) 2012, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2009, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010,2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2014 IBM Corporation and others. All rights reserved. This
- program and the accompanying materials are made available under the terms of
- the Eclipse Public License v1.0 (http://www.eclipse.org/legal/epl-v10.html),
- and the Eclipse Distribution License v1.0
- (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2011, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: 
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: 
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
-
- Copyright (c) 2010, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: 
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013,2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: 
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
-  Mihai Sucan (Mozilla Foundation) - fix for Bug#334583 Bug#348471 Bug#349485 Bug#350595 Bug#360726 Bug#361180 Bug#362835 Bug#362428 Bug#362286 Bug#354270 Bug#361474 Bug#363945 Bug#366312 Bug#370584
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: 
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
-
- Copyright (c) 2010, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
-
- Copyright (c) 2009, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others. All rights reserved.
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: 
- IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: 
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2014 IBM Corporation and others. All rights reserved.
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: 
- IBM Corporation - initial API and implementation
- Adrian Aichner - regular expression capture group support in replace
-
- Copyright (c) 2010, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-     Andy Clement (vmware) - bug 344614
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: Anton McConville - IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2012, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2011,2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others. All rights reserved. This
- program and the accompanying materials are made available under the terms of
- the Eclipse Public License v1.0 (http://www.eclipse.org/legal/epl-v10.html),
- and the Eclipse Distribution License v1.0
- (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation 
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation 
-
- Copyright (c) 2014 IBM Corporation and others. All rights reserved. This
- program and the accompanying materials are made available under the terms of
- the Eclipse Public License v1.0 (http://www.eclipse.org/legal/epl-v10.html),
- and the Eclipse Distribution License v1.0
- (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-               Alex Lakatos - fix for bug#369781
-
- Copyright (c) 2011, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation 
-
- Copyright (c) 2011, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation 
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 Pivotal Software Inc. and others
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: Pivotal Software Inc. - initial API and implementation 
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2012 IBM Corporation and others. All rights reserved. This
- program and the accompanying materials are made available under the terms of
- the Eclipse Public License v1.0 (http://www.eclipse.org/legal/epl-v10.html),
- and the Eclipse Distribution License v1.0
- (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
- RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
- Available via the MIT or new BSD license.
- see: http://github.com/requirejs/i18n for details
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-*/
-(function(O,y){"function"===typeof define&&define.amd?define([],y):(O.orion=O.orion||{},O.orion.codeEdit=y())})(this,function(){var O,y;(function(l){function r(a,e){var u,t,n,g,q,w,x,b,s,v=e&&e.split("/"),d=c.map,m=d&&d["*"]||{};if(a&&"."===a.charAt(0))if(e){v=v.slice(0,v.length-1);a=v.concat(a.split("/"));for(b=0;bk;k++)this._saved.push(f[c++]);239!==this._saved[0]||187!==this._saved[1]||191!==this._saved[2]?(c=0,this._saved.length=e):e=this._saved.length-=3;this._checkBOM=!1}else if(s)for(;ck)t[v++]=k;else if(194<=k&&223>=k){if(c===n)break;m=1=m)){b();continue}t[v++]=(k&31)<<6|m&63}else if(224<=k&&239>=k){if(c===n)break;m=1=m)||237===k&&!(128<=m&&159>=m)||!(128<=m&&191>=m)){b();continue}if(c===n)break;g=2=g)){b();continue}t[v++]=(k&15)<<12|(m&63)<<6|g&63}else if(240<=k&&244>=k){if(c===n)break;m=1=m)||244===k&&!(128<=m&&143>=m)||!(128<=m&&191>=m)){b();continue}if(c===n)break;g=2=g)){b();continue}if(c===n)break;a=f[c++];if(!(128<=a&&191>=a)){b();continue}k=((k&7)<<18|(m&63)<<12|(g&63)<<6|a&63)&65535;t[v++]=k>>10|55296;t[v++]=k&1023|56320}else b();u=c;e&&(this._saved.length=e=0)}for(;u!==c;)this._saved.push(f[u++]);this._checkBOM=this._checkBOM||!s;if(!s&&0!==this._saved.length)throw new r;n=[];for(k=0;kb)s[e++]=b;else{if(2048>b)s[e++]=192|b>>6;else{if(55296>b||56319>12;else{if(a=k))throw new r;b=65536|
-(b&1023)<<10|k&1023;s[e++]=240|b>>18;s[e++]=128|b>>12&63}s[e++]=128|b>>6&63}s[e++]=128|b&63}if(!m&&null!==this._saved)throw new r;return s.buffer.slice?new Uint8Array(s.buffer.slice(0,e)):s.subarray(0,e)};l.TextDecoder=l.TextDecoder||p;l.TextEncoder=l.TextEncoder||h})("undefined"===typeof global?this||self:global);y("orion/encoding-shim",function(){});(function(){function l(q){if("string"!==typeof q)throw new TypeError;}function r(q){return q?q.split("\x26"):[]}function p(q){return 0===q.length?"":
-q.join("\x26")}function h(q){var c=/([^=]*)(?:=?)(.*)/.exec(q);q=c[1]?decodeURIComponent(c[1]):"";c=c[2]?decodeURIComponent(c[2]):"";return[q,c]}function f(q){var c=encodeURIComponent(q[0]);q[1]&&(c+="\x3d"+encodeURIComponent(q[1]));return c}function d(c,a){var e="",u=[],w=0;return{next:function(){e!==c.query&&(e=c.query,u=r(e));if(wa.getLastModified()+864E5&&a.update()):a._resolve()});return l.all(q,function(q){console.log("PluginRegistry.stop "+q)}).then(function(){z="active"})};this.stop=function(){if("starting"!==z&&"active"!==z)return(new l).reject("Cannot stop registry. Registry is already "+
-z+".");z="stopping";var q=[];B.forEach(function(c){q.push(c.stop({"transient":!0}))});return l.all(q,function(q){console.log("PluginRegistry.stop "+q)}).then(function(){if(!b.parent){var q=D.parentNode;q&&q.removeChild(D)}D=null;removeEventListener("message",v);z="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new l).reject("Cannot uninstall registry")};this.installPlugin=function(q,c){q=f(q);var e=this.getPlugin(q);if(e)return(new l).resolve(e);
-if(w[q])return w[q];if(c)return e=new a(q,c,x),B.push(e),e._persist(),x.dispatchEvent(new m("installed",e)),(new l).resolve(e);var b=x.loadManifest(q).then(function(c){e=new a(q,c,x);B.push(e);e._persist();delete w[q];x.dispatchEvent(new m("installed",e));return e},function(c){delete w[q];throw c;});return w[q]=b};this.getPlugins=function(){return B.slice()};this.getPlugin=function(q){var c=null;q=f(q);B.some(function(a){if(q===a.getLocation())return c=a,!0});return c};this.addEventListener=q.addEventListener.bind(q);
-this.removeEventListener=q.removeEventListener.bind(q);this.resolvePlugins=function(){var q=!0;B.forEach(function(c){q=q&&c._resolve()});return q}}}});var U=null,Q=document.getElementsByTagName("script");if(Q&&Q.length&&0Z;Z++){for(var T=0;TA.length)k=[k+1,s].concat(A),Array.prototype.splice.apply(this._lineOffsets,k);else{v=k+1;this._lineOffsets.splice(v,s);for(c=0;cthis.size&&(this.stack.shift(),this.index--))},markClean:function(){this._commitUndo();if(this.cleanChange=this.stack[this.index-1])this.cleanChange.type=2},isClean:function(){return this.cleanChange===this.stack[this.index-1]},canUndo:function(){return 0=this.index)break;h=this.stack[--this.index]}while(!(h=h.undo(this.view,!0)));this._ignoreUndo=!1;return h},redo:function(){this._commitUndo();
-var h;h=!1;this._ignoreUndo=!0;do{if(this.index>=this.stack.length)break;h=this.stack[this.index++]}while(!(h=h.redo(this.view,!0)));this._ignoreUndo=!1;return h},reset:function(){this.index=0;this.cleanChange=void 0;this.stack=[];this._ignoreUndo=!1;this._compoundChange=void 0},setView:function(h){this.view!==h&&(this.view&&h.removeEventListener("Destroy",this._listener.onDestroy),(this.view=h)&&h.addEventListener("Destroy",this._listener.onDestroy))},startCompoundChange:function(h){this._commitUndo();
-h=new r(h);this.add(h);this.compoundChange=h;this.compoundChange.start(this.view);return this.compoundChange},_commitUndo:function(){this.endCompoundChange()},_onDestroy:function(h){(!h||!this.shared)&&this.model.removeEventListener("Changing",this._listener.onChanging);this.view&&(this.view.removeEventListener("Destroy",this._listener.onDestroy),this.view=null)},_trackUnsavedChanges:function(h){if(this._unsavedChanges){var f=this._unsavedChanges.length,d=h.removedCharCount,b=h.start,k=h.start+d,
-m=0;0===h.addedCharCount?m=-1:0===d&&(m=1);if(0b||123b.left+b.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-d.width+"px";else{var f=l.bounds(this._boundingNode(this._triggerNode)),m=l.bounds(this._triggerNode);this._dropdownNode.style.left=m.left-f.left-d.width+m.width+"px"}d=d.top+d.height-(b.top+b.height);0f&&(f=b.indexOf(this._selectedItem.parentNode));0<=f&&(d.keyCode===l.KEY.UP&&0/im,m=/]*>\s*([\s\S]+)\s*<\/body>/im,g="undefined"!==typeof location&&location.href,a=g&&location.protocol&&location.protocol.replace(/\:/,""),s=g&&location.hostname,
-e=g&&(location.port||void 0),n={},c=l.config&&l.config()||{};r={version:"2.0.12",strip:function(c){if(c){c=c.replace(k,"");var a=c.match(m);a&&(c=a[1])}else c="";return c},jsEscape:function(c){return c.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:c.createXhr||function(){var c,a,e;if("undefined"!==typeof XMLHttpRequest)return new XMLHttpRequest;
-if("undefined"!==typeof ActiveXObject)for(a=0;3>a;a+=1){e=b[a];try{c=new ActiveXObject(e)}catch(g){}if(c){b=[e];break}}return c},parseName:function(c){var a,e,b=!1,g=c.indexOf(".");a=0===c.indexOf("./")||0===c.indexOf("../");-1!==g&&(!a||1g?(g=Error(a+" HTTP status: "+g),g.xhr=n,b&&b(g)):e(n.responseText),c.onXhrComplete))c.onXhrComplete(n,a)};n.send(null)};else if("rhino"===c.env||!c.env&&"undefined"!==typeof Packages&&"undefined"!==typeof java)r.get=function(c,a){var e,b,g=new java.io.File(c),n=java.lang.System.getProperty("line.separator"),g=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(g),"utf-8")),d="";try{e=new java.lang.StringBuffer;(b=g.readLine())&&(b.length()&&
-65279===b.charAt(0))&&(b=b.substring(1));for(null!==b&&e.append(b);null!==(b=g.readLine());)e.append(n),e.append(b);d=String(e.toString())}finally{g.close()}a(d)};else if("xpconnect"===c.env||!c.env&&"undefined"!==typeof Components&&Components.classes&&Components.interfaces)h=Components.classes,f=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),d="@mozilla.org/windows-registry-key;1"in h,r.get=function(c,a){var e,b,g,n={};d&&(c=c.replace(/\//g,"\\"));g=new FileUtils.File(c);
-try{e=h["@mozilla.org/network/file-input-stream;1"].createInstance(f.nsIFileInputStream),e.init(g,1,0,!1),b=h["@mozilla.org/intl/converter-input-stream;1"].createInstance(f.nsIConverterInputStream),b.init(e,"utf-8",e.available(),f.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),b.readString(e.available(),n),b.close(),e.close(),a(n.value)}catch(s){throw Error((g&&g.path||"")+": "+s);}};return r});y("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'\x3cbutton class\x3d"dropdownTrigger"\x3e${ButtonText}\x3c!--span class\x3d"dropdownArrowDown core-sprite-openarrow"\x3e\x3c/span--\x3e\x3c/button\x3e\x3cul class\x3d"dropdownMenu"\x3e\x3c/ul\x3e'});
-y("text!orion/webui/dropdowntriggerbuttonwitharrow.html",[],function(){return'\x3cbutton class\x3d"dropdownTrigger dropdownDefaultButton"\x3e${ButtonText}\x3cspan class\x3d"dropdownArrowDown core-sprite-openarrow"\x3e\x3c/span\x3e\x3c/button\x3e\x3cul class\x3d"dropdownMenu"\x3e\x3c/ul\x3e'});y("text!orion/webui/checkedmenuitem.html",[],function(){return'\x3cli\x3e\x3clabel class\x3d"dropdownMenuItem"\x3e\x3cinput class\x3d"checkedMenuItem" role\x3d"menuitem" type\x3d"checkbox" /\x3e${ItemText}\x3c/label\x3e\x3c/li\x3e'});
-y("orion/webui/tooltip",["orion/webui/littlelib"],function(l){function r(l){this._init(l)}r.prototype={_init:function(p){this._node=l.node(p.node);if(!this._node)throw"no dom node for tooltip found";this._position=p.position||["right","above","below","left"];this._text=p.text;this._hideDelay=void 0===p.hideDelay?200:p.hideDelay;this._tailSize=p.tailSize||10;this._trigger=p.trigger||"mouseover";this._afterShowing=p.afterShowing;this._afterHiding=p.afterHiding;var h=this;if("click"===this._trigger)this._showDelay=
-0,this._node.addEventListener("click",this._clickHandler=function(d){d.target===h._node&&(h.show(),l.stop(d))},!1);else if("mouseover"===this._trigger){this._showDelay=void 0===p.showDelay?500:p.showDelay;p=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(d){l.contains(h._node,d.target)&&(h.show(),l.stop(d))},!1);this._leaveHandler=function(d){l.contains(h._node,d.target)&&h.hide()};for(var f=0;fm)if(h)b=m-f.height-1;else return!1;if(d+f.width>a)if(h)d=a-f.width-1;else return!1;if(d=a.keyCode?b+"F"+(a.keyCode-111):b+String.fromCharCode(a.keyCode)}
-function f(a){var b=-1!==window.navigator.platform.indexOf("Mac");return b&&a.metaKey||!b&&a.ctrlKey}function d(a,b){if(!a||!a.tagName)return!1;switch(a.tagName.toLowerCase()){case "button":case "fieldset":case "form":case "input":case "keygen":case "label":case "legend":case "meter":case "optgroup":case "output":case "progress":case "select":case "textarea":return!0}return a.parentNode===b?!1:a.parentNode&&d(a.parentNode,b)}function b(a,b,e){return 0=a.left||!0===C)&&J.dropdown?J.dropdown.toggle(q):M._invoke(r)};J.dropdown&&(e.onkeydown=function(q){f.KEY.DOWN===
-q.keyCode&&(J.dropdown.toggle(q),f.stop(q))})}s=J.menu;if(n=r&&r.command&&(r.command.tooltip||r.command.name)?r.command.tooltip||r.command.name:m)e.commandTooltip=new b.Tooltip({node:e,text:n,position:["above","below","right","left"]})}return{menuButton:e,menu:s,dropdown:e.dropdown,destroyButton:x,dropdownArrow:w}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var e=document.createElement("li");e.classList.add("dropdownSeparator");var b=document.createElement("span");
-b.classList.add("dropdownSeparator");e.appendChild(b);a.appendChild(e)}},generateSeparatorImage:function(a){var e;e="ul"===a.nodeName.toLowerCase()?document.createElement("li"):document.createElement("span");a.appendChild(e);e.classList.add("core-sprite-sep");e.classList.add("imageSprite");e.classList.add("commandSeparator");return e}};g.prototype.constructor=g;a.prototype={match:function(a){a=p.matchResourceParameters(a);return"undefined"!==typeof a[this.token]?(this.parameterValue=a[this.token],
-this):null}};a.prototype.constructor=a;s.prototype.constructor=s;e.prototype={optionsRequested:function(){return this.optionsRequested}};e.prototype.constructor=e;n.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){var e=this.parameterTable={};a.forEach(function(a){e[a.name]=a})}},updateParameters:function(a){"function"===typeof this.getParameters&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return null!==this.parameterTable},shouldCollectParameters:function(){return!this.clientCollect&&
-this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,e){var b=this.parameterTable[a];b&&(b.value=e)},forEach:function(a){for(var e in this.parameterTable)this.parameterTable[e].type&&this.parameterTable[e].name&&a(this.parameterTable[e])},validate:function(a,e){var b=this.parameterTable[a];return b&&b.validator?b.validator(e):!0},makeCopy:function(){var a=[];this.forEach(function(b){b=
-new e(b.name,b.type,b.label,b.value,b.lines,b.eventListeners,b.validator);a.push(b)});var b=new n(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;b.message=this.message;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};n.prototype.constructor=n;return{CommandRegistry:g,URLBinding:a,ParametersDescription:n,CommandParameter:e,CommandEventListener:s}});y("orion/edit/nls/messages",{root:!0});y("orion/edit/nls/root/messages",{Editor:"Editor",switchEditor:"Switch Editor",
-Fetching:"Fetching: ${0}",confirmUnsavedChanges:"There are unsaved changes. Do you still want to navigate away?",searchFiles:"Quick Search...",searchTerm:"Enter search term:",unsavedChanges:"There are unsaved changes.",unsavedAutoSaveChanges:"Please stay on the page until Auto Save is complete.",Save:"Save",Saved:"Saved",Blame:"Blame",BlameTooltip:"Show blame annotations",Diff:"Diff",DiffTooltip:"Show diff annotations",saveOutOfSync:"Resource is out of sync with the server. Do you want to save it anyway?",
-loadOutOfSync:"Resource is out of sync with the server. Do you want to load it anyway? This will overwrite your local changes.",ReadingMetadata:"Reading metadata of ${0}",ReadingMetadataError:"Cannot get metadata of ${0}",Reading:"Reading ${0}",readonly:"Read Only.",saveFile:"Save this file",toggleZoomRuler:"Toggle Zoom Ruler",gotoLine:"Go to line...",gotoLineTooltip:"Go to specified line number",gotoLinePrompt:"Go to line:",Undo:"Undo",Redo:"Redo",Find:"Find...",noResponse:"No response from server. Check your internet connection and try again.",
-savingFile:"Saving file ${0}",running:"Running ${0}","Saving...":"Saving...",View:"View",SplitSinglePage:"Single Page",SplitVertical:"Split Vertical",SplitHorizontal:"Split Horizontal",SplitPipInPip:"Picture in Picture",SplitModeTooltip:"Change split editor mode",SidePanel:"Side Panel",SidePanelTooltip:"Choose what to show in the side panel.",Slideout:"Slideout",Actions:"Actions",Navigator:"Navigator",FolderNavigator:"Folder Navigator",Project:"Project",New:"New",File:"File",Edit:"Edit",Tools:"Tools",
-Add:"Add",noActions:"There are no actions for the current selection.",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding.",LocalEditorSettings:"Local Editor Settings",NoProject:"${0} is not a project. To convert it to a project use ${1}.",NoProjects:"There are no projects in your workspace. Use the ${0} menu to create projects.",Disconnected:"${0} (disconnected)",ChooseFS:"Choose Filesystem",ChooseFSTooltip:"Choose the filesystem you want to view.",FSTitle:"${0} (${1})",
-Deploy:"Deploy","Deploy As":"Deploy As",Import:"Import",Export:"Export",OpenWith:"Open with",OpenRelated:"Open related",Dependency:"Dependency",UnnamedCommand:"Unnamed",searchInFolder:"Search in folder...","Global Search":"Global Search...",ClickEditLabel:"Click to edit",ProjectInfo:"Project Information",Name:"Name",Description:"Description",Site:"Site",projectsSectionTitle:"Projects",listingProjects:"Listing projects...",gettingWorkspaceInfo:"Getting workspace information...",showProblems:"Show problems...",
-showTooltip:"Show Tooltip",showTooltipTooltip:"Shows the tooltip immediately based on the caret position",emptyDeploymentInfoMessage:"Use the Launch Configurations dropdown to deploy this project"});y("orion/explorers/navigatorRenderer",[],function(){return{getClickedItem:function(){return null}}});y("orion/objects",[],function(){function l(l){for(var p=Object.prototype.hasOwnProperty,h=1,f=arguments.length;hC&&(r={diff:B})}}this._clearUnsavedChanges();this._errorSaving=!1;var w=this._parsedLocation.resource,r=this.fileClient.write(w,r,{ETag:d.ETag}),x=this.progressService,E=null;this.serviceRegistry&&(E=this.serviceRegistry.getService("orion.page.message"));x&&(r=x.progress(r,p.formatMessage(l.savingFile,F)));r.then(b,function(a){if(412===a.status)if(window.confirm(l.saveOutOfSync))a=
-t.fileClient.write(w,z),x&&(a=x.progress(a,p.formatMessage(l.savingFile,F))),a.then(b,c);else return e();else c(a)});return d._savingDeferred},setAutoLoadEnabled:function(a){this._autoLoadEnabled=a},setAutoSaveTimeout:function(a){this._autoSaveEnabled=-1!==a;this._autoSaveActive=!1;this._idle?this._idle.setTimeout(a):(this._idle=new m({document:document,timeout:a}),this._idle.addEventListener("Idle",function(){this._errorSaving||(this._autoSaveActive=!0,this.save().then(function(){this._autoSaveActive=
-!1}))}.bind(this)))},setContentType:function(a){this._contentType=a},setInput:function(a){if(!this._ignoreInput&&(a||(a=b.hash()),"string"===typeof a)){var e=this.getEditor();a&&"#"!==a[0]&&(a="#"+a);var g=b.matchResourceParameters(a),c=this._parsedLocation||{};if(e&&e.isDirty()){var d=this._location;if(c.resource!==g.resource)if(this._autoSaveEnabled)this.save();else if(!window.confirm(l.confirmUnsavedChanges)){window.location.hash=d;return}}e=e&&c.editor!==g.editor;this._location=a;this._parsedLocation=
-g;this._ignoreInput=!0;this.selection&&this.selection.setSelections(a);this._ignoreInput=!1;a={type:"InputChanging",input:g};this.dispatchEvent(a);c=g.resource;a.metadata?(this.reportStatus(""),this._input=c,this._setInputContents(g,c,null,a.metadata)):c?c===this._input?e?(this.reportStatus(""),this._setInputContents(g,c,null,this._fileMetadata,this._isText(this._fileMetadata))):this.processParameters(g):(this._input=c,this._readonly=!1,this._lastMetadata=this._fileMetadata,this._fileMetadata=null,
-this.load()):this._setNoInput(!0)}},setTitle:function(a){var e=a.lastIndexOf("/");-1!==e&&(a=a.substring(e+1));this._title=a},setSaveDiffsEnabled:function(a){this._saveDiffsEnabled=a;(a=this.editor)&&!a.isDirty()&&this._clearUnsavedChanges()},_getSaveDiffsEnabled:function(){return this._saveDiffsEnabled&&this._acceptPatch&&-1!==this._acceptPatch.indexOf("application/json-patch")},_logMetrics:function(a){var e="(none)",b=this.getContentType(),c=this.getFileMetadata();if(b)e=b.id;else if(c)if(b=c.Name,
-c=b.lastIndexOf("."),0<=c)e="unregistered: "+b.substring(c);else switch(b){case "AUTHORS":case "config":case "LICENSE":case "make":case "Makefile":e="unregistered: "+b}k.logEvent("editor",a,e)},_unknownContentTypeAsText:function(){return!0},_isText:function(a){a=this.contentTypeRegistry.getFileContentType(a);if(!a)return this._unknownContentTypeAsText();var e=this.contentTypeRegistry.getContentType("text/plain");return this.contentTypeRegistry.isExtensionOf(a,e)},_setNoInput:function(a){a?this.fileClient.loadWorkspace("").then(function(a){this._input=
-a.ChildrenLocation;this._setInputContents(a.ChildrenLocation,null,a,a)}.bind(this)):(this._input=this._title=this._fileMetadata=null,this.setContentType(null),this.dispatchEvent({type:"InputChanged",input:null}))},_setInputContents:function(a,e,b,c,g){var d,f=!1;c?(this._fileMetadata=c,this.setTitle(c.Location||String(c)),this.setContentType(this.contentTypeRegistry.getFileContentType(c)),d=c.Name,f=c.Directory):(this._fileMetadata=null,this.setTitle(e),this.setContentType(this.contentTypeRegistry.getFilenameContentType(this.getTitle())),
-d=this.getTitle());var m=this.getEditor();this._focusListener&&(m&&(m.getTextView&&m.getTextView())&&m.getTextView().removeEventListener("Focus",this._focusListener),this._focusListener=null);c={type:"InputChanged",input:a,name:d,title:e,contentType:this.getContentType(),metadata:c,location:window.location,contents:b};this._logMetrics("open");this.dispatchEvent(c);this.editor=m=c.editor;f||(g||m.setInput(e,null,b),m&&(m.getTextView&&m.getTextView())&&m.getTextView().addEventListener("Focus",this._focusListener=
-this.onFocus.bind(this)),this._clearUnsavedChanges(),this.processParameters(a)||c.session&&c.session.apply());this._saveEventLogged=!1;k.logPageLoadTiming("interactive",window.location.pathname)},_getUnsavedChanges:function(){var a=this.editor;return a&&a.getUndoStack&&a.getUndoStack()?a.getUndoStack()._unsavedChanges:null},_clearUnsavedChanges:function(){var a=this.editor;a&&(a.getUndoStack&&a.getUndoStack())&&(a.getUndoStack()._unsavedChanges=this._getSaveDiffsEnabled()?[]:null)}});return{handleError:g,
-InputManager:a}});y("orion/navigate/nls/messages",{root:!0});y("orion/navigate/nls/root/messages",{Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize strings":"Externalize strings from JavaScript files in this folder.",NotSupportFileSystem:"${0} is not supported in this file system",SrcNotSupportBinRead:"Source file service does not support binary read",TargetNotSupportBinWrite:"Target file service does not support binary write",NoFileSrv:"No matching file service for location: ${0}",
-"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}",EnterName:"Enter a new name for '${0}'",ChooseFolder:"Choose folder...",Rename:"Rename",RenameFilesFolders:"Rename the selected files or folders",CompareEach:"Compare with each other","Compare 2 files":"Compare the selected 2 files with each other","Compare with...":"Compare with...",CompareFolders:"Compare the selected folder with a specified folder",Delete:"Delete","Unknown item":"Unknown item","delete item msg":"Are you sure you want to delete these ${0} items?",
-DeleteTrg:"Are you sure you want to delete '${0}'?",Zip:"Zip",ZipDL:"Create a zip file of the folder contents and download it","New File":"File","Create a new file":"Create a new file",FailedToCreateProject:"Failed to create project: ${0}",FailedToCreateFile:"Failed to create file: ${0}",CopyFailed:"Copy operation failed",MoveFailed:"Move operation failed","Name:":"Name:","New Folder":"Folder","Folder name:":"Folder name:","Create a new folder":"Create a new folder","Creating folder":"Creating folder",
-Folder:"Folder","Create an empty folder":"Create an empty folder",CreateEmptyMsg:"Create an empty folder on the Orion server. You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import",
-"Import content from SFTP":"Import content from SFTP","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file","Uploaded Content":"Uploaded Content","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Link to Server":"Link to Server",LinkContent:"Link to existing content on the server",CreateLinkedFolder:"Create a folder that links to an existing folder on the server.",
-"Server path:":"Server path:",NameLocationNotClear:"The name and server location were not specified.","Go Up":"Go Up",GoUpToParent:"Move up to the parent folder","Go Into":"Go Into",GoSelectedFolder:"Move into the selected folder","File or zip archive":"File or zip archive",ImportLcFile:"Import a file or zip archive from your local file system","SFTP from...":"SFTP",CpyFrmSftp:"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP",
-CpyToSftp:"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}","Pasting ${0}":"Pasting ${0}","Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}",MvToLocation:"Move files and folders to a new location",Cut:"Cut",Copy:"Copy","Fetching children of ":"Fetching children of ",Paste:"Paste","Open With":"Open With",
-"Loading ":"Loading ",New:"New",File:"File",Actions:"Actions","Orion Content":"Orion Content","Create new content":"Create new content","Import from HTTP...":"HTTP","File URL:":"File URL:",ImportURL:"Import a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:",FolderDropNotSupported:"Did not drop ${0}. Folder drop is not supported in this browser.",CreateFolderErr:"You cannot copy files directly into the workspace. Create a folder first.",
-"Unzip ${0}?":"Unzip ${0}?","Upload progress: ":"Upload progress: ","Uploading ":"Uploading ","Cancel upload":"Cancel upload",UploadingFileErr:"Uploading the following file failed: ","Enter project name:":"Enter project name:","Create new project":"Create new project","Creating project ${0}":"Creating project ${0}",NoFile:"Use the ${0} menu to create new files and folders. Click a file to start coding.",Download:"Download",Download_tooltips:"Download the file contents as the displayed name","Downloading...":"Reading file contents...",
-"Download not supported":"Contents download is not supported in this browser.",gettingContentFrom:"Getting content from ",confirmLaunchDelete:'Delete Launch Configuration "${0}" ?',deletingLaunchConfiguration:"Deleting launch configuration...",deployTo:"Deploy to ",deploy:"Deploy ",connect:"Connect",fetchContent:"Fetch content",fetchContentOf:"Fetch content of ",disconnectFromProject:"Disconnect from project",doNotTreatThisFolder:"Do not treat this folder as a part of the project",checkStatus:"Check status",
-checkApplicationStatus:"Check application status",checkApplicationState:"Check application state",stop:"Stop",start:"Start",stopApplication:"Stop the application",startApplication:"Start the application",manage:"Manage",manageThisApplicationOnRemote:"Manage this application on remote server",deleteLaunchConfiguration:"Delete this launch configuration",editLaunchConfiguration:"Edit this launch configuration",deployThisApplication:"Deploy the application using the workspace contents",associatedFolder:"Associated Folder",
-associateAFolderFromThe:"Associate a folder from the workspace with this project.",convertToProject:"Convert to project",convertThisFolderIntoA:"Convert this folder into a project",thisFolderIsAProject:"This folder is a project already.",basic:"Basic","createAnEmptyProject.":"Create an empty project.",sFTP:"SFTP",createAProjectFromAn:"Create a project from an SFTP site.",readMeCommandName:"Readme File",readMeCommandTooltip:"Create a README.md file in this project",zipArchiveCommandName:"Zip archive",
-zipArchiveCommandTooltip:"Create a project from a local zip archive.","Url:":"Url:",notZip:"The following files are not zip files: ${0}. Would you like to continue the import?",notZipMultiple:"There are multiple non-zip files being uploaded. Would you like to continue the import?",Cancel:"Cancel",Ok:"Ok",missingCredentials:"Enter the ${0} authentication credentials associated with ${1} to check its status.",deploying:"deploying",starting:"restarting",stopping:"stopping",checkingStateShortMessage:"checking status"});
-y("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(l,r,p){function h(b,d,f){if(!b[d])throw Error(p.formatMessage(l.NotSupportFileSystem,d));return b[d].apply(b,f)}function f(b,d,m,g){if(!b.readBlob)throw Error(l.SrcNotSupportBinRead);if(!m.writeBlob)throw Error(l.TargetNotSupportBinWrite);if("/"!==d[d.length-1])return h(b,"readBlob",[d]).then(function(a){return h(m,"writeBlob",[g,a])});var a=g.substring(0,g.length-1),s=decodeURIComponent(a.substring(a.lastIndexOf("/")+
-1)),a=a.substring(0,a.lastIndexOf("/")+1);return h(m,"createFolder",[a,s]).then(function(){},function(){}).then(function(){return h(b,"fetchChildren",[d]).then(function(a){for(var d=[],c=0;cd.length?!1:d[f].match(h)?f===d.length-1?!0:f+1:!1;h instanceof Array||(h=[h]);if(h.length>d.length)return!1;var b;for(b=0;ba?(a=p(a),m=f+a*b,h(m)):
-(h(d),g.stop())},"number"===typeof this.options.rate?this.options.rate:20)};l.prototype.stop=function(){this.options.window.clearInterval(this.interval);(this.options.onEnd||function(){})()};l.prototype.defaultEasing=function(l){return Math.sin(l*(Math.PI/2))};return l}()}});y("orion/editor/textView","i18n!orion/editor/nls/messages orion/editor/textModel orion/editor/keyModes orion/editor/eventTarget orion/editor/textTheme orion/editor/util orion/util orion/metrics".split(" "),function(l,r,p,h,f,
-d,b,k){function m(a,c,e){if(e){c.className="";e=c.attributes;for(var g=e.length;0b.isIE&&e[g].specified)&&c.removeAttribute(e[g].name)}if(a){a.styleClass&&(c.className=a.styleClass);if(e=a.style)for(var d in e)e.hasOwnProperty(d)&&(c.style[d]=e[d]);if(a=a.attributes)for(var n in a)a.hasOwnProperty(n)&&c.setAttribute(n,a[n])}}function g(a){return a instanceof Array?a.slice(0):a}function a(a,c){if(!a)return c;if(!c)return a;for(var b in c)c.hasOwnProperty(b)&&(a.hasOwnProperty(b)||
-(a[b]=c[b]));return a}function s(a,c){if(a===c)return!0;if(a&&!c||!a&&c||a&&a.constructor===String||c&&c.constructor===String)return!1;if(a instanceof Array||c instanceof Array){if(!(a instanceof Array&&c instanceof Array)||a.length!==c.length)return!1;for(var b=0;bb;b++){var e=a._createSelectionDiv();c.appendChild(e);this._divs.push(e)}}function A(a){this.left=a.left;
-this.top=a.top;this.right=a.right;this.bottom=a.bottom}function F(a,c,b){this.view=a;this.lineIndex=c;this._lineDiv=b}function z(a){this._init(a||{})}var D=d.addEventListener,B=d.removeEventListener,C=d.Animation;t.compare=function(a,c){if(a.length!==c.length)return!1;for(var b=0;b=a.length)return a;a.sort(function(a,q){return a.start-q.start});for(var c=[],b=a[0],e=1;e=b.end||b._editing||a[e]._editing?(c.push(b),b=a[e]):b.end=Math.max(b.end,a[e].end);c.push(b);return c};t.prototype={clone:function(){var a=new t(this.start,this.end,this.caret);a._columnX=this._columnX;a._editing=this._editing;
-a._docX=this._docX;return a},contains:function(a){return this.start<=a&&athis.end&&(a=this.start,this.start=this.end,this.end=a,this.caret=!this.caret)},setCaret:function(a){this.end=this.start=a;this.caret=!1},getCaret:function(){return this.caret?this.start:this.end},getAnchor:function(){return this.caret?this.end:this.start},getOrientedSelection:function(){return{start:this.getAnchor(),
-end:this.getCaret()}},toString:function(){return"start\x3d"+this.start+" end\x3d"+this.end+(this.caret?" caret is at start":" caret is at end")},isEmpty:function(){return this.start===this.end},equals:function(a){return this.caret===a.caret&&this.start===a.start&&this.end===a.end&&this._editing===a._editing}};v.prototype={destroy:function(){this._divs&&(this._divs.forEach(function(a){a.parentNode.removeChild(a)}),this._divs=null)},setPrimary:function(a){this.primary=a},update:function(){var a=this._view,
-c=this.primary,e=a._hasFocus,a=a._cursorVisible,g=!this.primary&&this._selection&&this._selection.isEmpty(),d;d=g?"textviewSelectionCaret":e?"textviewSelection":"textviewSelectionUnfocused";this._divs[0].style.visibility=g&&a&&e||!g?"visible":"hidden";this._divs[0].style.zIndex=a&&g?"2":"0";this._divs.forEach(function(a){a.className=d;b.isWebkit&&c&&(a.style.background=e?"transparent":"")})},setSelection:function(a){this._selection=a;this.update();var c=this._view,b=c._model,e=b.getLineAtOffset(a.start),
-g=b.getLineAtOffset(a.end),d=c._getLineNext();if(d){var n=c._getLinePrevious(),t;en.lineIndex?(e=n,t=b.getLineStart(n.lineIndex)):(e=c._getLineNode(e),t=a.start);gn.lineIndex?(c=n,b=b.getLineStart(n.lineIndex)):(c=c._getLineNode(g),b=a.end);this._setDOMSelection(e,t,c,b,a.caret)}},_setDOMSelection:function(a,c,e,g,d){this._setDOMFullSelection(a,c,e,g);if(this.primary){var n=this._view;a=a._line.getNodeOffset(c);
-e=e._line.getNodeOffset(g);if(a.node&&e.node)if(g=n._getWindow(),c=n._parent.ownerDocument,g.getSelection){var t=g.getSelection();g=c.createRange();g.setStart(a.node,a.offset);g.setEnd(e.node,e.offset);if(n._hasFocus&&(t.anchorNode!==a.node||t.anchorOffset!==a.offset||t.focusNode!==e.node||t.focusOffset!==e.offset||t.anchorNode!==e.node||t.anchorOffset!==e.offset||t.focusNode!==a.node||t.focusOffset!==a.offset))n._anchorNode=a.node,n._anchorOffset=a.offset,n._focusNode=e.node,n._focusOffset=e.offset,
-n._ignoreSelect=!1,0b.isIE&&(f="\ufeff");g={text:f,style:g._metrics.largestFontStyle,ignoreChars:1};0===e.length||!e[e.length-1].style||"div"!==e[e.length-1].style.tagName?e.push(g):e.splice(e.length-1,0,g);var v,k,h,A=f=0;if(b.isFirefox&&2E3=F&&(u-=l);h=(h=k.firstChild.data)?h.length:0;if(A+h>u)break;A+=h}u=k.nextSibling;d.removeChild(k);k=u}v=this._createSpan(d,t,v,g.ignoreChars);k?d.insertBefore(v,k):d.appendChild(v);c&&(c.lineWidth=
-void 0)}if(c)for(l=v?v.nextSibling:null;l;)u=l.nextSibling,c.removeChild(l),l=u}d.parentNode||a.appendChild(d);return d},_createRanges:function(a,c,b,e,g,d){if(!(b>e)){if(a)for(var n=0;ne)break;var u=Math.min(g+e,t.end)-g;if(f<=u){f=Math.max(b,f);u=Math.min(e,u);bb)){var d=this.view._customTabSize;if(d&&8!==d)for(var n=a.indexOf("\t",c);-1!==n&&na){var t=a-
-u;if(1===d.length)f=new A(c.getBoundingClientRect());else if(g._isRangeRects)w=n.createRange(),w.setStart(d,t),w.setEnd(d,t+1),f=new A(w.getBoundingClientRect());else if(b.isIE)w=n.body.createTextRange(),w.moveToElementText(c),w.collapse(),(d=0===t&&8===b.isIE)&&(t=1),w.moveEnd("character",t+1),w.moveStart("character",t),f=new A(w.getBoundingClientRect()),d&&(f.left=c.getClientRects()[0].left);else{var m=d.data;c.removeChild(d);c.appendChild(n.createTextNode(m.substring(0,t)));var s=b.createElement(n,
-"span");s.appendChild(n.createTextNode(m.substring(t,t+1)));c.appendChild(s);c.appendChild(n.createTextNode(m.substring(t+1)));f=new A(s.getBoundingClientRect());c.innerHTML="";c.appendChild(d);this._createdDiv||(c=g._getSelections()[0],(u<=c.start&&c.startb.isIE&&(t=e.ownerDocument.defaultView||e.ownerDocument.parentWindow,c=t.screen.logicalXDPI/t.screen.deviceXDPI,t=t.screen.logicalYDPI/t.screen.deviceYDPI,f.left*=c,f.right*=c,f.top*=t,f.bottom*=
-t);return!1}u+=w;return!0})}d=this.getBoundingClientRect();f||(g._wrapMode?(t=this.getClientRects(),f=t[t.length-1],f.left=f.right,f.left+=d.left,f.top+=d.top,f.right+=d.left,f.bottom+=d.top):(f=new A(d),f.left=f.right));if(c||void 0===c)f.left-=d.left,f.top-=d.top,f.right-=d.left,f.bottom-=d.top;return f},forEach:function(a){for(var c=this._ensureCreated().firstChild;c;){var e=c.nextSibling;if(!c.ignore&&!a.call(this,c))break;c=e}},_getClientRects:function(a,c){var e,b,g,d;if(!a._rectsCache){e=a.getClientRects();
-b=Array(e.length);for(d=0;dd.right&&(d.right=q.right),q.bottom>d.bottom&&(d.bottom=q.bottom))}}return!0});return void 0!==a?c[a]:c},_getLineBoundingClientRect:function(a,e){var b=new A(a.getBoundingClientRect());if(!this.view._wrapMode){b.right=b.left;for(var g=a.lastChild;g&&g.ignoreChars===g.firstChild.length;)g=g.previousSibling;g&&(g=g.getBoundingClientRect(),b.right=g.right+
-c(a).right)}e&&(g=c(a),b.left+=g.left,b.right-=g.right);return b},getLineCount:function(){return!this.view._wrapMode?1:this.getClientRects().length},getLineIndex:function(a){if(!this.view._wrapMode)return 0;var c=this.getClientRects();a=this.getBoundingClientRect(a);a=a.top+(a.bottom-a.top)/2;for(var b=0;bn||c+g>=t)return b=q,e=n-c,a.ignoreChars&&(0b.isIE?l.screen.logicalXDPI/l.screen.deviceXDPI:1,F=11>b.isIE?l.screen.logicalYDPI/l.screen.deviceYDPI:1,z,p,r,l=x.left+s.left,
-D,B;if(b.isIE||d._isRangeRects){for(var A=d._isRangeRects?A.createRange():A.body.createTextRange(),C=h,S=-1;1z+(r-z)/2);g=u-f;k=n.getLine(t);E=k.charCodeAt(g);55296<=E&&56319>=E&&h?g=E&&(u+=1)):56320<=E&&(57343>=E&&!h)&&0=E&&(u-=1));h&&u++}else{E=[];for(D=0;Dz+(r-z)/2&&u++;break}u++;E=E.nextSibling}v._createdDiv||(g.innerHTML="",g.appendChild(k),g=d._getSelections()[0],(u<=g.start&&g.starth.right&&(a=h.right-1)}else 0>a&&(a=
-0),a>s.right-s.left&&(a=s.right-s.left);var l,F;if(this._lastHitChild&&this._lastHitChild.parentNode){if(l=this._lastHitOffset,F=this._lastHitChild,h=g(F),!h){k=l;for(var A=l+this._nodeLength(F),z=F.previousSibling,p=F.nextSibling;z||p;){if(z){k-=this._nodeLength(z);if(h=g(z)){F=z;l=k;break}z=z.previousSibling}if(p){if(h=g(p)){F=p;l=A;break}A+=this._nodeLength(p);p=p.nextSibling}}}}else l=f,this.forEach(function(a){F=a;if(h=g(F))return!1;l+=this._nodeLength(F);return!0});F&&h&&(this._lastHitChild=
-F,this._lastHitOffset=l,l=e(F,l,h));return Math.min(u,Math.max(f,l))},getNextOffset:function(a,c){if("line"===c.unit){var e=this.view._model,g=e.getLineAtOffset(a);if(0=a||58<=a&&64>=a||91<=a&&94>=a||
-96===a||123<=a&&126>=a}function e(a){return 32===a||9===a}var g=this.view._model,d=g.getLineAtOffset(a),n=g.getLine(d),t=g.getLineStart(d),g=g.getLineEnd(d),d=n.length,f=a-t,u,m=0>c.count?-1:1;if("word"===c.unit||"wordend"===c.unit||"wordWS"===c.unit||"wordendWS"===c.unit)for(var s,v,k;0!==c.count;){if(0=u&&0=u&&(f+=m)),c.count-=m;return t+f},_getNextOffset_IE:function(a,c){var b=this._ensureCreated(),e=this.view._model,g=this.lineIndex,d=0,n;n=e.getLineStart(g);var f=e.getLine(g),t=e.getLineStart(g),u=b.ownerDocument,m=0>c.count?-1:1;if(a===e.getLineEnd(g)){for(b=b.lastChild;b&&b.ignoreChars===b.firstChild.length;)b=b.previousSibling;if(!b)return n;d=u.body.createTextRange();d.moveToElementText(b);n=d.text.length;d.moveEnd(c.unit,
-m);d=a+d.text.length-n}else if(a===n&&0>c.count)d=n;else for(b=b.firstChild;b;){e=this._nodeLength(b);if(n+e>a){d=u.body.createTextRange();if(a===n&&0>c.count){for(n=b.previousSibling;n&&(!n.firstChild||!n.firstChild.length);)n=n.previousSibling;d.moveToElementText(n?n:b.previousSibling)}else d.moveToElementText(b),d.collapse(),d.moveEnd("character",a-n);n=d.text.length;d.moveEnd(c.unit,m);d=a+d.text.length-n;break}n=e+n;b=b.nextSibling}n=d-t;d=f.charCodeAt(n);56320<=d&&57343>=d&&0=d&&(n+=m));c.count-=m;return n+t},updateLinks:function(){var a=this._ensureCreated();if(this.hasLink){var c=this;this.forEach(function(b){var e=b.viewStyle;e&&(e.tagName&&"a"===e.tagName.toLowerCase())&&a.replaceChild(c._createSpan(a,b.firstChild.data,e),b);return!0})}},destroy:function(){var a=this._createdDiv;a&&(a.parentNode.removeChild(a),this._createdDiv=null)}};z.prototype={addKeyMode:function(a,c){var b=this._keyModes;void 0!==c?b.splice(c,0,a):b.push(a);a._modeAdded&&a._modeAdded()},
-addRuler:function(a,c){var b=this._rulers;if(void 0!==c){var e,g;for(g=e=0;eb)return!1;var b=this._getLine(b),e=this.getOffsetAtLocation(a,c),e=b.getBoundingClientRect(e);b.destroy();return a>e.right?!1:!0},getLinePixel:function(a){return!this._clientDiv?0:this._getLinePixel(a)},getLocationAtOffset:function(a){if(!this._clientDiv)return{x:0,y:0};var c=this._model;a=Math.min(Math.max(0,a),c.getCharCount());var c=c.getLineAtOffset(a),b=this._getLine(c);
-a=b.getBoundingClientRect(a);b.destroy();b=a.left;c=this._getLinePixel(c)+a.top;return{x:b,y:c}},getNextOffset:function(a,c){var b=new t(a,a,!1);this._doMove(c,b);return b.getCaret()},getOptions:function(){var a;if(0===arguments.length)a=this._defaultOptions();else if(1===arguments.length){if(a=arguments[0],"string"===typeof a)return g(this["_"+a])}else{a={};for(var c in arguments)arguments.hasOwnProperty(c)&&(a[arguments[c]]=void 0)}for(var b in a)a.hasOwnProperty(b)&&(a[b]=g(this["_"+b]));return a},
-getModel:function(){return this._model},getOffsetAtLocation:function(a,c){if(!this._clientDiv)return 0;var b=this._getLineIndex(c),e=this._getLine(b),b=e.getOffset(a,c-this._getLinePixel(b));e.destroy();return b},getLineAtOffset:function(a){return this.getModel().getLineAtOffset(a)},getLineStart:function(a){return this.getModel().getLineStart(a)},getRulers:function(){return this._rulers.slice(0)},getSelection:function(){return this._getSelection()},getSelections:function(){return this._getSelections()},
-getSelectionText:function(a){var c=[],b=this;this._getSelections().forEach(function(a){a.isEmpty()||c.push(b._getBaseText(a.start,a.end))});return c.join(void 0!==a?a:this._model.getLineDelimiter())},getText:function(a,c){return this._model.getText(a,c)},getTopIndex:function(a){return!this._clientDiv?0:this._getTopIndex(a)},getTopPixel:function(){return!this._clientDiv?0:this._getScroll().y},invokeAction:function(a,c,b){if(this._clientDiv){if(a=this._actions[a]){a.actionDescription&&a.actionDescription.id&&
-k.logEvent("editor","action",a.actionDescription.id);if(!c&&a.handler&&a.handler(b))return!0;if(a.defaultHandler)return"boolean"===typeof a.defaultHandler(b)}return!1}},isDestroyed:function(){return!this._clientDiv},onContextMenu:function(a){return this.dispatchEvent(a)},onDragStart:function(a){return this.dispatchEvent(a)},onDrag:function(a){return this.dispatchEvent(a)},onDragEnd:function(a){return this.dispatchEvent(a)},onDragEnter:function(a){return this.dispatchEvent(a)},onDragOver:function(a){return this.dispatchEvent(a)},
-onDragLeave:function(a){return this.dispatchEvent(a)},onDrop:function(a){return this.dispatchEvent(a)},onDestroy:function(a){return this.dispatchEvent(a)},onSaving:function(a){return this.dispatchEvent(a)},onInputChanged:function(a){return this.dispatchEvent(a)},onLineStyle:function(a){return this.dispatchEvent(a)},onKeyDown:function(a){return this.dispatchEvent(a)},onKeyPress:function(a){return this.dispatchEvent(a)},onKeyUp:function(a){return this.dispatchEvent(a)},onModelChanged:function(a){return this.dispatchEvent(a)},
-onModelChanging:function(a){return this.dispatchEvent(a)},onModify:function(a){return this.dispatchEvent(a)},onMouseDown:function(a){return this.dispatchEvent(a)},onMouseUp:function(a){return this.dispatchEvent(a)},onMouseMove:function(a){return this.dispatchEvent(a)},onMouseOver:function(a){return this.dispatchEvent(a)},onMouseOut:function(a){return this.dispatchEvent(a)},onTouchStart:function(a){return this.dispatchEvent(a)},onTouchMove:function(a){return this.dispatchEvent(a)},onTouchEnd:function(a){return this.dispatchEvent(a)},
-onOptions:function(a){return this.dispatchEvent(a)},onSelection:function(a){return this.dispatchEvent(a)},onScroll:function(a){return this.dispatchEvent(a)},onVerify:function(a){return this.dispatchEvent(a)},onFocus:function(a){return this.dispatchEvent(a)},onBlur:function(a){return this.dispatchEvent(a)},redraw:function(){if(!(0c;if(g){var d=a;a=c;c=d}d=this._model.getCharCount();a=Math.max(0,Math.min(a,d));c=Math.max(0,Math.min(c,
-d));a=new t(a,c,g);this._setSelection(a,void 0===b||b,!0,e)},setSelections:function(a,c,b){a=this._rangesToSelections(a);this._setSelection(a,void 0===c||c,!0,b)},setText:function(a,c,e,g,d){var n="string"===typeof a,f=void 0===c&&void 0===e&&n;n?(void 0===c&&(c=0),void 0===e&&(e=this._model.getCharCount()),a={text:a,selection:[new t(c,e,!1)]}):a.selection=this._rangesToSelections(a.selection);a._code=!0;f&&(this._variableLineHeight=!1);this._modifyContent(a,!f,void 0===g||g,d);f&&13>b.isFirefox&&
-this._fixCaret()},setTopIndex:function(a,c){this._clientDiv&&this._scrollViewAnimated(0,this._getLinePixel(Math.max(0,a))-this._getScroll().y,c)},setTopPixel:function(a,c){this._clientDiv&&this._scrollViewAnimated(0,Math.max(0,a)-this._getScroll().y,c)},showSelection:function(a,c){return this._showCaret(a?!1:!0,c,a)},update:function(a,c){this._clientDiv&&((a||this._metrics.invalid)&&this._updateStyle(),void 0===c||c?this._update():this._queueUpdate())},_handleRootMouseDown:function(a){this._cancelCheckSelection();
-if(!this._ignoreEvent(a)){13>b.isFirefox&&1===a.which&&(this._clientDiv.contentEditable=!1,this._ignoreBlur=(this._overlayDiv||this._clientDiv).draggable=!0);var c=this._overlayDiv||this._clientDiv;9>b.isIE&&(c=this._viewDiv);for(var e=a.target?a.target:a.srcElement;e;){if(c===e||e.className&&-1!==e.className.indexOf("textViewFind"))return;e=e.parentNode}a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();if(!this._isW3CEvents){var g=this;this._getWindow().setTimeout(function(){g._clientDiv.focus()},
-0)}}},_handleRootMouseUp:function(a){this._ignoreEvent(a)||(13>b.isFirefox&&1===a.which&&(this._clientDiv.contentEditable=!0,(this._overlayDiv||this._clientDiv).draggable=!1),b.isFirefox&&1===a.which&&(this._fixCaret(),this._ignoreBlur=!1))},_handleBlur:function(){this._cancelCheckSelection();if(!this._ignoreBlur){this._commitIME();this._hasFocus=!1;if(9>b.isIE&&!this._getSelections()[0].isEmpty()){var a=this._rootDiv,c=b.createElement(a.ownerDocument,"div");a.appendChild(c);a.removeChild(c)}this._cursorDiv&&
-(this._cursorDiv.style.display="none");if(this._domSelection)if(this._domSelection.forEach(function(a){a.update()}),a=this._getWindow(),c=this._parent.ownerDocument,a.getSelection){c=a.getSelection();for(a=c.anchorNode;a;){if(a===this._clientDiv){0b.isFirefox){var c=this;this._getWindow().setTimeout(function(){c._clientDiv.contentEditable=!0;c._clientDiv.draggable=!1;c._ignoreBlur=!1},0)}if(this.isListening("DragStart")&&-1!==this._dragOffset)this._isMouseDown=!1,this.onDragStart(this._createMouseEvent("DragStart",a)),this._dragOffset=-1;else return a.preventDefault&&
-a.preventDefault(),!1}},_handleDrag:function(a){if(!this._ignoreEvent(a)&&this.isListening("Drag"))this.onDrag(this._createMouseEvent("Drag",a))},_handleDragEnd:function(a){if(!this._ignoreEvent(a)){this._dropTarget=!1;this._dragOffset=-1;if(this.isListening("DragEnd"))this.onDragEnd(this._createMouseEvent("DragEnd",a));13>b.isFirefox&&(this._fixCaret(),"none"===a.dataTransfer.dropEffect&&!a.dataTransfer.mozUserCancelled&&this._fixCaret())}},_handleDragEnter:function(a){if(!this._ignoreEvent(a)){var c=
-!0;this._dropTarget=!0;this.isListening("DragEnter")&&(c=!1,this.onDragEnter(this._createMouseEvent("DragEnter",a)));if(b.isWebkit||c)return a.preventDefault&&a.preventDefault(),!1}},_handleDragOver:function(a){if(!this._ignoreEvent(a)){var c=!0;this.isListening("DragOver")&&(c=!1,this.onDragOver(this._createMouseEvent("DragOver",a)));if(b.isWebkit||c)return c&&(a.dataTransfer.dropEffect="none"),a.preventDefault&&a.preventDefault(),!1}},_handleDragLeave:function(a){if(!this._ignoreEvent(a)&&(this._dropTarget=
-!1,this.isListening("DragLeave")))this.onDragLeave(this._createMouseEvent("DragLeave",a))},_handleDrop:function(a){if(!this._ignoreEvent(a)){this._dropTarget=!1;if(this.isListening("Drop"))this.onDrop(this._createMouseEvent("Drop",a));a.preventDefault&&a.preventDefault();return!1}},_handleFocus:function(){this._hasFocus=!0;b.isIOS&&void 0!==this._lastTouchOffset?(this.setCaretOffset(this._lastTouchOffset,!0),this._lastTouchOffset=void 0):this._updateDOMSelection();this._cursorDiv&&(this._cursorDiv.style.display=
-"block");this._domSelection&&this._domSelection.forEach(function(a){a.update()});if(!this._ignoreFocus)this.onFocus({type:"Focus"})},_handleKeyDown:function(a){this._cancelCheckSelection();if(!this._ignoreEvent(a)){if(this.isListening("KeyDown")){var c=this._createKeyEvent("KeyDown",a);this.onKeyDown(c);if(c.defaultPrevented){b.isFirefox&&(this._keyDownPrevented=!0);a.preventDefault();return}}c=!1;switch(a.keyCode){case 16:case 17:case 18:case 91:c=!0;break;default:this._setLinksVisible(!1)}if(229===
-a.keyCode){if(this._readonly)return a.preventDefault&&a.preventDefault(),!1;c=!0;b.isSafari&&b.isMac&&a.ctrlKey&&(c=!1,a.keyCode=129);c&&this._startIME()}else c||this._commitIME();if((b.isMac||b.isLinux)&&4>b.isFirefox||12.16>b.isOpera)return this._keyDownEvent=a,!0;if(this._doAction(a))return a.preventDefault?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=!0,a.returnValue=!1,a.keyCode=0),!1}},_handleKeyPress:function(a){if(!this._ignoreEvent(a))if(this._keyDownPrevented)a.preventDefault&&
-(a.preventDefault(),a.stopPropagation()),this._keyDownPrevented=void 0;else{if(b.isMac&&b.isWebkit&&(63232<=a.keyCode&&63487>=a.keyCode||13===a.keyCode||8===a.keyCode)||((b.isMac||b.isLinux)&&4>b.isFirefox||12.16>b.isOpera)&&this._doAction(this._keyDownEvent))return a.preventDefault&&a.preventDefault(),!1;var c=b.isMac?a.metaKey:a.ctrlKey;if(void 0!==a.charCode&&c)switch(a.charCode){case 99:case 118:case 120:return!0}if(this.isListening("KeyPress")&&(c=this._createKeyEvent("KeyPress",a),this.onKeyPress(c),
-c.defaultPrevented)){a.preventDefault();return}if(this._doAction(a))return a.preventDefault?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=!0,a.returnValue=!1,a.keyCode=0),!1;c=!1;if(b.isMac){if(a.ctrlKey||a.metaKey)c=!0}else if(b.isFirefox){if(a.ctrlKey||a.altKey)c=!0}else a.ctrlKey^a.altKey&&(c=!0);if(!c&&(c=b.isOpera?a.which:void 0!==a.charCode?a.charCode:a.keyCode,31g?this._doAutoScroll("down",c,a-g):cn&&!this._wrapMode?this._doAutoScroll("right",c-n,a):(this._endAutoScroll(),this._setSelectionTo(c,a,!1,!0))}}}},_isClientDiv:function(a){var c=this._overlayDiv||this._clientDiv;for(a=a.target?a.target:a.srcElement;a;){if(c===a)return!0;a=a.parentNode}return!1},_createKeyEvent:function(a,c){return{type:a,event:c,preventDefault:function(){this.defaultPrevented=!0}}},_createMouseEvent:function(a,c){var b=this.convert({x:c.clientX,y:c.clientY},"page","document");return{type:a,
-event:c,clickCount:this._clickCount,x:b.x,y:b.y,preventDefault:function(){this.defaultPrevented=!0}}},_createTouchEvent:function(a,c){var b=c.touches.length?this.convert({x:c.touches[0].clientX,y:c.touches[0].clientY},"page","document"):{};return{type:a,event:c,touchCount:c.touches.length,x:b.x,y:b.y,preventDefault:function(){this.defaultPrevented=!0}}},_handleMouseUp:function(a){var c=a.which?0===a.button:1===a.button;if(this.isListening("MouseUp")&&(this._isClientDiv(a)||c&&this._isMouseDown)){var e=
-this._createMouseEvent("MouseUp",a);this.onMouseUp(e);if(e.defaultPrevented){a.preventDefault();this._isMouseDown=!1;return}}if(!this._linksVisible){if(c&&this._isMouseDown){var e=this._getSelections(),g=t.editing(e);e.forEach(function(a){a._editing=!1});-1!==this._dragOffset&&(g.extend(this._dragOffset),g.collapse(),e=g,this._dragOffset=-1);this._setSelection(e,!1);this._isMouseDown=!1;this._endAutoScroll();this._isW3CEvents&&this._setGrab(null)}c&&b.isFirefox&&(this._updateDOMSelection(),a.preventDefault())}},
-_handleMouseWheel:function(a){if(!this._noScroll){var c=this._getLineHeight(),e=0,g=0;b.isIE||b.isOpera?g=-a.wheelDelta/40*c:b.isFirefox?"wheel"===a.type?a.deltaMode?(e=Math.max(-256,Math.min(256,a.deltaX))*c,g=Math.max(-256,Math.min(256,a.deltaY))*c):(e=a.deltaX,g=a.deltaY):(c=b.isMac?3*a.detail:Math.max(-256,Math.min(256,a.detail))*c,a.axis===a.HORIZONTAL_AXIS?e=c:g=c):b.isMac?(g=a.timeStamp-this._wheelTimeStamp,this._wheelTimeStamp=a.timeStamp,e=0!==a.wheelDeltaX%120?1:40>g?40/(40-g):40,g=0!==
-a.wheelDeltaY%120?1:40>g?40/(40-g):40,e=Math.ceil(-a.wheelDeltaX/e),-1e&&(e=-1),0e&&(e=1),g=Math.ceil(-a.wheelDeltaY/g),-1g&&(g=-1),0g&&(g=1)):(e=-a.wheelDeltaX,g=8*(-a.wheelDeltaY/120)*c);if(b.isSafari||b.isChrome&&b.isMac){for(c=a.target;c&&void 0===c.lineIndex;)c=c.parentNode;this._mouseWheelLine=c}c=this._getScroll();this._scrollView(e,g);e=this._getScroll();if(c.x!==e.x||c.y!==e.y)return a.preventDefault&&a.preventDefault(),!1}},_handlePaste:function(a){this._cancelCheckSelection();
-if(!this._ignoreEvent(a)&&!this._ignorePaste&&this._doPaste(a)){if(b.isIE){var c=this;this._ignoreFocus=!0;this._getWindow().setTimeout(function(){c._updateDOMSelection();c._ignoreFocus=!1},0)}a.preventDefault&&a.preventDefault();return!1}},_handleResize:function(){var a=this._rootDiv.clientWidth,c=this._rootDiv.clientHeight;if(this._rootWidth!==a||this._rootHeight!==c)this._rootWidth!==a&&this._wrapMode&&this._resetLineHeight(),this._rootWidth=a,this._rootHeight=c,a=9>b.isIE,c=this._calculateMetrics(),
-s(c,this._metrics)||(this._metrics.invalid&&!c.invalid?this._updateStyle(!1,c):(this._variableLineHeight&&(this._variableLineHeight=!1,this._resetLineHeight()),this._metrics=c),a=!0),a?this._queueUpdate():this._update(),this.dispatchEvent({type:"Resize"})},_handleRulerEvent:function(a){for(var c=a.target?a.target:a.srcElement,e=c.lineIndex;c&&!c._ruler;)void 0===e&&void 0!==c.lineIndex&&(e=c.lineIndex),c=c.parentNode;var b=c?c._ruler:null;if(void 0===e&&b&&"document"===b.getOverview()){var g=this._getClientHeight(),
-d=this._model.getLineCount(),n=this._getViewPadding(),e=this._viewDiv.getBoundingClientRect(),f=this._getLineHeight(),g=g+n.top+n.bottom-2*this._metrics.scrollWidth;f*d=f+a.data.length;)c--;c++;d=n.substring(e,c+g);e+=b;c+=b;n=this._getSelections();f=n[0].start-e;b=n[0].end-
-c;n[0].start=e;n[0].end=c;for(e=1;ea.timeStamp-this._touchStartTime){this._vScrollDiv.style.display="block";this._wrapMode||(this._hScrollDiv.style.display="block");var e=this,b=this._getWindow();this._touchScrollTimer=b.setInterval(function(){var a=0,c=0;if(e._touching)a=e._touchStartX-
-e._touchCurrentX,c=e._touchStartY-e._touchCurrentY,e._touchSpeedX=a/10,e._touchSpeedY=c/10,e._touchStartX=e._touchCurrentX,e._touchStartY=e._touchCurrentY;else{if(0.1>Math.abs(e._touchSpeedX)&&0.1>Math.abs(e._touchSpeedY)){e._vScrollDiv.style.display="none";e._hScrollDiv.style.display="none";b.clearInterval(e._touchScrollTimer);e._touchScrollTimer=null;return}a=10*e._touchSpeedX;c=10*e._touchSpeedY;e._touchSpeedX*=0.95;e._touchSpeedY*=0.95}e._scrollView(a,c)},10)}this._touchScrollTimer&&a.preventDefault()}},
-_handleTouchEnd:function(a){if(this.isListening("TouchEnd")){var c=this._createTouchEvent("TouchEnd",a);this.onTouchEnd(c);if(c.defaultPrevented){a.preventDefault();return}if(this._noScroll)return}0===a.touches.length&&(this._touching=!1)},_doAction:function(a){var c,e,b=this._keyModes;for(e=b.length-1;0<=e;e--)if(c=b[e],"function"===typeof c.match&&(c=c.match(a),void 0!==c))return this.invokeAction(c);return!1},_doMove:function(a,c){var e=this._model,b=c.getCaret(),g=e.getLineAtOffset(b);a.count||
-(a.count=1);for(;0!==a.count;){var d=e.getLineStart(g);if(0>a.count&&b===d)if(0a.count?1:-1):(d=this._getLine(g),c.extend(d.getNextOffset(b,
-a)),d.destroy())}b=c.getCaret()}return c},_doBackspace:function(a){var c=this,e=this._getSelections();e.forEach(function(e){e.isEmpty()&&(a.count||(a.count=1),a.count*=-1,a.expandTab=c._expandTab,c._doMove(a,e))});this._modifyContent({text:"",selection:e},!0);return!0},_doCase:function(a){var c=this,e=this._getSelections(),b=[];e.forEach(function(e){c._doMove(a,e);e=c.getText(e.start,e.end);switch(a.type){case "lower":e=e.toLowerCase();break;case "capitalize":e=e.replace(/(?:^|\s)\S/g,function(a){return a.toUpperCase()});
-break;case "reverse":for(var g="",d=0;dg&&(k=g-f);v=void 0!==v?Math.min(v,k-n.y):k-n.y}});this._setSelection(g,!0,!0,function(){},v,!1,!0);return!0},_doPageUp:function(a){var c=this,e=this._model,g=this._getSelections(),d=this._getScroll(),n=this._getClientHeight(),f=this._getLineHeight(),t=Math.floor(n/
-f),u,m,s;g.forEach(function(g){var v=g.getCaret(),k=e.getLineAtOffset(v);if(c._lineHeight){u=g._columnX;k=c._getBoundsAtOffset(v);if(-1===u||a.select&&b.isIE)u=g._columnX=k.left;v=c._getLineIndex(k.bottom-n);m=c._getLine(v);var h=c._getLinePixel(v),v=m.getOffset(u,k.bottom-n-h),A=m.getBoundingClientRect(v);m.destroy();g.extend(v);a.select||g.collapse();s=void 0!==s?Math.max(s,A.top+h-k.top):A.top+h-k.top}else if(0d?Math.floor(d):Math.ceil(d),u=Math.max(0,Math.min(n-1,f+d));else if("left"===this._autoScrollDir||"right"===this._autoScrollDir)u=this._getLineIndex(g.y),f=this._getLine(f),g.x+=f.getBoundingClientRect(d,
-!1).left,f.destroy();this._blockSelection?c=this._getBlockSelections(c,u,g):0===u&&(b.isMac||b.isLinux)?e.extend(0):u===n-1&&(b.isMac||b.isLinux)?e.extend(a.getCharCount()):(f=this._getLine(u),e.extend(f.getOffset(g.x,g.y-this._getLinePixel(u))),f.destroy());this._setSelection(c,!0)},_autoScrollTimer:function(){this._autoScroll();var a=this;this._autoScrollTimerID=this._getWindow().setTimeout(function(){a._autoScrollTimer()},this._AUTO_SCROLL_RATE)},_calculateLineHeightTimer:function(a){if(this._lineHeight&&
-!this._calculateLHTimer){var c=this._model.getLineCount(),e=0;if(a){a=0;for(var b=(new Date).getTime(),g=0;e=s.bottom-s.top,s=Math.max(1,s.bottom-s.top);t>f&&(k=1);u>t&&(k=2);v>u&&(k=3);var h;0!==k&&(h={style:{}},0!==(k&1)&&(h.style.fontStyle="italic"),0!==(k&2)&&(h.style.fontWeight="bold"));f=c(g);a.removeChild(g);k=n(this._viewDiv);g=b.createElement(e,"div");g.style.position="fixed";g.style.left="-1000px";g.style.paddingLeft=k.left+"px";g.style.paddingTop=k.top+"px";g.style.paddingRight=k.right+"px";
-g.style.paddingBottom=k.bottom+"px";g.style.width="100px";g.style.height="100px";k=b.createElement(e,"div");k.style.width="100%";k.style.height="100%";g.appendChild(k);a.appendChild(g);t=g.getBoundingClientRect();u=k.getBoundingClientRect();v=0;!this._singleMode&&!this._noScroll&&(g.style.overflow="hidden",k.style.height="200px",v=g.clientWidth,g.style.overflow="scroll",v-=g.clientWidth);a.removeChild(g);var k={left:u.left-t.left,top:u.top-t.top,right:t.right-u.right,bottom:t.bottom-u.bottom},A=0,
-l=u=0;if(!d){g=b.createElement(e,"div");g.style.position="fixed";g.style.left="-1000px";a.appendChild(g);g.innerHTML=Array(2).join("a");t=g.getBoundingClientRect();l=Math.ceil(t.right-t.left);if(this._wrapOffset||this._marginOffset)g.innerHTML=Array(this._wrapOffset+1+(b.isWebkit?0:1)).join(" "),t=g.getBoundingClientRect(),A=Math.ceil(t.right-t.left),g.innerHTML=Array(this._marginOffset+1).join(" "),u=g.getBoundingClientRect(),u=Math.ceil(u.right-u.left);a.removeChild(g)}return{lineHeight:s,largestFontStyle:h,
-lineTrim:f,viewPadding:k,scrollWidth:v,wrapWidth:A,marginWidth:u,charWidth:l,invalid:d}},_cancelAnimation:function(){this._animation&&(this._animation.stop(),this._animation=null)},_clearSelection:function(a){var c=this._getSelections();c.forEach(function(c){"next"===a?c.start=c.end:c.end=c.start});this._setSelection(c,!0);return!0},_commitIME:function(a){if(-1!==this._imeOffset){var c=this._model,e=c.getLineAtOffset(this._imeOffset),g=c.getLineStart(e),d=this._getLineNode(e);if(!a){this._scrollDiv.focus();
-this._clientDiv.focus();var n=this._getDOMText(d).text,c=c.getLine(e),g=this._imeOffset-g,c=g+n.length-c.length;g!==c&&(a=n.substring(g,c))}this._imeOffset=-1;a&&(!this._doContent(a)&&!b.isWebkit)&&(d.lineRemoved=!0,this._queueUpdate())}},_createActions:function(){this.addKeyMode(new p.DefaultKeyMode(this));var c=this;this._actions={noop:{defaultHandler:function(){return c._doNoop()}},lineUp:{defaultHandler:function(e){return c._doLineUp(a(e,{select:!1}))},actionDescription:{name:l.lineUp}},lineDown:{defaultHandler:function(e){return c._doLineDown(a(e,
-{select:!1}))},actionDescription:{name:l.lineDown}},lineStart:{defaultHandler:function(e){return c._doHome(a(e,{select:!1,ctrl:!1}))},actionDescription:{name:l.lineStart}},lineEnd:{defaultHandler:function(e){return c._doEnd(a(e,{select:!1,ctrl:!1}))},actionDescription:{name:l.lineEnd}},charPrevious:{defaultHandler:function(e){return c._doCursorPrevious(a(e,{select:!1,unit:"character"}))},actionDescription:{name:l.charPrevious}},charNext:{defaultHandler:function(e){return c._doCursorNext(a(e,{select:!1,
-unit:"character"}))},actionDescription:{name:l.charNext}},pageUp:{defaultHandler:function(e){return c._doPageUp(a(e,{select:!1}))},actionDescription:{name:l.pageUp}},pageDown:{defaultHandler:function(e){return c._doPageDown(a(e,{select:!1}))},actionDescription:{name:l.pageDown}},scrollPageUp:{defaultHandler:function(e){return c._doScroll(a(e,{type:"pageUp"}))},actionDescription:{name:l.scrollPageUp}},scrollPageDown:{defaultHandler:function(e){return c._doScroll(a(e,{type:"pageDown"}))},actionDescription:{name:l.scrollPageDown}},
-scrollLineUp:{defaultHandler:function(e){return c._doScroll(a(e,{type:"lineUp"}))},actionDescription:{name:l.scrollLineUp}},scrollLineDown:{defaultHandler:function(e){return c._doScroll(a(e,{type:"lineDown"}))},actionDescription:{name:l.scrollLineDown}},wordPrevious:{defaultHandler:function(e){return c._doCursorPrevious(a(e,{select:!1,unit:"word"}))},actionDescription:{name:l.wordPrevious}},wordNext:{defaultHandler:function(e){return c._doCursorNext(a(e,{select:!1,unit:"word"}))},actionDescription:{name:l.wordNext}},
-textStart:{defaultHandler:function(e){return c._doHome(a(e,{select:!1,ctrl:!0}))},actionDescription:{name:l.textStart}},textEnd:{defaultHandler:function(e){return c._doEnd(a(e,{select:!1,ctrl:!0}))},actionDescription:{name:l.textEnd}},scrollTextStart:{defaultHandler:function(e){return c._doScroll(a(e,{type:"textStart"}))},actionDescription:{name:l.scrollTextStart}},scrollTextEnd:{defaultHandler:function(e){return c._doScroll(a(e,{type:"textEnd"}))},actionDescription:{name:l.scrollTextEnd}},centerLine:{defaultHandler:function(e){return c._doScroll(a(e,
-{type:"centerLine"}))},actionDescription:{name:l.centerLine}},selectLineUp:{defaultHandler:function(e){return c._doLineUp(a(e,{select:!0}))},actionDescription:{name:l.selectLineUp}},selectLineDown:{defaultHandler:function(e){return c._doLineDown(a(e,{select:!0}))},actionDescription:{name:l.selectLineDown}},selectWholeLineUp:{defaultHandler:function(e){return c._doLineUp(a(e,{select:!0,wholeLine:!0}))},actionDescription:{name:l.selectWholeLineUp}},selectWholeLineDown:{defaultHandler:function(e){return c._doLineDown(a(e,
-{select:!0,wholeLine:!0}))},actionDescription:{name:l.selectWholeLineDown}},selectLineStart:{defaultHandler:function(e){return c._doHome(a(e,{select:!0,ctrl:!1}))},actionDescription:{name:l.selectLineStart}},selectLineEnd:{defaultHandler:function(e){return c._doEnd(a(e,{select:!0,ctrl:!1}))},actionDescription:{name:l.selectLineEnd}},selectCharPrevious:{defaultHandler:function(e){return c._doCursorPrevious(a(e,{select:!0,unit:"character"}))},actionDescription:{name:l.selectCharPrevious}},selectCharNext:{defaultHandler:function(e){return c._doCursorNext(a(e,
-{select:!0,unit:"character"}))},actionDescription:{name:l.selectCharNext}},selectPageUp:{defaultHandler:function(e){return c._doPageUp(a(e,{select:!0}))},actionDescription:{name:l.selectPageUp}},selectPageDown:{defaultHandler:function(e){return c._doPageDown(a(e,{select:!0}))},actionDescription:{name:l.selectPageDown}},selectWordPrevious:{defaultHandler:function(e){return c._doCursorPrevious(a(e,{select:!0,unit:"word"}))},actionDescription:{name:l.selectWordPrevious}},selectWordNext:{defaultHandler:function(e){return c._doCursorNext(a(e,
-{select:!0,unit:"word"}))},actionDescription:{name:l.selectWordNext}},selectTextStart:{defaultHandler:function(e){return c._doHome(a(e,{select:!0,ctrl:!0}))},actionDescription:{name:l.selectTextStart}},selectTextEnd:{defaultHandler:function(e){return c._doEnd(a(e,{select:!0,ctrl:!0}))},actionDescription:{name:l.selectTextEnd}},deletePrevious:{defaultHandler:function(e){return c._doBackspace(a(e,{unit:"character"}))},actionDescription:{name:l.deletePrevious}},deleteNext:{defaultHandler:function(e){return c._doDelete(a(e,
-{unit:"character"}))},actionDescription:{name:l.deleteNext}},deleteWordPrevious:{defaultHandler:function(e){return c._doBackspace(a(e,{unit:"word"}))},actionDescription:{name:l.deleteWordPrevious}},deleteWordNext:{defaultHandler:function(e){return c._doDelete(a(e,{unit:"word"}))},actionDescription:{name:l.deleteWordNext}},deleteLineStart:{defaultHandler:function(e){return c._doBackspace(a(e,{unit:"line"}))},actionDescription:{name:l.deleteLineStart}},deleteLineEnd:{defaultHandler:function(e){return c._doDelete(a(e,
-{unit:"line"}))},actionDescription:{name:l.deleteLineEnd}},tab:{defaultHandler:function(e){return c._doTab(a(e,{}))},actionDescription:{name:l.tab}},shiftTab:{defaultHandler:function(e){return c._doShiftTab(a(e,{}))},actionDescription:{name:l.shiftTab}},enter:{defaultHandler:function(e){return c._doEnter(a(e,{}))},actionDescription:{name:l.enter}},enterNoCursor:{defaultHandler:function(e){return c._doEnter(a(e,{noCursor:!0}))},actionDescription:{name:l.enterNoCursor}},escape:{defaultHandler:function(e){return c._doEscape(a(e,
-{}))},actionDescription:{name:l.escape}},selectAll:{defaultHandler:function(e){return c._doSelectAll(a(e,{}))},actionDescription:{name:l.selectAll}},copy:{defaultHandler:function(e){return c._doCopy(a(e,{}))},actionDescription:{name:l.copy}},cut:{defaultHandler:function(e){return c._doCut(a(e,{}))},actionDescription:{name:l.cut}},paste:{defaultHandler:function(e){return c._doPaste(a(e,{}))},actionDescription:{name:l.paste}},uppercase:{defaultHandler:function(e){return c._doCase(a(e,{type:"upper"}))},
-actionDescription:{name:l.uppercase}},lowercase:{defaultHandler:function(e){return c._doCase(a(e,{type:"lower"}))},actionDescription:{name:l.lowercase}},capitalize:{defaultHandler:function(e){return c._doCase(a(e,{unit:"word",type:"capitalize"}))},actionDescription:{name:l.capitalize}},reversecase:{defaultHandler:function(e){return c._doCase(a(e,{type:"reverse"}))},actionDescription:{name:l.reversecase}},toggleOverwriteMode:{defaultHandler:function(e){return c._doOverwriteMode(a(e,{}))},actionDescription:{name:l.toggleOverwriteMode}},
-toggleTabMode:{defaultHandler:function(e){return c._doTabMode(a(e,{}))},actionDescription:{name:l.toggleTabMode}},toggleWrapMode:{defaultHandler:function(e){return c._doWrapMode(a(e,{}))},actionDescription:{name:l.toggleWrapMode}}}},_createRulerParent:function(a,c){var e=b.createElement(a,"div");e.className=c;e.tabIndex=-1;e.style.overflow="hidden";e.style.MozUserSelect="none";e.style.WebkitUserSelect="none";e.style.position="absolute";e.style.top="0px";e.style.bottom="0px";e.style.cursor="default";
-e.style.display="none";e.setAttribute("aria-hidden","true");this._rootDiv.appendChild(e);return e},_createRuler:function(a,c){if(this._clientDiv){var e=this._getRulerParent(a);if(e){if(e!==this._marginDiv||this._marginOffset)e.style.display="block";e.rulerWidth=void 0;var g=b.createElement(e.ownerDocument,"div");g._ruler=a;a.node=g;g.rulerChanged=!0;g.style.position="relative";g.style.cssFloat="left";g.style.styleFloat="left";g.style.outline="none";if(void 0===c||0>c||c>=e.children.length)e.appendChild(g);
-else{for(var d=e.firstChild;d&&0this._getLineHeight()){a=c.getBoundingClientRect();var e=this._clientDiv.getBoundingClientRect();a.bottom>e.bottom&&(c=this._getLinePrevious(c)||c)}return c.lineIndex},_getBlockSelections:function(a,c,e){var b=this._model;a=a.filter(function(a){return!a._editing});var g=b.getLineAtOffset(this._blockSelection.getAnchor()),d;c>g?d=c:(d=g,g=c);for(c=g;c<=d;c++){var n=this._getLine(c),g=n.getOffset(e.x,1),f=n.getOffset(this._blockSelection._docX,
-1);n.destroy();g===f&&g===b.getLineEnd(c)||(n=gc)for(;c=a;c--)e-=this._getLineHeight(c);return e}return this._getLineHeight()*a},_getLineIndex:function(a,c){var e,b=0,g=this._model.getLineCount();if(this._lineHeight){var b=this._getTopIndex(),d=-this._topIndexY+this._getScroll().y;if(a!==d)if(a=d&&bb||b>g-1)?-1:Math.max(0,Math.min(g-1,b))},_getRulerParent:function(a){switch(a.getLocation()){case "left":return this._leftDiv;case "right":return this._rightDiv;case "innerRight":return this._innerRightDiv;case "margin":return this._marginDiv}return null},_getScroll:function(a){(void 0===a||a)&&this._cancelAnimation();a=this._viewDiv;return{x:a.scrollLeft,y:a.scrollTop}},_getSelection:function(){return(Array.isArray(this._selection)?this._selection[0]:this._selection).clone()},
-_getSelections:function(){return(Array.isArray(this._selection)?this._selection:[this._selection]).map(function(a){return a.clone()})},_getTopIndex:function(a){var c=this._topChild;if(a&&this._getClientHeight()>this._getLineHeight()){a=c.getBoundingClientRect();var e=this._getViewPadding(),b=this._viewDiv.getBoundingClientRect();a.top(new Date).getTime()-this._lastScrollTime))return{};var a=this._viewDiv.getBoundingClientRect(),c=this._lastMouseMoveX,e=this._lastMouseMoveY;return{vertical:a.top<=e&&ec&&(a.end>c&&a.startn+d&&(f.lineIndex=t+g-d,f._line.lineIndex=f.lineIndex);f=this._getLineNext(f)}this._lineHeight&&(a=[n,d].concat(Array(g)),Array.prototype.splice.apply(this._lineHeight,a));!this._wrapMode&&(n<=this._maxLineIndex&&this._maxLineIndex<=n+d)&&(this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0);this._update()},_onModelChanging:function(a){a.type="ModelChanging";
-this.onModelChanging(a);a.type="Changing"},_queueUpdate:function(){if(!this._updateTimer&&!this._ignoreQueueUpdate){var a=this;this._updateTimer=this._getWindow().setTimeout(function(){a._updateTimer=null;a._update()},0)}},_rangesToSelections:function(a){var c=[],e=this._model.getCharCount();a.forEach(function(a){var b;if(a instanceof t)b=a.clone();else{b=a.start;a=a.end;var g=b>a;if(g){var d=b;b=a;a=d}b=Math.max(0,Math.min(b,e));a=Math.max(0,Math.min(a,e));b=new t(b,a,g)}c.push(b)});return c},_resetLineHeight:function(a,
-c){if(this._wrapMode||this._variableLineHeight){if(void 0!==a&&void 0!==c)for(var e=a;eb.isFirefox&&this._fixCaret()}},_scrollViewAnimated:function(a,c,e){var b=this._getWindow();if(e&&this._scrollAnimation){var g=this;this._animation=new C({window:b,duration:this._scrollAnimation,curve:[c,0],onAnimate:function(a){a=c-Math.floor(a);g._scrollView(0,a);c-=a},onEnd:function(){g._animation=null;
-g._scrollView(a,c);e&&b.setTimeout(e,0)}});this._animation.play()}else this._scrollView(a,c),e&&b.setTimeout(e,0)},_scrollView:function(a,c){this._ensureCaretVisible=!1;var e=this._viewDiv;a&&(e.scrollLeft+=a);c&&(e.scrollTop+=c)},_setClipboardText:function(a,c){var g,d=this._getWindow(),n=d.clipboardData;!n&&c&&(n=c.clipboardData);if(n&&(g=[],e(a,function(a){g.push(a)},function(){g.push(b.platformDelimiter)}),n.setData(b.isIE?"Text":"text/plain",g.join(""))||21=this._doubleClickSelection.start?(b=this._doubleClickSelection.start,n=a.getNextOffset(m,{unit:"wordend",count:1})):(b=a.getNextOffset(m,{unit:"word",count:-1}),n=this._doubleClickSelection.end):(b=a.getNextOffset(m,{unit:"word",count:-1}),n=a.getNextOffset(b,{unit:"wordend",count:1})):this._doubleClickSelection?(g=n.getLineAtOffset(this._doubleClickSelection.start),c>=g?(b=n.getLineStart(g),n=n.getLineEnd(c)):
-(b=n.getLineStart(c),n=n.getLineEnd(g))):(b=n.getLineStart(c),n=n.getLineEnd(c)),e.setCaret(b),e.extend(n)));this._setSelection(f,!0,!0,null,!1);a.destroy();return!0},_setFullSelection:function(a,c){this._fullSelection=a;b.isWebkit&&(this._fullSelection=!0);this._domSelection||(this._domSelection=[],this._cursorVisible=!0);c||this._updateDOMSelection()},_setBlockCursor:function(a){this._blockCursorVisible=a;this._updateBlockCursorVisible()},_setOverwriteMode:function(a){this._overwriteMode=a;this._updateBlockCursorVisible()},
-_updateBlockCursorVisible:function(){if(this._blockCursorVisible||this._overwriteMode){if(!this._cursorDiv){var a=this._viewDiv,c=b.createElement(a.ownerDocument,"div");c.className="textviewBlockCursor";this._cursorDiv=c;c.tabIndex=-1;c.style.zIndex="2";c.style.color="transparent";c.style.position="absolute";c.style.pointerEvents="none";c.innerHTML="\x26nbsp;";a.appendChild(c);this._updateDOMSelection()}}else this._cursorDiv&&(this._cursorDiv.parentNode.removeChild(this._cursorDiv),this._cursorDiv=
-null)},_setMarginOffset:function(a,c){this._marginOffset=a;this._marginDiv.style.display=a?"block":"none";c||(this._metrics=this._calculateMetrics(),this._queueUpdate())},_setWrapOffset:function(a,c){this._wrapOffset=a;c||(this._metrics=this._calculateMetrics(),this._queueUpdate())},_setReadOnly:function(a){this._readonly=a;this._clientDiv.setAttribute("aria-readonly",a?"true":"false")},_setSingleMode:function(a,c){this._singleMode=a;this._updateOverflow();this._updateStyle(c)},_setNoScroll:function(a,
-c){this._noScroll=a;this._updateOverflow();this._updateStyle(c)},_setTabSize:function(a,c){this._tabSize=a;this._customTabSize=void 0;var e=this._clientDiv;b.isOpera?e&&(e.style.OTabSize=this._tabSize+""):537.1<=b.isWebkit?e&&(e.style.tabSize=this._tabSize+""):4<=b.isFirefox?e&&(e.style.MozTabSize=this._tabSize+""):8!==this._tabSize&&(this._customTabSize=this._tabSize);c||(this.redrawLines(),this._resetLineWidth())},_setTheme:function(a){this._theme&&this._theme.removeEventListener("ThemeChanged",
-this._themeListener.onChanged);(this._theme=a)&&this._theme.addEventListener("ThemeChanged",this._themeListener.onChanged);this._setThemeClass(this._themeClass)},_setThemeClass:function(a,c){this._themeClass=a;var e="textview",b=this._theme.getThemeClass();b&&(e+=" "+b);this._themeClass&&b!==this._themeClass&&(e+=" "+this._themeClass);this._rootDiv.className=e;this._updateStyle(c)},_setUndoStack:function(a){this._undoStack=a},_setWrapMode:function(a,c){this._wrapMode=a&&this._wrappable;var e=this._clientDiv;
-this._wrapMode?(e.style.whiteSpace="pre-wrap",e.style.wordWrap="break-word"):(e.style.whiteSpace="pre",e.style.wordWrap="normal");this._updateOverflow();c||(this.redraw(),this._resetLineWidth());this._resetLineHeight()},_showCaret:function(a,c,e,b){if(this._clientDiv&&!(0r?l.bottom:r)-(l.topf.x+
-g&&(a=Math.max(z-f.x-g,A));n=0;pf.y+h&&(n=r-f.y-h);b&&(0n&&(n=Math.min(n,b)));b=B&&"always"===e.scrollPolicy;if(0!==a||0!==n||b)return B?(b=0e&&(e=0),1a.length&&c.splice(a.length).forEach(function(a){a.destroy()});for(e=0;ed.y)break;z+=r;p++}v=p;h=Math.max(0,v-1);A=g=d.y-z;0C?(new F(this,C)).create(R,null):(R.firstChild&&(c.insertBefore(R,r),R=y.createDocumentFragment()),r&&r.lineChanged&&(r=(new F(this,C)).create(R,r),r.lineChanged=!1),r=this._getLineNext(r));R.firstChild&&c.insertBefore(R,r);b.isWebkit&&!this._wrapMode&&(c.style.width="0x7fffffffpx");r=this._getLineNext();C=l+g;for(R=!1;r;)h=r.lineWidth,void 0===h&&(y=r._line.getBoundingClientRect(),h=r.lineWidth=Math.ceil(y.right-y.left),y=y.bottom-y.top,this._lineHeight?this._lineHeight[r.lineIndex]=
-y:0!==t&&(0!==y&&Math.ceil(t)!==Math.ceil(y))&&(this._variableLineHeight=!0,this._lineHeight=[],this._lineHeight[r.lineIndex]=y)),this._lineHeight&&!R&&(C-=this._lineHeight[r.lineIndex],0>C&&(A=r.lineIndex,R=!0)),this._wrapMode||(h>=this._maxLineWidth&&(this._maxLineWidth=h,this._maxLineIndex=r.lineIndex),this._checkMaxLineIndex===r.lineIndex&&(this._checkMaxLineIndex=-1)),r.lineIndex===v&&(this._topChild=r),r.lineIndex===A&&(this._bottomChild=r),r=this._getLineNext(r);-1!==this._checkMaxLineIndex&&
-(C=this._checkMaxLineIndex,this._checkMaxLineIndex=-1,0<=C&&C=this._maxLineWidth&&(this._maxLineWidth=h,this._maxLineIndex=C),t.destroy()));for(;pl&&(s=!0,v=h),this._maxLineWidth>v&&(m=!0,l=p,f>l&&(s=!0,v=h)),A!==m&&(e.style.overflowX=m?"scroll":"hidden"),C!==s&&(e.style.overflowY=
-s?"scroll":"hidden"),u=A!==m||C!==s);s=v;this._wrapMode?this._metrics.wrapWidth&&(s=this._metrics.wrapWidth):s=Math.max(this._maxLineWidth+this._getInnerRightWidth(),s);m=s;if((!b.isIE||9<=b.isIE)&&this._maxLineWidth>v)s+=n.right+n.left;d.style.width=s+"px";this._clipScrollDiv&&(this._clipScrollDiv.style.width=s+"px");d=this._getScroll(!1);if(s=this._innerRightDiv)s.style.right=z+("scroll"===e.style.overflowY?this._metrics.scrollWidth:0)+"px",s.style.bottom=("scroll"===e.style.overflowX?k:0)+"px"}this._scrollHeight=
-f;this._vScrollDiv&&(s=l-8,z=Math.max(15,Math.ceil(Math.min(1,s/(f+n.top+n.bottom))*s)),this._vScrollDiv.style.left=t+v-8+"px",this._vScrollDiv.style.top=Math.floor(Math.max(0,d.y*s/f))+"px",this._vScrollDiv.style.height=z+"px");!this._wrapMode&&this._hScrollDiv&&(s=v-8,z=Math.max(15,Math.ceil(Math.min(1,s/(this._maxLineWidth+n.left+n.right))*s)),this._hScrollDiv.style.left=t+Math.floor(Math.max(0,Math.floor(d.x*s/this._maxLineWidth)))+"px",this._hScrollDiv.style.top=l-9+"px",this._hScrollDiv.style.width=
-z+"px");p=d.x;z=this._clipDiv;s=this._overlayDiv;if(A=this._marginDiv)A.style.left=-p+t+this._metrics.marginWidth+n.left+"px",A.style.bottom=("scroll"===e.style.overflowX?k:0)+"px";z?(z.scrollLeft=p,z.scrollTop=0,e=t+n.left,k=n.top,a=v,t=l,p=0,A=-g,0===d.x&&(e-=n.left,a+=n.left,p=n.left),d.x+v===m&&(a+=n.right),0===d.y&&(k-=n.top,t+=n.top,A+=n.top),d.y+l===f&&(t+=n.bottom),z.style.left=e+"px",z.style.top=k+"px",z.style.right=D-a-e+"px",z.style.bottom=B-t-k+"px",c.style.left=p+"px",c.style.top=A+"px",
-c.style.width=m+"px",c.style.height=l+g+"px",s&&(s.style.left=c.style.left,s.style.top=c.style.top,s.style.width=c.style.width,s.style.height=c.style.height)):(e=p,k=g,D=p+v,B=g+l,0===e&&(e-=n.left),0===k&&(k-=n.top),D===m&&(D+=n.right),d.y+l===f&&(B+=n.bottom),c.style.clip="rect("+k+"px,"+D+"px,"+B+"px,"+e+"px)",c.style.left=-p+t+n.left+"px",c.style.width=(this._wrapMode||b.isWebkit?m:v+p)+"px",a||(c.style.top=-g+n.top+"px",c.style.height=l+g+"px"),s&&(s.style.clip=c.style.clip,s.style.left=c.style.left,
-s.style.width=c.style.width,a||(s.style.top=c.style.top,s.style.height=c.style.height)));this._updateDOMSelection();u&&(c=this._ensureCaretVisible,this._ensureCaretVisible=!1,c&&this._showCaret(),this._queueUpdate())}}},_updateOverflow:function(){var a=this._viewDiv;this._noScroll?a.style.overflow="hidden":this._wrapMode?(a.style.overflowX="hidden",a.style.overflowY="scroll"):a.style.overflow="hidden"},_updateRuler:function(a,c,e,g){if(a)for(var d=this._parent.ownerDocument,n=this._getLineHeight(),
-f=this._getViewPadding(),t=a.firstChild;t;){var u=t._ruler,s=u.getOverview();t.rulerChanged&&(m(u.getRulerStyle(),t),a.rulerWidth=void 0);if("fixed"!==s){var v=n;"page"===s&&(v+=this._topIndexY);t.style.top=-v+"px";t.style.height=g+v+"px";var k,h=t.firstChild;h?(k=h,h=h.nextSibling):(k=b.createElement(d,"div"),k.style.visibility="hidden",t.appendChild(k));var A;if(t.rulerChanged&&k){v=-1;if(A=u.getWidestAnnotation())m(A.style,k),A.html&&(k.innerHTML=A.html);k.lineIndex=v;k.style.height=n+f.top+"px"}var l,
-z;if("page"===s){for(u=u.getAnnotations(c,e+1);h;)v=h.lineIndex,A=h.nextSibling,(!(c<=v&&v<=e)||h.lineChanged)&&t.removeChild(h),h=A;h=t.firstChild.nextSibling;z=d.createDocumentFragment();for(v=c;v<=e;v++)if(!h||h.lineIndex>v){l=b.createElement(d,"div");if(A=u[v])m(A.style,l),A.html&&(l.innerHTML=A.html),l.annotation=A;l.lineIndex=v;l.style.height=this._getLineHeight(v)+"px";z.appendChild(l)}else z.firstChild&&(t.insertBefore(z,h),z=d.createDocumentFragment()),h&&(h=h.nextSibling);z.firstChild&&
-t.insertBefore(z,h)}else{A=this._getClientHeight();v=this._model.getLineCount();h=A+f.top+f.bottom-2*this._metrics.scrollWidth;n*v>>0,0>v||(l=b.createElement(d,"div"),A=u[F],m(A.style,l),l.style.position="absolute",l.style.top=k+n+Math.floor(v*s)+"px",A.html&&(l.innerHTML=A.html),l.annotation=A,
-l.lineIndex=v,z.appendChild(l));t.appendChild(z)}else if(t._oldTrackHeight!==h)for(l=t.firstChild?t.firstChild.nextSibling:null;l;)l.style.top=this._metrics.scrollWidth+n+Math.floor(l.lineIndex*s)+"px",l=l.nextSibling;t._oldTrackHeight=h}}t.rulerChanged=!1;t=t.nextSibling}},_updateStyleSheet:function(){var a="";b.isWebkit&&0h)break;if(m.end>h)return-1;b+=m._model.getCharCount()-(m.end-m.start)}return h+b}for(k=0;kh-b)break;var g=m._model.getCharCount();if(m.start+g>h-b)return-1;b+=g-(m.end-m.start)}return h-
-b},removeProjection:function(h){this._removeProjection(h)},_removeProjection:function(h,f){var d,b=0;for(d=0;dh)return null;var d=this._model,
-b=this._projections,k=0,m=[],g=0,a,s,e;for(a=0;a=h-k)break;s=e._model.getLineCount()-1;if(e._lineIndex+s>=h-k){g=h-(e._lineIndex+k);if(gh-k)break;m.push(d.getText(g,e.start));s=e._model.getLineCount()-1;if(e._lineIndex+s>h-k)return m.push(e._model.getLine(0,f)),m.join("");m.push(e._model.getText());
-g=e.end;k+=s-e._lineCount}b=d.getLineEnd(h-k,f);gh-b)break;var a=g._model.getCharCount();if(g.start+a>h-b){d=h-(g.start+b);k+=g._model.getLineAtOffset(d);b+=d;break}k+=g._model.getLineCount()-1-g._lineCount;b+=a-(g.end-g.start)}return f.getLineAtOffset(h-b)+k},getLineCount:function(){for(var h=this._projections,f=this._model.getLineCount(),
-d=0;dh)return-1;for(var d=this._model,b=this._projections,k=0,m=0,g=0;gh-k)break;var s=a._model.getLineCount()-1;if(a._lineIndex+s>h-k)return a._model.getLineEnd(h-(a._lineIndex+k),f)+a.start+m;m+=a._model.getCharCount()-(a.end-a.start);k+=s-a._lineCount}return d.getLineEnd(h-k,f)+
-m},getLineStart:function(h){if(0>h)return-1;for(var f=this._model,d=this._projections,b=0,k=0,m=0;m=h-b)break;var a=g._model.getLineCount()-1;if(g._lineIndex+a>=h-b)return g._model.getLineStart(h-(g._lineIndex+b))+g.start+k;k+=g._model.getCharCount()-(g.end-g.start);b+=a-g._lineCount}return f.getLineStart(h-b)+k},getText:function(h,f){void 0===h&&(h=0);var d=this._model,b=this._projections,k=0,m=[],g,a,s;for(g=0;gh-k)break;
-s=a._model.getCharCount();if(a.start+s>h-k){if(void 0!==f&&a.start+s>f-k)return a._model.getText(h-(a.start+k),f-(a.start+k));m.push(a._model.getText(h-(a.start+k)));h=a.end+k+s-(a.end-a.start)}k+=s-(a.end-a.start)}var e=h-k;if(void 0!==f){for(;gf-k)break;m.push(d.getText(e,a.start));s=a._model.getCharCount();if(a.start+s>f-k)return m.push(a._model.getText(0,f-(a.start+k))),m.join("");m.push(a._model.getText());e=a.end;k+=s-(a.end-a.start)}m.push(d.getText(e,f-k))}else{for(;g<
-b.length;g++)a=b[g],m.push(d.getText(e,a.start)),m.push(a._model.getText()),e=a.end;m.push(d.getText(e))}return m.join("")},_onChanged:function(h){h=this._change;var f=h.baseStart,d=h.baseEnd,b,k,m=this._projections;for(b=0;bf);b++);var g=b;for(b=0;b=d);b++);var a=b,s=this._model,f=h.baseText.length-(d-f);for(b=a;be)break;if(s.end>e)return-1;g+=s._model.getCharCount()-(s.end-s.start)}return e+g};d.start=h(b);-1===d.start&&(d.text=this._model.getText(s.start,b)+d.text,d.addedLineCount+=this._model.getLineAtOffset(b)-this._model.getLineAtOffset(s.start),d.start=s.start+g);d.end=h(k);-1===d.end&&(d.text+=this._model.getText(k,s.end),d.addedLineCount+=this._model.getLineAtOffset(s.end)-this._model.getLineAtOffset(k),d.end=s.start+g)}d.addedCharCount=d.text.length;d.removedCharCount=d.end-d.start;
-d.removedLineCount=this.getLineAtOffset(d.end)-this.getLineAtOffset(d.start);this.onChanging({type:"Changing",text:d.text,start:d.start,removedCharCount:d.removedCharCount,addedCharCount:d.addedCharCount,removedLineCount:d.removedLineCount,addedLineCount:d.addedLineCount})},onChanging:function(h){return this.dispatchEvent(h)},onChanged:function(h){return this.dispatchEvent(h)},setLineDelimiter:function(h){this._model.setLineDelimiter(h)},setText:function(h,f,d){function b(e){for(m=g=0;ge-m)break;var c=a._model.getCharCount();if(a.start+c>e-m)return-1;m+=c-(a.end-a.start)}return e-m}this._change={text:h||"",start:f||0,end:void 0===d?this.getCharCount():d};var k=this._projections,m,g,a,s,e;h=b(this._change.start);-1===h&&(s={projection:a,start:this._change.start-(a.start+m)},h=a.end);f=b(this._change.end);-1===f&&(e={projection:a,end:this._change.end-(a.start+m)},f=a.start);s&&e&&s.projection===e.projection?a._model.setText(this._change.text,s.start,e.end):(this._model.setText(this._change.text,
-h,f),s&&(a=s.projection,a._model.setText("",s.start)),e&&(a=e.projection,a._model.setText("",0,e.end),a.start=a.end,a._lineCount=0));this._change=void 0}};r.EventTarget.addMixin(p.prototype);return{ProjectionTextModel:p}});y("orion/editor/tooltip","i18n!orion/editor/nls/messages orion/editor/textView orion/editor/projectionTextModel orion/Deferred orion/editor/util orion/webui/littlelib orion/util".split(" "),function(l,r,p,h,f,d,b){function k(b){this._view=b;b=b.getOptions("parent");this._create(b?
-b.ownerDocument:document)}k.getTooltip=function(b){b._tooltip||(b._tooltip=new k(b));return b._tooltip};k.prototype={_create:function(d){if(!this._tooltipDiv){var g=this._tooltipDiv=b.createElement(d,"div");g.tabIndex=0;g.className="textviewTooltip";g.setAttribute("aria-live","assertive");g.setAttribute("aria-atomic","true");this._tooltipDiv.style.visibility="hidden";d.body.appendChild(g);var a=this;f.addEventListener(d,"mousedown",this._mouseDownHandler=function(b){a.isVisible()&&(f.contains(g,b.target||
-b.srcElement)||a._locked||a.hide())},!0);f.addEventListener(d,"mousemove",this._mouseMoveHandler=function(b){a.isVisible()&&(!a._locked&&!a._hasFocus())&&(a._isInRect(a._outerArea,b.clientX,b.clientY)||a.hide())},!0);f.addEventListener(g,"focus",function(b){a._locked||a._tooltipDiv.classList.add("textViewTooltipOnFocus")},!1);f.addEventListener(g,"blur",function(b){a._tooltipDiv.classList.remove("textViewTooltipOnFocus")},!1);f.addEventListener(g,"mouseenter",function(b){a._locked||a._tooltipDiv.classList.add("textViewTooltipOnHover")},
-!1);f.addEventListener(g,"mouseleave",function(b){a._hasFocus()||a._tooltipDiv.classList.remove("textViewTooltipOnHover")},!1);f.addEventListener(g,"keydown",function(b){27===b.keyCode&&(a._locked||a.hide())},!1);this._view.addEventListener("Destroy",function(){a.destroy()})}},destroy:function(){if(this._tooltipDiv){this.hide();var b=this._tooltipDiv.parentNode;b&&b.removeChild(this._tooltipDiv);b=this._tooltipDiv.ownerDocument;f.removeEventListener(b,"mousedown",this._mouseDownHandler,!0);f.removeEventListener(b,
-"mousemove",this._mouseMoveHandler,!0);this._tooltipDiv=null}},show:function(b,g,a){this._locked=g;this._giveFocus=a;this._processInfo(b.getTooltipInfo())},update:function(b){b&&this._processInfo(b.getTooltipInfo(),!0)},onHover:function(b,g,a){b&&!this._isInRect(this._anchorArea,g,a)&&(!this._isInRect(this._tooltipArea,g,a)&&!this._locked&&!this._hasFocus())&&this._processInfo(b.getTooltipInfo())},hide:function(){this.isVisible()&&(this.hover&&this.hover.clearQuickFixes(),this._hasFocus()&&this._view.focus(),
-this._contentsView&&(this._contentsView.destroy(),this._contentsView=null),this._tooltipContents&&(this._tooltipDiv.removeChild(this._tooltipContents),this._tooltipContents=null),this._tooltipDiv.classList.remove("textviewTooltipCodeProjection"),this._tooltipDiv.classList.remove("textviewTooltipOnHover"),this._tooltipDiv.classList.remove("textviewTooltipOnFocus"),this._tooltipDiv.style.visibility="hidden",this._tooltipDiv.style.left="",this._tooltipDiv.style.right="",this._tooltipDiv.style.top="",
-this._tooltipDiv.style.bottom="",this._tooltipDiv.style.width="auto",this._tooltipDiv.style.maxWidth="",this._tooltipDiv.style.height="auto",this._tooltipDiv.style.maxHeight="",this._tooltipDiv.style.overflowX="",this._tooltipDiv.style.overflowY="",this._outerArea=this._tooltipArea=this._anchorArea=this._locked=this._giveFocus=void 0,this._hoverPromises&&this._hoverPromises.forEach(function(b){b.resolved||b.cancel()}),this._tipRect=this._hoverPromises=void 0)},isVisible:function(){return this._tooltipDiv&&
-"visible"===this._tooltipDiv.style.visibility},_processInfo:function(d,g){if(this._tooltipDiv){var a;g&&this._tooltipContents?(this._tooltipContents.innerHTML="",a=this._tooltipContents):a=b.createElement(this._tooltipDiv.ownerDocument,"div");if(d){if(d.contents&&this._renderImmediateInfo(a,d.contents,d.context))return this._showContents(a,d,g),!0;if(this.hover&&d.context&&(this._hoverPromises=this.hover.computeHoverInfo(d.context))){var f=this;this._hoverPromises.slice(0).forEach(function(e){h.when(e,
-function(b){if(f._hoverPromises){var c=f._hoverPromises.indexOf(e);0<=c&&f._hoverPromises.splice(c,1)}b&&f._renderPluginContent(a,b)&&(b.offsetStart&&(d.context.offsetStart=b.offsetStart),b.offsetEnd&&(d.context.offsetEnd=b.offsetEnd),b.allowFullWidth&&(d.allowFullWidth=b.allowFullWidth),f._showContents(a,d,g))},function(a){console&&(a&&"Cancel"!==a.name)&&(console.log("Error computing hover tooltip"),console.log(a&&a.stack))})});return!0}}}},_showContents:function(b,g,a){if(a){if(this._tooltipArea&&
-g.tooltipArea&&(this._tooltipArea.left!==g.tooltipArea.left||this._tooltipArea.top!==g.tooltipArea.top||this._tooltipArea.width!==g.tooltipArea.width||this._tooltipArea.height!==g.tooltipArea.height))this._outerArea=this._tooltipArea=this._anchorArea=null}else this.hide();this._tooltipContents=b;this._tooltipDiv.appendChild(b);this._anchorArea||(this._anchorArea=this._computeAnchorArea(g));this._tooltipArea||(this._tooltipArea=this._computeTooltipArea(g,this._anchorArea,this._tooltipDiv));this._outerArea||
-(this._outerArea=this._computeOuterArea(this._anchorArea,this._tooltipArea));this._tooltipDiv.style.visibility="visible";this._giveFocus&&(this._setInitialFocus(this._tooltipDiv),this._giveFocus=void 0)},_computeAnchorArea:function(b){if(b.anchorArea&&b.anchorArea.top&&b.anchorArea.left&&b.anchorArea.height&&b.anchorArea.width)return b.anchorArea;if(b.context){if(b.context.offsetStart&&b.context.offsetEnd)return this._computeRectangleFromOffset(b.context.offsetStart,b.context.offsetEnd);if(0<=b.context.offset){var g=
-this._view.getNextOffset(b.context.offset,{unit:"word",count:-1});b=this._view.getNextOffset(b.context.offset,{unit:"word",count:0});return this._computeRectangleFromOffset(g,b)}}return{top:0,left:0,height:0,width:0}},_computeTooltipArea:function(b,g,a){var d=a.ownerDocument.documentElement;if(b.tooltipArea&&b.tooltipArea.top&&b.tooltipArea.left&&b.tooltipArea.height&&b.tooltipArea.width)return a.style.overflowY="auto",a.style.resize="none",a.style.top=b.tooltipArea.top+"px",a.style.left=b.tooltipArea.left+
-"px",a.style.height=b.tooltipArea.height-16+"px",a.style.width=b.tooltipArea.width-16+"px",b.tooltipArea;var e=a.getBoundingClientRect(),e={width:e.width,height:e.height},n=b.position?b.position:"below",c=(this._view._rootDiv?this._view._rootDiv:d).getBoundingClientRect(),d=c.left,f=c.top,t=c.width,c=c.height,v=t,k=c;b.allowFullWidth||(v=Math.min(t/2,600),k=Math.min(c/2,400),e.width=Math.min(e.width,v),e.height=Math.min(e.height,k));a.style.width=e.width-16+"px";e.height=Math.min(a.getBoundingClientRect().height,
-k);41>e.height&&e.width>v-16&&(e.height=56);var v=c-(g.top+g.height-f),h=g.top-f,k=t-(g.left+g.width-d);"above"===n&&e.height>h&&e.height<=v?n="below":"below"===n&&(e.height>v&&e.height<=h)&&(n="above");h=b.tooltipOffsetX?b.tooltipOffsetX:0;b=b.tooltipOffsetY?b.tooltipOffsetY:0;switch(n){case "left":e.top=e.height+b>v+g.height?c+f-e.height:g.top+b;e.top=Math.max(e.top,f);e.left=Math.max(g.left-e.width+h,d);break;case "right":e.top=e.height+b>v+g.height?c+f-e.height:g.top+b;e.top=Math.max(e.top,f);
-e.left=Math.max(g.left+g.width+h,d);break;case "above":e.left=e.width+h>k+g.width?t+d-e.width:g.left+h;e.left=Math.max(e.left,d);e.top=Math.max(g.top-e.height+b,f);break;case "below":e.left=e.width+h>k+g.width?t+d-e.width:g.left+h,e.left=Math.max(e.left,d),e.top=Math.max(g.top+g.height+b,f)}e.maxWidth=Math.min(t+d-e.left,t);e.maxHeight=Math.min(c+f-e.top,c);a.style.maxWidth=e.maxWidth-16+"px";a.style.maxHeight=e.maxHeight-16+"px";a.style.width=e.width-16+"px";a.style.height=e.height-16+"px";a.style.left=
-e.left+"px";a.style.top=e.top+"px";return e},_computeOuterArea:function(b,g){var a=Math.min(b.left,g.left),d=Math.min(b.top,g.top),e=Math.max(b.left+b.width,g.left+g.width),n=Math.max(b.top+b.height,g.top+g.height);return{left:a,top:d,width:e-a,height:n-d}},_hasFocus:function(){var b=this._tooltipDiv;return!b?!1:f.contains(b,b.ownerDocument.activeElement)},_isNode:function(b){return"object"===typeof Node?b instanceof Node:b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName},
-_setInitialFocus:function(b){var g=d.$("button",b);if(g)g.focus();else if(g=d.$("a",b)){g.focus();var a=this;g.addEventListener("click",function(){a.hide()})}else(b=d.firstTabbable(b))&&b.focus()},_isInRect:function(b,g,a){if(!b)return!1;a=a>=b.top&&a<=b.top+b.height;return g>=b.left&&g<=b.left+b.width&&a},mapOffset:function(b){var g=this._view.getModel();g.getBaseModel&&(b=g.mapOffset(b,!0));return b},_computeRectangleFromOffset:function(b,g){b=this.mapOffset(b);g=this.mapOffset(g);var a=this._view,
-d=a.getLineAtOffset(b),e=a.getLineAtOffset(g);d!==e&&(g=a.getModel().getLineEnd(d));d=a.getLineHeight(d);e=a.getLocationAtOffset(b);a=a.getLocationAtOffset(g);a={x:e.x,y:e.y,width:a.x-e.x,height:d};a=this._view.convert(a,"document","page");return{left:a.x,top:a.y,width:a.width,height:a.height}},_renderPluginContent:function(d,g){var a=this._tooltipDiv.ownerDocument;if("string"!==typeof g&&"undefined"===typeof g.content)return!1;var f=b.createElement(a,"div");if(g.title){var e=b.createElement(a,"div");
-e.innerHTML=this.hover.renderMarkDown?this.hover.renderMarkDown(g.title):g.title;f.appendChild(e)}e=b.createElement(a,"div");if("string"===typeof g)e.appendChild(a.createTextNode(g));else switch(g.type){case "delegatedUI":case "html":g.content&&(a=a.createElement("iframe"),a.id="HtmlHover",a.name="HTML Hover",a.type="text/html",a.sandbox="allow-scripts allow-same-origin allow-forms",a.style.border="none",a.style.width="100%",a.style.height="100%",this._tooltipDiv.style.paddingBottom="5px",a.srcdoc=
-g.content,g.width&&(a.style.width=g.width),g.height&&(a.style.height=g.height),f.style.height="100%",d.style.height="100%",f.appendChild(a));break;case "markdown":this.hover.renderMarkDown&&(e.innerHTML=this.hover.renderMarkDown(g.content));break;default:e.appendChild(a.createTextNode(g.content))}f.appendChild(e);d.appendChild(f);return!0},_renderImmediateInfo:function(b,g,a){if(g instanceof Array&&(g=this._getAnnotationContents(g,a),!g))return!1;if("string"===typeof g)return b.innerHTML=g,!0;if(this._isNode(g))return b.appendChild(g),
-!0;if(g instanceof p.ProjectionTextModel){var d=this._view;a=d.getOptions();a.wrapMode=!1;a.parent=b;var e=a.themeClass;e?((e=e.replace("tooltipTheme",""))&&(e=" "+e),e="tooltipTheme"+e):e="tooltipTheme";a.themeClass=e;a=this._contentsView=new r.TextView(a);a.addEventListener("LineStyle",function(a){d.onLineStyle(a)});a.setModel(g);this._tooltipDiv.appendChild(b);this._tooltipDiv.classList.add("textviewTooltipCodeProjection");g=a.computeSize();b.style.width=g.width+8+"px";b.style.height=g.height+
-8+"px";a.resize();this._tooltipDiv.removeChild(b);return!0}return!1},_getAnnotationContents:function(d,g){function a(a,c){var e=a.title,d=b.createElement(t,"div");d.className="tooltipRow";if(a.html){var n=b.createElement(t,"div");n.className="tooltipImage";n.innerHTML=a.html;n.lastChild&&f.addEventListener(n.lastChild,"click",function(){var c=a.start,e=a.end;k.getBaseModel&&(c=k.mapOffset(c,!0),e=k.mapOffset(e,!0));v.setSelection(c,e,1/3,function(){s.hide()})},!1);d.appendChild(n)}e||(e=h.getLineStart(h.getLineAtOffset(a.start)),
-n=h.getLineEnd(h.getLineAtOffset(a.end),!0),e=h.getText(e,n));"function"===typeof e&&(e=a.title());"string"===typeof e&&(n=b.createElement(t,"span"),n.className="tooltipTitle",n.appendChild(t.createTextNode(e)),e=n);d.appendChild(e);c&&s.hover.renderQuickFixes(a,d);g&&(g.offsetStart=a.start,g.offsetEnd=a.end);return d}var s=this,e=s.hover?!0:!1;e&&(g&&g.source&&0<=g.source.indexOf("ruler"))&&(e=!1);for(var n,c=[],u=0;ug.start?a=b)break}return null};g=d();return{next:function(){var a=g;a&&(g=d());return a},hasNext:function(){return null!==g}}},modifyAnnotation:function(a){if(a&&!(0>this._getAnnotationIndex(a)))this.onChanged({type:"Changed",added:[],removed:[],changed:[a]})},onChanged:function(a){return this.dispatchEvent(a)},removeAnnotations:function(a){var b=this._annotations,e,g;if(a){e=[];for(g=b.length-1;0<=g;g--){var c=b[g];c.type===a&&(b.splice(g,1),e.splice(0,0,c),c._annotationModel=null)}}else e=b;this.onChanged({type:"Changed",
-removed:e,added:[],changed:[]})},removeAnnotation:function(a){if(a){var b=this._getAnnotationIndex(a);0>b||(a._annotationModel=null,a={type:"Changed",removed:this._annotations.splice(b,1),added:[],changed:[]},this.onChanged(a))}},replaceAnnotations:function(a,g){var e=this._annotations,d,c,f,t=[];if(a)for(d=a.length-1;0<=d;d--)f=a[d],c=this._getAnnotationIndex(f),0>c||(f._annotationModel=null,e.splice(c,1),t.splice(0,0,f));g||(g=[]);for(d=0;d=d?(f._oldStart=f.start,f._oldEnd=f.end,f.start+=e,f.end+=e,a.changed.push(f)):f.end<=b||(f.start=c.end)){e=this._mergeStyle({},c.style);e=this._mergeStyle(e,g.style);var f=[];f.push(d,1);g.startc.start&&f.push({start:c.start,
-end:g.start,style:c.style});f.push({start:Math.max(c.start,g.start),end:Math.min(c.end,g.end),style:e});g.endc.end?{start:c.end,end:g.end,style:g.style}:null;Array.prototype.splice.apply(a,f)}}g&&(e=this._mergeStyle({},g.style),a.splice(d,0,{start:g.start,end:g.end,style:e}));return a},_onAnnotationModelChanged:function(a){function b(a,c){d.getBaseModel&&(a=d.mapOffset(a,!0),c=d.mapOffset(c,!0));-1!==a&&-1!==c&&g.redrawRange(a,c)}function e(a,
-e){for(var g=0;g>
-0,t=f.getLineStart(l),l=f.getLineEnd(l);f.getBaseModel&&(t=f.mapOffset(t),l=f.mapOffset(l));t=m.createAnnotation(m.ANNOTATION_CURRENT_LINE,t,l);k.push(t)}this._currentLineAnnotations=k;n.replaceAnnotations(c,k)}}}},installTextView:function(){this.install()},install:function(){if(!this._textView){this._textView=this._textViewFactory();this._undoStackFactory&&(this._undoStack=this._undoStackFactory.createUndoStack(this),this._textView.setOptions({undoStack:this._undoStack}),this.checkDirty());this._textDNDFactory&&
-(this._textDND=this._textDNDFactory.createTextDND(this,this._undoStack));this._contentAssistFactory&&(this._contentAssist=this._contentAssistFactory.createContentAssistMode(this).getContentAssist());var g=p.Tooltip.getTooltip(this._textView);this._hoverFactory&&(this._hover=this._hoverFactory.createHover(this),g.hover=this._hover);var a=this,d=this._textView,e=this;this._listener={onModelChanged:function(a){e.checkDirty()},onMouseOver:function(a){e._listener.onMouseMove(a)},onMouseDown:function(a){e._listener.mouseDown=
-!0},onMouseUp:function(a){e._listener.mouseDown=!1},onMouseMove:function(a){g&&!e._listener.mouseDown&&!(a.event.clientX===e._listener.lastMouseX&&a.event.clientY===e._listener.lastMouseY)&&(e._listener.lastMouseX=a.event.clientX,e._listener.lastMouseY=a.event.clientY,e._hoverTimeout&&(window.clearTimeout(e._hoverTimeout),e._hoverTimeout=null),e._hoverTimeout=window.setTimeout(function(){e._hoverTimeout=null;if(e._listener)g.onHover({y:a.y,x:a.x,getTooltipInfo:function(){return e._getTooltipInfo(this.x,
-this.y)}},a.x,a.y)},175))},onMouseOut:function(a){e._hoverTimeout&&(window.clearTimeout(e._hoverTimeout),e._hoverTimeout=null)},onScroll:function(a){g&&g.hide()},onSelection:function(a){g&&g.hide();e._updateCursorStatus();e._highlightCurrentLine(a.newValue,a.oldValue)}};d.addEventListener("ModelChanged",this._listener.onModelChanged);d.addEventListener("Selection",this._listener.onSelection);d.addEventListener("MouseOver",this._listener.onMouseOver);d.addEventListener("MouseOut",this._listener.onMouseOut);
-d.addEventListener("MouseDown",this._listener.onMouseDown);d.addEventListener("MouseUp",this._listener.onMouseUp);d.addEventListener("MouseMove",this._listener.onMouseMove);d.addEventListener("Scroll",this._listener.onScroll);if(this._keyBindingFactory){var n;if(n="function"===typeof this._keyBindingFactory?this._keyBindingFactory(this,this.getKeyModes(),this._undoStack,this._contentAssist):this._keyBindingFactory.createKeyBindings(a,this._undoStack,this._contentAssist))this._textActions=n.textActions,
-this._linkedMode=n.linkedMode,this._sourceCodeActions=n.sourceCodeActions}n=function(c,e){if(void 0!==c&&-1!==c){for(var b=this.getView().getModel(),g=this.getAnnotationModel(),d=a.mapOffset(b.getLineStart(c)),b=a.mapOffset(b.getLineEnd(c)),n=g.getAnnotations(d,b),f=null;n.hasNext();){var u=n.next();if(u.type===m.ANNOTATION_BOOKMARK){f=u;break}}f?g.removeAnnotation(f):(f=m.createAnnotation(m.ANNOTATION_BOOKMARK,d,b,a.getText(d,b)),g.addAnnotation(f))}};if(this._annotationFactory){var c=d.getModel();
-c.getBaseModel&&(c=c.getBaseModel());if(this._annotationModel=this._annotationFactory.createAnnotationModel(c))if(c=this._annotationStyler=this._annotationFactory.createAnnotationStyler(d,this._annotationModel))c.addAnnotationType(m.ANNOTATION_CURRENT_SEARCH),c.addAnnotationType(m.ANNOTATION_MATCHING_SEARCH),c.addAnnotationType(m.ANNOTATION_ERROR),c.addAnnotationType(m.ANNOTATION_WARNING),c.addAnnotationType(m.ANNOTATION_MATCHING_BRACKET),c.addAnnotationType(m.ANNOTATION_CURRENT_BRACKET),c.addAnnotationType(m.ANNOTATION_CURRENT_LINE),
-c.addAnnotationType(m.ANNOTATION_READ_OCCURRENCE),c.addAnnotationType(m.ANNOTATION_WRITE_OCCURRENCE),c.addAnnotationType(m.ANNOTATION_SELECTED_LINKED_GROUP),c.addAnnotationType(m.ANNOTATION_CURRENT_LINKED_GROUP),c.addAnnotationType(m.ANNOTATION_LINKED_GROUP),c.addAnnotationType("orion.annotation.highlightError");var c=this._annotationFactory.createAnnotationRulers(this._annotationModel),f=this._annotationRuler=c.annotationRuler;f&&(f.onDblClick=n,f.setMultiAnnotationOverlay({html:"\x3cdiv class\x3d'annotationHTML overlay'\x3e\x3c/div\x3e"}),
-f.addAnnotationType(m.ANNOTATION_ERROR),f.addAnnotationType(m.ANNOTATION_WARNING),f.addAnnotationType(m.ANNOTATION_TASK),f.addAnnotationType(m.ANNOTATION_BOOKMARK),f.addAnnotationType(m.ANNOTATION_DIFF_ADDED),f.addAnnotationType(m.ANNOTATION_DIFF_DELETED),f.addAnnotationType(m.ANNOTATION_DIFF_MODIFIED));this.setAnnotationRulerVisible(this._annotationRulerVisible||void 0===this._annotationRulerVisible,!0);if(f=this._overviewRuler=c.overviewRuler)f.addAnnotationType(m.ANNOTATION_CURRENT_SEARCH),f.addAnnotationType(m.ANNOTATION_MATCHING_SEARCH),
-f.addAnnotationType(m.ANNOTATION_READ_OCCURRENCE),f.addAnnotationType(m.ANNOTATION_WRITE_OCCURRENCE),f.addAnnotationType(m.ANNOTATION_CURRENT_BLAME),f.addAnnotationType(m.ANNOTATION_ERROR),f.addAnnotationType(m.ANNOTATION_WARNING),f.addAnnotationType(m.ANNOTATION_TASK),f.addAnnotationType(m.ANNOTATION_BOOKMARK),f.addAnnotationType(m.ANNOTATION_MATCHING_BRACKET),f.addAnnotationType(m.ANNOTATION_CURRENT_BRACKET),f.addAnnotationType(m.ANNOTATION_CURRENT_LINE),f.addAnnotationType(m.ANNOTATION_DIFF_ADDED),
-f.addAnnotationType(m.ANNOTATION_DIFF_DELETED),f.addAnnotationType(m.ANNOTATION_DIFF_MODIFIED);this.setOverviewRulerVisible(this._overviewRulerVisible||void 0===this._overviewRulerVisible,!0)}this._zoomRulerFactory&&(this._zoomRuler=this._zoomRulerFactory.createZoomRuler(this._annotationModel),this.setZoomRulerVisible(this._zoomRulerVisible,!0));this._lineNumberRulerFactory&&(this._lineNumberRuler=this._lineNumberRulerFactory.createLineNumberRuler(this._annotationModel),this._lineNumberRuler.addAnnotationType(m.ANNOTATION_CURRENT_BLAME),
-this._lineNumberRuler.addAnnotationType(m.ANNOTATION_BLAME),this._lineNumberRuler.addAnnotationType(m.ANNOTATION_DIFF_ADDED),this._lineNumberRuler.addAnnotationType(m.ANNOTATION_DIFF_MODIFIED),this._lineNumberRuler.addAnnotationType(m.ANNOTATION_DIFF_DELETED),this._lineNumberRuler.onDblClick=n,this.setLineNumberRulerVisible(this._lineNumberRulerVisible||void 0===this._lineNumberRulerVisible,!0));this._foldingRulerFactory&&(this._foldingRuler=this._foldingRulerFactory.createFoldingRuler(this._annotationModel),
-this._foldingRuler.addAnnotationType(m.ANNOTATION_FOLDING),this.setFoldingRulerVisible(this._foldingRulerVisible||void 0===this._foldingRulerVisible,!0));this.dispatchEvent({type:"TextViewInstalled",textView:d});b.prototype.install.call(this)}},uninstallTextView:function(){this.uninstall()},uninstall:function(){var g=this._textView;g&&(g.destroy(),this._annotationModel&&this._annotationModel.setTextModel(null),this._textView=this._undoStack=this._textDND=this._contentAssist=this._listener=this._annotationModel=
-this._annotationStyler=this._annotationRuler=this._overviewRuler=this._zoomRuler=this._lineNumberRuler=this._foldingRuler=this._currentLineAnnotations=this._title=null,this._dirty=!1,this._foldingRulerVisible=this._overviewRulerVisible=this._zoomRulerVisible=this._lineNumberRulerVisible=this._annotationRulerVisible=void 0,this.dispatchEvent({type:"TextViewUninstalled",textView:g}),b.prototype.uninstall.call(this))},_updateCursorStatus:function(){for(var b=this.getKeyModes(),a=0;aa.start?
-a.end-1:a.end),f=b.getLineStart(d),d=b.getLineEnd(g,!0),k=b.getLineCount(),h="",f=b.getText(f,d);g===k-1&&(f=(h=b.getLineDelimiter())+f);e(f,d,d);a.start=d+h.length;a.end=d+f.length});return!0},copyLinesUp:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;var b=a.getModel();k(this,!1,function(a,e){var d=b.getLineAtOffset(a.start),g=b.getLineAtOffset(a.end>a.start?a.end-1:a.end),d=b.getLineStart(d),f=b.getLineEnd(g,!0),k=b.getLineCount(),h="",f=b.getText(d,f);g===k-1&&
-(f+=h=b.getLineDelimiter());e(f,d,d);a.start=d;a.end=d+f.length-h.length});return!0},deleteLines:function(a){var b=this.editor;if(b.getTextView().getOptions("readonly"))return!1;var c=1;a&&a.count&&(c=a.count);var d=b.getModel();k(this,!1,function(a,b){var e=d.getLineAtOffset(a.start),g=d.getLineStart(e),e=a.start!==a.end||1===c?d.getLineAtOffset(a.end>a.start?a.end-1:a.end):Math.min(e+c-1,d.getLineCount()-1),e=d.getLineEnd(e,!0);b("",g,e);a.start=a.end=g});return!0},expandAnnotation:function(a){var b=
-this.editor,c=b.getAnnotationModel();if(!c)return!0;var d=b.getModel(),g=b.getCaretOffset(),f=d.getLineAtOffset(g),g=d.getLineStart(f),f=d.getLineEnd(f,!0);d.getBaseModel&&(g=d.mapOffset(g),f=d.mapOffset(f),d.getBaseModel());for(var k,c=c.getAnnotations(g,f);!k&&c.hasNext();)d=c.next(),d.type===p.AnnotationType.ANNOTATION_FOLDING&&(k=d);k&&a!==k.expanded&&(a?k.expand():(b.setCaretOffset(k.start),k.collapse()));return!0},expandAnnotations:function(a){var b=this.editor,c=b.getTextView(),b=b.getAnnotationModel();
-if(!b)return!0;var d=b.getAnnotations();for(c.setRedraw(!1);d.hasNext();)b=d.next(),b.type===p.AnnotationType.ANNOTATION_FOLDING&&a!==b.expanded&&(a?b.expand():b.collapse());c.setRedraw(!0);return!0},indentLines:function(){var a=this.editor,b=a.getTextView();if(b.getOptions("readonly"))return!1;if(b.getOptions("tabMode")){var c=a.getModel(),d=0,g=a.getSelections();1f.start?
-f.end-1:f.end);if(k!==h||1a.start?a.end-1:a.end),f=b.getLineCount();if(g!==f-1){var d=b.getLineStart(d),
-k=b.getLineEnd(g,!0),h=b.getLineEnd(g+1,!0)-(k-d),m=0;g!==f-2?g=b.getText(d,k):(f=b.getLineEnd(g),g=b.getText(f,k)+b.getText(d,f),m+=k-f);e("",d,k);e(g,h,h);a.start=h+m;a.end=h+m+g.length}});return!0},moveLinesUp:function(){var a=this.editor;if(a.getTextView().getOptions("readonly"))return!1;var b=a.getModel();k(this,!0,function(a,e){var d=b.getLineAtOffset(a.start);if(0!==d){var g=b.getLineAtOffset(a.end>a.start?a.end-1:a.end),f=b.getLineCount(),k=b.getLineStart(d-1),h=b.getLineStart(d),m=b.getLineEnd(g,
-!0),s=b.getText(h,m),l=0;g===f-1&&(g=b.getLineEnd(d-1),d=b.getLineEnd(d-1,!0),s+=b.getText(g,d),h=g,l=d-g);e("",h,m);e(s,k,k);a.start=k;a.end=k+s.length-l}});return!0},nextAnnotation:function(b){function d(c){return!!c.lineStyle||c.type===a.ANNOTATION_MATCHING_BRACKET||c.type===a.ANNOTATION_CURRENT_BRACKET||!f.isAnnotationTypeVisible(c.type)}var c=this.editor,g=c.getAnnotationModel();if(!g)return!0;var f=c.getOverviewRuler()||c.getAnnotationStyler();if(!f)return!0;for(var k=c.getModel(),m=c.getCaretOffset(),
-s=g.getAnnotations(b?m:0,b?k.getCharCount():m),l=null;s.hasNext();){var p=s.next();if(b){if(p.start<=m)continue}else if(p.start>=m)continue;if(!d(p)&&(l=p,b))break}if(l){for(var r=[l],s=g.getAnnotations(l.start,l.start);s.hasNext();)p=s.next(),p!==l&&!d(p)&&r.push(p);var C=c.getTextView(),q=k.getLineAtOffset(l.start),w=h.Tooltip.getTooltip(C);if(!w)return c.moveSelection(l.start),!0;c.moveSelection(l.start,l.start,function(){w.setTarget({getTooltipInfo:function(){var a=C.convert({x:C.getLocationAtOffset(l.start).x,
-y:C.getLocationAtOffset(k.getLineStart(q)).y},"document","page");return{contents:r,x:a.x,y:a.y+Math.floor(1.33*C.getLineHeight(q))}}},0)})}return!0},unindentLines:function(){var a=this.editor,b=a.getTextView();if(b.getOptions("readonly"))return!1;if(b.getOptions("tabMode")){var c=a.getModel();k(this,!1,function(a,e){for(var d=c.getLineAtOffset(a.start),g=c.getLineAtOffset(a.end>a.start?a.end-1:a.end),f=b.getOptions("tabSize"),k=Array(f+1).join(" "),h=[],m=0,s=0,l=d;l<=g;l++){var p=c.getLine(l,!0);
-if(c.getLineStart(l)!==c.getLineEnd(l))if(0===p.indexOf("\t"))p=p.substring(1),m++;else if(0===p.indexOf(k))p=p.substring(f),m+=f;else return!0;l===d&&(s=m);h.push(p)}d=c.getLineStart(d);f=c.getLineEnd(g,!0);g=c.getLineStart(g);h=h.join("");e(h,d,f);s=d===a.start?a.start:a.start-s;m=Math.max(s,a.end-m+(a.end===g+1&&a.start!==a.end?1:0));a.start=s;a.end=m});return!0}},startUndo:function(){this.undoStack&&this.undoStack.startCompoundChange()},endUndo:function(){this.undoStack&&this.undoStack.endCompoundChange()}};
-s.TextActions=m;g.prototype={init:function(){var a=this.editor.getTextView();a.setAction("lineStart",function(){return this.lineStart()}.bind(this));a.setAction("enter",function(){return this.autoIndent()}.bind(this));a.setKeyBinding(new r.KeyBinding("t",!0,!1,!0),"trimTrailingWhitespaces");a.setAction("trimTrailingWhitespaces",function(){return this.trimTrailingWhitespaces()}.bind(this),{name:l.trimTrailingWhitespaces});a.setKeyBinding(new r.KeyBinding(191,!0),"toggleLineComment");a.setAction("toggleLineComment",
-function(){return this.toggleLineComment()}.bind(this),{name:l.toggleLineComment});a.setKeyBinding(new r.KeyBinding(191,!0,!b.isMac,!1,b.isMac),"addBlockComment");a.setAction("addBlockComment",function(){return this.addBlockComment()}.bind(this),{name:l.addBlockComment});a.setKeyBinding(new r.KeyBinding(220,!0,!b.isMac,!1,b.isMac),"removeBlockComment");a.setAction("removeBlockComment",function(){return this.removeBlockComment()}.bind(this),{name:l.removeBlockComment});a.setKeyBinding(new r.KeyBinding("[",
-!1,!1,!1,!1,"keypress"),"autoPairSquareBracket");a.setAction("autoPairSquareBracket",function(){return this.autoPairBrackets("[","]")}.bind(this));a.setKeyBinding(new r.KeyBinding("]",!1,!1,!1,!1,"keypress"),"skipClosingSquareBracket");a.setAction("skipClosingSquareBracket",function(){return this.skipClosingBracket("]")}.bind(this));a.setKeyBinding(new r.KeyBinding("\x3c",!1,!1,!1,!1,"keypress"),"autoPairAngleBracket");a.setAction("autoPairAngleBracket",function(){return this.autoPairBrackets("\x3c",
-"\x3e")}.bind(this));a.setKeyBinding(new r.KeyBinding("\x3e",!1,!1,!1,!1,"keypress"),"skipClosingAngleBracket");a.setAction("skipClosingAngleBracket",function(){return this.skipClosingBracket("\x3e")}.bind(this));a.setKeyBinding(new r.KeyBinding("(",!1,!1,!1,!1,"keypress"),"autoPairParentheses");a.setAction("autoPairParentheses",function(){return this.autoPairBrackets("(",")")}.bind(this));a.setKeyBinding(new r.KeyBinding(")",!1,!1,!1,!1,"keypress"),"skipClosingParenthesis");a.setAction("skipClosingParenthesis",
-function(){return this.skipClosingBracket(")")}.bind(this));a.setKeyBinding(new r.KeyBinding("{",!1,!1,!1,!1,"keypress"),"autoPairBraces");a.setAction("autoPairBraces",function(){return this.autoPairBrackets("{","}")}.bind(this));a.setKeyBinding(new r.KeyBinding("}",!1,!1,!1,!1,"keypress"),"skipClosingBrace");a.setAction("skipClosingBrace",function(){return this.skipClosingBracket("}")}.bind(this));a.setKeyBinding(new r.KeyBinding("'",!1,!1,!1,!1,"keypress"),"autoPairSingleQuotation");a.setAction("autoPairSingleQuotation",
-function(){return this.autoPairQuotations("'")}.bind(this));a.setKeyBinding(new r.KeyBinding('"',!1,!1,!1,!1,"keypress"),"autoPairDblQuotation");a.setAction("autoPairDblQuotation",function(){return this.autoPairQuotations('"')}.bind(this));a.setAction("deletePrevious",function(){return this.deletePrevious()}.bind(this))},autoIndent:function(){function a(c,b){if(c.start===c.end){for(var e=d.getLineAtOffset(c.start),n=d.getLine(e,!1),k=d.getLineStart(e),p=0,r=c.start-k,y;p]/,g=c.getModel();k(this,!1,function(c,f){var k=c.start===g.getCharCount()?"":g.getText(c.start,c.start+1).trim();c.start===c.end&&d.test(k)?(k=a+b,f(k,c.start,c.start),c.start=c.end=c.start+1):c.start!==c.end?(k=a+g.getText(c.start,c.end)+b,f(k,c.start,c.end),c.start+=
-1,c.end+=1):(f(a,c.start,c.end),c.start=c.end=c.start+a.length)});return!0},autoPairQuotations:function(a){if(!this.autoPairQuotation)return!1;var b=this.editor;if(b.getTextView().getOptions("readonly"))return!1;var c=/^"$|^'$/,d=/\w/,g=/^$|[)}\]>]/,f=b.getModel();k(this,!1,function(b,n){function k(){n(a,b.start,b.end);b.start=b.end=b.start+a.length}var h=0===b.start?"":f.getText(b.start-1,b.start).trim(),m=b.start===f.getCharCount()?"":f.getText(b.start,b.start+1).trim();b.start!==b.end?(h=f.getText(b.start,
-b.end),c.test(h)?k():(n(a+h+a,b.start,b.end),b.start+=1,b.end+=1)):m===a?b.start=b.end=b.start+1:h===a||c.test(m)||d.test(h)||!g.test(m)?k():(n(a+a,b.start,b.end),b.start=b.end=b.start+a.length)});return!0},contentAssistProposalApplied:function(a){function b(){return"number"===typeof c.escapePosition?c.escapePosition:a.data.start+c.proposal.length}var c=a.data.proposal;if(c.positions&&0m);f--)if(-1!==m){s=a.getLineStart(f)+m;break}for(f=g;f<
-a.getLineCount()&&!(k=a.getLine(f),h=f===g?c-a.getLineStart(g):0,m=k.indexOf("/*",h),k=k.indexOf("*/",h),-1!==m&&ma.start?a.end-1:a.end),f=!0,n=[],k,h=e;h<=g;h++){var m=d.getLine(h,!0);k=m.indexOf(c);n.push(k);if(!f||-1===k)f=!1;else if(0!==k){for(f=0;fs&&(a.start=Math.max(s,a.start-m));a.start!==a.end&&a.end>s&&(a.end=Math.max(s,a.end-m))})}}this.endUndo();a.setSelections(c,!1);a.getTextView().setRedraw(!0)},startUndo:function(){this.undoStack&&this.undoStack.startCompoundChange()},skipClosingBracket:function(a){var b=this.editor;if(b.getTextView().getOptions("readonly"))return!1;
-var c=b.getModel(),d=b.getSelections();return 1===d.length&&d[0].start===d[0].end&&(d[0].start===c.getCharCount()?"":c.getText(d[0].start,d[0].start+1))===a?(d[0].start=d[0].end=d[0].start+1,b.setSelections(d),!0):!1},endUndo:function(){this.undoStack&&this.undoStack.endCompoundChange()},setAutoPairParentheses:function(a){this.autoPairParentheses=a},setAutoPairBraces:function(a){this.autoPairBraces=a},setAutoPairSquareBrackets:function(a){this.autoPairSquareBrackets=a},setAutoPairAngleBrackets:function(a){this.autoPairAngleBrackets=
-a},setAutoPairQuotations:function(a){this.autoPairQuotation=a},setAutoCompleteComments:function(a){this.autoCompleteComments=a},setLineComment:function(a){this.lineComment=a},setSmartIndentation:function(a){this.smartIndentation=a}};s.SourceCodeActions=g;String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/g,"")});String.prototype.trimRight||(String.prototype.trimRight=function(){return this.replace(/\s+$/g,"")});return s});y("orion/editor/rulers","i18n!orion/editor/nls/messages orion/editor/textView orion/editor/annotations orion/editor/tooltip orion/objects orion/editor/util orion/util".split(" "),
-function(l,r,p,h,f,d,b){function k(a,c,b){this._location=a||"left";this._overview=c||"page";this._rulerStyle=b;this._view=null}function m(a,c,b,e){k.call(this,c,b,e);var d=this;this._listener={onTextModelChanged:function(a){d._onTextModelChanged(a)},onAnnotationModelChanged:function(a){d._onAnnotationModelChanged(a)}};this.setAnnotationModel(a)}function g(a,c,b,e,d){m.call(this,a,c,"page",b);this._oddStyle=e||{style:{backgroundColor:"white"}};this._evenStyle=d||{style:{backgroundColor:"white"}};this._numOfDigits=
-0;this._firstLine=1}function a(a,c,b){m.call(this,a,c,"page",b)}function s(a,c,b){m.call(this,a,c,"document",b)}function e(b,c,e){a.call(this,b,c,e)}k.prototype={getLocation:function(){return this._location},getOverview:function(){return this._overview},getRulerStyle:function(){return this._rulerStyle},getView:function(){return this._view},setView:function(a){this._onTextModelChanged&&this._view&&this._view.removeEventListener("ModelChanged",this._listener.onTextModelChanged);this._view=a;this._onTextModelChanged&&
-this._view&&this._view.addEventListener("ModelChanged",this._listener.onTextModelChanged)}};m.prototype=f.mixin(new k,{getAnnotations:function(a,c){var b=this._annotationModel;if(!b)return[];var e=this._view.getModel(),d=e.getLineStart(a),g=e.getLineEnd(c-1),f=e;e.getBaseModel&&(f=e.getBaseModel(),d=e.mapOffset(d),g=e.mapOffset(g));for(var k=[],b=this.getAnnotationsByType(b,d,g),d=0;d=c&&e=k&&void 0!==e.groupId){b=e;break}if(g&&b&&g.groupId===b.groupId)return}this._currentGroupAnnotation=null;g&&c.removeAnnotations(g.groupType);if(b&&-1!==a){this._currentGroupAnnotation=
-b;d=c.getAnnotations();for(a=[];d.hasNext();)e=d.next(),delete e.groupAnnotation,e.groupId===b.groupId&&(e=e.createGroupAnnotation(),a.push(e));c.replaceAnnotations(null,a)}}});p.AnnotationTypeList.addMixin(m.prototype);g.prototype=new m;g.prototype.getAnnotations=function(a,c){for(var b=m.prototype.getAnnotations.call(this,a,c),e=this._view.getModel(),d=a;d=b.end?d-=b.end-b.start:d>=b.start&&(d=b.start)});h.setText(f,d,d);h.setSelection(d,
-d+f.length);this._dropText=null;this._dropOffset=-1}this._undoStack&&this._undoStack.endCompoundChange();this._dragSelection=null}},_onDragEnter:function(l){this._onDragOver(l)},_onDragOver:function(p){var h=p.event.dataTransfer.types,f=!this._view.getOptions("readonly");f&&h&&(f=h.contains?h.contains("text/plain")||h.contains("Text"):-1!==h.indexOf("text/plain")||-1!==h.indexOf("Text"));f?l.isFirefox||(this._dropEffect=p.event.dataTransfer.dropEffect=(l.isMac?p.event.altKey:p.event.ctrlKey)?"copy":
-"move"):p.event.dataTransfer.dropEffect="none"},_onDrop:function(p){var h=this._view,f=p.event.dataTransfer.getData("Text");f&&(l.isFirefox||(p.event.dataTransfer.dropEffect=this._dropEffect),p=h.getOffsetAtLocation(p.x,p.y),this._dragSelection?(this._dropOffset=p,this._dropText=f):(h.setText(f,p,p),h.setSelection(p,p+f.length)))}};return{TextDND:r}});y("orion/editor/linkedMode","i18n!orion/editor/nls/messages orion/keyBinding orion/editor/keyModes orion/editor/annotations orion/objects orion/util".split(" "),
-function(l,r,p,h,f){function d(b){this._data=b}function b(b,d,a){var f=b.getTextView();p.KeyMode.call(this,f);this.editor=b;this.undoStack=d;this.contentAssist=a;this.linkedModeModel=null;f.setAction("linkedModeEnter",function(){this.exitLinkedMode(!0);return!0}.bind(this));f.setAction("linkedModeCancel",function(){this.exitLinkedMode(!1);return!0}.bind(this));f.setAction("linkedModeNextGroup",function(){var a=this.linkedModeModel;this.selectLinkedGroup((a.selectedGroupIndex+1)%a.groups.length);return!0}.bind(this));
-f.setAction("linkedModePreviousGroup",function(){var a=this.linkedModeModel;this.selectLinkedGroup(0/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#39;")}function d(a){return a.replace(/&([#\w]+);/g,function(a,
-c){c=c.toLowerCase();return"colon"===c?":":"#"===c.charAt(0)?"x"===c.charAt(1)?String.fromCharCode(parseInt(c.substring(2),16)):String.fromCharCode(+c.substring(1)):""})}function b(a,b){a=a.source;b=b||"";return function u(d,g){if(!d)return RegExp(a,b);g=g.source||g;g=g.replace(/(^|[^\[])\^/g,"$1");a=a.replace(d,g);return u}}function k(){}function m(a){for(var b=1,c,d;bd.length)return z();delete b.highlight;if(!s)return z();for(;p[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
-html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:k,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/,bullet:/(?:[*+-]|\d+\.)/,item:/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/};a.item=b(a.item,"gm")(/bull/g,a.bullet)();a.list=b(a.list)(/bull/g,a.bullet)("hr","\\n+(?\x3d\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?\x3d"+a.def.source+")")();a.blockquote=b(a.blockquote)("def",a.def)();
-a._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";a.html=b(a.html)("comment",/\x3c!--[\s\S]*?--\x3e/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,a._tag)();a.paragraph=b(a.paragraph)("hr",a.hr)("heading",a.heading)("lheading",a.lheading)("blockquote",a.blockquote)("tag","\x3c"+a._tag)("def",a.def)();a.normal=m({},a);a.gfm=m({},a.normal,
-{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});a.gfm.paragraph=b(a.paragraph)("(?!","(?!"+a.gfm.fences.source.replace("\\1","\\2")+"|"+a.list.source.replace("\\1","\\3")+"|")();a.tables=m({},a.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});l.rules=a;l.lex=function(a,b){return(new l(b)).lex(a)};l.prototype.lex=function(a){a=a.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    ").replace(/\u00a0/g,
-" ").replace(/\u2424/g,"\n");return this.token(a,!0)};l.prototype.token=function(b,d,c){b=b.replace(/^ +$/gm,"");for(var g,f,k,h,m,l,s;b;){if(k=this.rules.newline.exec(b))b=b.substring(k[0].length),1 ?/gm,
-""),this.token(k,d,!0),this.tokens.push({type:"blockquote_end"});else if(k=this.rules.list.exec(b)){b=b.substring(k[0].length);h=k[2];this.tokens.push({type:"list_start",ordered:1])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:k,tag:/^\x3c!--[\s\S]*?--\x3e|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,
-br:/^ {2,}\n(?!\s*$)/,del:k,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/};s.link=b(s.link)("inside",s._inside)("href",s._href)();s.reflink=b(s.reflink)("inside",s._inside)();s.normal=m({},s);s.pedantic=m({},s.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});s.gfm=m({},s.normal,{escape:b(s.escape)("])","~|])")(),
-url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:b(s.text)("]|","~]|")("|","|https?://|")()});s.breaks=m({},s.gfm,{br:b(s.br)("{2,}","*")(),text:b(s.gfm.text)("{2,}","*")()});r.rules=s;r.output=function(a,b,c){return(new r(b,c)).output(a)};r.prototype.output=function(a){for(var b="",c,d;a;)if(d=this.rules.escape.exec(a))a=a.substring(d[0].length),b+=d[1];else if(d=this.rules.autolink.exec(a))a=a.substring(d[0].length),"@"===d[2]?(c=":"===d[1].charAt(6)?this.mangle(d[1].substring(7)):
-this.mangle(d[1]),d=this.mangle("mailto:")+c):d=c=f(d[1]),b+=this.renderer.link(d,null,c);else if(!this.inLink&&(d=this.rules.url.exec(a)))a=a.substring(d[0].length),d=c=f(d[1]),b+=this.renderer.link(d,null,c);else if(d=this.rules.tag.exec(a))!this.inLink&&/^/i.test(d[0])&&(this.inLink=!1),a=a.substring(d[0].length),b+=this.options.sanitize?f(d[0]):d[0];else if(d=this.rules.link.exec(a))a=a.substring(d[0].length),this.inLink=!0,b+=this.outputLink(d,
-{href:d[2],title:d[3]}),this.inLink=!1;else if((d=this.rules.reflink.exec(a))||(d=this.rules.nolink.exec(a)))a=a.substring(d[0].length),c=(d[2]||d[1]).replace(/\s+/g," "),c=this.links[c.toLowerCase()],!c||!c.href?(b+=d[0].charAt(0),a=d[0].substring(1)+a):(this.inLink=!0,b+=this.outputLink(d,c),this.inLink=!1);else if(d=this.rules.strong.exec(a))a=a.substring(d[0].length),b+=this.renderer.strong(this.output(d[2]||d[1]));else if(d=this.rules.em.exec(a))a=a.substring(d[0].length),b+=this.renderer.em(this.output(d[2]||
-d[1]));else if(d=this.rules.code.exec(a))a=a.substring(d[0].length),b+=this.renderer.codespan(f(d[2],!0));else if(d=this.rules.br.exec(a))a=a.substring(d[0].length),b+=this.renderer.br();else if(d=this.rules.del.exec(a))a=a.substring(d[0].length),b+=this.renderer.del(this.output(d[1]));else if(d=this.rules.text.exec(a))a=a.substring(d[0].length),b+=f(this.smartypants(d[0]));else if(a)throw Error("Infinite loop on byte: "+a.charCodeAt(0));return b};r.prototype.outputLink=function(a,b){var c=f(b.href),
-d=b.title?f(b.title):null;return"!"!==a[0].charAt(0)?this.renderer.link(c,d,this.output(a[1])):this.renderer.image(c,d,f(a[1]))};r.prototype.smartypants=function(a){return!this.options.smartypants?a:a.replace(/--/g,"\u2014").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026")};r.prototype.mangle=function(a){for(var b="",c=a.length,d=0,g;d=this.proposals.length){if(b)return!0;a=0}}else if(void 0===a&&(a=this.selectedIndex-1),0>a){if(b)return!0;a=this.proposals.length-1}for(var e=a;this.proposals[a]&&this.proposals[a].unselectable;){if(c){if(a++,
-a>=this.proposals.length){if(b)return!0;a=0}}else if(a--,0>a){if(b)return!0;a=this.proposals.length-1}if(a===e){a=-1;break}}this.selectedIndex=a;this.widget&&this.widget.selectNode(a);this._showTooltip(!0);return!0},_showTooltip:function(a){var c=b.Tooltip.getTooltip(this.contentAssist.textView),e=this,d={getTooltipInfo:function(){var a=e.widget.parentNode.getBoundingClientRect(),b={width:350,height:a.height,top:a.top};a.left+a.width>=document.documentElement.clientWidth?(b.left=a.left-b.width,b.left-=
-10):(b.left=a.left+a.width,b.left+=10);return{context:{proposal:e.proposals[e.selectedIndex]},anchorArea:a,tooltipArea:b}}};a?c.update(d):c.show(d,!0,!1)},_hideTooltip:function(){b.Tooltip.getTooltip(this.contentAssist.textView).hide()},pageUp:function(){if(this.widget){var a=this.widget.getTopIndex();a===this.selectedIndex&&(this.widget.scrollIndex(a,!1),a=this.widget.getTopIndex());return 0===a?this.lineDown(a,!0):this.lineUp(a,!0)}return this.lineUp()},pageDown:function(){if(this.widget){var a=
-this.widget.getBottomIndex();a===this.selectedIndex&&(this.widget.scrollIndex(a,!0),a=this.widget.getBottomIndex());return this.lineDown(a,!0)}return this.lineDown()},enter:function(){return this.contentAssist.apply(this.proposals[this.selectedIndex]||null)},tab:function(){return this.widget?(this.widget.parentNode.focus(),!0):!1}});n.prototype={onClick:function(a){a||(a=window.event);this.contentAssist.apply(this.getProposal(a.target||a.srcElement));this.textView.focus()},onScroll:function(a){this.previousCloneNode&&
-!this.preserveCloneThroughScroll&&(this._removeCloneNode(),this.previousSelectedNode.classList.add(u.selected));this.preserveCloneThroughScroll=!1},createDiv:function(a,b,c){var e=b.ownerDocument,d=m.createElement(e,"div");d.id="contentoption"+c;d.setAttribute("role","option");d.className=u[a.style]?u[a.style]:u.dfault;"hr"===a.style?a=m.createElement(e,"hr"):(a=this._createDisplayNode(d,a,c),d.contentAssistProposalIndex=c);d.appendChild(a);b.appendChild(d)},createAccessible:function(){var a=this._contentAssistMode,
-b=this;k.addEventListener(this.parentNode,"keydown",function(c){c||(c=window.event);c.preventDefault&&c.preventDefault();return c.keyCode===g.KEY.ESCAPE?a.cancel():c.keyCode===g.KEY.UP?a.lineUp():c.keyCode===g.KEY.DOWN?a.lineDown():c.keyCode===g.KEY.ENTER?a.enter():c.keyCode===g.KEY.PAGEDOWN?a.pageDown():c.keyCode===g.KEY.PAGEUP?a.pageUp():c.keyCode===g.KEY.HOME?(b.scrollIndex(0,!0),a.lineDown(0)):c.keyCode===g.KEY.END?a.lineUp(a.getProposals().length-1):!1})},_createDisplayNode:function(a,b,c){var e=
-a=null;if("string"===typeof b)e=b;else if(b.description&&"string"===typeof b.description)if(b.name&&"string"===typeof b.name){var d=this._createNameNode(b.name);d.contentAssistProposalIndex=c;a=document.createElement("span");a.appendChild(d);b=document.createTextNode(b.description);a.appendChild(b)}else e=b.description;else e=b.proposal;e&&(a=this._createNameNode(e));a.contentAssistProposalIndex=c;return a},_createNameNode:function(a){var b=document.createElement("span");b.classList.add("proposal-name");
-b.appendChild(document.createTextNode(a));return b},getProposal:function(a){var b=null;a=a.contentAssistProposalIndex;void 0!==a&&(b=this._contentAssistMode.getProposals()[a]||null);return b},getTopIndex:function(){for(var a=this.parentNode.childNodes,b=0;b=this.parentNode.scrollTop)return b;return 0},getBottomIndex:function(){for(var a=this.parentNode.childNodes,b=0;bthis.parentNode.scrollTop+this.parentNode.clientHeight)return Math.max(0,
-b-1)}return a.length-1},scrollIndex:function(a,b){var c=this.parentNode.childNodes[a];c&&(c.scrollIntoView(b),this.preserveCloneThroughScroll=!0)},selectNode:function(a){var b=null;this._hideTimeout&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);this._fadeTimer&&(window.clearTimeout(this._fadeTimer),this._fadeTimer=null);this.previousSelectedNode&&(this.previousSelectedNode.classList.remove(u.selected),this.previousSelectedNode=null,this.previousCloneNode&&this._removeCloneNode());
-if(-1!==a&&(b=this.parentNode.childNodes[a])){b.classList.add(u.selected);this.parentNode.setAttribute("aria-activedescendant",b.id);b.focus();b.offsetTopthis.parentNode.scrollTop+this.parentNode.clientHeight&&(b.scrollIntoView(!1),this.preserveCloneThroughScroll=!0);var c=(b.firstChild||b).getBoundingClientRect(),e=this.parentNode.clientWidth?this.parentNode.clientWidth:this.parentNode.getBoundingClientRect();
-a=window.getComputedStyle(this.parentNode);var d=window.getComputedStyle(b),d=parseInt(a.paddingLeft)+parseInt(a.paddingRight)+parseInt(d.paddingLeft)+parseInt(d.paddingRight);if(c.width>=e-d){d=parseInt(a.top);e=b.cloneNode(!0);e.classList.add("cloneProposal");e.style.top=d+b.offsetTop-this.parentNode.scrollTop+"px";e.style.left=a.left;e.setAttribute("id",e.id+"_clone");c=c.left+c.width-parseInt(document.documentElement.clientWidth);0a&&(a=0),e.style.left=a+"px");var g=
-document.createElement("div");g.id="clone_contentassist";g.classList.add("contentassist");g.classList.add("cloneWrapper");g.appendChild(e);g.onclick=this.parentNode.onclick;this.parentNode.parentNode.insertBefore(g,this.parentNode);var f=function(a){a.contentAssistProposalIndex=b.contentAssistProposalIndex;if(a.hasChildNodes())for(var c=0;c=a?(k._removeCloneNode(),window.clearInterval(k._fadeTimer),k._fadeTimer=null):(g.style.opacity=a,g.style.filter="alpha(opacity\x3d"+100*a+")",a-=0.1*a)},50)},1500);b.classList.remove(u.selected);this.previousCloneNode=g}}this.previousSelectedNode=b},setContentAssistMode:function(a){this._contentAssistMode=a},show:function(){var a=this._contentAssistMode.getProposals();if(0===a.length)this.hide();else{this.parentNode.innerHTML=
-"";for(var b=0;bc){var e=a.y-this.textView.getLineHeight();this.parentNode.offsetHeight>e?c>e?this.parentNode.style.maxHeight=c+"px":(this.parentNode.style.maxHeight=
-e+"px",this.parentNode.style.top="0"):(this.parentNode.style.top=a.y-this.parentNode.offsetHeight-this.textView.getLineHeight()+"px",this.parentNode.style.maxHeight=e+"px")}else this.parentNode.style.maxHeight=c+"px";a.x+this.parentNode.offsetWidth>b?(a=b-this.parentNode.offsetWidth,0>a&&(a=0),this.parentNode.style.left=a+"px",this.parentNode.style.maxWidth=b-a):this.parentNode.style.maxWidth=b+a.x+"px"},_removeCloneNode:function(){this.parentNode.parentNode.contains(this.previousCloneNode)&&this.parentNode.parentNode.removeChild(this.previousCloneNode);
-this.previousCloneNode=null}};return{ContentAssist:s,ContentAssistMode:e,ContentAssistWidget:n}});y("orion/editor/emacs",["i18n!orion/editor/nls/messages","orion/editor/keyModes","orion/keyBinding","orion/util"],function(l,r,p,h){function f(d){r.KeyMode.call(this,d)}f.prototype=new r.KeyMode;f.prototype.createKeyBindings=function(){var d=[];d.push({actionID:"emacs-beginning-of-line",keyBinding:this._createStroke("a",!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-end-of-line",keyBinding:this._createStroke("e",
-!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-forward-char",keyBinding:this._createStroke("f",!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-backward-char",keyBinding:this._createStroke("b",!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-forward-word",keyBinding:this._createStroke("f",!1,!1,!0)});d.push({actionID:"emacs-backward-word",keyBinding:this._createStroke("b",!1,!1,!0)});d.push({actionID:"emacs-next-line",keyBinding:this._createStroke("n",!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-previous-line",
-keyBinding:this._createStroke("p",!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-beginning-of-buffer",keyBinding:this._createStroke(188,!1,!0,!0)});d.push({actionID:"emacs-end-of-buffer",keyBinding:this._createStroke(190,!1,!0,!0)});d.push({actionID:"emacs-delete-backward-char",keyBinding:this._createStroke(46,!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-delete-char",keyBinding:this._createStroke("d",!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-kill-line",keyBinding:this._createStroke("k",
-!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-kill-word",keyBinding:this._createStroke("d",!1,!1,!0)});d.push({actionID:"emacs-backward-kill-word",keyBinding:this._createStroke(46,!1,!1,!0)});d.push({actionID:"undo",keyBinding:this._createSequence([this._createStroke("x",!0),this._createStroke("u")])});d.push({actionID:"redo",keyBinding:this._createSequence([this._createStroke("x",!0),this._createStroke("r")])});d.push({actionID:"emacs-scroll-up",keyBinding:this._createStroke("v",!h.isMac,!1,
-!1,h.isMac)});d.push({actionID:"emacs-scroll-down",keyBinding:this._createStroke("v",!1,!1,!0)});d.push({actionID:"emacs-set-mark-command",keyBinding:this._createStroke(" ",!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-reset-mark-command",keyBinding:this._createStroke("g",!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-exchange-point-and-mark",keyBinding:this._createSequence([this._createStroke("x",!h.isMac,!1,!1,h.isMac),this._createStroke("x",!h.isMac,!1,!1,h.isMac)])});for(var b=0;9>=b;b++)d.push({actionID:"emacs-digit-argument-"+
-b,keyBinding:this._createStroke(48+b,!h.isMac,!1,!1,h.isMac)}),d.push({actionID:"emacs-digit-argument-"+b,keyBinding:this._createStroke(48+b,!1,!1,!0)}),d.push({actionID:"emacs-digit-argument-"+b,keyBinding:this._createStroke(48+b,!h.isMac,!1,!0,h.isMac)});d.push({actionID:"emacs-negative-argument",keyBinding:this._createStroke(189,!h.isMac,!1,!1,h.isMac)});d.push({actionID:"emacs-negative-argument",keyBinding:this._createStroke(189,!1,!1,!0)});d.push({actionID:"emacs-negative-argument",keyBinding:this._createStroke(189,
-!h.isMac,!1,!0,h.isMac)});d.push({actionID:"emacs-uppercase",keyBinding:this._createStroke("u",!1,!1,!0)});d.push({actionID:"emacs-lowercase",keyBinding:this._createStroke("l",!1,!1,!0)});d.push({actionID:"emacs-capitalize",keyBinding:this._createStroke("c",!1,!1,!0)});d.push({actionID:"contentAssist",keyBinding:this._createStroke(191,!1,!1,!0)});d.push({actionID:"find",keyBinding:this._createStroke("r",!1,!1,!0)});d.push({actionID:"incrementalFind",keyBinding:this._createStroke("s",!0)});d.push({actionID:"incrementalFindReverse",
-keyBinding:this._createStroke("r",!0)});d.push({actionID:"save",keyBinding:this._createSequence([this._createStroke("x",!h.isMac,!1,!1,h.isMac),this._createStroke("s",!h.isMac,!1,!1,h.isMac)])});this._createActions(this.getView());return d};f.prototype._createStroke=function(d,b,f,h,g){d=new p.KeyStroke(d,b,f,h,g);d.scopeName=l.emacs;return d};f.prototype._createSequence=function(d){d=new p.KeySequence(d);d.scopeName=l.emacs;return d};f.prototype._getData=function(){var d={count:(this._argument||
-1)*(this._sign||1)};this._argument=0;this._sign=1;return d};f.prototype._moveCursor=function(d){var b=this._getData();this._marker&&(b.select=!0);return this.getView().invokeAction(d,!1,b)};f.prototype._digitArgument=function(d){this._argument=10*(this._argument||0)+d;return!0};f.prototype._negativeArgument=function(){this._sign=-1*(this._sign||1);return!0};f.prototype._createActions=function(d){var b=this;d.setAction("emacs-beginning-of-line",function(){return b._moveCursor("lineStart")},{name:l.lineStart});
-d.setAction("emacs-end-of-line",function(){return b._moveCursor("lineEnd")},{name:l.lineEnd});d.setAction("emacs-forward-char",function(){return b._moveCursor("charNext")},{name:l.charNext});d.setAction("emacs-backward-char",function(){return b._moveCursor("charPrevious")},{name:l.charPrevious});d.setAction("emacs-forward-word",function(){return b._moveCursor("wordNext")},{name:l.wordNext});d.setAction("emacs-backward-word",function(){return b._moveCursor("wordPrevious")},{name:l.wordPrevious});d.setAction("emacs-next-line",
-function(){return b._moveCursor("lineDown")},{name:l.lineDown});d.setAction("emacs-previous-line",function(){return b._moveCursor("lineUp")},{name:l.lineUp});d.setAction("emacs-beginning-of-buffer",function(){return b._moveCursor("textStart")},{name:l.textStart});d.setAction("emacs-end-of-buffer",function(){return b._moveCursor("textEnd")},{name:l.textEnd});d.setAction("emacs-delete-backward-char",function(){return d.invokeAction("deletePrevious")},{name:l.deletePrevious});d.setAction("emacs-delete-char",
-function(){return d.invokeAction("deletePrevious")},{name:l.deletePrevious});d.setAction("emacs-kill-line",function(){return d.invokeAction("deleteLineEnd")},{name:l.deleteLineEnd});d.setAction("emacs-kill-word",function(){return d.invokeAction("deleteWordNext")},{name:l.deleteWordNext});d.setAction("emacs-backward-kill-word",function(){return d.invokeAction("deleteWordPrevious")},{name:l.deleteWordPrevious});d.setAction("emacs-scroll-up",function(){return b._moveCursor("pageDown")},{name:l.pageDown});
-d.setAction("emacs-scroll-down",function(){return b._moveCursor("pageUp")},{name:l.pageUp});d.setAction("emacs-set-mark-command",function(){var f=d.getCaretOffset();d.setCaretOffset(f);b._marker=f;return!0},{name:l.setMarkCommand});d.setAction("emacs-exchange-point-and-mark",function(){if(void 0!==b._marker){var f=d.getCaretOffset(),h=d.getSelection();if(h.end===f){var g=h.start;h.start=h.end;h.end=g}b._marker=f;d.setSelection(h.start,h.end)}return!0},{name:l.exchangeMarkPoint});d.setAction("emacs-reset-mark-command",
-function(){var f=d.getCaretOffset();d.setCaretOffset(f);b._marker=void 0;return!0},{name:l.clearMark});d.setAction("emacs-digit-argument-0",function(){return b._digitArgument(0)},{name:h.formatMessage(l.digitArgument,"0")});d.setAction("emacs-digit-argument-1",function(){return b._digitArgument(1)},{name:h.formatMessage(l.digitArgument,"1")});d.setAction("emacs-digit-argument-2",function(){return b._digitArgument(2)},{name:h.formatMessage(l.digitArgument,"2")});d.setAction("emacs-digit-argument-3",
-function(){return b._digitArgument(3)},{name:h.formatMessage(l.digitArgument,"3")});d.setAction("emacs-digit-argument-4",function(){return b._digitArgument(4)},{name:h.formatMessage(l.digitArgument,"4")});d.setAction("emacs-digit-argument-5",function(){return b._digitArgument(5)},{name:h.formatMessage(l.digitArgument,"5")});d.setAction("emacs-digit-argument-6",function(){return b._digitArgument(6)},{name:h.formatMessage(l.digitArgument,"6")});d.setAction("emacs-digit-argument-7",function(){return b._digitArgument(7)},
-{name:h.formatMessage(l.digitArgument,"7")});d.setAction("emacs-digit-argument-8",function(){return b._digitArgument(8)},{name:h.formatMessage(l.digitArgument,"8")});d.setAction("emacs-digit-argument-9",function(){return b._digitArgument(9)},{name:h.formatMessage(l.digitArgument,"9")});d.setAction("emacs-negative-argument",function(){return b._negativeArgument()},{name:l.negativeArgument});d.setAction("emacs-uppercase",function(){var f=b._getData();f.unit="word";return d.invokeAction("uppercase",
-!1,f)},{name:l.uppercase});d.setAction("emacs-lowercase",function(){var f=b._getData();f.unit="word";return d.invokeAction("lowercase",!1,f)},{name:l.lowercase});d.setAction("emacs-capitalize",function(){var f=b._getData();f.unit="word";return d.invokeAction("capitalize",!1,f)},{name:l.capitalize})};return{EmacsMode:f}});y("orion/editor/vi",["i18n!orion/editor/nls/messages","orion/editor/keyModes","orion/keyBinding","orion/util"],function(l,r,p,h){function f(a,b){for(var e in b)b.hasOwnProperty(e)&&
-(a[e]=b[e])}function d(a,b,e,d,g,f,k){a=new p.KeyStroke(a,b,e,d,g,f);a.scopeName=k||l.vi;return a}function b(a,b){var e=new p.KeySequence(a);e.scopeName=b||l.vi;return e}function k(a,b,e){this.key=b;this.msg=e;this.number="";r.KeyMode.call(this,a);a&&this._createActions(a)}function m(a){var b=a.getView();this.viMode=a;r.KeyMode.call(this,b);this._createActions(b)}function g(a,b,e,d){this.viMode=a;this.nextMode=b;k.call(this,a.getView(),e,d)}function a(a){var b=a.getView();r.KeyMode.call(this,b);this.viMode=
-a;this._createActions(b)}function s(b,e){k.call(this,b,"",l.vimove);this.insertMode=new a(this);this.changeMode=new g(this,this.insertMode,"c",l.vichange);this.deleteMode=new g(this,this,"d",l.videlete);this.yankMode=new g(this,this,"y",l.viyank);this.statusReporter=e}var e,n;k.prototype=new r.KeyMode;f(k.prototype,{_msg:function(a){return{name:h.formatMessage(l[a],this.msg)}},createKeyBindings:function(){for(var a=[],b=this.key,b=b?"-"+b+"-":"-",e=0;9>=e;e++)a.push({actionID:"vi"+b+e,keyBinding:d(e+
-"",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi"+b+"Left",keyBinding:d("h",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"Left",keyBinding:d("h",!0,!1,!1,!1)});a.push({actionID:"vi"+b+"Left",keyBinding:d(8)});a.push({actionID:"vi"+b+"Left",keyBinding:d(37)});a.push({actionID:"vi"+b+"Down",keyBinding:d("j",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"Down",keyBinding:d(40)});a.push({actionID:"vi"+b+"Up",keyBinding:d("k",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"Up",
-keyBinding:d(38)});a.push({actionID:"vi"+b+"Right",keyBinding:d("l",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"Right",keyBinding:d(39)});a.push({actionID:"vi"+b+"Right",keyBinding:d(32)});a.push({actionID:"vi"+b+"w",keyBinding:d("w",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"b",keyBinding:d("b",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"W",keyBinding:d("W",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"B",keyBinding:d("B",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+
-b+"e",keyBinding:d("e",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"E",keyBinding:d("E",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"$",keyBinding:d("$",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"^_",keyBinding:d("^",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"^_",keyBinding:d("_",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"+",keyBinding:d("+",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"+",keyBinding:d(13)});a.push({actionID:"vi"+b+"-",keyBinding:d("-",!1,
-!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"|",keyBinding:d("|",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"H",keyBinding:d("H",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"M",keyBinding:d("M",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"L",keyBinding:d("L",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"/",keyBinding:d("/",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"?",keyBinding:d("?",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"n",keyBinding:d("n",!1,!1,!1,
-!1,"keypress")});a.push({actionID:"vi"+b+"N",keyBinding:d("N",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"f",keyBinding:d("f",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"F",keyBinding:d("F",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"t",keyBinding:d("t",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+"T",keyBinding:d("T",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+",",keyBinding:d(",",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi"+b+";",keyBinding:d(";",!1,!1,!1,!1,"keypress")});
-a.push({actionID:"vi"+b+"G",keyBinding:d("G",!1,!1,!1,!1,"keypress")});return a},_createActions:function(a){function b(e){e=a.getModel().getLine(e);for(var d=0,g=e.charCodeAt(d);32===g||9===g;)d++,g=e.charCodeAt(d);return d}function e(a,b){a&&g.getView().setCaretOffset(a.start);b.editDone&&b.editDone()}var d=this.key,d=d?"-"+d+"-":"-",g=this;a.setAction("vi"+d+"0",function(){return g._storeNumber(0)});a.setAction("vi"+d+"1",function(){return g._storeNumber(1)});a.setAction("vi"+d+"2",function(){return g._storeNumber(2)});
-a.setAction("vi"+d+"3",function(){return g._storeNumber(3)});a.setAction("vi"+d+"4",function(){return g._storeNumber(4)});a.setAction("vi"+d+"5",function(){return g._storeNumber(5)});a.setAction("vi"+d+"6",function(){return g._storeNumber(6)});a.setAction("vi"+d+"7",function(){return g._storeNumber(7)});a.setAction("vi"+d+"8",function(){return g._storeNumber(8)});a.setAction("vi"+d+"9",function(){return g._storeNumber(9)});a.setAction("vi"+d+"Left",function(){return g._invoke("charPrevious",{unit:"character"})},
-this._msg("viLeft"));a.setAction("vi"+d+"Right",function(){return g._invoke("charNext",{unit:"character"})},this._msg("viRight"));a.setAction("vi"+d+"Up",function(){return g._invoke("lineUp",{editLine:!0})},this._msg("viUp"));a.setAction("vi"+d+"Down",function(){return g._invoke("lineDown",{editLine:!0})},this._msg("viDown"));a.setAction("vi"+d+"w",function(){return g._invoke("wordNext",{unit:"word"})},this._msg("viw"));a.setAction("vi"+d+"b",function(){return g._invoke("wordPrevious",{unit:"word"})},
-this._msg("vib"));a.setAction("vi"+d+"W",function(){return g._invoke("wordNext",{unit:"wordWS"})},this._msg("viW"));a.setAction("vi"+d+"B",function(){return g._invoke("wordPrevious",{unit:"wordWS"})},this._msg("viB"));a.setAction("vi"+d+"e",function(){g._invoke("charNext",{unit:"character"});g._invoke("wordNext",{unit:"wordend"});g._invoke("charPrevious",{unit:"character"});return!0},this._msg("vie"));a.setAction("vi"+d+"E",function(){return g._invoke("wordNext",{unit:"wordendWS"})},this._msg("viE"));
-a.setAction("vi"+d+"$",function(){return g._invoke("lineEnd")},this._msg("vi$"));a.setAction("vi"+d+"^_",function(){return g._invoke(function(){var e=a.getModel(),d=a.getCaretOffset(),d=e.getLineAtOffset(d);a.setCaretOffset(e.getLineStart(d)+b(d))})},this._msg("vi^_"));a.setAction("vi"+d+"+",function(){return g._invoke(function(e){var d=a.getModel(),g=a.getCaretOffset(),f=d.getLineCount()-1;e=Math.min(d.getLineAtOffset(g)+e.count,f);a.setCaretOffset(d.getLineStart(e)+b(e))},{editLine:!0})},this._msg("vi+"));
-a.setAction("vi"+d+"-",function(){return g._invoke(function(e){var d=a.getModel(),g=a.getCaretOffset();e=Math.max(d.getLineAtOffset(g)-e.count,0);a.setCaretOffset(d.getLineStart(e)+b(e))},{editLine:!0})},this._msg("vi-"));a.setAction("vi"+d+"|",function(){return g._invoke(function(b){var e=a.getModel(),d=a.getCaretOffset(),d=e.getLineAtOffset(d);a.setCaretOffset(Math.min(e.getLineStart(d)+b.count-1,e.getLineEnd(d)))})},this._msg("vi|"));a.setAction("vi"+d+"H",function(){return g._invoke(function(b){b=
-a.getModel().getLineStart(a.getTopIndex(!0)+(b.count-1));a.setCaretOffset(b)},{editLine:!0})},this._msg("viH"));a.setAction("vi"+d+"M",function(){return g._invoke(function(b){b=Math.ceil((a.getBottomIndex(!0)-a.getTopIndex(!0))/2)+a.getTopIndex(!0);a.setCaretOffset(a.getModel().getLineStart(b))},{editLine:!0})},this._msg("viM"));a.setAction("vi"+d+"L",function(){return g._invoke(function(b){a.setCaretOffset(a.getModel().getLineStart(a.getBottomIndex(!0)-(b.count-1)))},{editLine:!0})},this._msg("viL"));
-a.setAction("vi"+d+"/",function(){var a={hideAfterFind:!0,incremental:!1,reverse:!1,findCallback:function(b){g._searchFwd=!0;e(b,a)}};return g._invoke("find",a)},this._msg("vi/"));a.setAction("vi"+d+"?",function(){var a={hideAfterFind:!0,incremental:!1,reverse:!0,findCallback:function(b){g._searchFwd=!1;e(b,a)}};return g._invoke("find",a)},this._msg("vi?"));a.setAction("vi"+d+"n",function(){var b,d=a.getCaretOffset();g._searchFwd?(b="findNext",d++):b="findPrevious";var f={start:d,findCallback:function(a){e(a,
-f)}};return g._invoke(b,f)},this._msg("vin"));a.setAction("vi"+d+"N",function(){var b,d=a.getCaretOffset();g._searchFwd?b="findPrevious":(b="findNext",d++);var f={start:d,findCallback:function(a){e(a,f)}};return g._invoke(b,f)},this._msg("viN"));a.setAction("vi"+d+"f",function(){var b=a.getModel(),e=a.getCaretOffset();return g._findChar(e,b.getLineEnd(b.getLineAtOffset(e)),!1,0)},this._msg("vif"));a.setAction("vi"+d+"F",function(){var b=a.getModel(),e=a.getCaretOffset();return g._findChar(b.getLineStart(b.getLineAtOffset(e)),
-e,!0,0)},this._msg("viF"));a.setAction("vi"+d+"t",function(){var b=a.getModel(),e=a.getCaretOffset();return g._findChar(e,b.getLineEnd(b.getLineAtOffset(e)),!1,-1)},this._msg("vit"));a.setAction("vi"+d+"T",function(){var b=a.getModel(),e=a.getCaretOffset();return g._findChar(b.getLineStart(b.getLineAtOffset(e)),e,!0,1)},this._msg("viT"));a.setAction("vi"+d+",",function(){return g._findNextChar(g._charTempOptions.reverse)},this._msg("vi,"));a.setAction("vi"+d+";",function(){return g._findNextChar(!g._charTempOptions.reverse)},
-this._msg("vi;"));a.setAction("vi"+d+"G",function(){if(""===g.number){var b=a.getModel();b.getBaseModel&&(b=b.getBaseModel());g.number=b.getLineCount()}return g._invoke(function(b){b=b||{};b.line=b.count;b.editLine=!0;b.callback=function(){b.editDone&&b.editDone()};a.invokeAction("gotoLine",!1,b)})},this._msg("viG"))},_invoke:function(a,b){var e=this.getView();b=b||{};b.count=this._getCount();"function"===typeof a?a(b):e.invokeAction(a,!1,b);return!0},_getCount:function(){var a=1;""!==this.number&&
-(a=this.number>>0);this.number="";return a},_findChar:function(a,b,e,d){this._charTempOptions={};this._charTempOptions.start=a;this._charTempOptions.end=b;this._charTempOptions.hideAfterFind=!0;this._charTempOptions.incremental=!1;this._charTempOptions.reverse=e;this._charTempOptions.offset=d;var g=this._charTempOptions,f=this;this._charTempOptions.findCallback=function(a){a&&f.getView().setCaretOffset(a.start+d);g.editDone&&g.editDone()};return this._invoke("find",this._charTempOptions)},_findNextChar:function(a){if(this._charTempOptions){var b=
-this.getView(),e={};e.hideAfterFind=this._charTempOptions.hideAfterFind;e.incremental=this._charTempOptions.incremental;e.reverse=this._charTempOptions.reverse;e.wrap=!1;var d=this;e.findCallback=function(a){a&&d.getView().setCaretOffset(a.start+d._charTempOptions.offset);e.editDone&&e.editDone()};var g=b.getModel();if(a)return e.start=b.getCaretOffset()+1-this._charTempOptions.offset,e.end=g.getLineEnd(g.getLineAtOffset(e.start)),e.reverse=!1,this._invoke("findNext",e);e.start=b.getCaretOffset()-
-this._charTempOptions.offset;e.end=g.getLineStart(g.getLineAtOffset(e.start));e.reverse=!0;return this._invoke("findPrevious",e)}return!0},_storeNumber:function(a){var b=this;if(0===a&&!this.number)return this._invoke(function(){b.getView().invokeAction("lineStart",!0)});this.number+=a;return!0}});m.prototype=new r.KeyMode;f(m.prototype,{createKeyBindings:function(){var a=[];a.push({actionID:"vi-:-ESC",keyBinding:d(27),predefined:!0});return a},_createActions:function(a){var b=this;a.setAction("vi-:-ESC",
-function(){a.removeKeyMode(b);a.addKeyMode(b.viMode);return!0})},match:function(a){var b=r.KeyMode.prototype.match.call(this,a);b||(b=this.getView().getKeyModes()[0].match(a));return b},storeNumber:function(a){this.number=a}});g.prototype=new k;f(g.prototype,{createKeyBindings:function(){var a=k.prototype.createKeyBindings.call(this);a.push({actionID:"vi-"+this.key+"ESC",keyBinding:d(27),predefined:!0});a.push({actionID:"vi-"+this.key+"-"+this.key,keyBinding:d(this.key,!1,!1,!1,!1,"keypress")});return a},
-_invoke:function(a,b){b=b||{};var d=this.getView(),g=d.getCaretOffset(),f=g,h=d.getModel(),m=this;b.editDone=function(){var a=d.getCaretOffset();if(f>a){var c=f;f=a;a=c}b.editLine&&(f=h.getLineStart(h.getLineAtOffset(f)),a=h.getLineEnd(h.getLineAtOffset(a),"c"===m.key?!1:!0));"y"===m.key?(e=d.getText(f,a),n=b.editLine,d.setCaretOffset(g)):d.setText("",f,a);d.removeKeyMode(m);d.addKeyMode(m.nextMode)};k.prototype._invoke.call(this,a,b);b.editDone();return!0},_getCount:function(){var a=1;""!==this.firstNumber&&
-(a=this.firstNumber>>0);var b=1;""!==this.number&&(b=this.number>>0);this.number=this.firstNumber="";return a*b},_createActions:function(a){k.prototype._createActions.call(this,a);var b=this;a.setAction("vi-"+b.key+"ESC",function(){a.removeKeyMode(b);a.addKeyMode(b.viMode);return!0});a.setAction("vi-"+b.key+"-"+b.key,function(){return b._invoke("lineEnd",{editLine:!0})},this._msg("viycd"))},storeNumber:function(a){this.firstNumber=a},_modeAdded:function(){this.secondNumber=""},_modeRemoved:function(){this.number=
-this.firstNumber=this.command=""}});a.prototype=new r.KeyMode;f(a.prototype,{createKeyBindings:function(){var a=[];a.push({actionID:"vi-insert-ESC",keyBinding:d(27),predefined:!0});return a},_createActions:function(a){var b=this;a.setAction("vi-insert-ESC",function(){a.removeKeyMode(b);a.addKeyMode(b.viMode);return!0})},match:function(a){var b=r.KeyMode.prototype.match.call(this,a);b||(b=this.getView().getKeyModes()[0].match(a));return b},storeNumber:function(a){}});s.prototype=new k;f(s.prototype,
-{createKeyBindings:function(){var a=k.prototype.createKeyBindings.call(this);a.push({actionID:"vi-ctrl-f",keyBinding:d("f",!0)});a.push({actionID:"vi-ctrl-b",keyBinding:d("b",!0)});a.push({actionID:"vi-ctrl-e",keyBinding:d("e",!0)});a.push({actionID:"vi-ctrl-y",keyBinding:d("y",!0)});a.push({actionID:"statusLineMode",keyBinding:d(":",!1,!1,!1,!1,"keypress")});a.push({actionID:"vi-a",keyBinding:d("a",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-A",keyBinding:d("A",!1,!1,!1,!1,"keypress"),
-predefined:!0});a.push({actionID:"vi-i",keyBinding:d("i",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-I",keyBinding:d("I",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-o",keyBinding:d("o",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-O",keyBinding:d("O",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-R",keyBinding:d("R",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-s",keyBinding:d("s",!1,!1,!1,!1,"keypress"),predefined:!0});
-a.push({actionID:"vi-S",keyBinding:d("S",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-p",keyBinding:d("p",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-P",keyBinding:d("P",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-u",keyBinding:d("u",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-c",keyBinding:d("c",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-d",keyBinding:d("d",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-y",
-keyBinding:d("y",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-~",keyBinding:d("~",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-x",keyBinding:d("x",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-X",keyBinding:d("X",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-C",keyBinding:d("C",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-D",keyBinding:d("D",!1,!1,!1,!1,"keypress"),predefined:!0});a.push({actionID:"vi-*",keyBinding:d("*",
-!1,!1,!1,!1,"keypress"),predefined:!0});return a},getKeyBindings:function(a){var e=r.KeyMode.prototype.getKeyBindings.call(this,a),e=e||[],g=this.changeMode.getKeyBindings(a),f;if(!this.changeMode.isActive())for(f=0;f>0);b.count=e;e=this.getView();this.insertMode.storeNumber(this.number);e.invokeAction(a,!1,b);e.removeKeyMode(this);e.addKeyMode(this.insertMode);this.number="";return!0},_modeAdded:function(){this.getView().setOptions({blockCursorVisible:!0})},
-_modeRemoved:function(){var a=this.getView();a.setOptions({blockCursorVisible:!1});a.removeKeyMode(this.insertMode);a.removeKeyMode(this.changeMode);a.removeKeyMode(this.deleteMode)}});return{VIMode:s}});y("orion/editorPreferences",[],function(){return{}});y("orion/widgets/themes/ThemePreferences",[],function(){return{}});y("orion/widgets/themes/editor/ThemeData",[],function(){return{}});y("orion/widgets/settings/EditorSettings",[],function(){return null});y("orion/searchAndReplace/textSearcher",
-[],function(){return{TextSearcher:null}});y("orion/webui/dialogs/OpenResourceDialog",[],function(){return{OpenResourceDialog:{}}});y("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(l,r){function p(h,f,d){if(h=r.node(h))this._parent=h;else throw Error("Parent node of dropdown menu not found");this.options=d=d||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=d.selectionClass;h=document.createElement("div");h.classList.add("dropdownMenu");
-h.classList.add("dropdownMenuOpen");h.id=this.navDropDownId;h.style.display="none";this._parent.appendChild(h);this._dropdownMenu=h;if(f=r.node(f))this._triggerNode=f;else throw"Trigger node of dropdown menu not found";"hidden"===this._triggerNode.style.visibility&&(this._triggerNode.style.visibility="visible");d.noClick||(this._triggerNode.onclick=this.click.bind(this));this._dropdownMenu.addEventListener("keydown",function(b){b.keyCode===r.KEY.ESCAPE&&this.clearPanel()}.bind(this))}l.mixin(p.prototype,
-{click:function(){"none"===this._dropdownMenu.style.display?this.updateContent(this.getContentNode(),function(){r.setFramesEnabled(!1);this._dropdownMenu.style.display="";this._positionDropdown();this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=r.addAutoDismiss([this._triggerNode,this._dropdownMenu],this.clearPanel.bind(this));if(this.options.onShow)this.options.onShow()}.bind(this)):this.clearPanel()},clearPanel:function(){if(this.isVisible()&&(this._dropdownMenu.style.display=
-"none",r.setFramesEnabled(!0),this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},addContent:function(h){this._dropdownMenu.innerHTML=h},getContentNode:function(){return this._dropdownMenu},updateContent:function(h,f){f()},_positionDropdown:function(){this._dropdownMenu.style.right="";var h=r.bounds(this._dropdownMenu),f=r.bounds(document.body);h.left+h.width>f.left+f.width&&(h=r.bounds(this._boundingNode(this._triggerNode)),f=r.bounds(this._triggerNode),
-this._dropdownMenu.style.right=h.width-(f.left-h.left+f.width)+"px")},_boundingNode:function(h){var f=window.getComputedStyle(h,null);return null===f||"absolute"===f.getPropertyValue("position")||!h.parentNode||h===document.body?h:this._boundingNode(h.parentNode)},isDestroyed:function(){return!this._dropdownMenu.parentNode},isVisible:function(){return"none"!==this._dropdownMenu.style.display&&!this.isDestroyed()},focus:function(){this._dropdownMenu.focus()},destroy:function(){this._parent&&(r.setFramesEnabled(!0),
-r.empty(this._parent),this._parent=this.select=null)}});return p});y("orion/URITemplate",[],function(){function l(a){this._text=a}function r(a){return a.replace("%25","%")}function p(a,b){if("U"===b)return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if("U+R"===b)return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(g,r);if("U+R-,"===b)return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+
-b);}function h(a,b,e){for(var d=[],c=0;cd?1:0}var e;d.mixin(g.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(a){return this.categories[a]||null}});d.mixin(a.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(a){var b=
-a.href;a=a.textContent;var e=document.createElement("a");e.href=b;e.target="_self";e.classList.add("targetSelector");e.textContent=a;return e})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(a){var b;return!e?(b=[],a.getServiceReferences("orion.page.link.category").forEach(function(e){var d=k(e);if(d.id&&(d.name||d.nameKey))d.service=a.getService(e),d.textContent=d.name,b.push((new r).resolve(d))}),r.all(b).then(function(a){return e=new g(a)})):(new r).resolve(e)},
-getPageLinksInfo:function(b,c){return m(b,c).then(function(b){return new a(b)})},getOrionHome:b}});y("orion/extensionCommands","orion/Deferred orion/commands orion/contentTypes orion/URITemplate orion/i18nUtil orion/PageLinks i18n!orion/edit/nls/messages orion/URL-shim".split(" "),function(l,r,p,h,f,d,b){function k(a){var b={};a.getPropertyKeys().forEach(function(c){b[c]=a.getProperty(c)});return b}var m={},g=d.getOrionHome();m._cloneItemWithoutChildren=function n(a){if(null===a||"object"!==typeof a)return a;
-var b=a.constructor(),d;for(d in a)"children"!==d&&"Children"!==d&&(b[d]=n(a[d]));return b};m._getOpenWithNavCommandExtensions=function(a,b){function d(a,b){for(var c=a.getServiceReferences("orion.navigate.openWith"),g=[],f=[],k=0;k(h=b.indexOf("]")))return!1;var n=b.substring(0,f),l;if(!(l=a[n])||!Array.isArray(l))return!1;
-f=b.substring(f+1,h);f=parseInt(f,10);if(isNaN(f))return!1;0>f&&(f+=l.length);b=b.substring(h+1);b=n+":"+String(f)+b}return 0<=b.indexOf("|")?(f=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),m(a,f,c,d)?!0:m(a,b,c,d)):0<=b.indexOf(":")?(f=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[f]?m(a[f],b,c,d):!1):k(a,b,g,c,d)}function l(b,c,d){if(d.info.validationProperties)for(var g=0;ga.length)return!1}else a=[a];for(var b=0;bg);){h.push({startIndex:g,length:b.searchStrLength});a=!0;if(f)break;g+=b.searchStrLength}return a?h:null},findRegExp:function(b,d,f,g){if(!d)return null;f=f||"";f+=(-1===f.indexOf("g")?"g":"")+(-1===f.indexOf("m")?"m":"");var a=null;return(a=RegExp(d,f).exec(b.substring(g)))&&{startIndex:a.index+g,length:a[0].length}},searchOnelineRegEx:function(b,f,h){for(var g=0,a=!1,l=[];;)if(g=d.findRegExp(f,b.regExp.pattern,b.regExp.flags,g)){l.push(g);a=!0;if(h)break;g=g.startIndex+g.length}else break;
-return a?l:null},generateNewContents:function(b,f,h,g,a,l){if(g&&f){b||(h.contents=[]);for(var e=0;eh?(h=0,b=h+a-1):(b=f+b,b>d.length-1&&(b=d.length-1,h=b-a+1)));for(a=h;a<=b;a++)g.push({context:d[a],current:a===f});return g},splitFile:function(b){for(var d=0,f=0,g=0,a=0,h=[];;){-1!==d&&d<=g&&(d=b.indexOf("\r",g));-1!==f&&f<=g&&(f=b.indexOf("\n",g));
-if(-1===f&&-1===d){h.push(b.substring(a));break}var e=1;-1!==d&&-1!==f?d+1===f?(e=2,g=f+1):g=(dd.start&&(e=c.getModel().getText(d.start,d.end),b&&b.getOptions().regex&&(e=v.escape(e)));return[new g.CommandParameter("find","text","Find:",e)]}),d=new k.Command({name:l.Find,tooltip:l.Find,id:"orion.edit.find",
-visibleWhen:function(b,c){var d=c.handler.editor||a.editor,e=c.handler.textSearcher||a.textSearcher;return d&&d.installed&&e},parameters:b,callback:function(b){var g=p.node("replaceCompareDiv");if(g&&g.classList.contains("replaceCompareDivVisible"))return!1;var g=this.editor||a.editor,f=this.textSearcher||a.textSearcher;d.textSearcher&&d.textSearcher!==f&&d.textSearcher.hide();d.textSearcher=f;var h="",k=null,n=g.getSelection();n.end>n.start&&b.parameters.valueFor("useEditorSelection")?(h=g.getModel().getText(n.start,
-n.end),f.getOptions().regex&&(h=v.escape(h))):b.parameters&&b.parameters.valueFor("find")&&(h=b.parameters.valueFor("find"),k=c.matchResourceParameters(),e.convertFindURLBinding(k));k?(f.setOptions({regex:k.regEx,caseInsensitive:!k.caseSensitive}),b={},k.atLine&&(b.start=g.getModel().getLineStart(k.atLine-1)),f.show({findString:h,replaceString:k.replaceWith}),f.find(!0,b),a.commandService.closeParameterCollector()):f.show({findString:h})}});this.commandService.addCommand(d)},_createBlameCommand:function(){var a=
-this,b=new k.Command({name:l.Blame,tooltip:l.BlameTooltip,id:"orion.edit.blame",parameters:new g.ParametersDescription([new g.CommandParameter("blame","boolean")],{clientCollect:!0}),visibleWhen:function(b,c){var d=c.handler.editor||a.editor,e=c.handler.blamer||a.blamer;return d&&d.installed&&e&&e.isVisible()},callback:function(b){for(var c=!1,d=this.editor||a.editor,e=this.blamer||a.blamer,g=d.getAnnotationModel().getAnnotations();g.hasNext();)if(g.next().type===t.AnnotationType.ANNOTATION_BLAME){c=
-!0;break}c=!c;b.parameters&&b.parameters.valueFor("blame")&&(c="true"===b.parameters.valueFor("blame"));c?e.doBlame():d.showBlame([]);d.focus()}});this.commandService.addCommand(b)},_createDiffCommand:function(){var a=this,b=new k.Command({name:l.Diff,tooltip:l.DiffTooltip,id:"orion.edit.diff",visibleWhen:function(b,c){var d=c.handler.editor||a.editor,e=c.handler.differ||a.differ;return d&&d.installed&&e&&e.isVisible()},callback:function(){var b=this.editor||a.editor,c=this.differ||a.differ;c.toggleEnabled();
-var d=this.editorPreferences;d.getPrefs(function(a){a.diffService=c.isEnabled();d.setPrefs(a)});b.focus()}});this.commandService.addCommand(b)},_createShowTooltipCommand:function(){var a=this,b=new k.Command({name:l.showTooltip,tooltip:l.showTooltipTooltip,id:"orion.edit.showTooltip",visibleWhen:function(b,c){var d=c.handler.editor||a.editor;return d&&d.installed},callback:function(){var b=this.editor||a.editor,c=b.getTooltip(),d=b.getTextView(),e=d.getCaretOffset(),d=d.getLocationAtOffset(e);c.show({x:d.x,
-y:d.y,getTooltipInfo:function(){return b._getTooltipInfo(this.x,this.y)}},!1,!0)}});this.commandService.addCommand(b)},_onServiceRemoved:function(a){-1!==a.getProperty("objectClass").indexOf("orion.edit.command")&&(this._recreateEditCommands=!0)},_onServiceAdded:function(a){-1!==a.getProperty("objectClass").indexOf("orion.edit.command")&&(this._recreateEditCommands=!0)},_createEditCommands:function(){var b=this;this._recreateEditCommands=!1;var c=this.serviceRegistry,e=this.commandService,g=c.getServiceReferences("orion.edit.command"),
-f=c.getService("orion.page.progress"),h=y.bind(null,c),m=function(a,c,d){var e=d.visibleWhen;d.visibleWhen=function(c,d){var g=d.handler.editor||b.editor,f=d.handler.inputManager||b.inputManager;return!g||(!g.installed||!f)||a.editor&&g.id&&a.editor!==g.id||b.inputManager.getReadOnly()?!1:!e||e(c)};d.callback=function(e){var g=this.editor||b.editor,k=this.inputManager||b.inputManager,m=g.getSelection?g.getSelection():{start:0,end:0},s=g.getModel(),q=function(a){"object"===typeof a&&a?(a.text&&g.setText(a.text),
-a.selection&&(g.setSelection&&g.setSelection(a.selection.start,a.selection.end,!0),g.focus())):"string"===typeof a&&(g.setText(a,m.start,m.end,!0),g.setSelection&&g.setSelection(m.start,m.start+a.length),g.focus())};c.execute?(s={contentType:k.getContentType(),input:k.getInput(),offset:g.getCaretOffset()},"orion.edit.quickfix"===a.scopeId&&(s.annotation={start:e.userData.start,end:e.userData.end,title:e.userData.title,id:e.userData.id,data:e.userData.data}),e=g.getEditorContext(),e.openDelegatedUI=
-function(){var a=arguments[0],a=a||{};a.done=q;a.status=h;a.params=a.params||{};n.mixin(a.params,k.getFileMetadata());z.apply(null,Array.prototype.slice.call(arguments))},e.setStatus=h,g.focus(),e=c.execute(e,s),s=null):(e=c.run(s.getText(m.start,m.end),s.getText(),m,k.getInput()),s=function(b){if(b&&b.uriTemplate){var c={};c.uriTemplate=b.uriTemplate;c.params=k.getFileMetadata();c.id=a.id;c.width=b.width;c.height=b.height;c.done=q;c.status=h;z(c)}else b&&(b.Status||b.status)?h(b.Status||b.status):
-q(b)});f.showWhile(e,r.formatMessage(l.running,d.name)).then(s);return!0};return new k.Command(d)};return d.when(function(a){if(w)return w;var b=a.getService("orion.core.contentTypeRegistry");b||(b=new s.ContentTypeRegistry(a),b=a.getService("orion.core.contentTypeRegistry"));return b.getContentTypes().then(function(a){return w=a})}(this.serviceRegistry),function(){var c=[];g.forEach(function(d){for(var g=b.serviceRegistry.getService(d),f={},h=d.getPropertyKeys(),k=0;kb.result.index?1:a.pattern.pattern.indexb.result.index?1:a.pattern.pattern.indexb.start?1:0});for(p=0;p=c);r++){var z=p[r].start,y=p[r].end;if(l=c);l++){var p=f[l].start,r=f[l].end;if(kb&&k.end-a<=-b){k=y;continue}D=f.getText(k.start,Math.min(c,k.end+b+1));if(!this._stylerAdapter.verifyBlock(f,D,k,b)){k=y;continue}}r=k.getBlocks();var q=r.length,w=m(r,h,!0),x=m(r,d,!1,w-1,q);p=!1;if(w&&r.length&&r[w-1].end===a){D=f.getText(r[w-1].start,Math.min(c,a+1));var E=this.computeBlocks(f,D,k,r[w-1].start,null,null,null);E.length&&E[0].end!==r[w-1].end&&(w--,p=!0)}wa&&(C+=b)):w===q&&0a&&(C+=b)):C=Math.max(h,k.contentStart);B=xa&&(E-=b),p>a&&(p-=b),E<=a&&(ab&&(d--,b++),this._view.setSelection(b,d))}}},_onSelection:function(b){var a=Array.isArray(b.oldValue)?b.oldValue:[b.oldValue];b=Array.isArray(b.newValue)?b.newValue:[b.newValue];var d=this._view,e=d.getModel(),f;if(this._highlightCaretLine){var c=function(a){var b={};return a.some(function(a){if(a.isEmpty())b[e.getLineAtOffset(a.start).toString()]=!0;
-else return!0;return!1})?{}:b},a=c(a),c=c(b),h=function(a,b){for(var c in a)b[c]||(f=c>>0,d.redrawLines(f,f+1))};h(a,c);h(c,a)}if(this._annotationModel){var a=this._bracketAnnotations,k,m;if(1===b.length&&b[0].isEmpty()&&0<(m=b[0].getCaret()))m-=1,e.getBaseModel&&(m=e.mapOffset(m),e=e.getBaseModel()),b=this._findBlock(this._rootBlock,m),b=this._findMatchingBracket(e,b,m),-1!==b&&(k=[l.AnnotationType.createAnnotation(l.AnnotationType.ANNOTATION_MATCHING_BRACKET,b,b+1),l.AnnotationType.createAnnotation(l.AnnotationType.ANNOTATION_CURRENT_BRACKET,
-m,m+1)]);this._bracketAnnotations=k;this._annotationModel.replaceAnnotations(a,k)}},_spliceStyles:function(b,a,d,e){for(var f=b.regex,c=f.lastIndex=0,h=f.exec(d);h;){for(h=e+h.index;c/,func:function(f){return"atomic group"}}],toRegExp:function(f){function d(b,a){throw Error('Unsupported regex feature "'+b+'": "'+a[0]+'" at index: '+a.index+" in "+
-a.input);}var b="",k;f=h.processGlobalFlag("x",f,function(b){for(var a="",d=!1,e=b.length,f=0;f=z.start&&v.end<=y)v.start+=1,v.end+=1,v.num+=1,2===v.type&&(c[v.oldNum]=v.num);a.push(A);e++;break}default:"|"!==A&&(2!==v&&4!==v)&&0===g&&(m.push(4),a.push({start:r,end:-1,type:4,num:e}),n.push("("),p[e]=null,e++),n.push(A),"\\"===A&&(A=b.charAt(r+1),n.push(A),r+=1)}}for(;m.length;)m.pop(),n.push(")");b=RegExp(n.join(""));
-h={};d=d||c;for(var C in d)d.hasOwnProperty(C)&&(h[C]="\\"+d[C]);b=this.getSubstitutedRegex(b,h,!1);return[b,c,p]},complexCaptures:function(f){if(!f)return!1;for(var d in f)if(f.hasOwnProperty(d)&&"0"!==d)return!0;return!1}};p.prototype={initialize:function(f){this.textView=f;this.textView.stylerOptions=this;var d=this;this._listener={onModelChanged:function(b){d.onModelChanged(b)},onDestroy:function(b){d.onDestroy(b)},onLineStyle:function(b){d.onLineStyle(b)},onStorage:function(b){d.onStorage(b)}};
-f.addEventListener("ModelChanged",this._listener.onModelChanged);f.addEventListener("Destroy",this._listener.onDestroy);f.addEventListener("LineStyle",this._listener.onLineStyle);f.redrawLines()},onDestroy:function(f){this.destroy()},destroy:function(){this.textView&&(this.textView.removeEventListener("ModelChanged",this._listener.onModelChanged),this.textView.removeEventListener("Destroy",this._listener.onDestroy),this.textView.removeEventListener("LineStyle",this._listener.onLineStyle),this.textView=
-null);this._listener=this._tree=this._styles=this.grammar=null},preprocess:function(f){for(f=[f];0!==f.length;){var d=f.pop();if(!d._resolvedRule||!d._typedRule)if(d._resolvedRule=this._resolve(d),d._typedRule=this._createTypedRule(d),this.addStyles(d.name),this.addStyles(d.contentName),this.addStylesForCaptures(d.captures),this.addStylesForCaptures(d.beginCaptures),this.addStylesForCaptures(d.endCaptures),d._resolvedRule!==d&&f.push(d._resolvedRule),d.patterns)for(var b=0;bf)return this._tree;for(var b=[this._tree],h=null;b.length;){var m=
-b.pop();if(!m.parent||this.isDamaged(m,f,d)){m instanceof this.BeginEndNode&&(h=m);for(var g=0;gd},parse:function(f,d,b,h,m,g){var a=this.textView.getModel(),l=a.getLineStart(a.getLineCount()-1),e=a.getCharCount(),n=this.getInitialExpected(f,b),c=-1;d&&(f.repaired=!0,f.endNeedsUpdate=!0,c=(c=f.children[f.children.length-1])?a.getLineEnd(a.getLineAtOffset(c.end+(m-g))):-1,h=a.getLineEnd(a.getLineAtOffset(h+
-g)),c=Math.max(c,h));c=-1===c?e:c;h=n;for(var p=f,r=!1,v=b,A=-1;p&&(!d||v=l?e:a.getLineStart(a.getLineAtOffset(v)+1));var z=y&&y.match,D=y&&y.rule,B=y&&y.isEnd;if(y&&y.isSub)v=this.afterMatch(z),D instanceof this.BeginEndRule&&(r=!0,d&&D===h.rule&&p===h.parent?(p=h,p.setStart(z),p.repaired=!0,p.endNeedsUpdate=!0,h=this.getNextExpected(h,"begin")):(d&&(this.prune(p,h),d=!1),z=new this.BeginEndNode(p,D,z),p.addChild(z),p=z));else if(B||v===e)p instanceof
-this.BeginEndNode&&(z?(r=!0,A=Math.max(A,p.end),p.setEnd(z),v=this.afterMatch(z),d&&p===h&&p.parent===h.parent?(p.repaired=!0,delete p.endNeedsUpdate,h=this.getNextExpected(h,"end")):d&&(this.prune(p,h),d=!1)):(p.setEnd(e),delete p.endNeedsUpdate)),p=p.parent;d&&(v>=c&&!r)&&(this.prune(f,n),d=!1)}this.removeUnrepairedChildren(f,d,b);this.cleanup(d,f,b,c,e,m,g);return d?Math.max(A,v):v},removeUnrepairedChildren:function(f,d,b){if(d){d=f.children;for(var h=-1,m=0;m=d)return h}else if(f instanceof this.BeginEndNode&&f.endMatch){var m=f.endMatch.index;for(b=0;b=d);b++);if(h&&h.startd&&"\r"===this._diffContents[n-1][this._diffContents[n-1].length-1]&&(this._diffContents[n-1]=this._diffContents[n-
-1].substring(0,this._diffContents[n-1].length-1));else{switch(c){case "-":case "+":case " ":break;default:continue}if(f!==c){"+"===c&&(p=n);"-"===c&&(e=n);switch(f){case " ":g=this._hunkRanges[h][1]+k;a=this._hunkRanges[h][3]+l;break;case "-":this._createMinusBlock(g,a,this._hunkRanges[h][1]+k-g,e);break;case "+":this._createPlusBlock(g,a,this._hunkRanges[h][3]+l-a,p)}f=c}switch(c){case "-":k++;break;case "+":l++;break;case " ":k++,l++}}}switch(f){case "-":this._createMinusBlock(g,a,this._hunkRanges[h][1]+
-k-g,e);break;case "+":this._createPlusBlock(g,a,this._hunkRanges[h][3]+l-a,p)}},_detectConflictes:function(h,f){if(0>h)return!1;for(var d=h+f,b=h;b=b){c=!0;break}}c||a.setCaretOffset(b);this.commandRegistry.destroy(this._editorContextMenuNode);this.commandRegistry.renderCommands("editorContextMenuActions",this._editorContextMenuNode,null,this,"menu");H.logEvent("contextMenu","opened","editor")}}.bind(this);a.addEventListener("triggered",b)}};p.EventTarget.addMixin(L.prototype);return{EditorView:L}});y("embeddedEditor/helper/editorSetup",
-"orion/editor/textModel orion/editor/undoStack orion/commandRegistry orion/inputManager orion/fileClient orion/contentTypes orion/editorView orion/editorCommands orion/objects".split(" "),function(l,r,p,h,f,d,b,k,m){function g(a){this._serviceRegistry=a.serviceRegistry;this._pluginRegistry=a.pluginRegistry;this._commandRegistry=new p.CommandRegistry({});this._fileClient=new f.FileClient(this._serviceRegistry);this._contentTypeRegistry=new d.ContentTypeRegistry(this._serviceRegistry);this._editorCommands=
-new k.EditorCommandFactory({serviceRegistry:this._serviceRegistry,commandRegistry:this._commandRegistry,fileClient:this._fileClient,toolbarId:"_orion_hidden_actions",navToolbarId:"_orion_hidden_actions"});this._progressService={progress:function(a,b,c){return a},showWhile:function(a,b,c){return a}};this._serviceRegistry.registerService("orion.page.progress",this._progressService)}var a=0;m.mixin(g.prototype,{destroy:function(){},createInputManager:function(){var a=this._inputManager=new h.InputManager({serviceRegistry:this._serviceRegistry,
-fileClient:this._fileClient,progressService:this._progressService,selection:this.selection,contentTypeRegistry:this._contentTypeRegistry});a.addEventListener("InputChanged",function(a){a.editor=this.editorView.editor;this.pageActionsScope="_orion_hidden_actions";this._commandRegistry.destroy(this.pageActionsScope);this._commandRegistry.renderCommands(this.pageActionsScope,this.pageActionsScope,a.metadata,a.editor,"tool")}.bind(this));a.addEventListener("InputChanging",function(a){a.editor=this.editorView.editor}.bind(this))},
-defaultOptions:function(b){var d=new l.TextModel,f=a.toString(),c=Object.create(null);c.openEditor=function(a,b){this.editorView.editor.setSelection(b.start,b.end)}.bind(this);return{activateContext:c,id:f,parent:b,model:d,undoStack:new r.UndoStack(d,500),serviceRegistry:this._serviceRegistry,pluginRegistry:this._pluginRegistry,commandRegistry:this._commandRegistry,contentTypeRegistry:this._contentTypeRegistry,editorCommands:this._editorCommands,progressService:this._progressService,inputManager:this._inputManager,
-fileService:this._fileClient,problemsServiceID:"orion.core.marker"+f,editContextServiceID:"orion.edit.context"+f,editModelContextServiceID:"orion.edit.model.context"+f,readonly:!1}},createEditor:function(d){return this._editorCommands.createCommands().then(function(){this._editorCommands.registerCommands();this.createInputManager();this.editorView=new b.EditorView(this.defaultOptions(d.parent));a++;this.editorView.create();this._inputManager.editor=this.editorView.editor;this._inputManager.setAutoSaveTimeout(300);
-this._editorCommands.inputManager=this._inputManager;d.contentType&&d.contents&&this.editorView.setContents(d.contents,d.contentType);return this.editorView}.bind(this))}});return{EditorSetupHelper:g}});y("embeddedEditor/builder/embeddedEditor",["embeddedEditor/helper/bootstrap","embeddedEditor/helper/editorSetup","orion/objects"],function(l,r,p){function h(){}p.mixin(h.prototype,{create:function(f){return l.startup(f).then(function(d){return(new r.EditorSetupHelper({serviceRegistry:d.serviceRegistry,
-pluginRegistry:d.pluginRegistry})).createEditor(f)})}});return h});return O("embeddedEditor/builder/embeddedEditor")});
\ No newline at end of file
diff --git a/editorBuild/javascript/plugins/javascriptPlugin.js b/editorBuild/javascript/plugins/javascriptPlugin.js
index 896efc0..0bfee70 100644
--- a/editorBuild/javascript/plugins/javascriptPlugin.js
+++ b/editorBuild/javascript/plugins/javascriptPlugin.js
@@ -1,1007 +1,9 @@
-/*
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2012, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: 
-  Felipe Heidrich (IBM Corporation) - initial API and implementation
-  Silenio Quarti (IBM Corporation) - initial API and implementation
- 2014 Elan Shanker. All rights reserved.
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2010, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation, Inc. and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-   IBM Corporation - Various improvements
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
- 2014 Nicholas C. Zakas. All rights reserved.
- @copyright 2014 Brandon Mills. All rights reserved.
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
- RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
- Available via the MIT or new BSD license.
- see: http://github.com/requirejs/i18n for details
-
- Copyright (c) 2010, 2012 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2011, 2013 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2013, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-  IBM Corporation - initial API and implementation
-*/
-(function(ha,u){"function"===typeof define&&define.amd?define([],u):(ha.orion=ha.orion||{},ha.orion.webtools=ha.orion.webtools||{},ha.orion.webtools.javascript=u())})(this,function(){var ha,u;(function(d){function k(a,c){var e,f,b,l,h,g,n,p,d,v=c&&c.split("/"),t=x.map,k=t&&t["*"]||{};if(a&&"."===a.charAt(0))if(c){v=v.slice(0,v.length-1);a=v.concat(a.split("/"));for(p=0;pa-w||(w=a,g({method:"loading"}),"undefined"!==typeof localStorage&&localStorage.pluginLogging&&console.log("heartbeat("+((new Date).getTime()-z)+
-"ms)\x3d"+self.location))}function f(){var a=[];Object.keys(Z).forEach(function(c){var e=Z[c];a.push({serviceId:c,names:e.names,methods:e.methods,properties:e.properties})});return{headers:n||{},services:a}}function h(a,c){if(c&&c instanceof XMLHttpRequest){var e,b;try{e=c.status,b=c.statusText}catch(f){e=0,b=""}return{status:e||0,statusText:b}}return c}function a(a){var c=a?JSON.parse(JSON.stringify(a,h)):a;a instanceof Error&&(c.__isError=!0,c.message=c.message||a.message,c.name=c.name||a.name);
-return c}function e(a,c){c=c||ea;if(!c)return(new d).reject(Error("plugin not connected"));a.id=String(x++);var e=new d;C[a.id]=e;e.then(null,function(e){B&&(e instanceof Error&&"Cancel"===e.name)&&L({requestId:a.id,method:"cancel",params:e.message?[e.message]:[]},c)});var b=Object.prototype.toString;a.params.forEach(function(c,f){if("[object Object]"===b.call(c)&&!(c instanceof k)){var h,l;for(h in c)"[object Function]"===b.call(c[h])&&(l=l||[],l.push(h));if(l){var g=G++;Q[g]=c;h=function(){delete Q[g]};
-e.then(h,h);a.params[f]=new k(g,l)}}});L(a,c);return e.promise}function l(a,c,e){a||0===a?L({id:a,result:null,error:c},e):console.log(c)}function c(c,b,f,h,l){h.forEach(function(a,c){if(a&&"undefined"!==typeof a.__objectId){var b={};a.__methods.forEach(function(c){b[c]=function(){return e({objectId:a.__objectId,method:c,params:Array.prototype.slice.call(arguments)},l)}});h[c]=b}});var g="undefined"===typeof c?null:{id:c,result:null,error:null};try{var d=f.apply(b,h);g&&(d&&"function"===typeof d.then?
-(t[c]=d,d.then(function(a){delete t[c];g.result=a;L(g,l)},function(e){t[c]&&(delete t[c],g.error=a(e),L(g,l))},function(){L({responseId:c,method:"progress",params:Array.prototype.slice.call(arguments)},l)})):(g.result=d,L(g,l)))}catch(p){g&&(g.error=a(p),L(g,l))}}function p(a,e){if(V||!(a.source!==ea&&"undefined"!==typeof window)){var b=a.data,b="string"!==typeof b?b:JSON.parse(b);try{if(b.method){var f=b.method,h=b.params||[];if("serviceId"in b){var g=Z[b.serviceId];g||l(b.id,"service not found",
-e);g=g.implementation;f in g?c(b.id,g,g[f],h,e):l(b.id,"method not found",e)}else if("objectId"in b){var d=Q[b.objectId];d||l(b.id,"object not found",e);!f in d?c(b.id,d,d[f],h,e):l(b.id,"method not found",e)}else if("requestId"in b){var p=t[b.requestId];p&&("cancel"===f&&p.cancel)&&p.cancel.apply(p,h)}else if("responseId"in b){var n=C[b.responseId];n&&("progress"===f&&n.progress)&&n.progress.apply(n,h)}else throw Error("Bad method: "+b.method);}else{var z=C[String(b.id)];delete C[String(b.id)];b.error?
-z.reject(b.error):z.resolve(b.result)}}catch(v){console.log("Plugin._messageHandler "+v)}}}var n=m,B=!1,x=0,G=0,v=0,t={},C={},Q={},Z={},ba=[],V=!1,ea=null;"undefined"===typeof window?self.postMessage?ea=self:V=!0:window!==window.parent?ea=window.parent:null!==window.opener&&(ea=window.opener);var L=g,w,z=(new Date).getTime();b();V&&self.addEventListener("connect",function(a){var c=a.ports[0];ba.push(c);B?(a={method:"plugin",params:[f()]},g(a,c)):b();c.addEventListener("message",function(a){p(a,c)});
-c.start()});this.updateHeaders=function(a){if(B)throw Error("Cannot update headers. Plugin Provider is connected");n=a};this.registerServiceProvider=this.registerService=function(a,c,e){if(B)throw Error("Cannot register service. Plugin Provider is connected");"string"===typeof a?a=[a]:Array.isArray(a)||(a=[]);var f=null,h=[];for(f in c)"function"===typeof c[f]&&h.push(f);Z[v++]={names:a,methods:h,implementation:c,properties:e||{},listeners:{}};b()};this.connect=function(a,c){if(!B){var e={method:"plugin",
-params:[f()]};if(!V){if(!ea){c&&c("No valid plugin target");return}addEventListener("message",p,!1);g(e)}ba.forEach(function(a){g(e,a)});B=!0}a&&a()};this.disconnect=function(){B&&(removeEventListener("message",p),ba.forEach(function(a){a.close()}),ea=ba=null,B=!1)}}});u("orion/EventTarget",[],function(){function d(){this._namedListeners={}}d.prototype={dispatchEvent:function(d){if(!d.type)throw Error("unspecified type");var m=this._namedListeners[d.type];m&&m.forEach(function(g){try{"function"===
-typeof g?g(d):g.handleEvent(d)}catch(b){"undefined"!==typeof console&&console.log(b)}});return!d.defaultPrevented},addEventListener:function(d,m){if("function"===typeof m||m.handleEvent)this._namedListeners[d]=this._namedListeners[d]||[],this._namedListeners[d].push(m)},removeEventListener:function(d,m){var g=this._namedListeners[d];if(g)for(var b=0;b=a}function g(a){return 0<="0123456789abcdefABCDEF".indexOf(a)}function b(a){return 0<="01234567".indexOf(a)}function f(a){return 10===a||13===a||8232===a||8233===a}function h(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=
-a||92===a||128<=a&&Ha.NonAsciiIdentifierStart.test(String.fromCharCode(a))}function a(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a||92===a||128<=a&&Ha.NonAsciiIdentifierPart.test(String.fromCharCode(a))}function e(a){switch(a){case "implements":case "interface":case "package":case "private":case "protected":case "public":case "static":case "yield":case "let":return!0;default:return!1}}function l(a){return"eval"===a||"arguments"===a}function c(a){if(X&&e(a))return!0;switch(a.length){case 2:return"if"===
-a||"in"===a||"do"===a;case 3:return"var"===a||"for"===a||"new"===a||"try"===a||"let"===a;case 4:return"this"===a||"else"===a||"case"===a||"void"===a||"with"===a||"enum"===a;case 5:return"while"===a||"break"===a||"catch"===a||"throw"===a||"const"===a||"yield"===a||"class"===a||"super"===a;case 6:return"return"===a||"typeof"===a||"delete"===a||"switch"===a||"export"===a||"import"===a;case 7:return"default"===a||"finally"===a||"extends"===a;case 8:return"function"===a||"continue"===a||"debugger"===a;
-case 10:return"instanceof"===a;default:return!1}}function p(a,c,b,e,f){k("number"===typeof b,"Comment must have valid position");M.lastCommentStart=b;a={type:a,value:c};r.range&&(a.range=[b,e]);r.loc&&(a.loc=f);r.comments.push(a);r.attachComment&&(r.leadingComments.push(a),r.trailingComments.push(a))}function n(a){var c,b,e;c=q-a;for(b={start:{line:T,column:q-W-a}};q=Y&&r.comments?(b.end={line:T,column:q-W},e=A.slice(a+2,q),p("Block",e,a,q,b),H()):O()}}else break;else if(c&&45===a)if(45===A.charCodeAt(q+1)&&62===A.charCodeAt(q+2))q+=3,n(3);else break;else if(60===
-a)if("!--"===A.slice(q+1,q+4))++q,++q,++q,++q,n(4);else break;else break}function x(a){var c,b,e=0;c="u"===a?4:2;for(a=0;a=parseInt(c,16))return"x";O(null,K.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{RegExp(b)}catch(e){O(null,K.InvalidRegExp)}try{return RegExp(a,c)}catch(f){return null}}function Q(){var c,
-b,e,l;qa=!0;var g,h;B();g=q;e=A[q];k("/"===e,"Regular expression literal must start with a slash");l=A[q++];for(c=b=!1;q=Y)return{type:F.EOF,lineNumber:T,lineStart:W,start:q,end:q,range:[q,q]};e=A.charCodeAt(q);if(h(e)){var l;e=q;if(92===A.charCodeAt(q))l=G();else a:{var d;for(l=q++;q=n?n=String.fromCharCode(n):(z=(n-65536>>10)+55296,n=String.fromCharCode(z,(n-65536&1023)+56320));p+=n}else Q=q,(z=x(n))?p+=z:(q=Q,p+=n);break;case "n":p+="\n";break;case "r":p+="\r";break;case "t":p+="\t";break;case "b":p+="\b";break;case "f":p+="\f";break;case "v":p+="\x0B";break;default:b(n)?(z="01234567".indexOf(n),0!==z&&(d=!0),q<
-Y&&b(A[q])&&(d=!0,z=8*z+"01234567".indexOf(A[q++]),0<="0123".indexOf(n)&&(q=this.range[1]&&(b.unshift(l),r.trailingComments.splice(f,1));r.trailingComments=[]}else g&&(g.trailingComments&&g.trailingComments[0].range[0]>=this.range[1])&&(b=g.trailingComments,delete g.trailingComments);if(g)for(;g&&g.range[0]>=
-this.range[0];)a=g,g=e.pop();if(a)a.leadingComments&&a.leadingComments[a.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=a.leadingComments,a.leadingComments=void 0);else if(0>>1,l=f+b,c(a[l])?e=b:(f=l+1,e-=b+1);return f}function g(a,c){G(c).forEach(function(b){a[b]=c[b]});return a}function b(a,c){this.parent=a;this.key=c}function f(a,c,b,e){this.node=a;this.path=c;this.wrap=b;this.ref=e}function h(){}function a(a){return null==a?!1:"object"===typeof a&&
-"string"===typeof a.type}function e(a,c){return(new h).traverse(a,c)}function l(a,c){var b;b=m(c,function(c){return c.range[0]>a.range[0]});a.extendedRange=[a.range[0],a.range[1]];b!==c.length&&(a.extendedRange[1]=c[b].range[0]);b-=1;0<=b&&(a.extendedRange[0]=c[b].range[1]);return a}var c,p,n,B,x,G,v,t,C;(p=Array.isArray)||(p=function(a){return"[object Array]"===Object.prototype.toString.call(a)});x=Object.create||function(){function a(){}return function(c){a.prototype=c;return new a}}();G=Object.keys||
-function(a){var c=[],b;for(b in a)c.push(b);return c};c={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",
-ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportBatchSpecifier:"ExportBatchSpecifier",ExportDeclaration:"ExportDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",
-FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",
-ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",
-TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"};B={AssignmentExpression:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left",
-"right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration",
-"specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["id"],
-ImportNamespaceSpecifier:["id"],ImportSpecifier:["id","name"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],
-SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]};v={};t={};C={};n={Break:v,
-Skip:t,Remove:C};b.prototype.replace=function(a){this.parent[this.key]=a};b.prototype.remove=function(){if(p(this.parent))return this.parent.splice(this.key,1),!0;this.replace(null);return!1};h.prototype.path=function(){function a(c,b){if(p(b)){e=0;for(f=b.length;ea.range[0])break;c.extendedRange[1]===a.range[0]?(a.leadingComments||(a.leadingComments=[]),a.leadingComments.push(c),f.splice(d,1)):d+=1}if(d===
-f.length)return n.Break;if(f[d].extendedRange[0]>a.range[1])return n.Skip}});d=0;e(a,{leave:function(a){for(var c;da.range[1])return n.Skip}});return a};d.VisitorKeys=B;d.VisitorOption=n;d.Controller=h});u("orion/objects",[],function(){function d(d){for(var m=Object.prototype.hasOwnProperty,
-g=1,b=arguments.length;gthis._max&&this.remove(this._end._v.key);this.remove(g);var f=k(g,b);this._start?(f=k(g,b),f._n=this._start,this._start=this._start._p=f):this._start=this._end=f;this._cache[g]=f;this._size++},
-get:function(g){return 0C.length)a=[a+1,p].concat(C),Array.prototype.splice.apply(this._lineOffsets,
-a);else{t=a+1;this._lineOffsets.splice(t,p);for(m=0;mthis.context.start||b.range[1]=this.context.end)return this.occurrences=[],
-this.defscope=g,g.occurrences.push({start:b.range[0],end:b.range[1]}),!1;g.occurrences=[];this.skipScope=g;return!0}if(g.range[0]<=this.context.start&&g.range[1]>=this.context.end)this.defscope=g;else return g.occurrences=[],this.skipScope=g,!0}g.occurrences.push({start:b.range[0],end:b.range[1]})}return!1}});g.prototype.constructor=g;return{visitor:null,punc:"\n\t\r (){}[]:;,.+\x3d-*^\x26@!%~`'\"/\\",findWord:function(b,f){if(b&&f){for(var g=-1=a.range[1]&&e.pop()}});a&&(e&&0=e.range[0]&&b=e.range[0])return e.index=a,e;for(;g<=a;){d=Math.floor((g+a)/2);e=f[d];if(be.range[1])g=
-d+1;else if(b===e.range[1])if(f[d+1].range[0]===e.range[1])g=d+1;else return e.index=d,e;else if(b>=e.range[0]&&b=e.range[0]&&b<=e.range[1])return e.index=g,e;break}}}return null},findComment:function(b,f){if(f.comments){for(var g=f.comments,a=g.length,e=0;e=b||b===f.range[1]&&b===d.range[1]||b>f.range[1]&&b<=d.range[1])return d;if(d.range[0]>b)break}return null}},findScriptBlocks:function(b,f){var g=
-[],a=null,e=/<\s*script(?:(type|language)(?:\s*)=(?:\s*)"([^"]*)"|[^>]|\n)*>((?:.|\r?\n)*?)<\s*\/script(?:[^>]|\n)*>/ig,d=this.findHtmlCommentBlocks(b,f);a:for(;null!=(a=e.exec(b));){var c=a[1],p=a[2];if(c&&p&&("language"===c&&(p="text/"+p),!/^(application|text)\/(ecmascript|javascript(\d.\d)?|livescript|jscript|x\-ecmascript|x\-javascript)$/ig.test(p)))continue;c=a[3];if(!(1>c.length)&&(a=a.index+a[0].indexOf("\x3e")+1,null==f||a<=f&&a+c.length>=f)){for(p=0;p=
-a)continue a;g.push({text:c,offset:a})}}return g},findHtmlCommentBlocks:function(b,f){for(var g=[],a=null,e=/\x3c!--((?:.|\r?\n)*?)--\x3e/ig;null!=(a=e.exec(b));){var d=a[1];1>d.length||(null==f||a.index<=f&&a.index+d.length>=a.index)&&g.push({text:d,start:a.index,end:a.index+d.length})}return g},findOccurrences:function(b,f){if(b&&f){var g=this._getToken(f.selection.start,b);if(g){var a=this.findNode(f.selection.start,b,{parents:!0});if(!this._skip(a)&&g.range[0]>=a.range[0]&&g.range[1]<=a.range[1])return g=
-{start:f.selection.start,end:f.selection.end,word:this._nameFromNode(a),token:a},g=this._getVisitor(g),d.traverse(b,g),g.occurrences}}return[]},_skip:function(b){return!b?!0:b.type===d.Syntax.ThisExpression?!1:b.type!==d.Syntax.Identifier},_getToken:function(b,g){if(g.tokens&&0=f.property.range[0]&&b.end<=f.property.range[1])&&(this.visitor.objectPropCheck=!0):f&&(f.type===d.Syntax.FunctionExpression&&1this._blocks.length||0>g)return!1;for(var b=0;b=d&&g<=d+f.text.length)return!0}return!1},
-getEditorContext:function(){var g=Object.create(null),b=this;g.getText=function(){return(new k).resolve(b.getSource())};g.getFileMetadata=function(){return(new k).resolve(b._metadata)};g.setText=function(g,d,a){return b._ec?b._ec.setText(g,d,a):(new k).resolve(null)};return g},getDependencies:function(){return this._deps}});return m});u("javascript/quickFixes","orion/objects orion/Deferred orion/editor/textModel javascript/finder javascript/compilationUnit orion/metrics".split(" "),function(d,k,m,
-g,b,f){function h(a){this.astManager=a}function a(a,c){if(!a||0>c)return 0;for(var b=c,e=a[b];-1c)return"";var e=a[c];for(b=b?"\t":"";" "===e||"\t"===e;)b+=e,e=a[++c];return b}function l(a,c,b){if(!a||!c)return"";for(var e=c.start,g=a[e],f="",d=!1;e>=c.start&&e<=c.end;){if("\n"===g){d=!0;break}g=a[e++]}d||(f+="\n");"undefined"!==typeof b&&(f+=b);return f}function c(a,c){return"*"===a.charAt(c+1)?"*"===a.charAt(c+2)?3:2:0}function p(a,
-c,b,e){return e?""!==a.slice(c.length).trim()?a.trim()+", "+b:a.trim()+" "+b:a.trim()+" "+b}function n(a,c,b){if(!(0>c||c>a.length)){var e=a[c];return 1===a.length?b.setText("",e.range[0],e.range[1]):c===a.length-1?b.setText("",a[c-1].range[1],e.range[1]):b.setText("",e.range[0],a[c+1].range[0])}}function B(a,b,e,g){if(a.leadingComments&&0e)b=0;
-else{for(var g=b[e];ec.name?1:0}),f.splice(0,0,{proposal:"",description:"Templates",style:"noemphasis_title",unselectable:!0}));return f},removePrefix:function(d,g){if(!(g.overwrite=
-g.proposal.substring(0,d.length)!==d))g.proposal=g.proposal.substring(d.length)},isValid:function(d,g,b,f){return!0}};return{Template:d,TemplateContentAssist:k}});u("javascript/contentAssist/templates",["orion/editor/templates"],function(d){function k(g){if(g.t)return g.t;var b=new d.Template(g.prefix,g.description,g.template,g.name);return g.t=b}var m=[{prefix:"eslint",name:"eslint",nodes:{top:!1,member:!1,prop:!1,doc:!0},description:" - ESLint rule enable or disable",template:"eslint ${rule-id}:${0/1} ${cursor}"},
-{prefix:"eslint-env",name:"eslint-env",nodes:{top:!1,member:!1,prop:!1,doc:!0},description:" - ESLint environment directive",template:"eslint-env ${library}"},{prefix:"eslint-enable",name:"eslint-enable",nodes:{top:!1,member:!1,prop:!1,doc:!0},description:" - ESLint rule enablement directive",template:"eslint-enable ${rule-id} ${cursor}"},{prefix:"eslint-disable",name:"eslint-disable",nodes:{top:!1,member:!1,prop:!1,doc:!0},description:" - ESLint rule disablement directive",template:"eslint-disable ${rule-id} ${cursor}"},
-{prefix:"@author",name:"@author",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Author JSDoc tag",template:"@author ${cursor}"},{prefix:"@callback",name:"@callback",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Callback JSDoc tag",template:"@callback ${cursor}"},{prefix:"@class",name:"@class",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Class JSDoc tag",template:"@class ${cursor}"},{prefix:"@constructor",name:"@constructor",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},
-description:" - Constructor JSDoc tag",template:"@constructor ${cursor}"},{prefix:"@deprecated",name:"@deprecated",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Deprecated JSDoc tag",template:"@deprecated ${cursor}"},{prefix:"@description",name:"@description",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Description JSDoc tag",template:"@description ${cursor}"},{prefix:"@function",name:"@function",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Function JSDoc tag",
-template:"@function ${cursor}"},{prefix:"@lends",name:"@lends",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Lends JSDoc tag",template:"@lends ${cursor}"},{prefix:"@license",name:"@license",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - License JSDoc tag",template:"@license ${cursor}"},{prefix:"@name",name:"@name",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Name JSDoc tag",template:"@name ${cursor}"},{prefix:"@param",name:"@param",nodes:{top:!1,member:!1,prop:!1,
-jsdoc:!0},description:" - Param JSDoc tag",template:"@param {${type}} ${cursor}"},{prefix:"@private",name:"@private",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Private JSDoc tag",template:"@private ${cursor}"},{prefix:"@public",name:"@public",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Public JSDoc tag",template:"@public ${cursor}"},{prefix:"@returns",name:"@returns",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Returns JSDoc tag",template:"@returns {${type}} ${cursor}"},
-{prefix:"@see",name:"@see",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - See JSDoc tag",template:"@see ${cursor}"},{prefix:"@since",name:"@since",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Since JSDoc tag",template:"@since ${cursor}"},{prefix:"@throws",name:"@throws",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Throws JSDoc tag",template:"@throws {${type}} ${cursor}"},{prefix:"if",name:"if",nodes:{top:!0,member:!1,prop:!1},description:" - if statement",template:"if (${condition}) {\n\t${cursor}\n}"},
-{prefix:"if",name:"if",nodes:{top:!0,member:!1,prop:!1},description:" - if else statement",template:"if (${condition}) {\n\t${cursor}\n} else {\n\t\n}"},{prefix:"for",name:"for",nodes:{top:!0,member:!1,prop:!1},description:" - iterate over array",template:"for (var ${i}\x3d0; ${i}\x3c${array}.length; ${i}++) {\n\t${cursor}\n}"},{prefix:"for",name:"for",nodes:{top:!0,member:!1,prop:!1},description:" - iterate over array with local var",template:"for (var ${i}\x3d0; ${i}\x3c${array}.length; ${i}++) {\n\tvar ${value} \x3d ${array}[${i}];\n\t${cursor}\n}"},
-{prefix:"for",name:"for..in",nodes:{top:!0,member:!1,prop:!1},description:" - iterate over properties of an object",template:"for (var ${property} in ${object}) {\n\tif (${object}.hasOwnProperty(${property})) {\n\t\t${cursor}\n\t}\n}"},{prefix:"while",name:"while",nodes:{top:!0,member:!1,prop:!1},description:" - while loop with condition",template:"while (${condition}) {\n\t${cursor}\n}"},{prefix:"do",name:"do",nodes:{top:!0,member:!1,prop:!1},description:" - do while loop with condition",template:"do {\n\t${cursor}\n} while (${condition});"},
-{prefix:"eslint",name:"eslint",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - ESLint rule enable / disable directive",template:"/* eslint ${rule-id}:${0/1}*/"},{prefix:"eslint-env",name:"eslint-env",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - ESLint environment directive",template:"/* eslint-env ${library}*/"},{prefix:"eslint-enable",name:"eslint-enable",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - ESLint rule enablement directive",template:"/* eslint-enable ${rule-id} */"},
-{prefix:"eslint-disable",name:"eslint-disable",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - ESLint rule disablement directive",template:"/* eslint-disable ${rule-id} */"},{prefix:"switch",name:"switch",nodes:{top:!0,member:!1,prop:!1},description:" - switch case statement",template:"switch (${expression}) {\n\tcase ${value1}:\n\t\t${cursor}\n\t\tbreak;\n\tdefault:\n}"},{prefix:"case",name:"case",nodes:{top:!0,member:!1,prop:!1,swtch:!0},description:" - case statement",template:"case ${value}:\n\t${cursor}\n\tbreak;"},
-{prefix:"try",name:"try",nodes:{top:!0,member:!1,prop:!1},description:" - try..catch statement",template:"try {\n\t${cursor}\n} catch (${err}) {\n}"},{prefix:"try",name:"try",nodes:{top:!0,member:!1,prop:!1},description:" - try..catch statement with finally block",template:"try {\n\t${cursor}\n} catch (${err}) {\n} \n finally {\n}"},{prefix:"typeof",name:"typeof",nodes:{top:!0,member:!1,prop:!1},description:" - typeof statement",template:'typeof ${object} \x3d\x3d\x3d "${type:'+JSON.stringify({type:"link",
-values:"boolean function number object string symbol undefined".split(" "),title:"Typeof Options",style:"emphasis"}).replace("}","\\}")+'}"'},{prefix:"instanceof",name:"instanceof",nodes:{top:!0,member:!1,prop:!1},description:" - instanceof statement",template:"${object} instanceof ${type}"},{prefix:"with",name:"with",nodes:{top:!0,member:!1,prop:!1},description:" - with statement",template:"with (${object}) {\n\t${cursor}\n}"},{prefix:"function",name:"function",nodes:{top:!0,member:!1,prop:!1},description:" - function declaration",
-template:"/**\n * @name ${name}\n * @param ${parameter}\n */\nfunction ${name} (${parameter}) {\n\t${cursor}\n}"},{prefix:"function",name:"function",nodes:{top:!1,member:!1,prop:!1,obj:!0},description:" - member function expression",template:"/**\n * @name ${name}\n * @function\n * @param ${parameter}\n */\n${name}: function(${parameter}) {\n\t${cursor}\n}"},{prefix:"function",name:"function",nodes:{top:!1,member:!1,prop:!0,obj:!1},description:" - member function expression",template:"function(${parameter}) {\n\t${cursor}\n}"},
-{prefix:"define",name:"define",nodes:{top:!0,member:!1,prop:!1},description:" - define function call",template:"/* eslint-env amd */\ndefine('${name}', [\n'${import}'\n], function(${importname}) {\n\t${cursor}\n});"},{prefix:"nls",name:"nls",nodes:{top:!0,member:!1,prop:!1},description:" - non NLS string",template:"${cursor} //$NON-NLS-${0}$"},{prefix:"log",name:"log",nodes:{top:!0,member:!1,prop:!1},description:" - console log",template:"console.log(${object});"},{prefix:"node",name:"node",nodes:{top:!0,
-member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - Node require function call",template:"/* eslint-env node*/\nvar lib \x3d require('${cursor}');"}];return{getTemplatesForKind:function(g){for(var b=[],f=m.length,d=0;d=a||"A"<=a&&"Z">=a||128<=a.charCodeAt(0)&&t.NonAsciiIdentifierStart.test(a)}function a(a){return-1==="\x3e\x3c(){}[],:*|?!\x3d".indexOf(a)&&
-!g(a)&&!m(a)}function e(a){return"param"===a||"argument"===a||"arg"===a}function l(a){return"property"===a||"prop"===a}function c(a){return e(a)||l(a)||"extends"===a||"augments"===a||"alias"===a||"this"===a||"mixes"===a||"requires"===a}function p(a){return e(a)||"define"===a||"enum"===a||"implements"===a||"return"===a||"this"===a||"type"===a||"typedef"===a||"returns"===a||l(a)}function n(a){this.name="DoctrineError";this.message=a}function B(a){throw new n(a);}function x(a,c){}function G(a){return a.replace(/^\s+/,
-"").replace(/\s+$/,"")}function v(a){var c,b,e,f,d;a=a.replace(/^\/\*\*?/,"").replace(/\*\/$/,"");c=0;b=a.length;e=0;for(f="";c=a.length&&B("unexpected token");y=R)return D=s.EOF;c=U[y];switch(c){case '"':c="";var e,n,h,k;e=U[y];for(++y;y=P[I]||"A"<=P[I]&&"Z">=P[I]||"0"<=P[I]&&"9">=P[I]||128<=P[I].charCodeAt(0)&&t.NonAsciiIdentifierPart.test(P[I]));)c+=
-b();return c}}function n(a,c,e){for(var d="",l;I=a)&&(c&&"["===P[I]&&(l=!0,d=b()),h(P[I]))){d+=f(a);if(e)for(;"."===P[I];)d+=".",I+=1,d+=f(a);if(l){if("\x3d"===P[I])for(d+=b();I=a||"]"!==P[I])return;d+=b()}return d}}function ia(a,c){this._options=a;this._title=c;this._tag={title:c,description:null};this._options.lineNumbers&&(this._tag.lineNumber=E);this._last=0;this._extra={}}var za,I,E,u,P,Z,S,da;ia.prototype.addError=function(a){var c=
-Array.prototype.slice.call(arguments,1),b=a.replace(/%(\d)/g,function(a,b){x(b=u?n=!1:(x("@"===P[I]),n=!0);if(n){n="";for(b();I=P[I]||"A"<=P[I]&&
-"Z">=P[I]||"0"<=P[I]&&"9">=P[I]);)n+=b();n=new ia(d,n);d=n.parse()}else d=void 0;if(!d)break;(!l||l.hasOwnProperty(d.title))&&e.push(d)}return{description:f,tags:e}}})(u={});d.version="0.5.1";d.parse=u.parse;d.parseType=Q.parseType;d.parseParamType=Q.parseParamType;d.unwrapComment=v;d.Syntax=function(a){var c={},b;for(b in a)a.hasOwnProperty(b)&&(c[b]=a[b]);return c}(Q.Syntax);d.Error=n;d.type={Syntax:d.Syntax,parseType:Q.parseType,parseParamType:Q.parseParamType,stringify:Q.stringify}})("undefined"===
-typeof exports?doctrine={}:exports);u("doctrine",function(){});u("javascript/hover","orion/objects javascript/finder orion/URITemplate orion/Deferred i18n!javascript/nls/messages orion/i18nUtil doctrine".split(" "),function(d,k,m,g,b,f){function h(c,e){if(!c)return null;try{var d=Object.create(null);if(c){var g=doctrine.parse(c,{recoverable:!0,unwrap:!0});d.params=[];d.throws=[];d.see=[];d.desc=g.description?g.description:"";if(g.tags)for(var l=g.tags.length,h=0;h=d.range[1])return null;a=d.parents;b=a.pop();var f=this;if("ArrayExpression"===b.type){if(b=a.pop(),"CallExpression"===b.type&&("define"===b.callee.name||"require"===b.callee.name)){var h=d.value;return f.resolver.getWorkspaceFile(h).then(function(a){return f._formatFilesHover(h,a)})}}else if("CallExpression"===b.type)switch(h=d.value,b.callee.name){case "require":if(a=
-h.charAt(0),"."!==a&&"/"!==a)return f.resolver.getWorkspaceFile(h).then(function(a){return f._formatFilesHover(h,a)});case "importScripts":return h=d.value,f.resolver.getWorkspaceFile(h).then(function(a){/\.js$/.test(h)||(h+=".js");if((a=f.resolver.resolveRelativeFiles(h,a,e))&&0f.leading.length&&1>f.trailing.length&&(f=a.getComments(c.key)),!b(f))){switch(c.key.type){case "Identifier":l=c.key.name;break;case "Literal":l=c.key.value}a.report(c.key,g["missing-doc"],{0:l},{type:"expr"})}break;case "FunctionDeclaration":f=a.getComments(c);1>f.leading.length&&1>f.trailing.length&&(f=a.getComments(c.id));b(f)||a.report(c.id,g["missing-doc"],{0:c.id.name},{type:"decl"});break;case "ExpressionStatement":if(c.expression&&"AssignmentExpression"===c.expression.type){var h=
-c.expression;h.right&&("FunctionExpression"===h.right.type&&h.left&&"MemberExpression"===h.left.type)&&(f=a.getComments(c),1>f.leading.length&&1>f.trailing.length&&(f=a.getComments(h.left)),b(f)||(l=!0===h.left.computed?h.left.property.value:h.left.property.name,a.report(h.left.property,g["missing-doc"],{0:l},{type:"expr"})))}}}catch(m){k.log(m)}}return{Property:d,FunctionDeclaration:d,ExpressionStatement:d}}},"new-parens":{description:g["new-parens-description"],url:"http://eslint.org/docs/rules/new-parens",
-rule:function(a){return{NewExpression:function(b){try{if(b.callee){var d=a.getTokens(b.callee,0,1);if(d&&0c.test.range[1])return b.VisitorOption.Break;var d;a:switch(a.type){case "FunctionExpression":case "ObjectExpression":case "CallExpression":case "ArrayExpression":d=!0;break a;default:d=!1}if(d)return b.VisitorOption.Skip;e&&(a.parent=e);a&&"AssignmentExpression"===a.type&&f.push(a)}});var l=
-f.length;if(0d.body.length){for(var c=0;c<
-b.length;c++){var f=b[c].range;if(f[0]>=d.range[0]&&f[1]<=d.range[1])return}a.report(d,g["no-empty-block"])}}catch(h){k.log(h)}}}}},"no-eval":{description:g["no-eval-description"],url:"http://eslint.org/docs/rules/no-eval",rule:function(a){return{CallExpression:function(b){try{var d=b.callee.name;d&&"eval"===d&&a.report(b.callee,g["no-eval"],{0:"'eval'"},a.getTokens(b.callee)[0])}catch(c){k.log(c)}}}}},"no-extra-semi":{description:g["no-extra-semi-description"],url:"http://eslint.org/docs/rules/no-extra-semi",
-rule:function(a){return{EmptyStatement:function(b){try{var d=a.getTokens(b),c=d[d.length-1];c&&("Punctuator"===c.type&&";"===c.value)&&a.report(b,g["no-extra-semi"],null,c)}catch(f){k.log(f)}}}}},"no-fallthrough":{description:g["no-fallthrough-description"],url:"http://eslint.org/docs/rules/no-fallthrough",rule:function(a){function b(a){if(a.consequent){a=a.consequent;if(0a.length)return!1;for(var c=
-null,e=0;em.length)){var x=2+f.value.indexOf(m)+f.range[0];a.report({type:"BlockComment",range:[x,x+m.length],loc:f.loc},g["no-jslint"],{0:m})}}}}}catch(G){k.log(G)}}}}},"no-new-array":{description:g["no-new-array-description"],rule:function(a){return d.createNewBuiltinRule("Array",g["no-new-array"],a)}},"no-new-func":{description:g["no-new-func-description"],
-url:"http://eslint.org/docs/rules/no-new-func",rule:function(a){return d.createNewBuiltinRule("Function",g["no-new-func"],a)}},"no-new-object":{description:g["no-new-object-description"],url:"http://eslint.org/docs/rules/no-new-object",rule:function(a){return d.createNewBuiltinRule("Object",g["no-new-object"],a)}},"no-new-wrappers":{description:g["no-new-wrappers-description"],url:"http://eslint.org/docs/rules/no-new-wrappers",rule:function(a){return d.createNewBuiltinRule(["String","Number","Math",
-"Boolean","JSON"],function(a,b,c){a.report(b,g["no-new-wrappers"],[c])},a)}},"no-with":{description:g["no-with-description"],url:"http://eslint.org/docs/rules/no-with",rule:function(a){return{WithStatement:function(b){a.report(b,g["no-with"],null,a.getFirstToken(b))}}}},"missing-nls":{description:g["missing-nls-description"],rule:function(a){var b=Object.create(null);(function(a,c){for(var b=0;b<\[\]\+])$/.test(d.value)&&!/^(?:==|!=|===|!==|=>)$/.test(d.value)){if(d.parent)switch(d.parent.type){case "UnaryExpression":case "MemberExpression":case "SwitchCase":return;case "BinaryExpression":if("+"!==d.parent.operator)return;break;case "Property":if(d.parent.key===d)return;var c=d.parent.parent.parent;if(c&&"CallExpression"===c.type&&c.callee&&
-"define"===c.callee.name)return;break;case "NewExpression":case "CallExpression":if((c=d.parent.callee)&&("MemberExpression"===c.type&&c.property&&b[c.property.name]||b[c.name]))return;break;case "ArrayExpression":if(c=d.parent.parent,"CallExpression"===c.type&&("define"===c.callee.name||"require"===c.callee.name||"requirejs"===c.callee.name))return}c=d.loc.end.line-1;a._linesWithStringLiterals[c]||(a._linesWithStringLiterals[c]=[]);a._linesWithStringLiterals[c].push(d)}},Program:function(b){a._linesWithStringLiterals=
-{}},"Program:exit":function(b){if(a._linesWithStringLiterals)for(var c in a._linesWithStringLiterals)if(a._linesWithStringLiterals.hasOwnProperty(c)){var e=a.getSourceLines()[c];if(b=a._linesWithStringLiterals[c]){for(var d=/\/\/\$NON-NLS-([0-9])+\$/g,f,h=[];null!=(f=d.exec(e));)h.push(f[1]);for(e=0;eb.arguments.length){b=!1;for(var c=a.getScope();c&&!(b=c.variables.some(function(a){return"parseInt"===a.name&&a.defs.length}));c=c.upper);b||a.report(d,g.radix,null)}}}}},semi:{description:g["semi-description"],url:"http://eslint.org/docs/rules/semi",rule:function(a){function b(d){try{var c=a.getTokens(d),e=c[c.length-1];(!e||!("Punctuator"===e.type&&";"===e.value))&&a.report(d,g.semi,
-null,e)}catch(f){k.log(f)}}return{VariableDeclaration:function(d){try{var c=a.getAncestors(d),f=c[c.length-1],g=f.type;"ForStatement"===g&&f.init===d||"ForInStatement"===g&&f.left===d||b(d)}catch(h){k.log(h)}},ExpressionStatement:b,ReturnStatement:b,ThrowStatement:b,BreakStatement:b,ContinueStatement:b}}},"use-isnan":{description:g["use-isnan-description"],url:"http://eslint.org/docs/rules/use-isnan",rule:function(a){return{BinaryExpression:function(b){try{"Identifier"===b.left.type&&"NaN"===b.left.name?
-a.report(b.left,g["use-isnan"],null,b.left):"Identifier"===b.right.type&&"NaN"===b.right.name&&a.report(b.right,g["use-isnan"],null,b.right)}catch(d){k.log(d)}}}}},"valid-typeof":{description:g["valid-typeof-description"],url:"http://eslint.org/docs/rules/valid-typeof",rule:function(a){var b="undefined object function boolean number string symbol".split(" "),d=["\x3d\x3d","\x3d\x3d\x3d","!\x3d","!\x3d\x3d"];return{UnaryExpression:function(c){if("typeof"===c.operator){var f=c.parent;c=f.left===c?f.right:
-f.left;f&&("BinaryExpression"===f.type&&-1b.indexOf(c.value)))&&a.report(c,g["valid-typeof"])}}}}}};return{getRules:function(){return h},getESLintRules:function(){for(var a=Object.create(null),b=Object.keys(h),d=0;dk&&(k=0);if(d){var m=d.properties;if(m&&0k+1){f+="...";break}else f+=b,hk[0]&&(k[0]=1));return k}}});u("javascript/util",[],function(){function d(d){return 1>d.length||isNaN(d.charCodeAt(0))?!1:d.toLocaleUpperCase().charAt(0)===d.charAt(0)}function k(d,b){return d.slice(0,b.length)===b}function m(g){for(var b=[],f=g.length-1;0<=f;--f)d(g.charAt(f))&&(b.push(g.substring(f)),g=g.substring(0,f));0!==g.length&&b.push(g);
-return b.reverse()}return{isUpperCase:d,looselyMatches:function(d,b){if(null===b||null===d)return!1;if(0===d.length)return!0;if(d.charAt(0).toLowerCase()!==b.charAt(0).toLowerCase())return!1;if(k(b,d))return!0;var f=b.toLowerCase();if(k(f,d))return!0;if(d===d.toLowerCase())return!1;var f=m(d),h=m(b);if(f.length>h.length)return!1;for(var a=0;aa+2)return{kind:"jsdoc",node:d};if(b>a+1)return{kind:"doc",node:d}}default:return null}if((d=g.findNode(b,a,{parents:!0}))&&d.parents&&0=c.value.range[0]&&b-1<=c.value.range[1]?{kind:"prop"}:null;case "SwitchStatement":return{kind:"swtch"}}return{kind:"top"}}function v(a,b,f,h,k){var n=[];if(b&&"jsdoc"===b.kind)switch(h.charAt(a.offset>a.prefix.length?a.offset-a.prefix.length-1:0)){case "{":n=[];break;case ".":return[];case "*":case " ":if(b=g.findNode(b.node.range[1],f,{parents:!0,next:!0}))if(f="FunctionDeclaration"===
-b.type,h="ExpressionStatement"===b.type,f||"Property"===b.type&&"FunctionExpression"===b.value.type||h){if(h&&(b.expression&&"AssignmentExpression"===b.expression.type)&&(b=b.expression,"MemberExpression"!==b.left.type&&"FunctionExpression"!==b.right.type))break;if(null!==(k=/\s*\*\s*\@name\s*(\w*)/ig.exec(a.line)))k[1]===a.prefix&&(f=h?c.expandMemberExpression(b.left,""):f?b.id.name:b.key.name,n.push({proposal:f,relevance:100,name:f,description:d.funcProposalDescription,style:"emphasis",overwrite:!0}));
-else if(null!==(k=/\s*\*\s*\@param\s*(?:\{\w*\})?\s*(\w*)/ig.exec(a.line))&&k[1]===a.prefix)if(h=f?b.params:b.value.params)for(b=0;b\s*(\w*|\d*|(?:fn\(.*\))|(?:\[.*\]))$/.exec(h);l&&(e.description=" : "+Q(l[1]),h=h.slice(0,
-l.index));l=b.name+"(";if((h=h.slice(1,h.length-1))&&0m?(k.push(v),v="",w=!0):","===p?(t++,w=!1):!w&&1>m&&(v+=p),t++;h=k}else h=null;if(h)for(k=0;kh.indexOf("/"))||c[h]){var l=/([^/.]+\/[^\/]+)$/g.exec(h);h=l?l[1]:(l=/\/([^\/]+)$/g.exec(h))?l[1]:h;Array.isArray(d[h])||(d[h]=[]);d[h].push(C(g,b))}}}c=[].concat(e.sort(w));e=Object.keys(d);for(f=0;fb.name?1:0}),e.splice(0,0,{proposal:"",description:"Templates",style:"noemphasis_title",unselectable:!0}));return e},templateMatches:function(a,b,c,d){if(a.match(b)){if("undefined"!==typeof d.line&&(a=d.line.length-("undefined"!==typeof b?b.length:0),a=d.line.slice(0,-1b.relevance)return-1;if(b.relevance>a.relevance)return 1;var c=a.name,d=b.name;return c=a)&&"undefined"!==typeof console&&console.error("Possible EventEmitter memory leak: "+e+" listeners added.");this.emit("newListener",g);this._eventTarget.addEventListener(d,
-g);return this}var b=10;m.prototype.constructor=m;k.mixin(m.prototype,{_maxListeners:10,addListener:g,on:g,once:function(b,d){var a=this,e=function(g){try{d.apply(this,Array.prototype.slice.call(arguments))}finally{a.removeListener(b,e)}};this.addListener(b,e);return this},removeListener:function(b,d){if("function"!==typeof d)throw Error("removeListener only takes instances of Function");this._eventTarget.removeEventListener(b,d);this.emit("removeListener",d);return this},removeAllListeners:function(b){var d=
-this._eventTarget._namedListeners,a=this,e=function(b){var c=d[b];c&&(c.forEach(a.emit.bind(a,"removeListener")),delete d[b])};"undefined"===typeof b?Object.keys(d).forEach(e):e(b);return this},setMaxListeners:function(b){if("number"!==typeof b)throw Error("setMaxListeners only takes a number");this._maxListeners=b},listeners:function(b){return(b=this._eventTarget._namedListeners[b])?b.slice():[]},emit:function(b){var d=this._eventTarget._namedListeners[b];if(!d){if("error"===b)throw Error("Uncaught, unspecified 'error' event.");
-return!1}var a=Array.prototype.slice.call(arguments,1),e=this;d.forEach(function(b){b.apply(e,a)});return!0}});m.listenerCount=function(b,d){var a=b._eventTarget._namedListeners[d];return a?a.length:0};return{EventEmitter:m}});u("eslint/token-store",[],function(){return function(d){function k(b,c){var e=[],f;for(f=Math.max(0,b);ff.start.line||c.line===f.start.line&&c.column>=f.start.column)&&(!f.end||c.line=
-d-a[c].loc.end.line)return a[c];break}return null}var c=a.parent,d=a.loc.start.line;switch(a.type){case "FunctionDeclaration":return b(a.leadingComments);case "ArrowFunctionExpression":case "FunctionExpression":if("CallExpression"!==c.type||c.callee!==a){for(;c&&!c.leadingComments&&!/Function/.test(c.type);)c=c.parent;return c&&"FunctionDeclaration"!==c.type?b(c.leadingComments):null}default:return null}};g.getAncestors=function(){return da.parents()};g.getNodeByRangeIndex=function(a){var b=null;
-k.traverse(da.root,{enter:function(c){c.range[0]<=a&&ag.length&&f.push({start:0,args:{0:m.toString(),nls:"eslintValidationFailure"},severity:"error"})}k=Date.now()-k;h.logTiming("language tools","validation",k,"application/javascript");return{problems:this._filterProblems(g,f).map(e)}},_filterProblems:function(a,b){var d=a.length;if(1>d)return b;var e=[].concat(a),f=b.length,g=0;a:for(;g=k.index&&m.range[0]<=k.end)continue a}e.push(h)}return e},updated:function(a){if(a)for(var b=
-"eslint.config"===a.pid,d=Object.keys(a),e=Object.create(null),f=0;fthis.scope.length)this.outline.push(b);else{var d=this.scope[this.scope.length-1];d.children||(d.children=[]);d.children.push(b)}return b}}});g.prototype.constructor=g;d.mixin(b.prototype,{visitor:null,getVisitor:function(){this.visitor||(this.visitor=new g,this.visitor.enter=this.visitor.enter.bind(this.visitor),this.visitor.leave=this.visitor.leave.bind(this.visitor));this.visitor.outline=
-[];return this.visitor},computeOutline:function(b,d){var a=this;return this.astManager.getAST(b).then(function(b){if(b){var d=a.getVisitor();m.traverse(b,d);return d.outline}return[]})}});b.prototype.contructor=b;return{JSOutliner:b}});u("javascript/cuProvider",["javascript/lru","javascript/compilationUnit"],function(d,k){var m=new d.LRU(10),g=null;return{getCompilationUnit:function(b,d,g){var a=m.get(d.location);if(a)return a;a=new k(b,d,g);m.put(d.location,a);return a},onModelChanging:function(b){g?
-g=null:m.remove(!b.file||!b.file.location?"unknown":b.file.location)},onInputChanged:function(b){g=b}}});u("javascript/commands/generateDocCommand",["orion/objects","javascript/finder","javascript/signatures","orion/Deferred","javascript/compilationUnit"],function(d,k,m,g,b){function f(b){this.astManager=b}d.mixin(f.prototype,{execute:function(d,a){var e=this;return d.getFileMetadata().then(function(a){return"application/javascript"===a.contentType.id?g.all([e.astManager.getAST(d),d.getCaretOffset()]).then(function(a){e._doCommand(d,
-a[0],a[1])}):g.all([d.getText(),d.getCaretOffset()]).then(function(c){var f=c[1];if((c=k.findScriptBlocks(c[0]))&&0b.parents.length)return null;switch(b.type){case "FunctionDeclaration":return b;case "Property":return b.value&&
-"FunctionExpression"===b.value.type?b:null;case "VariableDeclarator":return b.init&&"FunctionExpression"===b.init.type?(b.decl=b.parents[b.parents.length-1],b):null;case "VariableDeclaration":if(b.declarations&&1===b.declarations.length){var a=b.declarations[0];if(a.init&&"FunctionExpression"===a.init.type)return b.parents.push(b),a.parents=b.parents,this._resolveParent(a)}case "AssignmentExpression":if(b.left&&"MemberExpression"===b.left.type&&b.right&&"FunctionExpression"===b.right.type)return b}var a=
-b.parents.length-1,d=b.parents[a];d.parents=b.parents.slice(0,a);return this._resolveParent(d)}});return{GenerateDocCommand:f}});u("javascript/commands/openDeclaration",["orion/objects","javascript/finder","orion/Deferred","i18n!javascript/nls/messages"],function(d,k,m,g){function b(b,d,c,k){this.astManager=b;this.resolver=d;this.ternworker=c;this.cuprovider=k;this.ternworker.addEventListener("message",function(b){"object"===typeof b.data&&(b=b.data,"definition"===b.request&&(b.declaration&&"number"===
-typeof b.declaration.start&&"number"===typeof b.declaration.end?a!==b.declaration.file?h.resolve(f.openEditor(b.declaration.file,{start:b.declaration.start,end:b.declaration.end})):h.resolve(f.setSelection(b.declaration.start,b.declaration.end,!0)):h.resolve(f.setStatus(g.noDeclFound))))})}var f,h,a;d.mixin(b.prototype,{execute:function(a,b){var c=this;return"application/javascript"===b.contentType.id?c.astManager.getAST(a).then(function(d){return c._findDecl(a,b,d)}):a.getText().then(function(d){var f=
-b.offset;if((d=k.findScriptBlocks(d))&&00&&(e.splice(c-1,2),c-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((f||h)&&d){for(n=e.split("/"),c=n.length;c>0;c-=1){if(r=n.slice(0,c).join("/"),f)for(u=f.length;u>0;u-=1)if(i=d[f.slice(0,u).join("/")],i&&(i=i[r])){o=i,a=c;break}if(o)break;!s&&h&&h[r]&&(s=h[r],l=c)}!o&&s&&(o=s,a=l),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function a(e,t){return function(){return d.apply(r,S.call(arguments,0).concat([e,t]))}}function s(e){return function(t){return o(t,e)}}function l(e){return function(t){g[e]=t}}function c(e){if(i(v,e)){var t=v[e];delete v[e],b[e]=!0,f.apply(r,t)}if(!i(g,e)&&!i(b,e))throw new Error("No "+e);return g[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function p(e){return function(){return y&&y.config&&y.config[e]||{}}}var f,d,h,m,g={},v={},y={},b={},x=Object.prototype.hasOwnProperty,S=[].slice;h=function(e,t){var n,r=u(e),i=r[0];return e=r[1],i&&(i=o(i,t),n=c(i)),i?e=n&&n.normalize?n.normalize(e,s(t)):o(e,t):(e=o(e,t),r=u(e),i=r[0],e=r[1],i&&(n=c(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},m={require:function(e){return a(e)},exports:function(e){var t=g[e];return"undefined"!=typeof t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:p(e)}}},f=function(e,t,n,o){var s,u,p,f,d,y,x=[];if(o=o||e,"function"==typeof n){for(t=!t.length&&n.length?["require","exports","module"]:t,d=0;d-1&&r[e];e--)o=r[e],n=t[o],(n===!0||1===n)&&(n=a(d+o+"/"+m)),i(y,n);s(y)})})}}})}(),n("orion/navigate/nls/messages",{root:!0}),n("orion/navigate/nls/root/messages",{Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize strings":"Externalize strings from JavaScript files in this folder.",NotSupportFileSystem:"${0} is not supported in this file system",SrcNotSupportBinRead:"Source file service does not support binary read",TargetNotSupportBinWrite:"Target file service does not support binary write",NoFileSrv:"No matching file service for location: ${0}","Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}",EnterName:"Enter a new name for '${0}'",ChooseFolder:"Choose folder...",Rename:"Rename",RenameFilesFolders:"Rename the selected files or folders",CompareEach:"Compare with each other","Compare 2 files":"Compare the selected 2 files with each other","Compare with...":"Compare with...",CompareFolders:"Compare the selected folder with a specified folder",Delete:"Delete","Unknown item":"Unknown item","delete item msg":"Are you sure you want to delete these ${0} items?",DeleteTrg:"Are you sure you want to delete '${0}'?",Zip:"Zip",ZipDL:"Create a zip file of the folder contents and download it","New File":"File","Create a new file":"Create a new file",FailedToCreateProject:"Failed to create project: ${0}",FailedToCreateFile:"Failed to create file: ${0}",CopyFailed:"Copy operation failed",MoveFailed:"Move operation failed","Name:":"Name:","New Folder":"Folder","Folder name:":"Folder name:","Create a new folder":"Create a new folder","Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder",CreateEmptyMsg:"Create an empty folder on the Orion server. You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file","Uploaded Content":"Uploaded Content","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Link to Server":"Link to Server",LinkContent:"Link to existing content on the server",CreateLinkedFolder:"Create a folder that links to an existing folder on the server.","Server path:":"Server path:",NameLocationNotClear:"The name and server location were not specified.","Go Up":"Go Up",GoUpToParent:"Move up to the parent folder","Go Into":"Go Into",GoSelectedFolder:"Move into the selected folder","File or zip archive":"File or zip archive",ImportLcFile:"Import a file or zip archive from your local file system","SFTP from...":"SFTP",CpyFrmSftp:"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP",CpyToSftp:"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}","Pasting ${0}":"Pasting ${0}","Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}",MvToLocation:"Move files and folders to a new location",Cut:"Cut",Copy:"Copy","Fetching children of ":"Fetching children of ",Paste:"Paste","Open With":"Open With","Loading ":"Loading ",New:"New",File:"File",Actions:"Actions","Orion Content":"Orion Content","Create new content":"Create new content","Import from HTTP...":"HTTP","File URL:":"File URL:",ImportURL:"Import a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:",FolderDropNotSupported:"Did not drop ${0}. Folder drop is not supported in this browser.",CreateFolderErr:"You cannot copy files directly into the workspace. Create a folder first.","Unzip ${0}?":"Unzip ${0}?","Upload progress: ":"Upload progress: ","Uploading ":"Uploading ","Cancel upload":"Cancel upload",UploadingFileErr:"Uploading the following file failed: ","Enter project name:":"Enter project name:","Create new project":"Create new project","Creating project ${0}":"Creating project ${0}",NoFile:"Use the ${0} menu to create new files and folders. Click a file to start coding.",Download:"Download",Download_tooltips:"Download the file contents as the displayed name","Downloading...":"Reading file contents...","Download not supported":"Contents download is not supported in this browser.",gettingContentFrom:"Getting content from ",confirmLaunchDelete:'Delete Launch Configuration "${0}" ?',deletingLaunchConfiguration:"Deleting launch configuration...",deployTo:"Deploy to ",deploy:"Deploy ",connect:"Connect",fetchContent:"Fetch content",fetchContentOf:"Fetch content of ",disconnectFromProject:"Disconnect from project",doNotTreatThisFolder:"Do not treat this folder as a part of the project",checkStatus:"Check status",checkApplicationStatus:"Check application status",checkApplicationState:"Check application state",stop:"Stop",start:"Start",stopApplication:"Stop the application",startApplication:"Start the application",manage:"Manage",manageThisApplicationOnRemote:"Manage this application on remote server",deleteLaunchConfiguration:"Delete this launch configuration",editLaunchConfiguration:"Edit this launch configuration",deployThisApplication:"Deploy the application using the workspace contents",associatedFolder:"Associated Folder",associateAFolderFromThe:"Associate a folder from the workspace with this project.",convertToProject:"Convert to project",convertThisFolderIntoA:"Convert this folder into a project",thisFolderIsAProject:"This folder is a project already.",basic:"Basic","createAnEmptyProject.":"Create an empty project.",sFTP:"SFTP",createAProjectFromAn:"Create a project from an SFTP site.",readMeCommandName:"Readme File",readMeCommandTooltip:"Create a README.md file in this project",zipArchiveCommandName:"Zip Archive",zipArchiveCommandTooltip:"Create a project from a local zip archive.","Url:":"Url:",notZip:"The following files are not zip files: ${0}. Would you like to continue the import?",notZipMultiple:"There are multiple non-zip files being uploaded. Would you like to continue the import?",Cancel:"Cancel",Ok:"Ok",missingCredentials:"Enter the ${0} authentication credentials associated with ${1} to check its status.",deploying:"deploying",starting:"restarting",stopping:"stopping",checkingStateShortMessage:"checking status"}),n("orion/i18nUtil",[],function(){function e(e){var t=/\$\{([^\}]+)\}/g,n=arguments;return 2===n.length&&n[1]&&"object"==typeof n[1]?e.replace(t,function(e,t){return n[1][t]}):e.replace(t,function(e,t){return n[(t<<0)+1]})}return{formatMessage:e}}),n("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(e,t,n){function r(t,r,i){if(!t[r])throw new Error(n.formatMessage(e.NotSupportFileSystem,r));return t[r].apply(t,i)}function i(n,o,a,s){if(!n.readBlob)throw new Error(e.SrcNotSupportBinRead);if(!a.writeBlob)throw new Error(e.TargetNotSupportBinWrite);if("/"!==o[o.length-1])return r(n,"readBlob",[o]).then(function(e){return r(a,"writeBlob",[s,e])});var l=s.substring(0,s.length-1),c=decodeURIComponent(l.substring(l.lastIndexOf("/")+1)),u=l.substring(0,l.lastIndexOf("/")+1);return r(a,"createFolder",[u,c]).then(function(){},function(){}).then(function(){return r(n,"fetchChildren",[o]).then(function(e){for(var r=[],o=0;o=48&&57>=e}function r(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function o(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function a(e){return 10===e||13===e||8232===e||8233===e}function s(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&Pn.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function l(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&Pn.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function u(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function p(e){return"eval"===e||"arguments"===e}function f(e){if(In&&u(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function d(e,n,r,i,o){var a;t("number"==typeof r,"Comment must have valid position"),zn.lastCommentStart=r,a={type:e,value:n},Jn.range&&(a.range=[r,i]),Jn.loc&&(a.loc=o),Jn.comments.push(a),Jn.attachComment&&(Jn.leadingComments.push(a),Jn.trailingComments.push(a))}function h(e){var t,n,r,i;for(t=On-e,n={start:{line:Dn,column:On-Rn-e}};Wn>On;)if(r=Ln.charCodeAt(On),++On,a(r))return Nn=!0,Jn.comments&&(i=Ln.slice(t+e,On-1),n.end={line:Dn,column:On-Rn-1},d("Line",i,t,On-1,n)),13===r&&10===Ln.charCodeAt(On)&&++On,++Dn,void(Rn=On);Jn.comments&&(i=Ln.slice(t+e,On),n.end={line:Dn,column:On-Rn},d("Line",i,t,On,n))}function m(){var e,t,n,r;for(Jn.comments&&(e=On-2,t={start:{line:Dn,column:On-Rn-2}});Wn>On;)if(n=Ln.charCodeAt(On),a(n))13===n&&10===Ln.charCodeAt(On+1)&&++On,Nn=!0,++Dn,++On,Rn=On;else if(42===n){if(47===Ln.charCodeAt(On+1))return++On,++On,void(Jn.comments&&(r=Ln.slice(e+2,On-2),t.end={line:Dn,column:On-Rn},d("Block",r,e,On,t)));++On}else++On;On>=Wn&&Jn.comments?(t.end={line:Dn,column:On-Rn},r=Ln.slice(e+2,On),d("Block",r,e,On,t),X()):Z()}function g(){var e,t;for(Nn=!1,t=0===On;Wn>On;)if(e=Ln.charCodeAt(On),o(e))++On;else if(a(e))Nn=!0,++On,13===e&&10===Ln.charCodeAt(On)&&++On,++Dn,Rn=On,t=!0;else if(47===e)if(e=Ln.charCodeAt(On+1),47===e)++On,++On,h(2),t=!0;else{if(42!==e)break;++On,++On,m()}else if(t&&45===e){if(45!==Ln.charCodeAt(On+1)||62!==Ln.charCodeAt(On+2))break;On+=3,h(3)}else{if(60!==e)break;if("!--"!==Ln.slice(On+1,On+4))break;++On,++On,++On,++On,h(4)}}function v(e){var t,n,i,o=0;for(n="u"===e?4:2,t=0;n>t;++t){if(!(Wn>On&&r(Ln[On])))return"";i=Ln[On++],o=16*o+"0123456789abcdef".indexOf(i.toLowerCase())
+}return String.fromCharCode(o)}function y(){var e,t,n,i;for(e=Ln[On],t=0,"}"===e&&Z();Wn>On&&(e=Ln[On++],r(e));)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&Z(),65535>=t?String.fromCharCode(t):(n=(t-65536>>10)+55296,i=(t-65536&1023)+56320,String.fromCharCode(n,i))}function b(){var e,t;for(e=Ln.charCodeAt(On++),t=String.fromCharCode(e),92===e&&(117!==Ln.charCodeAt(On)&&Z(),++On,e=v("u"),e&&"\\"!==e&&s(e.charCodeAt(0))||Z(),t=e);Wn>On&&(e=Ln.charCodeAt(On),l(e));)++On,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==Ln.charCodeAt(On)&&Z(),++On,e=v("u"),e&&"\\"!==e&&l(e.charCodeAt(0))||Z(),t+=e);return t}function x(){var e,t;for(e=On++;Wn>On;){if(t=Ln.charCodeAt(On),92===t)return On=e,b();if(!l(t))break;++On}return Ln.slice(e,On)}function S(){var e,t,n;return e=On,t=92===Ln.charCodeAt(On)?b():x(),n=1===t.length?_n.Identifier:f(t)?_n.Keyword:"null"===t?_n.NullLiteral:"true"===t||"false"===t?_n.BooleanLiteral:_n.Identifier,{type:n,value:t,lineNumber:Dn,lineStart:Rn,start:e,end:On}}function E(){var e,t,n,r,i=On,o=Ln.charCodeAt(On),a=Ln[On];switch(o){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++On,Jn.tokenize&&(40===o?Jn.openParenToken=Jn.tokens.length:123===o&&(Jn.openCurlyToken=Jn.tokens.length)),{type:_n.Punctuator,value:String.fromCharCode(o),lineNumber:Dn,lineStart:Rn,start:i,end:On};default:if(e=Ln.charCodeAt(On+1),61===e)switch(o){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return On+=2,{type:_n.Punctuator,value:String.fromCharCode(o)+String.fromCharCode(e),lineNumber:Dn,lineStart:Rn,start:i,end:On};case 33:case 61:return On+=2,61===Ln.charCodeAt(On)&&++On,{type:_n.Punctuator,value:Ln.slice(i,On),lineNumber:Dn,lineStart:Rn,start:i,end:On}}}if(r=Ln.substr(On,4),">>>="===r)return On+=4,{type:_n.Punctuator,value:r,lineNumber:Dn,lineStart:Rn,start:i,end:On};if(n=r.substr(0,3),">>>"===n||"<<="===n||">>="===n)return On+=3,{type:_n.Punctuator,value:n,lineNumber:Dn,lineStart:Rn,start:i,end:On};if(t=n.substr(0,2),a===t[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t)return On+=2,{type:_n.Punctuator,value:t,lineNumber:Dn,lineStart:Rn,start:i,end:On};if("<>=!+-*%&|^/".indexOf(a)>=0)return++On,{type:_n.Punctuator,value:a,lineNumber:Dn,lineStart:Rn,start:i,end:On};++On;var s={type:_n.Punctuator,lineNumber:Dn,lineStart:Rn,start:i,end:On,value:Ln.slice(i,On)};Z(s)}function w(e){for(var t="";Wn>On&&r(Ln[On]);)t+=Ln[On++];return 0===t.length&&Z(),s(Ln.charCodeAt(On))&&Z(),{type:_n.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:Dn,lineStart:Rn,start:e,end:On}}function _(e){var t,r;for(r="";Wn>On&&(t=Ln[On],"0"===t||"1"===t);)r+=Ln[On++];return 0===r.length&&Z(),Wn>On&&(t=Ln.charCodeAt(On),(s(t)||n(t))&&Z()),{type:_n.NumericLiteral,value:parseInt(r,2),lineNumber:Dn,lineStart:Rn,start:e,end:On}}function k(e,t){var r,o;for(i(e)?(o=!0,r="0"+Ln[On++]):(o=!1,++On,r="");Wn>On&&i(Ln[On]);)r+=Ln[On++];return o||0!==r.length||Z(),(s(Ln.charCodeAt(On))||n(Ln.charCodeAt(On)))&&Z(),{type:_n.NumericLiteral,value:parseInt(r,8),octal:o,lineNumber:Dn,lineStart:Rn,start:t,end:On}}function C(){var e,t;for(e=On+1;Wn>e;++e){if(t=Ln[e],"8"===t||"9"===t)return!1;if(!i(t))return!0}return!0}function T(){var e,r,o;if(o=Ln[On],t(n(o.charCodeAt(0))||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),r=On,e="","."!==o){if(e=Ln[On++],o=Ln[On],"0"===e){if("x"===o||"X"===o)return++On,w(r);if("b"===o||"B"===o)return++On,_(r);if("o"===o||"O"===o)return k(o,r);if(i(o)&&C())return k(o,r)}for(;n(Ln.charCodeAt(On));)e+=Ln[On++];o=Ln[On]}if("."===o){for(e+=Ln[On++];n(Ln.charCodeAt(On));)e+=Ln[On++];o=Ln[On]}if("e"===o||"E"===o)if(e+=Ln[On++],o=Ln[On],("+"===o||"-"===o)&&(e+=Ln[On++]),n(Ln.charCodeAt(On)))for(;n(Ln.charCodeAt(On));)e+=Ln[On++];else Z();return s(Ln.charCodeAt(On))&&Z(),{type:_n.NumericLiteral,value:parseFloat(e),lineNumber:Dn,lineStart:Rn,start:r,end:On}}function j(){var e,n,r,o,s,l,c="",u=!1;for(e=Ln[On],t("'"===e||'"'===e,"String literal must starts with a quote"),n=On,++On;Wn>On;){if(r=Ln[On++],r===e){e="";break}if("\\"===r)if(r=Ln[On++],r&&a(r.charCodeAt(0)))++Dn,"\r"===r&&"\n"===Ln[On]&&++On,Rn=On;else switch(r){case"u":case"x":"{"===Ln[On]?(++On,c+=y()):(l=On,s=v(r),s?c+=s:(On=l,c+=r));break;case"n":c+="\n";break;case"r":c+="\r";break;case"t":c+="	";break;case"b":c+="\b";break;case"f":c+="\f";break;case"v":c+="";break;default:i(r)?(o="01234567".indexOf(r),0!==o&&(u=!0),Wn>On&&i(Ln[On])&&(u=!0,o=8*o+"01234567".indexOf(Ln[On++]),"0123".indexOf(r)>=0&&Wn>On&&i(Ln[On])&&(o=8*o+"01234567".indexOf(Ln[On++]))),c+=String.fromCharCode(o)):c+=r}else{if(a(r.charCodeAt(0)))break;c+=r}}var p={type:_n.StringLiteral,value:c,octal:u,lineNumber:Gn,lineStart:Bn,start:n,end:On};return""!==e&&X(p),p}function A(e,t){var n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t){return parseInt(t,16)<=1114111?"x":void Z(null,Fn.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{RegExp(n)}catch(r){Z(null,Fn.InvalidRegExp)}try{return new RegExp(e,t)}catch(i){return null}}function F(){var e,n,r,i,o;for(e=Ln[On],t("/"===e,"Regular expression literal must start with a slash"),n=Ln[On++],r=!1,i=!1;Wn>On;)if(e=Ln[On++],n+=e,"\\"===e)e=Ln[On++],a(e.charCodeAt(0))&&Z(null,Fn.UnterminatedRegExp),n+=e;else if(a(e.charCodeAt(0)))Z(null,Fn.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}return i||Z(Hn,Fn.UnterminatedRegExp),o=n.substr(1,n.length-2),{value:o,literal:n}}function P(){var e,t,n,r;for(t="",n="";Wn>On&&(e=Ln[On],l(e.charCodeAt(0)));)if(++On,"\\"===e&&Wn>On)if(e=Ln[On],"u"===e){if(++On,r=On,e=v("u"))for(n+=e,t+="\\u";On>r;++r)t+=Ln[r];else On=r,n+="u",t+="\\u";X()}else t+="\\",X();else n+=e,t+=e;return{value:n,literal:t}}function L(){qn=!0;var e,t,n,r;return g(),e=On,t=F(),n=P(),r=A(t.value,n.value),qn=!1,Jn.tokenize?{type:_n.RegularExpression,value:r,regex:{pattern:t.value,flags:n.value},lineNumber:Dn,lineStart:Rn,start:e,end:On}:{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:On}}function I(){var e,t,n,r;return g(),e=On,t={start:{line:Dn,column:On-Rn}},n=L(),t.end={line:Dn,column:On-Rn},Jn.tokenize||(Jn.tokens.length>0&&(r=Jn.tokens[Jn.tokens.length-1],r.range[0]===e&&"Punctuator"===r.type&&("/"===r.value||"/="===r.value)&&Jn.tokens.pop()),Jn.tokens.push({type:"RegularExpression",value:n.literal,regex:n.regex,range:[e,On],loc:t})),n}function O(e){return e.type===_n.Identifier||e.type===_n.Keyword||e.type===_n.BooleanLiteral||e.type===_n.NullLiteral}function D(){var e,t;if(e=Jn.tokens[Jn.tokens.length-1],!e)return I();if("Punctuator"===e.type){if("]"===e.value)return E();if(")"===e.value)return t=Jn.tokens[Jn.openParenToken-1],!t||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?E():I();if("}"===e.value){if(Jn.tokens[Jn.openCurlyToken-3]&&"Keyword"===Jn.tokens[Jn.openCurlyToken-3].type){if(t=Jn.tokens[Jn.openCurlyToken-4],!t)return E()}else{if(!Jn.tokens[Jn.openCurlyToken-4]||"Keyword"!==Jn.tokens[Jn.openCurlyToken-4].type)return E();if(t=Jn.tokens[Jn.openCurlyToken-5],!t)return I()}return Cn.indexOf(t.value)>=0?E():I()}return I()}return"Keyword"===e.type&&"this"!==e.value?I():E()}function R(){var e;return On>=Wn?{type:_n.EOF,lineNumber:Dn,lineStart:Rn,start:On,end:On,range:[On,On]}:(e=Ln.charCodeAt(On),s(e)?S():40===e||41===e||59===e?E():39===e||34===e?j():46===e?n(Ln.charCodeAt(On+1))?T():E():n(e)?T():Jn.tokenize&&47===e?D():E())}function N(){var e,t,n,r;return e={start:{line:Dn,column:On-Rn}},t=R(),e.end={line:Dn,column:On-Rn},t.type!==_n.EOF&&(n=Ln.slice(t.start,t.end),r={type:kn[t.type],value:n,range:[t.start,t.end],loc:e},t.regex&&(r.regex={pattern:t.regex.pattern,flags:t.regex.flags}),Jn.tokens.push(r)),t}function M(){var e;return qn=!0,Mn=On,Vn=Dn,$n=Rn,g(),e=Hn,Un=On,Gn=Dn,Bn=Rn,Hn="undefined"!=typeof Jn.tokens?N():R(),qn=!1,e}function V(){qn=!0,g(),Mn=On,Vn=Dn,$n=Rn,Un=On,Gn=Dn,Bn=Rn,Hn="undefined"!=typeof Jn.tokens?N():R(),qn=!1}function $(e){if(Jn.deps)for(var t=e.length,n=0;t>n;n++){var r=e[n];r.type===Tn.Literal&&Jn.deps.push(r)}}function U(e,t){if(Jn.deps){var n=t.length;if("importScripts"===e.name)$(t);else if("Worker"===e.name)t[0].type===Tn.Literal&&Jn.deps.push(t[0]);else if("require"===e.name){var r=t[0];r.type===Tn.ArrayExpression?$(r.elements):r.type===Tn.Literal&&Jn.deps.push(r),n>1&&(r=t[1],r.type===Tn.ArrayExpression&&$(r.elements))}else"requirejs"===e.name?(r=t[0],r.type===Tn.ArrayExpression&&$(r.elements)):"define"===e.name&&n>1&&(r=t[0],r.type===Tn.Literal&&(r=t[1]),r.type===Tn.ArrayExpression&&$(r.elements))}}function G(){this.line=Gn,this.column=Un-Bn}function B(){this.start=new G,this.end=null}function q(e){this.start={line:e.lineNumber,column:e.start-e.lineStart},this.end=null}function W(){Jn.loc&&(this.loc=new B),Jn.range&&(this.range=[Un,0]),Jn.directSourceFile&&(this.sourceFile=Jn.directSourceFile)}function H(e){Jn.loc&&(this.loc=new q(e)),Jn.range&&(this.range=[e.start,0]),Jn.directSourceFile&&(this.sourceFile=Jn.directSourceFile)}function z(e,t,n,r){var i=new Error("Line "+e+": "+n);if(i.index=t,i.lineNumber=e,i.column=t-(qn?Rn:$n)+1,i.description=n,r){var o=r;2===r.type&&Jn&&Array.isArray(Jn.tokens)&&Jn.tokens.length>0&&(o=Jn.tokens[Jn.tokens.length-1]),i.index="number"==typeof o.start?o.start:o.range[0],i.token=o.value,i.end="number"==typeof o.end?o.end:o.range[1]}return i}function J(e){var n,r;throw n=Array.prototype.slice.call(arguments,1),r=e.replace(/%(\d)/g,function(e,r){return t(r0&&(t=Jn.tokens[Jn.tokens.length-2]),X(t,Fn.MissingToken,n)}else t.type!==_n.EOF&&(Jn.tokens&&Jn.tokens.length>0&&(t=Jn.tokens[Jn.tokens.length-2]),X(t,Fn.MissingToken,","));else Y(",")}function tt(e){var t=M();(t.type!==_n.Keyword||t.value!==e)&&Z(t)}function nt(e){return Hn.type===_n.Punctuator&&Hn.value===e}function rt(e){return Hn.type===_n.Keyword&&Hn.value===e}function it(){var e;return Hn.type!==_n.Punctuator?!1:(e=Hn.value,"="===e||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function ot(){try{if(59===Ln.charCodeAt(Un)||nt(";"))return void M();if(Nn)return;if(Mn=Un,Vn=Gn,$n=Bn,Hn.type!==_n.EOF&&!nt("}")){var e=Hn;Jn.errors&&bn(Bn),Z(e)}}catch(t){if(Jn.errors)return void gn(t);throw t}}function at(e){return e.type===Tn.Identifier||e.type===Tn.MemberExpression}function st(){var e=[],t=new W;for(Y("[");!nt("]");)nt(",")?(M(),e.push(null)):(e.push(At()),nt("]")||Y(","));return M(),t.finishArrayExpression(e)}function lt(e,t){var n,r,i=new W;return n=In,r=nn(),t&&In&&p(e[0].name)&&X(t,Fn.StrictParamName),In=n,i.finishFunctionExpression(null,e,[],r)}function ct(){var e,t=new W;return e=M(),e.type===_n.StringLiteral||e.type===_n.NumericLiteral?(In&&e.octal&&X(e,Fn.StrictOctalLiteral),t.finishLiteral(e)):t.finishIdentifier(e.value)}function ut(){var e,t,n,r,i,o=new W;return e=Hn,e.type===_n.Identifier?(n=ct(),"get"!==e.value||nt(":")||nt("(")?"set"!==e.value||nt(":")||nt("(")?wn(e,n,o):(t=ct(),Y("("),e=Hn,e.type!==_n.Identifier?(Y(")"),X(e),r=lt([])):(i=[It()],Y(")"),r=lt(i,e)),o.finishProperty("set",t,r,!1,!1)):(t=ct(),Y("("),Y(")"),r=lt([]),o.finishProperty("get",t,r,!1,!1))):e.type!==_n.EOF&&e.type!==_n.Punctuator?wn(e,ct(),o):void Z(e)}function pt(){var e,t,n,r,i=[],o={},a=String,s=new W;for(Y("{");!nt("}");)e=ut(),null!=e&&"undefined"!=typeof e&&(t=e.key.type===Tn.Identifier?e.key.name:a(e.key.value),r="init"===e.kind?An.Data:"get"===e.kind?An.Get:An.Set,n="$"+t,Object.prototype.hasOwnProperty.call(o,n)?(o[n]===An.Data?In&&r===An.Data?K(Fn.StrictDuplicateProperty):r!==An.Data&&K(Fn.AccessorDataProperty):r===An.Data?K(Fn.AccessorDataProperty):o[n]&r&&K(Fn.AccessorGetSet),o[n]|=r):o[n]=r,i.push(e),nt("}")||et("}"));return Y("}"),s.finishObjectExpression(i)}function ft(){var e;return Y("("),nt(")")?(M(),jn.ArrowParameterPlaceHolder):(++zn.parenthesisCount,e=Ft(),Y(")"),e)}function dt(){var e,t,n,r;if(nt("("))return ft();if(nt("["))return st();if(nt("{"))return pt();if(e=Hn.type,r=new W,e===_n.Identifier)n=r.finishIdentifier(M().value);else if(e===_n.StringLiteral||e===_n.NumericLiteral)In&&Hn.octal&&X(Hn,Fn.StrictOctalLiteral),n=r.finishLiteral(M());else if(e===_n.Keyword){if(rt("function"))return ln();rt("this")?(M(),n=r.finishThisExpression()):Z(M())}else e===_n.BooleanLiteral?(t=M(),t.value="true"===t.value,n=r.finishLiteral(t)):e===_n.NullLiteral?(t=M(),t.value=null,n=r.finishLiteral(t)):nt("/")||nt("/=")?(On=Un,t="undefined"!=typeof Jn.tokens?I():L(),M(),n=r.finishLiteral(t)):Z(M());return n}function ht(){var e=[];if(Y("("),!nt(")"))for(;Wn>Un&&(e.push(At()),!nt(")"));)et(")");return mn(")"),e}function mt(){var e,t=new W;try{e=M(),O(e)||(Jn.errors&&Sn(e),Z(e))}catch(n){if(Jn.errors)return gn(n),En(t,Tn.Identifier);throw n}return t.finishIdentifier(e.value)}function gt(){return Y("."),mt()}function vt(){var e;return Y("["),e=Ft(),Y("]"),e}function yt(){var e,t,n=new W;return tt("new"),e=xt(),t=nt("(")?ht():[],n.finishNewExpression(e,t)}function bt(){var e,t,n,r,i=zn.allowIn;for(r=Hn,zn.allowIn=!0,e=rt("new")?yt():dt();;)if(nt("."))n=gt(),e=new H(r).finishMemberExpression(".",e,n);else if(nt("("))t=ht(),e=new H(r).finishCallExpression(e,t);else{if(!nt("["))break;n=vt(),e=new H(r).finishMemberExpression("[",e,n)}return zn.allowIn=i,e}function xt(){var e,n,r;for(t(zn.allowIn,"callee of new expression always allow in keyword."),r=Hn,e=rt("new")?yt():dt();;)if(nt("["))n=vt(),e=new H(r).finishMemberExpression("[",e,n);else{if(!nt("."))break;n=gt(),e=new H(r).finishMemberExpression(".",e,n)}return e}function St(){var e,t,n=Hn;return e=bt(),Nn||Hn.type!==_n.Punctuator||(nt("++")||nt("--"))&&(In&&e.type===Tn.Identifier&&p(e.name)&&K(Fn.StrictLHSPostfix),at(e)||K(Fn.InvalidLHSInAssignment),t=M(),e=new H(n).finishPostfixExpression(t.value,e)),e}function Et(){var e,t,n;return Hn.type!==_n.Punctuator&&Hn.type!==_n.Keyword?t=St():nt("++")||nt("--")?(n=Hn,e=M(),t=Et(),In&&t.type===Tn.Identifier&&p(t.name)&&K(Fn.StrictLHSPrefix),at(t)||K(Fn.InvalidLHSInAssignment),t=new H(n).finishUnaryExpression(e.value,t)):nt("+")||nt("-")||nt("~")||nt("!")?(n=Hn,e=M(),t=Et(),t=new H(n).finishUnaryExpression(e.value,t)):rt("delete")||rt("void")||rt("typeof")?(n=Hn,e=M(),t=Et(),t=new H(n).finishUnaryExpression(e.value,t),In&&"delete"===t.operator&&t.argument.type===Tn.Identifier&&K(Fn.StrictDelete)):t=St(),t}function wt(e,t){var n=0;if(e.type!==_n.Punctuator&&e.type!==_n.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function _t(){var e,t,n,r,i,o,a,s,l,c;if(e=Hn,l=Et(),l===jn.ArrowParameterPlaceHolder)return l;if(r=Hn,i=wt(r,zn.allowIn),0===i)return l;for(r.prec=i,M(),t=[e,Hn],a=Et(),o=[l,r,a];(i=wt(Hn,zn.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,l=o.pop(),t.pop(),n=new H(t[t.length-1]).finishBinaryExpression(s,l,a),o.push(n);r=M(),r.prec=i,o.push(r),t.push(Hn),n=Et(),o.push(n)}for(c=o.length-1,n=o[c],t.pop();c>1;)n=new H(t.pop()).finishBinaryExpression(o[c-1].value,o[c-2],n),c-=2;return n}function kt(){var e,t,n,r,i;return i=Hn,e=_t(),e===jn.ArrowParameterPlaceHolder?e:(nt("?")&&(M(),t=zn.allowIn,zn.allowIn=!0,n=At(),zn.allowIn=t,Y(":"),r=At(),e=new H(i).finishConditionalExpression(e,n,r)),e)}function Ct(){return nt("{")?nn():At()}function Tt(e){var t,n,r,i,o,a,s,l,c;for(i=[],o=[],a=0,l=null,s={paramSet:{}},t=0,n=e.length;n>t;t+=1)if(r=e[t],r.type===Tn.Identifier)i.push(r),o.push(null),rn(s,r,r.name);else{if(r.type!==Tn.AssignmentExpression)return null;i.push(r.left),o.push(r.right),++a,rn(s,r.left,r.left.name)}return s.message===Fn.StrictParamDupe&&(c=In?s.stricted:s.firstRestricted,Z(c,s.message)),0===a&&(o=[]),{params:i,defaults:o,rest:l,stricted:s.stricted,firstRestricted:s.firstRestricted,message:s.message}}function jt(e,t){var n,r;return Y("=>"),n=In,r=Ct(),In&&e.firstRestricted&&Z(e.firstRestricted,e.message),In&&e.stricted&&X(e.stricted,e.message),In=n,t.finishArrowFunctionExpression(e.params,e.defaults,r,r.type!==Tn.BlockStatement)}function At(){var e,t,n,r,i,o;return e=zn.parenthesisCount,o=Hn,t=Hn,n=kt(),n!==jn.ArrowParameterPlaceHolder&&!nt("=>")||zn.parenthesisCount!==e&&zn.parenthesisCount!==e+1||(n.type===Tn.Identifier?i=Tt([n]):n.type===Tn.AssignmentExpression?i=Tt([n]):n.type===Tn.SequenceExpression?i=Tt(n.expressions):n===jn.ArrowParameterPlaceHolder&&(i=Tt([])),!i)?(it()&&(at(n)||K(Fn.InvalidLHSInAssignment),In&&n.type===Tn.Identifier&&p(n.name)&&X(t,Fn.StrictLHSAssignment),t=M(),r=At(),n=new H(o).finishAssignmentExpression(t.value,n,r)),n):jt(i,new H(o))}function Ft(){var e,t,n=Hn;if(e=At(),nt(",")){for(t=[e];Wn>Un&&nt(",");)M(),t.push(At());e=new H(n).finishSequenceExpression(t)}return e}function Pt(){for(var e,t=[],n=On;Wn>Un&&!nt("}")&&(e=cn(),"undefined"!=typeof e&&n!==On);)t.push(e),n=On;return t}function Lt(){var e,t=new W;return Y("{"),e=Pt(),mn("}"),t.finishBlockStatement(e)}function It(){var e,t=new W;return e=M(),e.type!==_n.Identifier&&(In&&e.type===_n.Keyword&&u(e.value)?X(e,Fn.StrictReservedWord):Z(e)),t.finishIdentifier(e.value)}function Ot(e){var t,n=null,r=new W;return t=It(),In&&p(t.name)&&K(Fn.StrictVarName),"const"===e?(Y("="),n=At()):nt("=")&&(M(),n=At()),r.finishVariableDeclarator(t,n)}function Dt(e){var t=[];do{if(t.push(Ot(e)),!nt(","))break;M()}while(Wn>Un);return t}function Rt(e){var t;return tt("var"),t=Dt(),ot(),e.finishVariableDeclaration(t,"var")}function Nt(e){var t,n=new W;return tt(e),t=Dt(e),ot(),n.finishVariableDeclaration(t,e)}function Mt(){var e=new W;return Y(";"),e.finishEmptyStatement()}function Vt(e){var t=Ft();return ot(),t||(t=En(e)),e.finishExpressionStatement(t)}function $t(e){var t,n,r;return tt("if"),Y("("),t=Ft(),mn(")","{"),n=tn(),rt("else")?(M(),r=tn()):r=null,e.finishIfStatement(t,n,r)}function Ut(e){var t,n,r;return tt("do"),r=zn.inIteration,zn.inIteration=!0,t=tn(),zn.inIteration=r,tt("while"),Y("("),n=Ft(),mn(")","{"),nt(";")&&M(),e.finishDoWhileStatement(t,n)}function Gt(e){var t,n,r;return tt("while"),Y("("),t=Ft(),mn(")","{"),r=zn.inIteration,zn.inIteration=!0,n=tn(),zn.inIteration=r,e.finishWhileStatement(t,n)}function Bt(){var e,t,n=new W;return e=M(),t=Dt(),n.finishVariableDeclaration(t,e.value)}function qt(e){var t,n,r,i,o,a,s,l=zn.allowIn;return t=n=r=null,tt("for"),Y("("),nt(";")?M():(rt("var")||rt("let")?(zn.allowIn=!1,t=Bt(),zn.allowIn=l,1===t.declarations.length&&rt("in")&&(M(),i=t,o=Ft(),t=null)):(zn.allowIn=!1,t=Ft(),zn.allowIn=l,rt("in")&&(at(t)||K(Fn.InvalidLHSInForIn),M(),i=t,o=Ft(),t=null)),"undefined"==typeof i&&Y(";")),"undefined"==typeof i&&(nt(";")||(n=Ft()),Y(";"),nt(")")||(r=Ft())),mn(")","{"),s=zn.inIteration,zn.inIteration=!0,a=tn(),zn.inIteration=s,"undefined"==typeof i?e.finishForStatement(t,n,r,a):e.finishForInStatement(i,o,a)}function Wt(e){var t,n=null;if(tt("continue"),59===Ln.charCodeAt(Un))return M(),zn.inIteration||J(Fn.IllegalContinue),e.finishContinueStatement(null);if(Nn)return zn.inIteration||J(Fn.IllegalContinue),e.finishContinueStatement(null);if(Hn.type===_n.Identifier){var r=Hn;n=It(),t="$"+n.name,Object.prototype.hasOwnProperty.call(zn.labelSet,t)||X(r,Fn.UnknownLabel,n.name)}return ot(),null!==n||zn.inIteration||J(Fn.IllegalContinue),e.finishContinueStatement(n)}function Ht(e){var t,n=null;return tt("break"),59===Ln.charCodeAt(Mn)?(M(),zn.inIteration||zn.inSwitch||J(Fn.IllegalBreak),e.finishBreakStatement(null)):Nn?(zn.inIteration||zn.inSwitch||J(Fn.IllegalBreak),e.finishBreakStatement(null)):(Hn.type===_n.Identifier&&(n=It(),t="$"+n.name,Object.prototype.hasOwnProperty.call(zn.labelSet,t)||J(Fn.UnknownLabel,n.name)),ot(),null!==n||zn.inIteration||zn.inSwitch||J(Fn.IllegalBreak),e.finishBreakStatement(n))}function zt(e){var t=null,n=Hn;return tt("return"),zn.inFunctionBody||X(n,Fn.IllegalReturn,n.value),32===Ln.charCodeAt(Mn)&&s(Ln.charCodeAt(Mn+1))?(t=Ft(),ot(),e.finishReturnStatement(t)):Nn?e.finishReturnStatement(null):(nt(";")||nt("}")||Hn.type===_n.EOF||(t=Ft()),ot(),e.finishReturnStatement(t))}function Jt(e){var t,n;return In&&K(Fn.StrictModeWith),tt("with"),Y("("),t=Ft(),mn(")","{"),n=tn(),e.finishWithStatement(t,n)}function Kt(){var e,t,n=[],r=new W;rt("default")?(M(),e=null):(tt("case"),e=Ft()),nt(":")&&M();for(var i=On;Wn>Un&&!(nt("}")||rt("default")||rt("case"))&&(t=tn(),"undefined"!=typeof t&&null!==t)&&(n.push(t),i!==On);)i=On;return r.finishSwitchCase(e,n)}function Qt(e){var t,n,r,i,o;if(tt("switch"),Y("("),t=Ft(),Y(")"),Y("{"),n=[],nt("}"))return M(),e.finishSwitchStatement(t,n);for(i=zn.inSwitch,zn.inSwitch=!0,o=!1;Wn>Un&&!nt("}");)r=Kt(),null===r.test&&(o&&J(Fn.MultipleDefaultsInSwitch),o=!0),n.push(r);return zn.inSwitch=i,Y("}"),e.finishSwitchStatement(t,n)}function Zt(e){var t;return tt("throw"),Nn&&J(Fn.NewlineAfterThrow),t=Ft(),ot(),e.finishThrowStatement(t)}function Xt(){var e,t,n=new W;return tt("catch"),Y("("),nt(")")&&Z(Hn),e=It(),In&&p(e.name)&&K(Fn.StrictCatchVariable),Y(")"),t=Lt(),n.finishCatchClause(e,t)}function Yt(e){var t,n=[],r=null;return tt("try"),t=Lt(),rt("catch")&&n.push(Xt()),rt("finally")&&(M(),r=Lt()),0!==n.length||r||J(Fn.NoCatchOrFinally),e.finishTryStatement(t,[],n,r)}function en(e){return tt("debugger"),ot(),e.finishDebuggerStatement()}function tn(){var e,t,n,r,i=Hn.type;if(i===_n.EOF&&Z(Hn),i===_n.Punctuator&&"{"===Hn.value)return Lt();if(r=new W,i===_n.Punctuator)switch(Hn.value){case";":return Mt(r);case"(":return Vt(r)}else if(i===_n.Keyword)switch(Hn.value){case"break":return Ht(r);case"continue":return Wt(r);case"debugger":return en(r);case"do":return Ut(r);case"for":return qt(r);case"function":return sn(r);case"if":return $t(r);case"return":return zt(r);case"switch":return Qt(r);case"throw":return Zt(r);case"try":return Yt(r);case"var":return Rt(r);case"while":return Gt(r);case"with":return Jt(r)}return e=Ft(),e&&e.type===Tn.Identifier&&nt(":")?(M(),n="$"+e.name,Object.prototype.hasOwnProperty.call(zn.labelSet,n)&&J(Fn.Redeclaration,"Label",e.name),zn.labelSet[n]=!0,t=tn(),delete zn.labelSet[n],r.finishLabeledStatement(e,t)):(ot(),e||(e=En(r)),r.finishExpressionStatement(e))}function nn(){var e,t,n,r,i,o,a,s,l,c=[],u=new W;for(Y("{");Wn>Un&&Hn.type===_n.StringLiteral&&(t=Hn,e=cn(),c.push(e),e.expression.type===Tn.Literal);)n=Ln.slice(t.start+1,t.end-1),"use strict"===n?(In=!0,r&&X(r,Fn.StrictOctalLiteral)):!r&&t.octal&&(r=t);i=zn.labelSet,o=zn.inIteration,a=zn.inSwitch,s=zn.inFunctionBody,l=zn.parenthesizedCount,zn.labelSet={},zn.inIteration=!1,zn.inSwitch=!1,zn.inFunctionBody=!0,zn.parenthesizedCount=0;for(var p=On;Wn>On&&!nt("}")&&(e=cn(),"undefined"!=typeof e&&null!=e)&&(c.push(e),p!==On);)p=On;return mn("}"),zn.labelSet=i,zn.inIteration=o,zn.inSwitch=a,zn.inFunctionBody=s,zn.parenthesizedCount=l,u.finishBlockStatement(c)}function rn(e,t,n){var r="$"+n;In?(p(n)&&(e.stricted=t,e.message=Fn.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=Fn.StrictParamDupe)):e.firstRestricted||(p(n)?(e.firstRestricted=t,e.message=Fn.StrictParamName):u(n)?(e.firstRestricted=t,e.message=Fn.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.firstRestricted=t,e.message=Fn.StrictParamDupe)),e.paramSet[r]=!0}function on(e){var t,n,r;return t=Hn,n=It(),rn(e,t,t.value),nt("=")&&(M(),r=At(),++e.defaultCount),e.params.push(n),e.defaults.push(r),!nt(")")}function an(e){var t;if(t={params:[],defaultCount:0,defaults:[],firstRestricted:e},Y("("),!nt(")"))for(t.paramSet={};Wn>Un&&on(t);)Y(",");return Y(")"),0===t.defaultCount&&(t.defaults=[]),{params:t.params,defaults:t.defaults,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}}function sn(){var e,t,n,r,i,o,a,s,l=[],c=[],f=new W;return tt("function"),n=Hn,e=It(),In?p(n.value)&&X(n,Fn.StrictFunctionName):p(n.value)?(o=n,a=Fn.StrictFunctionName):u(n.value)&&(o=n,a=Fn.StrictReservedWord),i=an(o),l=i.params,c=i.defaults,r=i.stricted,o=i.firstRestricted,i.message&&(a=i.message),s=In,t=nn(),In&&o&&Z(o,a),In&&r&&X(r,a),In=s,f.finishFunctionDeclaration(e,l,c,t)}function ln(){var e,t,n,r,i,o,a,s=null,l=[],c=[],f=new W;return tt("function"),nt("(")||(e=Hn,s=It(),In?p(e.value)&&X(e,Fn.StrictFunctionName):p(e.value)?(n=e,r=Fn.StrictFunctionName):u(e.value)&&(n=e,r=Fn.StrictReservedWord)),i=an(n),l=i.params,c=i.defaults,t=i.stricted,n=i.firstRestricted,i.message&&(r=i.message),a=In,o=nn(),In&&n&&Z(n,r),In&&t&&X(t,r),In=a,f.finishFunctionExpression(s,l,c,o)}function cn(){if(Hn.type===_n.Keyword)switch(Hn.value){case"const":case"let":return Nt(Hn.value);case"function":return sn();default:return tn()}return Hn.type!==_n.EOF?tn():void 0}function un(){for(var e,t,n,r,i=[];Wn>Un&&(t=Hn,t.type===_n.StringLiteral)&&(e=cn(),i.push(e),e.expression.type===Tn.Literal);)n=Ln.slice(t.start+1,t.end-1),"use strict"===n?(In=!0,r&&X(r,Fn.StrictOctalLiteral)):!r&&t.octal&&(r=t);for(var o=On;Wn>Un&&(e=cn(),"undefined"!=typeof e&&null!==e)&&(i.push(e),o!==On);)o=On;return i}function pn(){var e,t;return V(),t=new W,In=!1,e=un(),t.finishProgram(e)}function fn(){var e,t,n,r=[];for(e=0;e0?1:0,Rn=0,Un=On,Gn=Dn,Bn=Rn,Wn=Ln.length,Hn=null,zn={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},Jn={},t=t||{},t.tokens=!0,Jn.tokens=[],Jn.tokenize=!0,Jn.openParenToken=-1,Jn.openCurlyToken=-1,Jn.range="boolean"==typeof t.range&&t.range,Jn.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(Jn.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(Jn.errors=[]);try{if(V(),Hn.type===_n.EOF)return Jn.tokens;for(M();Hn.type!==_n.EOF;)try{M()}catch(i){if(Jn.errors){Jn.errors.push(i);break}throw i}fn(),r=Jn.tokens,"undefined"!=typeof Jn.comments&&(r.comments=Jn.comments),"undefined"!=typeof Jn.errors&&(r.errors=Jn.errors)}catch(o){throw o}finally{Jn={}}return r}function hn(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),Ln=e,On=0,Dn=Ln.length>0?1:0,Rn=0,Un=On,Gn=Dn,Bn=Rn,Wn=Ln.length,Hn=null,zn={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},Jn={},"undefined"!=typeof t&&("boolean"==typeof t.deps&&t.deps&&(Jn.deps=[]),Jn.range="boolean"==typeof t.range&&t.range,Jn.loc="boolean"==typeof t.loc&&t.loc,Jn.attachComment="boolean"==typeof t.attachComment&&t.attachComment,Jn.loc&&null!==t.source&&void 0!==t.source&&(Jn.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(Jn.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(Jn.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(Jn.errors=[],Jn.parseStatement=tn,Jn.parseExpression=Ft,tn=yn(tn),Ft=vn(Ft)),Jn.attachComment&&(Jn.range=!0,Jn.comments=[],Jn.bottomRightStack=[],Jn.trailingComments=[],Jn.leadingComments=[]),Jn.directSourceFile=t.directSourceFile);try{n=pn(),"undefined"!=typeof Jn.comments&&(n.comments=Jn.comments),"undefined"!=typeof Jn.tokens&&(fn(),n.tokens=Jn.tokens),"undefined"!=typeof Jn.errors&&(n.errors=Jn.errors),"undefined"!=typeof Jn.deps&&(n.dependencies=Jn.deps)}catch(i){throw i}finally{"undefined"!=typeof Jn.errors&&(tn=Jn.parseStatement,Ft=Jn.parseExpression),Jn={}}return n}function mn(e,t){try{Y(e)}catch(n){if(!Jn.errors)throw n;gn(n),t&&Ln[n.index]===t&&(On=n.index,V())}}function gn(e){for(var t=Jn.errors.length,n=0;t>n;n++){var r=Jn.errors[n];if(r.index===e.index&&r.message===e.message)return}Jn.errors.push(e)}function vn(e){return function(){try{return e.apply(null,arguments)}catch(t){gn(t)}}}function yn(e){return function(){Jn.statementStart=On;try{return e.apply(null,arguments)}catch(t){gn(t)}}}function bn(e){for(var t=e;t>-1&&";"!==Ln[t]&&"\n"!==Ln[t];)t--;if(!(t<=Jn.statementStart)){var n=!1;Jn.lastRewindLocation?n=!0:Jn.lastRewindLocation!==t&&(n=!0),n&&(On=t,xn(e),V(),Jn.lastRewindLocation=On)}}function xn(e,t){for(var n=Jn.tokens.length-1;n>-1;){var r=Jn.tokens[n];if(r.range[0]",kn[_n.Identifier]="Identifier",kn[_n.Keyword]="Keyword",kn[_n.NullLiteral]="Null",kn[_n.NumericLiteral]="Numeric",kn[_n.Punctuator]="Punctuator",kn[_n.StringLiteral]="String",kn[_n.RegularExpression]="RegularExpression",Cn=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],Tn={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},jn={ArrowParameterPlaceHolder:{type:"ArrowParameterPlaceHolder"}},An={Data:1,Get:2,Set:4},Fn={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",MissingToken:"Missing expected '%0'"},Pn={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},H.prototype=W.prototype={processComment:function(){var e,t,n,r,i,o=Jn.bottomRightStack,a=o[o.length-1];
+if(!(this.type===Tn.Program&&this.body.length>0)){if(Jn.trailingComments.length>0){for(n=[],r=Jn.trailingComments.length-1;r>=0;--r)i=Jn.trailingComments[r],i.range[0]>=this.range[1]&&(n.unshift(i),Jn.trailingComments.splice(r,1));Jn.trailingComments=[]}else a&&a.trailingComments&&a.trailingComments[0].range[0]>=this.range[1]&&(n=a.trailingComments,delete a.trailingComments);if(a)for(;a&&a.range[0]>=this.range[0];)e=a,a=o.pop();if(e)e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=e.leadingComments,e.leadingComments=void 0);else if(Jn.leadingComments.length>0)for(t=[],r=Jn.leadingComments.length-1;r>=0;--r)i=Jn.leadingComments[r],i.range[1]<=this.range[0]&&(t.unshift(i),Jn.leadingComments.splice(r,1));t&&t.length>0&&(this.leadingComments=t),n&&n.length>0&&(this.trailingComments=n),o.push(this)}},finish:function(){Jn.loc&&(this.loc.end={line:Vn,column:Mn-$n},Jn.source&&(this.loc.source=Jn.source)),Jn.range&&(this.range[1]=Mn,this.start=this.range[0],this.end=Mn),Jn.attachComment&&this.processComment()},finishArrayExpression:function(e){return this.type=Tn.ArrayExpression,this.elements=e,this.finish(),this},finishArrowFunctionExpression:function(e,t,n,r){return this.type=Tn.ArrowFunctionExpression,this.id=null,this.params=e,this.defaults=t,this.body=n,this.rest=null,this.generator=!1,this.expression=r,this.finish(),this},finishAssignmentExpression:function(e,t,n){return this.type=Tn.AssignmentExpression,this.operator=e,this.left=t,this.right=n,this.finish(),this},finishBinaryExpression:function(e,t,n){return this.type="||"===e||"&&"===e?Tn.LogicalExpression:Tn.BinaryExpression,this.operator=e,this.left=t,this.right=n,this.finish(),this},finishBlockStatement:function(e){return this.type=Tn.BlockStatement,this.body=e,this.finish(),this},finishBreakStatement:function(e){return this.type=Tn.BreakStatement,this.label=e,this.finish(),this},finishCallExpression:function(e,t){return this.type=Tn.CallExpression,this.callee=e,this.arguments=t,U(e,t),this.finish(),this},finishCatchClause:function(e,t){return this.type=Tn.CatchClause,this.param=e,this.body=t,this.finish(),this},finishConditionalExpression:function(e,t,n){return this.type=Tn.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n,this.finish(),this},finishContinueStatement:function(e){return this.type=Tn.ContinueStatement,this.label=e,this.finish(),this},finishDebuggerStatement:function(){return this.type=Tn.DebuggerStatement,this.finish(),this},finishDoWhileStatement:function(e,t){return this.type=Tn.DoWhileStatement,this.body=e,this.test=t,this.finish(),this},finishEmptyStatement:function(){return this.type=Tn.EmptyStatement,this.finish(),this},finishExpressionStatement:function(e){return this.type=Tn.ExpressionStatement,this.expression=e,this.finish(),this},finishForStatement:function(e,t,n,r){return this.type=Tn.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r,this.finish(),this},finishForInStatement:function(e,t,n){return this.type=Tn.ForInStatement,this.left=e,this.right=t,this.body=n?n:En(this,"Statement"),this.each=!1,this.finish(),this},finishFunctionDeclaration:function(e,t,n,r){return this.type=Tn.FunctionDeclaration,this.id=e,this.params=t,this.defaults=n,this.body=r,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishFunctionExpression:function(e,t,n,r){return this.type=Tn.FunctionExpression,this.id=e,this.params=t,this.defaults=n,this.body=r,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishIdentifier:function(e){return this.type=Tn.Identifier,this.name=e,this.finish(),this},finishIfStatement:function(e,t,n){return this.type=Tn.IfStatement,this.test=e,this.consequent=t?t:En(this,"Statement"),this.alternate=n,this.finish(),this},finishLabeledStatement:function(e,t){return this.type=Tn.LabeledStatement,this.label=e,this.body=t,this.finish(),this},finishLiteral:function(e){return this.type=Tn.Literal,this.value=e.value,this.raw=Ln.slice(e.start,e.end),e.regex&&(this.regex=e.regex),this.finish(),this},finishMemberExpression:function(e,t,n){return this.type=Tn.MemberExpression,this.computed="["===e,this.object=t,this.property=n,this.finish(),this},finishNewExpression:function(e,t){return this.type=Tn.NewExpression,this.callee=e,this.arguments=t,U(e,t),this.finish(),this},finishObjectExpression:function(e){return this.type=Tn.ObjectExpression,this.properties=e,this.finish(),this},finishPostfixExpression:function(e,t){return this.type=Tn.UpdateExpression,this.operator=e,this.argument=t,this.prefix=!1,this.finish(),this},finishProgram:function(e){return this.type=Tn.Program,this.body=e,this.finish(),this},finishProperty:function(e,t,n,r,i){return this.type=Tn.Property,this.key=t,this.value=n,this.kind=e,this.method=r,this.shorthand=i,this.finish(),this},finishReturnStatement:function(e){return this.type=Tn.ReturnStatement,this.argument=e,this.finish(),this},finishSequenceExpression:function(e){return this.type=Tn.SequenceExpression,this.expressions=e,this.finish(),this},finishSwitchCase:function(e,t){return this.type=Tn.SwitchCase,this.test=e,this.consequent=t,this.finish(),this},finishSwitchStatement:function(e,t){return this.type=Tn.SwitchStatement,this.discriminant=e,this.cases=t,this.finish(),this},finishThisExpression:function(){return this.type=Tn.ThisExpression,this.finish(),this},finishThrowStatement:function(e){return this.type=Tn.ThrowStatement,this.argument=e,this.finish(),this},finishTryStatement:function(e,t,n,r){return this.type=Tn.TryStatement,this.block=e,this.guardedHandlers=t,this.handlers=n,this.finalizer=r,this.finish(),this},finishUnaryExpression:function(e,t){return this.type="++"===e||"--"===e?Tn.UpdateExpression:Tn.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0,this.finish(),this},finishVariableDeclaration:function(e,t){return this.type=Tn.VariableDeclaration,this.declarations=e,this.kind=t,this.finish(),this},finishVariableDeclarator:function(e,t){return this.type=Tn.VariableDeclarator,this.id=e,this.init=t,this.finish(),this},finishWhileStatement:function(e,t){return this.type=Tn.WhileStatement,this.test=e,this.body=t?t:En(this,"Statement"),this.finish(),this},finishWithStatement:function(e,t){return this.type=Tn.WithStatement,this.object=e,this.body=t?t:En(this,"Statement"),this.finish(),this}},e.version="2.0.0",e.tokenize=dn,e.parse=hn,e.isIdentifierPart=l,e.isIdentifierStart=s,e.isIdentifierChar=l,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in Tn)Tn.hasOwnProperty(e)&&(t[e]=Tn[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}),function(e,t){"use strict";"function"==typeof n&&n.amd?n("estraverse",["exports"],t):t("undefined"!=typeof exports?exports:e.estraverse={})}(this,function(e){"use strict";function t(){}function n(e){var t,r,i={};for(t in e)e.hasOwnProperty(t)&&(r=e[t],i[t]="object"==typeof r&&null!==r?n(r):r);return i}function r(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function i(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?r=n:(i=o+1,r-=n+1);return i}function o(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?(i=o+1,r-=n+1):r=n;return i}function a(e,t){return S(t).forEach(function(n){e[n]=t[n]}),e}function s(e,t){this.parent=e,this.key=t}function l(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function c(){}function u(e){return null==e?!1:"object"==typeof e&&"string"==typeof e.type}function p(e,t){return(e===g.ObjectExpression||e===g.ObjectPattern)&&"properties"===t}function f(e,t){var n=new c;return n.traverse(e,t)}function d(e,t){var n=new c;return n.replace(e,t)}function h(e,t){var n;return n=i(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function m(e,t,r){var i,o,a,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(a=0,o=t.length;o>a;a+=1)i=n(t[a]),i.extendedRange=[0,e.range[0]],l.push(i);e.leadingComments=l}return e}for(a=0,o=t.length;o>a;a+=1)l.push(h(n(t[a]),r));return s=0,f(e,{enter:function(e){for(var t;se.range[0]));)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?y.Break:l[s].extendedRange[0]>e.range[1]?y.Skip:void 0}}),s=0,f(e,{leave:function(e){for(var t;se.range[1]?y.Skip:void 0}}),e}var g,v,y,b,x,S,E,w,_;v=Array.isArray,v||(v=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),t(r),t(o),x=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),S=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},g={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportBatchSpecifier:"ExportBatchSpecifier",ExportDeclaration:"ExportDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},b={AssignmentExpression:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["id"],ImportNamespaceSpecifier:["id"],ImportSpecifier:["id","name"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},E={},w={},_={},y={Break:E,Skip:w,Remove:_},s.prototype.replace=function(e){this.parent[this.key]=e},s.prototype.remove=function(){return v(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},c.prototype.path=function(){function e(e,t){if(v(t))for(r=0,i=t.length;i>r;++r)e.push(t[r]);else e.push(t)}var t,n,r,i,o,a;if(!this.__current.path)return null;for(o=[],t=2,n=this.__leavelist.length;n>t;++t)a=this.__leavelist[t],e(o,a.path);return e(o,this.__current.path),o},c.prototype.type=function(){var e=this.current();return e.type||this.__current.wrap},c.prototype.parents=function(){var e,t,n;for(n=[],e=1,t=this.__leavelist.length;t>e;++e)n.push(this.__leavelist[e].node);return n},c.prototype.current=function(){return this.__current.node},c.prototype.__execute=function(e,t){var n,r;return r=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(r=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,r},c.prototype.notify=function(e){this.__state=e},c.prototype.skip=function(){this.notify(w)},c.prototype["break"]=function(){this.notify(E)},c.prototype.remove=function(){this.notify(_)},c.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback="iteration"===t.fallback,this.__keys=b,t.keys&&(this.__keys=a(x(this.__keys),t.keys))},c.prototype.traverse=function(e,t){var n,r,i,o,a,s,c,f,d,h,m,g;for(this.__initialize(e,t),g={},n=this.__worklist,r=this.__leavelist,n.push(new l(e,null,null,null)),r.push(new l(null,null,null,null));n.length;)if(i=n.pop(),i!==g){if(i.node){if(s=this.__execute(t.enter,i),this.__state===E||s===E)return;if(n.push(g),r.push(i),this.__state===w||s===w)continue;if(o=i.node,a=i.wrap||o.type,h=this.__keys[a],!h){if(!this.__fallback)throw new Error("Unknown node type "+a+".");h=S(o)}for(f=h.length;(f-=1)>=0;)if(c=h[f],m=o[c])if(v(m)){for(d=m.length;(d-=1)>=0;)if(m[d]){if(p(a,h[f]))i=new l(m[d],[c,d],"Property",null);else{if(!u(m[d]))continue;i=new l(m[d],[c,d],null,null)}n.push(i)}}else u(m)&&n.push(new l(m,c,null,null))}}else if(i=r.pop(),s=this.__execute(t.leave,i),this.__state===E||s===E)return},c.prototype.replace=function(e,t){function n(e){var t,n,i,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if(i=r[t],i.ref&&i.ref.parent===o){if(i.ref.key=0;)if(x=m[d],g=o[x])if(v(g)){for(h=g.length;(h-=1)>=0;)if(g[h]){if(p(a,m[d]))f=new l(g[h],[x,h],"Property",new s(g,h));else{if(!u(g[h]))continue;f=new l(g[h],[x,h],null,new s(g,h))}r.push(f)}}else u(g)&&r.push(new l(g,x,null,new s(o,x)))}}else if(f=i.pop(),c=this.__execute(t.leave,f),void 0!==c&&c!==E&&c!==w&&c!==_&&f.ref.replace(c),(this.__state===_||c===_)&&n(f),this.__state===E||c===E)return b.root;return b.root},e.version="1.8.1-dev",e.Syntax=g,e.traverse=f,e.replace=d,e.attachComments=m,e.VisitorKeys=b,e.VisitorOption=y,e.Controller=c}),n("orion/objects",[],function(){function e(e){for(var t=Object.prototype.hasOwnProperty,n=1,r=arguments.length;r>n;n++){var i=arguments[n];for(var o in i)t.call(i,o)&&(e[o]=i[o])}return e}return{clone:function(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var n=Object.create(Object.getPrototypeOf(t));return e(n,t),n},mixin:e,toArray:function(e){return Array.isArray(e)?e:[e]}}}),n("javascript/lru",["orion/objects"],function(e){function t(e,t){var n=Object.create(null);return n._p=null,n._n=null,n._v={key:e,value:t},n}function n(e){this._max="undefined"==typeof e?-1:e,this._start=this._end=null,this._size=0,this._cache=Object.create(null)}return e.mixin(n.prototype,{clear:function(){this._cache=Object.create(null),this._start=null,this._end=null,this._size=0},size:function(){return this._size},containsKey:function(e){return"undefined"!=typeof this._cache[e]},put:function(e,n){-1!==this._max&&this._size+1>this._max&&this.remove(this._end._v.key),this.remove(e);var r=t(e,n);this._start?(r=t(e,n),r._n=this._start,this._start._p=r,this._start=r):this._start=this._end=r,this._cache[e]=r,this._size++},get:function(e){if(this._size>0){var t=this._cache[e];if(t&&t._v)return t._v.value}return null},remove:function(e){if(0===this._size)return null;var t=this._cache[e];if(t){var n=t._p;this._end===t&&(this._end=n);var r=t._n;return this._start===t&&(this._start=t._n),n&&(n._n=r),r&&(r._p=n),delete this._cache[e],this._size--,t._v.value}return null},keys:function r(){var r=[];if(this._end)for(var e=this._end;e;)r.push(e._v.key),e=e._p;return r}}),{LRU:n}}),n("javascript/scriptResolver",["orion/objects","orion/Deferred","javascript/lru"],function(e,t,n){function r(e){this.fileclient=e,this.cache=new n.LRU(10)}return e.mixin(r.prototype,{getWorkspaceFile:function(e,n){return e?this._getFile(e,n):(new t).resolve(null)},setSearchLocation:function(e){this.searchLocation=e},_getFile:function(e,n){var r=this.cache.get(e);if(r)return(new t).resolve(r);var i=this,o=n?n:Object.create(null),a=o.ext?o.ext:"js",s=o.icon?o.icon:"../javascript/images/javascript.png",l=o.type?o.type:"JavaScript",c="."+a,u=this._removePrefix(e),p=u.length>1?u[1]:u[0],f=p.lastIndexOf("/"),d=p.slice(f+1);return this.fileclient.search({resource:i.searchLocation||this.fileclient.fileServiceRootURL(),keyword:d,sort:"Name asc",nameSearch:!0,fileType:a,start:0,rows:30}).then(function(e){var t=e.response,n=t.docs.length;if(t.numFound>0){r=[];var o=p.replace(/(?:\.?\.\/)*/,"");o=o.replace(new RegExp("\\"+c+"$"),""),o=o.replace(/\//g,"\\/");for(var a=0;n>a;a++){var u=t.docs[a],f=".*(?:"+o+")$";new RegExp(f).test(u.Location.slice(0,u.Location.length-c.length))&&r.push(i._newFileObj(u.Name,u.Location,i._trimName(u.Path),s,l))}if(r.length>0)return i.cache.put(p,r),r}return null})},_removePrefix:function(e){var t=e.indexOf("!");return t>-1?e.split("!"):[e]},resolveRelativeFiles:function(e,t,n){if(t&&t.length>0&&n){var r=n.location,i=[],o=this._removePrefix(e),a=o.length>1?o[1]:o[0];r=r.slice(0,r.lastIndexOf("/"));var s=!1;if("."!==a.charAt(0))r=this._appendPath(r,a);else{s=!0;var l=/^\.\.\//.exec(a);if(l){for(;null!=l;)r=r.slice(0,r.lastIndexOf("/")),a=a.slice(3),l=/^\.\.\//.exec(a);r=this._appendPath(r,a)}else{for(;/^\.\//.test(a);)a=a.slice(2);r=this._appendPath(r,a)}}for(var c=0;c-1&&(d=p.slice(0,f)),a=a.replace("/","/");var h=new RegExp(a+"$");h.test(d)&&i.push(u)}}return i}return[]},_samePaths:function(e,t,n){if(null==e)return null==t;if("undefined"==typeof e)return"undefined"==typeof t;if(null==t)return null==e;if("undefined"==typeof t)return"undefined"==typeof e;if(e.contentType&&n.contentType&&e.contentType.name===n.contentType.name){var r=e.location?e.location:e.Location;if(!r)return!1;var i=r.lastIndexOf("."),o=r;i>-1&&(o=r.slice(0,i)),i=t.lastIndexOf(".");var a=t;return i>-1&&(a=t.slice(0,i)),o===a}},_appendPath:function(e,t){if("string"==typeof e&&"string"==typeof t){var n=e;return"/"!==n.charAt(n.length-1)&&(n+="/"),n+="/"===t.charAt(0)?t.slice(1):t}return null},_trimName:function(e){return e.replace(/^(?:org\.eclipse\.orion\.client)?(?:\/)?bundles\//,"")},_newFileObj:function(e,t,n,r,i,o){var a=Object.create(null);return a.name=e,a.location=t?t:o.getServiceRootURL()+"/"+n,a.path=n,a.contentType=Object.create(null),r&&(a.contentType.icon=r),i&&(a.contentType.name=i),a}}),{ScriptResolver:r}}),n("orion/serialize",[],function(){function e(e){var t=e?JSON.parse(JSON.stringify(e)):e;return e instanceof Error&&(t.__isError=!0,t.lineNumber="number"==typeof t.lineNumber?t.lineNumber:e.lineNumber,t.message=t.message||e.message,t.name=t.name||e.name,t.stack=t.stack||e.stack),t}return{serializeError:e}}),n("javascript/astManager",["orion/Deferred","orion/objects","orion/serialize","javascript/lru","orion/metrics"],function(e,t,n,r,i){function o(e){if(this.parser=e,this.cache=new r.LRU(10),!this.parser)throw new Error("Missing parser")}var a={Unexpected:1,EndOfInput:2},s=Object.create(null);return s.type="Program",s.body=[],s.comments=[],s.tokens=[],s.range=[0,0],t.mixin(o.prototype,{getAST:function(t){var n=this;return t.getFileMetadata().then(function(r){var i=n._getKey(r),o=n.cache.get(i);return o?(new e).resolve(o):t.getText().then(function(e){return o=n.parse(e,r?r.location:"unknown"),n.cache.put(i,o),o})})},_getKey:function(e){return e&&e.location?e.location:"unknown"},parse:function(e,t){var r=Date.now();try{var o=this.parser.parse(e,{range:!0,loc:!0,tolerant:!0,tokens:!0,attachComment:!0,directSourceFile:t,deps:!0})}catch(a){o=s,o.range[1]=e&&"number"==typeof e.length?e.length:0,o.errors=[a]}var l=Date.now()-r;return i.logTiming("language tools","parse",l,"application/javascript"),o.errors&&(this._computeErrorTypes(o.errors),o.errors=o.errors.map(n.serializeError)),o.fileLocation=t,o.source=e,o},_computeErrorTypes:function(e){e&&Array.isArray(e)&&e.forEach(function(e){var t=e.message;e.message=t=t.replace(/^Line \d+: /,""),/^Unexpected/.test(t)&&(e.type=a.Unexpected,/end of input$/.test(t)&&(e.type=a.EndOfInput))})},onModelChanging:function(e){this.inputChanged?this.inputChanged=null:this.cache.remove(this._getKey(e.file))},onInputChanged:function(e){this.inputChanged=e}}),{ASTManager:o,ErrorTypes:a}}),n("orion/editor/eventTarget",[],function(){function e(){}return e.addMixin=function(t){var n=e.prototype;for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])},e.prototype={addEventListener:function(e,t,n){this._eventTypes||(this._eventTypes={});var r=this._eventTypes[e];r||(r=this._eventTypes[e]={level:0,listeners:[]});var i=r.listeners;i.push({listener:t,useCapture:n})},dispatchEvent:function(e){var t=e.type;this._dispatchEvent("pre"+t,e),this._dispatchEvent(t,e),this._dispatchEvent("post"+t,e)},_dispatchEvent:function(e,t){var n=this._eventTypes?this._eventTypes[e]:null;if(n){var r=n.listeners;try{if(n.level++,r)for(var i=0,o=r.length;o>i;i++)if(r[i]){var a=r[i].listener;"function"==typeof a?a.call(this,t):a.handleEvent&&"function"==typeof a.handleEvent&&a.handleEvent(t)}}finally{if(n.level--,n.compact&&0===n.level){for(var s=r.length-1;s>=0;s--)r[s]||r.splice(s,1);0===r.length&&delete this._eventTypes[e],n.compact=!1}}}},isListening:function(e){return this._eventTypes?void 0!==this._eventTypes[e]:!1},removeEventListener:function(e,t,n){if(this._eventTypes){var r=this._eventTypes[e];if(r){for(var i=r.listeners,o=0,a=i.length;a>o;o++){var s=i[o];if(s&&s.listener===t&&s.useCapture===n){0!==r.level?(i[o]=null,r.compact=!0):i.splice(o,1);break}}0===i.length&&delete this._eventTypes[e]}}}},{EventTarget:e}}),n("orion/regex",[],function(){function e(e){return e.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")}function t(e){var t=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(e);return t?{pattern:t[1],flags:t[2]}:null}return{escape:e,parse:t}}),n("orion/util",[],function(){function e(e){var t=arguments;return e.replace(/\$\{([^\}]+)\}/g,function(e,n){return t[(n<<0)+1]})}function t(e,t){return e.createElementNS?e.createElementNS(y,t):e.createElement(t)}var n=navigator.userAgent,r=-1!==n.indexOf("MSIE")||-1!==n.indexOf("Trident")?document.documentMode:void 0,i=parseFloat(n.split("Firefox/")[1]||n.split("Minefield/")[1])||void 0,o=-1!==n.indexOf("Opera")?parseFloat(n.split("Version/")[1]):void 0,a=parseFloat(n.split("Chrome/")[1])||void 0,s=-1!==n.indexOf("Safari")&&!a,l=parseFloat(n.split("WebKit/")[1])||void 0,c=-1!==n.indexOf("Android"),u=-1!==n.indexOf("iPad"),p=-1!==n.indexOf("iPhone"),f=u||p,d=-1!==navigator.platform.indexOf("Mac"),h=-1!==navigator.platform.indexOf("Win"),m=-1!==navigator.platform.indexOf("Linux"),g="undefined"!=typeof document&&"ontouchstart"in document.createElement("input"),v=h?"\r\n":"\n",y="http://www.w3.org/1999/xhtml";return{formatMessage:e,createElement:t,isIE:r,isFirefox:i,isOpera:o,isChrome:a,isSafari:s,isWebkit:l,isAndroid:c,isIPad:u,isIPhone:p,isIOS:f,isMac:d,isWindows:h,isLinux:m,isTouch:g,platformDelimiter:v}}),n("orion/editor/textModel",["orion/editor/eventTarget","orion/regex","orion/util"],function(e,t,n){function r(e,t){this._lastLineIndex=-1,this._text=[""],this._lineOffsets=[0],this.setText(e),this.setLineDelimiter(t)}return r.prototype={destroy:function(){},find:function(e){this._text.length>1&&(this._text=[this._text.join("")]);var n=e.string,r=e.regex,i=n,o="",a=e.caseInsensitive;if(i)if(r){var s=t.parse(i);s&&(i=s.pattern,o=s.flags)}else i=n.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&"),a&&(i=i.replace(/[iI\u0130\u0131]/g,"[Iiİı]"));var l,c=null;if(i){var u=e.reverse,p=e.wrap,f=e.wholeWord,d=e.start||0,h=e.end,m=null!==h&&void 0!==h;-1===o.indexOf("g")&&(o+="g"),-1===o.indexOf("m")&&(o+="m"),a&&-1===o.indexOf("i")&&(o+="i"),f&&(i="\\b"+i+"\\b");var g,v,y=this._text[0],b=0;if(m){var x=h>d?d:h,S=h>d?h:d;y=y.substring(x,S),b=x}var E=new RegExp(i,o);u?l=function(){var e=null;for(E.lastIndex=0;;){if(v=E.lastIndex,g=E.exec(y),v===E.lastIndex)return null;if(!g)break;if(g.index+b=0&&n>e))return null;var r=this._lineOffsets[e];if(n>e+1){var i=this.getText(r,this._lineOffsets[e+1]);if(t)return i;for(var o,a=i.length;10===(o=i.charCodeAt(a-1))||13===o;)a--;return i.substring(0,a)}return this.getText(r)},getLineAtOffset:function(e){var t=this.getCharCount();if(!(e>=0&&t>=e))return-1;var n=this.getLineCount();if(e===t)return n-1;var r,i,o=this._lastLineIndex;if(o>=0&&n>o&&(r=this._lineOffsets[o],i=n>o+1?this._lineOffsets[o+1]:t,e>=r&&i>e))return o;for(var a=n,s=-1;a-s>1;)if(o=Math.floor((a+s)/2),r=this._lineOffsets[o],i=n>o+1?this._lineOffsets[o+1]:t,r>=e)a=o;else{if(i>e){a=o;break}s=o}return this._lastLineIndex=a,a},getLineCount:function(){return this._lineOffsets.length},getLineDelimiter:function(){return this._lineDelimiter},getLineEnd:function(e,t){var n=this.getLineCount();if(!(e>=0&&n>e))return-1;if(n>e+1){var r=this._lineOffsets[e+1];if(t)return r;for(var i,o=this.getText(Math.max(this._lineOffsets[e],r-2),r),a=o.length;10===(i=o.charCodeAt(a-1))||13===i;)a--;return r-(o.length-a)}return this.getCharCount()},getLineStart:function(e){return e>=0&&e=e));)r+=n,i++;for(var o=r,a=i;i=t));)r+=n,i++;var s=r,l=i;if(a===l)return this._text[a].substring(e-o,t-s);var c=this._text[a].substring(e-o),u=this._text[l].substring(0,t-s);return c+this._text.slice(a+1,l).join("")+u},onChanging:function(e){return this.dispatchEvent(e)},onChanged:function(e){return this.dispatchEvent(e)},setLineDelimiter:function(e,t){if("auto"===e&&(e=void 0,this.getLineCount()>1&&(e=this.getText(this.getLineEnd(0),this.getLineEnd(0,!0)))),this._lineDelimiter=e?e:n.platformDelimiter,t){var r=this.getLineCount();if(r>1){for(var i=new Array(r),o=0;r>o;o++)i[o]=this.getLine(o);this.setText(i.join(this._lineDelimiter))}}},setText:function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=0),void 0===n&&(n=this.getCharCount()),t!==n||""!==e){for(var r=this.getLineAtOffset(t),i=this.getLineAtOffset(n),o=t,a=n-t,s=i-r,l=e.length,c=0,u=this.getLineCount(),p=0,f=0,d=0,h=[];;){if(-1!==p&&d>=p&&(p=e.indexOf("\r",d)),-1!==f&&d>=f&&(f=e.indexOf("\n",d)),-1===f&&-1===p)break;d=-1!==p&&-1!==f?p+1===f?f+1:(f>p?p:f)+1:-1!==p?p+1:f+1,h.push(t+d),c++}var m={type:"Changing",text:e,start:o,removedCharCount:a,addedCharCount:l,removedLineCount:s,addedLineCount:c};if(this.onChanging(m),0===h.length){var g,v=this.getLineStart(r);g=u>i+1?this.getLineStart(i+1):this.getCharCount(),t!==v&&(e=this.getText(v,t)+e,t=v),n!==g&&(e+=this.getText(n,g),n=g)}for(var y=l-a,b=r+s+1;u>b;b++)this._lineOffsets[b]+=y;var x,S=5e4,E=S;if(h.length=t));)k+=_,C++;for(var T=k,j=C;C=n));)k+=_,C++;var A=k,F=C,P=this._text[j],L=this._text[F],I=P.substring(0,t-T),O=L.substring(n-A),D=[j,F-j+1];I&&D.push(I),e&&D.push(e),O&&D.push(O),Array.prototype.splice.apply(this._text,D),0===this._text.length&&(this._text=[""]);var R={type:"Changed",start:o,removedCharCount:a,addedCharCount:l,removedLineCount:s,addedLineCount:c};this.onChanged(R)}}},e.EventTarget.addMixin(r.prototype),{TextModel:r}}),n("eslint/conf/globals",[],function(){return{builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,Date:!1,DataView:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},nonstandard:{escape:!1,unescape:!1},browser:{addEventListener:!1,alert:!1,applicationCache:!1,atob:!1,Audio:!1,AudioProcessingEvent:!1,BeforeUnloadEvent:!1,Blob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,crypto:!1,CSS:!1,CustomEvent:!1,DataView:!1,Debug:!1,defaultStatus:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DOMParser:!1,DragEvent:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FormData:!1,frameElement:!1,frames:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,history:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,Intl:!1,KeyboardEvent:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,navigator:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProgressEvent:!1,prompt:!1,Range:!1,removeEventListener:!1,requestAnimationFrame:!1,resizeBy:!1,resizeTo:!1,screen:!1,screenX:!1,screenY:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,self:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,showModalDialog:!1,status:!1,stop:!1,StorageEvent:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,TouchEvent:!1,UIEvent:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},worker:{importScripts:!0,postMessage:!0,self:!0},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,DataView:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,"throws":!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,target:!1,tempdir:!1,test:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,ObjectId:!1,PlanCache:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1}}
+}),n("eslint/conf/environments",["./globals"],function(e){var t={builtin:e.builtin,browser:{globals:e.browser},node:{globals:e.node,ecmaFeatures:{globalReturn:!0}},amd:{globals:e.amd},mocha:{globals:e.mocha},jasmine:{globals:e.jasmine},phantomjs:{globals:e.phantom},jquery:{globals:e.jquery},prototypejs:{globals:e.prototypejs},shelljs:{globals:e.shelljs},meteor:{globals:e.meteor}};return t}),n("javascript/finder",["estraverse","eslint/conf/environments"],function(e,t){var n={visitor:null,punc:"\n	\r (){}[]:;,.+=-*^&@!%~`'\"/\\",findWord:function(e,t){if(e&&t){for(var n=this.punc.indexOf(e.charAt(t))>-1,r=n?t-1:t;r>=0&&!(this.punc.indexOf(e.charAt(r))>-1);)r--;var i=r;for(r=t;r<=e.length&&!(this.punc.indexOf(e.charAt(r))>-1);)r++;return(i===t||n&&i===t-1)&&r===t?null:i===t?e.substring(i,r):e.substring(i+1,r)}return null},findNode:function(t,n,r){var i=null,o=r&&r.parents?[]:null,a=r&&r.next?r.next:!1;if(null!=t&&t>-1&&n&&e.traverse(n,{enter:function(n){if(n.type&&n.range){if(!a&&n.type===e.Syntax.Program&&te.range[1]&&o.pop()}}),i&&o&&o.length>0){var s=o[o.length-1];"Program"!==s.type&&s.range[0]===i.range[0]&&s.range[1]===i.range[1]&&o.pop(),i.parents=o}return i},findNodeAfterComment:function(t,n){var r=null,i=[];if(Array.isArray(t.range)&&n){var o=t.range[1];e.traverse(n,{enter:function(t,n){if(t.type&&t.range)if(n&&i.push(n),o>t.range[0])r=t;else if(r=t,t.type!==e.Syntax.Program)return e.VisitorOption.Break}})}return r&&(r.parents=i),r},findToken:function(e,t){if(null!=e&&e>-1&&t&&t.length>0){var n,r=0,i=t.length-1,o=0;if(n=t[0],e>=n.range[0]&&e=n.range[0])return n.index=i,n;for(n=null;i>=r;){if(o=Math.floor((r+i)/2),n=t[o],en.range[1])r=o+1;else if(e===n.range[1]){var a=t[o+1];if(a.range[0]!==n.range[1])return n.index=o,n;r=o+1}else if(e>=n.range[0]&&e=n.range[0]&&e<=n.range[1]?(n.index=r,n):null}}return null},findComment:function(e,t){if(t.comments){for(var n=t.comments,r=n.length,i=0;r>i;i++){var o=n[i];if(o.range[0]=e)return o;if(e===t.range[1]&&e===o.range[1])return o;if(e>t.range[1]&&e<=o.range[1])return o;if(o.range[0]>e)return null}return null}},findScriptBlocks:function(e,t){var n=[],r=null,i=/<\s*script(?:(type|language)(?:\s*)=(?:\s*)"([^"]*)"|[^>]|\n)*>((?:.|\r?\n)*?)<\s*\/script(?:[^>]|\n)*>/gi,o=this.findHtmlCommentBlocks(e,t);e:for(;null!=(r=i.exec(e));){var a=r[1],s=r[2];if(!a||!s||("language"===a&&(s="text/"+s),/^(application|text)\/(ecmascript|javascript(\d.\d)?|livescript|jscript|x\-ecmascript|x\-javascript)$/gi.test(s))){var l=r[3];if(!(l.length<1)){var c=r.index+r[0].indexOf(">")+1;if(null==t||t>=c&&c+l.length>=t){for(var u=0;u=c)continue e;n.push({text:l,offset:c})}}}}return n},findHtmlCommentBlocks:function(e,t){for(var n=[],r=null,i=//gi;null!=(r=i.exec(e));){var o=r[1];o.length<1||(null==t||r.index<=t&&r.index+o.length>=r.index)&&n.push({text:o,start:r.index,end:r.index+o.length})}return n},findESLintEnvForMember:function(e){var n=Object.keys(t);if(n)for(var r=n.length,i=0;r>i;i++){var o=t[n[i]];if("undefined"!=typeof o[e])return n[i];var a=o.globals;if(a&&"undefined"!=typeof a[e])return n[i]}return null},findDirective:function(e,t){if(e&&"undefined"!=typeof t)for(var n=e.comments.length,r=0;n>r;r++){var i=/^\s*(eslint-\w+|eslint|globals?)(\s|$)/.exec(e.comments[r].value);if(null!=i&&"undefined"!=typeof i&&i[1]===t)return e.comments[r]}return null},findCommentForNode:function r(e){var t=e.leadingComments,n=null;if(t&&t.length>0){if(n=t[t.length-1],"Block"===n.type)return n.node=e,n}else if("Property"===e.type){if(n=r(e.key))return n.node=e,n}else if("FunctionDeclaration"===e.type&&(n=r(e.id)))return n.node=e,n;return n=Object.create(null),n.node=e,n.value="",n},findParentFunction:function(e){if(e)if(e.parents)for(var t=e.parents,n=t.pop();n;){if("FunctionDeclaration"===n.type||"FunctionExpression"===n.type)return n;n=t.pop()}else if(e.parent)for(var n=e.parent;n;){if("FunctionDeclaration"===n.type||"FunctionExpression"===n.type)return n;n=n.parent}return null}};return n}),n("javascript/compilationUnit",["orion/objects","orion/Deferred"],function(e,t){function n(e,t,n){this._blocks=e,this._metadata=t,this._ec=n,this._deps=[]}return e.mixin(n.prototype,{_init:function(){var e=0;this._source="";for(var t=0;t0;)this._source+=" ",r--;this._source+=n.text,e=this._source.length}},getSource:function(){return this._source||this._init(),this._source},validOffset:function(e){if(!this._blocks||this._blocks.length<1||0>e)return!1;for(var t=0;t=r&&e<=r+n.text.length)return!0}return!1},getEditorContext:function(){var e=Object.create(null),n=this;return e.getText=function(){return(new t).resolve(n.getSource())},e.getFileMetadata=function(){return(new t).resolve(n._metadata)},e.setText=function(e,r,i){return n._ec?n._ec.setText(e,r,i):(new t).resolve(null)},e},getDependencies:function(){return this._deps}}),n}),n("javascript/quickFixes",["orion/objects","orion/Deferred","orion/editor/textModel","javascript/finder","javascript/compilationUnit","orion/metrics"],function(e,t,n,r,i,o){function a(e){this.astManager=e}function s(e,t){if(!e)return 0;if(0>t)return 0;for(var n=t,r=e[n];n>-1&&!/[\r\n]/.test(r);)r=e[--n];return n+1}function l(e,t){if(!e)return 0;if(0>t)return 0;for(var n=t,r=e[n];nt)return"";for(var r=t,i=e[r],o=n?"	":"";" "===i||"	"===i;)o+=i,i=e[++r];return o}function u(e,t,n){if(!e||!t)return"";for(var r=t.start,i=e[r],o="",a=!1;r>=t.start&&r<=t.end;){if("\n"===i){a=!0;break}i=e[r++]}return a||(o+="\n"),"undefined"!=typeof n&&(o+=n),o}function p(e,t){return"*"===e.charAt(t+1)?"*"===e.charAt(t+2)?3:2:0}function f(e,t,n,r){return r&&""!==e.slice(t.length).trim()?e.trim()+", "+n:e.trim()+" "+n}function d(e,t){if(e&&e.length)for(var n=0;nt||t>e.length)){var r=e[t];return 1===e.length?n.setText("",r.range[0],r.range[1]):t===e.length-1?n.setText("",e[t-1].range[1],r.range[1]):n.setText("",r.range[0],e[t+1].range[0])}}function m(e,t,n,r){if(e.leadingComments&&e.leadingComments.length>0)for(var i=e.leadingComments.length-1;i>-1;i--){var o=e.leadingComments[i],a=new RegExp("(\\s*[*]+\\s*(?:@param)\\s*(?:\\{.*\\})?\\s*(?:"+r+")+.*)").exec(o.value);if(a){var s=o.range[0]+a.index+p(t,o.range[0]);return n.setText("",s,s+a[1].length)}}return null}function g(e,t){if(t.leadingComments)for(var n=0;n-1)return!0}return!1}function v(e){if("Program"===e.type&&e.body&&e.body.length>0){var t=e.body[0],n=-1;switch(t.type){case"FunctionDeclaration":if(n=y(t),n>-1)return n;if(n=y(t.id),n>-1)return n;break;case"ExpressionStatement":if(t.expression&&t.expression.right&&"FunctionExpression"===t.expression.right.type){if(n=y(t),n>-1)return n;if(n=y(t.expression.left),n>-1)return n}}}return e.range[0]}function y(e){if(e.leadingComments&&e.leadingComments.length>0){var t=e.leadingComments[e.leadingComments.length-1];if(/(?:@param|@return|@returns|@type|@constructor|@name|@description)/gi.test(t.value))return t.range[0]}return-1}return e.mixin(a.prototype,{execute:function(e,t){var n=t.annotation.fixid?t.annotation.fixid:t.annotation.id;delete t.annotation.fixid,o.logEvent("language tools","quickfix",n,"application/javascript");var a=this[n];if(a){var s=this;return e.getFileMetadata().then(function(n){return"text/html"===n.contentType.id?e.getText().then(function(o){var l=r.findScriptBlocks(o);if(l&&l.length>0){var c=new i(l,n,e);return a(c.getEditorContext(),t.annotation,s.astManager)}}):a(e,t.annotation,s.astManager)})}return null},eqeqeq:function(e,t){var n=/^.*\'(\!==|===)\'/.exec(t.title);return e.setText(n[1],t.start,t.end)},"no-comma-dangle":function(e,t){return e.setText("",t.start,t.end)},"no-empty-block":function(e,t){return e.getText().then(function(n){var r=s(n,t.start),i="//TODO empty block",o=c(n,r,!0);return i="\n"+o+i,i+=u(n,t),e.setText(i,t.start+1,t.start+1)})},"no-extra-semi":function(e,t){return e.setText("",t.start,t.end)},"no-fallthrough":function(e,t){return e.getText().then(function(n){var r=s(n,t.start),i="//$FALLTHROUGH$",o=c(n,r);return i+=u(n,t,o),e.setText(i,t.start,t.start)})},"no-fallthrough-break":function(e,t){return e.getText().then(function(n){var r=s(n,t.start),i="break;",o=c(n,r);return i+=u(n,t,o),e.setText(i,t.start,t.start)})},"no-reserved-keys":function(e,t,n){return n.getAST(e).then(function(n){var i=r.findNode(t.start,n,{parents:!0});return i&&"Identifier"===i.type?e.setText('"'+i.name+'"',i.range[0],i.range[1]):void 0})},"no-sparse-arrays":function(e,t,i){return i.getAST(e).then(function(i){var o=r.findNode(t.start,i,{parents:!0});if(o&&"ArrayExpression"===o.type){var a=new n.TextModel(i.source.slice(t.start,t.end)),s=o.elements.length,l=s-1,c=o.elements[l];if(null===c){var u=r.findToken(o.range[1],i.tokens);for("]"!==u.value&&(u=i.tokens[u.index-1]);l>-1&&(c=o.elements[l],null===c);l--);if(null===c)return e.setText(a.getText(),t.start+1,t.end-1);a.setText("",c.range[1]-t.start,u.range[0]-t.start)}for(var p=c;l>-1;l--)c=o.elements[l],null!==c&&c.range[0]!==p.range[0]&&(a.setText(", ",c.range[1]-t.start,p.range[0]-t.start),p=c);return null===c&&null!==p&&a.setText("",o.range[0]+1-t.start,p.range[0]-t.start),e.setText(a.getText(),t.start,t.end)}return null})},"no-throw-literal":function(e,t,n){return n.getAST(e).then(function(n){var i=r.findNode(t.start,n,{parents:!0}),o=i.raw||n.source.slice(i.range[0],i.range[1]);return e.setText("new Error("+o+")",t.start,t.end)})},"no-undef-defined":function(e,t,n){function i(e){if(e&&e.parents&&e.parents.length>0&&"Identifier"===e.type){var t=e.parents.pop();return t&&("AssignmentExpression"===t.type||"UpdateExpression"===t.type)}return!1}var o=/^'(.*)'/.exec(t.title);return null!=o&&"undefined"!=typeof o?n.getAST(e).then(function(n){var a=null,s=0,l=o[1],c=r.findNode(t.start,n,{parents:!0});if(i(c)&&(l+=":true"),a=r.findDirective(n,"globals"))return s=a.range[0]+2,e.setText(f(a.value,"globals",l),s,s+a.value.length);var u=v(n);return e.setText("/*globals "+l+" */\n",u,u)}):null},"no-undef-defined-inenv":function(e,t,n){var i=/^'(.*)'/.exec(t.title);return null!=i&&"undefined"!=typeof i?n.getAST(e).then(function(t){var n=null,o=0;if("console"===i[1])var a="node";else a=r.findESLintEnvForMember(i[1]);if(a){if(n=r.findDirective(t,"eslint-env"))return o=p(t.source,n.range[0])+n.range[0],e.setText(f(n.value,"eslint-env",a,!0),o,o+n.value.length);var s=v(t);return e.setText("/*eslint-env "+a+" */\n",s,s)}}):null},"no-unreachable":function(e,t){return e.setText("",t.start,t.end)},"no-unused-params":function(e,n,i){return i.getAST(e).then(function(i){var o=r.findNode(n.start,i,{parents:!0});if(o){for(var a=[],s=o.parents.pop(),l=-1,c=0;c0&&(p=m(f,i.source,e,s.params[l].name),p&&a.push(p));break;case"FunctionDeclaration":p=m(s,i.source,e,s.params[l].name),p&&a.push(p)}return t.all(a)}return null})},"no-unused-vars-unused":function(e,t,n){return n.getAST(e).then(function(n){var i=r.findNode(t.start,n,{parents:!0});if(i&&i.parents&&i.parents.length>0){var o=i.parents.pop();if("VariableDeclarator"===o.type){var a=i.parents.pop();if("VariableDeclaration"===a.type){if(1===a.declarations.length)return e.setText("",a.range[0],a.range[1]);var s=d(a.declarations,o);if(s>-1)return h(a.declarations,s,e)}}}return null})},"no-unused-vars-unused-funcdecl":function(e,t,n){return n.getAST(e).then(function(n){var i=r.findNode(t.start,n,{parents:!0});if(i&&i.parents&&i.parents.length>0){var o=i.parents.pop();if("FunctionDeclaration"===o.type)return e.setText("",o.range[0],o.range[1])}return null})},"no-unused-params-expr":function(e,t,n){function i(t,n,r){if(Array.isArray(r)){var i=r[r.length-1];if("Block"===i.type){var o=i.range[0]+i.value.length+p(n.source,i.range[0]),a=s(n.source,o),l=c(n.source,a),u="* @callback\n"+l;return e.setText(u,o-1,o-1)}}return a=s(n.source,t.range[0]),l=c(n.source,a),e.setText("/**\n"+l+" * @callback\n"+l+" */\n"+l,t.range[0],t.range[0])}return n.getAST(e).then(function(n){var o=r.findNode(t.start,n,{parents:!0});if(o&&o.parents&&o.parents.length>0){var a,s=o.parents.pop(),l=o.parents.pop();switch(l.type){case"Property":g("@callback",l)||g("@callback",l.key)||(a=i(l,n,l.leadingComments?l.leadingComments:l.key.leadingComments));break;case"AssignmentExpression":var c=l.left;"MemberExpression"!==c.type||g("@callback",c)?"Identifier"!==c.type||g("@callback",c)||(a=i(l.left,n,c.leadingComments)):a=i(c,n,c.leadingComments);break;case"VariableDeclarator":var u=l;l=l.parent,l.declarations[0].range[0]==u.range[0]&&l.declarations[0].range[1]===u.range[1]?a=i(l,n,u.id.leadingComments):g("@callback",u.id)||(a=i(u,n,u.id.leadingComments))}if(!a&&!g("@callback",s))return e.setText("/* @callback */ ",s.range[0],s.range[0])}return a})},"use-isnan":function(e,t,n){return n.getAST(e).then(function(n){var i=r.findNode(t.start,n,{parents:!0});if(i&&i.parents&&i.parents.length>0){var o=i.parents.pop();if("BinaryExpression"===o.type){var a;if("Identifier"===o.left.type&&"NaN"===o.left.name?a=o.right:"Identifier"===o.right.type&&"NaN"===o.right.name&&(a=o.left),a)return e.getText(a.range[0],a.range[1]).then(function(t){return e.setText("isNaN("+t+")",o.range[0],o.range[1])})}}})},semi:function(e,t){return e.setText(";",t.end,t.end)},"missing-nls":function(e,t,n){return t.data&&"number"==typeof t.data.indexOnLine?n.getAST(e).then(function(n){var r=l(n.source,t.end),i=" //$NON-NLS-"+(t.data.indexOnLine+1)+"$";return e.setText(i,r,r)}):null}}),a.prototype.contructor=a,{JavaScriptQuickfixes:a}}),n("javascript/nls/messages",{root:!0}),n("javascript/nls/root/messages",{pluginName:"Orion JavaScript Tool Support",pluginDescription:"This plug-in provides JavaScript tools support for Orion, like editing, search, navigation, validation, and code completion.",error:"Error",warning:"Warning",ignore:"Ignore",ternContentAssist:"Tern JavaScript content assist",prefCodeStyle:"Code Style",prefBestPractices:"Best Practices",prefPotentialProblems:"Potential Programming Problems",sourceOutline:"Source Outline",sourceOutlineTitle:"JavaScript source outline",contentAssist:"JavaScript content assist",eslintValidator:"JavaScript Validator",missingCurly:"Statements not enclosed in braces:",noCaller:"Discouraged 'arguments.caller' or 'arguments.callee' use:",noCommaDangle:"Trailing commas in object expressions:",noCondAssign:"Assignments in conditional expressions:",noConsole:"Discouraged console use in browser code:",noConstantCondition:"Constant as conditional expression:",noRegexSpaces:"Multiple spaces in regular expressions:",noReservedKeys:"Reserved words used as property keys:",noReservedKeysFixName:"Surround key with quotes",noEqeqeq:"Discouraged '==' use:",noDebugger:"Discouraged 'debugger' statement use:",noWith:"Discouraged 'with' statement use:",noEval:"Discouraged 'eval()' use:",noImpliedEval:"Discouraged implied 'eval()' use:",noDupeKeys:"Duplicate object keys:",noIterator:"Discouraged __iterator__ property use:",noProto:"Discouraged __proto__ property use:",noUndefInit:"Explicitly initializing variables to undefined:",useIsNaN:"NaN not compared with isNaN():",useIsNanFixName:"Use isNaN()",missingDoc:"Missing JSDoc:",noUnreachable:"Unreachable code:",noFallthrough:"Switch case fall-through:",useBeforeDefine:"Member used before definition:",noEmptyBlock:"Undocumented empty block:",newParens:"Missing parentheses in constructor call:",noNewArray:"Discouraged 'new Array()':",noNewFunc:"Discouraged 'new Function()':",noNewObject:"Discouraged 'new Object()':",noNewWrappers:"Discouraged wrapper objects:",missingSemi:"Missing semicolons:",unusedVars:"Unused variables:",varRedecl:"Variable re-declarations:",varShadow:"Variable shadowing:",undefMember:"Undeclared global reference:",unnecessarySemis:"Unnecessary semicolons:",unusedParams:"Unused parameters:",unsupportedJSLint:"Unsupported environment directive:",noThrowLiteral:"Literal used in 'throw':",missingNls:"Non-externalized string literals (missing $NON-NLS$ tag):",generateDocName:"Generate Element Comment",generateDocTooltip:"Generate a JSDoc-like comment for the selected JavaScript element",renameElement:"Rename Element",renameElementTooltip:"Rename the selected JavaScript element",renameFailedTimedOut:"Could not rename element - operation timed out",openDeclName:"Open Declaration",openDeclTooltip:"Open the declaration of the selected element",openImplName:"Open Implementation",openImplTooltip:"Open the implementation of the selected element",noDeclTimedOut:"No declaration was found - operation timed out",validTypeof:"Invalid 'typeof' comparison:",noSparseArrays:"Sparse array declarations:",javascriptValidation:"Javascript Validation",jsHover:"JavaScript Hover Provider",removeExtraSemiFixName:"Remove extra semicolon",addFallthroughCommentFixName:"Add $FALLTHROUGH$ comment",addEmptyCommentFixName:"Comment empty block",addESLintEnvFixName:"Add to eslint-env directive",addESLintGlobalFixName:"Add to globals directive",removeUnusedParamsFixName:"Remove parameter",commentCallbackFixName:"Add @callback to function",eqeqeqFixName:"Update operator",unreachableFixName:"Remove unreachable code",sparseArrayFixName:"Convert to normal array",semiFixName:"Add missing ';'",radix:"Missing radix parameter to parseInt():",unusedVarsUnusedFixName:"Remove unused variable",unusedFuncDeclFixName:"Remove unused function",noCommaDangleFixName:"Remove extra ','",addBBreakFixName:"Add break statement",addBBreakFixTooltip:"Add a break statement to the proceeding line",noShadowGlobals:"Global shadowing:",noThrowLiteralFixName:"Change to Error",missingNlsFixName:"Add missing $NON-NLS$ tag",funcProposalDescription:" - The name of the function",funcParamProposalDescription:" - Function parameter",eslintRuleProposalDescripton:" - ESLint rule",eslintEnvProposalDescription:" - ESLint environment name",onlineDocumentationProposalEntry:"\n\n[Online documentation](${0})",keywordProposalDescription:" - Keyword",keywordHoverProposal:"ECMAScript reserved keyword",reloadPluginCmd:"Reload",reloadPluginCmdTooltip:"Reload plug-in",reloadAllPluginsCmd:"Reload All",reloadAllPluginsCmdTooltip:"Reload all plug-ins",templateHoverHeader:"Template source code:\n\n",templateAssistHeader:"Templates",keywordAssistHeader:"Keywords",noProposalsTimedOut:"Could not compute proposals - operation timed out",ternPlugins:"Tern Plug-ins",noTernPluginsAvailable:"No Tern plug-ins are currently loaded. This may be because you have not yet activated content assist in a JavaScript file. Tern plug-ins provide type information and code templates for JavaScript.",noDeclFound:"Could not find declaration",deprecatedHoverTitle:"Deprecated.",parametersHoverTitle:"Parameters:",returnsHoverTitle:"Returns:",throwsHoverTitle:"Throws:",callbackHoverTitle:"Callback:",sinceHoverTitle:"Since:",seeAlsoHoverTitle:"See Also:",openFileForTitle:"Open file for"}),n("orion/editor/templates",[],function(){function e(e,t){return t.substring(e.length)}function t(e,t,n,r){this.prefix=e,this.description=t,this.template=n,this.name=r,this._parse()}function n(e,t){this._keywords=e||[],this._templates=[],this.addTemplates(t||[])}var r="${tab}",i="${delimiter}",o="${cursor}";return t.prototype={getProposal:function(e,t,n){var a,s=t-e.length,l={},c=void 0!==n.delimiter?n.delimiter:"\n";n.indentation&&(c+=n.indentation);for(var u=void 0!==n.tab?n.tab:"	",p=0,f=this.variables,d=this.segments,h=[],m=0;mt.name?1:0}),r.splice(0,0,{proposal:"",description:"Templates",style:"noemphasis_title",unselectable:!0})),r},removePrefix:function(t,n){var r=n.overwrite=n.proposal.substring(0,t.length)!==t;r||(n.proposal=e(t,n.proposal))},isValid:function(){return!0}},{Template:t,TemplateContentAssist:n}}),n("javascript/contentAssist/templates",["orion/editor/templates"],function(e){function t(t){if(t.t)return t.t;var n=new e.Template(t.prefix,t.description,t.template,t.name);return t.t=n,n}function n(e){for(var n=[],r=i.length,o=0;r>o;o++){var a=i[o];a.nodes&&a.nodes[e]&&n.push(a)}return n.map(t,this)}var r={type:"link",values:["boolean","function","number","object","string","symbol","undefined"],title:"Typeof Options",style:"emphasis"},i=[{prefix:"eslint",name:"eslint",nodes:{top:!1,member:!1,prop:!1,doc:!0},description:" - ESLint rule enable or disable",template:"eslint ${rule-id}:${0/1} ${cursor}"},{prefix:"eslint-env",name:"eslint-env",nodes:{top:!1,member:!1,prop:!1,doc:!0},description:" - ESLint environment directive",template:"eslint-env ${library}"},{prefix:"eslint-enable",name:"eslint-enable",nodes:{top:!1,member:!1,prop:!1,doc:!0},description:" - ESLint rule enablement directive",template:"eslint-enable ${rule-id} ${cursor}"},{prefix:"eslint-disable",name:"eslint-disable",nodes:{top:!1,member:!1,prop:!1,doc:!0},description:" - ESLint rule disablement directive",template:"eslint-disable ${rule-id} ${cursor}"},{prefix:"@author",name:"@author",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Author JSDoc tag",template:"@author ${cursor}"},{prefix:"@callback",name:"@callback",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Callback JSDoc tag",template:"@callback ${cursor}"},{prefix:"@class",name:"@class",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Class JSDoc tag",template:"@class ${cursor}"},{prefix:"@constructor",name:"@constructor",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Constructor JSDoc tag",template:"@constructor ${cursor}"},{prefix:"@deprecated",name:"@deprecated",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Deprecated JSDoc tag",template:"@deprecated ${cursor}"},{prefix:"@description",name:"@description",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Description JSDoc tag",template:"@description ${cursor}"},{prefix:"@function",name:"@function",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Function JSDoc tag",template:"@function ${cursor}"},{prefix:"@lends",name:"@lends",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Lends JSDoc tag",template:"@lends ${cursor}"},{prefix:"@license",name:"@license",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - License JSDoc tag",template:"@license ${cursor}"},{prefix:"@name",name:"@name",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Name JSDoc tag",template:"@name ${cursor}"},{prefix:"@param",name:"@param",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Param JSDoc tag",template:"@param {${type}} ${cursor}"},{prefix:"@private",name:"@private",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Private JSDoc tag",template:"@private ${cursor}"},{prefix:"@public",name:"@public",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Public JSDoc tag",template:"@public ${cursor}"},{prefix:"@returns",name:"@returns",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Returns JSDoc tag",template:"@returns {${type}} ${cursor}"},{prefix:"@see",name:"@see",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - See JSDoc tag",template:"@see ${cursor}"},{prefix:"@since",name:"@since",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Since JSDoc tag",template:"@since ${cursor}"},{prefix:"@throws",name:"@throws",nodes:{top:!1,member:!1,prop:!1,jsdoc:!0},description:" - Throws JSDoc tag",template:"@throws {${type}} ${cursor}"},{prefix:"arrow",name:"arrow",nodes:{top:!0,member:!1,prop:!1},description:" - arrow function expression",template:"${param} => {${cursor}}"},{prefix:"arrow",name:"arrow object",nodes:{top:!0,member:!1,prop:!1},description:" - arrow function expression returning an object",template:"var ${name} = () => ({ ${prop}: ${val}${cursor} });"},{prefix:"if",name:"if",nodes:{top:!0,member:!1,prop:!1},description:" - if statement",template:"if (${condition}) {\n	${cursor}\n}"},{prefix:"if",name:"if",nodes:{top:!0,member:!1,prop:!1},description:" - if else statement",template:"if (${condition}) {\n	${cursor}\n} else {\n	\n}"},{prefix:"for",name:"for",nodes:{top:!0,member:!1,prop:!1},description:" - iterate over array",template:"for (var ${i}=0; ${i}<${array}.length; ${i}++) {\n	${cursor}\n}"},{prefix:"for",name:"for",nodes:{top:!0,member:!1,prop:!1},description:" - iterate over array with local var",template:"for (var ${i}=0; ${i}<${array}.length; ${i}++) {\n	var ${value} = ${array}[${i}];\n	${cursor}\n}"},{prefix:"for",name:"for..in",nodes:{top:!0,member:!1,prop:!1},description:" - iterate over properties of an object",template:"for (var ${property} in ${object}) {\n	if (${object}.hasOwnProperty(${property})) {\n		${cursor}\n	}\n}"},{prefix:"while",name:"while",nodes:{top:!0,member:!1,prop:!1},description:" - while loop with condition",template:"while (${condition}) {\n	${cursor}\n}"},{prefix:"do",name:"do",nodes:{top:!0,member:!1,prop:!1},description:" - do while loop with condition",template:"do {\n	${cursor}\n} while (${condition});"},{prefix:"eslint",name:"eslint",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - ESLint rule enable / disable directive",template:"/* eslint ${rule-id}:${0/1}*/"},{prefix:"eslint-env",name:"eslint-env",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - ESLint environment directive",template:"/* eslint-env ${library}*/"},{prefix:"eslint-enable",name:"eslint-enable",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - ESLint rule enablement directive",template:"/* eslint-enable ${rule-id} */"},{prefix:"eslint-disable",name:"eslint-disable",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - ESLint rule disablement directive",template:"/* eslint-disable ${rule-id} */"},{prefix:"switch",name:"switch",nodes:{top:!0,member:!1,prop:!1},description:" - switch case statement",template:"switch (${expression}) {\n	case ${value1}:\n		${cursor}\n		break;\n	default:\n}"},{prefix:"case",name:"case",nodes:{top:!0,member:!1,prop:!1,swtch:!0},description:" - case statement",template:"case ${value}:\n	${cursor}\n	break;"},{prefix:"try",name:"try",nodes:{top:!0,member:!1,prop:!1},description:" - try..catch statement",template:"try {\n	${cursor}\n} catch (${err}) {\n}"},{prefix:"try",name:"try",nodes:{top:!0,member:!1,prop:!1},description:" - try..catch statement with finally block",template:"try {\n	${cursor}\n} catch (${err}) {\n} \n finally {\n}"},{prefix:"typeof",name:"typeof",nodes:{top:!0,member:!1,prop:!1},description:" - typeof statement",template:'typeof ${object} === "${type:'+JSON.stringify(r).replace("}","\\}")+'}"'},{prefix:"instanceof",name:"instanceof",nodes:{top:!0,member:!1,prop:!1},description:" - instanceof statement",template:"${object} instanceof ${type}"},{prefix:"with",name:"with",nodes:{top:!0,member:!1,prop:!1},description:" - with statement",template:"with (${object}) {\n	${cursor}\n}"},{prefix:"function",name:"function",nodes:{top:!0,member:!1,prop:!1},description:" - function declaration",template:"/**\n * @name ${name}\n * @param ${parameter}\n */\nfunction ${name} (${parameter}) {\n	${cursor}\n}"},{prefix:"function",name:"function",nodes:{top:!1,member:!1,prop:!1,obj:!0},description:" - member function expression",template:"/**\n * @name ${name}\n * @function\n * @param ${parameter}\n */\n${name}: function(${parameter}) {\n	${cursor}\n}"},{prefix:"function",name:"function",nodes:{top:!1,member:!1,prop:!0,obj:!1},description:" - member function expression",template:"function(${parameter}) {\n	${cursor}\n}"},{prefix:"define",name:"define",nodes:{top:!0,member:!1,prop:!1},description:" - define function call",template:"/* eslint-env amd */\ndefine('${name}', [\n'${import}'\n], function(${importname}) {\n	${cursor}\n});"},{prefix:"nls",name:"nls",nodes:{top:!0,member:!1,prop:!1},description:" - non NLS string",template:"${cursor} //$NON-NLS-${0}$"},{prefix:"log",name:"log",nodes:{top:!0,member:!1,prop:!1},description:" - console log",template:"console.log(${object});"},{prefix:"node",name:"node",nodes:{top:!0,member:!1,prop:!1,doc:!1,jsdoc:!1},description:" - Node require function call",template:"/* eslint-env node*/\nvar lib = require('${cursor}');"}];return{getTemplatesForKind:n}}),n("orion/URITemplate",[],function(){function e(e){this._text=e}function t(e){return e.replace("%25","%")}function n(e,n){if("U"===n)return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()});if("U+R"===n)return encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(p,t);if("U+R-,"===n)return encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw new Error("Unknown allowed character set: "+n)}function r(e,t,r){for(var i=[],o=0;o=5760&&" ᠎              ".indexOf(e)>=0}function o(e){return"0123456789".indexOf(e)>=0}function a(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function s(e){return"01234567".indexOf(e)>=0}function l(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e}function c(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e.charCodeAt(0)>=128&&k.NonAsciiIdentifierStart.test(e)}function u(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e||e.charCodeAt(0)>=128&&k.NonAsciiIdentifierPart.test(e)}function p(e){return-1==="><(){}[],:*|?!=".indexOf(e)&&!i(e)&&!r(e)}function f(e){return"param"===e||"argument"===e||"arg"===e}function d(e){return"property"===e||"prop"===e}function h(e){return f(e)||d(e)||"extends"===e||"augments"===e||"alias"===e||"this"===e||"mixes"===e||"requires"===e}function m(e){return h(e)||"const"===e||"constant"===e}function g(e){return d(e)||f(e)}function v(e){return f(e)||"define"===e||"enum"===e||"implements"===e||"return"===e||"this"===e||"type"===e||"typedef"===e||"returns"===e||d(e)}function y(e){return v(e)||"throws"===e||"const"===e||"constant"===e||"namespace"===e||"member"===e||"var"===e||"module"===e||"constructor"===e||"class"===e}function b(e){this.name="DoctrineError",this.message=e}function x(e){throw new b(e)}function S(){}function E(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function w(e){var t,n,o,a,s,l=0,c=1,u=2;for(e=e.replace(/^\/\*\*?/,"").replace(/\*\/$/,""),t=0,n=e.length,o=l,a="";n>t;){switch(s=e[t],o){case l:r(s)?a+=s:"*"===s?o=c:i(s)||(a+=s,o=u);break;case c:i(s)||(a+=s),o=r(s)?l:u;break;case u:a+=s,r(s)&&(o=l)}t+=1}return a}var _,k,C,T,j,A,F;_="0.5.1",k={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},C=void 0!==typeof"doctrine"[0],A=Array.isArray,A||(A=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),F=function(){var e=Object.prototype.hasOwnProperty;return function(t,n){return e.call(t,n)}}(),C||(t=function(e,t,n){return e.slice(t,n).join("")}),b.prototype=new Error,b.prototype.constructor=b,"dev"===_.slice(-3)&&(S=function(e,t){e||x(t)}),function(e){function t(e,t,n,r){this._previous=e,this._index=t,this._token=n,this._value=r}function n(){var e=U[B];return B+=1,e}function l(e){var t,r,i,o=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(G>B&&a(U[B])))return"";i=n(),o=16*o+"0123456789abcdef".indexOf(i.toLowerCase())}return String.fromCharCode(o)}function u(){var e,t,i,o,a,c="",u=!1;for(e=U[B],++B;G>B;){if(t=n(),t===e){e="";break}if("\\"===t)if(t=n(),r(t))"\r"===t&&"\n"===U[B]&&++B;else switch(t){case"n":c+="\n";break;case"r":c+="\r";break;case"t":c+="	";break;case"u":case"x":a=B,o=l(t),o?c+=o:(B=a,c+=t);break;case"b":c+="\b";break;case"f":c+="\f";break;case"v":c+="";break;default:s(t)?(i="01234567".indexOf(t),0!==i&&(u=!0),G>B&&s(U[B])&&(u=!0,i=8*i+"01234567".indexOf(n()),"0123".indexOf(t)>=0&&G>B&&s(U[B])&&(i=8*i+"01234567".indexOf(n()))),c+=String.fromCharCode(i)):c+=t}else{if(r(t))break;c+=t}}return""!==e&&x("unexpected quote"),H=c,$.STRING}function f(){var e,t;if(e="","."!==t){if(e=n(),t=U[B],"0"===e){if("x"===t||"X"===t){for(e+=n();G>B&&(t=U[B],a(t));)e+=n();return e.length<=2&&x("unexpected token"),G>B&&(t=U[B],c(t)&&x("unexpected token")),H=parseInt(e,16),$.NUMBER}if(s(t)){for(e+=n();G>B&&(t=U[B],s(t));)e+=n();return G>B&&(t=U[B],(c(t)||o(t))&&x("unexpected token")),H=parseInt(e,8),$.NUMBER}o(t)&&x("unexpected token")}for(;G>B&&(t=U[B],o(t));)e+=n()}if("."===t)for(e+=n();G>B&&(t=U[B],o(t));)e+=n();if("e"===t||"E"===t)if(e+=n(),t=U[B],("+"===t||"-"===t)&&(e+=n()),t=U[B],o(t))for(e+=n();G>B&&(t=U[B],o(t));)e+=n();else x("unexpected token");return G>B&&(t=U[B],c(t)&&x("unexpected token")),H=parseFloat(e),$.NUMBER}function d(){var e,t;for(H=n();G>B&&p(U[B])&&(e=U[B],!("."===e&&G>B+1&&(t=U[B+1],"<"===t)));)H+=n();return $.NAME}function h(){var e;for(q=B;G>B&&i(U[B]);)n();if(B>=G)return W=$.EOF;switch(e=U[B]){case'"':return W=u();case":":return n(),W=$.COLON;case",":return n(),W=$.COMMA;case"(":return n(),W=$.LPAREN;case")":return n(),W=$.RPAREN;case"[":return n(),W=$.LBRACK;case"]":return n(),W=$.RBRACK;case"{":return n(),W=$.LBRACE;case"}":return n(),W=$.RBRACE;case".":if(n(),G>B){if(e=U[B],"<"===e)return n(),W=$.DOT_LT;if("."===e&&G>B+1&&"."===U[B+1])return n(),n(),W=$.REST;if(o(e))return W=f()}return W=$.DOT;case"<":return n(),W=$.LT;case">":return n(),W=$.GT;case"*":return n(),W=$.STAR;case"|":return n(),W=$.PIPE;case"?":return n(),W=$.QUESTION;case"!":return n(),W=$.BANG;case"=":return n(),W=$.EQUAL;default:return W=o(e)?f():p(e)?d():$.ILLEGAL}}function m(e,t){S(W===e,t||"consumed token not matched"),h()}function g(e){W!==e&&x("unexpected token"),h()}function v(){var e;if(m($.LPAREN,"UnionType should start with ("),e=[],W!==$.RPAREN)for(;;){if(e.push(L()),W===$.RPAREN)break;g($.PIPE)}return m($.RPAREN,"UnionType should end with )"),{type:V.UnionType,elements:e}}function y(){var e;for(m($.LBRACK,"ArrayType should start with ["),e=[];W!==$.RBRACK;){if(W===$.REST){m($.REST),e.push({type:V.RestType,expression:L()});break}e.push(L()),W!==$.RBRACK&&g($.COMMA)}return g($.RBRACK),{type:V.ArrayType,elements:e}}function b(){var e=H;return W===$.NAME||W===$.STRING?(h(),e):W===$.NUMBER?(m($.NUMBER),String(e)):void x("unexpected token")}function E(){var e;return e=b(),W===$.COLON?(m($.COLON),{type:V.FieldType,key:e,value:L()}):{type:V.FieldType,key:e,value:null}}function w(){var e;if(m($.LBRACE,"RecordType should start with {"),e=[],W===$.COMMA)m($.COMMA);else for(;W!==$.RBRACE;)e.push(E()),W!==$.RBRACE&&g($.COMMA);return g($.RBRACE),{type:V.RecordType,fields:e}}function _(){var e=H;return g($.NAME),{type:V.NameExpression,name:e}}function k(){var e=[];for(e.push(I());W===$.COMMA;)m($.COMMA),e.push(I());return e}function T(){var e,t;return e=_(),W===$.DOT_LT||W===$.LT?(h(),t=k(),g($.GT),{type:V.TypeApplication,expression:e,applications:t}):e}function j(){return m($.COLON,"ResultType should start with :"),W===$.NAME&&"void"===H?(m($.NAME),{type:V.VoidLiteral}):L()}function A(){for(var e,t=[],n=!0,r=!1;W!==$.RPAREN;)W===$.REST&&(m($.REST),r=!0),e=L(),e.type===V.NameExpression&&W===$.COLON&&(m($.COLON),e={type:V.ParameterType,name:e.name,expression:L()}),W===$.EQUAL?(m($.EQUAL),e={type:V.OptionalType,expression:e},n=!1):n||x("unexpected token"),r&&(e={type:V.RestType,expression:e}),t.push(e),W!==$.RPAREN&&g($.COMMA);return t}function F(){var e,t,n,r,i;return S(W===$.NAME&&"function"===H,"FunctionType should start with 'function'"),m($.NAME),g($.LPAREN),e=!1,n=[],t=null,W!==$.RPAREN&&(W!==$.NAME||"this"!==H&&"new"!==H?n=A():(e="new"===H,m($.NAME),g($.COLON),t=T(),W===$.COMMA&&(m($.COMMA),n=A()))),g($.RPAREN),r=null,W===$.COLON&&(r=j()),i={type:V.FunctionType,params:n,result:r},t&&(i["this"]=t,e&&(i["new"]=!0)),i}function P(){var e;switch(W){case $.STAR:return m($.STAR),{type:V.AllLiteral};case $.LPAREN:return v();case $.LBRACK:return y();case $.LBRACE:return w();case $.NAME:if("null"===H)return m($.NAME),{type:V.NullLiteral};if("undefined"===H)return m($.NAME),{type:V.UndefinedLiteral};if(e=t.save(),"function"===H)try{return F()}catch(n){e.restore()}return T();default:x("unexpected token")}}function L(){var e;return W===$.QUESTION?(m($.QUESTION),W===$.COMMA||W===$.EQUAL||W===$.RBRACE||W===$.RPAREN||W===$.PIPE||W===$.EOF||W===$.RBRACK?{type:V.NullableLiteral}:{type:V.NullableType,expression:P(),prefix:!0}):W===$.BANG?(m($.BANG),{type:V.NonNullableType,expression:P(),prefix:!0}):(e=P(),W===$.BANG?(m($.BANG),{type:V.NonNullableType,expression:e,prefix:!1}):W===$.QUESTION?(m($.QUESTION),{type:V.NullableType,expression:e,prefix:!1}):W===$.LBRACK?(m($.LBRACK),m($.RBRACK,"expected an array-style type declaration ("+H+"[])"),{type:V.TypeApplication,expression:{type:V.NameExpression,name:"Array"},applications:[e]}):e)}function I(){var e,t;if(e=L(),W!==$.PIPE)return e;for(t=[e],m($.PIPE);;){if(t.push(L()),W!==$.PIPE)break;m($.PIPE)}return{type:V.UnionType,elements:t}}function O(){var e;return W===$.REST?(m($.REST),{type:V.RestType,expression:I()}):(e=I(),W===$.EQUAL?(m($.EQUAL),{type:V.OptionalType,expression:e}):e)}function D(e,t){var n;return U=e,G=U.length,B=0,q=0,C||(U=U.split("")),h(),n=I(),t&&t.midstream?{expression:n,index:q}:(W!==$.EOF&&x("not reach to EOF"),n)}function R(e,t){var n;return U=e,G=U.length,B=0,q=0,C||(U=U.split("")),h(),n=O(),t&&t.midstream?{expression:n,index:q}:(W!==$.EOF&&x("not reach to EOF"),n)}function N(e,t,n){var r,i,o;switch(e.type){case V.NullableLiteral:r="?";break;case V.AllLiteral:r="*";break;case V.NullLiteral:r="null";break;case V.UndefinedLiteral:r="undefined";break;case V.VoidLiteral:r="void";break;case V.UnionType:for(r=n?"":"(",i=0,o=e.elements.length;o>i;++i)r+=N(e.elements[i],t),i+1!==o&&(r+="|");n||(r+=")");break;case V.ArrayType:for(r="[",i=0,o=e.elements.length;o>i;++i)r+=N(e.elements[i],t),i+1!==o&&(r+=t?",":", ");r+="]";break;case V.RecordType:for(r="{",i=0,o=e.fields.length;o>i;++i)r+=N(e.fields[i],t),i+1!==o&&(r+=t?",":", ");r+="}";break;case V.FieldType:r=e.value?e.key+(t?":":": ")+N(e.value,t):e.key;break;case V.FunctionType:for(r=t?"function(":"function (",e["this"]&&(r+=e["new"]?t?"new:":"new: ":t?"this:":"this: ",r+=N(e["this"],t),0!==e.params.length&&(r+=t?",":", ")),i=0,o=e.params.length;o>i;++i)r+=N(e.params[i],t),i+1!==o&&(r+=t?",":", ");r+=")",e.result&&(r+=(t?":":": ")+N(e.result,t));break;case V.ParameterType:r=e.name+(t?":":": ")+N(e.expression,t);break;case V.RestType:r="...",e.expression&&(r+=N(e.expression,t));break;case V.NonNullableType:r=e.prefix?"!"+N(e.expression,t):N(e.expression,t)+"!";break;case V.OptionalType:r=N(e.expression,t)+"=";break;case V.NullableType:r=e.prefix?"?"+N(e.expression,t):N(e.expression,t)+"?";break;case V.NameExpression:r=e.name;break;case V.TypeApplication:for(r=N(e.expression,t)+".<",i=0,o=e.applications.length;o>i;++i)r+=N(e.applications[i],t),i+1!==o&&(r+=t?",":", ");r+=">";break;default:x("Unknown type "+e.type)}return r}function M(e,t){return null==t&&(t={}),N(e,t.compact,t.topLevel)}var V,$,U,G,B,q,W,H;V={NullableLiteral:"NullableLiteral",AllLiteral:"AllLiteral",NullLiteral:"NullLiteral",UndefinedLiteral:"UndefinedLiteral",VoidLiteral:"VoidLiteral",UnionType:"UnionType",ArrayType:"ArrayType",RecordType:"RecordType",FieldType:"FieldType",FunctionType:"FunctionType",ParameterType:"ParameterType",RestType:"RestType",NonNullableType:"NonNullableType",OptionalType:"OptionalType",NullableType:"NullableType",NameExpression:"NameExpression",TypeApplication:"TypeApplication"},$={ILLEGAL:0,DOT:1,DOT_LT:2,REST:3,LT:4,GT:5,LPAREN:6,RPAREN:7,LBRACE:8,RBRACE:9,LBRACK:10,RBRACK:11,COMMA:12,COLON:13,STAR:14,PIPE:15,QUESTION:16,BANG:17,EQUAL:18,NAME:19,STRING:20,NUMBER:21,EOF:22},t.prototype.restore=function(){q=this._previous,B=this._index,W=this._token,H=this._value},t.save=function(){return new t(q,B,W,H)},e.parseType=D,e.parseParamType=R,e.stringify=M,e.Syntax=V}(T={}),function(e){function n(){var e=N[O];return O+=1,r(e)&&(D+=1),e}function o(){var e="";for(n();R>O&&l(N[O]);)e+=n();return e}function a(){var e,t,n=O;for(t=!1;R>n;){if(e=N[n],r(e))D+=1,t=!0;else if(t){if("@"===e)break;i(e)||(t=!1)}n+=1}return n}function s(e,t){for(var o,a,s,l=!1;t>O;){if(o=N[O],!i(o)){if("{"===o){n();break}l=!0;break}n()}if(!l){for(a=1,s="";t>O;)if(o=N[O],r(o))n();else{if("}"===o){if(a-=1,0===a){n();break}}else"{"===o&&(a+=1);s+=n()}if(0!==a)return x("Braces are not balanced");try{return f(e)?T.parseParamType(s):T.parseType(s)}catch(c){return}}}function p(e){var t;if(c(N[O])){for(t=n();e>O&&u(N[O]);)t+=n();return t}}function d(e){for(;e>O&&(i(N[O])||r(N[O]));)n()}function b(e,t,r){var i,o="";if(d(e),!(O>=e)&&(t&&"["===N[O]&&(i=!0,o=n()),c(N[O]))){if(o+=p(e),r)for(;"."===N[O];)o+=".",O+=1,o+=p(e);if(i){if("="===N[O])for(o+=n();e>O&&"]"!==N[O];)o+=n();if(O>=e||"]"!==N[O])return;o+=n()}return o}}function _(){for(;R>O&&"@"!==N[O];)n();return O>=R?!1:(S("@"===N[O]),!0)}function k(e,t){this._options=e,this._title=t,this._tag={title:t,description:null},this._options.lineNumbers&&(this._tag.lineNumber=D),this._last=0,this._extra={}}function j(e){var t,n;if(_())return t=o(),n=new k(e,t),n.parse()}function P(){var e,t,o="";for(t=!0;R>O&&(e=N[O],!t||"@"!==e);)r(e)?t=!0:t&&!i(e)&&(t=!1),o+=n();return E(o)}function L(e,t){var n,r,i,o,a,s=[];if(void 0===t&&(t={}),N="boolean"==typeof t.unwrap&&t.unwrap?w(e):e,t.tags)if(A(t.tags))for(i={},o=0,a=t.tags.length;a>o;o++)"string"==typeof t.tags[o]?i[t.tags[o]]=!0:x('Invalid "tags" parameter: '+t.tags);else x('Invalid "tags" parameter: '+t.tags);for(C||(N=N.split("")),R=N.length,O=0,D=0,M=t.recoverable,V=t.sloppy,$=t.strict,r=P();;){if(n=j(t),!n)break;(!i||i.hasOwnProperty(n.title))&&s.push(n)}return{description:r,tags:s}}var I,O,D,R,N,M,V,$;k.prototype.addError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return S(ne;++e)if(r=n[e],!this[r]())return;return O=this._last,this._tag}},e.parse=L}(j={}),e.version=_,e.parse=j.parse,e.parseType=T.parseType,e.parseParamType=T.parseParamType,e.unwrapComment=w,e.Syntax=n(T.Syntax),e.Error=b,e.type={Syntax:e.Syntax,parseType:T.parseType,parseParamType:T.parseParamType,stringify:T.stringify}}("undefined"==typeof exports?doctrine={}:exports),n("doctrine",function(){}),n("javascript/hover",["orion/objects","javascript/finder","orion/URITemplate","orion/Deferred","i18n!javascript/nls/messages","orion/i18nUtil","doctrine"],function(e,t,n,r,i,o){function a(e,t){if(!e)return null;try{var n=Object.create(null);if(e){var r=doctrine.parse(e,{recoverable:!0,unwrap:!0});if(n.params=[],n["throws"]=[],n.see=[],n.desc=r.description?r.description:"",r.tags)for(var a=r.tags.length,l=0;a>l;l++){var c=r.tags[l];switch(c.title){case"name":c.name&&(n.name=c.name);break;case"description":null!==c.description&&(n.desc=""===n.desc?c.description:n.desc+"\n"+c.description);break;case"param":n.params.push(s(c.type)+(c.name?"__"+c.name+"__ ":"")+(c.description?c.description+"\n":""));break;case"returns":case"return":n.returns=s(c.type)+(c.description?c.description+"\n":"");break;case"since":c.description&&(n.since=c.description);break;case"callback":n.callback=c.description?c.description:"This function is used as a callback";break;case"throws":n["throws"].push(s(c.type)+(c.description?c.description+"\n":""));break;case"see":n.see.push(s(c.type)+(c.description?c.description+"\n":""));break;case"deprecated":n.deprecated=c.description?c.description+"\n":""}}}var u="";if("undefined"!=typeof n.deprecated&&(u+=o.formatMessage("__${0}__ ",i.deprecatedHoverTitle)+n.deprecated+"\n\n"),""!==n.desc&&(u+=n.desc+"\n\n"),n.params.length>0)for(u+=o.formatMessage("__${0}__\n\n",i.parametersHoverTitle),l=0;l"+n.params[l]+"\n\n";if(n.returns&&(u+=o.formatMessage("__${0}__\n\n>",i.returnsHoverTitle)+n.returns+"\n\n"),n["throws"].length>0)for(u+=o.formatMessage("__${0}__\n\n",i.throwsHoverTitle),l=0;l"+n["throws"][l]+"\n\n";if(n.callback&&(u+=o.formatMessage("__${0}__\n\n>",i.callbackHoverTitle)+n.callback+"\n\n"),n.since&&(u+=o.formatMessage("__${0}__\n\n>",i.sinceHoverTitle)+n.since+"\n\n"),n.see.length>0)for(u+=o.formatMessage("__${0}__\n\n",i.seeAlsoHoverTitle),l=0;l"+n.see[l],l0){var t=e.applications[0];return t.name?"*("+t.name+"[])* ":s(t.fields&&t.fields.length>0?t.fields[0]:t)}return s(e.expression);case"UnionType":case"ArrayType":if(e.elements&&e.elements.length>0)return s(e.elements[0]);break;case"FieldType":return s(e.value);default:return""}}function l(e,t,n,r){this.astManager=e,this.resolver=t,this.ternworker=n,this.cuprovider=r,this.ternworker.addEventListener("message",function(e){if("object"==typeof e.data){var t=e.data,n="";"documentation"===t.request&&(t.doc&&(n=a(t.doc.doc)),c.resolve(n))}})}var c;return e.mixin(l.prototype,{computeHoverInfo:function(e,n){if(n.proposal&&"js"===n.proposal.kind)return n.proposal.hover;var r=this;return e.getFileMetadata().then(function(i){if (i.parents.length == 0){var meta = i;}else{var meta = i.parents[i.parents.length - 1];};return i?(r.resolver.setSearchLocation(meta.Location),i&&"application/javascript"===i.contentType.id?r.astManager.getAST(e).then(function(e){return r._doHover(e,n,i)}):e.getText().then(function(e){var o=t.findScriptBlocks(e);if(o&&o.length>0){var a=r.cuprovider.getCompilationUnit(o,i);if(a.validOffset(n.offset))return r.astManager.getAST(a.getEditorContext()).then(function(e){return r._doHover(e,n,i)})}return null})):null})},_doHover:function(e,n,i){var o=t.findNode(n.offset,e,{parents:!0});if(o&&"Literal"===o.type){if(n.offset<=o.range[0]||n.offset>=o.range[1])return null;var a=o.parents,s=a.pop(),l=this;if("ArrayExpression"===s.type){if(s=a.pop(),"CallExpression"===s.type&&("define"===s.callee.name||"require"===s.callee.name)){var u=o.value;return l.resolver.getWorkspaceFile(u).then(function(e){return l._formatFilesHover(u,e)})}}else if("CallExpression"===s.type){var u=o.value;switch(s.callee.name){case"require":return l.resolver.getWorkspaceFile(u).then(function(e){/\.js$/.test(u)||(u+=".js");var t=l.resolver.resolveRelativeFiles(u,e,i);return t&&t.length>0?l._formatFilesHover(o.value,t):void 0});case"importScripts":var u=o.value;return l.resolver.getWorkspaceFile(u).then(function(e){/\.js$/.test(u)||(u+=".js");var t=l.resolver.resolveRelativeFiles(u,e,i);return t&&t.length>0?l._formatFilesHover(o.value,t):void 0})}}return null}c=new r;var p=[{type:"full",name:i.location,text:e.source}];return this.ternworker.postMessage({request:"documentation",args:{params:{offset:n.offset},files:p,meta:{location:i.location}}}),c},_formatFilesHover:function(e,t){if(e&&t){var r=null;t.length>1&&(r=o.formatMessage("###${0} '${1}'###",i.openFileForTitle,e));for(var a="",s=0;s|<|&|(\\|\\|))+",name:"punctuation.operator"},doc_block:{begin:{match:"/\\*\\*",literal:"/**"},end:{match:"\\*/",literal:"*/"},name:"comment.block.documentation",patterns:[{match:"@(?:(?!\\*/)\\S)*",name:"meta.documentation.annotation"},{match:"<[^\\s>]*>",name:"meta.documentation.tag"},{match:"(\\b)(TODO)(\\b)(((?!\\*/).)*)",name:"meta.annotation.task.todo",captures:{2:{name:"keyword.other.documentation.task"},4:{name:"comment.block"}}}]},number_decimal:{match:"\\b-?(?:\\.\\d+|\\d+\\.?\\d*)(?:[eE][+-]?\\d+)?\\b",name:"constant.numeric.number"},number_hex:{match:"\\b0[xX][0-9A-Fa-f]+\\b",name:"constant.numeric.hex"},string_doubleQuote:{match:'"(?:\\\\.|[^"])*"?',name:"string.quoted.double"},string_singleQuote:{match:"'(?:\\\\.|[^'])*'?",name:"string.quoted.single"},todo_comment_singleLine:{match:"(\\b)(TODO)(\\b)(.*)",name:"meta.annotation.task.todo",captures:{2:{name:"keyword.other.documentation.task"},4:{name:"comment.line"}}}}},{id:"orion.c-like",repository:{comment_singleLine:{match:{match:"//.*",literal:"//"},name:"comment.line.double-slash",patterns:[{include:"orion.lib#todo_comment_singleLine"}]},comment_block:{begin:{match:"/\\*",literal:"/*"},end:{match:"\\*/",literal:"*/"},name:"comment.block",patterns:[{match:"(\\b)(TODO)(\\b)(((?!\\*/).)*)",name:"meta.annotation.task.todo",captures:{2:{name:"keyword.other.documentation.task"},4:{name:"comment.block"}}}]}}}],keywords:[]}
+}),n("orion/editor/stylers/application_javascript/syntax",["orion/editor/stylers/lib/syntax"],function(e){var t=["class","const","debugger","delete","enum","export","extends","function","implements","import","in","instanceof","interface","let","new","package","private","protected","public","static","super","typeof","var","void","with"],n=["break","case","catch","continue","default","do","else","finally","for","if","return","switch","throw","try","while","yield"],r=["this"],i=["false","null","true","undefined"],o=[];return o.push.apply(o,e.grammars),o.push({id:"orion.js",contentTypes:["application/javascript"],patterns:[{begin:"'(?:\\\\.|[^\\\\'])*\\\\$",end:"^(?:$|(?:\\\\.|[^\\\\'])*('|[^\\\\]$))",name:"string.quoted.single.js"},{begin:'"(?:\\\\.|[^\\\\"])*\\\\$',end:'^(?:$|(?:\\\\.|[^\\\\"])*("|[^\\\\]$))',name:"string.quoted.double.js"},{include:"orion.lib#string_doubleQuote"},{include:"orion.lib#string_singleQuote"},{include:"orion.c-like#comment_singleLine"},{match:"/(?![\\s\\*])(?:\\\\.|[^/])+/(?:[gim]{0,3})",name:"string.regexp.js"},{include:"orion.lib#doc_block"},{include:"orion.c-like#comment_block"},{include:"#jsFunctionDef"},{include:"orion.lib#brace_open"},{include:"orion.lib#brace_close"},{include:"orion.lib#bracket_open"},{include:"orion.lib#bracket_close"},{include:"orion.lib#parenthesis_open"},{include:"orion.lib#parenthesis_close"},{include:"orion.lib#operator"},{include:"orion.lib#number_decimal"},{include:"orion.lib#number_hex"},{match:"\\b(?:"+t.join("|")+")\\b",name:"keyword.operator.js"},{match:"\\b(?:"+n.join("|")+")\\b",name:"keyword.control.js"},{match:"\\b(?:"+i.join("|")+")\\b",name:"constant.language.js"},{match:"\\b(?:"+r.join("|")+")\\b",name:"variable.language.js"}],repository:{jsFunctionDef:{begin:"(function)(\\s+[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*)?\\s*\\(",end:"\\)",captures:{1:{name:"keyword.operator.js"},2:{name:"entity.name.function.js"}},patterns:[{include:"orion.c-like#comment_singleLine"},{include:"orion.c-like#comment_block"},{match:"[^\\s,]+",name:"variable.parameter.js"}]}}}),{id:o[o.length-1].id,grammars:o,keywords:t.concat(n).concat(r).concat(i)}}),n("eslint/load-rules-async",["./util","logger","javascript/finder","i18n!javascript/nls/problems","estraverse","orion/editor/stylers/application_javascript/syntax"],function(e,t,n,r,i,o){function a(){return l}function s(){for(var e=Object.create(null),t=Object.keys(l),n=0;no;o++){var a=n[o];if(a.value===i)return a}return null}function i(e){return e&&e.type?"Literal"===e.type&&null==e.value||"Identifier"===e.type&&"undefined"===e.name:!1}return{BinaryExpression:function(o){try{if(i(o.left)||i(o.right))return;var a=o.operator,s=null;"=="===a?(s="===",e.report(o,r.eqeqeq,{0:s,1:a},n(e,o))):"!="===a&&(s="!==",e.report(o,r.eqeqeq,{0:s,1:a},n(e,o)))}catch(l){t.log(l)}}}}},"missing-doc":{description:r["missing-doc-description"],url:"http://eslint.org/docs/rules/valid-jsdoc",rule:function(e){function n(e){if(e&&e.leading){var t=e.leading.length;return t>0&&"Block"===e.leading[t-1].type}return!1}function i(i){try{var o,a;switch(i.type){case"Property":if(i.value&&"FunctionExpression"===i.value.type&&(o=e.getComments(i),o.leading.length<1&&o.trailing.length<1&&(o=e.getComments(i.key)),!n(o))){switch(i.key.type){case"Identifier":a=i.key.name;break;case"Literal":a=i.key.value}e.report(i.key,r["missing-doc"],{0:a},{type:"expr"})}break;case"FunctionDeclaration":o=e.getComments(i),o.leading.length<1&&o.trailing.length<1&&(o=e.getComments(i.id)),n(o)||e.report(i.id,r["missing-doc"],{0:i.id.name},{type:"decl"});break;case"ExpressionStatement":if(i.expression&&"AssignmentExpression"===i.expression.type){var s=i.expression;s.right&&"FunctionExpression"===s.right.type&&s.left&&"MemberExpression"===s.left.type&&(o=e.getComments(i),o.leading.length<1&&o.trailing.length<1&&(o=e.getComments(s.left)),n(o)||(a=s.left.computed===!0?s.left.property.value:s.left.property.name,e.report(s.left.property,r["missing-doc"],{0:a},{type:"expr"})))}}}catch(l){t.log(l)}}return{Property:i,FunctionDeclaration:i,ExpressionStatement:i}}},"new-parens":{description:r["new-parens-description"],url:"http://eslint.org/docs/rules/new-parens",rule:function(e){return{NewExpression:function(n){try{if(n.callee){var i=e.getTokens(n.callee,0,1);if(i&&i.length>0){var o=i[i.length-1];("Punctuator"!==o.type||"("!==o.value)&&e.report(n.callee,r["new-parens"],null,i[0])}}}catch(a){t.log(a)}}}}},"no-caller":{description:r["no-caller-description"],url:"http://eslint.org/docs/rules/no-caller",rule:function(e){return{MemberExpression:function(t){var i=n.findParentFunction(t);if(i){var o=t.object;if(!o||"arguments"!==o.name||"Identifier"!==o.type)return;var a=t.property,s=a.name?a.name:a.value;("callee"===s||"caller"===s)&&e.report(a,r["no-caller"],{0:s})}}}}},"no-comma-dangle":{description:r["no-comma-dangle-description"],url:"http://eslint.org/docs/rules/no-comma-dangle",rule:function(e){return{ObjectExpression:function(t){var n=e.getLastToken(t,1);n&&","===n.value&&e.report(t,r["no-comma-dangle"],null,n)}}}},"no-cond-assign":{description:r["no-cond-assign-description"],url:"http://eslint.org/docs/rules/no-cond-assign",rule:function(e){function t(t){var n=t.parent.type;return a[n]&&"ForStatement"!==n?"("===e.getTokenBefore(t,1).value:"("===e.getTokenBefore(t).value}function n(e){switch(e.type){case"FunctionExpression":case"ObjectExpression":case"CallExpression":case"ArrayExpression":return!0;default:return!1}}function o(o){var a=[];if(null!==o.test){o.test.parent=o,i.traverse(o.test,{enter:function(e,t){return e.range[0]>o.test.range[1]?i.VisitorOption.Break:n(e)?i.VisitorOption.Skip:(t&&(e.parent=t),void(e&&"AssignmentExpression"===e.type&&a.push(e)))}});var s=a.length;if(s>0)for(var l=0;s>l;l++){var c=a[l];t(c)||(c.range[0]=c.left.range[0],e.report(c,r["no-cond-assign"]))}}}var a={IfStatement:!0,DoWhileStatement:!0,WhileStatement:!0,ForStatement:!0};return{IfStatement:o,WhileStatement:o,ForStatement:o,DoWhileStatement:o}}},"no-console":{description:r["no-console-description"],url:"http://eslint.org/docs/rules/no-console",rule:function(e){return{MemberExpression:function(t){"console"===t.object.name&&e.env&&e.env.browser&&e.report(t.object,r["no-console"])}}}},"no-constant-condition":{description:r["no-constant-condition-description"],url:"http://eslint.org/docs/rules/no-constant-condition",rule:function(e){function t(e){switch(e.type){case"Literal":case"ObjectExpression":case"FunctionExpression":case"ArrayExpression":return!0;case"BinaryExpression":case"LogicalExpression":return t(e.left)&&t(e.right);case"UnaryExpression":return t(e.argument);default:return!1}}function n(n){n&&n.test&&t(n.test)&&e.report(n.test,r["no-constant-condition"])}return{IfStatement:n,WhileStatement:n,DoWhileStatement:n,ForStatement:n,ConditionalExpression:n}}},"no-debugger":{description:r["no-debugger-description"],url:"http://eslint.org/docs/rules/no-debugger",rule:function(e){return{DebuggerStatement:function(n){try{e.report(n,r["no-debugger"],null,e.getTokens(n)[0])}catch(i){t.log(i)}}}}},"no-dupe-keys":{description:r["no-dupe-keys-description"],url:"http://eslint.org/docs/rules/no-dupe-keys",rule:function(e){return{ObjectExpression:function(n){try{var i=n.properties;if(i&&i.length>0)for(var o=i.length,a=Object.create(null),s=0;o>s;s++){var l=i[s];if("init"===l.kind){var c=l.key.name?l.key.name:l.key.value;Object.prototype.hasOwnProperty.call(a,c)?e.report(l,r["no-dupe-keys"],{0:c},e.getTokens(l)[0]):a[c]=1}}}catch(u){t.log(u)}}}}},"no-empty-block":{description:r["no-empty-block-description"],url:"http://eslint.org/docs/rules/no-empty",rule:function(e){var n;return{Program:function(e){n=e.comments},BlockStatement:function(i){try{if(i.body.length<1){for(var o=0;o=i.range[0]&&a[1]<=i.range[1])return}e.report(i,r["no-empty-block"])}}catch(s){t.log(s)}}}}},"no-eval":{description:r["no-eval-description"],url:"http://eslint.org/docs/rules/no-eval",rule:function(e){return{CallExpression:function(n){try{var i=n.callee.name;if(!i)return;"eval"===i&&e.report(n.callee,r["no-eval"],{0:"'eval'"},e.getTokens(n.callee)[0])}catch(o){t.log(o)}}}}},"no-extra-semi":{description:r["no-extra-semi-description"],url:"http://eslint.org/docs/rules/no-extra-semi",rule:function(e){return{EmptyStatement:function(n){try{var i=e.getTokens(n),o=i[i.length-1];o&&"Punctuator"===o.type&&";"===o.value&&e.report(n,r["no-extra-semi"],null,o)}catch(a){t.log(a)}}}}},"no-fallthrough":{description:r["no-fallthrough-description"],url:"http://eslint.org/docs/rules/no-fallthrough",rule:function(n){function i(t){if(t.consequent){var n=t.consequent.slice(0);if(n.length>0&&"BlockStatement"===n[0].type){var r=n.shift();r.body.length>0&&(n=[].concat(n,r.body))}if(n.length<1)return!1;for(var i=null,o=0;o1){var o=e.cases.length;e:for(var a=0;o>a&&a+1!==o;a++)if(i(e.cases[a])){var s=e.cases[a+1];if(s.test)s.range[1]=s.test.range[1];else{var l=n.getTokens(s);l&&l.length>0&&(s.range[1]=l[0].range[1])}var c=s.leadingComments;if(!c&&s.test&&(c=s.test.leadingComments),c)for(var u=null,p=0;p0){var a=i.arguments[0];if("Literal"===a.type)n.report(i.callee,r["no-eval"],{0:"Implicit 'eval'"},n.getTokens(i.callee)[0]);else if("Identifier"===a.type){var s=n.getScope(),l=e.getDeclaration(a,s);if(l&&l.defs&&l.defs.length){var c=l.defs[0],u=c.node;"Variable"===c.type&&u&&"VariableDeclarator"===u.type&&u.init&&"Literal"===u.init.type&&n.report(i.callee,r["no-eval"],{0:"Implicit 'eval'"},n.getTokens(i.callee)[0])}}}}catch(p){t.log(p)}}}}},"no-iterator":{description:r["no-iterator-description"],url:"http://eslint.org/docs/rules/no-iterator",rule:function(e){return{MemberExpression:function(t){null!=t.property&&(t.computed?"__iterator__"===t.property.value&&e.report(t.property,r["no-iterator"]):"__iterator__"===t.property.name&&e.report(t.property,r["no-iterator"]))}}}},"no-proto":{description:r["no-proto-description"],url:"http://eslint.org/docs/rules/no-proto.html",rule:function(e){return{MemberExpression:function(t){null!=t.property&&(t.computed?"__proto__"===t.property.value&&e.report(t.property,r["no-proto"]):"__proto__"===t.property.name&&e.report(t.property,r["no-proto"]))}}}},"no-jslint":{description:r["no-jslint-description"],rule:function(e){return{Program:function(n){try{var i,o=n.comments;if(o&&(i=o.length)&&o.length>0)for(var a=0;i>a;a++){var s=o[a];if("Block"===s.type){var l=/^\s*(js[l|h]int)(\s+\w+:\w+)+/gi.exec(s.value);if(l){var c=l[1];if(c.length<1)continue;var u=2+s.value.indexOf(c)+s.range[0],p=u+c.length;e.report({type:"BlockComment",range:[u,p],loc:s.loc},r["no-jslint"],{0:c})}}}}catch(f){t.log(f)}}}}},"no-new-array":{description:r["no-new-array-description"],rule:function(t){return e.createNewBuiltinRule("Array",r["no-new-array"],t)}},"no-new-func":{description:r["no-new-func-description"],url:"http://eslint.org/docs/rules/no-new-func",rule:function(t){return e.createNewBuiltinRule("Function",r["no-new-func"],t)}},"no-new-object":{description:r["no-new-object-description"],url:"http://eslint.org/docs/rules/no-new-object",rule:function(t){return e.createNewBuiltinRule("Object",r["no-new-object"],t)}},"no-new-wrappers":{description:r["no-new-wrappers-description"],url:"http://eslint.org/docs/rules/no-new-wrappers",rule:function(t){var n=["String","Number","Math","Boolean","JSON"];return e.createNewBuiltinRule(n,function(e,t,n){e.report(t,r["no-new-wrappers"],[n])},t)}},"no-with":{description:r["no-with-description"],url:"http://eslint.org/docs/rules/no-with",rule:function(e){return{WithStatement:function(t){e.report(t,r["no-with"],null,e.getFirstToken(t))}}}},"missing-nls":{description:r["missing-nls-description"],rule:function(e){function t(t,n){var i=Object.create(null);i.indexOnLine=n,e.report(t,r["missing-nls"],{0:t.value,data:i})}function n(e,t){for(var n=0;n0){if("use strict"===t.value.toLowerCase())return;if(/^(?:[\.,-\/#!$%\^&\*;:{}=\-_`~()@\+\?><\[\]\+])$/.test(t.value))return;if(/^(?:==|!=|===|!==|=>)$/.test(t.value))return;if(t.parent)switch(t.parent.type){case"UnaryExpression":case"MemberExpression":case"SwitchCase":return;case"BinaryExpression":if("+"!==t.parent.operator)return;break;case"Property":if(t.parent.key===t)return;var n=t.parent.parent.parent;if(n&&"CallExpression"===n.type&&n.callee&&"define"===n.callee.name)return;break;case"NewExpression":case"CallExpression":var r=t.parent.callee;if(r){if("MemberExpression"===r.type&&r.property&&i[r.property.name])return;if(i[r.name])return}break;case"ArrayExpression":if(n=t.parent.parent,"CallExpression"===n.type&&("define"===n.callee.name||"require"===n.callee.name||"requirejs"===n.callee.name))return}var o=t.loc.end.line-1;e._linesWithStringLiterals[o]||(e._linesWithStringLiterals[o]=[]),e._linesWithStringLiterals[o].push(t)}},Program:function(){e._linesWithStringLiterals={}},"Program:exit":function(){if(e._linesWithStringLiterals)for(var n in e._linesWithStringLiterals)if(e._linesWithStringLiterals.hasOwnProperty(n)){var r=e.getSourceLines()[n],i=e._linesWithStringLiterals[n];if(i){for(var o,a=/\/\/\$NON-NLS-([0-9])+\$/g,s=[];null!=(o=a.exec(r));)s.push(o[1]);for(var l=0;l-1&&e.report(i.key,r["no-reserved-keys"])}}}}},"no-shadow":{description:r["no-shadow-description"],url:"http://eslint.org/docs/rules/no-shadow",rule:function(n){function i(e,t){t.variables.forEach(function(n){var r=n.name;n.defs.length&&(Object.prototype.hasOwnProperty.call(e,r)||(e[n.name]=t))})}function o(t){for(var n=t.upper,r=Object.create(null);n&&!n._symbols;)n=n.upper;return n&&e.mixin(r,n._symbols),i(r,t),t._symbols=r,r}function a(e,t){n.report(e,r["no-shadow"],{0:t})}function s(e){return e.defs.some(function(e){return"Parameter"===e.type})}function l(e){try{var r=n.getScope();if("FunctionExpression"===e.type&&e.id&&e.id.name&&(r=r.upper,"global"===r.type))return;var i=o(r);r.variables.forEach(function(e){if(e.defs.length){var t;(t=i[e.name])&&t!==r&&!s(e)&&a(e.defs[0].name,e.name)}})}catch(l){t.log(l)}}return{Program:l,FunctionDeclaration:l,FunctionExpression:l,ArrowFunctionExpression:l}}},"no-shadow-global":{description:r["no-shadow-global-description"],rule:function(e){function t(t){var i=e.env?e.env:{};switch(i.builtin=!0,t.type){case"VariableDeclarator":i[n.findESLintEnvForMember(t.id.name)]&&e.report(t.id,r["no-shadow-global"],{0:t.id.name});break;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":t.params.forEach(function(t){"Identifier"===t.type&&i[n.findESLintEnvForMember(t.name)]&&e.report(t,r["no-shadow-global-param"],{0:t.name,nls:"no-shadow-global-param"})})}}return{FunctionExpression:t,FunctionDeclaration:t,ArrowFunctionExpression:t,VariableDeclarator:t}}},"no-sparse-arrays":{description:r["no-sparse-arrays-description"],url:"http://eslint.org/docs/rules/no-sparse-arrays",rule:function(e){return{ArrayExpression:function(t){t.elements.indexOf(null)>-1&&e.report(t,r["no-sparse-arrays"])}}}},"no-throw-literal":{description:r["no-throw-literal-description"],url:"http://eslint.org/docs/rules/no-throw-literal",rule:function(e){return{ThrowStatement:function(n){try{var i=n.argument;switch(i.type){case"Identifier":if("undefined"!==i.name)return;case"Literal":case"ObjectExpression":case"ArrayExpression":e.report(i,r["no-throw-literal"])}}catch(o){t.log(o)}}}}},"no-undef":{description:r["no-undef-description"],url:"http://eslint.org/docs/rules/no-undef",rule:function(e){function i(e){return e.defs.every(function(e){return"ImplicitGlobalVariable"===e.type})}function o(e,t){var n=null;return e.variables.some(function(e){return e.name!==t.identifier.name||i(e)&&!Object.hasOwnProperty.call(e,"writeable")?!1:(n=e,!0)}),n}return{Program:function(){try{var i=e.getScope();i.through.forEach(function(t){var a=o(i,t),s=t.identifier.name;if(a)t.isWrite()&&a.writeable===!1&&e.report(t.identifier,r["no-undef-readonly"],{0:s,nls:"no-undef-readonly"});else{var l=n.findESLintEnvForMember(s),c=l?"-inenv":"",u="no-undef-defined";e.report(t.identifier,r["no-undef-defined"],{0:s,nls:u,pid:u+c})}})}catch(a){t.log(a)}}}}},"no-undef-init":{description:r["no-undef-init-description"],url:"http://eslint.org/docs/rules/no-undef-init.html",rule:function(e){return{VariableDeclarator:function(t){t.init&&"Identifier"===t.init.type&&"undefined"===t.init.name&&e.report(t.init,r["no-undef-init"])}}}},"no-unreachable":{description:r["no-unreachable-description"],url:"http://eslint.org/docs/rules/no-unreachable",rule:function(n){function i(e){switch(e.type){case"FunctionDeclaration":case"VariableDeclaration":return!0}return!1}function o(o){try{var a=0;for(a;an;n++){var r=e.leadingComments[n];if("Block"===r.type&&/\s*(?:@callback)\s+/.test(r.value))return!0}return!1}function i(i){try{var o=e.getScope(),a=o.childScopes;o.functionExpressionScope&&a&&a.length&&(o=a[0]),o.variables.forEach(function(t){if(t.defs.length&&"Parameter"===t.defs[0].type){var o=t.defs[0].name;if(!t.references.length){var a="no-unused-params";if("FunctionExpression"===i.type){if(a+="-expr",n(i)||i.params&&i.params.length>0&&n(i.params[0]))return;var s=i.parent;switch(s.type){case"Property":if(n(s)||n(s.key))return;break;case"MemberExpression":if(s=s.parent,"CallExpression"===s.type&&n(s))return;break;case"AssignmentExpression":var l=s.left;if("MemberExpression"===l.type){if(n(l))return}else if("Identifier"===l.type&&n(l))return;break;case"VariableDeclarator":if(n(s.id))return}}else"ArrowFunctionExpression"===i.type&&(a+="-arrow");e.report(o,r["no-unused-params"],{0:o.name,pid:a})}}})}catch(s){t.log(s)}}return{FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i}}},"no-unused-vars":{description:r["no-unused-vars-description"],url:"http://eslint.org/docs/rules/no-unused-vars",rule:function(e){function n(e){return e.isRead()}function i(e,t){var n=t.references;return"global"===e.type&&(n=n.concat(e.through.filter(function(e){return e.identifier.name===t.name}))),n}function o(){try{var o=e.getScope();o.variables.forEach(function(t){if(t.defs.length&&"Parameter"!==t.defs[0].type){var a=t.defs[0].node,s=i(o,t),l=a.id;s.length?s.some(n)||e.report(l,r["no-unused-vars-unread"],{0:l.name,nls:"no-unused-vars-unread"}):"FunctionDeclaration"===a.type?e.report(l,r["no-unused-vars-unused-funcdecl"],{0:l.name,nls:"no-unused-vars-unused-funcdecl"}):e.report(l,r["no-unused-vars-unused"],{0:l.name,nls:"no-unused-vars-unused"})}})}catch(a){t.log(a)}}return{Program:o,FunctionDeclaration:o,FunctionExpression:o,ArrowFunctonExpression:o}}},"no-use-before-define":{description:r["no-use-before-define-description"],url:"http://eslint.org/docs/rules/no-use-before-define",rule:function(n){function i(e,t){return"boolean"==typeof e?e:t}function o(){try{var i=n.getScope();i.references.forEach(function(t){var o,a=e.getDeclaration(t,i),c=t.identifier,u=c.name;if(a&&(o=a.defs).length&&c.range[0]-1&&("Literal"!==a.type||t.indexOf(a.value)<0)&&e.report(a,r["valid-typeof"])}}}}}};return{getRules:a,getESLintRules:s}}),n("javascript/signatures",[],function(){var e={computeSignature:function(e){if(e){if(e.sig)return e.sig;var t=this.getNameFrom(e);return{sig:t.name,details:t.details,range:this.getSignatureSourceRangeFrom(e)}}return null},getParamsFrom:function(e){if(e){var t=e.params;if(t&&t.length>0){for(var n=t.length,r="",i=0;n>i;i++)r+=t[i].name?t[i].name:"Object",n-1>i&&(r+=", ");return r}}},getPropertyListFrom:function(e,t){if(t||(t=50),0>t&&(t=0),e){var n=e.properties;if(n&&n.length>0){for(var r,i=n.length,o="{",a=0;i>a;a++){if(r=n[a].key&&n[a].key.name?n[a].key.name:"Object",o.length+r.length>t+1){o+="...";break}o+=r,i-1>a&&(o+=", ")}return o+="}"}}return"{...}"},getNameFrom:function(e){var t,n="Anonyous "+e.type;if(e&&e.type)if("FunctionDeclaration"===e.type){if(e.id&&e.id.name){n=e.id.name+"(";var r=this.getParamsFrom(e);r&&(n+=r),n+=")"}}else if("FunctionExpression"===e.type){n="function(";var i=this.getParamsFrom(e);i&&(n+=i),n+=")"}else if("ObjectExpression"===e.type)n="closure ",t=this.getPropertyListFrom(e);else if("Property"===e.type){if(e.value)if("FunctionExpression"===e.value.type){e.key?e.key.name?n=e.key.name+"(":e.key.value&&(n=e.key.value+"("):n="function(";var o=this.getParamsFrom(e.value);o&&(n+=o),n+=")"}else"ObjectExpression"===e.value.type?e.key&&(e.key.name?n=e.key.name+" ":e.key.value&&(n=e.key.value+" "),t=this.getPropertyListFrom(e.value)):e.key&&(e.key.name?n=e.key.name:e.key.value&&(n=e.key.value))}else if("VariableDeclarator"===e.type){if(e.init)if("ObjectExpression"===e.init.type)e.id&&e.id.name&&(n="var "+e.id.name+" = ",t=this.getPropertyListFrom(e.init));else if("FunctionExpression"===e.init.type)if(e.id&&e.id.name){n=e.id.name+"(";var a=this.getParamsFrom(e.init);a&&(n+=a),n+=")"}else n=this.getNameFrom(e.init)}else if("AssignmentExpression"===e.type){if(e.left&&e.right){var s="ObjectExpression"===e.right.type;if(s||"FunctionExpression"===e.right.type)if(e.left.name?n=e.left.name:"MemberExpression"===e.left.type&&(n=this.expandMemberExpression(e.left,"")),n)if(s)n+=" ",t=this.getPropertyListFrom(e.right);else{n+="(";var l=this.getParamsFrom(e.right);l&&(n+=l),n+=")"}else n=this.getNameFrom(e.right)}}else"ReturnStatement"===e.type&&e.argument&&("ObjectExpression"===e.argument.type||"FunctionExpression"===e.argument.type)&&(n="return ",t=this.getPropertyListFrom(e.argument));return{name:n,details:t}},expandMemberExpression:function(e,t){if("MemberExpression"===e.type){if(e.property){var n=e.property.name;"Literal"===e.property.type&&(n=e.property.value),n&&(t=t&&t.length>0?n+"."+t:n)}return e.object&&e.object.name&&(t=e.object.name+"."+t),this.expandMemberExpression(e.object,t)}return t},getSignatureSourceRangeFrom:function(e){var t=[0,0];return e&&("AssignmentExpression"===e.type?e.left&&e.left.range&&(t=e.left.range):"Property"===e.type?e.key&&e.key.range&&(t=e.key.range):"ReturnStatement"===e.type?(t[0]=e.range[0],t[1]=t[0]+6):e.id&&e.id.range?t=e.id.range:e.range&&(t=e.range,"FunctionExpression"===e.type&&(t[1]=t[0]+8)),t[0]<1&&(t[0]=1)),t}};return e}),n("javascript/util",[],function(){function e(e){return e.length<1?!1:isNaN(e.charCodeAt(0))?!1:e.toLocaleUpperCase().charAt(0)===e.charAt(0)}function t(e,t){if("string"!=typeof e||"string"!=typeof t)return!1;if(0===e.length)return!0;if(e.charAt(0).toLowerCase()!==t.charAt(0).toLowerCase())return!1;if(n(t,e))return!0;var i=t.toLowerCase();if(n(i,e))return!0;var o=e.toLowerCase();if(e===o)return!1;if(n(i,o))return!0;var a=r(e),s=r(t);if(a.length>s.length)return!1;for(var l=0;l=0;--r)e(t.charAt(r))&&(n.push(t.substring(r)),t=t.substring(0,r));return 0!==t.length&&n.push(t),n.reverse()}return{isUpperCase:e,looselyMatches:t,startsWith:n,toCamelCaseParts:r}}),n("javascript/contentAssist/ternAssist",["i18n!javascript/nls/messages","orion/Deferred","orion/objects","javascript/finder","javascript/compilationUnit","orion/editor/templates","javascript/contentAssist/templates","javascript/hover","eslint/load-rules-async","eslint/conf/environments","javascript/signatures","javascript/util","orion/i18nUtil"],function(e,t,n,r,i,o,a,s,l,c,u,p,f){function d(){}function h(e,t,n){return("undefined"==typeof e.template||e.template)&&j.isValid(e.prefix,n,e.offset,e)?j.getTemplateProposals(e.prefix,e.offset,e,t):[]}function m(e,t,n){var r=e.prefix;if(t&&t.kind&&"string"==typeof r&&"string"==typeof e.line)switch(t.kind){case"doc":case"jsdoc":var i=e.offset-1,o="",a=n.charAt(i);if("{*,".indexOf(a)>-1)return o;if("@"===a)return"@";for(;i>=0&&/\S/.test(a);){if(o=a+o,"@"===a)return o;if(i--,a=n.charAt(i),"{*,".indexOf(a)>-1)return o}return o}return r}function g(e,t,n){var i=r.findComment(t,e);if(i)switch(i.type){case"Block":var o=i.range[0];if("/"===n.charAt(o)&&"*"===n.charAt(o+1)){if("*"===n.charAt(o+2)&&t>o+2)return{kind:"jsdoc",node:i};if(t>o+1)return{kind:"doc",node:i}}break;case"Line":return{kind:"linedoc",node:i};default:return null}if(i=r.findNode(t,e,{parents:!0}),i&&i.parents&&i.parents.length>0){var a=i.parents.pop();switch(a.type){case"MemberExpression":return{kind:"member"};case"Program":case"BlockStatement":break;case"VariableDeclarator":if(!a.init||t=a.value.range[0]&&t-1<=a.value.range[1]?{kind:"prop"}:null;case"SwitchStatement":return{kind:"swtch"}}}return{kind:"top"}}function v(t,i,o,a,s){var u=[];if("object"!=typeof i)return u;if(!i) return u;if("jsdoc"===i.kind){var d=t.offset>t.prefix.length?t.offset-t.prefix.length-1:0;switch(a.charAt(d)){case"{":u=[];break;case".":return[];case"*":case" ":var h=r.findNodeAfterComment(i.node,o);if(h){var m;if(null!==(m=/\s*\*\s*\@name\s*(\w*)/gi.exec(t.line))){if(m[1]===t.prefix){var g=y(h);g&&u.push({proposal:g,relevance:100,name:g,description:e.funcProposalDescription,style:"emphasis",overwrite:!0,kind:"js"})}}else if(null!==(m=/\s*\*\s*\@param\s*(?:\{\w*\})?\s*(\w*)/gi.exec(t.line))&&m[1]===t.prefix){var v=b(h);if(Array.isArray(v))for(var x=0;x0){var n=e.declarations[0];
+if(n.init&&"FunctionExpression"===n.init.type)return n.init.id?n.init.id.name:n.id.name}}return null}function b(e){switch(e.type){case"FunctionDeclaration":return e.params;case"Property":if("FunctionExpression"===e.value.type)return e.value.params;break;case"ExpressionStatement":var t=e.expression;if(t&&"AssignmentExpression"===t.type&&"FunctionExpression"===t.right.type)return t.right.params;break;case"VariableDeclaration":if(e.declarations.length>0){var n=e.declarations[0];if(n.init&&"FunctionExpression"===n.init.type)return n.init.params}}return[]}function x(e,t,n){this.astManager=e,this.ternworker=t,this.pluginenvs=n,this.ternworker.addEventListener("message",F,!1),this.timeout=null}function S(e){var t=e;switch(e){case"do":t="do...while";break;case"in":t="for...in";break;case"try":case"catch":case"finally":t="try...catch";break;case"case":case"default":t="switch";break;case"if":case"else":t="if...else"}return P[e]?"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/"+t:"extends"===e?"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/"+t:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/"+t}function E(t,n){var r={relevance:100,style:"emphasis",overwrite:!0,kind:"js"};if(r.name=r.proposal=t.name,"undefined"!=typeof t.type)if(/^fn/.test(t.type))w(t,n,r);else{if("template"===t.type){var i=new o.Template(n.params.prefix,t.description,t.template,t.name),a=i.getProposal(n.params.prefix,n.params.offset,{}),l=Object.create(null);return l.type="markdown",l.content=e.templateHoverHeader,l.content+=a.proposal,a.hover=l,j.removePrefix(n.params.prefix,a),a.style="emphasis",a.kind="js",a}r.description=k(" : "+t.type)}else t.isKeyword?(r.relevance-=2,r.description=e.keywordProposalDescription,r.isKeyword=!0,t.doc=e.keywordHoverProposal,t.url=S(r.name)):r.description="";if(l=Object.create(null),l.type="markdown",l.content="",t.doc){var c=s.formatMarkdownHover(t.doc);l.content+=c?c.content:r.name}else l.content+=r.name;return t.url&&(l.content+=f.formatMessage.call(null,e.onlineDocumentationProposalEntry,t.url)),r.hover=l,r}function w(e,t,n){var r=[];n.relevance+=5;var i=e.type.slice(2),o=/\s*->\s*(\?|(?:fn\(.*\))|(?:\[.*\])|(?:\w*\.*\w*))$/.exec(i);o?(n.description=" : "+k(o[1]),i=i.slice(0,o.index)):n.description="";var a=e.name+"(",s=_(i.slice(1,i.length-1));if(s)for(var l=0;l0&&(n.positions=r)}function _(e){if(e&&e.length>0){for(var t,n=[],r=0,i="",o=0,a=!1;or?(n.push(i),i="",a=!0):","===t?(o++,1>r&&(a=!1)):!a&&1>r&&(i+=t),o++;return n}return null}function k(e){return e=e.replace(/:\s*\?/g,": any")}function C(e){var t=/([^/.]+\/[^\/]+)$/g.exec(e);return t?t[1]:(t=/\/([^\/]+)$/g.exec(e),t?t[1]:e)}function T(t,n){for(var r=n.envs?n.envs:{},i=Object.create(null),o=[],a=[],s=0;s0?(a.sort(L),a.splice(0,0,{proposal:"",description:e.keywordAssistHeader,style:"noemphasis_title",unselectable:!0}),f=[].concat(o.sort(L),a)):f=[].concat(o.sort(L));var d=Object.keys(i);for(s=0;s",isValid:function(e,t,n){var r=t.charAt(n-e.length-1);return!r||-1===this.uninterestingChars.indexOf(r)},getTemplateProposals:function(t,n,r,i){for(var o=[],s=i?i.kind:null,l=a.getTemplatesForKind(s),c=0;ct.name?1:0}),o.splice(0,0,{proposal:"",description:e.templateAssistHeader,style:"noemphasis_title",unselectable:!0})),o},templateMatches:function(e,t,n,r){if(e.match(t)){if("undefined"!=typeof r.line){var i=r.line.length-("undefined"!=typeof t?t.length:0),o=r.line.slice(0,i>-1?i:0).trim();if(n&&"jsdoc"===n.kind)return!/^[\/]?[\*]+\s*[@]/gi.test(o)}if(n&&"doc"===n.kind){var a=n.node.value.trim();if(a){var s=r.offset-t.length-n.node.range[0];if(s>-1){var l=/^(eslint-\w+|eslint?)(\s|$)/gi.exec(a.slice(0,s));if(l)return!1}}}return!0}return!1}});var j=new d,A=null,F=function(e){if(A&&"object"==typeof e.data){var t=e.data;"completions"===t.request&&(A.resolve(A.proposals?[].concat(T(t.proposals?t.proposals:[],A.args),A.proposals):T(t.proposals,A.args)),A=null)}};n.mixin(x.prototype,{initialize:function(){},computeContentAssist:function(e,t){var n=this;return e.getFileMetadata().then(function(o){return"text/html"===o.contentType.id?e.getText().then(function(e){var a=r.findScriptBlocks(e);if(a&&a.length>0){var s=new i(a,o);if(s.validOffset(t.offset))return n.astManager.getAST(s.getEditorContext()).then(function(e){return n.pluginenvs().then(function(r){return n.doAssist(e,t,o,{ecma5:!0,ecma6:!0,browser:!0,jQuery:!0},r)})})}}):n.astManager.getAST(e).then(function(e){return n.pluginenvs().then(function(r){return n.doAssist(e,t,o,{ecma5:!0,ecma6:!0,browser:!0,jQuery:!0},r)})})})},doAssist:function(e,n,r,i,o){var a=g(e,n.offset,e.source);n.prefix=m(n,a,e.source);var s=[].concat(v(n,a,e,e.source,o),h(n,a,e.source));if(!a||"jsdoc"!==a.kind&&"doc"!==a.kind&&"linedoc"!==a.kind){var l=this.getActiveEnvironments(e,i),c=[{type:"full",name:r.location,text:e.source}];"undefined"==typeof n.keywords&&(n.keywords=!0);var u={params:n,meta:r,envs:l,files:c};return this.ternworker.postMessage({request:"completions",args:u}),A&&A.resolve(),A=new t,A.proposals=s,A.args=u,this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){A&&A.resolve([]),this.timeout=null},5e3),A}return(new t).resolve(s)},getActiveEnvironments:function(e,t){var r=Object.create(null);if(n.mixin(r,t),e.comments)for(var i=0;it.relevance)return-1;if(t.relevance>e.relevance)return 1;var n=e.name,r=t.name;return r>n?-1:n>r?1:0};return{TernContentAssist:x}}),n("esrecurse/esrecurse",["estraverse"],function(e){"use strict";function n(e){return null==e?!1:"object"==typeof e&&"string"==typeof e.type}function r(t,n){return(t===e.Syntax.ObjectExpression||t===e.Syntax.ObjectPattern)&&"properties"===n}function i(e){this.__visitor=e}var o,a;return e=t("estraverse"),o=Array.isArray,o||(o=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),a=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},i.prototype.visitChildren=function(t){var i,o,s,l,c,u,p;if(null!=t)for(i=t.type||e.Syntax.Property,o=e.VisitorKeys[i],o||(o=a(t)),s=0,l=o.length;l>s;++s)if(p=t[o[s]])if(Array.isArray(p))for(c=0,u=p.length;u>c;++c)p[c]&&(n(p[c])||r(i,o[s]))&&this.visit(p[c]);else n(p)&&this.visit(p)},i.prototype.visit=function(t){var n;if(null!=t)return n=t.type||e.Syntax.Property,this.__visitor[n]?void this.__visitor[n].call(this,t):void this.visitChildren(t)},{version:"1.2.0",Visitor:i,visit:function(e,t){var n=new i(t);n.visit(e)}}}),n("escope",["esrecurse/esrecurse","estraverse","orion/objects"],function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e._super=t}function i(e,t){if(!e)throw new Error(t)}function o(){return{optimistic:!1,directive:!1,sourceType:"script",ecmaVersion:5}}function a(e,t){function n(e){return"object"==typeof e&&e instanceof Object&&!(e instanceof RegExp)}var r,i;for(r in t)t.hasOwnProperty(r)&&(i=t[r],n(i)?n(e[r])?a(e[r],i):e[r]=a({},i):e[r]=i);return e}function s(e,t,n,r,i,o){this.identifier=e,this.from=t,this.tainted=!1,this.resolved=null,this.flag=n,this.isWrite()&&(this.writeExpr=r,this.partial=o),this.__maybeImplicitGlobal=i}function l(e,t){this.name=e,this.identifiers=[],this.references=[],this.defs=[],this.tainted=!1,this.stack=!0,this.scope=t}function c(e,t,n,r){var i,o,a,s,l;if(e.upper&&e.upper.isStrict)return!0;if(t.type===y.ArrowFunctionExpression)return!0;if(n)return!0;if("class"===e.type||"module"===e.type)return!0;if("block"===e.type||"switch"===e.type)return!1;if("function"===e.type)i=t.body;else{if("global"!==e.type)return!1;i=t}if(r){for(o=0,a=i.body.length;a>o&&(s=i.body[o],"DirectiveStatement"===s.type);++o)if('"use strict"'===s.raw||"'use strict'"===s.raw)return!0}else for(o=0,a=i.body.length;a>o&&(s=i.body[o],s.type===y.ExpressionStatement)&&(l=s.expression,l.type===y.Literal&&"string"==typeof l.value);++o)if(null!=l.raw){if('"use strict"'===l.raw||"'use strict'"===l.raw)return!0}else if("use strict"===l.value)return!0;return!1}function u(e,t){var n;e.scopes.push(t),n=e.__nodeToScope.get(t.block),n?n.push(t):e.__nodeToScope.set(t.block,[t])}function p(e,t,n,r){this.type=r===E?"TDZ":r===x?"module":t.type===y.BlockStatement?"block":t.type===y.SwitchStatement?"switch":t.type===y.FunctionExpression||t.type===y.FunctionDeclaration||t.type===y.ArrowFunctionExpression?"function":t.type===y.CatchClause?"catch":t.type===y.ForInStatement||t.type===y.ForOfStatement||t.type===y.ForStatement?"for":t.type===y.WithStatement?"with":t.type===y.ClassExpression||t.type===y.ClassDeclaration?"class":"global",this.set=new Map,this.taints=new Map,this.dynamic="global"===this.type||"with"===this.type,this.block=t,this.through=[],this.variables=[],this.references=[],this.variableScope="global"===this.type||"function"===this.type||"module"===this.type?this:e.__currentScope.variableScope,this.functionExpressionScope=!1,this.directCallToEvalScope=!1,this.thisFound=!1,this.__left=[],r===S?(this.__define(t.id,{type:l.FunctionName,name:t.id,node:t}),this.functionExpressionScope=!0):("function"===this.type&&this.block.type!==y.ArrowFunctionExpression&&this.__defineArguments(),t.type===y.FunctionExpression&&t.id&&e.__nestFunctionExpressionNameScope(t,n)),this.upper=e.__currentScope,this.isStrict=c(this,t,n,e.__useDirective()),this.childScopes=[],e.__currentScope&&e.__currentScope.childScopes.push(this),e.__currentScope=this,"global"===this.type&&(e.globalScope=this,e.globalScope.implicit={set:new Map,variables:[],left:[]}),u(e,this)}function f(e){this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=e}function d(e,n){t.traverse(e,{enter:function(e,t){var r,i,o,a;switch(e.type){case y.Identifier:null===t&&n(e,!0);break;case y.SpreadElement:e.argument.type===y.Identifier&&n(e.argument,!1);break;case y.ObjectPattern:for(r=0,i=e.properties.length;i>r;++r)a=e.properties[r],a.shorthand?n(a.key,!1):a.value.type!==y.Identifier||n(a.value,!1);break;case y.ArrayPattern:for(r=0,i=e.elements.length;i>r;++r)o=e.elements[r],o&&o.type===y.Identifier&&n(o,!1)}}})}function h(e){var t=e.type;return t===y.Identifier||t===y.ObjectPattern||t===y.ArrayPattern||t===y.SpreadElement}function m(t,n){e.Visitor.call(this,this),this.declaration=t,this.referencer=n}function g(t){e.Visitor.call(this,this),this.scopeManager=t,this.parent=null,this.isInnerMethodDefinition=!1}function v(e,t){var n,r,s;return s=a(o(),t),n=new f(s),r=new g(n),r.visit(e),i(null===n.__currentScope),n}var y=t.Syntax;s.READ=1,s.WRITE=2,s.RW=s.READ|s.WRITE,s.prototype.isStatic=function(){return!this.tainted&&this.resolved&&this.resolved.scope.isStatic()},s.prototype.isWrite=function(){return!!(this.flag&s.WRITE)},s.prototype.isRead=function(){return!!(this.flag&s.READ)},s.prototype.isReadOnly=function(){return this.flag===s.READ},s.prototype.isWriteOnly=function(){return this.flag===s.WRITE},s.prototype.isReadWrite=function(){return this.flag===s.RW},l.CatchClause="CatchClause",l.Parameter="Parameter",l.FunctionName="FunctionName",l.ClassName="ClassName",l.Variable="Variable",l.ImportBinding="ImportBinding",l.TDZ="TDZ",l.ImplicitGlobalVariable="ImplicitGlobalVariable";var b=0,x=1,S=2,E=3;return p.prototype.__close=function(e){var t,n,r,i,o,a;if(!this.dynamic||e.__isOptimistic())for(t=0,n=this.__left.length;n>t;++t)r=this.__left[t],this.__resolve(r)||this.__delegateToUpperScope(r);else if("with"===this.type)for(t=0,n=this.__left.length;n>t;++t)r=this.__left[t],r.tainted=!0,this.__delegateToUpperScope(r);else for(t=0,n=this.__left.length;n>t;++t){r=this.__left[t],i=this;do i.through.push(r),i=i.upper;while(i)}if("global"===this.type){for(o=[],t=0,n=this.__left.length;n>t;++t)r=this.__left[t],r.__maybeImplicitGlobal&&!this.set.has(r.identifier.name)&&o.push(r.__maybeImplicitGlobal);for(t=0,n=o.length;n>t;++t)a=o[t],this.__defineImplicit(a.pattern,{type:l.ImplicitGlobalVariable,name:a.pattern,node:a.node});this.implicit.left=this.__left}this.__left=null,e.__currentScope=this.upper},p.prototype.__resolve=function(e){var t,n;return n=e.identifier.name,this.set.has(n)?(t=this.set.get(n),t.references.push(e),t.stack=t.stack&&e.from.variableScope===this.variableScope,e.tainted&&(t.tainted=!0,this.taints.set(t.name,!0)),e.resolved=t,!0):!1},p.prototype.__delegateToUpperScope=function(e){this.upper&&this.upper.__left.push(e),this.through.push(e)},p.prototype.__defineGeneric=function(e,t,n,r,i){var o;o=t.get(e),o||(o=new l(e,this),t.set(e,o),n.push(o)),i&&o.defs.push(i),r&&o.identifiers.push(r)},p.prototype.__defineArguments=function(){this.__defineGeneric("arguments",this.set,this.variables),this.taints.set("arguments",!0)},p.prototype.__defineImplicit=function(e,t){e&&e.type===y.Identifier&&this.__defineGeneric(e.name,this.implicit.set,this.implicit.variables,e,t)},p.prototype.__define=function(e,t){e&&e.type===y.Identifier&&this.__defineGeneric(e.name,this.set,this.variables,e,t)},p.prototype.__referencing=function(e,t,n,r,i){var o;e&&e.type===y.Identifier&&(o=new s(e,this,t||s.READ,n,r,!!i),this.references.push(o),this.__left.push(o))},p.prototype.__detectEval=function(){var e;e=this,this.directCallToEvalScope=!0;do e.dynamic=!0,e=e.upper;while(e)},p.prototype.__detectThis=function(){this.thisFound=!0},p.prototype.__isClosed=function(){return null===this.__left},p.prototype.resolve=function(e){var t,n,r;for(i(this.__isClosed(),"scope should be closed"),i(e.type===y.Identifier,"target should be identifier"),n=0,r=this.references.length;r>n;++n)if(t=this.references[n],t.identifier===e)return t;return null},p.prototype.isStatic=function(){return!this.dynamic},p.prototype.isArgumentsMaterialized=function(){var e;return"function"!==this.type?!0:this.isStatic()?(e=this.set.get("arguments"),i(e,"always have arguments variable"),e.tainted||0!==e.references.length):!0},p.prototype.isThisMaterialized=function(){return"function"!==this.type?!0:this.isStatic()?this.thisFound:!0},p.prototype.isUsedName=function(e){if(this.set.has(e))return!0;for(var t=0,n=this.through.length;n>t;++t)if(this.through[t].identifier.name===e)return!0;return!1},f.prototype.__useDirective=function(){return this.__options.directive},f.prototype.__isOptimistic=function(){return this.__options.optimistic},f.prototype.__ignoreEval=function(){return this.__options.ignoreEval},f.prototype.isModule=function(){return"module"===this.__options.sourceType},f.prototype.__get=function(e){return this.__nodeToScope.get(e)},f.prototype.acquire=function(e,t){function n(e){return"function"===e.type&&e.functionExpressionScope?!1:"TDZ"===e.type?!1:!0}var r,i,o,a;if(r=this.__get(e),!r||0===r.length)return null;if(1===r.length)return r[0];if(t){for(o=r.length-1;o>=0;--o)if(i=r[o],n(i))return i}else for(o=0,a=r.length;a>o;++o)if(i=r[o],n(i))return i;return null},f.prototype.acquireAll=function(e){return this.__get(e)},f.prototype.release=function(e,t){var n,r;return n=this.__get(e),n&&n.length?(r=n[0].upper,r?this.acquire(r.block,t):null):null},f.prototype.attach=function(){},f.prototype.detach=function(){},f.prototype.__nestScope=function(e,t){return new p(this,e,t,b)},f.prototype.__nestModuleScope=function(e){return new p(this,e,!1,x)},f.prototype.__nestTDZScope=function(e){return new p(this,e,!1,E)},f.prototype.__nestFunctionExpressionNameScope=function(e,t){return new p(this,e,t,S)},f.prototype.__isES6=function(){return this.__options.ecmaVersion>=6},r(m,e.Visitor),m.prototype.visitImport=function(e,t){var n=this;n.referencer.visitPattern(e,function(e){n.referencer.currentScope().__define(e,{type:l.ImportBinding,name:e,node:t,parent:n.declaration})})},m.prototype.ImportNamespaceSpecifier=function(e){e.id&&this.visitImport(e.id,e)},m.prototype.ImportDefaultSpecifier=function(e){this.visitImport(e.id,e)},m.prototype.ImportSpecifier=function(e){e.name?this.visitImport(e.name,e):this.visitImport(e.id,e)},r(g,e.Visitor),n.mixin(g.prototype,{currentScope:function(){return this.scopeManager.__currentScope},close:function(e){for(;this.currentScope()&&e===this.currentScope().block;)this.currentScope().__close(this.scopeManager)},pushInnerMethodDefinition:function(e){var t=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=e,t},popInnerMethodDefinition:function(e){this.isInnerMethodDefinition=e},materializeTDZScope:function(e,t){this.scopeManager.__nestTDZScope(e,t),this.visitVariableDeclaration(this.currentScope(),l.TDZ,t.left,0)},materializeIterationScope:function(e){var t,n=this;this.scopeManager.__nestScope(e,!1),t=e.left,this.visitVariableDeclaration(this.currentScope(),l.Variable,t,0),this.visitPattern(t.declarations[0].id,function(t){n.currentScope().__referencing(t,s.WRITE,e.right,null,!0)})},visitPattern:function(e,t){d(e,t)},visitFunction:function(e){var t,n,r=this;for(e.type===y.FunctionDeclaration&&this.currentScope().__define(e.id,{type:l.FunctionName,name:e.id,node:e}),this.scopeManager.__nestScope(e,this.isInnerMethodDefinition),t=0,n=e.params.length;n>t;++t)this.visitPattern(e.params[t],function(n){r.currentScope().__define(n,{type:l.Parameter,name:n,node:e,index:t})});e.body.type===y.BlockStatement?this.visitChildren(e.body):this.visit(e.body),this.close(e)},visitClass:function(e){e.type===y.ClassDeclaration&&this.currentScope().__define(e.id,{type:l.ClassName,name:e.id,node:e}),this.visit(e.superClass),this.scopeManager.__nestScope(e),e.id&&this.currentScope().__define(e.id,{type:l.ClassName,name:e.id,node:e}),this.visit(e.body),this.close(e)},visitProperty:function(e){var t,n;e.computed&&this.visit(e.key),n=e.type===y.MethodDefinition||e.method,n&&(t=this.pushInnerMethodDefinition(!0)),this.visit(e.value),n&&this.popInnerMethodDefinition(t)},visitForIn:function(e){var t=this;e.left.type===y.VariableDeclaration&&"var"!==e.left.kind?(this.materializeTDZScope(e.right,e),this.visit(e.right),this.close(e.right),this.materializeIterationScope(e),this.visit(e.body),this.close(e)):(e.left.type===y.VariableDeclaration?(this.visit(e.left),this.visitPattern(e.left.declarations[0].id,function(n){t.currentScope().__referencing(n,s.WRITE,e.right,null,!0)})):(h(e.left)||this.visit(e.left),this.visitPattern(e.left,function(n){var r=null;t.currentScope().isStrict||(r={pattern:n,node:e}),t.currentScope().__referencing(n,s.WRITE,e.right,r,!0)})),this.visit(e.right),this.visit(e.body))},visitVariableDeclaration:function(e,t,n,r){var i,o,a=this;i=n.declarations[r],o=i.init,this.visitPattern(i.id,function(l,c){e.__define(l,{type:t,name:l,node:i,index:r,kind:n.kind,parent:n}),o&&a.currentScope().__referencing(l,s.WRITE,o,null,!c)})},AssignmentExpression:function(e){var t=this;h(e.left)?"="===e.operator?this.visitPattern(e.left,function(n,r){var i=null;t.currentScope().isStrict||(i={pattern:n,node:e}),t.currentScope().__referencing(n,s.WRITE,e.right,i,!r)}):t.currentScope().__referencing(e.left,s.RW,e.right):this.visit(e.left),this.visit(e.right)},CatchClause:function(e){var t=this;this.scopeManager.__nestScope(e),this.visitPattern(e.param,function(n){t.currentScope().__define(n,{type:l.CatchClause,name:e.param,node:e})}),this.visit(e.body),this.close(e)},Program:function(e){this.scopeManager.__nestScope(e),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(e),this.visitChildren(e),this.close(e)},Identifier:function(e){this.currentScope().__referencing(e)},UpdateExpression:function(e){h(e.argument)?this.currentScope().__referencing(e.argument,s.RW,null):this.visitChildren(e)},MemberExpression:function(e){this.visit(e.object),e.computed&&this.visit(e.property)},Property:function(e){this.visitProperty(e)},MethodDefinition:function(e){this.visitProperty(e)},BreakStatement:function(){},ContinueStatement:function(){},LabeledStatement:function(e){this.visit(e.body)},ForStatement:function(e){e.init&&e.init.type===y.VariableDeclaration&&"var"!==e.init.kind&&this.scopeManager.__nestScope(e),this.visitChildren(e),this.close(e)},ClassExpression:function(e){this.visitClass(e)},ClassDeclaration:function(e){this.visitClass(e)},CallExpression:function(e){this.scopeManager.__ignoreEval()||e.callee.type!==y.Identifier||"eval"!==e.callee.name||this.currentScope().variableScope.__detectEval(),this.visitChildren(e)},BlockStatement:function(e){this.scopeManager.__isES6()&&this.scopeManager.__nestScope(e),this.visitChildren(e),this.close(e)},ThisExpression:function(){this.currentScope().variableScope.__detectThis()},WithStatement:function(e){this.visit(e.object),this.scopeManager.__nestScope(e),this.visit(e.body),this.close(e)},VariableDeclaration:function(e){var t,n,r,i;for(t="var"===e.kind?this.currentScope().variableScope:this.currentScope(),n=0,r=e.declarations.length;r>n;++n)i=e.declarations[n],this.visitVariableDeclaration(t,l.Variable,e,n),i.init&&this.visit(i.init)},SwitchStatement:function(e){var t,n;for(this.visit(e.discriminant),this.scopeManager.__isES6()&&this.scopeManager.__nestScope(e),t=0,n=e.cases.length;n>t;++t)this.visit(e.cases[t]);this.close(e)},FunctionDeclaration:function(e){this.visitFunction(e)},FunctionExpression:function(e){this.visitFunction(e)},ForOfStatement:function(e){this.visitForIn(e)},ForInStatement:function(e){this.visitForIn(e)},ArrowFunctionExpression:function(e){this.visitFunction(e)},ImportDeclaration:function(e){var t;i(this.scopeManager.__isES6()&&this.scopeManager.isModule()),t=new m(e,this),t.visit(e)},ExportDeclaration:function(e){return e.source?void 0:e.declaration?void this.visit(e.declaration):void this.visitChildren(e)},ExportSpecifier:function(e){this.visit(e.id)}}),{version:"2.0.4",Reference:s,Variable:l,Scope:p,ScopeManager:f,analyze:v}}),n("eslint/rules",["./load-rules-async","exports"],function(e,t){function n(e,t){i[e]=t}function r(){var t=e.getESLintRules();Object.keys(t).forEach(function(e){n(e,t[e])})}var i=Object.create(null);return t.define=n,t.load=r,t["import"]=function(e,t){Object.keys(e).forEach(function(r){var i=t+"/"+r,o=e[r];n(i,o)})},t.get=function(e){return i[e]},t.testClear=function(){i=Object.create(null)},r(),t}),n("eslint/rule-context",[],function(){function e(e,n,r,i,o,a,s){Object.defineProperty(this,"env",{value:s}),Object.defineProperty(this,"id",{value:e}),Object.defineProperty(this,"options",{value:i}),Object.defineProperty(this,"settings",{value:o}),Object.defineProperty(this,"ecmaFeatures",{value:Object.create(a)}),Object.freeze(this.ecmaFeatures),t.forEach(function(e){this[e]=function(){return n[e].apply(n,arguments)}},this),this.report=function(t,i,o,a){n.report(e,r,t,i,o,a)}}var t=["getAllComments","getAncestors","getComments","getFilename","getFirstToken","getFirstTokens","getJSDocComment","getLastToken","getLastTokens","getNodeByRangeIndex","getScope","getSource","getSourceLines","getTokenAfter","getTokenBefore","getTokenByRangeStart","getTokens","getTokensAfter","getTokensBefore","getTokensBetween"];return e.prototype={constructor:e},e}),n("eslint/events",["orion/EventTarget","orion/objects"],function(e,t){function n(){this._eventTarget=new e}function r(e,t){if("function"!=typeof t)throw new Error("addListener only takes instances of Function");var r,o="undefined"!=typeof this._maxListeners?this._maxListeners:i;return 0!==o&&(r=n.listenerCount(this,e)>=o)&&"undefined"!=typeof console&&console.error("Possible EventEmitter memory leak: "+r+" listeners added."),this.emit("newListener",t),this._eventTarget.addEventListener(e,t),this}var i=10;return n.prototype.constructor=n,t.mixin(n.prototype,{_maxListeners:10,addListener:r,on:r,once:function(e,t){var n=this,r=function(){try{t.apply(this,Array.prototype.slice.call(arguments))}finally{n.removeListener(e,r)}};return this.addListener(e,r),this},removeListener:function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");return this._eventTarget.removeEventListener(e,t),this.emit("removeListener",t),this},removeAllListeners:function(e){var t=this._eventTarget._namedListeners,n=this,r=function(e){var r=t[e];r&&(r.forEach(n.emit.bind(n,"removeListener")),delete t[e])};return"undefined"==typeof e?Object.keys(t).forEach(r):r(e),this},setMaxListeners:function(e){if("number"!=typeof e)throw new Error("setMaxListeners only takes a number");this._maxListeners=e},listeners:function(e){var t=this._eventTarget._namedListeners[e];return t?t.slice():[]},emit:function(e){var t=this._eventTarget._namedListeners[e];if(!t){if("error"===e)throw new Error("Uncaught, unspecified 'error' event.");return!1}var n=Array.prototype.slice.call(arguments,1),r=this;return t.forEach(function(e){e.apply(r,n)}),!0}}),n.listenerCount=function(e,t){var n=e._eventTarget._namedListeners[t];return n?n.length:0},{EventEmitter:n}}),n("eslint/token-store",[],function(){return function(e){function t(t,n){var r,o=[];for(r=Math.max(0,t);n>r&&i>r;r++)o.push(e[r]);return o}function n(e){var t=e.range[1],n=l[t];return"undefined"==typeof n&&(n=s[t]-1),isNaN(n)&&(n=i-1),n}var r,i,o,a={},s=Object.create(null),l=Object.create(null);for(r=0,i=e.length;i>r;r++)o=e[r].range,s[o[0]]=r,l[o[1]]=r;return a.getTokensBefore=function(e,n){var r=s[e.range[0]];return t(r-(n||0),r)},a.getTokenBefore=function(t,n){return e[s[t.range[0]]-(n||0)-1]},a.getTokensAfter=function(e,r){var i=n(e)+1;return t(i,i+(r||0))},a.getTokenAfter=function(t,r){return e[n(t)+(r||0)+1]},a.getTokens=function(e,r,i){return t(s[e.range[0]]-(r||0),n(e)+(i||0)+1)},a.getFirstTokens=function(e,r){var i=s[e.range[0]];return t(i,Math.min(n(e)+1,i+(r||0)))},a.getFirstToken=function(t,n){return e[s[t.range[0]]+(n||0)]},a.getLastTokens=function(e,r){var i=n(e)+1;return t(Math.max(s[e.range[0]],i-(r||0)),i)},a.getLastToken=function(t,r){return e[n(t)-(r||0)]},a.getTokensBetween=function(e,r,i){return i=i||0,t(n(e)+1-i,s[r.range[0]]+i)},a.getTokenByRangeStart=function(t){return e[s[t]]||null},a}}),n("eslint/eslint",["esprima","estraverse","escope","eslint/conf/environments","./rules","./util","./rule-context","./events","./token-store","require","module"],function(e,t,n,r,i,o,a,s,l,c,u){function p(e,t){Object.keys(t).forEach(function(n){e[n]=t[n]})}function f(e){var t={};return e=e.replace(/\s*:\s*/g,":"),e=e.replace(/\s*,\s*/g,","),e.split(/\s|,+/).forEach(function(e){if(e){var n,r=e.indexOf(":");-1!==r&&(n=e.substring(r+1,e.length),e=e.substring(0,r)),t[e]="true"===n}}),t}function d(e){var t={};e=e.replace(/([a-z0-9\-\/]+):/g,'"$1":').replace(/(\]|[0-9])\s+(?=")/,"$1,");try{t=JSON.parse("{"+e+"}")}catch(n){}return t}function h(e){var t={};return e=e.replace(/\s*,\s*/g,","),e.split(/,+/).forEach(function(e){e=e.trim(),e&&(t[e]=!0)}),t}function m(e,t){var n=null;return e.variables.some(function(e){return e.name===t?(n=e,!0):!1}),n}function g(e,t,i){var o={},a={},s=r.builtin;p(o,s),Object.keys(i.env).forEach(function(e){if(i.env[e]){var t=r[e]&&r[e].globals;t&&p(o,t)}}),p(o,i.globals),p(a,i.astGlobals),Object.keys(o).forEach(function(e){var r=m(t,e);r||(r=new n.Variable(e,t),r.eslintExplicitGlobal=!1,t.variables.push(r)),r.writeable=o[e]}),Object.keys(a).forEach(function(e){var r=m(t,e);r||(r=new n.Variable(e,t),r.eslintExplicitGlobal=!0,t.variables.push(r)),r.writeable=a[e]})}function v(e,t,n){n.length?n.forEach(function(n){e.push({start:t,end:null,rule:n})}):e.push({start:t,end:null,rule:null})}function y(e,t,n){var r;if(n.length)n.forEach(function(n){for(r=e.length-1;r>=0;r--)if(!e[r].end&&e[r].rule===n){e[r].end=t;break}});else{var i;for(r=e.length-1;r>=0&&(!i||i===e[r].start);r--)e[r].end||(e[r].end=t,i=e[r].start)}}function b(e,t,n){var i={astGlobals:{},rules:{},env:{}},a={};e.comments.forEach(function(e){if("Block"===e.type){var t=e.value.trim(),r=/^(eslint-\w+|eslint|globals?)(\s|$)/.exec(t);if(r)switch(t=t.substring(r.index+r[1].length),r[1]){case"globals":case"global":o.mixin(i.astGlobals,f(t));break;case"eslint-env":o.mixin(i.env,h(t));break;case"eslint-disable":v(n,e.loc.start,Object.keys(h(t)));break;case"eslint-enable":y(n,e.loc.start,Object.keys(h(t)));break;case"eslint":var s=d(t);Object.keys(s).forEach(function(e){var t=s[e];("number"==typeof t||Array.isArray(t)&&"number"==typeof t[0])&&(a[e]=t)})}}}),Object.keys(i.env).forEach(function(e){var t=r[e]&&r[e].rules;i.env[e]&&t&&o.mixin(i.rules,t)}),o.mixin(i.rules,a),o.mergeConfigs(t,i)}function x(e,t,n){for(var r=0,i=e.length;i>r;r++){var o=e[r];if((!o.rule||o.rule===t)&&(n.line>o.start.line||n.line===o.start.line&&n.column>=o.start.column)&&(!o.end||n.line=0?t.splice(t.indexOf(e.loc),1):(t.push(e.loc),d.emit(e.type+n,e))})}function s(e){o(e,F,"Comment")}function u(e){o(e,P,"Comment:exit")}function p(e){return"number"==typeof e?e:Array.isArray(e)?e[0]:0}function f(e){return Array.isArray(e)?e.slice(1):[]}var d=Object.create(new E),h=[],m=null,v=[],y=null,w=null,_=null,k=null,C=null,T=null,j=null,A=[],F=[],P=[],L=null;d.setMaxListeners(0),d.reset=function(){this.removeAllListeners(),h=[],L=null,y=null,m=null,v=[],w=null,_=null,k=null,C=null,j=null,A=[],F=[],P=[]},d.verify=function(e,o,c,x){var E,F;T=c,x||this.reset();var P=e&&"string"==typeof e?e:e.source;return 0===P.trim().length?(m=P,h):(o=S(o||{}),E=e&&"object"==typeof e?e:r(P.replace(/^#!([^\r\n]+)/,function(e,t){return F=t,"//"+t}),o),E&&(L=E,b(E,o,A),Object.keys(o.rules).filter(function(e){return p(o.rules[e])>0}).forEach(function(e){var t,n=i.get(e),r=p(o.rules[e]),s=f(o.rules[e]);if(!n)throw new Error("Definition for rule '"+e+"' was not found.");try{t=n(new a(e,d,r,s,o.settings,o.ecmaFeatures,o.env)),Object.keys(t).forEach(function(e){d.on(e,t[e])})}catch(l){throw l.message="Error while loading rule '"+e+"': "+l.message,l
+}}),y=o,m=P,j=new t.Controller,C=n.analyze(E,{ignoreEval:!0,ecmaVersion:y.ecmaFeatures.blockBindings?6:5}),_=C.scopes,k=[],_.forEach(function(e,t){var n=e.block.range[0];k[n]||(k[n]=t)}),v=m.split(/\r?\n|\u2028|\u2029/g),Object.freeze(v),w=l(E.tokens),Object.keys(w).forEach(function(e){d[e]=w[e]}),g(E,_[0],y),F&&E.comments.length&&E.comments[0].value===F&&(E.comments.splice(0,1),E.body.length&&E.body[0].leadingComments&&E.body[0].leadingComments[0].value===F&&E.body[0].leadingComments.splice(0,1)),j.traverse(E,{enter:function(e,t){var n=d.getComments(e);s(n.leading),e.parent=t,d.emit(e.type,e),s(n.trailing)},leave:function(e){var t=d.getComments(e);u(t.trailing),d.emit(e.type+":exit",e),u(t.leading)}})),h.sort(function(e,t){var n=e.line-t.line;return 0===n?e.column-t.column:n}),h)},d.report=function(e,t,n,r,i,o,a){"string"==typeof r&&(a=o,o=i,i=r,r=n.loc.start),i=i.replace(/\$\{([^\}]+)\}/g,function(e,t){return o[t]}),x(A,e,r)||h.push({ruleId:e,severity:t,node:n,message:i,args:o,line:r.line,column:r.column,nodeType:n.type,source:v[r.line-1]||"",related:"undefined"!=typeof a?a:null})},d.getSource=function(e,t,n){return e?null!==m?m.slice(Math.max(e.range[0]-(t||0),0),e.range[1]+(n||0)):null:m},d.getSourceLines=function(){return v},d.getAllComments=function(){return L.comments},d.getComments=function(e){var t=e.leadingComments||[],n=e.trailingComments||[];return"Program"===e.type&&0===e.body.length&&(t=e.comments),{leading:t,trailing:n}},d.getJSDocComment=function(e){function t(e){if(e)for(var t=e.length-1;t>=0;t--)if("Block"===e[t].type&&"*"===e[t].value.charAt(0)){if(r-e[t].loc.end.line<=1)return e[t];break}return null}var n=e.parent,r=e.loc.start.line;switch(e.type){case"FunctionDeclaration":return t(e.leadingComments);case"ArrowFunctionExpression":case"FunctionExpression":if("CallExpression"!==n.type||n.callee!==e){for(;n&&!n.leadingComments&&!/Function/.test(n.type);)n=n.parent;return n&&"FunctionDeclaration"!==n.type?t(n.leadingComments):null}default:return null}},d.getAncestors=function(){return j.parents()},d.getNodeByRangeIndex=function(e){var n=null;return t.traverse(j.root,{enter:function(t){t.range[0]<=e&&e=0;--r)if(t=C.acquire(e[r]))return t}return _[0]},d.getFilename=function(){return"string"==typeof T?T:""};var I=d.defineRule=function(e,t){i.define(e,t)};return d.defineRules=function(e){Object.getOwnPropertyNames(e).forEach(function(t){I(t,e[t])})},d.defaults=function(){return c("../conf/eslint.json")},d}(),u.exports}),n("eslint",["eslint/eslint"],function(e){return e}),n("javascript/validator",["eslint","orion/objects","javascript/astManager","javascript/finder","orion/i18nUtil","i18n!javascript/nls/problems","orion/metrics"],function(e,t,n,r,i,o,a){function s(e,t){this.astManager=e,this.cuprovider=t,p.setDefaults()}function l(e){var t=2,n=p.rules[e.ruleId];if(Array.isArray(n)){var r=e.related,i=r&&r.type;t="missing-doc"===e.ruleId&&void 0!==n[1][i]?n[1][i]:n[0]}else t=n;switch(t){case 1:return"warning";case 2:return"error"}return"error"}function c(e){if(e.args){if(e.args.pid)return e.args.pid;if(e.args.nls)return e.args.nls}return e.ruleId}function u(e){var t=e.start,n=e.end;if(e.node&&(t=e.node.range[0],n=e.node.range[1],e.related&&e.related.range)){var r=e.related;t=r.range[0],n=r.range[1]}var a=e.args&&e.args.nls?e.args.nls:e.ruleId,s=e.args||Object.create(null),u=e.message;a&&o[a]&&(u=i.formatMessage.call(null,o[a],s));var p={id:c(e),description:u,severity:l(e)};return"undefined"!=typeof t?(p.start=t,p.end=n):"number"==typeof e.index?(p.start=n,p.end=e.index):"undefined"!=typeof e.lineNumber?(p.line=e.lineNumber,p.start=e.column):(p.start=0,p.end=0),e.args&&e.args.data&&(p.data=e.args.data),p}var p={defaults:{curly:0,eqeqeq:1,"missing-doc":0,"missing-nls":0,"new-parens":1,"no-caller":1,"no-cond-assign":2,"no-comma-dangle":0,"no-console":2,"no-constant-condition":2,"no-debugger":1,"no-dupe-keys":2,"no-eval":0,"no-extra-semi":1,"no-implied-eval":0,"no-iterator":2,"no-proto":2,"no-jslint":1,"no-new-array":1,"no-new-func":1,"no-new-object":1,"no-new-wrappers":1,"no-redeclare":1,"no-reserved-keys":2,"no-regex-spaces":2,"no-shadow":1,"no-shadow-global":1,"no-throw-literal":1,"no-undef":2,"no-undef-init":1,"no-unused-params":1,"no-unused-vars":1,"no-use-before-define":1,radix:1,semi:1,"use-isnan":2,"no-unreachable":2,"no-fallthrough":2,"no-empty-block":0,"valid-typeof":2,"no-sparse-arrays":1,"no-with":1},setOption:function(e,t,n){if("number"==typeof t)if(Array.isArray(this.rules[e])){var r=this.rules[e];n?(r[1]=r[1]||{},r[1][n]=t):r[0]=t}else this.rules[e]=t},setDefaults:function(){this.rules=Object.create(null);for(var e=Object.keys(this.defaults),t=0;ts;s++){var l=o[s],c=null;l.end&&l.token?c={range:[l.index,l.end],value:l.token}:e.tokens.length>0&&(c=r.findToken(l.index,e.tokens));var u=l.message;if(i[l.index]!==u){if(i[l.index]=u,l.type)switch(l.type){case n.ErrorTypes.Unexpected:c&&(l.args={0:c.value,nls:"syntaxErrorBadToken"},l.message=u=l.args.nls);break;case n.ErrorTypes.EndOfInput:l.args={nls:"syntaxErrorIncomplete"},l.message=l.args.nls}else l.token||(l.args={0:l.message,nls:"esprimaParseFailure"},l.message=l.args.nls,delete l.start,delete l.end);c&&(l.node=c,c.value&&(l.args||(l.args=Object.create(null)),l.args.data||(l.args.data=Object.create(null)),l.args.data.tokenValue=c.value)),t.push(l)}}return t},computeProblems:function(e){var t=this;return e.getFileMetadata().then(function(n){return"text/html"===n.contentType.id?e.getText().then(function(e){var i=r.findScriptBlocks(e);if(i&&i.length>0){var o=t.cuprovider.getCompilationUnit(i,n);return t.astManager.getAST(o.getEditorContext()).then(function(e){var n=Object.create(null);return n.browser=!0,t._validateAst(e,n)})}}):t.astManager.getAST(e).then(function(e){return t._validateAst(e)})})},_validateAst:function(t,n){var r=[],i=this._extractParseErrors(t),o=Date.now();try{p.env=n,r=e.verify(t,p)}catch(s){i.length<1&&r.push({start:0,args:{0:s.toString(),nls:"eslintValidationFailure"},severity:"error"})}var l=Date.now()-o;return a.logTiming("language tools","validation",l,"application/javascript"),{problems:this._filterProblems(i,r).map(u)}},_filterProblems:function(e,t){var n=e.length;if(1>n)return t;var r=[].concat(e),i=t.length;e:for(var o=0;i>o;o++){for(var a=t[o],s=0;n>s;s++){var l=e[s],c=a.node;if(c&&c.range[0]>=l.index&&c.range[0]<=l.end)continue e}r.push(a)}return r},updated:function(e){if(e)for(var t="eslint.config"===e.pid,n=Object.keys(e),r=Object.create(null),i=0;i0?r.parents[r.parents.length-1]:null;if(i&&i.type===n.Syntax.ArrayExpression){var o=i.parent?i.parent:r.parents&&r.parents.length>1?r.parents[r.parents.length-2]:null;if(o&&o.type===n.Syntax.CallExpression&&o.callee&&"define"===o.callee.name)for(var a=i.elements,s=0;ss))return t.findNode(l.params[s].range[0],e,{parents:!0});break}}return null}if(e&&r){var c=r.selection.start,u=r.selection.end,p=o(c,e);if(p){var f=t.findNode(c,e,{parents:!0});if(!s(f)&&p.range[0]>=f.range[0]&&p.range[1]<=f.range[1]){if(f.type===n.Syntax.Literal){var d=i(f);if(!d)return[];f=d,c=f.range[0],u=f.range[1]}var h={start:c,end:u,word:a(f),token:f},m=l(h);return n.traverse(e,m),m.occurrences}}}return[]}function o(e,n){if(n.tokens&&n.tokens.length>0){var r=t.findToken(e,n.tokens);if(r){if("Punctuator"===r.type){var i=r.index;if(e===r.range[0]&&null!=i&&i>0){var o=n.tokens[i-1];if(o.range[1]!==r.range[0])return null;r=o}}if("Identifier"===r.type||"String"===r.type||"Keyword"===r.type&&"this"===r.value)return r}}return null}function a(e){switch(e.type){case n.Syntax.Identifier:return e.name;case n.Syntax.ThisExpression:return"this"}}function s(e){return e?e.type===n.Syntax.ThisExpression?!1:e.type===n.Syntax.Literal?!1:e.type!==n.Syntax.Identifier:!0}function l(e){if(this.visitor||(this.visitor=new r,this.visitor.enter=this.visitor.enter.bind(this.visitor),this.visitor.leave=this.visitor.leave.bind(this.visitor)),e.token){var t=e.token.parent?e.token.parent:e.token.parents&&e.token.parents.length>0?e.token.parents[e.token.parents.length-1]:null;this.visitor.thisCheck=e.token.type===n.Syntax.ThisExpression,this.visitor.objectPropCheck=!1,t&&t.type===n.Syntax.Property?this.visitor.objectPropCheck=e.token===t.key:t&&t.type===n.Syntax.MemberExpression?t.object&&t.object.type===n.Syntax.ThisExpression?this.visitor.objectPropCheck=!0:!t.computed&&t.property&&e.start>=t.property.range[0]&&e.end<=t.property.range[1]&&(this.visitor.objectPropCheck=!0):t&&t.type===n.Syntax.FunctionExpression&&e.token.parents&&e.token.parents.length>1&&e.token.parents[e.token.parents.length-2].type===n.Syntax.Property&&t.id&&t.id.range===e.token.range&&(this.visitor.objectPropCheck=!0),this.visitor.labeledStatementCheck=t&&(t.type===n.Syntax.LabeledStatement||t.type===n.Syntax.ContinueStatement||t.type===n.Syntax.BreakStatement)}return this.visitor.context=e,this.visitor}function c(e,t){this.astManager=e,this.cuprovider=t}return n.VisitorKeys.RecoveredNode=[],e.mixin(r.prototype,{occurrences:[],scopes:[],context:null,thisCheck:!1,objectPropCheck:!1,enter:function(e){var t,r;switch(e.type){case n.Syntax.Program:this.occurrences=[],this.scopes=[{range:e.range,occurrences:[],kind:"p"}],this.defscope=null,this.skipScope=null;break;case n.Syntax.FunctionDeclaration:if(this.checkId(e.id,!0),this._enterScope(e),this.skipScope)return n.VisitorOption.Skip;if(e.params)for(t=e.params.length,r=0;t>r;r++)if(this.checkId(e.params[r],!0))return n.VisitorOption.Skip;break;case n.Syntax.FunctionExpression:case n.Syntax.ArrowFunctionExpression:if(this._enterScope(e))return n.VisitorOption.Skip;if(this.checkId(e.id,!0),e.params)for(t=e.params.length,r=0;t>r;r++)if(this.checkId(e.params[r],!0))return n.VisitorOption.Skip;break;case n.Syntax.AssignmentExpression:this.checkId(e.left),this.checkId(e.right);break;case n.Syntax.ExpressionStatement:this.checkId(e.expression);break;case n.Syntax.ArrayExpression:if(e.elements)for(t=e.elements.length,r=0;t>r;r++)this.checkId(e.elements[r]);break;case n.Syntax.MemberExpression:this.checkId(e.object),e.computed?this.checkId(e.property):this.checkId(e.property,!1,!0);break;case n.Syntax.BinaryExpression:this.checkId(e.left),this.checkId(e.right);break;case n.Syntax.UnaryExpression:this.checkId(e.argument);break;case n.Syntax.SwitchStatement:this.checkId(e.discriminant);break;case n.Syntax.UpdateExpression:this.checkId(e.argument);break;case n.Syntax.ConditionalExpression:this.checkId(e.test),this.checkId(e.consequent),this.checkId(e.alternate);break;case n.Syntax.CallExpression:if(this.checkId(e.callee,!1),e.arguments)for(t=e.arguments.length,r=0;t>r;r++)this.checkId(e.arguments[r]);break;case n.Syntax.ReturnStatement:this.checkId(e.argument);break;case n.Syntax.ObjectExpression:if(this._enterScope(e))return n.VisitorOption.Skip;if(e.properties)for(t=e.properties.length,r=0;t>r;r++){var i=e.properties[r];i.value&&i.value.type===n.Syntax.FunctionExpression&&(this.thisCheck?i.value.isprop=!0:this.checkId(i.value.id,!1,!0)),this.checkId(i.key,!0,!0),this.checkId(i.value)}break;case n.Syntax.VariableDeclarator:this.checkId(e.id,!0),this.checkId(e.init);break;case n.Syntax.NewExpression:if(this.checkId(e.callee,!1),e.arguments)for(t=e.arguments.length,r=0;t>r;r++)this.checkId(e.arguments[r]);break;case n.Syntax.LogicalExpression:this.checkId(e.left),this.checkId(e.right);break;case n.Syntax.ThisExpression:if(this.thisCheck){var o=this.scopes[this.scopes.length-1];o.occurrences.push({start:e.range[0],end:e.range[1]}),e.range[0]===this.context.token.range[0]&&(this.defscope=o)}break;case n.Syntax.IfStatement:case n.Syntax.DoWhileStatement:case n.Syntax.WhileStatement:this.checkId(e.test);break;case n.Syntax.ForStatement:this.checkId(e.init);break;case n.Syntax.ForInStatement:this.checkId(e.left),this.checkId(e.right);break;case n.Syntax.WithStatement:this.checkId(e.object);break;case n.Syntax.ThrowStatement:this.checkId(e.argument);break;case n.Syntax.LabeledStatement:this._enterScope(e),this.checkId(e.label,!0,!1,!0);break;case n.Syntax.ContinueStatement:this.checkId(e.label,!1,!1,!0);break;case n.Syntax.BreakStatement:this.checkId(e.label,!1,!1,!0)}},_enterScope:function(e){if(this.thisCheck)switch(e.type){case n.Syntax.ObjectExpression:if(this.scopes.push({range:e.range,occurrences:[],kind:"o"}),this.defscope)return!0;break;case n.Syntax.FunctionExpression:if(!e.isprop&&(this.scopes.push({range:e.body.range,occurrences:[],kind:"fe"}),this.defscope))return!0}else if(this.objectPropCheck)switch(e.type){case n.Syntax.ObjectExpression:this.scopes.push({range:e.range,occurrences:[],kind:"o"})}else if(this.labeledStatementCheck)switch(e.type){case n.Syntax.LabeledStatement:if(this.scopes.push({range:e.range,occurrences:[],kind:"ls"}),e.range[0]>this.context.start||e.range[1]0&&(r=e.params[0].range[0]);break;case n.Syntax.FunctionExpression:case n.Syntax.ArrowFunctionExpression:t="fe",e.id?r=e.id.range[0]:e.params&&e.params.length>0&&(r=e.params[0].range[0])}t&&this.scopes.push({range:[r,e.range[1]],occurrences:[],kind:t})}return!1},leave:function(e){if(this.thisCheck)switch(e.type){case n.Syntax.FunctionExpression:if(e.isprop){delete e.isprop;break}case n.Syntax.ObjectExpression:case n.Syntax.Program:if(this._popScope())return n.VisitorOption.Break}else if(this.objectPropCheck)switch(e.type){case n.Syntax.ObjectExpression:case n.Syntax.Program:if(this._popScope())return n.VisitorOption.Break}else if(this.labeledStatementCheck)switch(e.type){case n.Syntax.LabeledStatement:if(this._popScope())return n.VisitorOption.Break}else switch(e.type){case n.Syntax.FunctionExpression:case n.Syntax.FunctionDeclaration:case n.Syntax.ArrowFunctionExpression:if(this._popScope())return n.VisitorOption.Break;break;case n.Syntax.Program:this._popScope()}},_popScope:function(){var e=this.scopes.pop();if(this.skipScope)return this.skipScope===e&&(this.skipScope=null),!1;var t,n,r=e.occurrences.length;if(this.defscope&&this.defscope===e){for(t=0;r>t;t++)this.occurrences.push(e.occurrences[t]);if(this.defscope.range[0]===e.range[0]&&this.defscope.range[1]===e.range[1]&&this.defscope.kind===e.kind)return!0}else if(this.scopes.length>0)for(n=0;r>n;n++)this.scopes[this.scopes.length-1].occurrences.push(e.occurrences[n]);else for(this.occurrences=[],n=0;r>n;n++)this.occurrences.push(e.occurrences[n]);return!1},_markDefineStatementOccurrences:function(e,t){var r=e.parent?e.parent:e.parents&&e.parents.length>0?e.parents[e.parents.length-1]:null;if(r&&r.type===n.Syntax.FunctionExpression){var i=r.parent?r.parent:e.parents&&e.parents.length>1?e.parents[e.parents.length-2]:null;if(i&&i.type===n.Syntax.CallExpression&&i.callee&&"define"===i.callee.name)for(var o=r,a=0;aa&&t.push({start:s.elements[a].range[0],end:s.elements[a].range[1]})}break}}},checkId:function(e,t,r,i){if(this.skipScope)return!0;if(this.thisCheck)return!1;if(r&&!this.objectPropCheck||!r&&this.objectPropCheck)return!1;if(i&&!this.labeledStatementCheck||!i&&this.labeledStatementCheck)return!1;if(e&&e.type===n.Syntax.Identifier&&e.name===this.context.word){var o=this.scopes[this.scopes.length-1];if(t){if(this.defscope)return o.range[0]<=this.context.start&&o.range[1]>=this.context.end?(this.occurrences=[],this.defscope=o,o.occurrences.push({start:e.range[0],end:e.range[1]}),!1):(o.occurrences=[],this.skipScope=o,!0);if(!(o.range[0]<=this.context.start&&o.range[1]>=this.context.end))return o.occurrences=[],this.skipScope=o,!0;this.defscope=o,this._markDefineStatementOccurrences(e,o.occurrences)}o.occurrences.push({start:e.range[0],end:e.range[1]})}return!1}}),r.prototype.constructor=r,e.mixin(c.prototype,{computeOccurrences:function(e,n){var r=this;return e.getFileMetadata().then(function(o){return"application/javascript"===o.contentType.id?r.astManager.getAST(e).then(function(e){return i(e,n)}):e.getText().then(function(e){var a=t.findScriptBlocks(e);if(a&&a.length>0){var s=r.cuprovider.getCompilationUnit(a,o);if(s.validOffset(n.selection.start))return r.astManager.getAST(s.getEditorContext()).then(function(e){return i(e,n)})}})})}}),c.prototype.contructor=c,{JavaScriptOccurrences:c}}),n("javascript/outliner",["orion/objects","javascript/signatures","estraverse"],function(e,t,n){function r(){}function i(e){this.astManager=e}return e.mixin(r.prototype,{outline:[],scope:[],enter:function(e){var r,i=this;e.type===n.Syntax.FunctionDeclaration?(r=this.addElement(t.computeSignature(e)),r&&this.scope.push(r)):e.type===n.Syntax.FunctionExpression?(r=this.addElement(t.computeSignature(e)),r&&this.scope.push(r),delete e.sig):e.type===n.Syntax.ObjectExpression?(r=this.addElement(t.computeSignature(e)),r&&this.scope.push(r),delete e.sig,e.properties&&e.properties.forEach(function(e){e.value&&(e.value.type===n.Syntax.FunctionExpression||e.value.type===n.Syntax.ObjectExpression?e.value.sig=t.computeSignature(e):i.addElement(t.computeSignature(e)))})):e.type===n.Syntax.VariableDeclaration?e.declarations&&e.declarations.forEach(function(e){e.init&&e.init.type===n.Syntax.ObjectExpression&&(e.init.sig=t.computeSignature(e))}):e.type===n.Syntax.AssignmentExpression?e.left&&e.right&&(e.right.type===n.Syntax.ObjectExpression||e.right.type===n.Syntax.FunctionExpression)&&(e.right.sig=t.computeSignature(e)):e.type===n.Syntax.ReturnStatement&&e.argument&&(e.argument.type===n.Syntax.ObjectExpression||e.argument.type===n.Syntax.FunctionExpression)&&(e.argument.sig=t.computeSignature(e))},leave:function(e){(e.type===n.Syntax.ObjectExpression||e.type===n.Syntax.FunctionDeclaration||e.type===n.Syntax.FunctionExpression)&&this.scope.pop()},addElement:function(e){if(e){var t={label:e.sig,labelPost:e.details,start:e.range[0],end:e.range[1]};if(this.scope.length<1)this.outline.push(t);else{var n=this.scope[this.scope.length-1];n.children||(n.children=[]),n.children.push(t)}return t}}}),r.prototype.constructor=r,e.mixin(i.prototype,{visitor:null,getVisitor:function(){return this.visitor||(this.visitor=new r,this.visitor.enter=this.visitor.enter.bind(this.visitor),this.visitor.leave=this.visitor.leave.bind(this.visitor)),this.visitor.outline=[],this.visitor},computeOutline:function(e){var t=this;return this.astManager.getAST(e).then(function(e){if(e){var r=t.getVisitor();return n.traverse(e,r),r.outline}return[]})}}),i.prototype.contructor=i,{JSOutliner:i}}),n("javascript/cuProvider",["javascript/lru","javascript/compilationUnit"],function(e,t){function n(e,n,r){var i=a.get(n.location);return i?i:(i=new t(e,n,r),a.put(n.location,i),i)}function r(e){s?s=null:a.remove(i(e.file))}function i(e){return e&&e.location?e.location:"unknown"}function o(e){s=e}var a=new e.LRU(10),s=null;return{getCompilationUnit:n,onModelChanging:r,onInputChanged:o}}),n("javascript/commands/generateDocCommand",["orion/objects","javascript/finder","javascript/signatures","orion/Deferred","javascript/compilationUnit"],function(e,t,n,r,i){function o(e){this.astManager=e}return e.mixin(o.prototype,{execute:function(e){var n=this;return e.getFileMetadata().then(function(o){return"application/javascript"===o.contentType.id?r.all([n.astManager.getAST(e),e.getCaretOffset()]).then(function(t){n._doCommand(e,t[0],t[1])}):r.all([e.getText(),e.getCaretOffset()]).then(function(r){var a=r[1],s=t.findScriptBlocks(r[0]);if(s&&s.length>0){var l=new i(s,o);if(l.validOffset(a))return n.astManager.getAST(l.getEditorContext()).then(function(t){n._doCommand(e,t,a)})}})})},_doCommand:function(e,i,o){var a=t.findNode(o,i,{parents:!0});if(a){var s=i.source,l=this._resolveParent(a);if(l){var c,u=l.range[0];if("FunctionDeclaration"===l.type)c=this._genTemplate(l.id.name,l.params,!1,l.range[0],s);else if("Property"===l.type)c=this._genTemplate(l.key.name?l.key.name:l.key.value,l.value.params,!0,l.range[0],s);else if("VariableDeclarator"===l.type){if(u=l.range[0],l.decl){if(l.decl.leadingComments)return;l.decl.declarations&&1===l.decl.declarations.length&&(u=l.decl.range[0])}c=this._genTemplate(l.id.name,l.init.params,!0,u,s)}else"AssignmentExpression"===l.type&&(c=this._genTemplate(n.expandMemberExpression(l.left,""),l.right.params,!0,l.range[0],s))}if(c)return r.all([e.setText(c,u,u),e.setCaretOffset(o+c.length)])}},_genTemplate:function(e,t,n,r,i){for(var o=i[--r],a="";" "===o||"	"===o;)a+=o,o=i[--r];var s=[];if(s.push("/**\n"+a+" * @name "+e+"\n"),s.push(a+" * @description description\n"),n&&s.push(a+" * @function\n"),"_"===e.charAt(0)&&s.push(a+" * @private\n"),t)for(var l=t.length,c=0;l>c;c++)s.push(a+" * @param "+t[c].name+"\n");return s.push(a+" * @returns returns\n"+a+" */\n"+a),s.join("")},_resolveParent:function(e){if(!e.parents||e.parents.length<1)return null;switch(e.type){case"FunctionDeclaration":return e;case"Property":return e.value&&"FunctionExpression"===e.value.type?e:null;case"VariableDeclarator":return e.init&&"FunctionExpression"===e.init.type?(e.decl=e.parents[e.parents.length-1],e):null;case"VariableDeclaration":if(e.declarations&&1===e.declarations.length){var t=e.declarations[0];if(t.init&&"FunctionExpression"===t.init.type)return e.parents.push(e),t.parents=e.parents,this._resolveParent(t)}case"AssignmentExpression":if(e.left&&"MemberExpression"===e.left.type&&e.right&&"FunctionExpression"===e.right.type)return e}var n=e.parents.length-1,r=e.parents[n];return r.parents=e.parents.slice(0,n),this._resolveParent(r)}}),{GenerateDocCommand:o}}),n("javascript/commands/openDeclaration",["orion/objects","javascript/finder","orion/Deferred","i18n!javascript/nls/messages"],function(e,t,n,r){function i(e,t,n,i,s){this.astManager=e,this.resolver=t,this.ternworker=n,this.cuprovider=i,this.openMode=s,this.ternworker.addEventListener("message",function(e){if("object"==typeof e.data){var t=e.data;if("definition"===t.request)if(t.declaration&&"number"==typeof t.declaration.start&&"number"==typeof t.declaration.end){var n=Object.create(null);n.start=t.declaration.start,n.end=t.declaration.end,null!=this.openMode&&"undefined"!=typeof this.openMode&&(n.mode=this.openMode),a.resolve(o.openEditor(t.declaration.file,n))}else a.resolve(o.setStatus(r.noDeclFound))}}.bind(this)),this.timeout=null}var o,a;return e.mixin(i.prototype,{execute:function(e,n){var r=this;return"application/javascript"===n.contentType.id?r.astManager.getAST(e).then(function(t){return r._findDecl(e,n,t)}):e.getText().then(function(i){var o=n.offset,a=t.findScriptBlocks(i);if(a&&a.length>0){var s=r.cuprovider.getCompilationUnit(a,{location:n.input,contentType:n.contentType});if(s.validOffset(o))return r.astManager.getAST(s.getEditorContext()).then(function(t){return r._findDecl(e,n,t)})}})},_findDecl:function(e,t,i){o=e,a=new n,this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){o.setStatus({Severity:"Error",Message:r.noDeclTimedOut}),a&&a.resolve(r.noDeclFound),this.timeout=null},5e3);var s=[{type:"full",name:t.input,text:i.source}];return this.ternworker.postMessage({request:"definition",args:{params:{offset:t.offset},files:s,meta:{location:t.input}}}),a}}),{OpenDeclarationCommand:i}}),n("javascript/commands/openImplementation",["orion/objects","javascript/finder","orion/Deferred","i18n!javascript/nls/messages"],function(e,t,n){function r(e,t,n,r){this.astManager=e,this.resolver=t,this.ternworker=n,this.cuprovider=r,this.ternworker.addEventListener("message",function(e){if("object"==typeof e.data){var t=e.data;if("implementation"===t.request)if(t.implementation&&"number"==typeof t.implementation.start&&"number"==typeof t.implementation.end){var n=Object.create(null);n.start=t.implementation.start,n.end=t.implementation.end,o.resolve(i.openEditor(t.implementation.file,n))}else o.resolve(i.setStatus("No implementation was found"))}}.bind(this)),this.timeout=null}var i,o;return e.mixin(r.prototype,{execute:function(e,n){var r=this;return"application/javascript"===n.contentType.id?r.astManager.getAST(e).then(function(t){return r._findImpl(e,n,t)}):e.getText().then(function(i){var o=n.offset,a=t.findScriptBlocks(i);if(a&&a.length>0){var s=r.cuprovider.getCompilationUnit(a,{location:n.input,contentType:n.contentType});if(s.validOffset(o))return r.astManager.getAST(s.getEditorContext()).then(function(t){return r._findImpl(e,n,t)})}})},_findImpl:function(e,t,r){i=e,o=new n,this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){i.setStatus({Severity:"Error",Message:"Could not compute implementation, the operation timed out"}),o&&o.resolve("No implementation was found"),this.timeout=null},5e3);var a=[{type:"full",name:t.input,text:r.source}];return this.ternworker.postMessage({request:"implementation",args:{params:{offset:t.offset},files:a,meta:{location:t.input}}}),o}}),{OpenImplementationCommand:r}}),n("javascript/commands/renameCommand",["orion/objects","javascript/finder","orion/Deferred","javascript/compilationUnit","i18n!javascript/nls/messages","orion/i18nUtil"],function(e,t,n,r,i){function o(e,t,n){this.astManager=e,this.ternworker=t,this.scriptResolver=n,this.ternworker.addEventListener("message",function(e){if("object"==typeof e.data){var t=e.data;if("rename"===t.request){var n=t.changes;if(n&&n.changes&&n.changes.length>0){for(var r=n.changes,i=[r.length],o=0;o0){var l=new r(s,{location:n.input,contentType:n.contentType});if(l.validOffset(a))return i._doRename(e,n)}})})},_doRename:function(e,t){var r=this;return e.getText().then(function(o){s=e,a=new n,r.timeout&&clearTimeout(r.timeout),r.timeout=setTimeout(function(){s.setStatus({Severity:"Error",Message:i.renameFailedTimedOut}),a&&a.resolve(),r.timeout=null},5e3);var l=[{type:"full",name:t.input,text:o}];return r.ternworker.postMessage({request:"rename",args:{params:{offset:t.offset},files:l,meta:{location:t.input},newname:""}}),a})}}),{RenameCommand:o}}),n("orion/editor/stylers/application_json/syntax",["orion/editor/stylers/lib/syntax"],function(e){var t=["false","true"],n=[];return n.push.apply(n,e.grammars),n.push({id:"orion.json",contentTypes:["application/json"],patterns:[{include:"orion.lib#string_doubleQuote"},{include:"orion.lib#string_singleQuote"},{include:"orion.lib#brace_open"},{include:"orion.lib#brace_close"},{include:"orion.lib#bracket_open"},{include:"orion.lib#bracket_close"},{include:"orion.lib#parenthesis_open"},{include:"orion.lib#parenthesis_close"},{include:"orion.lib#number_decimal"},{include:"orion.lib#number_hex"},{match:"\\b(?:"+t.join("|")+")\\b",name:"keyword.operator.json"}]}),{id:n[n.length-1].id,grammars:n,keywords:t}}),n("orion/editor/stylers/application_schema_json/syntax",["orion/editor/stylers/application_json/syntax"],function(e){var t=["additionalItems","additionalProperties","allOf","anyOf","default","definitions","dependencies","description","enum","exclusiveMaximum","exclusiveMinimum","format","id","maximum","maxItems","maxLength","maxProperties","minimum","minItems","minLength","minProperties","multipleOf","not","oneOf","patternProperties","pattern","properties","required","title","type","uniqueItems"],n=[];return n.push.apply(n,e.grammars),n.push({id:"orion.json.schema",contentTypes:["application/schema+json"],patterns:[{include:"orion.json"},{match:"(?:\\$schema|(?:\\b(?:"+t.join("|")+")))\\b",name:"keyword.operator.schema.json"}]}),{id:n[n.length-1].id,grammars:n,keywords:t}}),n("orion/editor/stylers/application_xml/syntax",["orion/editor/stylers/lib/syntax"],function(e){var t=[];return t.push.apply(t,e.grammars),t.push({id:"orion.xml",contentTypes:["application/xml","application/xhtml+xml"],patterns:[{include:"#comment"},{include:"#doctype"},{include:"#xmlDeclaration"},{include:"#tag"},{include:"#ampersandEscape"}],repository:{ampersandEscape:{match:"<|>|&",name:"constant.character"},comment:{begin:{match:"",literal:"-->"},name:"comment.block.xml",patterns:[{match:"(\\b)(TODO)(\\b)(((?!-->).)*)",name:"meta.annotation.task.todo",captures:{2:{name:"keyword.other.documentation.task"},4:{name:"comment.line"}}}]},doctype:{begin:"",name:"meta.tag.doctype.xml",captures:{0:{name:"meta.tag.doctype.xml"}},patterns:[{include:"#comment"},{include:"orion.lib#string_doubleQuote"},{include:"orion.lib#string_singleQuote"}]},tag:{begin:"",captures:{0:{name:"meta.tag.xml"}},patterns:[{include:"#comment"},{include:"orion.lib#string_doubleQuote"},{include:"orion.lib#string_singleQuote"}]},xmlDeclaration:{begin:"<\\?xml",end:"\\?>",captures:{0:{name:"meta.tag.declaration.xml"}},patterns:[{include:"#comment"},{include:"orion.lib#string_doubleQuote"},{include:"orion.lib#string_singleQuote"}],name:"meta.tag.declaration.xml"}}}),{id:t[t.length-1].id,grammars:t,keywords:[]}}),n("orion/editor/stylers/application_x-ejs/syntax",["orion/editor/stylers/application_javascript/syntax","orion/editor/stylers/application_xml/syntax"],function(e,t){var n=[];return n.push.apply(n,e.grammars),n.push.apply(n,t.grammars),n.push({id:"orion.ejs",contentTypes:["application/x-ejs"],patterns:[{include:"orion.xml#comment"},{include:"orion.xml#doctype"},{begin:"<%=?(?:\\s|$)",end:"%>",captures:{0:{name:"entity.name.declaration.js"}},contentName:"source.js.embedded.ejs",patterns:[{include:"orion.js"}]},{include:"orion.xml#tag"},{include:"orion.xml#ampersandEscape"}]}),{id:n[n.length-1].id,grammars:n,keywords:[]}
+}),function(){function e(e){if("string"!=typeof e)throw new TypeError}function t(e){return e?e.split("&"):[]}function n(e){return 0===e.length?"":e.join("&")}function r(e){var t=/([^=]*)(?:=?)(.*)/.exec(e),n=t[1]?decodeURIComponent(t[1]):"",r=t[2]?decodeURIComponent(t[2]):"";return[n,r]}function i(e){var t=encodeURIComponent(e[0]);return e[1]&&(t+="="+encodeURIComponent(e[1])),t}function o(e,n){var i="",o=[],a=0;return{next:function(){if(i!==e.query&&(i=e.query,o=t(i)),a0){var n=A.resolveRelativeFiles(r,e,{location:t.args.file.file,contentType:{name:"JavaScript"}});if(n&&n.length>0)return j.read(n[0].location).then(function(e){I.postMessage({request:"read",args:{contents:e,file:n[0].location,logical:r,path:n[0].path}})});I.postMessage({request:"read",args:{logical:r,error:"Failed to read file "+r}})}else I.postMessage({request:"read",args:{logical:r,error:"Failed to read file "+r}})},function(e){I.postMessage({request:"read",args:{logical:r,message:e.toString(),error:"Failed to read file "+r}})})}else{var i=t.args.file;try{return j.read(i).then(function(e){I.postMessage({request:"read",args:{contents:e,file:i}})},function(e){I.postMessage({request:"read",args:{file:i,message:e.toString(),error:"Failed to read file "+i}})})}catch(o){I.postMessage({request:"read",args:{file:i,message:o.toString(),error:"Failed to read file "+i}})}}break;case"installed_plugins":var a=t.plugins;return L?L.getPreferences("/cm/configurations").then(function(e){var t=e.get("tern/plugins");t?"string"==typeof t&&(t=JSON.parse(t)):t=Object.create(null);for(var n=Object.keys(a),r=0;r
-  Copyright (C) 2013 Thaddee Tyl 
-  Copyright (C) 2013 Mathias Bynens 
-  Copyright (C) 2012 Ariya Hidayat 
-  Copyright (C) 2012 Mathias Bynens 
-  Copyright (C) 2012 Joost-Wim Boekesteijn 
-  Copyright (C) 2012 Kris Kowal 
-  Copyright (C) 2012 Yusuke Suzuki 
-  Copyright (C) 2012 Arpad Borsos 
-  Copyright (C) 2011 Ariya Hidayat 
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-  ARE DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*******************************************************************************
- * @license
- * Copyright (c) 2010, 2014 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-
 /*******************************************************************************
  * @license
  * Copyright (c) 2015 IBM Corporation and others.
@@ -53,1232 +9,12 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
-/*******************************************************************************
- * @license
- * Copyright (c) 2015 Marijn Haverbeke and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- *
- * Contributors:
- *     IBM Corporation - Allow original AngularJS plugin to find files in Orion workspace
- *******************************************************************************/
-
-/*******************************************************************************
- * @license
- * Copyright (c) 2015 Marijn Haverbeke and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- *
- * Contributors:
- *     IBM Corporation - Allow original node.js plugin to find files in Orion workspace
- *******************************************************************************/
-
-/*******************************************************************************
- * @license
- * Copyright (c) 2015 Marijn Haverbeke and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- *
- * Contributors:
- *     IBM Corporation - Allow original requirejs plugin to find files in Orion workspace
- *******************************************************************************/
-
-/**
- * @license RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
- * Available via the MIT or new BSD license.
- * see: http://github.com/requirejs/i18n for details
- */
-
-/*******************************************************************************
- * @license
- * Copyright (c) 2015 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- * 
- ******************************************************************************/
-
-/*******************************************************************************
- * @license
- * Copyright (c) 2014, 2015 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- * 
- ******************************************************************************/
-
-/*******************************************************************************
- * @license
- * Copyright (c) 2015 IBM Corporation, Inc. and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
- *
- * Contributors:
- *   IBM Corporation - Initial API and implementation
- ******************************************************************************/
-
-/*******************************************************************************
- * @license
- * Copyright (c) 2012, 2015 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- *
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-/*
-
- Copyright (c) 2010, 2014 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 Marijn Haverbeke and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - Allow original node.js plugin to find files in Orion workspace
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 Marijn Haverbeke and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - Allow original requirejs plugin to find files in Orion workspace
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2014, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
-
- Copyright (c) 2015 IBM Corporation, Inc. and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-   IBM Corporation - Initial API and implementation
-
- Copyright (c) 2015 IBM Corporation, Inc. and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-   IBM Corporation - Initial API and implementation
-
- Copyright (c) 2015 IBM Corporation, Inc. and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-   IBM Corporation - Initial API and implementation
-
- Copyright (c) 2015 IBM Corporation, Inc. and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-   IBM Corporation - Initial API and implementation
-
- Copyright (c) 2015 IBM Corporation, Inc. and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-   IBM Corporation - Initial API and implementation
-
- Copyright (c) 2015 IBM Corporation, Inc. and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
-
- Contributors:
-   IBM Corporation - Initial API and implementation
-
- Copyright (c) 2012, 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors: IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 Marijn Haverbeke and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - Allow original AngularJS plugin to find files in Orion workspace
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
-
- Copyright (c) 2015 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials are made 
- available under the terms of the Eclipse Public License v1.0 
- (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
-
- Contributors:
-     IBM Corporation - initial API and implementation
- RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
- Available via the MIT or new BSD license.
- see: http://github.com/requirejs/i18n for details
-*/
-importScripts("../../requirejs/require.min.js");
-(function(a,d){"function"===typeof define&&define.amd?define("esprima",["exports"],d):"undefined"!==typeof exports?d(exports):d(a.esprima={})})(this,function(a){function d(p,e){if(!p)throw Error("ASSERT: "+e);}function t(p){return 48<=p&&57>=p}function k(p){return 0<="0123456789abcdefABCDEF".indexOf(p)}function g(p){return 0<="01234567".indexOf(p)}function q(p){return 10===p||13===p||8232===p||8233===p}function c(p){return 36===p||95===p||65<=p&&90>=p||97<=p&&122>=p||92===p||128<=p&&Ta.NonAsciiIdentifierStart.test(String.fromCharCode(p))}
-function b(p){return 36===p||95===p||65<=p&&90>=p||97<=p&&122>=p||48<=p&&57>=p||92===p||128<=p&&Ta.NonAsciiIdentifierPart.test(String.fromCharCode(p))}function B(p){switch(p){case "implements":case "interface":case "package":case "private":case "protected":case "public":case "static":case "yield":case "let":return!0;default:return!1}}function m(p){return"eval"===p||"arguments"===p}function E(p){if(U&&B(p))return!0;switch(p.length){case 2:return"if"===p||"in"===p||"do"===p;case 3:return"var"===p||
-"for"===p||"new"===p||"try"===p||"let"===p;case 4:return"this"===p||"else"===p||"case"===p||"void"===p||"with"===p||"enum"===p;case 5:return"while"===p||"break"===p||"catch"===p||"throw"===p||"const"===p||"yield"===p||"class"===p||"super"===p;case 6:return"return"===p||"typeof"===p||"delete"===p||"switch"===p||"export"===p||"import"===p;case 7:return"default"===p||"finally"===p||"extends"===p;case 8:return"function"===p||"continue"===p||"debugger"===p;case 10:return"instanceof"===p;default:return!1}}
-function K(p,e,f,h,b){d("number"===typeof f,"Comment must have valid position");H.lastCommentStart=f;p={type:p,value:e};u.range&&(p.range=[f,h]);u.loc&&(p.loc=b);u.comments.push(p);u.attachComment&&(u.leadingComments.push(p),u.trailingComments.push(p))}function l(p){var e,f,h;e=r-p;for(f={start:{line:P,column:r-R-p}};r=X&&u.comments?(f.end={line:P,column:r-R},h=x.slice(p+2,r),K("Block",h,p,r,f),aa()):O()}}else break;else if(e&&45===p)if(45===x.charCodeAt(r+1)&&62===x.charCodeAt(r+2))r+=3,l(3);else break;else if(60===p)if("!--"===x.slice(r+1,r+4))++r,++r,++r,++r,l(4);else break;
-else break}function z(p){var e,f,h=0;e="u"===p?4:2;for(p=0;p=parseInt(e,16))return"x";O(null,G.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{RegExp(f)}catch(h){O(null,G.InvalidRegExp)}try{return RegExp(p,e)}catch(b){return null}}function Y(){var p,
-e,f,h;xa=!0;var a,n;v();a=r;f=x[r];d("/"===f,"Regular expression literal must start with a slash");h=x[r++];for(p=e=!1;r=X)return{type:y.EOF,lineNumber:P,lineStart:R,start:r,end:r,range:[r,r]};p=x.charCodeAt(r);if(c(p)){var e;p=r;if(92===x.charCodeAt(r))e=Z();else a:{var f;for(e=r++;r=a?a=String.fromCharCode(a):(n=(a-65536>>10)+55296,a=String.fromCharCode(n,(a-65536&1023)+56320));h+=a}else s=r,(n=z(a))?h+=n:(r=s,h+=a);break;case "n":h+="\n";break;case "r":h+="\r";break;case "t":h+="\t";break;case "b":h+="\b";break;case "f":h+="\f";break;case "v":h+="\x0B";break;default:g(a)?(n="01234567".indexOf(a),0!==n&&(f=!0),r<
-X&&g(x[r])&&(f=!0,n=8*n+"01234567".indexOf(x[r++]),0<="0123".indexOf(a)&&(r=this.range[1]&&(h.unshift(n),u.trailingComments.splice(b,1));u.trailingComments=[]}else s&&(s.trailingComments&&s.trailingComments[0].range[0]>=this.range[1])&&(h=s.trailingComments,delete s.trailingComments);if(s)for(;s&&s.range[0]>=
-this.range[0];)e=s,s=a.pop();if(e)e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=e.leadingComments,e.leadingComments=void 0);else if(0=m))k[d](a,b,v);if(g(d,a)&&(null==c||a.start==
-c)&&(null==m||a.end==m))throw new t(a,b);};v(b,l)}catch(z){if(z instanceof t)return z;throw z;}};a.findNodeAround=function(b,c,m,g,k){m=d(m);try{g||(g=a.base);var l=function(a,b,d){d=d||a.type;if(!(a.start>c||a.end=c&&m(d,a))throw new t(a,b);g[d](a,b,l)}};l(b,k)}catch(v){if(v instanceof
-t)return v;throw v;}};a.findNodeBefore=function(b,c,m,g,k){m=d(m);g||(g=a.base);var l,v=function(a,b,d){if(!(a.start>c)){d=d||a.type;if(a.end<=c&&(!l||l.node.end\.!]/),g=v(c+".prototype"),
-g instanceof d.Obj||(g=v(c)),!(g instanceof d.Obj)?g:b&&this.forceNew?new d.Obj(g):d.getInstance(g)):this.eat("?")?d.ANull:this.fromWord(this.word(/[\w$<>\.!`]/))},fromWord:function(a){var b=d.cx();switch(a){case "number":return b.num;case "string":return b.str;case "bool":return b.bool;case "\x3ctop\x3e":return b.topScope}return b.localDefs&&a in b.localDefs?b.localDefs[a]:v(a)},parseBaseRetType:function(){if(this.eat("[")){var a=this.parseRetType();this.eat("]")||this.error();return function(b,
-c){return new d.Arr(a(b,c))}}if(this.eat("+")){var b=this.parseRetType();return function(a,c){return d.getInstance(b(a,c))}}if(this.eat("!")){var c=this.word(/\d/);if(c)return c=Number(c),function(a,b){return b[c]||d.ANull};if(this.eat("this"))return function(a){return a};if(this.eat("custom:")){var g=this.word(/[\w$]/);return z[g]||function(){return d.ANull}}return this.fromWord("!"+c+this.word(/[\w$<>\.!]/))}var l=this.parseType();return function(){return l}},extendRetType:function(a){var b=this.word(/[\w<>$!]/)||
-this.error();return"!ret"==b?function(b,c){var s=a(b,c);if(s.retval)return s.retval;var g=new d.AVal;s.propagate(new d.IsCallee(d.ANull,[],null,g));return g}:function(c,d){return a(c,d).getProp(b)}},parseRetType:function(){for(var a=this.parseBaseRetType();this.eat(".");)a=this.extendRetType(a);return a}};var K=a.parseEffect=function(a,b){var c;if(0==a.indexOf("propagate ")){c=new E(a,10);var g=c.parseRetType();c.eat(" ")||c.error();var l=c.parseRetType();k(b,function(a,c){g(a,c).propagate(l(a,c))})}else if(0==
-a.indexOf("call ")){var m=5==a.indexOf("and return ",5);c=new E(a,m?16:5);var v=c.parseRetType(),q=null,t=[];for(c.eat(" this\x3d")&&(q=c.parseRetType());c.eat(" ");)t.push(c.parseRetType());k(b,function(a,c){for(var b=v(a,c),s=q?q(a,c):d.ANull,g=[],l=0;lthis.created++){a=new d.Obj(a);var b=this.spec;b instanceof d.AVal&&(b=b.getType(!1));if(b instanceof d.Obj)for(var c in b.props){var g=b.props[c].types[0],l=a.defProp(c);g&&g instanceof d.Obj&&g.props.value&&(g=g.props.value.getType(!1))&&l.addType(g)}this.target.addType(a)}}});d.registerFunction("Object_create",function(a,b,c){if(c&&c.length&&"Literal"==c[0].type&&null==c[0].value)return new d.Obj;a=new d.AVal;b[0]&&b[0].propagate(new Z(0,a,b[1]));return a});var S=d.constraint("self, args, target",
-{addType:function(a){if(a instanceof d.Fn){this.target.addType(new d.Fn(a.name,a.self,a.args.slice(this.args.length),a.argNames.slice(this.args.length),a.retval));this.self.propagate(a.self);for(var b=0;b=c&&(c=g,A=n)}return A}function b(){}
-function B(e,a){w.disabledComputing={fn:e,prev:w.disabledComputing};try{return a()}finally{w.disabledComputing=w.disabledComputing.prev}}function m(e){if(w.workList)return e(w.workList);var f=[],h=0,b=w.workList=function(e,a,b){h=Aa)throw new a.TimedOut;h=f[e+3]+1;f[e+1].addType(f[e],f[e+2])}return c}finally{w.workList=null}}function E(e,a){e.fnType&&(e.fnType.instantiateScore=(e.fnType.instantiateScore||0)+
-a)}function K(e,a){try{return t.simple(e,{Expression:function(){if(0>=--a)throw Ma;}}),!0}catch(h){if(h==Ma)return!1;throw h;}}function l(e,a){var h=a.fnType.instantiateScore;if(!w.disabledComputing&&h&&a.fnType.args.length&&K(e,5*h))return E(a.prev,h/2),v(e,a),!0;a.fnType.instantiateScore=null}function v(e,a){for(var h=a.fnType,b=0;b=a&&c.end<=h&&-1=a&&c.end<=h&&b.origin==e}}function Q(e,a){var h=ma[e.type];return h?h(e,a):null}var va=a.toString=function(e,a,h){return!e||e==h?"?":e.toString(a)},N=a.ANull=g.mixin({addType:function(){},propagate:function(){},getProp:function(){return N},forAllProps:function(){},hasType:function(){return!1},
-isEmpty:function(){return!0},getFunctionType:function(){},getType:function(){},gatherProperties:function(){},propagatesTo:function(){},typeHint:function(){},propHint:function(){}}),da=a.AVal=function(){this.types=[];this.forward=null;this.maxWeight=0};da.prototype=q(N,{addType:function(e,a){a=a||100;if(this.maxWeighta||-1a&&(e=new J(e,a));(this.forward||(this.forward=[])).push(e);var h=this.types;h.length&&m(function(b){for(var c=0;cw.origins.indexOf(a)&&w.origins.push(a)};var Ra=20,Sa=1E-4,ya=a.Scope=function(a){V.call(this,a||!0);this.prev=a};ya.prototype=q(V.prototype,{constructor:ya,defVar:function(a,f){for(var h=this;;h=h.proto){var b=h.props[a];if(b)return b;if(!h.prev)return h.defProp(a,f)}}});var Ma={},Na=t.make({Function:function(a,
-f,h){var b=a.body.scope=new ya(f);b.originNode=a;for(var c=[],n=[],d=0;db?!1:ma.hasOwnProperty(e.type)},ba,n||w.topScope)};a.expressionType=function(a){return Q(a.node,a.state)};var wa=!1;a.resetGuessing=function(a){wa=a};a.didGuess=function(){return wa};a.forAllPropertiesOf=function(a,b){a.gatherProperties(b,0)};var ta=t.make({},ba);a.findRefs=function(a,b,c,n,d){ta.Identifier=function(a,e){if(a.name==c)for(var b=e;b&&!(b==n&&d(a,e),c in b.props);b=b.prev);};t.recursive(a,b,null,ta)};var Va=t.make({Function:function(a,b,c){c(a.body,
-a.body.scope,"ScopeBody")}});a.findPropRefs=function(a,b,c,n,d){t.simple(a,{MemberExpression:function(a,e){a.computed||a.property.name!=n||Q(a.object,e).getType()==c&&d(a.property)},ObjectExpression:function(a,e){if(Q(a,e).getType()==c)for(var b=0;bY(d)&&(l.parent=d,l.excluded&&(l.excluded=null));else{var s=new q(b,d);a.files.push(s);a.fileMap[b]=s;null!=g?c(s,g,a):a.options.async?(a.startAsyncAction(),a.options.getFile(b,function(b,d){c(s,d||"",a);a.finishAsyncAction(b)})):c(s,a.options.getFile(b)||"",a)}}function E(a,b,
-g,l){b.scope&&(d.withContext(a.cx,function(){d.purgeTypes(b.name);l&&(d.markVariablesDefinedBy(b.scope,b.name),d.purgeMarkedVariables(b.scope))}),b.scope=null);null!=g&&c(b,g,a)}function K(a,b,c){var d=function(){a.off("everythingFetched",d);clearTimeout(g);l(a,b,c)};a.on("everythingFetched",d);var g=setTimeout(d,a.options.fetchTimeout)}function l(a,b,c){if(a.pending)return K(a,b,c);var g=a.fetchError;if(g)return a.fetchError=null,c(g);for(var g=!0,l=0;lb?a:a.slice(0,b)}function z(a,b,c){var d=Math.max(0,c-500),g=null;if(!/^\s*$/.test(a))for(;;){d=b.indexOf(a,d);if(0>d||d>c+500)break;if(null==g||Math.abs(g-
-c)>Math.abs(d-c))g=d;d+=a.length}return g}function Z(a){for(var b=0;a;++b,a=a.prev);return b}function S(a){a=Error(a);a.name="TernError";return a}function fa(a,b,c){var l=c.match(/^#(\d+)$/);if(!l)return a.findFile(c);var s=b[l[1]];if(!s)throw S("Reference to unknown file "+c);if("full"==s.type)return a.findFile(s.name);var k=s.backing=a.findFile(s.name);b=s.offset;s.offsetLines&&(b={line:s.offsetLines,ch:0});s.offset=b=L(k,null==s.offsetLines?s.offset:{line:s.offsetLines,ch:0},!0);var m=v(s.text),
-q=z(m,k.text,b),C=null==q?Math.max(0,k.text.lastIndexOf("\n",b)):q;d.withContext(a.cx,function(){d.purgeTypes(s.name,C,C+s.text.length);var b=s.text,c;if(c=b.match(/(?:"([^"]*)"|([\w$]+))\s*:\s*function\b/)){var l=g.findNodeAround(s.backing.ast,C,"ObjectExpression");if(l&&l.node.objType)var A={type:l.node.objType,prop:c[2]||c[1]}}if(q&&(c=m.match(/^(.*?)\bfunction\b/))){c=c[1].length;for(var l="",v=0;va.text.length)if(c)b=a.text.length;else throw S("Position "+b+" is outside of file.");return b}function F(a,b){if(!a)return{line:0,ch:0};for(var c=a.lineOffsets||(a.lineOffsets=[0]),d=a.text,g,l,s=c.length-1;0<=s;--s)c[s]<=b&&(g=s*ja,l=c[s]);for(;;){c=d.indexOf("\n",l);if(c>=b||0>c)break;l=c+1;++g}return{line:g,ch:b-l}}function ca(a,b,c){return a.lineCharPositions?(a=F(b,c),"part"==b.type&&(a.line+=
-null!=b.offsetLines?b.offsetLines:F(b.backing,b.offset).line),a):c+("part"==b.type?b.offset:0)}function Q(a){for(var b in a)null==a[b]&&delete a[b];return a}function va(a,b){"string"!=typeof a&&(a=a.name,b=b.name);var c=/^[A-Z]/.test(a),d=/^[A-Z]/.test(b);return c==d?a=c)return Ha(a,b,d,l)}}throw S("Not at a variable or property name.");}},rename:{takesFile:!0,
-fullFile:!0,run:function(a,b,c){if("string"!=typeof b.newName)throw S(".query.newName should be a string");var d=oa(c,b);if(!d||"Identifier"!=d.node.type)throw S("Not at a variable.");c=da(a,b,c,d,b.newName);d=c.refs;delete c.refs;c.files=a.files.map(function(a){return a.name});a=c.changes=[];for(var g=0;g(null==g?b:g)-l.node.start||20>l.node.end-b))return l;throw S("No expression at the given position.");},O=a.getSpan=function(a){if(a.origin){if(a.originNode){var b=a.originNode;/^Function/.test(b.type)&&b.id&&(b=b.id);return{origin:a.origin,node:b}}if(a.span)return{origin:a.origin,span:a.span}}},aa=a.storeSpan=function(a,b,c,d){d.origin=c.origin;c.span?(c=/^(\d+)\[(\d+):(\d+)\]-(\d+)\[(\d+):(\d+)\]$/.exec(c.span),
-d.start=b.lineCharPositions?{line:Number(c[2]),ch:Number(c[3])}:Number(c[1]),d.end=b.lineCharPositions?{line:Number(c[5]),ch:Number(c[6])}:Number(c[4])):(a=a.findFile(c.origin),d.start=ca(b,a,c.node.start),d.end=ca(b,a,c.node.end))};a.version="0.6.2"});
-(function(a){if("object"==typeof exports&&"object"==typeof module)return a(exports);if("function"==typeof define&&define.amd)return define("tern/lib/comment",["exports"],a);a(tern.comment||(tern.comment={}))})(function(a){function d(a){return 14>a&&8q?a.length:q)}d(q)&&++g}};a.ensureCommentsBefore=function(d,g){return g.hasOwnProperty("commentsBefore")?g.commentsBefore:g.commentsBefore=a.commentsBefore(d,g.start)}});
-(function(a){if("object"==typeof exports&&"object"==typeof module)return a(require("../lib/infer"),require("../lib/tern"),require("../lib/comment"),require("acorn/util/walk"));if("function"==typeof define&&define.amd)return define("tern/plugin/doc_comment",["../lib/infer","../lib/tern","../lib/comment","acorn/util/walk"],a);a(tern,tern,tern.comment,acorn.walk)})(function(a,d,t,k){function g(a,b){function c(a){t.ensureCommentsBefore(b,a)}k.simple(a,{VariableDeclaration:c,FunctionDeclaration:c,AssignmentExpression:function(a){"\x3d"==
-a.operator&&c(a)},ObjectExpression:function(a){for(var b=0;bt)return null;d=c.slice(d,t);if(!/^[\w$]+$/.test(d))return null;k.push(d);d=t+1;t=m(a,c,d);if(!t)return null;d=t.end;q.push(t.type);d=b(c,d);t=c.charAt(d);++d;if(t==g)break;if(","!=t)return null}return{labels:k,types:q,end:d}}function m(c,d,g){g=b(d,g);var k;if(d.indexOf("function(",g)==g){k=B(c,d,g+9,")");var q=a.ANull;if(!k)return null;g=b(d,k.end);if(":"==d.charAt(g)){++g;c=m(c,d,g+1);
-if(!c)return null;g=c.end;q=c.type}k=new a.Fn(null,a.ANull,k.types,k.labels,q)}else if("["==d.charAt(g)){k=m(c,d,g+1);if(!k)return null;g=b(d,k.end);if("]"!=d.charAt(g))return null;++g;k=new a.Arr(k.type)}else if("{"==d.charAt(g)){g=B(c,d,g+1,"}");if(!g)return null;k=new a.Obj(!0);for(c=0;cb.name?1:0}),q.splice(0,0,{proposal:"",description:"Templates",style:"noemphasis_title",unselectable:!0}));return q},removePrefix:function(a,d){if(!(d.overwrite=d.proposal.substring(0,a.length)!==a))d.proposal=d.proposal.substring(a.length)},isValid:function(a,d,g,q){return!0}};return{Template:a,TemplateContentAssist:d}});
-define("tern/plugin/resolver",["orion/editor/templates"],function(a){function d(a,d){a.startAsyncAction();c[d].pending=!0;a.options.getFile({logical:d},function(g,k){c[d].file=k.file;c[d].contents=k.contents;c[d].logical=k.logical;delete c.pending;a.finishAsyncAction(g)})}function t(a){var c=setTimeout(function(){clearTimeout(c);k(a)},a.options.fetchTimeout)}function k(a){if(a.pending)return t(a);for(var d=!0,g=Object.keys(c),k=0;k=a.value.range[0]&&offset-1<=a.value.range[1]?{kind:"prop"}:null;case "SwitchStatement":return{kind:"swtch"}}return{kind:"top"}}var c=
-Object.create(null);return{doPostParse:function(a,g){if(Array.isArray(g.dependencies)&&0c.length)return a.ANull;var d=new a.AVal;c[1].propagate(new S(c[0],c.slice(2),d));return d});var fa={"!name":"angular","!define":{cacheObj:{info:"fn() -\x3e ?",put:"fn(key: string, value: ?) -\x3e !1",get:"fn(key: string) -\x3e ?",remove:"fn(key: string)",removeAll:"fn()",destroy:"fn()"},eventObj:{targetScope:"service.$rootScope",currentScope:"service.$rootScope",name:"string",stopPropagation:"fn()",preventDefault:"fn()",defaultPrevented:"bool"},Module:{"!url":"http://docs.angularjs.org/api/angular.Module",
-"!doc":"Interface for configuring angular modules.",prototype:{animation:{"!type":"fn(name: string, animationFactory: fn()) -\x3e !this","!url":"http://docs.angularjs.org/api/angular.Module#animation","!doc":"Defines an animation hook that can be later used with $animate service and directives that use this service."},config:{"!type":"fn(configFn: fn()) -\x3e !this","!effects":["custom angular_callInject 0"],"!url":"http://docs.angularjs.org/api/angular.Module#config","!doc":"Use this method to register work which needs to be performed on module loading."},
-constant:"service.$provide.constant",controller:{"!type":"fn(name: string, constructor: fn()) -\x3e !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/ng.$controllerProvider","!doc":"Register a controller."},directive:{"!type":"fn(name: string, directiveFactory: fn()) -\x3e !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/ng.$compileProvider#directive","!doc":"Register a new directive with the compiler."},factory:"service.$provide.factory",
-filter:{"!type":"fn(name: string, filterFactory: fn()) -\x3e !this","!effects":["custom angular_callInject 1"],"!url":"http://docs.angularjs.org/api/ng.$filterProvider","!doc":"Register filter factory function."},provider:"service.$provide.provider",run:{"!type":"fn(initializationFn: fn()) -\x3e !this","!effects":["custom angular_callInject 0"],"!url":"http://docs.angularjs.org/api/angular.Module#run","!doc":"Register work which should be performed when the injector is done loading all modules."},
-service:"service.$provide.service",value:"service.$provide.value",name:{"!type":"string","!url":"http://docs.angularjs.org/api/angular.Module#name","!doc":"Name of the module."},requires:{"!type":"[string]","!url":"http://docs.angularjs.org/api/angular.Module#requires","!doc":"List of module names which must be loaded before this module."}}},Promise:{"!url":"http://docs.angularjs.org/api/ng.$q","!doc":"Allow for interested parties to get access to the result of the deferred task when it completes.",
-prototype:{then:"fn(successCallback: fn(value: ?), errorCallback: fn(reason: ?), notifyCallback: fn(value: ?)) -\x3e +Promise","catch":"fn(errorCallback: fn(reason: ?))","finally":"fn(callback: fn()) -\x3e +Promise",success:"fn(callback: fn(data: ?, status: number, headers: ?, config: ?)) -\x3e +Promise",error:"fn(callback: fn(data: ?, status: number, headers: ?, config: ?)) -\x3e +Promise"}},Deferred:{"!url":"http://docs.angularjs.org/api/ng.$q",prototype:{resolve:"fn(value: ?)",reject:"fn(reason: ?)",
-notify:"fn(value: ?)",promise:"+Promise"}},ResourceClass:{"!url":"http://docs.angularjs.org/api/ngResource.$resource",prototype:{$promise:"+Promise",$save:"fn()"}},Resource:{"!url":"http://docs.angularjs.org/api/ngResource.$resource",prototype:{get:"fn(params: ?, callback: fn()) -\x3e +ResourceClass",save:"fn(params: ?, callback: fn()) -\x3e +ResourceClass",query:"fn(params: ?, callback: fn()) -\x3e +ResourceClass",remove:"fn(params: ?, callback: fn()) -\x3e +ResourceClass","delete":"fn(params: ?, callback: fn()) -\x3e +ResourceClass"}},
-service:{$anchorScroll:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$anchorScroll","!doc":"Checks current value of $location.hash() and scroll to related element."},$animate:{"!url":"http://docs.angularjs.org/api/ng.$animate","!doc":"Rudimentary DOM manipulation functions to insert, remove, move elements within the DOM.",addClass:{"!type":"fn(element: +Element, className: string, done?: fn()) -\x3e !this","!url":"http://docs.angularjs.org/api/ng.$animate#addClass","!doc":"Adds the provided className CSS class value to the provided element."},
-enter:{"!type":"fn(element: +Element, parent: +Element, after: +Element, done?: fn()) -\x3e !this","!url":"http://docs.angularjs.org/api/ng.$animate#enter","!doc":"Inserts the element into the DOM either after the after element or within the parent element."},leave:{"!type":"fn(element: +Element, done?: fn()) -\x3e !this","!url":"http://docs.angularjs.org/api/ng.$animate#leave","!doc":"Removes the element from the DOM."},move:{"!type":"fn(element: +Element, parent: +Element, after: +Element, done?: fn()) -\x3e !this",
-"!url":"http://docs.angularjs.org/api/ng.$animate#move","!doc":"Moves element to be placed either after the after element or inside of the parent element."},removeClass:{"!type":"fn(element: +Element, className: string, done?: fn()) -\x3e !this","!url":"http://docs.angularjs.org/api/ng.$animate#removeClass","!doc":"Removes the provided className CSS class value from the provided element."}},$cacheFactory:{"!type":"fn(cacheId: string, options?: ?) -\x3e cacheObj","!url":"http://docs.angularjs.org/api/ng.$cacheFactory",
-"!doc":"Factory that constructs cache objects and gives access to them."},$compile:{"!type":"fn(element: +Element, transclude: fn(scope: ?), maxPriority: number)","!url":"http://docs.angularjs.org/api/ng.$compile","!doc":"Compiles a piece of HTML string or DOM into a template and produces a template function."},$controller:{"!type":"fn(controller: fn(), locals: ?) -\x3e ?","!url":"http://docs.angularjs.org/api/ng.$controller","!doc":"Instantiates controllers."},$document:{"!type":"jQuery.fn","!url":"http://docs.angularjs.org/api/ng.$document",
-"!doc":"A jQuery (lite)-wrapped reference to the browser's window.document element."},$exceptionHandler:{"!type":"fn(exception: +Error, cause?: string)","!url":"http://docs.angularjs.org/api/ng.$exceptionHandler","!doc":"Any uncaught exception in angular expressions is delegated to this service."},$filter:{"!type":"fn(name: string) -\x3e fn(input: string) -\x3e string","!url":"http://docs.angularjs.org/api/ng.$filter","!doc":"Retrieve a filter function."},$http:{"!type":"fn(config: ?) -\x3e service.$q",
-"!url":"http://docs.angularjs.org/api/ng.$http","!doc":"Facilitates communication with remote HTTP servers.","delete":"fn(url: string, config?: ?) -\x3e +Promise",get:"fn(url: string, config?: ?) -\x3e +Promise",head:"fn(url: string, config?: ?) -\x3e +Promise",jsonp:"fn(url: string, config?: ?) -\x3e +Promise",post:"fn(url: string, data: ?, config?: ?) -\x3e +Promise",put:"fn(url: string, data: ?, config?: ?) -\x3e +Promise"},$interpolate:{"!type":"fn(text: string, mustHaveExpression?: bool, trustedContext?: string) -\x3e fn(context: ?) -\x3e string",
-"!url":"http://docs.angularjs.org/api/ng.$interpolate","!doc":"Compiles a string with markup into an interpolation function."},$locale:{"!url":"http://docs.angularjs.org/api/ng.$locale",id:"string"},$location:{"!url":"http://docs.angularjs.org/api/ng.$location","!doc":"Parses the URL in the browser address bar.",absUrl:{"!type":"fn() -\x3e string","!url":"http://docs.angularjs.org/api/ng.$location#absUrl","!doc":"Return full url representation."},hash:{"!type":"fn(value?: string) -\x3e string","!url":"http://docs.angularjs.org/api/ng.$location#hash",
-"!doc":"Get or set the hash fragment."},host:{"!type":"fn() -\x3e string","!url":"http://docs.angularjs.org/api/ng.$location#host","!doc":"Return host of current url."},path:{"!type":"fn(value?: string) -\x3e string","!url":"http://docs.angularjs.org/api/ng.$location#path","!doc":"Get or set the URL path."},port:{"!type":"fn() -\x3e number","!url":"http://docs.angularjs.org/api/ng.$location#port","!doc":"Returns the port of the current url."},protocol:{"!type":"fn() -\x3e string","!url":"http://docs.angularjs.org/api/ng.$location#protocol",
-"!doc":"Return protocol of current url."},replace:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$location#replace","!doc":"Changes to $location during current $digest will be replacing current history record, instead of adding new one."},search:{"!type":"fn(search: string, paramValue?: string) -\x3e string","!url":"http://docs.angularjs.org/api/ng.$location#search","!doc":"Get or set the URL query."},url:{"!type":"fn(url: string, replace?: string) -\x3e string","!url":"http://docs.angularjs.org/api/ng.$location#url",
-"!doc":"Get or set the current url."}},$log:{"!url":"http://docs.angularjs.org/api/ng.$log","!doc":"Simple service for logging.",debug:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#debug","!doc":"Write a debug message."},error:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#error","!doc":"Write an error message."},info:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#info","!doc":"Write an info message."},log:{"!type":"fn(message: string)",
-"!url":"http://docs.angularjs.org/api/ng.$log#log","!doc":"Write a log message."},warn:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#warn","!doc":"Write a warning message."}},$parse:{"!type":"fn(expression: string) -\x3e fn(context: ?, locals: ?) -\x3e ?","!url":"http://docs.angularjs.org/api/ng.$parse","!doc":"Converts Angular expression into a function."},$q:{"!url":"http://docs.angularjs.org/api/ng.$q","!doc":"A promise/deferred implementation.",all:{"!type":"fn(promises: [+Promise]) -\x3e +Promise",
-"!url":"http://docs.angularjs.org/api/ng.$q#all","!doc":"Combines multiple promises into a single promise."},defer:{"!type":"fn() -\x3e +Deferred","!url":"http://docs.angularjs.org/api/ng.$q#defer","!doc":"Creates a Deferred object which represents a task which will finish in the future."},reject:{"!type":"fn(reasion: ?) -\x3e +Promise","!url":"http://docs.angularjs.org/api/ng.$q#reject","!doc":"Creates a promise that is resolved as rejected with the specified reason."},when:{"!type":"fn(value: ?) -\x3e +Promise",
-"!url":"http://docs.angularjs.org/api/ng.$q#when","!doc":"Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise."}},$rootElement:{"!type":"+Element","!url":"http://docs.angularjs.org/api/ng.$rootElement","!doc":"The root element of Angular application."},$rootScope:{"!url":"http://docs.angularjs.org/api/ng.$rootScope",$apply:{"!type":"fn(expression: string)","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$apply","!doc":"Execute an expression in angular from outside of the angular framework."},
-$broadcast:{"!type":"fn(name: string, args?: ?) -\x3e eventObj","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$broadcast","!doc":"Dispatches an event name downwards to all child scopes."},$destroy:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$destroy","!doc":"Removes the current scope (and all of its children) from the parent scope."},$digest:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$digest","!doc":"Processes all of the watchers of the current scope and its children."},
-$emit:{"!type":"fn(name: string, args?: ?) -\x3e eventObj","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$emit","!doc":"Dispatches an event name upwards through the scope hierarchy."},$eval:{"!type":"fn(expression: string) -\x3e ?","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$eval","!doc":"Executes the expression on the current scope and returns the result."},$evalAsync:{"!type":"fn(expression: string)","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$evalAsync",
-"!doc":"Executes the expression on the current scope at a later point in time."},$new:{"!type":"fn(isolate: bool) -\x3e service.$rootScope","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$new","!doc":"Creates a new child scope."},$on:{"!type":"fn(name: string, listener: fn(event: ?)) -\x3e fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$on","!doc":"Listens on events of a given type."},$watch:{"!type":"fn(watchExpression: string, listener?: fn(), objectEquality?: bool) -\x3e fn()",
-"!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$watch","!doc":"Registers a listener callback to be executed whenever the watchExpression changes."},$watchCollection:{"!type":"fn(obj: string, listener: fn()) -\x3e fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$watchCollection","!doc":"Shallow watches the properties of an object and fires whenever any of the properties."},$id:{"!type":"number","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$id","!doc":"Unique scope ID."}},
-$sce:{HTML:"string",CSS:"string",URL:"string",RESOURCE_URL:"string",JS:"string",getTrusted:"fn(type: string, maybeTrusted: ?) -\x3e !1",getTrustedCss:"fn(maybeTrusted: ?) -\x3e !0",getTrustedHtml:"fn(maybeTrusted: ?) -\x3e !0",getTrustedJs:"fn(maybeTrusted: ?) -\x3e !0",getTrustedResourceUrl:"fn(maybeTrusted: ?) -\x3e !0",getTrustedUrl:"fn(maybeTrusted: ?) -\x3e !0",parse:"fn(type: string, expression: string) -\x3e fn(context: ?, locals: ?) -\x3e ?",parseAsCss:"fn(expression: string) -\x3e fn(context: ?, locals: ?) -\x3e ?",
-parseAsHtml:"fn(expression: string) -\x3e fn(context: ?, locals: ?) -\x3e ?",parseAsJs:"fn(expression: string) -\x3e fn(context: ?, locals: ?) -\x3e ?",parseAsResourceUrl:"fn(expression: string) -\x3e fn(context: ?, locals: ?) -\x3e ?",parseAsUrl:"fn(expression: string) -\x3e fn(context: ?, locals: ?) -\x3e ?",trustAs:"fn(type: string, value: ?) -\x3e !1",trustAsHtml:"fn(value: ?) -\x3e !0",trustAsJs:"fn(value: ?) -\x3e !0",trustAsResourceUrl:"fn(value: ?) -\x3e !0",trustAsUrl:"fn(value: ?) -\x3e !0",
-isEnabled:"fn() -\x3e bool"},$templateCache:{"!url":"http://docs.angularjs.org/api/ng.$templateCache","!proto":"cacheObj"},$timeout:{"!type":"fn(fn: fn(), delay?: number, invokeApply?: bool) -\x3e +Promise","!url":"http://docs.angularjs.org/api/ng.$timeout","!doc":"Angular's wrapper for window.setTimeout.",cancel:"fn(promise: +Promise)"},$window:"\x3ctop\x3e",$injector:{"!url":"http://docs.angularjs.org/api/AUTO.$injector","!doc":"Retrieve object instances as defined by provider.",annotate:{"!type":"fn(f: fn()) -\x3e [string]",
-"!url":"http://docs.angularjs.org/api/AUTO.$injector#annotate","!doc":"Returns an array of service names which the function is requesting for injection."},get:{"!type":"fn(name: string) -\x3e ?","!url":"http://docs.angularjs.org/api/AUTO.$injector#get","!doc":"Return an instance of a service."},has:{"!type":"fn(name: string) -\x3e bool","!url":"http://docs.angularjs.org/api/AUTO.$injector#has","!doc":"Allows the user to query if the particular service exist."},instantiate:{"!type":"fn(type: fn(), locals?: ?) -\x3e +!0",
-"!url":"http://docs.angularjs.org/api/AUTO.$injector#instantiate","!doc":"Create a new instance of JS type."},invoke:{"!type":"fn(type: fn(), self?: ?, locals?: ?) -\x3e !0.!ret","!url":"http://docs.angularjs.org/api/AUTO.$injector#invoke","!doc":"Invoke the method and supply the method arguments from the $injector."}},$provide:{"!url":"http://docs.angularjs.org/api/AUTO.$provide","!doc":"Use $provide to register new providers with the $injector.",constant:{"!type":"fn(name: string, value: ?) -\x3e !this",
-"!effects":["custom angular_regField"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#constant","!doc":"A constant value."},decorator:{"!type":"fn(name: string, decorator: fn())","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#decorator","!doc":"Decoration of service, allows the decorator to intercept the service instance creation."},factory:{"!type":"fn(name: string, providerFunction: fn()) -\x3e !this","!effects":["custom angular_regFieldCall"],
-"!url":"http://docs.angularjs.org/api/AUTO.$provide#factory","!doc":"A short hand for configuring services if only $get method is required."},provider:{"!type":"fn(name: string, providerType: fn()) -\x3e !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#provider","!doc":"Register a provider for a service."},service:{"!type":"fn(name: string, constructor: fn()) -\x3e !this","!effects":["custom angular_regFieldNew"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#provider",
-"!doc":"Register a provider for a service."},value:{"!type":"fn(name: string, object: ?) -\x3e !this","!effects":["custom angular_regField"],"!url":"http://docs.angularjs.org/api/AUTO.$providevalue","!doc":"A short hand for configuring services if the $get method is a constant."}},$cookies:{"!url":"http://docs.angularjs.org/api/ngCookies.$cookies","!doc":"Provides read/write access to browser's cookies.",text:"string"},$resource:{"!type":"fn(url: string, paramDefaults?: ?, actions?: ?) -\x3e +Resource",
-"!url":"http://docs.angularjs.org/api/ngResource.$resource","!doc":"Creates a resource object that lets you interact with RESTful server-side data sources."},$route:{"!url":"http://docs.angularjs.org/api/ngRoute.$route","!doc":"Deep-link URLs to controllers and views.",reload:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ngRoute.$route#reload","!doc":"Reload the current route even if $location hasn't changed."},current:{"!url":"http://docs.angularjs.org/api/ngRoute.$route#current","!doc":"Reference to the current route definition.",
-controller:"?",locals:"?"},routes:"[?]"},$sanitize:{"!type":"fn(string) -\x3e string","!url":"http://docs.angularjs.org/api/ngSanitize.$sanitize","!doc":"Sanitize HTML input."},$swipe:{"!url":"http://docs.angularjs.org/api/ngTouch.$swipe","!doc":"A service that abstracts the messier details of hold-and-drag swipe behavior.",bind:{"!type":"fn(element: +Element, handlers: ?)","!url":"http://docs.angularjs.org/api/ngTouch.$swipe#bind","!doc":"Abstracts the messier details of hold-and-drag swipe behavior."}}}},
-angular:{bind:{"!type":"fn(self: ?, fn: fn(), args?: ?) -\x3e !custom:angular_bind","!url":"http://docs.angularjs.org/api/angular.bind","!doc":"Returns a function which calls function fn bound to self."},bootstrap:{"!type":"fn(element: +Element, modules?: [string]) -\x3e service.$injector","!url":"http://docs.angularjs.org/api/angular.bootstrap","!doc":"Use this function to manually start up angular application."},copy:{"!type":"fn(source: ?, target?: ?) -\x3e !0","!url":"http://docs.angularjs.org/api/angular.copy",
-"!doc":"Creates a deep copy of source, which should be an object or an array."},element:{"!type":"fn(element: +Element) -\x3e jQuery.fn","!url":"http://docs.angularjs.org/api/angular.element","!doc":"Wraps a raw DOM element or HTML string as a jQuery element."},equals:{"!type":"fn(o1: ?, o2: ?) -\x3e bool","!url":"http://docs.angularjs.org/api/angular.equals","!doc":"Determines if two objects or two values are equivalent."},extend:{"!type":"fn(dst: ?, src: ?) -\x3e !0","!url":"http://docs.angularjs.org/api/angular.extend",
-"!doc":"Extends the destination object dst by copying all of the properties from the src object(s) to dst."},forEach:{"!type":"fn(obj: ?, iterator: fn(value: ?, key: ?), context?: ?) -\x3e !0","!effects":["call !1 this\x3d!2 !0.\x3ci\x3e number"],"!url":"http://docs.angularjs.org/api/angular.forEach","!doc":"Invokes the iterator function once for each item in obj collection, which can be either an object or an array."},fromJson:{"!type":"fn(json: string) -\x3e ?","!url":"http://docs.angularjs.org/api/angular.fromJson",
-"!doc":"Deserializes a JSON string."},identity:{"!type":"fn(val: ?) -\x3e !0","!url":"http://docs.angularjs.org/api/angular.identity","!doc":"A function that returns its first argument."},injector:{"!type":"fn(modules: [string]) -\x3e service.$injector","!url":"http://docs.angularjs.org/api/angular.injector","!doc":"Creates an injector function"},isArray:{"!type":"fn(val: ?) -\x3e bool","!url":"http://docs.angularjs.org/api/angular.isArray","!doc":"Determines if a reference is an Array."},isDate:{"!type":"fn(val: ?) -\x3e bool",
-"!url":"http://docs.angularjs.org/api/angular.isDate","!doc":"Determines if a reference is a date."},isDefined:{"!type":"fn(val: ?) -\x3e bool","!url":"http://docs.angularjs.org/api/angular.isDefined","!doc":"Determines if a reference is defined."},isElement:{"!type":"fn(val: ?) -\x3e bool","!url":"http://docs.angularjs.org/api/angular.isElement","!doc":"Determines if a reference is a DOM element."},isFunction:{"!type":"fn(val: ?) -\x3e bool","!url":"http://docs.angularjs.org/api/angular.isFunction",
-"!doc":"Determines if a reference is a function."},isNumber:{"!type":"fn(val: ?) -\x3e bool","!url":"http://docs.angularjs.org/api/angular.isNumber","!doc":"Determines if a reference is a number."},isObject:{"!type":"fn(val: ?) -\x3e bool","!url":"http://docs.angularjs.org/api/angular.isObject","!doc":"Determines if a reference is an object."},isString:{"!type":"fn(val: ?) -\x3e bool","!url":"http://docs.angularjs.org/api/angular.isString","!doc":"Determines if a reference is a string."},isUndefined:{"!type":"fn(val: ?) -\x3e bool",
-"!url":"http://docs.angularjs.org/api/angular.isUndefined","!doc":"Determines if a reference is undefined."},lowercase:{"!type":"fn(val: string) -\x3e string","!url":"http://docs.angularjs.org/api/angular.lowercase","!doc":"Converts the specified string to lowercase."},module:{"!type":"fn(name: string, deps: [string]) -\x3e !custom:angular_module","!url":"http://docs.angularjs.org/api/angular.module","!doc":"A global place for creating, registering and retrieving Angular modules."},Module:"Module",
-noop:{"!type":"fn()","!url":"http://docs.angularjs.org/api/angular.noop","!doc":"A function that performs no operations."},toJson:{"!type":"fn(val: ?) -\x3e string","!url":"http://docs.angularjs.org/api/angular.toJson","!doc":"Serializes input into a JSON-formatted string."},uppercase:{"!type":"fn(string) -\x3e string","!url":"http://docs.angularjs.org/api/angular.uppercase","!doc":"Converts the specified string to uppercase."},version:{"!url":"http://docs.angularjs.org/api/angular.version",full:"string",
-major:"number",minor:"number",dot:"number",codename:"string"}}};d.registerPlugin("orionAngular",function(a){z(a);a.on("reset",function(){z(a)});return{defs:fa,passes:{postParse:E,postLoadDef:K,preCondenseReach:l,postCondenseReach:v},loadFirst:!0}})});
-(function(a){if("object"===typeof exports&&"object"===typeof module)return a(require("../lib/infer"),require("../lib/tern"),require);if("function"===typeof define&&define.amd)return define("tern/plugin/orionExpress",["../lib/infer","../lib/tern","./resolver"],a);a(infer,tern,resolver)})(function(a,d,t){function k(c,b,k){b=d.resolvePos(c,b.end);c=a.findExpressionAround(c.ast,null,b,c.scope);if((c=t.getTemplatesForNode(g,c))&&0
+  Copyright (C) 2013 Thaddee Tyl 
+  Copyright (C) 2013 Mathias Bynens 
+  Copyright (C) 2012 Ariya Hidayat 
+  Copyright (C) 2012 Mathias Bynens 
+  Copyright (C) 2012 Joost-Wim Boekesteijn 
+  Copyright (C) 2012 Kris Kowal 
+  Copyright (C) 2012 Yusuke Suzuki 
+  Copyright (C) 2012 Arpad Borsos 
+  Copyright (C) 2011 Ariya Hidayat 
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
+  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2010, 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2015 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2015 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2015 Marijn Haverbeke and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ *
+ * Contributors:
+ *     IBM Corporation - Allow original requirejs plugin to find files in Orion workspace
+ *******************************************************************************/
+
+/**
+ * @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/requirejs/text for details
+ */
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2015 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+/**
+ * @license RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/requirejs/i18n for details
+ */
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2015 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ ******************************************************************************/
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2014, 2015 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ ******************************************************************************/
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2015 IBM Corporation, Inc. and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+ *
+ * Contributors:
+ *   IBM Corporation - Initial API and implementation
+ ******************************************************************************/
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2015 IBM Corporation, Inc. and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+ *
+ * Contributors:
+ *   IBM Corporation - Initial API and implementation
+ ******************************************************************************/
+
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2012, 2015 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ *
+ * Contributors: IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+!function(e,t){"use strict";"function"==typeof define&&define.amd?define("esprima",["exports"],t):t("undefined"!=typeof exports?exports:e.esprima={})}(this,function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function r(e){return e>=48&&57>=e}function n(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function o(e){return"01234567".indexOf(e)>=0}function s(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function a(e){return 10===e||13===e||8232===e||8233===e}function i(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&Mr.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function l(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&Mr.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function c(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function p(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function u(e){if(zr&&p(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function h(e,r,n,o,s){var a;t("number"==typeof n,"Comment must have valid position"),Br.lastCommentStart=n,a={type:e,value:r},$r.range&&(a.range=[n,o]),$r.loc&&(a.loc=s),$r.comments.push(a),$r.attachComment&&($r.leadingComments.push(a),$r.trailingComments.push(a))}function f(e){var t,r,n,o;for(t=Ar-e,r={start:{line:Cr,column:Ar-Pr-e}};Gr>Ar;)if(n=Dr.charCodeAt(Ar),++Ar,a(n))return Ir=!0,$r.comments&&(o=Dr.slice(t+e,Ar-1),r.end={line:Cr,column:Ar-Pr-1},h("Line",o,t,Ar-1,r)),13===n&&10===Dr.charCodeAt(Ar)&&++Ar,++Cr,void(Pr=Ar);$r.comments&&(o=Dr.slice(t+e,Ar),r.end={line:Cr,column:Ar-Pr},h("Line",o,t,Ar,r))}function m(){var e,t,r,n;for($r.comments&&(e=Ar-2,t={start:{line:Cr,column:Ar-Pr-2}});Gr>Ar;)if(r=Dr.charCodeAt(Ar),a(r))13===r&&10===Dr.charCodeAt(Ar+1)&&++Ar,Ir=!0,++Cr,++Ar,Pr=Ar;else if(42===r){if(47===Dr.charCodeAt(Ar+1))return++Ar,++Ar,void($r.comments&&(n=Dr.slice(e+2,Ar-2),t.end={line:Cr,column:Ar-Pr},h("Block",n,e,Ar,t)));++Ar}else++Ar;Ar>=Gr&&$r.comments?(t.end={line:Cr,column:Ar-Pr},n=Dr.slice(e+2,Ar),h("Block",n,e,Ar,t),Q()):K()}function g(){var e,t;for(Ir=!1,t=0===Ar;Gr>Ar;)if(e=Dr.charCodeAt(Ar),s(e))++Ar;else if(a(e))Ir=!0,++Ar,13===e&&10===Dr.charCodeAt(Ar)&&++Ar,++Cr,Pr=Ar,t=!0;else if(47===e)if(e=Dr.charCodeAt(Ar+1),47===e)++Ar,++Ar,f(2),t=!0;else{if(42!==e)break;++Ar,++Ar,m()}else if(t&&45===e){if(45!==Dr.charCodeAt(Ar+1)||62!==Dr.charCodeAt(Ar+2))break;Ar+=3,f(3)}else{if(60!==e)break;if("!--"!==Dr.slice(Ar+1,Ar+4))break;++Ar,++Ar,++Ar,++Ar,f(4)}}function b(e){var t,r,o,s=0;for(r="u"===e?4:2,t=0;r>t;++t){if(!(Gr>Ar&&n(Dr[Ar])))return"";o=Dr[Ar++],s=16*s+"0123456789abcdef".indexOf(o.toLowerCase())}return String.fromCharCode(s)}function y(){var e,t,r,o;for(e=Dr[Ar],t=0,"}"===e&&K();Gr>Ar&&(e=Dr[Ar++],n(e));)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&K(),65535>=t?String.fromCharCode(t):(r=(t-65536>>10)+55296,o=(t-65536&1023)+56320,String.fromCharCode(r,o))}function v(){var e,t;for(e=Dr.charCodeAt(Ar++),t=String.fromCharCode(e),92===e&&(117!==Dr.charCodeAt(Ar)&&K(),++Ar,e=b("u"),e&&"\\"!==e&&i(e.charCodeAt(0))||K(),t=e);Gr>Ar&&(e=Dr.charCodeAt(Ar),l(e));)++Ar,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==Dr.charCodeAt(Ar)&&K(),++Ar,e=b("u"),e&&"\\"!==e&&l(e.charCodeAt(0))||K(),t+=e);return t}function w(){var e,t;for(e=Ar++;Gr>Ar;){if(t=Dr.charCodeAt(Ar),92===t)return Ar=e,v();if(!l(t))break;++Ar}return Dr.slice(e,Ar)}function _(){var e,t,r;return e=Ar,t=92===Dr.charCodeAt(Ar)?v():w(),r=1===t.length?jr.Identifier:u(t)?jr.Keyword:"null"===t?jr.NullLiteral:"true"===t||"false"===t?jr.BooleanLiteral:jr.Identifier,{type:r,value:t,lineNumber:Cr,lineStart:Pr,start:e,end:Ar}}function S(){var e,t,r,n,o=Ar,s=Dr.charCodeAt(Ar),a=Dr[Ar];switch(s){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++Ar,$r.tokenize&&(40===s?$r.openParenToken=$r.tokens.length:123===s&&($r.openCurlyToken=$r.tokens.length)),{type:jr.Punctuator,value:String.fromCharCode(s),lineNumber:Cr,lineStart:Pr,start:o,end:Ar};default:if(e=Dr.charCodeAt(Ar+1),61===e)switch(s){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return Ar+=2,{type:jr.Punctuator,value:String.fromCharCode(s)+String.fromCharCode(e),lineNumber:Cr,lineStart:Pr,start:o,end:Ar};case 33:case 61:return Ar+=2,61===Dr.charCodeAt(Ar)&&++Ar,{type:jr.Punctuator,value:Dr.slice(o,Ar),lineNumber:Cr,lineStart:Pr,start:o,end:Ar}}}if(n=Dr.substr(Ar,4),">>>="===n)return Ar+=4,{type:jr.Punctuator,value:n,lineNumber:Cr,lineStart:Pr,start:o,end:Ar};if(r=n.substr(0,3),">>>"===r||"<<="===r||">>="===r)return Ar+=3,{type:jr.Punctuator,value:r,lineNumber:Cr,lineStart:Pr,start:o,end:Ar};if(t=r.substr(0,2),a===t[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t)return Ar+=2,{type:jr.Punctuator,value:t,lineNumber:Cr,lineStart:Pr,start:o,end:Ar};if("<>=!+-*%&|^/".indexOf(a)>=0)return++Ar,{type:jr.Punctuator,value:a,lineNumber:Cr,lineStart:Pr,start:o,end:Ar};++Ar;var i={type:jr.Punctuator,lineNumber:Cr,lineStart:Pr,start:o,end:Ar,value:Dr.slice(o,Ar)};K(i)}function j(e){for(var t="";Gr>Ar&&n(Dr[Ar]);)t+=Dr[Ar++];return 0===t.length&&K(),i(Dr.charCodeAt(Ar))&&K(),{type:jr.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:Cr,lineStart:Pr,start:e,end:Ar}}function T(e){var t,n;for(n="";Gr>Ar&&(t=Dr[Ar],"0"===t||"1"===t);)n+=Dr[Ar++];return 0===n.length&&K(),Gr>Ar&&(t=Dr.charCodeAt(Ar),(i(t)||r(t))&&K()),{type:jr.NumericLiteral,value:parseInt(n,2),lineNumber:Cr,lineStart:Pr,start:e,end:Ar}}function O(e,t){var n,s;for(o(e)?(s=!0,n="0"+Dr[Ar++]):(s=!1,++Ar,n="");Gr>Ar&&o(Dr[Ar]);)n+=Dr[Ar++];return s||0!==n.length||K(),(i(Dr.charCodeAt(Ar))||r(Dr.charCodeAt(Ar)))&&K(),{type:jr.NumericLiteral,value:parseInt(n,8),octal:s,lineNumber:Cr,lineStart:Pr,start:t,end:Ar}}function x(){var e,t;for(e=Ar+1;Gr>e;++e){if(t=Dr[e],"8"===t||"9"===t)return!1;if(!o(t))return!0}return!0}function k(){var e,n,s;if(s=Dr[Ar],t(r(s.charCodeAt(0))||"."===s,"Numeric literal must start with a decimal digit or a decimal point"),n=Ar,e="","."!==s){if(e=Dr[Ar++],s=Dr[Ar],"0"===e){if("x"===s||"X"===s)return++Ar,j(n);if("b"===s||"B"===s)return++Ar,T(n);if("o"===s||"O"===s)return O(s,n);if(o(s)&&x())return O(s,n)}for(;r(Dr.charCodeAt(Ar));)e+=Dr[Ar++];s=Dr[Ar]}if("."===s){for(e+=Dr[Ar++];r(Dr.charCodeAt(Ar));)e+=Dr[Ar++];s=Dr[Ar]}if("e"===s||"E"===s)if(e+=Dr[Ar++],s=Dr[Ar],("+"===s||"-"===s)&&(e+=Dr[Ar++]),r(Dr.charCodeAt(Ar)))for(;r(Dr.charCodeAt(Ar));)e+=Dr[Ar++];else K();return i(Dr.charCodeAt(Ar))&&K(),{type:jr.NumericLiteral,value:parseFloat(e),lineNumber:Cr,lineStart:Pr,start:n,end:Ar}}function E(){var e,r,n,s,i,l,c="",p=!1;for(e=Dr[Ar],t("'"===e||'"'===e,"String literal must starts with a quote"),r=Ar,++Ar;Gr>Ar;){if(n=Dr[Ar++],n===e){e="";break}if("\\"===n)if(n=Dr[Ar++],n&&a(n.charCodeAt(0)))++Cr,"\r"===n&&"\n"===Dr[Ar]&&++Ar,Pr=Ar;else switch(n){case"u":case"x":"{"===Dr[Ar]?(++Ar,c+=y()):(l=Ar,i=b(n),i?c+=i:(Ar=l,c+=n));break;case"n":c+="\n";break;case"r":c+="\r";break;case"t":c+="	";break;case"b":c+="\b";break;case"f":c+="\f";break;case"v":c+="";break;default:o(n)?(s="01234567".indexOf(n),0!==s&&(p=!0),Gr>Ar&&o(Dr[Ar])&&(p=!0,s=8*s+"01234567".indexOf(Dr[Ar++]),"0123".indexOf(n)>=0&&Gr>Ar&&o(Dr[Ar])&&(s=8*s+"01234567".indexOf(Dr[Ar++]))),c+=String.fromCharCode(s)):c+=n}else{if(a(n.charCodeAt(0)))break;c+=n}}var d={type:jr.StringLiteral,value:c,octal:p,lineNumber:Fr,lineStart:Wr,start:r,end:Ar};return""!==e&&Q(d),d}function R(e,t){var r=e;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t){return parseInt(t,16)<=1114111?"x":void K(null,Rr.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{RegExp(r)}catch(n){K(null,Rr.InvalidRegExp)}try{return new RegExp(e,t)}catch(o){return null}}function M(){var e,r,n,o,s;for(e=Dr[Ar],t("/"===e,"Regular expression literal must start with a slash"),r=Dr[Ar++],n=!1,o=!1;Gr>Ar;)if(e=Dr[Ar++],r+=e,"\\"===e)e=Dr[Ar++],a(e.charCodeAt(0))&&K(null,Rr.UnterminatedRegExp),r+=e;else if(a(e.charCodeAt(0)))K(null,Rr.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){o=!0;break}"["===e&&(n=!0)}return o||K(Jr,Rr.UnterminatedRegExp),s=r.substr(1,r.length-2),{value:s,literal:r}}function D(){var e,t,r,n;for(t="",r="";Gr>Ar&&(e=Dr[Ar],l(e.charCodeAt(0)));)if(++Ar,"\\"===e&&Gr>Ar)if(e=Dr[Ar],"u"===e){if(++Ar,n=Ar,e=b("u"))for(r+=e,t+="\\u";Ar>n;++n)t+=Dr[n];else Ar=n,r+="u",t+="\\u";Q()}else t+="\\",Q();else r+=e,t+=e;return{value:r,literal:t}}function z(){Hr=!0;var e,t,r,n;return g(),e=Ar,t=M(),r=D(),n=R(t.value,r.value),Hr=!1,$r.tokenize?{type:jr.RegularExpression,value:n,regex:{pattern:t.value,flags:r.value},lineNumber:Cr,lineStart:Pr,start:e,end:Ar}:{literal:t.literal+r.literal,value:n,regex:{pattern:t.value,flags:r.value},start:e,end:Ar}}function A(){var e,t,r,n;return g(),e=Ar,t={start:{line:Cr,column:Ar-Pr}},r=z(),t.end={line:Cr,column:Ar-Pr},$r.tokenize||($r.tokens.length>0&&(n=$r.tokens[$r.tokens.length-1],n.range[0]===e&&"Punctuator"===n.type&&("/"===n.value||"/="===n.value)&&$r.tokens.pop()),$r.tokens.push({type:"RegularExpression",value:r.literal,regex:r.regex,range:[e,Ar],loc:t})),r}function C(e){return e.type===jr.Identifier||e.type===jr.Keyword||e.type===jr.BooleanLiteral||e.type===jr.NullLiteral}function P(){var e,t;if(e=$r.tokens[$r.tokens.length-1],!e)return A();if("Punctuator"===e.type){if("]"===e.value)return S();if(")"===e.value)return t=$r.tokens[$r.openParenToken-1],!t||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?S():A();if("}"===e.value){if($r.tokens[$r.openCurlyToken-3]&&"Keyword"===$r.tokens[$r.openCurlyToken-3].type){if(t=$r.tokens[$r.openCurlyToken-4],!t)return S()}else{if(!$r.tokens[$r.openCurlyToken-4]||"Keyword"!==$r.tokens[$r.openCurlyToken-4].type)return S();if(t=$r.tokens[$r.openCurlyToken-5],!t)return A()}return Or.indexOf(t.value)>=0?S():A()}return A()}return"Keyword"===e.type&&"this"!==e.value?A():S()}function I(){var e;return Ar>=Gr?{type:jr.EOF,lineNumber:Cr,lineStart:Pr,start:Ar,end:Ar,range:[Ar,Ar]}:(e=Dr.charCodeAt(Ar),i(e)?_():40===e||41===e||59===e?S():39===e||34===e?E():46===e?r(Dr.charCodeAt(Ar+1))?k():S():r(e)?k():$r.tokenize&&47===e?P():S())}function N(){var e,t,r,n;return e={start:{line:Cr,column:Ar-Pr}},t=I(),e.end={line:Cr,column:Ar-Pr},t.type!==jr.EOF&&(r=Dr.slice(t.start,t.end),n={type:Tr[t.type],value:r,range:[t.start,t.end],loc:e},t.regex&&(n.regex={pattern:t.regex.pattern,flags:t.regex.flags}),$r.tokens.push(n)),t}function U(){var e;return Hr=!0,Nr=Ar,Ur=Cr,Lr=Pr,g(),e=Jr,qr=Ar,Fr=Cr,Wr=Pr,Jr="undefined"!=typeof $r.tokens?N():I(),Hr=!1,e}function L(){Hr=!0,g(),Nr=Ar,Ur=Cr,Lr=Pr,qr=Ar,Fr=Cr,Wr=Pr,Jr="undefined"!=typeof $r.tokens?N():I(),Hr=!1}function q(e){if($r.deps)for(var t=e.length,r=0;t>r;r++){var n=e[r];n.type===xr.Literal&&$r.deps.push(n)}}function F(e,t){if($r.deps){var r=t.length;if("importScripts"===e.name)q(t);else if("Worker"===e.name)t[0].type===xr.Literal&&$r.deps.push(t[0]);else if("require"===e.name){var n=t[0];n.type===xr.ArrayExpression?q(n.elements):n.type===xr.Literal&&$r.deps.push(n),r>1&&(n=t[1],n.type===xr.ArrayExpression&&q(n.elements))}else"requirejs"===e.name?(n=t[0],n.type===xr.ArrayExpression&&q(n.elements)):"define"===e.name&&r>1&&(n=t[0],n.type===xr.Literal&&(n=t[1]),n.type===xr.ArrayExpression&&q(n.elements))}}function W(){this.line=Fr,this.column=qr-Wr}function H(){this.start=new W,this.end=null}function G(e){this.start={line:e.lineNumber,column:e.start-e.lineStart},this.end=null}function J(){$r.loc&&(this.loc=new H),$r.range&&(this.range=[qr,0]),$r.directSourceFile&&(this.sourceFile=$r.directSourceFile)}function B(e){$r.loc&&(this.loc=new G(e)),$r.range&&(this.range=[e.start,0]),$r.directSourceFile&&(this.sourceFile=$r.directSourceFile)}function $(e,t,r,n){var o=new Error("Line "+e+": "+r);if(o.index=t,o.lineNumber=e,o.column=t-(Hr?Pr:Lr)+1,o.description=r,n){var s=n;2===n.type&&$r&&Array.isArray($r.tokens)&&$r.tokens.length>0&&(s=$r.tokens[$r.tokens.length-1]),o.index="number"==typeof s.start?s.start:s.range[0],o.token=s.value,o.end="number"==typeof s.end?s.end:s.range[1]}return o}function V(e){var r,n;throw r=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return t(n0&&(t=$r.tokens[$r.tokens.length-2]),Q(t,Rr.MissingToken,r)}else t.type!==jr.EOF&&($r.tokens&&$r.tokens.length>0&&(t=$r.tokens[$r.tokens.length-2]),Q(t,Rr.MissingToken,","));else Z(",")}function tt(e){var t=U();(t.type!==jr.Keyword||t.value!==e)&&K(t)}function rt(e){return Jr.type===jr.Punctuator&&Jr.value===e}function nt(e){return Jr.type===jr.Keyword&&Jr.value===e}function ot(){var e;return Jr.type!==jr.Punctuator?!1:(e=Jr.value,"="===e||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function st(){try{if(59===Dr.charCodeAt(qr)||rt(";"))return void U();if(Ir)return;if(Nr=qr,Ur=Fr,Lr=Wr,Jr.type!==jr.EOF&&!rt("}")){var e=Jr;$r.errors&&yr(Wr),K(e)}}catch(t){if($r.errors)return void mr(t);throw t}}function at(e){return e.type===xr.Identifier||e.type===xr.MemberExpression}function it(){var e=[],t=new J;for(Z("[");!rt("]");)rt(",")?(U(),e.push(null)):(e.push(Rt()),rt("]")||Z(","));return U(),t.finishArrayExpression(e)}function lt(e,t){var r,n,o=new J;return r=zr,n=rr(),t&&zr&&d(e[0].name)&&Q(t,Rr.StrictParamName),zr=r,o.finishFunctionExpression(null,e,[],n)}function ct(){var e,t=new J;return e=U(),e.type===jr.StringLiteral||e.type===jr.NumericLiteral?(zr&&e.octal&&Q(e,Rr.StrictOctalLiteral),t.finishLiteral(e)):t.finishIdentifier(e.value)}function pt(){var e,t,r,n,o,s=new J;return e=Jr,e.type===jr.Identifier?(r=ct(),"get"!==e.value||rt(":")||rt("(")?"set"!==e.value||rt(":")||rt("(")?Sr(e,r,s):(t=ct(),Z("("),e=Jr,e.type!==jr.Identifier?(Z(")"),Q(e),n=lt([])):(o=[At()],Z(")"),n=lt(o,e)),s.finishProperty("set",t,n,!1,!1)):(t=ct(),Z("("),Z(")"),n=lt([]),s.finishProperty("get",t,n,!1,!1))):e.type!==jr.EOF&&e.type!==jr.Punctuator?Sr(e,ct(),s):void K(e)}function dt(){var e,t,r,n,o=[],s={},a=String,i=new J;for(Z("{");!rt("}");)e=pt(),null!=e&&"undefined"!=typeof e&&(t=e.key.type===xr.Identifier?e.key.name:a(e.key.value),n="init"===e.kind?Er.Data:"get"===e.kind?Er.Get:Er.Set,r="$"+t,Object.prototype.hasOwnProperty.call(s,r)?(s[r]===Er.Data?zr&&n===Er.Data?X(Rr.StrictDuplicateProperty):n!==Er.Data&&X(Rr.AccessorDataProperty):n===Er.Data?X(Rr.AccessorDataProperty):s[r]&n&&X(Rr.AccessorGetSet),s[r]|=n):s[r]=n,o.push(e),rt("}")||et("}"));return Z("}"),i.finishObjectExpression(o)}function ut(){var e;return Z("("),rt(")")?(U(),kr.ArrowParameterPlaceHolder):(++Br.parenthesisCount,e=Mt(),Z(")"),e)}function ht(){var e,t,r,n;if(rt("("))return ut();if(rt("["))return it();if(rt("{"))return dt();if(e=Jr.type,n=new J,e===jr.Identifier)r=n.finishIdentifier(U().value);else if(e===jr.StringLiteral||e===jr.NumericLiteral)zr&&Jr.octal&&Q(Jr,Rr.StrictOctalLiteral),r=n.finishLiteral(U());else if(e===jr.Keyword){if(nt("function"))return ir();nt("this")?(U(),r=n.finishThisExpression()):K(U())}else e===jr.BooleanLiteral?(t=U(),t.value="true"===t.value,r=n.finishLiteral(t)):e===jr.NullLiteral?(t=U(),t.value=null,r=n.finishLiteral(t)):rt("/")||rt("/=")?(Ar=qr,t="undefined"!=typeof $r.tokens?A():z(),U(),r=n.finishLiteral(t)):K(U());return r}function ft(){var e=[];if(Z("("),!rt(")"))for(;Gr>qr&&(e.push(Rt()),!rt(")"));)et(")");return fr(")"),e}function mt(){var e,t=new J;try{e=U(),C(e)||($r.errors&&wr(e),K(e))}catch(r){if($r.errors)return mr(r),_r(t,xr.Identifier);throw r}return t.finishIdentifier(e.value)}function gt(){return Z("."),mt()}function bt(){var e;return Z("["),e=Mt(),Z("]"),e}function yt(){var e,t,r=new J;return tt("new"),e=wt(),t=rt("(")?ft():[],r.finishNewExpression(e,t)}function vt(){var e,t,r,n,o=Br.allowIn;for(n=Jr,Br.allowIn=!0,e=nt("new")?yt():ht();;)if(rt("."))r=gt(),e=new B(n).finishMemberExpression(".",e,r);else if(rt("("))t=ft(),e=new B(n).finishCallExpression(e,t);else{if(!rt("["))break;r=bt(),e=new B(n).finishMemberExpression("[",e,r)}return Br.allowIn=o,e}function wt(){var e,r,n;for(t(Br.allowIn,"callee of new expression always allow in keyword."),n=Jr,e=nt("new")?yt():ht();;)if(rt("["))r=bt(),e=new B(n).finishMemberExpression("[",e,r);else{if(!rt("."))break;r=gt(),e=new B(n).finishMemberExpression(".",e,r)}return e}function _t(){var e,t,r=Jr;return e=vt(),Ir||Jr.type!==jr.Punctuator||(rt("++")||rt("--"))&&(zr&&e.type===xr.Identifier&&d(e.name)&&X(Rr.StrictLHSPostfix),at(e)||X(Rr.InvalidLHSInAssignment),t=U(),e=new B(r).finishPostfixExpression(t.value,e)),e}function St(){var e,t,r;return Jr.type!==jr.Punctuator&&Jr.type!==jr.Keyword?t=_t():rt("++")||rt("--")?(r=Jr,e=U(),t=St(),zr&&t.type===xr.Identifier&&d(t.name)&&X(Rr.StrictLHSPrefix),at(t)||X(Rr.InvalidLHSInAssignment),t=new B(r).finishUnaryExpression(e.value,t)):rt("+")||rt("-")||rt("~")||rt("!")?(r=Jr,e=U(),t=St(),t=new B(r).finishUnaryExpression(e.value,t)):nt("delete")||nt("void")||nt("typeof")?(r=Jr,e=U(),t=St(),t=new B(r).finishUnaryExpression(e.value,t),zr&&"delete"===t.operator&&t.argument.type===xr.Identifier&&X(Rr.StrictDelete)):t=_t(),t}function jt(e,t){var r=0;if(e.type!==jr.Punctuator&&e.type!==jr.Keyword)return 0;switch(e.value){case"||":r=1;break;case"&&":r=2;break;case"|":r=3;break;case"^":r=4;break;case"&":r=5;break;case"==":case"!=":case"===":case"!==":r=6;break;case"<":case">":case"<=":case">=":case"instanceof":r=7;break;case"in":r=t?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11}return r}function Tt(){var e,t,r,n,o,s,a,i,l,c;if(e=Jr,l=St(),l===kr.ArrowParameterPlaceHolder)return l;if(n=Jr,o=jt(n,Br.allowIn),0===o)return l;for(n.prec=o,U(),t=[e,Jr],a=St(),s=[l,n,a];(o=jt(Jr,Br.allowIn))>0;){for(;s.length>2&&o<=s[s.length-2].prec;)a=s.pop(),i=s.pop().value,l=s.pop(),t.pop(),r=new B(t[t.length-1]).finishBinaryExpression(i,l,a),s.push(r);n=U(),n.prec=o,s.push(n),t.push(Jr),r=St(),s.push(r)}for(c=s.length-1,r=s[c],t.pop();c>1;)r=new B(t.pop()).finishBinaryExpression(s[c-1].value,s[c-2],r),c-=2;return r}function Ot(){var e,t,r,n,o;return o=Jr,e=Tt(),e===kr.ArrowParameterPlaceHolder?e:(rt("?")&&(U(),t=Br.allowIn,Br.allowIn=!0,r=Rt(),Br.allowIn=t,Z(":"),n=Rt(),e=new B(o).finishConditionalExpression(e,r,n)),e)}function xt(){return rt("{")?rr():Rt()}function kt(e){var t,r,n,o,s,a,i,l,c;for(o=[],s=[],a=0,l=null,i={paramSet:{}},t=0,r=e.length;r>t;t+=1)if(n=e[t],n.type===xr.Identifier)o.push(n),s.push(null),nr(i,n,n.name);else{if(n.type!==xr.AssignmentExpression)return null;o.push(n.left),s.push(n.right),++a,nr(i,n.left,n.left.name)}return i.message===Rr.StrictParamDupe&&(c=zr?i.stricted:i.firstRestricted,K(c,i.message)),0===a&&(s=[]),{params:o,defaults:s,rest:l,stricted:i.stricted,firstRestricted:i.firstRestricted,message:i.message}}function Et(e,t){var r,n;return Z("=>"),r=zr,n=xt(),zr&&e.firstRestricted&&K(e.firstRestricted,e.message),zr&&e.stricted&&Q(e.stricted,e.message),zr=r,t.finishArrowFunctionExpression(e.params,e.defaults,n,n.type!==xr.BlockStatement)}function Rt(){var e,t,r,n,o,s;return e=Br.parenthesisCount,s=Jr,t=Jr,r=Ot(),r!==kr.ArrowParameterPlaceHolder&&!rt("=>")||Br.parenthesisCount!==e&&Br.parenthesisCount!==e+1||(r.type===xr.Identifier?o=kt([r]):r.type===xr.AssignmentExpression?o=kt([r]):r.type===xr.SequenceExpression?o=kt(r.expressions):r===kr.ArrowParameterPlaceHolder&&(o=kt([])),!o)?(ot()&&(at(r)||X(Rr.InvalidLHSInAssignment),zr&&r.type===xr.Identifier&&d(r.name)&&Q(t,Rr.StrictLHSAssignment),t=U(),n=Rt(),r=new B(s).finishAssignmentExpression(t.value,r,n)),r):Et(o,new B(s))}function Mt(){var e,t,r=Jr;if(e=Rt(),rt(",")){for(t=[e];Gr>qr&&rt(",");)U(),t.push(Rt());e=new B(r).finishSequenceExpression(t)}return e}function Dt(){for(var e,t=[],r=Ar;Gr>qr&&!rt("}")&&(e=lr(),"undefined"!=typeof e&&r!==Ar);)t.push(e),r=Ar;return t}function zt(){var e,t=new J;return Z("{"),e=Dt(),fr("}"),t.finishBlockStatement(e)}function At(){var e,t=new J;return e=U(),e.type!==jr.Identifier&&(zr&&e.type===jr.Keyword&&p(e.value)?Q(e,Rr.StrictReservedWord):K(e)),t.finishIdentifier(e.value)}function Ct(e){var t,r=null,n=new J;return t=At(),zr&&d(t.name)&&X(Rr.StrictVarName),"const"===e?(Z("="),r=Rt()):rt("=")&&(U(),r=Rt()),n.finishVariableDeclarator(t,r)}function Pt(e){var t=[];do{if(t.push(Ct(e)),!rt(","))break;U()}while(Gr>qr);return t}function It(e){var t;return tt("var"),t=Pt(),st(),e.finishVariableDeclaration(t,"var")}function Nt(e){var t,r=new J;return tt(e),t=Pt(e),st(),r.finishVariableDeclaration(t,e)}function Ut(){var e=new J;return Z(";"),e.finishEmptyStatement()}function Lt(e){var t=Mt();return st(),t||(t=_r(e)),e.finishExpressionStatement(t)}function qt(e){var t,r,n;return tt("if"),Z("("),t=Mt(),fr(")","{"),r=tr(),nt("else")?(U(),n=tr()):n=null,e.finishIfStatement(t,r,n)}function Ft(e){var t,r,n;return tt("do"),n=Br.inIteration,Br.inIteration=!0,t=tr(),Br.inIteration=n,tt("while"),Z("("),r=Mt(),fr(")","{"),rt(";")&&U(),e.finishDoWhileStatement(t,r)}function Wt(e){var t,r,n;return tt("while"),Z("("),t=Mt(),fr(")","{"),n=Br.inIteration,Br.inIteration=!0,r=tr(),Br.inIteration=n,e.finishWhileStatement(t,r)}function Ht(){var e,t,r=new J;return e=U(),t=Pt(),r.finishVariableDeclaration(t,e.value)}function Gt(e){var t,r,n,o,s,a,i,l=Br.allowIn;return t=r=n=null,tt("for"),Z("("),rt(";")?U():(nt("var")||nt("let")?(Br.allowIn=!1,t=Ht(),Br.allowIn=l,1===t.declarations.length&&nt("in")&&(U(),o=t,s=Mt(),t=null)):(Br.allowIn=!1,t=Mt(),Br.allowIn=l,nt("in")&&(at(t)||X(Rr.InvalidLHSInForIn),U(),o=t,s=Mt(),t=null)),"undefined"==typeof o&&Z(";")),"undefined"==typeof o&&(rt(";")||(r=Mt()),Z(";"),rt(")")||(n=Mt())),fr(")","{"),i=Br.inIteration,Br.inIteration=!0,a=tr(),Br.inIteration=i,"undefined"==typeof o?e.finishForStatement(t,r,n,a):e.finishForInStatement(o,s,a)}function Jt(e){var t,r=null;if(tt("continue"),59===Dr.charCodeAt(qr))return U(),Br.inIteration||V(Rr.IllegalContinue),e.finishContinueStatement(null);if(Ir)return Br.inIteration||V(Rr.IllegalContinue),e.finishContinueStatement(null);if(Jr.type===jr.Identifier){var n=Jr;r=At(),t="$"+r.name,Object.prototype.hasOwnProperty.call(Br.labelSet,t)||Q(n,Rr.UnknownLabel,r.name)}return st(),null!==r||Br.inIteration||V(Rr.IllegalContinue),e.finishContinueStatement(r)}function Bt(e){var t,r=null;return tt("break"),59===Dr.charCodeAt(Nr)?(U(),Br.inIteration||Br.inSwitch||V(Rr.IllegalBreak),e.finishBreakStatement(null)):Ir?(Br.inIteration||Br.inSwitch||V(Rr.IllegalBreak),e.finishBreakStatement(null)):(Jr.type===jr.Identifier&&(r=At(),t="$"+r.name,Object.prototype.hasOwnProperty.call(Br.labelSet,t)||V(Rr.UnknownLabel,r.name)),st(),null!==r||Br.inIteration||Br.inSwitch||V(Rr.IllegalBreak),e.finishBreakStatement(r))}function $t(e){var t=null,r=Jr;return tt("return"),Br.inFunctionBody||Q(r,Rr.IllegalReturn,r.value),32===Dr.charCodeAt(Nr)&&i(Dr.charCodeAt(Nr+1))?(t=Mt(),st(),e.finishReturnStatement(t)):Ir?e.finishReturnStatement(null):(rt(";")||rt("}")||Jr.type===jr.EOF||(t=Mt()),st(),e.finishReturnStatement(t))}function Vt(e){var t,r;return zr&&X(Rr.StrictModeWith),tt("with"),Z("("),t=Mt(),fr(")","{"),r=tr(),e.finishWithStatement(t,r)}function Xt(){var e,t,r=[],n=new J;nt("default")?(U(),e=null):(tt("case"),e=Mt()),rt(":")&&U();for(var o=Ar;Gr>qr&&!(rt("}")||nt("default")||nt("case"))&&(t=tr(),"undefined"!=typeof t&&null!==t)&&(r.push(t),o!==Ar);)o=Ar;return n.finishSwitchCase(e,r)}function Yt(e){var t,r,n,o,s;if(tt("switch"),Z("("),t=Mt(),Z(")"),Z("{"),r=[],rt("}"))return U(),e.finishSwitchStatement(t,r);for(o=Br.inSwitch,Br.inSwitch=!0,s=!1;Gr>qr&&!rt("}");)n=Xt(),null===n.test&&(s&&V(Rr.MultipleDefaultsInSwitch),s=!0),r.push(n);return Br.inSwitch=o,Z("}"),e.finishSwitchStatement(t,r)}function Kt(e){var t;return tt("throw"),Ir&&V(Rr.NewlineAfterThrow),t=Mt(),st(),e.finishThrowStatement(t)}function Qt(){var e,t,r=new J;return tt("catch"),Z("("),rt(")")&&K(Jr),e=At(),zr&&d(e.name)&&X(Rr.StrictCatchVariable),Z(")"),t=zt(),r.finishCatchClause(e,t)}function Zt(e){var t,r=[],n=null;return tt("try"),t=zt(),nt("catch")&&r.push(Qt()),nt("finally")&&(U(),n=zt()),0!==r.length||n||V(Rr.NoCatchOrFinally),e.finishTryStatement(t,[],r,n)}function er(e){return tt("debugger"),st(),e.finishDebuggerStatement()}function tr(){var e,t,r,n,o=Jr.type;if(o===jr.EOF&&K(Jr),o===jr.Punctuator&&"{"===Jr.value)return zt();if(n=new J,o===jr.Punctuator)switch(Jr.value){case";":return Ut(n);case"(":return Lt(n)}else if(o===jr.Keyword)switch(Jr.value){case"break":return Bt(n);case"continue":return Jt(n);case"debugger":return er(n);case"do":return Ft(n);case"for":return Gt(n);case"function":return ar(n);case"if":return qt(n);case"return":return $t(n);case"switch":return Yt(n);case"throw":return Kt(n);case"try":return Zt(n);case"var":return It(n);case"while":return Wt(n);case"with":return Vt(n)}return e=Mt(),e&&e.type===xr.Identifier&&rt(":")?(U(),r="$"+e.name,Object.prototype.hasOwnProperty.call(Br.labelSet,r)&&V(Rr.Redeclaration,"Label",e.name),Br.labelSet[r]=!0,t=tr(),delete Br.labelSet[r],n.finishLabeledStatement(e,t)):(st(),e||(e=_r(n)),n.finishExpressionStatement(e))}function rr(){var e,t,r,n,o,s,a,i,l,c=[],p=new J;for(Z("{");Gr>qr&&Jr.type===jr.StringLiteral&&(t=Jr,e=lr(),c.push(e),e.expression.type===xr.Literal);)r=Dr.slice(t.start+1,t.end-1),"use strict"===r?(zr=!0,n&&Q(n,Rr.StrictOctalLiteral)):!n&&t.octal&&(n=t);o=Br.labelSet,s=Br.inIteration,a=Br.inSwitch,i=Br.inFunctionBody,l=Br.parenthesizedCount,Br.labelSet={},Br.inIteration=!1,Br.inSwitch=!1,Br.inFunctionBody=!0,Br.parenthesizedCount=0;for(var d=Ar;Gr>Ar&&!rt("}")&&(e=lr(),"undefined"!=typeof e&&null!=e)&&(c.push(e),d!==Ar);)d=Ar;return fr("}"),Br.labelSet=o,Br.inIteration=s,Br.inSwitch=a,Br.inFunctionBody=i,Br.parenthesizedCount=l,p.finishBlockStatement(c)}function nr(e,t,r){var n="$"+r;zr?(d(r)&&(e.stricted=t,e.message=Rr.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=Rr.StrictParamDupe)):e.firstRestricted||(d(r)?(e.firstRestricted=t,e.message=Rr.StrictParamName):p(r)?(e.firstRestricted=t,e.message=Rr.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.firstRestricted=t,e.message=Rr.StrictParamDupe)),e.paramSet[n]=!0}function or(e){var t,r,n;return t=Jr,r=At(),nr(e,t,t.value),rt("=")&&(U(),n=Rt(),++e.defaultCount),e.params.push(r),e.defaults.push(n),!rt(")")}function sr(e){var t;if(t={params:[],defaultCount:0,defaults:[],firstRestricted:e},Z("("),!rt(")"))for(t.paramSet={};Gr>qr&&or(t);)Z(",");return Z(")"),0===t.defaultCount&&(t.defaults=[]),{params:t.params,defaults:t.defaults,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}}function ar(){var e,t,r,n,o,s,a,i,l=[],c=[],u=new J;return tt("function"),r=Jr,e=At(),zr?d(r.value)&&Q(r,Rr.StrictFunctionName):d(r.value)?(s=r,a=Rr.StrictFunctionName):p(r.value)&&(s=r,a=Rr.StrictReservedWord),o=sr(s),l=o.params,c=o.defaults,n=o.stricted,s=o.firstRestricted,o.message&&(a=o.message),i=zr,t=rr(),zr&&s&&K(s,a),zr&&n&&Q(n,a),zr=i,u.finishFunctionDeclaration(e,l,c,t)}function ir(){var e,t,r,n,o,s,a,i=null,l=[],c=[],u=new J;return tt("function"),rt("(")||(e=Jr,i=At(),zr?d(e.value)&&Q(e,Rr.StrictFunctionName):d(e.value)?(r=e,n=Rr.StrictFunctionName):p(e.value)&&(r=e,n=Rr.StrictReservedWord)),o=sr(r),l=o.params,c=o.defaults,t=o.stricted,r=o.firstRestricted,o.message&&(n=o.message),a=zr,s=rr(),zr&&r&&K(r,n),zr&&t&&Q(t,n),zr=a,u.finishFunctionExpression(i,l,c,s)}function lr(){if(Jr.type===jr.Keyword)switch(Jr.value){case"const":case"let":return Nt(Jr.value);case"function":return ar();default:return tr()}return Jr.type!==jr.EOF?tr():void 0}function cr(){for(var e,t,r,n,o=[];Gr>qr&&(t=Jr,t.type===jr.StringLiteral)&&(e=lr(),o.push(e),e.expression.type===xr.Literal);)r=Dr.slice(t.start+1,t.end-1),"use strict"===r?(zr=!0,n&&Q(n,Rr.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(var s=Ar;Gr>qr&&(e=lr(),"undefined"!=typeof e&&null!==e)&&(o.push(e),s!==Ar);)s=Ar;return o}function pr(){var e,t;return L(),t=new J,zr=!1,e=cr(),t.finishProgram(e)}function dr(){var e,t,r,n=[];for(e=0;e<$r.tokens.length;++e)t=$r.tokens[e],r={type:t.type,value:t.value},t.regex&&(r.regex={pattern:t.regex.pattern,flags:t.regex.flags}),$r.range&&(r.range=t.range),$r.loc&&(r.loc=t.loc),n.push(r);$r.tokens=n}function ur(e,t){var r,n;r=String,"string"==typeof e||e instanceof String||(e=r(e)),Dr=e,Ar=0,Cr=Dr.length>0?1:0,Pr=0,qr=Ar,Fr=Cr,Wr=Pr,Gr=Dr.length,Jr=null,Br={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},$r={},t=t||{},t.tokens=!0,$r.tokens=[],$r.tokenize=!0,$r.openParenToken=-1,$r.openCurlyToken=-1,$r.range="boolean"==typeof t.range&&t.range,$r.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&($r.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&($r.errors=[]);try{if(L(),Jr.type===jr.EOF)return $r.tokens;for(U();Jr.type!==jr.EOF;)try{U()}catch(o){if($r.errors){$r.errors.push(o);break}throw o}dr(),n=$r.tokens,"undefined"!=typeof $r.comments&&(n.comments=$r.comments),"undefined"!=typeof $r.errors&&(n.errors=$r.errors)}catch(s){throw s}finally{$r={}}return n}function hr(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),Dr=e,Ar=0,Cr=Dr.length>0?1:0,Pr=0,qr=Ar,Fr=Cr,Wr=Pr,Gr=Dr.length,Jr=null,Br={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},$r={},"undefined"!=typeof t&&("boolean"==typeof t.deps&&t.deps&&($r.deps=[]),$r.range="boolean"==typeof t.range&&t.range,$r.loc="boolean"==typeof t.loc&&t.loc,$r.attachComment="boolean"==typeof t.attachComment&&t.attachComment,$r.loc&&null!==t.source&&void 0!==t.source&&($r.source=n(t.source)),"boolean"==typeof t.tokens&&t.tokens&&($r.tokens=[]),"boolean"==typeof t.comment&&t.comment&&($r.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&($r.errors=[],$r.parseStatement=tr,$r.parseExpression=Mt,tr=br(tr),Mt=gr(Mt)),$r.attachComment&&($r.range=!0,$r.comments=[],$r.bottomRightStack=[],$r.trailingComments=[],$r.leadingComments=[]),$r.directSourceFile=t.directSourceFile);try{r=pr(),"undefined"!=typeof $r.comments&&(r.comments=$r.comments),"undefined"!=typeof $r.tokens&&(dr(),r.tokens=$r.tokens),"undefined"!=typeof $r.errors&&(r.errors=$r.errors),"undefined"!=typeof $r.deps&&(r.dependencies=$r.deps)
+}catch(o){throw o}finally{"undefined"!=typeof $r.errors&&(tr=$r.parseStatement,Mt=$r.parseExpression),$r={}}return r}function fr(e,t){try{Z(e)}catch(r){if(!$r.errors)throw r;mr(r),t&&Dr[r.index]===t&&(Ar=r.index,L())}}function mr(e){for(var t=$r.errors.length,r=0;t>r;r++){var n=$r.errors[r];if(n.index===e.index&&n.message===e.message)return}$r.errors.push(e)}function gr(e){return function(){try{return e.apply(null,arguments)}catch(t){mr(t)}}}function br(e){return function(){$r.statementStart=Ar;try{return e.apply(null,arguments)}catch(t){mr(t)}}}function yr(e){for(var t=e;t>-1&&";"!==Dr[t]&&"\n"!==Dr[t];)t--;if(!(t<=$r.statementStart)){var r=!1;$r.lastRewindLocation?r=!0:$r.lastRewindLocation!==t&&(r=!0),r&&(Ar=t,vr(e),L(),$r.lastRewindLocation=Ar)}}function vr(e,t){for(var r=$r.tokens.length-1;r>-1;){var n=$r.tokens[r];if(n.range[0]",Tr[jr.Identifier]="Identifier",Tr[jr.Keyword]="Keyword",Tr[jr.NullLiteral]="Null",Tr[jr.NumericLiteral]="Numeric",Tr[jr.Punctuator]="Punctuator",Tr[jr.StringLiteral]="String",Tr[jr.RegularExpression]="RegularExpression",Or=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],xr={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},kr={ArrowParameterPlaceHolder:{type:"ArrowParameterPlaceHolder"}},Er={Data:1,Get:2,Set:4},Rr={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",MissingToken:"Missing expected '%0'"},Mr={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},B.prototype=J.prototype={processComment:function(){var e,t,r,n,o,s=$r.bottomRightStack,a=s[s.length-1];if(!(this.type===xr.Program&&this.body.length>0)){if($r.trailingComments.length>0){for(r=[],n=$r.trailingComments.length-1;n>=0;--n)o=$r.trailingComments[n],o.range[0]>=this.range[1]&&(r.unshift(o),$r.trailingComments.splice(n,1));$r.trailingComments=[]}else a&&a.trailingComments&&a.trailingComments[0].range[0]>=this.range[1]&&(r=a.trailingComments,delete a.trailingComments);if(a)for(;a&&a.range[0]>=this.range[0];)e=a,a=s.pop();if(e)e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=e.leadingComments,e.leadingComments=void 0);else if($r.leadingComments.length>0)for(t=[],n=$r.leadingComments.length-1;n>=0;--n)o=$r.leadingComments[n],o.range[1]<=this.range[0]&&(t.unshift(o),$r.leadingComments.splice(n,1));t&&t.length>0&&(this.leadingComments=t),r&&r.length>0&&(this.trailingComments=r),s.push(this)}},finish:function(){$r.loc&&(this.loc.end={line:Ur,column:Nr-Lr},$r.source&&(this.loc.source=$r.source)),$r.range&&(this.range[1]=Nr,this.start=this.range[0],this.end=Nr),$r.attachComment&&this.processComment()},finishArrayExpression:function(e){return this.type=xr.ArrayExpression,this.elements=e,this.finish(),this},finishArrowFunctionExpression:function(e,t,r,n){return this.type=xr.ArrowFunctionExpression,this.id=null,this.params=e,this.defaults=t,this.body=r,this.rest=null,this.generator=!1,this.expression=n,this.finish(),this},finishAssignmentExpression:function(e,t,r){return this.type=xr.AssignmentExpression,this.operator=e,this.left=t,this.right=r,this.finish(),this},finishBinaryExpression:function(e,t,r){return this.type="||"===e||"&&"===e?xr.LogicalExpression:xr.BinaryExpression,this.operator=e,this.left=t,this.right=r,this.finish(),this},finishBlockStatement:function(e){return this.type=xr.BlockStatement,this.body=e,this.finish(),this},finishBreakStatement:function(e){return this.type=xr.BreakStatement,this.label=e,this.finish(),this},finishCallExpression:function(e,t){return this.type=xr.CallExpression,this.callee=e,this.arguments=t,F(e,t),this.finish(),this},finishCatchClause:function(e,t){return this.type=xr.CatchClause,this.param=e,this.body=t,this.finish(),this},finishConditionalExpression:function(e,t,r){return this.type=xr.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r,this.finish(),this},finishContinueStatement:function(e){return this.type=xr.ContinueStatement,this.label=e,this.finish(),this},finishDebuggerStatement:function(){return this.type=xr.DebuggerStatement,this.finish(),this},finishDoWhileStatement:function(e,t){return this.type=xr.DoWhileStatement,this.body=e,this.test=t,this.finish(),this},finishEmptyStatement:function(){return this.type=xr.EmptyStatement,this.finish(),this},finishExpressionStatement:function(e){return this.type=xr.ExpressionStatement,this.expression=e,this.finish(),this},finishForStatement:function(e,t,r,n){return this.type=xr.ForStatement,this.init=e,this.test=t,this.update=r,this.body=n,this.finish(),this},finishForInStatement:function(e,t,r){return this.type=xr.ForInStatement,this.left=e,this.right=t,this.body=r?r:_r(this,"Statement"),this.each=!1,this.finish(),this},finishFunctionDeclaration:function(e,t,r,n){return this.type=xr.FunctionDeclaration,this.id=e,this.params=t,this.defaults=r,this.body=n,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishFunctionExpression:function(e,t,r,n){return this.type=xr.FunctionExpression,this.id=e,this.params=t,this.defaults=r,this.body=n,this.rest=null,this.generator=!1,this.expression=!1,this.finish(),this},finishIdentifier:function(e){return this.type=xr.Identifier,this.name=e,this.finish(),this},finishIfStatement:function(e,t,r){return this.type=xr.IfStatement,this.test=e,this.consequent=t?t:_r(this,"Statement"),this.alternate=r,this.finish(),this},finishLabeledStatement:function(e,t){return this.type=xr.LabeledStatement,this.label=e,this.body=t,this.finish(),this},finishLiteral:function(e){return this.type=xr.Literal,this.value=e.value,this.raw=Dr.slice(e.start,e.end),e.regex&&(this.regex=e.regex),this.finish(),this},finishMemberExpression:function(e,t,r){return this.type=xr.MemberExpression,this.computed="["===e,this.object=t,this.property=r,this.finish(),this},finishNewExpression:function(e,t){return this.type=xr.NewExpression,this.callee=e,this.arguments=t,F(e,t),this.finish(),this},finishObjectExpression:function(e){return this.type=xr.ObjectExpression,this.properties=e,this.finish(),this},finishPostfixExpression:function(e,t){return this.type=xr.UpdateExpression,this.operator=e,this.argument=t,this.prefix=!1,this.finish(),this},finishProgram:function(e){return this.type=xr.Program,this.body=e,this.finish(),this},finishProperty:function(e,t,r,n,o){return this.type=xr.Property,this.key=t,this.value=r,this.kind=e,this.method=n,this.shorthand=o,this.finish(),this},finishReturnStatement:function(e){return this.type=xr.ReturnStatement,this.argument=e,this.finish(),this},finishSequenceExpression:function(e){return this.type=xr.SequenceExpression,this.expressions=e,this.finish(),this},finishSwitchCase:function(e,t){return this.type=xr.SwitchCase,this.test=e,this.consequent=t,this.finish(),this},finishSwitchStatement:function(e,t){return this.type=xr.SwitchStatement,this.discriminant=e,this.cases=t,this.finish(),this},finishThisExpression:function(){return this.type=xr.ThisExpression,this.finish(),this},finishThrowStatement:function(e){return this.type=xr.ThrowStatement,this.argument=e,this.finish(),this},finishTryStatement:function(e,t,r,n){return this.type=xr.TryStatement,this.block=e,this.guardedHandlers=t,this.handlers=r,this.finalizer=n,this.finish(),this},finishUnaryExpression:function(e,t){return this.type="++"===e||"--"===e?xr.UpdateExpression:xr.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0,this.finish(),this},finishVariableDeclaration:function(e,t){return this.type=xr.VariableDeclaration,this.declarations=e,this.kind=t,this.finish(),this},finishVariableDeclarator:function(e,t){return this.type=xr.VariableDeclarator,this.id=e,this.init=t,this.finish(),this},finishWhileStatement:function(e,t){return this.type=xr.WhileStatement,this.test=e,this.body=t?t:_r(this,"Statement"),this.finish(),this},finishWithStatement:function(e,t){return this.type=xr.WithStatement,this.object=e,this.body=t?t:_r(this,"Statement"),this.finish(),this}},e.version="2.0.0",e.tokenize=ur,e.parse=hr,e.isIdentifierPart=l,e.isIdentifierStart=i,e.isIdentifierChar=l,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in xr)xr.hasOwnProperty(e)&&(t[e]=xr[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("acorn/util/walk",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,(t.acorn||(t.acorn={})).walk=e()}}(function(){return function e(t,r,n){function o(a,i){if(!r[a]){if(!t[a]){var l="function"==typeof require&&require;if(!i&&l)return l(a,!0);if(s)return s(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){var r=t[a][1][e];return o(r?r:e)},p,p.exports,e,t,r,n)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a=n)&&s[i](e,r,c),o(i,e)&&(null==t||e.start==t)&&(null==n||e.end==n))throw new m(e,r)}(e,a)}catch(l){if(l instanceof m)return l;throw l}}function c(e,t,n,o,s){n=i(n),o||(o=r.base);try{!function l(e,r,s){var a=s||e.type;if(!(e.start>t||e.end=t&&n(a,e))throw new m(e,r);o[a](e,r,l)}}(e,s)}catch(a){if(a instanceof m)return a;throw a}}function d(e,t,n,o,s){n=i(n),o||(o=r.base);var a=void 0;return function l(e,r,s){if(!(e.start>t)){var i=s||e.type;e.end<=t&&(!a||a.node.end ")){var g=this.pos;u=this.parseType(!0),u.call&&(n?(h=u,u=t.ANull,f=g):i=!0)}else u=t.ANull;return i?s(o,u):(n&&(m=this.base)?t.Fn.call(this.base,r,t.ANull,o,a,u):m=new t.Fn(r,t.ANull,o,a,u),h&&(m.computeRet=h),null!=f&&(m.computeRetSource=this.spec.slice(f,this.pos)),m)},parseType:function(e,r,n){var o=this.parseTypeMaybeProp(e,r,n);if(!this.eat("|"))return o;for(var s=[o],i=o.call;;){var l=this.parseTypeMaybeProp(e,r,n);if(s.push(l),l.call&&(i=!0),!this.eat("|"))break}if(i)return a(s);for(var c=new t.AVal,p=0;p$!]/)||this.error();return e.apply?function(r,n){return o(e(r,n),t)}:o(e,t)},parseTypeInner:function(e,r,n){if(this.eat("fn("))return this.parseFnType(e,r,n);if(this.eat("[")){var o=this.parseType(e);return this.eat("]")||this.error(),o.call?i(o):n&&this.base?(t.Arr.call(this.base,o),this.base):new t.Arr(o)}if(this.eat("+")){var s=this.word(/[\w$<>\.!]/),a=w(s+".prototype");return a instanceof t.Obj||(a=w(s)),a instanceof t.Obj?e&&this.eat("[")?this.parsePoly(a):n&&this.forceNew?new t.Obj(a):t.getInstance(a):a}if(e&&this.eat("!")){var l=this.word(/\d/);if(l)return l=Number(l),function(e,r){return r[l]||t.ANull};if(this.eat("this"))return function(e){return e};if(this.eat("custom:")){var c=this.word(/[\w$]/);return _[c]||function(){return t.ANull}}return this.fromWord("!"+this.word(/[\w$<>\.!]/))}return this.eat("?")?t.ANull:this.fromWord(this.word(/[\w$<>\.!`]/))},fromWord:function(e){var r=t.cx();switch(e){case"number":return r.num;case"string":return r.str;case"bool":return r.bool;case"":return r.topScope}return r.localDefs&&e in r.localDefs?r.localDefs[e]:w(e)},parsePoly:function(e){var r,n="";(r=this.spec.slice(this.pos).match(/^\s*(\w+)\s*=\s*/))&&(n=r[1],this.pos+=r[0].length);var o=this.parseType(!0);if(this.eat("]")||this.error(),o.call)return function(r,s){var a=t.getInstance(e);return o(r,s).propagate(a.defProp(n)),a};var s=t.getInstance(e);return o.propagate(s.defProp(n)),s}};var y,v=e.parseEffect=function(e,r){var o;if(0==e.indexOf("propagate ")){var s=new b(e,10),a=s.parseType(!0);s.eat(" ")||s.error();var i=s.parseType(!0);c(r,function(e,t){n(a,e,t).propagate(n(i,e,t))})}else if(0==e.indexOf("call ")){var l=5==e.indexOf("and return ",5),s=new b(e,l?16:5),p=s.parseType(!0),d=null,u=[];for(s.eat(" this=")&&(d=s.parseType(!0));s.eat(" ");)u.push(s.parseType(!0));c(r,function(e,r){for(var o=n(p,e,r),s=d?n(d,e,r):t.ANull,a=[],i=0;i"!=e&&s.propagate(new t.PropHasSubset(e,r))})})}},w=e.parsePath=function(e,r){var n=t.cx(),o=n.paths[e],s=e;if(null!=o)return o;n.paths[e]=t.ANull;var a=r||y||n.topScope;if(n.localDefs)for(var i in n.localDefs)if(0==e.indexOf(i)){if(e==i)return n.paths[e]=n.localDefs[e];if("."==e.charAt(i.length)){a=n.localDefs[i],e=e.slice(i.length+1);break}}for(var l=e.split("."),c=0;c=3&&"Literal"==n[1].type&&"string"==typeof n[1].value){var o=r[0],s=new t.AVal;o.propagate(new t.PropHasSubset(n[1].value,s,n[1])),r[2].propagate(new j(s))}return t.ANull});var T=t.constraint("self, args, target",{addType:function(e){if(e instanceof t.Fn){this.target.addType(new t.Fn(e.name,e.self,e.args.slice(this.args.length),e.argNames.slice(this.args.length),e.retval)),this.self.propagate(e.self);for(var r=0;r"),s=0;s=5)return t;if(!e||e==t)return e;if(!t)return e;if(e.constructor!=t.constructor)return!1;if(e.constructor!=lt){if(e.constructor==at){var n=0,o=0,s=0;for(var l in e.props)n++,l in t.props&&a(e.props[l],t.props[l],r+1)&&s++;for(var l in t.props)o++;return n&&o&&so?e:t}return e.constructor==it&&e.args.length==t.args.length&&e.args.every(function(e,n){return a(e,t.args[n],r+1)})&&a(e.retval,t.retval,r+1)&&a(e.self,t.self,r+1)?e:!1}var c=e.getProp("").getType(!1);if(!c)return t;var p=t.getProp("").getType(!1);return!p||i(c,p,r+1)?t:void 0}function l(e){for(var t=0,r=0,n=0,o=null,s=0;s1)return null;if(o)return o;for(var l=0,c=null,s=0;s").isEmpty()?1:2;else if(r){p=1;for(var d=0;d=l&&(l=p,c=a)}return c}function c(){}function p(e,t){ct.disabledComputing={fn:e,prev:ct.disabledComputing};try{return t()}finally{ct.disabledComputing=ct.disabledComputing.prev}}function d(e,t){var r=ct.props[e]||(ct.props[e]=[]);r.push(t)}function u(e){return ct.props[e]}function h(t){if(ct.workList)return t(ct.workList);var r=[],n=0,o=ct.workList=function(e,t,o){n=pt)throw new e.TimedOut;n=r[a+3]+1,r[a+1].addType(r[a],r[a+2])}return s}finally{ct.workList=null}}function f(e,t){e.fnType&&(e.fnType.instantiateScore=(e.fnType.instantiateScore||0)+t)}function m(e,t){try{return r.simple(e,{Expression:function(){if(--t<=0)throw ft}}),!0}catch(n){if(n==ft)return!1;throw n}}function g(e,t){var r=t.fnType.instantiateScore;return!ct.disabledComputing&&r&&t.fnType.args.length&&m(e,5*r)?(f(t.prev,r/2),b(e,t),!0):void(t.fnType.instantiateScore=null)}function b(e,t){for(var n=t.fnType,o=0;o3)&&e.forward)for(var s=0;s"));for(var i=t(r.self,"!this",0),l=0;!i&&l"):n.name}function _(e){switch(e){case"+":case"-":case"~":return ct.num;case"!":return ct.bool;case"typeof":return ct.str;case"void":case"delete":return C}}function S(e){switch(e){case"==":case"!=":case"===":case"!==":case"<":case">":case">=":case"<=":case"in":case"instanceof":return!0}}function j(e){if(e.regex)return K(ct.protos.RegExp);switch(typeof e.value){case"boolean":return ct.bool;case"number":return ct.num;case"string":return ct.str;case"object":case"function":return e.value?K(ct.protos.RegExp):C}}function T(e){return function(t,r,n,o,s){var a=e(t,r,n,s);return o&&a.propagate(o),a}}function O(e){return function(t,r,n,o,s){return o||(o=new W),e(t,r,n,o,s),o}}function x(e,t,r,n,o){var s=gt[e.type];return s?s(e,t,r,n,o):void 0}function k(e,t){var r=e&&e[t],n=Array.prototype.slice.call(arguments,2);if(r)for(var o=0;o-1}:function(n,o){return o&&o.start>=t&&o.end<=r&&e.indexOf(n.origin)>-1}:null==r?function(t){return t.origin==e}:function(n,o){return o&&o.start>=t&&o.end<=r&&n.origin==e}}function D(e){jt=!0;var t=u(e);if(t)for(var r=0;rt||this.types.indexOf(e)>-1)return;this.signal("addType",e),this.types.push(e);var r=this.forward;r&&h(function(n){for(var o=0;o2)){t&&t!=P&&(e=new nt(e,t)),(this.forward||(this.forward=[])).push(e);var r=this.types;r.length&&h(function(n){for(var o=0;o-1},isEmpty:function(){return 0===this.types.length},getFunctionType:function(){for(var e=this.types.length-1;e>=0;--e)if(this.types[e]instanceof it)return this.types[e]},getObjType:function(){for(var e=null,t=this.types.length-1;t>=0;--t){var r=this.types[t];if(r instanceof at){if(r.name)return r;e||(e=r)}}return e},getType:function(e){return 0===this.types.length&&e!==!1?this.makeupType():1===this.types.length?this.types[0]:l(this.types)},toString:function(e,t){if(0==this.types.length)return A(this.makeupType(),e,t);if(1==this.types.length)return A(this.types[0],e,t);var r=H(this.types);return r.length>2?"?":r.map(function(r){return A(r,e,t)}).join("|")},computedPropType:function(){if(!this.propertyOf||!this.propertyOf.hasProp(""))return null;var e=this.propertyOf.getProp("");return e==this?null:e.getType()},makeupType:function(){var e=this.computedPropType();if(e)return e;if(!this.forward)return null;for(var t=this.forward.length-1;t>=0;--t){var r=this.forward[t].typeHint();if(r&&!r.isEmpty())return jt=!0,r}for(var n=Object.create(null),o=null,t=0;t"!=s&&"✖"!=s&&s!=ct.completingProperty&&(n[s]=!0,o=s)}if(!o)return null;var a=u(o);if(a){var i=[];e:for(var t=0;t"!=this.prop&&/[^\w_]/.test(this.prop)?void 0:{target:this.target,pathExt:"."+this.prop}}}),B=e.PropHasSubset=G("prop, type, originNode",{addType:function(e,t){if(e instanceof at){var r=e.defProp(this.prop,this.originNode);r.origin=this.origin,this.type.propagate(r,t)}},propHint:function(){return this.prop}}),$=G("c",{addType:function(e){e instanceof at&&e.forAllProps(this.c)}}),V=e.IsCallee=G("self, args, argNodes, retval",{init:function(){c.prototype.init.call(this),this.disabled=ct.disabledComputing},addType:function(e,t){if(e instanceof it){for(var r=0;r8||this.target.addType(e==ct.protos.Array?new lt:K(e,this.ctor)))}}),Z=G("fn",{addType:function(e){if(e instanceof at&&!e.hasCtor){e.hasCtor=this.fn;var t=new rt(e,this.fn);t.addType(this.fn),e.forAllProps(function(e,r,n){n&&r.propagate(t)})}}}),et=G("other, target",{addType:function(e,t){e==ct.str?this.target.addType(ct.str,t):e==ct.num&&this.other.hasType(ct.num)&&this.target.addType(ct.num,t)},typeHint:function(){return this.other}}),tt=e.IfObj=G("target",{addType:function(e,t){e instanceof at&&this.target.addType(e,t)},propagatesTo:function(){return this.target}}),rt=G("obj, ctor",{addType:function(e){e instanceof it&&e.self&&e.self.isEmpty()&&e.self.addType(K(this.obj,this.ctor),F)}}),nt=G("inner, weight",{addType:function(e,t){this.inner.addType(e,Math.min(t,this.weight))},propagatesTo:function(){return this.inner.propagatesTo()},typeHint:function(){return this.inner.typeHint()},propHint:function(){return this.inner.propHint()}}),ot=e.Type=function(){};ot.prototype=s(C,{constructor:ot,propagate:function(e,t){e.addType(this,t)},hasType:function(e){return e==this},isEmpty:function(){return!1},typeHint:function(){return this},getType:function(){return this}});var st=e.Prim=function(e,t){this.name=t,this.proto=e};st.prototype=s(ot.prototype,{constructor:st,toString:function(){return this.name},getProp:function(e){return this.proto.hasProp(e)||C},gatherProperties:function(e,t){this.proto&&this.proto.gatherProperties(e,t)}});var at=e.Obj=function(e,t){if(this.props||(this.props=Object.create(null)),this.proto=e===!0?ct.protos.Object:e,e&&!t&&e.name&&!(this instanceof it)){var r=/^(.*)\.prototype$/.exec(this.proto.name);r&&(t=r[1])}this.name=t,this.maybeProps=null,this.origin=ct.curOrigin};at.prototype=s(ot.prototype,{constructor:at,toString:function(e){if(!e&&this.name)return this.name;var t=[],r=!1;for(var n in this.props)if(""!=n){if(t.length>5){r=!0;break}t.push(e?n+": "+A(this.props[n],e-1):n)}return t.sort(),r&&t.push("..."),"{"+t.join(", ")+"}"},hasProp:function(e,t){var r=this.props[e];if(t!==!1)for(var n=this.proto;n&&!r;n=n.proto)r=n.props[e];return r},defProp:function(e,t){var r=this.hasProp(e,!1);if(r)return t&&!r.originNode&&(r.originNode=t),r;if("__proto__"==e||"✖"==e)return C;var n=this.maybeProps&&this.maybeProps[e];return n?(delete this.maybeProps[e],this.maybeUnregProtoPropHandler()):(n=new W,n.propertyOf=this),this.props[e]=n,n.originNode=t,n.origin=ct.curOrigin,this.broadcastProp(e,n,!0),n},getProp:function(e){var t=this.hasProp(e,!0)||this.maybeProps&&this.maybeProps[e];if(t)return t;if("__proto__"==e||"✖"==e)return C;var r=this.ensureMaybeProps()[e]=new W;return r.propertyOf=this,r},broadcastProp:function(e,t,r){if(r&&(this.signal("addProp",e,t),this instanceof ht||d(e,this)),this.onNewProp)for(var n=0;n"!=r&&e(r,this,t);this.proto&&this.proto.gatherProperties(e,t+1)},getObjType:function(){return this}});var it=e.Fn=function(e,t,r,n,o){at.call(this,ct.protos.Function,e),this.self=t,this.args=r,this.argNames=n,this.retval=o};it.prototype=s(at.prototype,{constructor:it,toString:function(e){e&&e--;for(var t="fn(",r=0;r");e&&e.propagate(t)};lt.prototype=s(at.prototype,{constructor:lt,toString:function(e){return"["+A(this.getProp(""),e,this)+"]"}}),e.Context=function(t,r){this.parent=r,this.props=Object.create(null),this.protos=Object.create(null),this.origins=[],this.curOrigin="ecma5",this.paths=Object.create(null),this.definitions=Object.create(null),this.purgeGen=0,this.workList=null,this.disabledComputing=null,e.withContext(this,function(){if(ct.protos.Object=new at(null,"Object.prototype"),ct.topScope=new ht,ct.topScope.name="",ct.protos.Array=new at(!0,"Array.prototype"),ct.protos.Function=new at(!0,"Function.prototype"),ct.protos.RegExp=new at(!0,"RegExp.prototype"),ct.protos.String=new at(!0,"String.prototype"),ct.protos.Number=new at(!0,"Number.prototype"),ct.protos.Boolean=new at(!0,"Boolean.prototype"),ct.str=new st(ct.protos.String,"string"),ct.bool=new st(ct.protos.Boolean,"bool"),ct.num=new st(ct.protos.Number,"number"),ct.curOrigin=null,t)for(var e=0;en)return t();pt=r;try{return t()}finally{pt=n}},e.addOrigin=function(e){ct.origins.indexOf(e)<0&&ct.origins.push(e)};var dt=20,ut=1e-4,ht=e.Scope=function(e){at.call(this,e||!0),this.prev=e};ht.prototype=s(at.prototype,{constructor:ht,defVar:function(e,t){for(var r=this;;r=r.proto){var n=r.props[e];if(n)return n;if(!r.prev)return r.defProp(e,t)}}});var ft={},mt=r.make({Function:function(e,t,r){var n=e.body.scope=new ht(t);n.originNode=e;for(var o=[],s=[],a=0;an;++n)x(e.expressions[n],t,r,C);return x(e.expressions[o],t,r)}),UnaryExpression:T(function(e,t,r){return x(e.argument,t,r,C),_(e.operator)}),UpdateExpression:T(function(e,t,r){return x(e.argument,t,r,C),ct.num}),BinaryExpression:T(function(e,t,r){if("+"==e.operator){var n=x(e.left,t,r),o=x(e.right,t,r);if(n.hasType(ct.str)||o.hasType(ct.str))return ct.str;if(n.hasType(ct.num)&&o.hasType(ct.num))return ct.num;var s=new W;return n.propagate(new et(o,s)),o.propagate(new et(n,s)),s}return x(e.left,t,r,C),x(e.right,t,r,C),S(e.operator)?ct.bool:ct.num}),AssignmentExpression:T(function(e,t,r){var n,o,s;if("MemberExpression"==e.left.type?(s=w(e.left,t,r),"Identifier"==e.left.object.type&&(o=e.left.object.name+"."+s)):o=e.left.name,"="!=e.operator&&"+="!=e.operator?(x(e.right,t,r,C),n=ct.num):n=x(e.right,t,r,null,o),"MemberExpression"==e.left.type){var a=x(e.left.object,t,r);if("prototype"==s&&f(t,20),""==s){var i=e.left.property.name,l=t.props[i],c=l&&l.iteratesOver;if(c){f(t,20);var p="MemberExpression"==e.right.type&&e.right.computed&&e.right.property.name==i;return c.forAllProps(function(e,t,r){r&&"prototype"!=e&&""!=e&&a.propagate(new B(e,p?t:C))}),n}}a.propagate(new B(s,n,e.left.property))}else n.propagate(t.defVar(e.left.name,e.left));return n}),LogicalExpression:O(function(e,t,r,n){x(e.left,t,r,n),x(e.right,t,r,n)}),ConditionalExpression:O(function(e,t,r,n){x(e.test,t,r,C),x(e.consequent,t,r,n),x(e.alternate,t,r,n)}),NewExpression:O(function(e,t,r,n,o){"Identifier"==e.callee.type&&e.callee.name in t.props&&f(t,20);for(var s=0,a=[];s-1&&f(t,30),a.propagate(new X(i,s,e.arguments,n))}else{var l=x(e.callee,t,r);t.fnType&&t.fnType.args.indexOf(l)>-1&&f(t,30);var c=l.getFunctionType();c&&c.instantiateScore&&t.fnType&&f(t,c.instantiateScore/5),l.propagate(new V(ct.topScope,s,e.arguments,n))}}),MemberExpression:O(function(e,t,r,n){var o=w(e,t),s=x(e.object,t,r),a=s.getProp(o);if(""==o){var i=x(e.property,t,r);if(!i.hasType(ct.num))return a.propagate(n,U)}a.propagate(n)}),Identifier:T(function(e,t){return"arguments"!=e.name||!t.fnType||e.name in t.props||t.defProp(e.name,t.fnType.originNode).addType(new lt(t.fnType.arguments=new W)),t.getProp(e.name)}),ThisExpression:T(function(e,t){return t.fnType?t.fnType.self:ct.topScope}),Literal:T(function(e){return j(e)})},bt=r.make({Expression:function(e,t,r){x(e,t,r,C)},FunctionDeclaration:function(e,t,r){var n=e.body.scope,o=n.fnType;r(e.body,t,"ScopeBody"),g(e,n)||y(n);var s=t.getProp(e.id.name);s.addType(o)},VariableDeclaration:function(e,t,r){for(var n=0;n0&&(R(o.errors),o.errors=o.errors.map(E)),k(r,"postParse",o,e),o};e.analyze=function(t,n,o,s){"string"==typeof t&&(t=vt(t)),n||(n="file#"+ct.origins.length),e.addOrigin(ct.curOrigin=n),o||(o=ct.topScope),r.recursive(t,o,null,mt),k(s,"preInfer",t,o),r.recursive(t,o,null,bt),k(s,"postInfer",t,o),ct.curOrigin=null},e.purge=function(e,t,r){var n=M(e,t,r);++ct.purgeGen,ct.topScope.purge(n);for(var o in ct.props){for(var s=ct.props[o],a=0;a"==r?C:D(r)},Identifier:function(e,t){return t.hasProp(e.name)||C},ThisExpression:function(e,t){return t.fnType?t.fnType.self:ct.topScope},Literal:function(e){return j(e)}},_t=e.searchVisitor=r.make({Function:function(e,t,r){var n=e.body.scope;e.id&&r(e.id,n);for(var o=0;ot?!1:"Identifier"==r.type&&"✖"==r.name?!1:wt.hasOwnProperty(r.type)};return r.findNodeAround(e,n,a,_t,o||ct.topScope)},e.expressionType=function(e){return z(e.node,e.state)},e.parentNode=function(e,t){function n(t,s,a){if(t.start<=e.start&&t.end>=e.end){var i=o[o.length-1];if(t==e)throw{found:i};i!=t&&o.push(t),r.base[a||t.type](t,s,n),i!=t&&o.pop()}}var o=[];try{n(t,null)}catch(s){if(s.found)return s.found;throw s}};var St={ArrayExpression:function(e,t,r){return r(e,!0).getProp("")},ObjectExpression:function(e,t,r){for(var n=0;ny(e,r)&&(o.parent=r,o.excluded&&(o.excluded=null)));var i=new s(t,r);e.files.push(i),e.fileMap[t]=i,null!=n?a(i,n,e):e.options.async?(e.startAsyncAction(),e.options.getFile(t,function(t,r){a(i,r||"",e),e.finishAsyncAction(t)})):a(i,e.options.getFile(t)||"",e)}function p(e,t,r){var n=function(){e.off("everythingFetched",n),clearTimeout(o),d(e,t,r)};e.on("everythingFetched",n);var o=setTimeout(n,e.options.fetchTimeout)}function d(e,r,n){if(e.pending)return p(e,r,n);var o=e.fetchError;if(o)return e.fetchError=null,n(o);e.needsPurge.length>0&&t.withContext(e.cx,function(){t.purge(e.needsPurge),e.needsPurge.length=0});for(var s=!0,a=0;at?e:e.slice(0,t)}function h(e,t,r){var n=Math.max(0,r-500),o=null;if(!/^\s*$/.test(e))for(;;){var s=t.indexOf(e,n);if(0>s||s>r+500)break;(null==o||Math.abs(o-r)>Math.abs(s-r))&&(o=s),n=s+e.length}return o}function f(e){for(var t=0;e;++t,e=e.prev);return t}function m(e){var t=new Error(e);return t.name="TernError",t}function g(e,r,n){var s=n.match(/^#(\d+)$/);if(!s)return e.findFile(n);var a=r[s[1]];if(!a||"delete"==a.type)throw m("Reference to unknown file "+n);if("full"==a.type)return e.findFile(a.name);var i=a.backing=e.findFile(a.name),l=a.offset;a.offsetLines&&(l={line:a.offsetLines,ch:0}),a.offset=l=X(i,null==a.offsetLines?a.offset:{line:a.offsetLines,ch:0},!0);var c,p,d=u(a.text),g=h(d,i.text,l),b=null==g?Math.max(0,i.text.lastIndexOf("\n",l)):g;return t.withContext(e.cx,function(){t.purge(a.name,b,b+a.text.length);var r,n=a.text;if(r=n.match(/(?:"([^"]*)"|([\w$]+))\s*:\s*function\b/)){var s=o.findNodeAround(a.backing.ast,b,"ObjectExpression");s&&s.node.objType&&(c={type:s.node.objType,prop:r[2]||r[1]})}if(g&&(r=d.match(/^(.*?)\bfunction\b/))){for(var l=r[1].length,u="",h=0;l>h;++h)u+=" ";n=u+n.slice(l),p=!0}var m=t.scopeAt(i.ast,b,i.scope),y=t.scopeAt(i.ast,b+n.length,i.scope),v=a.scope=f(m)h;++h)j.args[h].propagate(T.args[h]);j.self.propagate(T.self),T.retval.propagate(j.retval)}}}),a}function b(e){var t=0;return o.simple(e,{Expression:function(){++t}}),t}function y(e,t){for(var r=0;t;)t=e.findFile(t).parent,++r;return r}function v(e,t){for(;;){var r=e.findFile(t.parent);if(!r.parent)break;t=r}return t.name}function w(e,t){var r=v(e,t),n=b(t.ast),o=e.budgets[r];return null==o&&(o=e.budgets[r]=e.options.dependencyBudget),n>o?!1:(e.budgets[r]=o-n,!0)}function _(e){return"number"==typeof e||"object"==typeof e&&"number"==typeof e.line&&"number"==typeof e.ch}function S(e){if(e.query){if("string"!=typeof e.query.type)return".query.type must be a string";if(e.query.start&&!_(e.query.start))return".query.start must be a position";if(e.query.end&&!_(e.query.end))return".query.end must be a position"}if(e.files){if(!Array.isArray(e.files))return"Files property must be an array";for(var t=0;ts;){if(++s,o=r.indexOf("\n",o)+1,0===o)return null;s%V===0&&n.push(o)}return o}function T(e,t){if(!e)return{line:0,ch:0};for(var r,n,o=e.lineOffsets||(e.lineOffsets=[0]),s=e.text,a=o.length-1;a>=0;--a)o[a]<=t&&(r=a*V,n=o[a]);for(;;){var i=s.indexOf("\n",n);if(i>=t||0>i)break;n=i+1,++r}return{line:r,ch:t-n}}function O(e){for(var t in e)null==e[t]&&delete e[t];return e}function x(e,t,r){null!=r&&(e[t]=r)}function k(e,t){"string"!=typeof e&&(e=e.name,t=t.name);var r=/^[A-Z]/.test(e),n=/^[A-Z]/.test(t);return r==n?t>e?-1:e==t?0:1:r?1:-1}function E(e,t,r){return"Literal"==e.type&&"string"==typeof e.value&&e.start==t-1&&e.end<=r+1}function R(e,t){for(var r=0;r=t)return n}}function M(e,r,o){function s(n,o,s,a){if((r.omitObjectPrototype===!1||o!=e.cx.protos.Object||u)&&!(r.filter!==!1&&u&&0!==(r.caseInsensitive?n.toLowerCase():n).indexOf(u)||d&&d.props[n])){for(var i=0;i=2&&r.guess!==!1)for(var g in e.cx.props)s(g,e.cx.props[g][0],0);f="memberCompletion"}else t.forAllLocalsAt(o.ast,l,o.scope,s),r.includeKeywords&&K.forEach(function(e){s(e,null,0,function(e){e.isKeyword=!0})}),f="variableCompletion";return e.passes[f]&&e.passes[f].forEach(function(e){e(o,l,c,h)}),r.sort!==!1&&h.sort(k),e.cx.completingProperty=null,{start:Y(r,o,l),end:Y(r,o,c),isProperty:!!g,isObjectKey:!!y,completions:h}}function D(e,t){var r=t.prefix,n=[];for(var o in e.cx.props)""==o||r&&0!==o.indexOf(r)||n.push(o);return t.sort!==!1&&n.sort(k),{completions:n}}function z(e,t,r){var n=Q(e,t,r);if(n)return n;throw m("No expression at the given position.")}function A(e){return e&&(e=e.getType())&&e instanceof t.Obj?e:null}function C(e,r,n,o){var s;if(o&&(t.resetGuessing(),s=t.expressionType(o)),e.passes.typeAt){var a=X(n,r.end);e.passes.typeAt.forEach(function(e){s=e(n,a,o,s)})}if(!s)throw m("No type found at the given position.");var i;if("ObjectExpression"==o.node.type&&null!=r.end&&(i=R(o.node,X(n,r.end)))){var l=i.key.name,c=A(t.typeFromContext(n.ast,o));if(c&&c.hasProp(l))s=c.hasProp(l);else{var p=A(s);p&&p.hasProp(l)&&(s=p.hasProp(l))}}return s}function P(e,r,n){var o,s=Q(n,r),a=C(e,r,n,s),i=a;if(a=r.preferFunction?a.getFunctionType()||a.getType():a.getType(),s&&("Identifier"==s.node.type?o=s.node.name:"MemberExpression"!=s.node.type||s.node.computed||(o=s.node.property.name)),null!=r.depth&&"number"!=typeof r.depth)throw m(".query.depth must be a number");var l={guess:t.didGuess(),type:t.toString(i,r.depth),name:a&&a.name,exprName:o};return a&&N(a,l),!l.doc&&i.doc&&(l.doc=i.doc),O(l)}function I(e,r,n){var o=Q(n,r),s=C(e,r,n,o),a={url:s.url,doc:s.doc,type:t.toString(s)},i=s.getType();return i&&N(i,a),O(a)}function N(e,r){r.url||(r.url=e.url),r.doc||(r.doc=e.doc),r.origin||(r.origin=e.origin);var n,o=t.cx().protos;!r.url&&!r.doc&&e.proto&&(n=e.proto.hasCtor)&&e.proto!=o.Object&&e.proto!=o.Function&&e.proto!=o.Array&&(r.url=n.url,r.doc=n.doc)}function U(e,r,n){var o=Q(n,r),s=C(e,r,n,o),a=Z(s),i={url:s.url,doc:s.doc,origin:s.origin};if(t.didGuess()&&(i.didGuess=!0),s.types)for(var l=s.types.length-1;l>=0;--l){var c=s.types[l];N(c,i),a||(a=Z(c))}if(a&&a.node){var p=a.node.sourceFile||e.findFile(a.origin),d=Y(r,p,a.node.start),u=Y(r,p,a.node.end);i.start=d,i.end=u,i.file=a.origin;var h=Math.max(0,a.node.start-50);i.contextOffset=a.node.start-h,i.context=p.text.slice(h,h+50)}else a&&(i.file=a.origin,et(e,r,a,i));return O(i)}function L(e,r,n,o,s){function a(e){return function(t,n){if(s)for(var o=n;o!=l;o=o.prev){var a=o.hasProp(s);if(a)throw m("Renaming `"+i+"` to `"+s+"` would make a variable at line "+(T(e,t.start).line+1)+" point to the definition at line "+(T(e,a.name.start).line+1))}p.push({file:e.name,start:Y(r,e,t.start),end:Y(r,e,t.end)})}}for(var i=o.node.name,l=o.state;l&&!(i in l.props);l=l.prev);if(!l)throw m("Could not find a definition for "+i+" "+!!e.cx.topScope.props.x);var c,p=[];if(l.originNode){if(c="local",s){for(var d=l.prev;d&&!(s in d.props);d=d.prev);d&&t.findRefs(l.originNode,l,s,d,function(e){throw m("Renaming `"+i+"` to `"+s+"` would shadow the definition used at line "+(T(n,e.start).line+1))})}t.findRefs(l.originNode,l,i,l,a(n))}else{c="global";for(var u=0;u=s)return q(e,t,n,i)}throw m("Not at a variable or property name.")}function W(e,t,r){if("string"!=typeof t.newName)throw m(".query.newName should be a string");var n=z(r,t);if(!n)throw m("Could not find an expression to rename.");if("Identifier"!==n.node.type)switch(n.node.type){case"MemberExpression":throw m("Rename is not supported on member expressions.");case"ThisExpression":throw m("Rename is not supported on this expressions.");case"ObjectExpression":throw m("Rename is not supported on object properties.");default:throw m("Rename is only supported on variables.")}var o=L(e,t,r,n,t.newName),s=o.refs;delete o.refs,o.files=e.files.map(function(e){return e.name});for(var a=o.changes=[],i=0;i40&&(n.reset(),d(n,null,function(){}))})},findFile:function(e){return this.fileMap[e]},flush:function(e){var r=this.cx;d(this,null,function(n){return n?e(n):void t.withContext(r,e)})},startAsyncAction:function(){++this.pending},finishAsyncAction:function(e){e&&(this.asyncError=e),0===--this.pending&&this.signal("everythingFetched")}});var V=25,X=e.resolvePos=function(e,t,r){if("number"!=typeof t){var n=j(e,t.line);if(null==n){if(!r)throw m("File doesn't contain a line "+t.line);t=e.text.length}else t=n+t.ch}if(t>e.text.length){if(!r)throw m("Position "+t+" is outside of file.");t=e.text.length}return t},Y=e.outputPos=function(e,t,r){if(e.lineCharPositions){var n=T(t,r);return"part"==t.type&&(n.line+=null!=t.offsetLines?t.offsetLines:T(t.backing,t.offset).line),n}return r+("part"==t.type?t.offset:0)},K="break do instanceof typeof case else new var catch finally return void continue for switch while debugger function this with default if throw delete in try".split(" "),Q=e.findQueryExpr=function(e,r,n){if(null==r.end)throw m("missing .query.end field");if(r.variable){var o=t.scopeAt(e.ast,X(e,r.end),e.scope);return{node:{type:"Identifier",name:r.variable,start:r.end,end:r.end+1},state:o}}var s=r.start&&X(e,r.start),a=X(e,r.end),i=t.findExpressionAt(e.ast,s,a,e.scope);return i?i:(i=t.findExpressionAround(e.ast,s,a,e.scope),i&&("ObjectExpression"==i.node.type||n||(null==s?a:s)-i.node.start<20||i.node.end-a<20)?i:null)},Z=e.getSpan=function(e){if(e.origin){if(e.originNode){var t=e.originNode;return/^Function/.test(t.type)&&t.id&&(t=t.id),{origin:e.origin,node:t}}return e.span?{origin:e.origin,span:e.span}:void 0}},et=e.storeSpan=function(e,t,r,n){if(n.origin=r.origin,r.span){var o=/^(\d+)\[(\d+):(\d+)\]-(\d+)\[(\d+):(\d+)\]$/.exec(r.span);n.start=t.lineCharPositions?{line:Number(o[2]),ch:Number(o[3])}:Number(o[1]),n.end=t.lineCharPositions?{line:Number(o[5]),ch:Number(o[6])}:Number(o[4])}else{var s=e.findFile(r.origin);n.start=Y(t,s,r.node.start),n.end=Y(t,s,r.node.end)}};e.version="0.10.0"}),function(e){return"object"==typeof exports&&"object"==typeof module?e(exports):"function"==typeof define&&define.amd?define("tern/lib/comment",["exports"],e):void e(tern.comment||(tern.comment={}))}(function(e){function t(e){return 14>e&&e>8||32===e||160===e}function r(e,r){for(;r>0;--r){var n=e.charCodeAt(r-1);if(10==n)break;if(!t(n))return!1}return!0}e.commentsBefore=function(e,n){var o,s=null,a=0;e:for(;n>0;){var i=e.charCodeAt(n-1);if(10==i)for(var l=--n,c=!1;l>0;--l){if(i=e.charCodeAt(l-1),47==i&&47==e.charCodeAt(l-2)){if(!r(e,l-2))break e;var p=e.slice(l,n);!a&&o?s[0]=p+"\n"+s[0]:(s||(s=[])).unshift(p),o=!0,a=0,n=l-2;break}if(10==i){if(!c&&++a>1)break e;break}c||t(i)||(c=!0)}else if(47==i&&42==e.charCodeAt(n-2)){for(var l=n-2;l>1;--l)if(42==e.charCodeAt(l-1)&&47==e.charCodeAt(l-2)){if(!r(e,l-2))break e;(s||(s=[])).unshift(e.slice(l,n-2)),o=!1,a=0;break}n=l-2}else{if(!t(i))break;--n}}return s},e.commentAfter=function(e,r){for(;ro?e.length:o)}t(n)&&++r}},e.ensureCommentsBefore=function(t,r){return r.hasOwnProperty("commentsBefore")?r.commentsBefore:r.commentsBefore=e.commentsBefore(t,r.start)}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require("../lib/comment"),require("esprima"),require("acorn/util/walk")):"function"==typeof define&&define.amd?define("tern/plugin/doc_comment",["../lib/infer","../lib/tern","../lib/comment","esprima","acorn/util/walk"],e):void e(tern,tern,tern.comment,acorn,acorn.walk)}(function(e,t,r,n,o){"use strict";function s(e,t){function n(e){r.ensureCommentsBefore(t,e)}o.simple(e,{VariableDeclaration:n,FunctionDeclaration:n,AssignmentExpression:function(e){"="==e.operator&&n(e)},ObjectExpression:function(e){for(var t=0;t=3&&"string"==typeof e.arguments[1].value}function i(t,r){y(t.sourceFile.text,r),o.simple(t,{VariableDeclaration:function(e,t){e.commentsBefore&&c(e,e.commentsBefore,t,t.getProp(e.declarations[0].id.name))},FunctionDeclaration:function(e,t){e.commentsBefore&&c(e,e.commentsBefore,t,t.getProp(e.id.name),e.body.scope.fnType)},AssignmentExpression:function(t,r){t.commentsBefore&&c(t,t.commentsBefore,r,e.expressionType({node:t.left,state:r}))},ObjectExpression:function(e,t){for(var r=0;r5&&(i=i.slice(0,l+1)),i=i.trim().replace(/\s*\n\s*\*\s*|\s{1,}/g," ")}i=i.replace(/^\s*\*+\s*/,""),o instanceof e.AVal&&(o.doc=i),s&&(s.doc=i)}function p(e,t){for(;/\s/.test(e.charAt(t));)++t;return t}function d(e){if(!n.isIdentifierStart(e.charCodeAt(0)))return!1;for(var t=1;tl)return null;var c=t.slice(r,l);if(!d(c))return null;o.push(c),r=l+1;var u=h(e,t,r);if(!u)return null;r=u.end,a=a||u.madeUp,s.push(u.type),r=p(t,r);var f=t.charAt(r);if(++r,f==n)break;if(","!=f)return null}return{labels:o,types:s,end:r,madeUp:a}}function h(t,r,n){for(var o,s=!1,a=!1;;){var i=f(t,r,n);if(!i)return null;if(a=a||i.madeUp,s?i.type.propagate(s):o=i.type,n=p(r,i.end),"|"!=r.charAt(n))break;n++,s||(s=new e.AVal,o.propagate(s),o=s)}var l=!1;return"="==r.charAt(n)&&(++n,l=!0),{type:o,end:n,isOptional:l,madeUp:a}}function f(t,r,o){o=p(r,o);var s,a=!1;if(r.indexOf("function(",o)==o){var i=u(t,r,o+9,")"),l=e.ANull;if(!i)return null;if(o=p(r,i.end),":"==r.charAt(o)){++o;var c=h(t,r,o+1);if(!c)return null;o=c.end,l=c.type,a=c.madeUp}s=new e.Fn(null,e.ANull,i.types,i.labels,l)}else if("["==r.charAt(o)){var d=h(t,r,o+1);if(!d)return null;if(o=p(r,d.end),a=d.madeUp,"]"!=r.charAt(o))return null;++o,s=new e.Arr(d.type)}else if("{"==r.charAt(o)){var f=u(t,r,o+1,"}");if(!f)return null;s=new e.Obj(!0);for(var g=0;g"!=r.charAt(o++))return null;d=w.type}s=new e.Arr(d)}else if(/^object$/i.test(v)){if(s=new e.Obj(!0),"."==r.charAt(o)&&"<"==r.charAt(o+1)){var _=h(t,r,o+2);if(!_)return null;if(o=p(r,_.end),a=a||_.madeUp,","!=r.charAt(o++))return null;var S=h(t,r,o);if(!S)return null;if(o=p(r,S.end),a=_.madeUp||S.madeUp,">"!=r.charAt(o++))return null;S.type.propagate(s.defProp(""))}}else{for(;46==r.charCodeAt(o)||n.isIdentifierChar(r.charCodeAt(o));)++o;var j,T=r.slice(y,o),O=e.cx(),x=O.parent&&O.parent.jsdocTypedefs;x&&T in x?s=x[T]:(j=e.def.parsePath(T,t).getObjType())?s=m(j,T):(O.jsdocPlaceholders||(O.jsdocPlaceholders=Object.create(null)),s=T in O.jsdocPlaceholders?O.jsdocPlaceholders[T]:O.jsdocPlaceholders[T]=new e.Obj(null,T),a=!0)}}return{type:s,end:o,madeUp:a}}function m(t,r){if(t instanceof e.Fn&&/^[A-Z]/.test(r)){var n=t.getProp("prototype").getObjType();if(n instanceof e.Obj)return e.getInstance(n)}return t}function g(e,t,r){if(r=p(t,r||0),"{"!=t.charAt(r))return null;var n=h(e,t,r+1);if(!n)return null;var o=p(t,n.end);return"}"!=t.charAt(o)?null:(n.end=o+1,n)}function b(e,t,r,n){for(var o,s,a,i,l,c,p=n.length-1;p>=0;p--)for(var d,u=n[p],f=/(?:\n|$|\*)\s*@(type|param|arg(?:ument)?|returns?|this)\s+(.*)/g;d=f.exec(u);)if("this"==d[1]&&(c=h(t,d[2],0)))l=c,i=!0;else if(c=g(t,d[2]))switch(i=!0,d[1]){case"returns":case"return":a=c;break;case"type":o=c;break;case"param":case"arg":case"argument":var m=d[2].slice(c.end).match(/^\s*(\[?)\s*([^\]\s=]+)\s*(?:=[^\]]+\s*)?(\]?).*/);if(!m)continue;var b=m[2]+(c.isOptional||"["===m[1]&&"]"===m[3]?"?":"");(s||(s=Object.create(null)))[b]=c}i&&w(o,l,s,a,e,r)}function y(t,r){for(var n,o=e.cx(),s=/\s@typedef\s+(.*)/g;n=s.exec(t);){var a=g(r,n[1]),i=a&&n[1].slice(a.end).match(/^\s*(\S+)/);i&&(o.parent.jsdocTypedefs[i[1]]=a.type)}}function v(t,r){var n=e.cx().parent._docComment.weight;t.type.propagate(r,n||(t.madeUp?_:void 0))}function w(e,t,r,n,o,s){var a;if("VariableDeclaration"==o.type){var i=o.declarations[0];i.init&&"FunctionExpression"==i.init.type&&(a=i.init.body.scope.fnType)}else"FunctionDeclaration"==o.type?a=o.body.scope.fnType:"AssignmentExpression"==o.type?"FunctionExpression"==o.right.type&&(a=o.right.body.scope.fnType):"CallExpression"==o.type||"FunctionExpression"==o.value.type&&(a=o.value.body.scope.fnType);if(a&&(r||n||t)){if(r)for(var l=0;lt.name?1:0}),n.splice(0,0,{proposal:"",description:"Templates",style:"noemphasis_title",unselectable:!0})),n},removePrefix:function(t,r){var n=r.overwrite=r.proposal.substring(0,t.length)!==t;n||(r.proposal=e(t,r.proposal))},isValid:function(){return!0}},{Template:t,TemplateContentAssist:r}}),define("tern/plugin/resolver",["orion/editor/templates"],function(e){function t(e,t){for(var n=Object.keys(p),o=0;o0){for(var o=0;o0){var t=e.parents.pop();switch(t.type){case"MemberExpression":return{kind:"member"};case"VariableDeclarator":return null;case"FunctionDelcaration":case"FunctionExpression":if(offset=t.value.range[0]&&offset-1<=t.value.range[1]?{kind:"prop"}:null;case"SwitchStatement":return{kind:"swtch"}}}return{kind:"top"}}function c(e,t){var r=l(t);if(r&&r.kind){for(var n=[],o=e.length,s=0;o>s;s++){var a=e[s];a.nodes&&a.nodes[r.kind]&&n.push(a)}return n.map(i,this)}}var p=Object.create(null);return{doPostParse:s,doPreInfer:o,getResolved:a,getTemplatesForNode:c}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionAmqp",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,r){function n(n,s,a,i){var l=t.resolvePos(n,a),c=e.findExpressionAround(n.ast,null,l,n.scope),p=r.getTemplatesForNode(o,c);if(p&&p.length>0)for(var d=0;d +Connection"}},"Exchange.!3":{type:"string"},"createExchangeErrorHandlerFor.!ret":"fn(err: ?)","Connection.prototype._bodyToBuffer.!ret":"[Connection.prototype._bodyToBuffer.!ret.]","Connection.prototype._bodyToBuffer.!ret.":{contentType:"string"},"Connection.prototype._parseURLOptions.!ret":{ssl:{enabled:"bool"}},"Connection.prototype._sendHeader.!2":{reserved1:"number",routingKey:"string",noWait:"bool"},"serializer.serializeFields.!2":{reserved1:"number",routingKey:"string",noWait:"bool"},"Queue.prototype.subscribeRaw.!0":{state:"string"},"Message.!1":{parseError:"+Error",rawData:"string"},"parseTable.!ret":{"!doc":"XXX check if bitIndex greater than 7?"},"parseFields.!1":"[?]","parseFields.!ret":{}},methods:{"":{"!doc":"debug(name);"},"!doc":"methods keyed on their name"},Channel:{prototype:{closeOK:"fn()",reconnect:"fn()",_taskPush:"fn(reply: ?, cb: ?)",_tasksFlush:"fn()",_handleTaskReply:"fn(channel: ?, method: ?, args: ?) -> bool",_onChannelMethod:"fn(channel: ?, method: ?, args: ?)",close:"fn(reason: ?)"},"!type":"fn(connection: +Connection, channel: number)","!doc":"This class is not exposed to the user."},Exchange:{prototype:{_onMethod:"fn(channel: ?, method: ?, args: ?) -> bool",publish:{"!type":"fn(routingKey: ?, data: ?, options: ?, callback: ?)","!doc":"exchange.publish('routing.key', 'body'); the third argument can specify additional options - mandatory (boolean, default false) - immediate (boolean, default false) - contentType (default 'application/octet-stream') - contentEncoding - headers - deliveryMode - priority (0-9) - correlationId - replyTo - expiration - messageId - timestamp - userId - appId - clusterId the callback is optional and is only used when confirm is turned on for the exchange"},_awaitConfirm:{"!type":"fn(task: ?, callback: ?)","!doc":"registers tasks for confirms"},cleanup:{"!type":"fn()","!doc":"do any necessary cleanups eg."},destroy:"fn(ifUnused: ?)",unbind:"fn()",bind:"fn()",bind_headers:"fn()"},"!type":"fn(connection: +Connection, channel: number, name: ?, options: Exchange.!3, openCallback: ?)",binds:"number",exchangeBinds:"number",sourceExchanges:{"":"+Exchange"},_sequence:"number",_unAcked:{},_addedExchangeErrorHandler:"bool",state:"string",channel:"number",connection:"+Connection",_tasks:"[?]"},createExchangeErrorHandlerFor:{"!type":"fn(exchange: +Exchange) -> fn(err: ?)","!doc":"creates an error handler scoped to the given `exchange`"},Connection:{prototype:{setOptions:"fn(options: ?)",setImplOptions:"fn(options: ?)",connect:"fn()",reconnect:"fn()",disconnect:"fn()",addAllListeners:"fn()",heartbeat:"fn()",exchange:{"!type":"fn(name: ?, options: Exchange.!3, openCallback: ?) -> +Exchange","!doc":"connection.exchange('my-exchange', { type: 'topic' }); Options - type 'fanout', 'direct', or 'topic' (default) - passive (boolean) - durable (boolean) - autoDelete (boolean, default true)"},exchangeClosed:{"!type":"fn(name: ?)","!doc":"remove an exchange when it's closed (called from Exchange)"},queue:{"!type":"fn(name: ?) -> +Queue","!doc":"Options - passive (boolean) - durable (boolean) - exclusive (boolean) - autoDelete (boolean, default true)"},queueClosed:{"!type":"fn(name: ?)","!doc":"remove a queue when it's closed (called from Queue)"},publish:{"!type":"fn(routingKey: ?, body: ?, options: ?, callback: ?)","!doc":"Publishes a message to the default exchange."},_bodyToBuffer:"fn(body: ?) -> [?]",_inboundHeartbeatTimerReset:"fn()",_outboundHeartbeatTimerReset:"fn()",_saslResponse:"fn() -> ?|string",_onMethod:"fn(channel: number, method: methods., args: parseFields.!ret)",_parseURLOptions:{"!type":"fn(connectionString: ?) -> Connection.prototype._parseURLOptions.!ret","!doc":"Generate connection options from URI string formatted with amqp scheme."},_chooseHost:{"!type":"fn() -> !this.options.host","!doc":"If you pass a array of hosts, lets choose a random host or the preferred host number, or then next one."},_createSocket:"fn()",end:"fn()",_getSSLOptions:"fn() -> !this.sslConnectionOptions",_startHandshake:{"!type":"fn()","!doc":"Time to start the AMQP 7-way connection initialization handshake! 1."},_sendBody:{"!type":"fn(channel: number, body: ?, properties: ?)","!doc":"Parse helpers "},_sendHeader:{"!type":"fn(channel: number, size: ?, properties: ?)","!doc":"connection: the connection channel: the channel to send this on size: size in bytes of the following message properties: an object containing any of the following: - contentType (default 'application/octet-stream') - contentEncoding - headers - deliveryMode - priority (0-9) - correlationId - replyTo - expiration - messageId - timestamp - userId - appId - clusterId"},_sendMethod:"fn(channel: number, method: ?, args: ?)",generateChannelId:{"!type":"fn() -> !this.channelCounter","!doc":"tries to find the next available id slot for a channel"}},"!type":"fn(connectionArgs: ?, options: ?, readyCallback: ?)",connectionAttemptScheduled:{"!type":"bool","!doc":"Set to false, so that if we fail in the reconnect attempt, we can schedule another one."},_defaultExchange:"+Exchange",channelCounter:"number",_blocked:"bool",channels:{"!doc":"In the case where this is a reconnection, do not trample on the existing channels.","":"+Queue"},exchanges:{"":"+Exchange"},parser:{"!type":"+AMQPParser","!doc":"Reset parser state"},readyEmitted:{"!type":"bool","!doc":"Set 'ready' flag for auth failure detection."},hosti:{"!type":"number","!doc":"If this is already set, it looks like we want to choose another one."},"":"fn()",sslConnectionOptions:{}},serializer:{serializeFloat:"fn(b: ?, size: number, value: ?, bigEndian: ?)",serializeInt:"fn(b: ?, size: number, int: number)",serializeShortString:"fn(b: ?, string: ?)",serializeLongString:"fn(b: ?, string: ?)",serializeDate:"fn(b: ?, date: ?)",serializeBuffer:"fn(b: ?, buffer: ?)",serializeBase64:"fn(b: ?, buffer: ?)",isBigInt:"fn(value: ?) -> bool",getCode:"fn(dec: ?) -> string",isFloat:"fn(value: ?) -> bool",serializeValue:"fn(b: ?, value: ?)",serializeTable:"fn(b: ?, object: ?)",serializeArray:"fn(b: ?, arr: ?)",serializeFields:"fn(buffer: ?, fields: ?, args: ?, strict: bool)"},methodTable:{"":{"":"methods."},"!doc":"a look up table for methods recieved indexed on class id, method id"},classes:{"!doc":"classes keyed on their index"},Queue:{prototype:{subscribeRaw:"fn(options: Queue.consumerTagListeners., messageListener: Queue.consumerTagListeners.)",unsubscribe:"fn(consumerTag: ?)",subscribe:"fn(options: ?, messageListener: ?)",shift:{"!type":"fn(reject: ?, requeue: ?)","!doc":"Acknowledges the last message"},bind:"fn(exchange: string, routingKey: string, callback: string)",unbind:"fn(exchange: string, routingKey: string)",bind_headers:"fn()",unbind_headers:"fn()",destroy:"fn(options: ?)",purge:"fn()",_onMethod:"fn(channel: ?, method: ?, args: ?)",_onContentHeader:"fn(channel: number, classInfo: ?, weight: number, properties: parseFields.!ret, size: number)",_onContent:"fn(channel: number, data: ?)",flow:"fn(active: ?)",subscribeJSON:"Queue.prototype.subscribe"},"!type":"fn(connection: +Connection, channel: number, name: ?, options: ?, callback: ?)",name:"string",_bindings:{"":{"":"number"}},consumerTagListeners:{"":{state:"string"}},consumerTagOptions:{"":"Queue.consumerTagListeners."},options:{autoDelete:"bool",closeChannelOnUnsubscribe:"bool"},state:"string",_bindCallback:"string",_sequence:"number",confirm:"bool",currentMessage:"+Message"},AMQPParser:{prototype:{throwError:{"!type":"fn(error: string)","!doc":"If there's an error in the parser, call the onError handler or throw"},execute:{"!type":"fn(data: ?)","!doc":"Everytime data is recieved on the socket, pass it to this function for parsing."},_parseMethodFrame:"fn(channel: number, buffer: ?)",_parseHeaderFrame:"fn(channel: number, buffer: ?)"},"!type":"fn(version: string, type: string)","!doc":"An interruptible AMQP parser.",isClient:"bool",state:"string",parse:"fn(data: ?) -> AMQPParser.parse",onMethod:"fn(channel: number, method: methods., args: parseFields.!ret)",onContent:"fn(channel: number, data: ?)",onContentHeader:"fn(channel: number, classInfo: ?, weight: number, properties: parseFields.!ret, size: number)",onHeartBeat:"fn()",onError:"fn(e: string)"},maxFrameBuffer:{"!type":"number","!doc":"parser"},channelMax:{"!type":"number","!doc":"copying qpid)"},defaultPorts:{amqp:"number",amqps:"number"},defaultOptions:{host:"string",port:"number",login:"string",password:"string",authMechanism:"string",vhost:"string",connectionTimeout:"number",ssl:{enabled:"bool"}},defaultSslOptions:{port:"number",ssl:{rejectUnauthorized:"bool"}},defaultImplOptions:{defaultExchangeName:"string",reconnect:"bool",reconnectBackoffStrategy:"string",reconnectExponentialLimit:"number",reconnectBackoffTime:"number"},defaultClientProperties:{platform:"string",product:"string"},Message:{prototype:{acknowledge:{"!type":"fn(all: ?)","!doc":"Acknowledge receipt of message."},reject:{"!type":"fn(requeue: ?)","!doc":"Reject an incoming message."}},"!type":"fn(queue: +Queue, args: ?)","!doc":"Properties: - routingKey - size - deliveryTag - contentType (default 'application/octet-stream') - contentEncoding - headers - deliveryMode - priority (0-9) - correlationId - replyTo - experation - messageId - timestamp - userId - appId - clusterId",queue:"+Queue",read:"number",size:"number"},parseShortString:"fn(buffer: ?)",parseLongString:"fn(buffer: ?)",parseSignedInteger:"fn(buffer: ?) -> !0.",parseValue:"fn(buffer: ?) -> !0.",parseTable:"fn(buffer: ?) -> parseTable.!ret",parseFields:"fn(buffer: ?, fields: [?]) -> parseFields.!ret",Error:{name:"string"},createConnection:"fn(options: Object, implOptions: Object, readyCallback: fn()) -> +Connection"}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require("../lib/comment"),require("acorn/util/walk")):"function"==typeof define&&define.amd?define("tern/plugin/angular",["../lib/infer","../lib/tern","../lib/comment","acorn/util/walk"],e):void e(tern,tern,tern.comment,acorn.walk)}(function(e,t,r,n){"use strict";function o(){this.fields=Object.create(null),this.forward=[]}function s(t){var r=e.cx().definitions.angular.service;return r.hasProp(t)?r.getProp(t):void 0}function a(t,r){var n=s(r);return n?n:t.injector&&t.injector?t.injector.get(r):e.ANull}function i(t,r,n,o){var s=[];if("FunctionExpression"==n.type)for(var i=0;i5&&(o=o.slice(0,s+1)),o=o.trim().replace(/\s*\n\s*\*\s*|\s{1,}/g," "),e.arguments[0].angularDoc=o}}}})}function u(t){var r=e.cx(),n=t["!name"],o=r.definitions[n];if("angular"!=n){var s=o&&o["!ng"];if(s)for(var a in s.props){var i=s.props[a].getType(),l=p(a.replace(/`/g,"."),i.metaData&&i.metaData.includes||[]);l.origin=n;for(var d in i.props){var u=i.props[d],h=u.getType();h&&(/^_inject_/.test(d)?(h.name||(h.name=d.slice(8)),l.injector.set(d.slice(8),h,u.doc,u.span)):i.props[d].propagate(l.defProp(d)))}}}else{var f=c(r),m=r.parent._angular.nakedModules;if(f)for(var g=0;g-1){var i=s.replace(/\./g,"`");if(n.defProp(i).addType(a),a.condenseForceInclude=!0,++o,a.injector)for(var l in a.injector.fields){var c=a.injector.fields[l];c.local&&(t.roots["!ng."+i+"._inject_"+l]=c)}}}o&&(t.roots["!ng"]=n)}function f(t){var r=e.cx().parent._angular.modules;for(var n in t.types){var o;if(o=n.match(/^!ng\.([^\.]+)\._inject_([^\.]+)^/)){var s=r[o[1].replace(/`/g,".")],a=s.injector.fields[o[2]],i=t.types[n];a.span&&(i.span=a.span),a.doc&&(i.doc=a.doc)}}}function m(e){e._angular={modules:Object.create(null),pendingImports:Object.create(null),nakedModules:[]}}var g=e.constraint("doc",{addType:function(e){e.doc||(e.doc=this.doc)}});o.prototype.get=function(t){if("$scope"==t)return new e.Obj(s("$rootScope").getType(),"$scope");if(t in this.fields)return this.fields[t];var r=this.fields[t]=new e.AVal;return r},o.prototype.set=function(t,r,n,o,s){if(!("$scope"==t||s&&s>10)){var a=this.fields[t]||(this.fields[t]=new e.AVal);s||(a.local=!0),a.origin||(a.origin=e.cx().curOrigin),"string"!=typeof o||a.span?o&&"object"==typeof o&&!a.originNode&&(a.originNode=o):a.span=o,n&&(a.doc=n,a.propagate(new g(n))),r.propagate(a);for(var i=0;i1){var o=i(n,t[1],r[1]);n.injector&&"Literal"==r[0].type&&n.injector.set(r[0].value,o,r[0].angularDoc,r[0])}}),e.registerFunction("angular_regFieldNew",function(e,t,r){var n=e.getType();if(n&&r&&r.length>1){var o=i(n,t[1],r[1],!0);n.injector&&"Literal"==r[0].type&&n.injector.set(r[0].value,o,r[0].angularDoc,r[0])}}),e.registerFunction("angular_regField",function(e,t,r){var n=e.getType();n&&n.injector&&r&&r[0]&&"Literal"==r[0].type&&t[1]&&n.injector.set(r[0].value,t[1],r[0].angularDoc,r[0])}),e.registerFunction("angular_module",function(t,r,n){var o,s=n&&n[0]&&"Literal"==n[0].type&&n[0].value;return"string"==typeof s&&(o=e.cx().parent._angular.modules[s]),o||(o=p(s,l(n&&n[1]))),o});var b=e.constraint("self, args, target",{addType:function(t){if(t instanceof e.Fn){this.target.addType(new e.Fn(t.name,t.self,t.args.slice(this.args.length),t.argNames.slice(this.args.length),t.retval)),this.self.propagate(t.self);for(var r=0;r ?",put:"fn(key: string, value: ?) -> !1",get:"fn(key: string) -> ?",remove:"fn(key: string)",removeAll:"fn()",destroy:"fn()"},eventObj:{targetScope:"service.$rootScope",currentScope:"service.$rootScope",name:"string",stopPropagation:"fn()",preventDefault:"fn()",defaultPrevented:"bool"},directiveObj:{multiElement:{"!type":"bool","!url":"https://docs.angularjs.org/api/ng/service/$compile#-multielement-","!doc":"When this property is set to true, the HTML compiler will collect DOM nodes between nodes with the attributes directive-name-start and directive-name-end, and group them together as the directive elements. It is recommended that this feature be used on directives which are not strictly behavioural (such as ngClick), and which do not manipulate or replace child nodes (such as ngInclude)."},priority:{"!type":"number","!url":"https://docs.angularjs.org/api/ng/service/$compile#-priority-","!doc":"When there are multiple directives defined on a single DOM element, sometimes it is necessary to specify the order in which the directives are applied. The priority is used to sort the directives before their compile functions get called. Priority is defined as a number. Directives with greater numerical priority are compiled first. Pre-link functions are also run in priority order, but post-link functions are run in reverse order. The order of directives with the same priority is undefined. The default priority is 0."},terminal:{"!type":"bool","!url":"https://docs.angularjs.org/api/ng/service/$compile#-terminal-","!doc":"If set to true then the current priority will be the last set of directives which will execute (any directives at the current priority will still execute as the order of execution on same priority is undefined). Note that expressions and other directives used in the directive's template will also be excluded from execution."},scope:{"!type":"?","!url":"https://docs.angularjs.org/api/ng/service/$compile#-scope-","!doc":"If set to true, then a new scope will be created for this directive. If multiple directives on the same element request a new scope, only one new scope is created. The new scope rule does not apply for the root of the template since the root of the template always gets a new scope. If set to {} (object hash), then a new 'isolate' scope is created. The 'isolate' scope differs from normal scope in that it does not prototypically inherit from the parent scope. This is useful when creating reusable components, which should not accidentally read or modify data in the parent scope."},bindToController:{"!type":"bool","!url":"https://docs.angularjs.org/api/ng/service/$compile#-bindtocontroller-","!doc":"When an isolate scope is used for a component (see above), and controllerAs is used, bindToController: true will allow a component to have its properties bound to the controller, rather than to scope. When the controller is instantiated, the initial values of the isolate scope bindings are already available."},controller:{"!type":"fn()","!url":"https://docs.angularjs.org/api/ng/service/$compile#-require-","!doc":"Controller constructor function. The controller is instantiated before the pre-linking phase and it is shared with other directives (see require attribute). This allows the directives to communicate with each other and augment each other's behavior."},require:{"!type":"string","!url":"https://docs.angularjs.org/api/ng/service/$compile#-controller-","!doc":"Require another directive and inject its controller as the fourth argument to the linking function. The require takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the injected argument will be an array in corresponding order. If no such directive can be found, or if the directive does not have a controller, then an error is raised."},controllerAs:{"!type":"string","!url":"https://docs.angularjs.org/api/ng/service/$compile#-controlleras-","!doc":"Controller alias at the directive scope. An alias for the controller so it can be referenced at the directive template. The directive needs to define a scope for this configuration to be used. Useful in the case when directive is used as component."},restrict:{"!type":"string","!url":"https://docs.angularjs.org/api/ng/service/$compile#-restrict-","!doc":"String of subset of EACM which restricts the directive to a specific directive declaration style. If omitted, the defaults (elements and attributes) are used. E - Element name (default): . A - Attribute (default): 
. C - Class:
. M - Comment: "},templateNamespace:{"!type":"string","!url":"https://docs.angularjs.org/api/ng/service/$compile#-templatenamespace-","!doc":"String representing the document type used by the markup in the template. AngularJS needs this information as those elements need to be created and cloned in a special way when they are defined outside their usual containers like and ."},template:{"!type":"string","!url":"https://docs.angularjs.org/api/ng/service/$compile#-template-","!doc":"HTML markup that may: Replace the contents of the directive's element (default). Replace the directive's element itself (if replace is true - DEPRECATED). Wrap the contents of the directive's element (if transclude is true)."},templateUrl:{"!type":"string","!url":"https://docs.angularjs.org/api/ng/service/$compile#-templateurl-","!doc":"This is similar to template but the template is loaded from the specified URL, asynchronously."},transclude:{"!type":"bool","!url":"https://docs.angularjs.org/api/ng/service/$compile#-transclude-","!doc":"Extract the contents of the element where the directive appears and make it available to the directive. The contents are compiled and provided to the directive as a transclusion function."},compile:{"!type":"fn(tElement: +Element, tAttrs: +Attr)","!url":"https://docs.angularjs.org/api/ng/service/$compile#-transclude-","!doc":"The compile function deals with transforming the template DOM. Since most directives do not do template transformation, it is not used often."},link:{"!type":"fn(scope: ?, iElement: +Element, iAttrs: +Attr, controller: ?, transcludeFn: fn())","!url":"https://docs.angularjs.org/api/ng/service/$compile#-link-","!doc":"The link function is responsible for registering DOM listeners as well as updating the DOM. It is executed after the template has been cloned. This is where most of the directive logic will be put."}},Module:{"!url":"http://docs.angularjs.org/api/angular.Module","!doc":"Interface for configuring angular modules.",prototype:{animation:{"!type":"fn(name: string, animationFactory: fn()) -> !this","!url":"http://docs.angularjs.org/api/angular.Module#animation","!doc":"Defines an animation hook that can be later used with $animate service and directives that use this service."},config:{"!type":"fn(configFn: fn()) -> !this","!effects":["custom angular_callInject 0"],"!url":"http://docs.angularjs.org/api/angular.Module#config","!doc":"Use this method to register work which needs to be performed on module loading."},constant:"service.$provide.constant",controller:{"!type":"fn(name: string, constructor: fn()) -> !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/ng.$controllerProvider","!doc":"Register a controller."},directive:{"!type":"fn(name: string, directiveFactory: fn() -> directiveObj) -> !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/ng.$compileProvider#directive","!doc":"Register a new directive with the compiler."},factory:"service.$provide.factory",filter:{"!type":"fn(name: string, filterFactory: fn()) -> !this","!effects":["custom angular_callInject 1"],"!url":"http://docs.angularjs.org/api/ng.$filterProvider","!doc":"Register filter factory function."},provider:"service.$provide.provider",run:{"!type":"fn(initializationFn: fn()) -> !this","!effects":["custom angular_callInject 0"],"!url":"http://docs.angularjs.org/api/angular.Module#run","!doc":"Register work which should be performed when the injector is done loading all modules."},service:"service.$provide.service",value:"service.$provide.value",name:{"!type":"string","!url":"http://docs.angularjs.org/api/angular.Module#name","!doc":"Name of the module."},requires:{"!type":"[string]","!url":"http://docs.angularjs.org/api/angular.Module#requires","!doc":"List of module names which must be loaded before this module."}}},Promise:{"!url":"http://docs.angularjs.org/api/ng.$q","!doc":"Allow for interested parties to get access to the result of the deferred task when it completes.",prototype:{then:"fn(successCallback: fn(value: ?), errorCallback: fn(reason: ?), notifyCallback: fn(value: ?)) -> +Promise","catch":"fn(errorCallback: fn(reason: ?))","finally":"fn(callback: fn()) -> +Promise",success:"fn(callback: fn(data: ?, status: number, headers: ?, config: ?)) -> +Promise",error:"fn(callback: fn(data: ?, status: number, headers: ?, config: ?)) -> +Promise"}},Deferred:{"!url":"http://docs.angularjs.org/api/ng.$q",prototype:{resolve:"fn(value: ?)",reject:"fn(reason: ?)",notify:"fn(value: ?)",promise:"+Promise"}},ResourceClass:{"!url":"http://docs.angularjs.org/api/ngResource.$resource",prototype:{$promise:"+Promise",$save:"fn()"}},Resource:{"!url":"http://docs.angularjs.org/api/ngResource.$resource",prototype:{get:"fn(params: ?, callback: fn()) -> +ResourceClass",save:"fn(params: ?, callback: fn()) -> +ResourceClass",query:"fn(params: ?, callback: fn()) -> +ResourceClass",remove:"fn(params: ?, callback: fn()) -> +ResourceClass","delete":"fn(params: ?, callback: fn()) -> +ResourceClass"}},service:{$anchorScroll:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$anchorScroll","!doc":"Checks current value of $location.hash() and scroll to related element."},$animate:{"!url":"http://docs.angularjs.org/api/ng.$animate","!doc":"Rudimentary DOM manipulation functions to insert, remove, move elements within the DOM.",addClass:{"!type":"fn(element: +Element, className: string, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#addClass","!doc":"Adds the provided className CSS class value to the provided element."},enter:{"!type":"fn(element: +Element, parent: +Element, after: +Element, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#enter","!doc":"Inserts the element into the DOM either after the after element or within the parent element."},leave:{"!type":"fn(element: +Element, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#leave","!doc":"Removes the element from the DOM."},move:{"!type":"fn(element: +Element, parent: +Element, after: +Element, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#move","!doc":"Moves element to be placed either after the after element or inside of the parent element."},removeClass:{"!type":"fn(element: +Element, className: string, done?: fn()) -> !this","!url":"http://docs.angularjs.org/api/ng.$animate#removeClass","!doc":"Removes the provided className CSS class value from the provided element."}},$cacheFactory:{"!type":"fn(cacheId: string, options?: ?) -> cacheObj","!url":"http://docs.angularjs.org/api/ng.$cacheFactory","!doc":"Factory that constructs cache objects and gives access to them."},$compile:{"!type":"fn(element: +Element, transclude: fn(scope: ?), maxPriority: number)","!url":"http://docs.angularjs.org/api/ng.$compile","!doc":"Compiles a piece of HTML string or DOM into a template and produces a template function."},$controller:{"!type":"fn(controller: fn(), locals: ?) -> ?","!url":"http://docs.angularjs.org/api/ng.$controller","!doc":"Instantiates controllers."},$document:{"!type":"jQuery.fn","!url":"http://docs.angularjs.org/api/ng.$document","!doc":"A jQuery (lite)-wrapped reference to the browser's window.document element."},$exceptionHandler:{"!type":"fn(exception: +Error, cause?: string)","!url":"http://docs.angularjs.org/api/ng.$exceptionHandler","!doc":"Any uncaught exception in angular expressions is delegated to this service."},$filter:{"!type":"fn(name: string) -> fn(input: string) -> string","!url":"http://docs.angularjs.org/api/ng.$filter","!doc":"Retrieve a filter function."},$http:{"!type":"fn(config: ?) -> service.$q","!url":"http://docs.angularjs.org/api/ng.$http","!doc":"Facilitates communication with remote HTTP servers.","delete":"fn(url: string, config?: ?) -> +Promise",get:"fn(url: string, config?: ?) -> +Promise",head:"fn(url: string, config?: ?) -> +Promise",jsonp:"fn(url: string, config?: ?) -> +Promise",post:"fn(url: string, data: ?, config?: ?) -> +Promise",put:"fn(url: string, data: ?, config?: ?) -> +Promise"},$interpolate:{"!type":"fn(text: string, mustHaveExpression?: bool, trustedContext?: string) -> fn(context: ?) -> string","!url":"http://docs.angularjs.org/api/ng.$interpolate","!doc":"Compiles a string with markup into an interpolation function."},$locale:{"!url":"http://docs.angularjs.org/api/ng.$locale",id:"string"},$location:{"!url":"http://docs.angularjs.org/api/ng.$location","!doc":"Parses the URL in the browser address bar.",absUrl:{"!type":"fn() -> string","!url":"http://docs.angularjs.org/api/ng.$location#absUrl","!doc":"Return full url representation."},hash:{"!type":"fn(value?: string) -> string","!url":"http://docs.angularjs.org/api/ng.$location#hash","!doc":"Get or set the hash fragment."},host:{"!type":"fn() -> string","!url":"http://docs.angularjs.org/api/ng.$location#host","!doc":"Return host of current url."},path:{"!type":"fn(value?: string) -> string","!url":"http://docs.angularjs.org/api/ng.$location#path","!doc":"Get or set the URL path."},port:{"!type":"fn() -> number","!url":"http://docs.angularjs.org/api/ng.$location#port","!doc":"Returns the port of the current url."},protocol:{"!type":"fn() -> string","!url":"http://docs.angularjs.org/api/ng.$location#protocol","!doc":"Return protocol of current url."},replace:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$location#replace","!doc":"Changes to $location during current $digest will be replacing current history record, instead of adding new one."},search:{"!type":"fn(search: string, paramValue?: string) -> string","!url":"http://docs.angularjs.org/api/ng.$location#search","!doc":"Get or set the URL query."},url:{"!type":"fn(url: string, replace?: string) -> string","!url":"http://docs.angularjs.org/api/ng.$location#url","!doc":"Get or set the current url."}},$log:{"!url":"http://docs.angularjs.org/api/ng.$log","!doc":"Simple service for logging.",debug:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#debug","!doc":"Write a debug message."},error:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#error","!doc":"Write an error message."},info:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#info","!doc":"Write an info message."},log:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#log","!doc":"Write a log message."},warn:{"!type":"fn(message: string)","!url":"http://docs.angularjs.org/api/ng.$log#warn","!doc":"Write a warning message."}},$parse:{"!type":"fn(expression: string) -> fn(context: ?, locals: ?) -> ?","!url":"http://docs.angularjs.org/api/ng.$parse","!doc":"Converts Angular expression into a function."},$q:{"!url":"http://docs.angularjs.org/api/ng.$q","!doc":"A promise/deferred implementation.",all:{"!type":"fn(promises: [+Promise]) -> +Promise","!url":"http://docs.angularjs.org/api/ng.$q#all","!doc":"Combines multiple promises into a single promise."},defer:{"!type":"fn() -> +Deferred","!url":"http://docs.angularjs.org/api/ng.$q#defer","!doc":"Creates a Deferred object which represents a task which will finish in the future."},reject:{"!type":"fn(reasion: ?) -> +Promise","!url":"http://docs.angularjs.org/api/ng.$q#reject","!doc":"Creates a promise that is resolved as rejected with the specified reason."},when:{"!type":"fn(value: ?) -> +Promise","!url":"http://docs.angularjs.org/api/ng.$q#when","!doc":"Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise."}},$rootElement:{"!type":"+Element","!url":"http://docs.angularjs.org/api/ng.$rootElement","!doc":"The root element of Angular application."},$rootScope:{"!url":"http://docs.angularjs.org/api/ng.$rootScope",$apply:{"!type":"fn(expression: string)","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$apply","!doc":"Execute an expression in angular from outside of the angular framework."},$broadcast:{"!type":"fn(name: string, args?: ?) -> eventObj","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$broadcast","!doc":"Dispatches an event name downwards to all child scopes."},$destroy:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$destroy","!doc":"Removes the current scope (and all of its children) from the parent scope."},$digest:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$digest","!doc":"Processes all of the watchers of the current scope and its children."},$emit:{"!type":"fn(name: string, args?: ?) -> eventObj","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$emit","!doc":"Dispatches an event name upwards through the scope hierarchy."},$eval:{"!type":"fn(expression: string) -> ?","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$eval","!doc":"Executes the expression on the current scope and returns the result."},$evalAsync:{"!type":"fn(expression: string)","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$evalAsync","!doc":"Executes the expression on the current scope at a later point in time."},$new:{"!type":"fn(isolate: bool) -> service.$rootScope","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$new","!doc":"Creates a new child scope."},$on:{"!type":"fn(name: string, listener: fn(event: ?)) -> fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$on","!doc":"Listens on events of a given type."},$watch:{"!type":"fn(watchExpression: string, listener?: fn(), objectEquality?: bool) -> fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$watch","!doc":"Registers a listener callback to be executed whenever the watchExpression changes."},$watchCollection:{"!type":"fn(obj: string, listener: fn()) -> fn()","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$watchCollection","!doc":"Shallow watches the properties of an object and fires whenever any of the properties."},$id:{"!type":"number","!url":"http://docs.angularjs.org/api/ng.$rootScope.Scope#$id","!doc":"Unique scope ID."}},$sce:{HTML:"string",CSS:"string",URL:"string",RESOURCE_URL:"string",JS:"string",getTrusted:"fn(type: string, maybeTrusted: ?) -> !1",getTrustedCss:"fn(maybeTrusted: ?) -> !0",getTrustedHtml:"fn(maybeTrusted: ?) -> !0",getTrustedJs:"fn(maybeTrusted: ?) -> !0",getTrustedResourceUrl:"fn(maybeTrusted: ?) -> !0",getTrustedUrl:"fn(maybeTrusted: ?) -> !0",parse:"fn(type: string, expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsCss:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsHtml:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsJs:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsResourceUrl:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",parseAsUrl:"fn(expression: string) -> fn(context: ?, locals: ?) -> ?",trustAs:"fn(type: string, value: ?) -> !1",trustAsHtml:"fn(value: ?) -> !0",trustAsJs:"fn(value: ?) -> !0",trustAsResourceUrl:"fn(value: ?) -> !0",trustAsUrl:"fn(value: ?) -> !0",isEnabled:"fn() -> bool"},$templateCache:{"!url":"http://docs.angularjs.org/api/ng.$templateCache","!proto":"cacheObj"},$timeout:{"!type":"fn(fn: fn(), delay?: number, invokeApply?: bool) -> +Promise","!url":"http://docs.angularjs.org/api/ng.$timeout","!doc":"Angular's wrapper for window.setTimeout.",cancel:"fn(promise: +Promise)"},$window:"",$injector:{"!url":"http://docs.angularjs.org/api/AUTO.$injector","!doc":"Retrieve object instances as defined by provider.",annotate:{"!type":"fn(f: fn()) -> [string]","!url":"http://docs.angularjs.org/api/AUTO.$injector#annotate","!doc":"Returns an array of service names which the function is requesting for injection."},get:{"!type":"fn(name: string) -> ?","!url":"http://docs.angularjs.org/api/AUTO.$injector#get","!doc":"Return an instance of a service."},has:{"!type":"fn(name: string) -> bool","!url":"http://docs.angularjs.org/api/AUTO.$injector#has","!doc":"Allows the user to query if the particular service exist."},instantiate:{"!type":"fn(type: fn(), locals?: ?) -> +!0","!url":"http://docs.angularjs.org/api/AUTO.$injector#instantiate","!doc":"Create a new instance of JS type."},invoke:{"!type":"fn(type: fn(), self?: ?, locals?: ?) -> !0.!ret","!url":"http://docs.angularjs.org/api/AUTO.$injector#invoke","!doc":"Invoke the method and supply the method arguments from the $injector."}},$provide:{"!url":"http://docs.angularjs.org/api/AUTO.$provide","!doc":"Use $provide to register new providers with the $injector.",constant:{"!type":"fn(name: string, value: ?) -> !this","!effects":["custom angular_regField"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#constant","!doc":"A constant value."},decorator:{"!type":"fn(name: string, decorator: fn())","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#decorator","!doc":"Decoration of service, allows the decorator to intercept the service instance creation."},factory:{"!type":"fn(name: string, providerFunction: fn()) -> !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#factory","!doc":"A short hand for configuring services if only $get method is required."},provider:{"!type":"fn(name: string, providerType: fn()) -> !this","!effects":["custom angular_regFieldCall"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#provider","!doc":"Register a provider for a service."},service:{"!type":"fn(name: string, constructor: fn()) -> !this","!effects":["custom angular_regFieldNew"],"!url":"http://docs.angularjs.org/api/AUTO.$provide#provider","!doc":"Register a provider for a service."},value:{"!type":"fn(name: string, object: ?) -> !this","!effects":["custom angular_regField"],"!url":"http://docs.angularjs.org/api/AUTO.$providevalue","!doc":"A short hand for configuring services if the $get method is a constant."}},$cookies:{"!url":"http://docs.angularjs.org/api/ngCookies.$cookies","!doc":"Provides read/write access to browser's cookies.",text:"string"},$resource:{"!type":"fn(url: string, paramDefaults?: ?, actions?: ?) -> +Resource","!url":"http://docs.angularjs.org/api/ngResource.$resource","!doc":"Creates a resource object that lets you interact with RESTful server-side data sources."},$route:{"!url":"http://docs.angularjs.org/api/ngRoute.$route","!doc":"Deep-link URLs to controllers and views.",reload:{"!type":"fn()","!url":"http://docs.angularjs.org/api/ngRoute.$route#reload","!doc":"Reload the current route even if $location hasn't changed."},current:{"!url":"http://docs.angularjs.org/api/ngRoute.$route#current","!doc":"Reference to the current route definition.",controller:"?",locals:"?"},routes:"[?]"},$sanitize:{"!type":"fn(string) -> string","!url":"http://docs.angularjs.org/api/ngSanitize.$sanitize","!doc":"Sanitize HTML input."},$swipe:{"!url":"http://docs.angularjs.org/api/ngTouch.$swipe","!doc":"A service that abstracts the messier details of hold-and-drag swipe behavior.",bind:{"!type":"fn(element: +Element, handlers: ?)","!url":"http://docs.angularjs.org/api/ngTouch.$swipe#bind","!doc":"Abstracts the messier details of hold-and-drag swipe behavior."}}}},angular:{bind:{"!type":"fn(self: ?, fn: fn(), args?: ?) -> !custom:angular_bind","!url":"http://docs.angularjs.org/api/angular.bind","!doc":"Returns a function which calls function fn bound to self."},bootstrap:{"!type":"fn(element: +Element, modules?: [string]) -> service.$injector","!url":"http://docs.angularjs.org/api/angular.bootstrap","!doc":"Use this function to manually start up angular application."},copy:{"!type":"fn(source: ?, target?: ?) -> !0","!url":"http://docs.angularjs.org/api/angular.copy","!doc":"Creates a deep copy of source, which should be an object or an array."},element:{"!type":"fn(element: +Element) -> jQuery.fn","!url":"http://docs.angularjs.org/api/angular.element","!doc":"Wraps a raw DOM element or HTML string as a jQuery element."},equals:{"!type":"fn(o1: ?, o2: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.equals","!doc":"Determines if two objects or two values are equivalent."},extend:{"!type":"fn(dst: ?, src: ?) -> !0","!url":"http://docs.angularjs.org/api/angular.extend","!doc":"Extends the destination object dst by copying all of the properties from the src object(s) to dst."},forEach:{"!type":"fn(obj: ?, iterator: fn(value: ?, key: ?), context?: ?) -> !0","!effects":["call !1 this=!2 !0. number"],"!url":"http://docs.angularjs.org/api/angular.forEach","!doc":"Invokes the iterator function once for each item in obj collection, which can be either an object or an array."},fromJson:{"!type":"fn(json: string) -> ?","!url":"http://docs.angularjs.org/api/angular.fromJson","!doc":"Deserializes a JSON string."},identity:{"!type":"fn(val: ?) -> !0","!url":"http://docs.angularjs.org/api/angular.identity","!doc":"A function that returns its first argument."},injector:{"!type":"fn(modules: [string]) -> service.$injector","!url":"http://docs.angularjs.org/api/angular.injector","!doc":"Creates an injector function"},isArray:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isArray","!doc":"Determines if a reference is an Array."},isDate:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isDate","!doc":"Determines if a reference is a date."},isDefined:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isDefined","!doc":"Determines if a reference is defined."},isElement:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isElement","!doc":"Determines if a reference is a DOM element."},isFunction:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isFunction","!doc":"Determines if a reference is a function."},isNumber:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isNumber","!doc":"Determines if a reference is a number."},isObject:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isObject","!doc":"Determines if a reference is an object."},isString:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isString","!doc":"Determines if a reference is a string."},isUndefined:{"!type":"fn(val: ?) -> bool","!url":"http://docs.angularjs.org/api/angular.isUndefined","!doc":"Determines if a reference is undefined."},lowercase:{"!type":"fn(val: string) -> string","!url":"http://docs.angularjs.org/api/angular.lowercase","!doc":"Converts the specified string to lowercase."},module:{"!type":"fn(name: string, deps: [string]) -> !custom:angular_module","!url":"http://docs.angularjs.org/api/angular.module","!doc":"A global place for creating, registering and retrieving Angular modules."},Module:"Module",noop:{"!type":"fn()","!url":"http://docs.angularjs.org/api/angular.noop","!doc":"A function that performs no operations."},toJson:{"!type":"fn(val: ?) -> string","!url":"http://docs.angularjs.org/api/angular.toJson","!doc":"Serializes input into a JSON-formatted string."},uppercase:{"!type":"fn(string) -> string","!url":"http://docs.angularjs.org/api/angular.uppercase","!doc":"Converts the specified string to uppercase."},version:{"!url":"http://docs.angularjs.org/api/angular.version",full:"string",major:"number",minor:"number",dot:"number",codename:"string"}}} +}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionExpress",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,r){function n(n,s,a,i){var l=t.resolvePos(n,a),c=e.findExpressionAround(n.ast,null,l,n.scope),p=r.getTemplatesForNode(o,c);if(p&&p.length>0)for(var d=0;d IRoute",get:"fn(handler: [RequestHandler]) -> IRoute",post:"fn(handler: [RequestHandler]) -> IRoute",put:"fn(handler: [RequestHandler]) -> IRoute","delete":"fn(handler: [RequestHandler]) -> IRoute",patch:"fn(handler: [RequestHandler]) -> IRoute",options:"fn(handler: [RequestHandler]) -> IRoute"},Router:{"!type":"fn(options?: ?) -> Router",prototype:{param:"fn(name: string, handler: RequestParamHandler) -> T",all:"?",get:"?",post:"?",put:"?","delete":"?",patch:"?",options:"?",route:"fn(path: string) -> IRoute",use:"fn(handler: [RequestHandler]) -> T"}},CookieOptions:{maxAge:"number",signed:"bool",expires:"Date",httpOnly:"bool",path:"string",domain:"string",secure:"bool"},Errback:{},Request:{get:"fn(name: string) -> string",header:"fn(name: string) -> string",headers:{},accepts:"fn(type: string) -> string",acceptsCharset:"fn(charset: string) -> bool",acceptsLanguage:"fn(lang: string) -> bool",range:"fn(size: number) -> [?]",accepted:"[MediaType]",acceptedLanguages:"[?]",acceptedCharsets:"[?]",param:"fn(name: string, defaultValue?: ?) -> string",is:"fn(type: string) -> bool",protocol:"string",secure:"bool",ip:"string",ips:"[string]",subdomains:"[string]",path:"string",hostname:"string",host:"string",fresh:"bool",stale:"bool",xhr:"bool",body:"?",cookies:"?",method:"string",params:"?",user:"?",authenticatedUser:"?",files:"?",clearCookie:"fn(name: string, options?: ?) -> Response",query:"?",route:"?",signedCookies:"?",originalUrl:"string",url:"string"},MediaType:{value:"string",quality:"number",type:"string",subtype:"string"},Send:{},Response:{status:"fn(code: number) -> Response",sendStatus:"fn(code: number) -> Response",links:"fn(links: ?) -> Response",send:"Send",json:"Send",jsonp:"Send",sendFile:"fn(path: string)",sendfile:"fn(path: string)",download:"fn(path: string)",contentType:"fn(type: string) -> Response",type:"fn(type: string) -> Response",format:"fn(obj: ?) -> Response",attachment:"fn(filename?: string) -> Response",set:"fn(field: ?) -> Response",header:"fn(field: ?) -> Response",headersSent:"bool",get:"fn(field: string) -> string",clearCookie:"fn(name: string, options?: ?) -> Response",cookie:"fn(name: string, val: string, options: CookieOptions) -> Response",location:"fn(url: string) -> Response",redirect:"fn(url: string)",render:"fn(view: string, options?: Object, callback?: fn(err: Error, html: string))",locals:"?",charset:"string"},ErrorRequestHandler:{},RequestHandler:{},Handler:{},RequestParamHandler:{},Application:{init:"fn()",defaultConfiguration:"fn()",engine:"fn(ext: string, fn: Function) -> Application",set:"fn(setting: string, val: ?) -> Application",get:{},path:"fn() -> string",enabled:"fn(setting: string) -> bool",disabled:"fn(setting: string) -> bool",enable:"fn(setting: string) -> Application",disable:"fn(setting: string) -> Application",configure:"fn(fn: Function) -> Application",render:"fn(name: string, options?: Object, callback?: fn(err: Error, html: string))",listen:"fn(port: number, hostname: string, backlog: number, callback?: Function) -> http.Server",route:"fn(path: string) -> IRoute",router:"string",settings:"?",resource:"?",map:"?",locals:"?",routes:"?"},Express:{version:"string",mime:"string",createApplication:"fn() -> Application",createServer:"fn() -> Application",application:"?",request:"Request",response:"Response"},"static":"fn(root: string, options?: ?) -> RequestHandler"},"!name":"express","!define":{"!node":{express:{"!type":"fn() -> express.Application","!url":"http://expressjs.com","!doc":"Creates an express application.",Router:{"!type":"fn(options?: express.RouterOptions) -> +express.Router"}}}}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionMongoDB",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,r){function n(n,s,a,i){var l=t.resolvePos(n,a),c=e.findExpressionAround(n.ast,null,l,n.scope),p=r.getTemplatesForNode(o,c);if(p&&p.length>0)for(var d=0;d ?"}},Db:{"!type":"fn(databaseName: string, serverConfig: Server, dbOptions?: DbCreateOptions)",prototype:{db:"fn(dbName: string) -> Db",open:"fn(callback: fn(err: Error, db: Db))",close:"fn(forceClose?: bool, callback?: fn(err: Error, result: ?))",admin:"fn(callback: fn(err: Error, result: ?)) -> ?",collectionsInfo:"fn(collectionName: string, callback?: fn(err: Error, result: ?))",collectionNames:"fn(collectionName: string, options: ?, callback?: fn(err: Error, result: ?))",collection:"fn(collectionName: string) -> Collection",collections:"fn(callback: fn(err: Error, collections: [Collection]))",eval:"fn(code: ?, parameters: [?], options?: ?, callback?: fn(err: Error, result: ?))",logout:"fn(options: ?, callback?: fn(err: Error, result: ?))",authenticate:"fn(userName: string, password: string, callback?: fn(err: Error, result: ?))",addUser:"fn(username: string, password: string, callback?: fn(err: Error, result: ?))",removeUser:"fn(username: string, callback?: fn(err: Error, result: ?))",createCollection:"fn(collectionName: string, callback?: fn(err: Error, result: Collection))",command:"fn(selector: Object, callback?: fn(err: Error, result: ?))",dropCollection:"fn(collectionName: string, callback?: fn(err: Error, result: ?))",renameCollection:"fn(fromCollection: string, toCollection: string, callback?: fn(err: Error, result: ?))",lastError:"fn(options: Object, connectionOptions: ?, callback: fn(err: Error, result: ?))",previousError:"fn(options: Object, callback: fn(err: Error, result: ?))",executeDbCommand:"fn(command_hash: ?, callback?: fn(err: Error, result: ?))",executeDbAdminCommand:"fn(command_hash: ?, callback?: fn(err: Error, result: ?))",resetErrorHistory:"fn(callback?: fn(err: Error, result: ?))",createIndex:"fn(collectionName: ?, fieldOrSpec: ?, options: IndexOptions, callback: Function)",ensureIndex:"fn(collectionName: ?, fieldOrSpec: ?, options: IndexOptions, callback: Function)",cursorInfo:"fn(options: ?, callback: Function)",dropIndex:"fn(collectionName: string, indexName: string, callback: Function)",reIndex:"fn(collectionName: string, callback: Function)",indexInformation:"fn(collectionName: string, options: ?, callback: Function)",dropDatabase:"fn(callback: fn(err: Error, result: ?))",stats:"fn(options: ?, callback: Function)",_registerHandler:"fn(db_command: ?, raw: ?, connection: ?, exhaust: ?, callback: Function)",_reRegisterHandler:"fn(newId: ?, object: ?, callback: Function)",_callHandler:"fn(id: ?, document: ?, err: ?) -> ?",_hasHandler:"fn(id: ?) -> ?",_removeHandler:"fn(id: ?) -> ?",_findHandler:"fn(id: ?) -> ret",__executeQueryCommand:"fn(self: ?, db_command: ?, options: ?, callback: ?)",DEFAULT_URL:"string",connect:"fn(url: string, options: Object, callback: fn(err: Error, result: ?))",addListener:"fn(event: string, handler: fn(param: ?)) -> ?"}},SocketOptions:{timeout:"number",noDelay:"bool",keepAlive:"number",encoding:"string"},ServerOptions:{auto_reconnect:"bool",poolSize:"number",socketOptions:"?"},PKFactory:{counter:"number",createPk:"fn()"},DbCreateOptions:{w:"?",wtimeout:"number",fsync:"bool",journal:"bool",readPreference:"string",native_parser:"bool",forceServerObjectId:"bool",pkFactory:"PKFactory",serializeFunctions:"bool",raw:"bool",recordQueryStats:"bool",retryMiliSeconds:"number",numberOfRetries:"number",logger:"Object",slaveOk:"number",promoteLongs:"bool"},ReadPreference:{PRIMARY:"string",PRIMARY_PREFERRED:"string",SECONDARY:"string",SECONDARY_PREFERRED:"string",NEAREST:"string",prototype:{}},CollectionCreateOptions:{readPreference:"string",slaveOk:"bool",serializeFunctions:"bool",raw:"bool",pkFactory:"PKFactory"},CollStats:{ns:"string",count:"number",size:"number",avgObjSize:"number",storageSize:"number",numExtents:"number",nindexes:"number",lastExtentSize:"number",paddingFactor:"number",flags:"number",totalIndexSize:"number",indexSizes:{_id_:"number",username:"number"}},Collection:{insert:"fn(query: ?, callback: fn(err: Error, result: ?))",remove:"fn(selector: Object, callback?: fn(err: Error, result: ?))",rename:"fn(newName: String, callback?: fn(err: Error, result: ?))",save:"fn(doc: ?, callback: fn(err: Error, result: ?))",update:"fn(selector: Object, document: ?, callback?: fn(err: Error, result: ?))",distinct:"fn(key: string, query: Object, callback: fn(err: Error, result: ?))",count:"fn(callback: fn(err: Error, result: ?))",drop:"fn(callback?: fn(err: Error, result: ?))",findAndModify:"fn(query: Object, sort: [?], doc: Object, callback: fn(err: Error, result: ?))",findAndRemove:"fn(query: Object, sort?: [?], callback?: fn(err: Error, result: ?))",find:"fn(callback?: fn(err: Error, result: Cursor)) -> Cursor",findOne:"fn(callback?: fn(err: Error, result: ?)) -> Cursor",createIndex:"fn(fieldOrSpec: ?, callback: fn(err: Error, indexName: string))",ensureIndex:"fn(fieldOrSpec: ?, callback: fn(err: Error, indexName: string))",indexInformation:"fn(options: ?, callback: Function)",dropIndex:"fn(name: string, callback: Function)",dropAllIndexes:"fn(callback: Function)",reIndex:"fn(callback: Function)",mapReduce:"fn(map: Function, reduce: Function, options: MapReduceOptions, callback: Function)",group:"fn(keys: Object, condition: Object, initial: Object, reduce: Function, finalize: Function, command: bool, options: Object, callback: Function)",options:"fn(callback: Function)",isCapped:"fn(callback: Function)",indexExists:"fn(indexes: string, callback: Function)",geoNear:"fn(x: number, y: number, callback: Function)",geoHaystackSearch:"fn(x: number, y: number, callback: Function)",indexes:"fn(callback: Function)",aggregate:"fn(pipeline: [?], callback: fn(err: Error, results: ?))",stats:"fn(options: Object, callback: fn(err: Error, results: CollStats))",hint:"?"},MapReduceOptions:{out:"Object",query:"Object",sort:"Object",limit:"number",keeptemp:"bool",finalize:"?",scope:"Object",jsMode:"bool",verbose:"bool",readPreference:"string"},IndexOptions:{w:"?",wtimeout:"number",fsync:"bool",journal:"bool",unique:"bool",sparse:"bool",background:"bool",dropDups:"bool",min:"number",max:"number",v:"number",expireAfterSeconds:"number",name:"string"},Cursor:{INIT:"number",OPEN:"number",CLOSED:"number",GET_MORE:"number",prototype:{rewind:"fn() -> Cursor",toArray:"fn(callback: fn(err: Error, results: [?]))",each:"fn(callback: fn(err: Error, item: ?))",count:"fn(applySkipLimit: bool, callback: fn(err: Error, count: number))",sort:"fn(keyOrList: ?, callback?: fn(err: Error, result: ?)) -> Cursor",limit:"fn(limit: number, callback?: fn(err: Error, result: ?)) -> Cursor",setReadPreference:"fn(preference: string, callback?: Function) -> Cursor",skip:"fn(skip: number, callback?: fn(err: Error, result: ?)) -> Cursor",batchSize:"fn(batchSize: number, callback?: fn(err: Error, result: ?)) -> Cursor",nextObject:"fn(callback: fn(err: Error, doc: ?))",explain:"fn(callback: fn(err: Error, result: ?))",stream:"fn() -> CursorStream",close:"fn(callback: fn(err: Error, result: ?))",isClosed:"fn() -> bool"}},CursorStream:{"!type":"fn(cursor: Cursor)",prototype:{pause:"fn() -> ?",resume:"fn() -> ?",destroy:"fn() -> ?"}},CollectionFindOptions:{limit:"number",sort:"?",fields:"Object",skip:"number",hint:"Object",explain:"bool",snapshot:"bool",timeout:"bool",tailtable:"bool",tailableRetryInterval:"number",numberOfRetries:"number",awaitdata:"bool",oplogReplay:"bool",exhaust:"bool",batchSize:"number",returnKey:"bool",maxScan:"number",min:"number",max:"number",showDiskLoc:"bool",comment:"String",raw:"bool",readPreference:"String",partial:"bool"},MongoCollectionOptions:{safe:"?",serializeFunctions:"?",raw:"bool",pkFactory:"?",readPreference:"string"}},"!name":"mongodb","!define":{"!node":{mongodb:{"!doc":"MongoDB","!url":"https://www.mongodb.org/",MongoClient:"mongodb.MongoClient",Db:"mongodb.Db",Server:"mongodb.Server",SocketOptions:"mongodb.SocketOptions",ServerOptions:"mongodb.ServerOptions",CollectionFindOptions:"mongodb.CollectionFindOptions",MongoCollectionOptions:"mongodb.MongoCollectionOptions",IndexOptions:"mongodb.IndexOptions",CollectionCreateOptions:"mongodb.CollectionCreateOptions",DbCreateOptions:"mongodb.DbCreateOptions",MapReduceOptions:"mongodb.MapReduceOptions",CollStats:"mongodb.CollStats",ReadPreference:"mongodb.ReadPreference",Collection:"mongodb.Collection",Cursor:"mongodb.Cursor",PKFactory:"mongodb.PKFactory"}}}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionMySQL",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,r){function n(n,s,a,i){var l=t.resolvePos(n,a),c=e.findExpressionAround(n.ast,null,l,n.scope),p=r.getTemplatesForNode(o,c);if(p&&p.length>0)for(var d=0;d Connection",createPool:"fn(config: PoolConfig) -> Pool",createPoolCluster:"fn(config?: PoolClusterConfig) -> PoolCluster",escape:"fn(value: ?) -> string",format:"fn(sql: string) -> string",MySql:{createConnection:"fn(connectionUri: string) -> Connection",createPool:"fn(config: PoolConfig) -> Pool",createPoolCluster:"fn(config?: PoolClusterConfig) -> PoolCluster",escape:"fn(value: ?) -> string",format:"fn(sql: string) -> string"},ConnectionStatic:{createQuery:"fn(sql: string) -> Query"},Connection:{config:"ConnectionConfig",threadId:"number",beginTransaction:"fn(callback: fn(err: Error))",connect:"fn()",commit:"fn(callback: fn(err: Error))",changeUser:"fn(options: ConnectionOptions)",query:"QueryFunction",end:"fn()",destroy:"fn()",pause:"fn()",release:"fn()",resume:"fn()",escape:"fn(value: ?) -> string",escapeId:"fn(value: string) -> string",format:"fn(sql: string) -> string",on:"fn(ev: string, callback: fn(args: [?])) -> Connection",rollback:"fn(callback: fn())"},Pool:{config:"PoolConfig",getConnection:"fn(callback: fn(err: Error, connection: Connection))",query:"QueryFunction",end:"fn()",on:"fn(ev: string, callback: fn(args: [?])) -> Pool"},PoolCluster:{config:"PoolClusterConfig",add:"fn(config: PoolConfig)",end:"fn()",getConnection:"fn(callback: fn(err: Error, connection: Connection))",of:"fn(pattern: string) -> Pool",on:"fn(ev: string, callback: fn(args: [?])) -> PoolCluster"},Query:{sql:"string",start:"fn()",determinePacket:"fn(firstByte: number, parser: ?) -> ?",stream:"fn(options: StreamOptions) -> stream.Readable",pipe:"fn(callback: fn(args: [?])) -> Query",on:"fn(ev: string, callback: fn(args: [?])) -> Query"},QueryFunction:{},QueryOptions:{sql:"string",timeout:"number",nestTables:"?",typeCast:"?"},StreamOptions:{highWaterMark:"number",objectMode:"?"},ConnectionOptions:{user:"string",password:"string",database:"string",charset:"string"},ConnectionConfig:{host:"string",port:"number",localAddress:"string",socketPath:"string",timezone:"string",connectTimeout:"number",stringifyObjects:"bool",insecureAuth:"bool",typeCast:"?",queryFormat:"fn(query: string, values: ?)",supportBigNumbers:"bool",bigNumberStrings:"bool",dateStrings:"bool",debug:"?",trace:"bool",multipleStatements:"bool",flags:"?",ssl:"?"},PoolConfig:{acquireTimeout:"number",waitForConnections:"bool",connectionLimit:"number",queueLimit:"number"},PoolClusterConfig:{canRetry:"bool",removeNodeErrorCount:"number",defaultSelector:"string"},SslCredentials:{pfx:"string",key:"string",passphrase:"string",cert:"string",ca:"?",crl:"?",ciphers:"string"},Error:{code:"string",errno:"number",sqlStateMarker:"string",sqlState:"string",fieldCount:"number",stack:"string",fatal:"bool"}},"!name":"mysql","!define":{"!node":{mysql:{createConnection:"fn(connectionUri: string) -> mysql.Connection",createPool:"fn(config: mysql.PoolConfig) -> mysql.Pool",createPoolCluster:"fn(config?: mysql.PoolClusterConfig) -> mysql.PoolCluster",escape:"fn(value: ?) -> string",format:"fn(sql: string) -> string"}}}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionNode",["../lib/infer","../lib/tern","./resolver"],e):void e(tern,tern)}(function(e,t,r,n){"use strict";function o(e,t){if("/"===t[0])return t;var r,n=e.lastIndexOf("/");for(n>=0&&(t=e.slice(0,n+1)+t);r=/[^\/]*[^\/\.][^\/]*\/\.\.\//.exec(t);)t=t.slice(0,r.index)+t.slice(r.index+r[0].length);return t.replace(/(^|[^\.])\.\//g,"$1")}function s(e,t){return"/"!==e[e.length-1]&&(e+="/"),0===t.indexOf(e)?t.slice(e.length):t}function a(t,r){return t.modules[r]||(t.modules[r]=new e.AVal)}function i(t,r,n){var o=new e.Scope(t);o.originNode=n,e.cx().definitions.node.require.propagate(o.defProp("require"));var s=new e.Obj(e.cx().definitions.node.Module.getProp("prototype").getType());s.propagate(o.defProp("module"));var a=new e.Obj(!0,"exports");s.origin=a.origin=r,s.originNode=a.originNode=o.originNode,a.propagate(o.defProp("exports"));var i=o.exports=s.defProp("exports");return a.propagate(i,y),o}function l(e,t){return e.addFile(t,null,e._node.currentOrigin),a(e._node,t)}function c(e){return e.replace(/\\/g,"/")}function p(e,t){return o(c(e.options.projectDir||"")+"/",c(t))}function d(t){var r=e.cx().parent._node.modules,n=t.roots["!node"]=new e.Obj(null);for(var o in r){var s=r[o],a=s.origin||o,i=n.defProp(a.replace(/\./g,"`"));s.propagate(i),i.origin=s.origin}}function u(t){var r=e.cx(),n=r.definitions[t["!name"]]["!node"],t=r.parent._node;if(n)for(var o in n.props){var s=o.replace(/`/g,"."),i=a(t,s);i.origin=s,n.props[o].propagate(i)}}function h(e,t,r,n){if(r){var o="Literal"===r.node.type&&"string"==typeof r.node.value,s=!!r.node.required;if(o&&s){n=Object.create(n);var a;r.node.required&&(a=r.node.required.getType())&&(n.origin=a.origin,n.originNode=a.originNode)}return n}return null}function f(r,n){var o=t.resolvePos(r,n.end),s=e.findExpressionAround(r.ast,null,o,r.scope,"CallExpression");if(s){var a=s.node;if(!("Identifier"!==a.callee.type||"require"!==a.callee.name||a.arguments.length<1)){var i=a.arguments[0];if(!("Literal"!==i.type||"string"!=typeof i.value||i.start>o||i.end !custom:nodeRequire",resolve:{"!type":"fn() -> string","!url":"http://nodejs.org/api/globals.html#globals_require_resolve","!doc":"Use the internal require() machinery to look up the location of a module, but rather than loading the module, just return the resolved filename."},cache:{"!url":"http://nodejs.org/api/globals.html#globals_require_cache","!doc":"Modules are cached in this object when they are required. By deleting a key value from this object, the next require will reload the module."},extensions:{"!url":"http://nodejs.org/api/globals.html#globals_require_extensions","!doc":"Instruct require on how to handle certain file extensions."},"!url":"http://nodejs.org/api/globals.html#globals_require","!doc":"To require modules."},Module:{"!type":"fn()",prototype:{exports:{"!type":"?","!url":"http://nodejs.org/api/modules.html#modules_module_exports","!doc":"The exports object is created by the Module system. Sometimes this is not acceptable, many want their module to be an instance of some class. To do this assign the desired export object to module.exports. For example suppose we were making a module called a.js"},require:{"!type":"require","!url":"http://nodejs.org/api/modules.html#modules_module_require_id","!doc":"The module.require method provides a way to load a module as if require() was called from the original module."},id:{"!type":"string","!url":"http://nodejs.org/api/modules.html#modules_module_id","!doc":"The identifier for the module. Typically this is the fully resolved filename."},filename:{"!type":"string","!url":"http://nodejs.org/api/modules.html#modules_module_filename","!doc":"The fully resolved filename to the module."},loaded:{"!type":"bool","!url":"http://nodejs.org/api/modules.html#modules_module_loaded","!doc":"Whether or not the module is done loading, or is in the process of loading."},parent:{"!type":"+Module","!url":"http://nodejs.org/api/modules.html#modules_module_parent","!doc":"The module that required this one."},children:{"!type":"[+Module]","!url":"http://nodejs.org/api/modules.html#modules_module_children","!doc":"The module objects required by this one."}}},events:{EventEmitter:{prototype:{addListener:{"!type":"fn(event: string, listener: fn())","!url":"http://nodejs.org/api/events.html#events_emitter_addlistener_event_listener","!doc":"Adds a listener to the end of the listeners array for the specified event."},on:{"!type":"fn(event: string, listener: fn())","!url":"http://nodejs.org/api/events.html#events_emitter_on_event_listener","!doc":"Adds a listener to the end of the listeners array for the specified event."},once:{"!type":"fn(event: string, listener: fn())","!url":"http://nodejs.org/api/events.html#events_emitter_once_event_listener","!doc":"Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed."},removeListener:{"!type":"fn(event: string, listener: fn())","!url":"http://nodejs.org/api/events.html#events_emitter_removelistener_event_listener","!doc":"Remove a listener from the listener array for the specified event. Caution: changes array indices in the listener array behind the listener."},removeAllListeners:{"!type":"fn(event: string)","!url":"http://nodejs.org/api/events.html#events_emitter_removealllisteners_event","!doc":"Removes all listeners, or those of the specified event."},setMaxListeners:{"!type":"fn(n: number)","!url":"http://nodejs.org/api/events.html#events_emitter_setmaxlisteners_n","!doc":"By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that to be increased. Set to zero for unlimited."},listeners:{"!type":"fn(event: string) -> [fn()]","!url":"http://nodejs.org/api/events.html#events_emitter_listeners_event","!doc":"Returns an array of listeners for the specified event."},emit:{"!type":"fn(event: string)","!url":"http://nodejs.org/api/events.html#events_emitter_emit_event_arg1_arg2","!doc":"Execute each of the listeners in order with the supplied arguments."}},"!url":"http://nodejs.org/api/events.html#events_class_events_eventemitter","!doc":"To access the EventEmitter class, require('events').EventEmitter."}},stream:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",pipe:{"!type":"fn(destination: +stream.Writable, options?: ?)","!url":"http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options","!doc":"Connects this readable stream to destination WriteStream. Incoming data on this stream gets written to destination. Properly manages back-pressure so that a slow destination will not be overwhelmed by a fast readable stream."}},Writable:{"!type":"fn(options?: ?)",prototype:{"!proto":"stream.prototype",write:{"!type":"fn(chunk: +Buffer, encoding?: string, callback?: fn()) -> bool","!url":"http://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback_1","!doc":"Writes chunk to the stream. Returns true if the data has been flushed to the underlying resource. Returns false to indicate that the buffer is full, and the data will be sent out in the future. The 'drain' event will indicate when the buffer is empty again."},end:{"!type":"fn(chunk: +Buffer, encoding?: string, callback?: fn()) -> bool","!url":"http://nodejs.org/api/stream.html#stream_writable_end_chunk_encoding_callback","!doc":"Call this method to signal the end of the data being written to the stream."}},"!url":"http://nodejs.org/api/stream.html#stream_class_stream_writable","!doc":"A Writable Stream has the following methods, members, and events."},Readable:{"!type":"fn(options?: ?)",prototype:{"!proto":"stream.prototype",setEncoding:{"!type":"fn(encoding: string)","!url":"http://nodejs.org/api/stream.html#stream_readable_setencoding_encoding","!doc":"Makes the 'data' event emit a string instead of a Buffer. encoding can be 'utf8', 'utf16le' ('ucs2'), 'ascii', or 'hex'."},pause:{"!type":"fn()","!url":"http://nodejs.org/api/stream.html#stream_readable_pause","!doc":"Switches the readable stream into \"old mode\", where data is emitted using a 'data' event rather than being buffered for consumption via the read() method."},resume:{"!type":"fn()","!url":"http://nodejs.org/api/stream.html#stream_readable_resume","!doc":"Switches the readable stream into \"old mode\", where data is emitted using a 'data' event rather than being buffered for consumption via the read() method."},destroy:"fn()",unpipe:{"!type":"fn(dest?: +stream.Writable)","!url":"http://nodejs.org/api/stream.html#stream_readable_unpipe_destination","!doc":"Undo a previously established pipe(). If no destination is provided, then all previously established pipes are removed."},push:{"!type":"fn(chunk: +Buffer) -> bool","!url":"http://nodejs.org/api/stream.html#stream_readable_push_chunk","!doc":"Explicitly insert some data into the read queue. If called with null, will signal the end of the data."},unshift:{"!type":"fn(chunk: +Buffer) -> bool","!url":"http://nodejs.org/api/stream.html#stream_readable_unshift_chunk","!doc":"This is the corollary of readable.push(chunk). Rather than putting the data at the end of the read queue, it puts it at the front of the read queue."},wrap:{"!type":"fn(stream: ?) -> +stream.Readable","!url":"http://nodejs.org/api/stream.html#stream_readable_wrap_stream","!doc":"If you are using an older Node library that emits 'data' events and has a pause() method that is advisory only, then you can use the wrap() method to create a Readable stream that uses the old stream as its data source."},read:{"!type":"fn(size?: number) -> +Buffer","!url":"http://nodejs.org/api/stream.html#stream_readable_read_size_1","!doc":"Call this method to consume data once the 'readable' event is emitted."}},"!url":"http://nodejs.org/api/stream.html#stream_class_stream_readable","!doc":"A Readable Stream has the following methods, members, and events."},Duplex:{"!type":"fn(options?: ?)",prototype:{"!proto":"stream.Readable.prototype",write:"fn(chunk: +Buffer, encoding?: string, callback?: fn()) -> bool",end:"fn(chunk: +Buffer, encoding?: string, callback?: fn()) -> bool"},"!url":"http://nodejs.org/api/stream.html#stream_class_stream_duplex","!doc":'A "duplex" stream is one that is both Readable and Writable, such as a TCP socket connection.'},Transform:{"!type":"fn(options?: ?)",prototype:{"!proto":"stream.Duplex.prototype"},"!url":"http://nodejs.org/api/stream.html#stream_class_stream_transform","!doc":'A "transform" stream is a duplex stream where the output is causally connected in some way to the input, such as a zlib stream or a crypto stream.'},PassThrough:"stream.Transform","!url":"http://nodejs.org/api/stream.html#stream_stream","!doc":"A stream is an abstract interface implemented by various objects in Node. For example a request to an HTTP server is a stream, as is stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter"},querystring:{stringify:{"!type":"fn(obj: ?, sep?: string, eq?: string) -> string","!url":"http://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq","!doc":"Serialize an object to a query string. Optionally override the default separator ('&') and assignment ('=') characters."},parse:{"!type":"fn(str: string, sep?: string, eq?: string, options?: ?) -> ?","!url":"http://nodejs.org/api/querystring.html#querystring_querystring_parse_str_sep_eq_options","!doc":"Deserialize a query string to an object. Optionally override the default separator ('&') and assignment ('=') characters."},escape:{"!type":"fn(string) -> string","!url":"http://nodejs.org/api/querystring.html#querystring_querystring_escape","!doc":"The escape function used by querystring.stringify, provided so that it could be overridden if necessary."},unescape:{"!type":"fn(string) -> string","!url":"http://nodejs.org/api/querystring.html#querystring_querystring_unescape","!doc":"The unescape function used by querystring.parse, provided so that it could be overridden if necessary."}},http:{STATUS_CODES:{},createServer:{"!type":"fn(listener?: fn(request: +http.IncomingMessage, response: +http.ServerResponse)) -> +http.Server","!url":"http://nodejs.org/api/http.html#http_http_createserver_requestlistener","!doc":"Returns a new web server object."},Server:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",listen:{"!type":"fn(port: number, hostname?: string, backlog?: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback","!doc":"Begin accepting connections on the specified port and hostname. If the hostname is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY)."},close:{"!type":"fn(callback?: ?)","!url":"http://nodejs.org/api/http.html#http_server_close_callback","!doc":"Stops the server from accepting new connections."},maxHeadersCount:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_server_maxheaderscount","!doc":"Limits maximum incoming headers count, equal to 1000 by default. If set to 0 - no limit will be applied."},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_server_settimeout_msecs_callback","!doc":"Sets the timeout value for sockets, and emits a 'timeout' event on the Server object, passing the socket as an argument, if a timeout occurs."},timeout:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_server_timeout","!doc":"The number of milliseconds of inactivity before a socket is presumed to have timed out."}},"!url":"http://nodejs.org/api/http.html#http_class_http_server","!doc":"Class for HTTP server objects."},ServerResponse:{"!type":"fn()",prototype:{"!proto":"stream.Writable.prototype",writeContinue:{"!type":"fn()","!url":"http://nodejs.org/api/http.html#http_response_writecontinue","!doc":"Sends a HTTP/1.1 100 Continue message to the client, indicating that the request body should be sent."},writeHead:{"!type":"fn(statusCode: number, headers?: ?)","!url":"http://nodejs.org/api/http.html#http_response_writehead_statuscode_reasonphrase_headers","!doc":"Sends a response header to the request. The status code is a 3-digit HTTP status code, like 404. The last argument, headers, are the response headers. Optionally one can give a human-readable reasonPhrase as the second argument."},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_response_settimeout_msecs_callback","!doc":"Sets the Socket's timeout value to msecs. If a callback is provided, then it is added as a listener on the 'timeout' event on the response object."},statusCode:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_response_statuscode","!doc":"When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed."},setHeader:{"!type":"fn(name: string, value: string)","!url":"http://nodejs.org/api/http.html#http_response_setheader_name_value","!doc":"Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name."},headersSent:{"!type":"bool","!url":"http://nodejs.org/api/http.html#http_response_headerssent","!doc":"Boolean (read-only). True if headers were sent, false otherwise."},sendDate:{"!type":"bool","!url":"http://nodejs.org/api/http.html#http_response_senddate","!doc":"When true, the Date header will be automatically generated and sent in the response if it is not already present in the headers. Defaults to true."},getHeader:{"!type":"fn(name: string) -> string","!url":"http://nodejs.org/api/http.html#http_response_getheader_name","!doc":"Reads out a header that's already been queued but not sent to the client. Note that the name is case insensitive. This can only be called before headers get implicitly flushed."},removeHeader:{"!type":"fn(name: string)","!url":"http://nodejs.org/api/http.html#http_response_removeheader_name","!doc":"Removes a header that's queued for implicit sending."},addTrailers:{"!type":"fn(headers: ?)","!url":"http://nodejs.org/api/http.html#http_response_addtrailers_headers","!doc":"This method adds HTTP trailing headers (a header but at the end of the message) to the response."}},"!url":"http://nodejs.org/api/http.html#http_class_http_serverresponse","!doc":"This object is created internally by a HTTP server--not by the user. It is passed as the second parameter to the 'request' event."},request:{"!type":"fn(options: ?, callback?: fn(res: +http.IncomingMessage)) -> +http.ClientRequest","!url":"http://nodejs.org/api/http.html#http_http_request_options_callback","!doc":"Node maintains several connections per server to make HTTP requests. This function allows one to transparently issue requests."},get:{"!type":"fn(options: ?, callback?: fn(res: +http.IncomingMessage)) -> +http.ClientRequest","!url":"http://nodejs.org/api/http.html#http_http_get_options_callback","!doc":"Since most requests are GET requests without bodies, Node provides this convenience method. The only difference between this method and http.request() is that it sets the method to GET and calls req.end() automatically."},globalAgent:{"!type":"+http.Agent","!url":"http://nodejs.org/api/http.html#http_http_globalagent","!doc":"Global instance of Agent which is used as the default for all http client requests."},Agent:{"!type":"fn()",prototype:{maxSockets:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_agent_maxsockets","!doc":"By default set to 5. Determines how many concurrent sockets the agent can have open per host."},sockets:{"!type":"[+net.Socket]","!url":"http://nodejs.org/api/http.html#http_agent_sockets","!doc":"An object which contains arrays of sockets currently in use by the Agent. Do not modify."},requests:{"!type":"[+http.ClientRequest]","!url":"http://nodejs.org/api/http.html#http_agent_requests","!doc":"An object which contains queues of requests that have not yet been assigned to sockets. Do not modify."}},"!url":"http://nodejs.org/api/http.html#http_class_http_agent","!doc":"In node 0.5.3+ there is a new implementation of the HTTP Agent which is used for pooling sockets used in HTTP client requests."},ClientRequest:{"!type":"fn()",prototype:{"!proto":"stream.Writable.prototype",abort:{"!type":"fn()","!url":"http://nodejs.org/api/http.html#http_request_abort","!doc":"Aborts a request. (New since v0.3.8.)"},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_request_settimeout_timeout_callback","!doc":"Once a socket is assigned to this request and is connected socket.setTimeout() will be called."},setNoDelay:{"!type":"fn(noDelay?: fn())","!url":"http://nodejs.org/api/http.html#http_request_setnodelay_nodelay","!doc":"Once a socket is assigned to this request and is connected socket.setNoDelay() will be called."},setSocketKeepAlive:{"!type":"fn(enable?: bool, initialDelay?: number)","!url":"http://nodejs.org/api/http.html#http_request_setsocketkeepalive_enable_initialdelay","!doc":"Once a socket is assigned to this request and is connected socket.setKeepAlive() will be called."}},"!url":"http://nodejs.org/api/http.html#http_class_http_clientrequest","!doc":"This object is created internally and returned from http.request(). It represents an in-progress request whose header has already been queued. The header is still mutable using the setHeader(name, value), getHeader(name), removeHeader(name) API. The actual header will be sent along with the first data chunk or when closing the connection."},IncomingMessage:{"!type":"fn()",prototype:{"!proto":"stream.Readable.prototype",httpVersion:{"!type":"string","!url":"http://nodejs.org/api/http.html#http_message_httpversion","!doc":"In case of server request, the HTTP version sent by the client. In the case of client response, the HTTP version of the connected-to server. Probably either '1.1' or '1.0'."},headers:{"!type":"?","!url":"http://nodejs.org/api/http.html#http_message_headers","!doc":"The request/response headers object."},trailers:{"!type":"?","!url":"http://nodejs.org/api/http.html#http_message_trailers","!doc":"The request/response trailers object. Only populated after the 'end' event."},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/http.html#http_message_settimeout_msecs_callback","!doc":"Calls message.connection.setTimeout(msecs, callback)."},setEncoding:{"!type":"fn(encoding?: string)","!url":"http://nodejs.org/api/http.html#http_message_setencoding_encoding","!doc":"Set the encoding for data emitted by the 'data' event."},pause:{"!type":"fn()","!url":"http://nodejs.org/api/http.html#http_message_pause","!doc":"Pauses request/response from emitting events. Useful to throttle back a download."},resume:{"!type":"fn()","!url":"http://nodejs.org/api/http.html#http_message_resume","!doc":"Resumes a paused request/response."},method:{"!type":"string","!url":"http://nodejs.org/api/http.html#http_message_method","!doc":"Only valid for request obtained from http.Server."},url:{"!type":"string","!url":"http://nodejs.org/api/http.html#http_message_url","!doc":"Only valid for request obtained from http.Server."},statusCode:{"!type":"number","!url":"http://nodejs.org/api/http.html#http_message_statuscode","!doc":"Only valid for response obtained from http.ClientRequest."},socket:{"!type":"+net.Socket","!url":"http://nodejs.org/api/http.html#http_message_socket","!doc":"The net.Socket object associated with the connection."}},"!url":"http://nodejs.org/api/http.html#http_http_incomingmessage","!doc":"An IncomingMessage object is created by http.Server or http.ClientRequest and passed as the first argument to the 'request' and 'response' event respectively. It may be used to access response status, headers and data."}},https:{Server:"http.Server",createServer:{"!type":"fn(listener?: fn(request: +http.IncomingMessage, response: +http.ServerResponse)) -> +https.Server","!url":"http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener","!doc":"Returns a new HTTPS web server object. The options is similar to tls.createServer(). The requestListener is a function which is automatically added to the 'request' event."},request:{"!type":"fn(options: ?, callback?: fn(res: +http.IncomingMessage)) -> +http.ClientRequest","!url":"http://nodejs.org/api/https.html#https_https_request_options_callback","!doc":"Makes a request to a secure web server."},get:{"!type":"fn(options: ?, callback?: fn(res: +http.IncomingMessage)) -> +http.ClientRequest","!url":"http://nodejs.org/api/https.html#https_https_get_options_callback","!doc":"Like http.get() but for HTTPS."},Agent:"http.Agent",globalAgent:"http.globalAgent"},cluster:{"!proto":"events.EventEmitter.prototype",settings:{exec:"string",args:"[string]",silent:"bool","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_settings","!doc":"All settings set by the .setupMaster is stored in this settings object. This object is not supposed to be changed or set manually, by you."},Worker:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",id:{"!type":"string","!url":"http://nodejs.org/api/cluster.html#cluster_worker_id","!doc":"Each new worker is given its own unique id, this id is stored in the id."},process:{"!type":"+child_process.ChildProcess","!url":"http://nodejs.org/api/cluster.html#cluster_worker_process","!doc":"All workers are created using child_process.fork(), the returned object from this function is stored in process."},suicide:{"!type":"bool","!url":"http://nodejs.org/api/cluster.html#cluster_worker_suicide","!doc":"This property is a boolean. It is set when a worker dies after calling .kill() or immediately after calling the .disconnect() method. Until then it is undefined."},send:{"!type":"fn(message: ?, sendHandle?: ?)","!url":"http://nodejs.org/api/cluster.html#cluster_worker_send_message_sendhandle","!doc":"This function is equal to the send methods provided by child_process.fork(). In the master you should use this function to send a message to a specific worker. However in a worker you can also use process.send(message), since this is the same function."},destroy:"fn()",disconnect:{"!type":"fn()","!url":"http://nodejs.org/api/cluster.html#cluster_worker_disconnect","!doc":"When calling this function the worker will no longer accept new connections, but they will be handled by any other listening worker. Existing connection will be allowed to exit as usual. When no more connections exist, the IPC channel to the worker will close allowing it to die graceful. When the IPC channel is closed the disconnect event will emit, this is then followed by the exit event, there is emitted when the worker finally die."},kill:{"!type":"fn(signal?: string)","!url":"http://nodejs.org/api/cluster.html#cluster_worker_kill_signal_sigterm","!doc":"This function will kill the worker, and inform the master to not spawn a new worker. The boolean suicide lets you distinguish between voluntary and accidental exit."}},"!url":"http://nodejs.org/api/cluster.html#cluster_class_worker","!doc":"A Worker object contains all public information and method about a worker. In the master it can be obtained using cluster.workers. In a worker it can be obtained using cluster.worker."},isMaster:{"!type":"bool","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_ismaster","!doc":"True if the process is a master. This is determined by the process.env.NODE_UNIQUE_ID. If process.env.NODE_UNIQUE_ID is undefined, then isMaster is true."},isWorker:{"!type":"bool","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_isworker","!doc":"This boolean flag is true if the process is a worker forked from a master. If the process.env.NODE_UNIQUE_ID is set to a value, then isWorker is true."},setupMaster:{"!type":"fn(settings?: cluster.settings)","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_setupmaster_settings","!doc":"setupMaster is used to change the default 'fork' behavior. The new settings are effective immediately and permanently, they cannot be changed later on."},fork:{"!type":"fn(env?: ?) -> +cluster.Worker","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_fork_env","!doc":"Spawn a new worker process. This can only be called from the master process."},disconnect:{"!type":"fn(callback?: fn())","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_disconnect_callback","!doc":"When calling this method, all workers will commit a graceful suicide. When they are disconnected all internal handlers will be closed, allowing the master process to die graceful if no other event is waiting."},worker:{"!type":"+cluster.Worker","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_worker","!doc":"A reference to the current worker object. Not available in the master process."},workers:{"!type":"[+cluster.Worker]","!url":"http://nodejs.org/api/cluster.html#cluster_cluster_workers","!doc":"A hash that stores the active worker objects, keyed by id field. Makes it easy to loop through all the workers. It is only available in the master process."},"!url":"http://nodejs.org/api/cluster.html#cluster_cluster","!doc":"A single instance of Node runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node processes to handle the load."},zlib:{Zlib:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",flush:{"!type":"fn(callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_flush_callback","!doc":"Flush pending data. Don't call this frivolously, premature flushes negatively impact the effectiveness of the compression algorithm."},reset:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_reset","!doc":"Reset the compressor/decompressor to factory defaults. Only applicable to the inflate and deflate algorithms."}},"!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_zlib","!doc":"Not exported by the zlib module. It is documented here because it is the base class of the compressor/decompressor classes."},deflate:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_deflate_buf_callback","!doc":"Compress a string with Deflate."},deflateRaw:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_deflateraw_buf_callback","!doc":"Compress a string with DeflateRaw."},gzip:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_gzip_buf_callback","!doc":"Compress a string with Gzip."},gunzip:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_gunzip_buf_callback","!doc":"Decompress a raw Buffer with Gunzip."},inflate:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_inflate_buf_callback","!doc":"Decompress a raw Buffer with Inflate."},inflateRaw:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_inflateraw_buf_callback","!doc":"Decompress a raw Buffer with InflateRaw."},unzip:{"!type":"fn(buf: +Buffer, callback: fn())","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_unzip_buf_callback","!doc":"Decompress a raw Buffer with Unzip."},Gzip:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_gzip","!doc":"Compress data using gzip.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createGzip:{"!type":"fn(options: ?) -> +zlib.Zlib","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_creategzip_options","!doc":"Returns a new Gzip object with an options."},Gunzip:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_gunzip","!doc":"Decompress a gzip stream.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createGunzip:{"!type":"fn(options: ?) -> +zlib.Gunzip","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_creategunzip_options","!doc":"Returns a new Gunzip object with an options."},Deflate:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_deflate","!doc":"Compress data using deflate.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createDeflate:{"!type":"fn(options: ?) -> +zlib.Deflate","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createdeflate_options","!doc":"Returns a new Deflate object with an options."},Inflate:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_inflate","!doc":"Decompress a deflate stream.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createInflate:{"!type":"fn(options: ?) -> +zlib.Inflate","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createinflate_options","!doc":"Returns a new Inflate object with an options."},InflateRaw:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_inflateraw","!doc":"Decompress a raw deflate stream.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createInflateRaw:{"!type":"fn(options: ?) -> +zlib.InflateRaw","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createinflateraw_options","!doc":"Returns a new InflateRaw object with an options."},DeflateRaw:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_deflateraw","!doc":"Compress data using deflate, and do not append a zlib header.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createDeflateRaw:{"!type":"fn(options: ?) -> +zlib.DeflateRaw","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createdeflateraw_options","!doc":"Returns a new DeflateRaw object with an options."},Unzip:{"!type":"fn()","!url":"http://nodejs.org/api/zlib.html#zlib_class_zlib_unzip","!doc":"Decompress either a Gzip- or Deflate-compressed stream by auto-detecting the header.",prototype:{"!proto:":"zlib.Zlib.prototype"}},createUnzip:{"!type":"fn(options: ?) -> +zlib.Unzip","!url":"http://nodejs.org/api/zlib.html#zlib_zlib_createunzip_options","!doc":"Returns a new Unzip object with an options."},Z_NO_FLUSH:"number",Z_PARTIAL_FLUSH:"number",Z_SYNC_FLUSH:"number",Z_FULL_FLUSH:"number",Z_FINISH:"number",Z_BLOCK:"number",Z_TREES:"number",Z_OK:"number",Z_STREAM_END:"number",Z_NEED_DICT:"number",Z_ERRNO:"number",Z_STREAM_ERROR:"number",Z_DATA_ERROR:"number",Z_MEM_ERROR:"number",Z_BUF_ERROR:"number",Z_VERSION_ERROR:"number",Z_NO_COMPRESSION:"number",Z_BEST_SPEED:"number",Z_BEST_COMPRESSION:"number",Z_DEFAULT_COMPRESSION:"number",Z_FILTERED:"number",Z_HUFFMAN_ONLY:"number",Z_RLE:"number",Z_FIXED:"number",Z_DEFAULT_STRATEGY:"number",Z_BINARY:"number",Z_TEXT:"number",Z_ASCII:"number",Z_UNKNOWN:"number",Z_DEFLATED:"number",Z_NULL:"number"},os:{tmpdir:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_tmpdir","!doc":"Returns the operating system's default directory for temp files."},endianness:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_endianness","!doc":'Returns the endianness of the CPU. Possible values are "BE" or "LE".'},hostname:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_hostname","!doc":"Returns the hostname of the operating system."},type:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_type","!doc":"Returns the operating system name."},platform:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_platform","!doc":"Returns the operating system platform."},arch:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_arch","!doc":"Returns the operating system CPU architecture."},release:{"!type":"fn() -> string","!url":"http://nodejs.org/api/os.html#os_os_release","!doc":"Returns the operating system release."},uptime:{"!type":"fn() -> number","!url":"http://nodejs.org/api/os.html#os_os_uptime","!doc":"Returns the system uptime in seconds."},loadavg:{"!type":"fn() -> [number]","!url":"http://nodejs.org/api/os.html#os_os_loadavg","!doc":"Returns an array containing the 1, 5, and 15 minute load averages."},totalmem:{"!type":"fn() -> number","!url":"http://nodejs.org/api/os.html#os_os_totalmem","!doc":"Returns the total amount of system memory in bytes."},freemem:{"!type":"fn() -> number","!url":"http://nodejs.org/api/os.html#os_os_freemem","!doc":"Returns the amount of free system memory in bytes."},cpus:{"!type":"fn() -> [os.cpuSpec]","!url":"http://nodejs.org/api/os.html#os_os_cpus","!doc":"Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq)."},networkInterfaces:{"!type":"fn() -> ?","!url":"http://nodejs.org/api/os.html#os_os_networkinterfaces","!doc":"Get a list of network interfaces."},EOL:{"!type":"string","!url":"http://nodejs.org/api/os.html#os_os_eol","!doc":"A constant defining the appropriate End-of-line marker for the operating system."}},punycode:{decode:{"!type":"fn(string: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_decode_string","!doc":"Converts a Punycode string of ASCII code points to a string of Unicode code points."},encode:{"!type":"fn(string: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_encode_string","!doc":"Converts a string of Unicode code points to a Punycode string of ASCII code points."},toUnicode:{"!type":"fn(domain: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_tounicode_domain","!doc":"Converts a Punycode string representing a domain name to Unicode. Only the Punycoded parts of the domain name will be converted, i.e. it doesn't matter if you call it on a string that has already been converted to Unicode."},toASCII:{"!type":"fn(domain: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_toascii_domain","!doc":"Converts a Unicode string representing a domain name to Punycode. Only the non-ASCII parts of the domain name will be converted, i.e. it doesn't matter if you call it with a domain that's already in ASCII."},ucs2:{decode:{"!type":"fn(string: string) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_ucs2_decode_string","!doc":"Creates an array containing the decimal code points of each Unicode character in the string. While JavaScript uses UCS-2 internally, this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16."},encode:{"!type":"fn(codePoints: [number]) -> string","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_ucs2_encode_codepoints","!doc":"Creates a string based on an array of decimal code points."}},version:{"!type":"?","!url":"http://nodejs.org/api/punycode.html#punycode_punycode_version","!doc":"A string representing the current Punycode.js version number."}},repl:{start:{"!type":"fn(options: ?) -> +events.EventEmitter","!url":"http://nodejs.org/api/repl.html#repl_repl_start_options","!doc":"Returns and starts a REPLServer instance."}},readline:{createInterface:{"!type":"fn(options: ?) -> +readline.Interface","!url":"http://nodejs.org/api/readline.html#readline_readline_createinterface_options","!doc":"Creates a readline Interface instance."},Interface:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",setPrompt:{"!type":"fn(prompt: string, length: number)","!url":"http://nodejs.org/api/readline.html#readline_rl_setprompt_prompt_length","!doc":"Sets the prompt, for example when you run node on the command line, you see > , which is node's prompt."},prompt:{"!type":"fn(preserveCursor?: bool)","!url":"http://nodejs.org/api/readline.html#readline_rl_prompt_preservecursor","!doc":"Readies readline for input from the user, putting the current setPrompt options on a new line, giving the user a new spot to write. Set preserveCursor to true to prevent the cursor placement being reset to 0."},question:{"!type":"fn(query: string, callback: fn())","!url":"http://nodejs.org/api/readline.html#readline_rl_question_query_callback","!doc":"Prepends the prompt with query and invokes callback with the user's response. Displays the query to the user, and then invokes callback with the user's response after it has been typed."},pause:{"!type":"fn()","!url":"http://nodejs.org/api/readline.html#readline_rl_pause","!doc":"Pauses the readline input stream, allowing it to be resumed later if needed."},resume:{"!type":"fn()","!url":"http://nodejs.org/api/readline.html#readline_rl_resume","!doc":"Resumes the readline input stream."},close:{"!type":"fn()","!url":"http://nodejs.org/api/readline.html#readline_rl_close","!doc":'Closes the Interface instance, relinquishing control on the input and output streams. The "close" event will also be emitted.'},write:{"!type":"fn(data: ?, key?: ?)","!url":"http://nodejs.org/api/readline.html#readline_rl_write_data_key","!doc":"Writes data to output stream. key is an object literal to represent a key sequence; available if the terminal is a TTY."}},"!url":"http://nodejs.org/api/readline.html#readline_class_interface","!doc":"The class that represents a readline interface with an input and output stream."}},vm:{createContext:{"!type":"fn(initSandbox?: ?) -> ?","!url":"http://nodejs.org/api/vm.html#vm_vm_createcontext_initsandbox","!doc":"vm.createContext creates a new context which is suitable for use as the 2nd argument of a subsequent call to vm.runInContext. A (V8) context comprises a global object together with a set of build-in objects and functions. The optional argument initSandbox will be shallow-copied to seed the initial contents of the global object used by the context."},Script:{"!type":"fn()",prototype:{runInThisContext:{"!type":"fn()","!url":"http://nodejs.org/api/vm.html#vm_script_runinthiscontext","!doc":"Similar to vm.runInThisContext but a method of a precompiled Script object. script.runInThisContext runs the code of script and returns the result. Running code does not have access to local scope, but does have access to the global object (v8: in actual context)."},runInNewContext:{"!type":"fn(sandbox?: ?)","!url":"http://nodejs.org/api/vm.html#vm_script_runinnewcontext_sandbox","!doc":"Similar to vm.runInNewContext a method of a precompiled Script object. script.runInNewContext runs the code of script with sandbox as the global object and returns the result. Running code does not have access to local scope. sandbox is optional."}},"!url":"http://nodejs.org/api/vm.html#vm_class_script","!doc":"A class for running scripts. Returned by vm.createScript."},runInThisContext:{"!type":"fn(code: string, filename?: string)","!url":"http://nodejs.org/api/vm.html#vm_vm_runinthiscontext_code_filename","!doc":"vm.runInThisContext() compiles code, runs it and returns the result. Running code does not have access to local scope. filename is optional, it's used only in stack traces."},runInNewContext:{"!type":"fn(code: string, sandbox?: ?, filename?: string)","!url":"http://nodejs.org/api/vm.html#vm_vm_runinnewcontext_code_sandbox_filename","!doc":"vm.runInNewContext compiles code, then runs it in sandbox and returns the result. Running code does not have access to local scope. The object sandbox will be used as the global object for code. sandbox and filename are optional, filename is only used in stack traces."},runInContext:{"!type":"fn(code: string, context: ?, filename?: string)","!url":"http://nodejs.org/api/vm.html#vm_vm_runincontext_code_context_filename","!doc":"vm.runInContext compiles code, then runs it in context and returns the result. A (V8) context comprises a global object, together with a set of built-in objects and functions. Running code does not have access to local scope and the global object held within context will be used as the global object for code. filename is optional, it's used only in stack traces."},createScript:{"!type":"fn(code: string, filename?: string) -> +vm.Script","!url":"http://nodejs.org/api/vm.html#vm_vm_createscript_code_filename","!doc":"createScript compiles code but does not run it. Instead, it returns a vm.Script object representing this compiled code. This script can be run later many times using methods below. The returned script is not bound to any global object. It is bound before each run, just for that run. filename is optional, it's only used in stack traces."}},child_process:{ChildProcess:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",stdin:{"!type":"+stream.Writable","!url":"http://nodejs.org/api/child_process.html#child_process_child_stdin","!doc":"A Writable Stream that represents the child process's stdin. Closing this stream via end() often causes the child process to terminate."},stdout:{"!type":"+stream.Readable","!url":"http://nodejs.org/api/child_process.html#child_process_child_stdout","!doc":"A Readable Stream that represents the child process's stdout."},stderr:{"!type":"+stream.Readable","!url":"http://nodejs.org/api/child_process.html#child_process_child_stderr","!doc":"A Readable Stream that represents the child process's stderr."},pid:{"!type":"number","!url":"http://nodejs.org/api/child_process.html#child_process_child_pid","!doc":"The PID of the child process."},kill:{"!type":"fn(signal?: string)","!url":"http://nodejs.org/api/child_process.html#child_process_child_kill_signal","!doc":"Send a signal to the child process. If no argument is given, the process will be sent 'SIGTERM'."},send:{"!type":"fn(message: ?, sendHandle?: ?)","!url":"http://nodejs.org/api/child_process.html#child_process_child_send_message_sendhandle","!doc":"When using child_process.fork() you can write to the child using child.send(message, [sendHandle]) and messages are received by a 'message' event on the child."},disconnect:{"!type":"fn()","!url":"http://nodejs.org/api/child_process.html#child_process_child_disconnect","!doc":"To close the IPC connection between parent and child use the child.disconnect() method. This allows the child to exit gracefully since there is no IPC channel keeping it alive. When calling this method the disconnect event will be emitted in both parent and child, and the connected flag will be set to false. Please note that you can also call process.disconnect() in the child process."}},"!url":"http://nodejs.org/api/child_process.html#child_process_class_childprocess","!doc":"ChildProcess is an EventEmitter."},spawn:{"!type":"fn(command: string, args?: [string], options?: ?) -> +child_process.ChildProcess","!url":"http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options","!doc":"Launches a new process with the given command, with command line arguments in args. If omitted, args defaults to an empty Array."},exec:{"!type":"fn(command: string, callback: fn(error: ?, stdout: +Buffer, stderr: +Buffer)) -> +child_process.ChildProcess","!url":"http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback","!doc":"Runs a command in a shell and buffers the output."},execFile:{"!type":"fn(file: string, args: [string], options: ?, callback: fn(error: ?, stdout: +Buffer, stderr: +Buffer)) -> +child_process.ChildProcess","!url":"http://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback","!doc":"This is similar to child_process.exec() except it does not execute a subshell but rather the specified file directly. This makes it slightly leaner than child_process.exec. It has the same options."},fork:{"!type":"fn(modulePath: string, args?: [string], options?: ?) -> +child_process.ChildProcess","!url":"http://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options","!doc":"This is a special case of the spawn() functionality for spawning Node processes. In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication channel built-in."}},url:{parse:{"!type":"fn(urlStr: string, parseQueryString?: bool, slashesDenoteHost?: bool) -> url.type","!url":"http://nodejs.org/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost","!doc":"Take a URL string, and return an object."},format:{"!type":"fn(url: url.type) -> string","!url":"http://nodejs.org/api/url.html#url_url_format_urlobj","!doc":"Take a parsed URL object, and return a formatted URL string."},resolve:{"!type":"fn(from: string, to: string) -> string","!url":"http://nodejs.org/api/url.html#url_url_resolve_from_to","!doc":"Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag."}},dns:{lookup:{"!type":"fn(domain: string, callback: fn(err: +Error, address: string, family: number)) -> string","!url":"http://nodejs.org/api/dns.html#dns_dns_lookup_domain_family_callback","!doc":"Resolves a domain (e.g. 'google.com') into the first found A (IPv4) or AAAA (IPv6) record. The family can be the integer 4 or 6. Defaults to null that indicates both Ip v4 and v6 address family."},resolve:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolve_domain_rrtype_callback","!doc":"Resolves a domain (e.g. 'google.com') into an array of the record types specified by rrtype. Valid rrtypes are 'A' (IPV4 addresses, default), 'AAAA' (IPV6 addresses), 'MX' (mail exchange records), 'TXT' (text records), 'SRV' (SRV records), 'PTR' (used for reverse IP lookups), 'NS' (name server records) and 'CNAME' (canonical name records)."},resolve4:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolve4_domain_callback","!doc":"The same as dns.resolve(), but only for IPv4 queries (A records). addresses is an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106'])."},resolve6:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolve6_domain_callback","!doc":"The same as dns.resolve4() except for IPv6 queries (an AAAA query)."},resolveMx:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvemx_domain_callback","!doc":"The same as dns.resolve(), but only for mail exchange queries (MX records)."},resolveTxt:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvetxt_domain_callback","!doc":"The same as dns.resolve(), but only for text queries (TXT records). addresses is an array of the text records available for domain (e.g., ['v=spf1 ip4:0.0.0.0 ~all'])."},resolveSrv:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvesrv_domain_callback","!doc":"The same as dns.resolve(), but only for service records (SRV records). addresses is an array of the SRV records available for domain. Properties of SRV records are priority, weight, port, and name (e.g., [{'priority': 10, {'weight': 5, 'port': 21223, 'name': 'service.example.com'}, ...])."},resolveNs:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvens_domain_callback","!doc":"The same as dns.resolve(), but only for name server records (NS records). addresses is an array of the name server records available for domain (e.g., ['ns1.example.com', 'ns2.example.com'])."},resolveCname:{"!type":"fn(domain: string, callback: fn(err: +Error, addresses: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_resolvecname_domain_callback","!doc":"The same as dns.resolve(), but only for canonical name records (CNAME records). addresses is an array of the canonical name records available for domain (e.g., ['bar.example.com'])."},reverse:{"!type":"fn(ip: string, callback: fn(err: +Error, domains: [string])) -> [string]","!url":"http://nodejs.org/api/dns.html#dns_dns_reverse_ip_callback","!doc":"Reverse resolves an ip address to an array of domain names."}},net:{createServer:{"!type":"fn(options?: ?, connectionListener?: fn(socket: +net.Socket)) -> +net.Server","!url":"http://nodejs.org/api/net.html#net_net_createserver_options_connectionlistener","!doc":"Creates a new TCP server. The connectionListener argument is automatically set as a listener for the 'connection' event."},Server:{"!type":"fn()",prototype:{"!proto":"net.Socket.prototype",listen:{"!type":"fn(port: number, hostname?: string, backlog?: number, callback?: fn())","!url":"http://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback","!doc":"Begin accepting connections on the specified port and host. If the host is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). A port value of zero will assign a random port."},close:{"!type":"fn(callback?: fn())","!url":"http://nodejs.org/api/net.html#net_server_close_callback","!doc":"Stops the server from accepting new connections and keeps existing connections. This function is asynchronous, the server is finally closed when all connections are ended and the server emits a 'close' event. Optionally, you can pass a callback to listen for the 'close' event."},maxConnections:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_server_maxconnections","!doc":"Set this property to reject connections when the server's connection count gets high."},getConnections:{"!type":"fn(callback: fn(err: +Error, count: number))","!url":"http://nodejs.org/api/net.html#net_server_getconnections_callback","!doc":"Asynchronously get the number of concurrent connections on the server. Works when sockets were sent to forks."}},"!url":"http://nodejs.org/api/net.html#net_class_net_server","!doc":"This class is used to create a TCP or UNIX server. A server is a net.Socket that can listen for new incoming connections."},Socket:{"!type":"fn(options: ?)",prototype:{"!proto":"events.EventEmitter.prototype",connect:{"!type":"fn(port: number, host?: string, connectionListener?: fn())","!url":"http://nodejs.org/api/net.html#net_socket_connect_port_host_connectlistener","!doc":"Opens the connection for a given socket. If port and host are given, then the socket will be opened as a TCP socket, if host is omitted, localhost will be assumed. If a path is given, the socket will be opened as a unix socket to that path."},bufferSize:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_buffersize","!doc":"net.Socket has the property that socket.write() always works. This is to help users get up and running quickly. The computer cannot always keep up with the amount of data that is written to a socket - the network connection simply might be too slow. Node will internally queue up the data written to a socket and send it out over the wire when it is possible. (Internally it is polling on the socket's file descriptor for being writable)."},setEncoding:{"!type":"fn(encoding?: string)","!url":"http://nodejs.org/api/net.html#net_socket_setencoding_encoding","!doc":"Set the encoding for the socket as a Readable Stream."},write:{"!type":"fn(data: +Buffer, encoding?: string, callback?: fn())","!url":"http://nodejs.org/api/net.html#net_socket_write_data_encoding_callback","!doc":"Sends data on the socket. The second parameter specifies the encoding in the case of a string--it defaults to UTF8 encoding."},end:{"!type":"fn(data?: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/net.html#net_socket_end_data_encoding","!doc":"Half-closes the socket. i.e., it sends a FIN packet. It is possible the server will still send some data."},destroy:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_destroy","!doc":"Ensures that no more I/O activity happens on this socket. Only necessary in case of errors (parse error or so)."},pause:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_pause","!doc":"Pauses the reading of data. That is, 'data' events will not be emitted. Useful to throttle back an upload."},resume:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_resume","!doc":"Resumes reading after a call to pause()."},setTimeout:{"!type":"fn(timeout: number, callback?: fn())","!url":"http://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback","!doc":"Sets the socket to timeout after timeout milliseconds of inactivity on the socket. By default net.Socket do not have a timeout."},setKeepAlive:{"!type":"fn(enable?: bool, initialDelay?: number)","!url":"http://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay","!doc":"Enable/disable keep-alive functionality, and optionally set the initial delay before the first keepalive probe is sent on an idle socket. enable defaults to false."},address:{"!type":"fn() -> net.address","!url":"http://nodejs.org/api/net.html#net_socket_address","!doc":"Returns the bound address, the address family name and port of the socket as reported by the operating system. Returns an object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }"},unref:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_unref","!doc":"Calling unref on a socket will allow the program to exit if this is the only active socket in the event system. If the socket is already unrefd calling unref again will have no effect."},ref:{"!type":"fn()","!url":"http://nodejs.org/api/net.html#net_socket_ref","!doc":"Opposite of unref, calling ref on a previously unrefd socket will not let the program exit if it's the only socket left (the default behavior). If the socket is refd calling ref again will have no effect."},remoteAddress:{"!type":"string","!url":"http://nodejs.org/api/net.html#net_socket_remoteaddress","!doc":"The string representation of the remote IP address. For example, '74.125.127.100' or '2001:4860:a005::68'."},remotePort:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_remoteport","!doc":"The numeric representation of the remote port. For example, 80 or 21."},localPort:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_localport","!doc":"The numeric representation of the local port. For example, 80 or 21."},bytesRead:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_bytesread","!doc":"The amount of received bytes."},bytesWritten:{"!type":"number","!url":"http://nodejs.org/api/net.html#net_socket_byteswritten","!doc":"The amount of bytes sent."},setNoDelay:{"!type":"fn(noDelay?: fn())","!url":"http://nodejs.org/api/net.html#net_socket_setnodelay_nodelay","!doc":"Disables the Nagle algorithm. By default TCP connections use the Nagle algorithm, they buffer data before sending it off. Setting true for noDelay will immediately fire off data each time socket.write() is called. noDelay defaults to true."},localAddress:{"!type":"string","!url":"http://nodejs.org/api/net.html#net_socket_localaddress","!doc":"The string representation of the local IP address the remote client is connecting on. For example, if you are listening on '0.0.0.0' and the client connects on '192.168.1.1', the value would be '192.168.1.1'."}},"!url":"http://nodejs.org/api/net.html#net_class_net_socket","!doc":"This object is an abstraction of a TCP or UNIX socket. net.Socket instances implement a duplex Stream interface. They can be created by the user and used as a client (with connect()) or they can be created by Node and passed to the user through the 'connection' event of a server."},connect:{"!type":"fn(options: ?, connectionListener?: fn()) -> +net.Socket","!url":"http://nodejs.org/api/net.html#net_net_connect_options_connectionlistener","!doc":"Constructs a new socket object and opens the socket to the given location. When the socket is established, the 'connect' event will be emitted."},createConnection:{"!type":"fn(options: ?, connectionListener?: fn()) -> +net.Socket","!url":"http://nodejs.org/api/net.html#net_net_createconnection_options_connectionlistener","!doc":"Constructs a new socket object and opens the socket to the given location. When the socket is established, the 'connect' event will be emitted."},isIP:{"!type":"fn(input: string) -> number","!url":"http://nodejs.org/api/net.html#net_net_isip_input","!doc":"Tests if input is an IP address. Returns 0 for invalid strings, returns 4 for IP version 4 addresses, and returns 6 for IP version 6 addresses."},isIPv4:{"!type":"fn(input: string) -> bool","!url":"http://nodejs.org/api/net.html#net_net_isipv4_input","!doc":"Returns true if input is a version 4 IP address, otherwise returns false."},isIPv6:{"!type":"fn(input: string) -> bool","!url":"http://nodejs.org/api/net.html#net_net_isipv6_input","!doc":"Returns true if input is a version 6 IP address, otherwise returns false."}},dgram:{createSocket:{"!type":"fn(type: string, callback?: fn()) -> +dgram.Socket","!url":"http://nodejs.org/api/dgram.html#dgram_dgram_createsocket_type_callback","!doc":"Creates a datagram Socket of the specified types. Valid types are udp4 and udp6."},Socket:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",send:{"!type":"fn(buf: +Buffer, offset: number, length: number, port: number, address: string, callback?: fn())","!url":"http://nodejs.org/api/dgram.html#dgram_socket_send_buf_offset_length_port_address_callback","!doc":"For UDP sockets, the destination port and IP address must be specified. A string may be supplied for the address parameter, and it will be resolved with DNS. An optional callback may be specified to detect any DNS errors and when buf may be re-used. Note that DNS lookups will delay the time that a send takes place, at least until the next tick. The only way to know for sure that a send has taken place is to use the callback."},bind:{"!type":"fn(port: number, address?: string)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_bind_port_address_callback","!doc":"For UDP sockets, listen for datagrams on a named port and optional address. If address is not specified, the OS will try to listen on all addresses."},close:{"!type":"fn()","!url":"http://nodejs.org/api/dgram.html#dgram_socket_close","!doc":"Close the underlying socket and stop listening for data on it."},address:{address:"string",family:"string",port:"number","!url":"http://nodejs.org/api/dgram.html#dgram_socket_address","!doc":"Returns an object containing the address information for a socket. For UDP sockets, this object will contain address , family and port."},setBroadcast:{"!type":"fn(flag: bool)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_setbroadcast_flag","!doc":"Sets or clears the SO_BROADCAST socket option. When this option is set, UDP packets may be sent to a local interface's broadcast address."},setTTL:{"!type":"fn(ttl: number)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_setttl_ttl","!doc":'Sets the IP_TTL socket option. TTL stands for "Time to Live," but in this context it specifies the number of IP hops that a packet is allowed to go through. Each router or gateway that forwards a packet decrements the TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. Changing TTL values is typically done for network probes or when multicasting.'},setMulticastTTL:{"!type":"fn(ttl: number)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_setmulticastttl_ttl","!doc":'Sets the IP_MULTICAST_TTL socket option. TTL stands for "Time to Live," but in this context it specifies the number of IP hops that a packet is allowed to go through, specifically for multicast traffic. Each router or gateway that forwards a packet decrements the TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.'},setMulticastLoopback:{"!type":"fn(flag: bool)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_setmulticastloopback_flag","!doc":"Sets or clears the IP_MULTICAST_LOOP socket option. When this option is set, multicast packets will also be received on the local interface."},addMembership:{"!type":"fn(multicastAddress: string, multicastInterface?: string)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_addmembership_multicastaddress_multicastinterface","!doc":"Tells the kernel to join a multicast group with IP_ADD_MEMBERSHIP socket option."},dropMembership:{"!type":"fn(multicastAddress: string, multicastInterface?: string)","!url":"http://nodejs.org/api/dgram.html#dgram_socket_dropmembership_multicastaddress_multicastinterface","!doc":"Opposite of addMembership - tells the kernel to leave a multicast group with IP_DROP_MEMBERSHIP socket option. This is automatically called by the kernel when the socket is closed or process terminates, so most apps will never need to call this."}},"!url":"http://nodejs.org/api/dgram.html#dgram_class_dgram_socket","!doc":"The dgram Socket class encapsulates the datagram functionality. It should be created via dgram.createSocket(type, [callback])."}},fs:{rename:{"!type":"fn(oldPath: string, newPath: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_rename_oldpath_newpath_callback","!doc":"Asynchronous rename(2). No arguments other than a possible exception are given to the completion callback."},renameSync:{"!type":"fn(oldPath: string, newPath: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_renamesync_oldpath_newpath","!doc":"Synchronous rename(2)."},ftruncate:{"!type":"fn(fd: number, len: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_ftruncate_fd_len_callback","!doc":"Asynchronous ftruncate(2). No arguments other than a possible exception are given to the completion callback."},ftruncateSync:{"!type":"fn(fd: number, len: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_ftruncatesync_fd_len","!doc":"Synchronous ftruncate(2)."},truncate:{"!type":"fn(path: string, len: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_truncate_path_len_callback","!doc":"Asynchronous truncate(2). No arguments other than a possible exception are given to the completion callback."},truncateSync:{"!type":"fn(path: string, len: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_truncatesync_path_len","!doc":"Synchronous truncate(2)."},chown:{"!type":"fn(path: string, uid: number, gid: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_chown_path_uid_gid_callback","!doc":"Asynchronous chown(2). No arguments other than a possible exception are given to the completion callback."},chownSync:{"!type":"fn(path: string, uid: number, gid: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_chownsync_path_uid_gid","!doc":"Synchronous chown(2)."},fchown:{"!type":"fn(fd: number, uid: number, gid: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_fchown_fd_uid_gid_callback","!doc":"Asynchronous fchown(2). No arguments other than a possible exception are given to the completion callback."},fchownSync:{"!type":"fn(fd: number, uid: number, gid: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_fchownsync_fd_uid_gid","!doc":"Synchronous fchown(2)."},lchown:{"!type":"fn(path: string, uid: number, gid: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_lchown_path_uid_gid_callback","!doc":"Asynchronous lchown(2). No arguments other than a possible exception are given to the completion callback."},lchownSync:{"!type":"fn(path: string, uid: number, gid: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_lchownsync_path_uid_gid","!doc":"Synchronous lchown(2)."},chmod:{"!type":"fn(path: string, mode: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback","!doc":"Asynchronous chmod(2). No arguments other than a possible exception are given to the completion callback."},chmodSync:{"!type":"fn(path: string, mode: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_chmodsync_path_mode","!doc":"Synchronous chmod(2)."},fchmod:{"!type":"fn(fd: number, mode: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_fchmod_fd_mode_callback","!doc":"Asynchronous fchmod(2). No arguments other than a possible exception are given to the completion callback."},fchmodSync:{"!type":"fn(fd: number, mode: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_fchmodsync_fd_mode","!doc":"Synchronous fchmod(2)."},lchmod:{"!type":"fn(path: string, mode: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_lchmod_path_mode_callback","!doc":"Asynchronous lchmod(2). No arguments other than a possible exception are given to the completion callback."},lchmodSync:{"!type":"fn(path: string, mode: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_lchmodsync_path_mode","!doc":"Synchronous lchmod(2)."},stat:{"!type":"fn(path: string, callback?: fn(err: +Error, stats: +fs.Stats) -> ?) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_stat_path_callback","!doc":"Asynchronous stat(2). The callback gets two arguments (err, stats) where stats is a fs.Stats object."},lstat:{"!type":"fn(path: string, callback?: fn(err: +Error, stats: +fs.Stats) -> ?) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_lstat_path_callback","!doc":"Asynchronous lstat(2). The callback gets two arguments (err, stats) where stats is a fs.Stats object. lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is stat-ed, not the file that it refers to."},fstat:{"!type":"fn(fd: number, callback?: fn(err: +Error, stats: +fs.Stats) -> ?) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_fstat_fd_callback","!doc":"Asynchronous fstat(2). The callback gets two arguments (err, stats) where stats is a fs.Stats object. fstat() is identical to stat(), except that the file to be stat-ed is specified by the file descriptor fd."},statSync:{"!type":"fn(path: string) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_statsync_path","!doc":"Synchronous stat(2). Returns an instance of fs.Stats."},lstatSync:{"!type":"fn(path: string) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_lstatsync_path","!doc":"Synchronous lstat(2). Returns an instance of fs.Stats."},fstatSync:{"!type":"fn(fd: number) -> +fs.Stats","!url":"http://nodejs.org/api/fs.html#fs_fs_fstatsync_fd","!doc":"Synchronous fstat(2). Returns an instance of fs.Stats."},link:{"!type":"fn(srcpath: string, dstpath: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_link_srcpath_dstpath_callback","!doc":"Asynchronous link(2). No arguments other than a possible exception are given to the completion callback."},linkSync:{"!type":"fn(srcpath: string, dstpath: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_linksync_srcpath_dstpath","!doc":"Synchronous link(2)."},symlink:{"!type":"fn(srcpath: string, dstpath: string, type?: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_symlink_srcpath_dstpath_type_callback","!doc":"Asynchronous symlink(2). No arguments other than a possible exception are given to the completion callback. type argument can be either 'dir', 'file', or 'junction' (default is 'file'). It is only used on Windows (ignored on other platforms). Note that Windows junction points require the destination path to be absolute. When using 'junction', the destination argument will automatically be normalized to absolute path."},symlinkSync:{"!type":"fn(srcpath: string, dstpath: string, type?: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_symlinksync_srcpath_dstpath_type","!doc":"Synchronous symlink(2)."},readlink:{"!type":"fn(path: string, callback?: fn(err: +Error, linkString: string))","!url":"http://nodejs.org/api/fs.html#fs_fs_readlink_path_callback","!doc":"Asynchronous readlink(2). The callback gets two arguments (err, linkString)."},readlinkSync:{"!type":"fn(path: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_readlinksync_path","!doc":"Synchronous readlink(2). Returns the symbolic link's string value."},realpath:{"!type":"fn(path: string, cache: string, callback: fn(err: +Error, resolvedPath: string))","!url":"http://nodejs.org/api/fs.html#fs_fs_realpath_path_cache_callback","!doc":"Asynchronous realpath(2). The callback gets two arguments (err, resolvedPath). May use process.cwd to resolve relative paths. cache is an object literal of mapped paths that can be used to force a specific path resolution or avoid additional fs.stat calls for known real paths."},realpathSync:{"!type":"fn(path: string, cache?: bool) -> string","!url":"http://nodejs.org/api/fs.html#fs_fs_realpathsync_path_cache","!doc":"Synchronous realpath(2). Returns the resolved path."},unlink:{"!type":"fn(path: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_unlink_path_callback","!doc":"Asynchronous unlink(2). No arguments other than a possible exception are given to the completion callback."},unlinkSync:{"!type":"fn(path: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_unlinksync_path","!doc":"Synchronous unlink(2)."},rmdir:{"!type":"fn(path: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_rmdir_path_callback","!doc":"Asynchronous rmdir(2). No arguments other than a possible exception are given to the completion callback."},rmdirSync:{"!type":"fn(path: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_rmdirsync_path","!doc":"Synchronous rmdir(2)."},mkdir:{"!type":"fn(path: string, mode?: ?, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback","!doc":"Asynchronous mkdir(2). No arguments other than a possible exception are given to the completion callback. mode defaults to 0777."},mkdirSync:{"!type":"fn(path: string, mode?: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_mkdirsync_path_mode","!doc":"Synchronous mkdir(2)."},readdir:{"!type":"fn(path: string, callback?: fn(err: +Error, files: [string]))","!url":"http://nodejs.org/api/fs.html#fs_fs_readdir_path_callback","!doc":"Asynchronous readdir(3). Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'."},readdirSync:{"!type":"fn(path: string) -> [string]","!url":"http://nodejs.org/api/fs.html#fs_fs_readdirsync_path","!doc":"Synchronous readdir(3). Returns an array of filenames excluding '.' and '..'."},close:{"!type":"fn(fd: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_close_fd_callback","!doc":"Asynchronous close(2). No arguments other than a possible exception are given to the completion callback."},closeSync:{"!type":"fn(fd: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_closesync_fd","!doc":"Synchronous close(2)."},open:{"!type":"fn(path: string, flags: string, mode?: string, callback?: fn(err: +Error, fd: number))","!url":"http://nodejs.org/api/fs.html#fs_fs_open_path_flags_mode_callback","!doc":"Asynchronous file open."},openSync:{"!type":"fn(path: string, flags: string, mode?: string) -> number","!url":"http://nodejs.org/api/fs.html#fs_fs_opensync_path_flags_mode","!doc":"Synchronous open(2)."},utimes:{"!type":"fn(path: string, atime: number, mtime: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_utimes_path_atime_mtime_callback","!doc":"Change file timestamps of the file referenced by the supplied path."},utimesSync:{"!type":"fn(path: string, atime: number, mtime: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_utimessync_path_atime_mtime","!doc":"Change file timestamps of the file referenced by the supplied path."},futimes:{"!type":"fn(fd: number, atime: number, mtime: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_futimes_fd_atime_mtime_callback","!doc":"Change the file timestamps of a file referenced by the supplied file descriptor."},futimesSync:{"!type":"fn(fd: number, atime: number, mtime: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_futimessync_fd_atime_mtime","!doc":"Change the file timestamps of a file referenced by the supplied file descriptor."},fsync:{"!type":"fn(fd: number, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_fsync_fd_callback","!doc":"Asynchronous fsync(2). No arguments other than a possible exception are given to the completion callback."},fsyncSync:{"!type":"fn(fd: number)","!url":"http://nodejs.org/api/fs.html#fs_fs_fsyncsync_fd","!doc":"Synchronous fsync(2)."},write:{"!type":"fn(fd: number, buffer: +Buffer, offset: number, length: number, position: number, callback?: fn(err: +Error, written: number, buffer: +Buffer))","!url":"http://nodejs.org/api/fs.html#fs_fs_write_fd_buffer_offset_length_position_callback","!doc":"Write buffer to the file specified by fd."},writeSync:{"!type":"fn(fd: number, buffer: +Buffer, offset: number, length: number, position: number) -> number","!url":"http://nodejs.org/api/fs.html#fs_fs_writesync_fd_buffer_offset_length_position","!doc":"Synchronous version of fs.write(). Returns the number of bytes written."},read:{"!type":"fn(fd: number, buffer: +Buffer, offset: number, length: number, position: number, callback?: fn(err: +Error, bytesRead: number, buffer: +Buffer))","!url":"http://nodejs.org/api/fs.html#fs_fs_read_fd_buffer_offset_length_position_callback","!doc":"Read data from the file specified by fd."},readSync:{"!type":"fn(fd: number, buffer: +Buffer, offset: number, length: number, position: number) -> number","!url":"http://nodejs.org/api/fs.html#fs_fs_readsync_fd_buffer_offset_length_position","!doc":"Synchronous version of fs.read. Returns the number of bytesRead."},readFile:{"!type":"fn(filename: string, callback: fn(err: +Error, data: +Buffer))","!url":"http://nodejs.org/api/fs.html#fs_fs_readfile_filename_options_callback","!doc":"Asynchronously reads the entire contents of a file."},readFileSync:{"!type":"fn(filename: string, encoding: string) -> +Buffer","!url":"http://nodejs.org/api/fs.html#fs_fs_readfilesync_filename_options","!doc":"Synchronous version of fs.readFile. Returns the contents of the filename."},writeFile:{"!type":"fn(filename: string, data: +Buffer, encoding?: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_writefile_filename_data_options_callback","!doc":"Asynchronously writes data to a file, replacing the file if it already exists. data can be a string or a buffer."},writeFileSync:{"!type":"fn(filename: string, data: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_writefilesync_filename_data_options","!doc":"The synchronous version of fs.writeFile."},appendFile:{"!type":"fn(filename: string, data: ?, encoding?: string, callback?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_appendfile_filename_data_options_callback","!doc":"Asynchronously append data to a file, creating the file if it not yet exists. data can be a string or a buffer."},appendFileSync:{"!type":"fn(filename: string, data: ?, encoding?: string)","!url":"http://nodejs.org/api/fs.html#fs_fs_appendfilesync_filename_data_options","!doc":"The synchronous version of fs.appendFile."},watchFile:{"!type":"fn(filename: string, options: ?, listener: fn(current: +fs.Stats, prev: +fs.Stats))","!url":"http://nodejs.org/api/fs.html#fs_fs_watchfile_filename_options_listener","!doc":"Watch for changes on filename. The callback listener will be called each time the file is accessed."},unwatchFile:{"!type":"fn(filename: string, listener?: fn())","!url":"http://nodejs.org/api/fs.html#fs_fs_unwatchfile_filename_listener","!doc":"Stop watching for changes on filename. If listener is specified, only that particular listener is removed. Otherwise, all listeners are removed and you have effectively stopped watching filename."},watch:{"!type":"fn(filename: string, options?: ?, listener?: fn(event: string, filename: string)) -> +fs.FSWatcher","!url":"http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener","!doc":"Watch for changes on filename, where filename is either a file or a directory. The returned object is a fs.FSWatcher."},exists:{"!type":"fn(path: string, callback?: fn(exists: bool))","!url":"http://nodejs.org/api/fs.html#fs_fs_exists_path_callback","!doc":"Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false."},existsSync:{"!type":"fn(path: string) -> bool","!url":"http://nodejs.org/api/fs.html#fs_fs_existssync_path","!doc":"Synchronous version of fs.exists."},Stats:{"!type":"fn()",prototype:{isFile:"fn() -> bool",isDirectory:"fn() -> bool",isBlockDevice:"fn() -> bool",isCharacterDevice:"fn() -> bool",isSymbolicLink:"fn() -> bool",isFIFO:"fn() -> bool",isSocket:"fn() -> bool",dev:"number",ino:"number",mode:"number",nlink:"number",uid:"number",gid:"number",rdev:"number",size:"number",blksize:"number",blocks:"number",atime:"+Date",mtime:"+Date",ctime:"+Date"},"!url":"http://nodejs.org/api/fs.html#fs_class_fs_stats","!doc":"Objects returned from fs.stat(), fs.lstat() and fs.fstat() and their synchronous counterparts are of this type."},createReadStream:{"!type":"fn(path: string, options?: ?) -> +stream.Readable","!url":"http://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options","!doc":"Returns a new ReadStream object."},createWriteStream:{"!type":"fn(path: string, options?: ?) -> +stream.Writable","!url":"http://nodejs.org/api/fs.html#fs_fs_createwritestream_path_options","!doc":"Returns a new WriteStream object."},FSWatcher:{"!type":"fn()",prototype:{close:"fn()"},"!url":"http://nodejs.org/api/fs.html#fs_class_fs_fswatcher","!doc":"Objects returned from fs.watch() are of this type."}},path:{normalize:{"!type":"fn(p: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_normalize_p","!doc":"Normalize a string path, taking care of '..' and '.' parts."},join:{"!type":"fn() -> string","!url":"http://nodejs.org/api/path.html#path_path_join_path1_path2","!doc":"Join all arguments together and normalize the resulting path."},resolve:{"!type":"fn(from: string, from2: string, from3: string, from4: string, from5: string, to: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_resolve_from_to","!doc":"Resolves to to an absolute path."},relative:{"!type":"fn(from: string, to: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_relative_from_to","!doc":"Solve the relative path from from to to."},dirname:{"!type":"fn(p: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_dirname_p","!doc":"Return the directory name of a path. Similar to the Unix dirname command."},basename:{"!type":"fn(p: string, ext?: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_basename_p_ext","!doc":"Return the last portion of a path. Similar to the Unix basename command."},extname:{"!type":"fn(p: string) -> string","!url":"http://nodejs.org/api/path.html#path_path_extname_p","!doc":"Return the extension of the path, from the last '.' to end of string in the last portion of the path. If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string."},sep:{"!type":"string","!url":"http://nodejs.org/api/path.html#path_path_sep","!doc":"The platform-specific file separator. '\\\\' or '/'."},delimiter:{"!type":"string","!url":"http://nodejs.org/api/path.html#path_path_delimiter","!doc":"The platform-specific path delimiter, ; or ':'."}},string_decoder:{StringDecoder:{"!type":"fn(encoding?: string)",prototype:{write:{"!type":"fn(buffer: +Buffer) -> string","!url":"http://nodejs.org/api/string_decoder.html#string_decoder_decoder_write_buffer","!doc":"Returns a decoded string."},end:{"!type":"fn()","!url":"http://nodejs.org/api/string_decoder.html#string_decoder_decoder_end","!doc":"Returns any trailing bytes that were left in the buffer."}},"!url":"http://nodejs.org/api/string_decoder.html#string_decoder_class_stringdecoder","!doc":"Accepts a single argument, encoding which defaults to utf8."}},tls:{CLIENT_RENEG_LIMIT:"number",CLIENT_RENEG_WINDOW:"number",SLAB_BUFFER_SIZE:"number",getCiphers:{"!type":"fn() -> [string]","!url":"http://nodejs.org/api/tls.html#tls_tls_getciphers","!doc":"Returns an array with the names of the supported SSL ciphers."},Server:{"!type":"fn()",prototype:{"!proto":"net.Server.prototype",listen:{"!type":"fn(port: number, host?: string, callback?: fn())","!url":"http://nodejs.org/api/tls.html#tls_server_listen_port_host_callback","!doc":"Begin accepting connections on the specified port and host. If the host is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY)."},close:{"!type":"fn()","!url":"http://nodejs.org/api/tls.html#tls_server_close","!doc":"Stops the server from accepting new connections. This function is asynchronous, the server is finally closed when the server emits a 'close' event."},addContext:{"!type":"fn(hostName: string, credentials: tls.Server.credentials)","!url":"http://nodejs.org/api/tls.html#tls_server_addcontext_hostname_credentials","!doc":"Add secure context that will be used if client request's SNI hostname is matching passed hostname (wildcards can be used). credentials can contain key, cert and ca."}},"!url":"http://nodejs.org/api/tls.html#tls_class_tls_server","!doc":"This class is a subclass of net.Server and has the same methods on it. Instead of accepting just raw TCP connections, this accepts encrypted connections using TLS or SSL."},createServer:{"!type":"fn(options?: ?, connectionListener?: fn(stream: +tls.CleartextStream)) -> +tls.Server","!url":"http://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener","!doc":"Creates a new tls.Server. The connectionListener argument is automatically set as a listener for the secureConnection event."},CleartextStream:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",authorized:{"!type":"bool","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_authorized","!doc":"A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false"},authorizationError:{"!type":"+Error","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_authorizationerror","!doc":"The reason why the peer's certificate has not been verified. This property becomes available only when cleartextStream.authorized === false."},getPeerCertificate:{"!type":"fn() -> ?","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_getpeercertificate","!doc":"Returns an object representing the peer's certificate. The returned object has some properties corresponding to the field of the certificate."},getCipher:{"!type":"fn() -> tls.cipher","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_getcipher","!doc":"Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection."},address:{"!type":"net.address","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_address","!doc":"Returns the bound address, the address family name and port of the underlying socket as reported by the operating system. Returns an object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }"},remoteAddress:{"!type":"string","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_remoteaddress","!doc":"The string representation of the remote IP address. For example, '74.125.127.100' or '2001:4860:a005::68'."},remotePort:{"!type":"number","!url":"http://nodejs.org/api/tls.html#tls_cleartextstream_remoteport","!doc":"The numeric representation of the remote port. For example, 443."}},"!url":"http://nodejs.org/api/tls.html#tls_class_tls_cleartextstream","!doc":"This is a stream on top of the Encrypted stream that makes it possible to read/write an encrypted data as a cleartext data."},connect:{"!type":"fn(port: number, host?: string, options: ?, listener: fn()) -> +tls.CleartextStream","!url":"http://nodejs.org/api/tls.html#tls_tls_connect_options_callback","!doc":"Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.)"},createSecurePair:{"!type":"fn(credentials?: crypto.credentials, isServer?: bool, requestCert?: bool, rejectUnauthorized?: bool) -> +tls.SecurePair","!url":"http://nodejs.org/api/tls.html#tls_tls_createsecurepair_credentials_isserver_requestcert_rejectunauthorized","!doc":"Creates a new secure pair object with two streams, one of which reads/writes encrypted data, and one reads/writes cleartext data. Generally the encrypted one is piped to/from an incoming encrypted data stream, and the cleartext one is used as a replacement for the initial encrypted stream."},SecurePair:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",cleartext:{"!type":"+tls.CleartextStream","!url":"http://nodejs.org/api/tls.html#tls_class_securepair","!doc":"Returned by tls.createSecurePair."},encrypted:{"!type":"+stream.Duplex","!url":"http://nodejs.org/api/tls.html#tls_class_securepair","!doc":"Returned by tls.createSecurePair."}},"!url":"http://nodejs.org/api/tls.html#tls_class_securepair","!doc":"Returned by tls.createSecurePair."}},crypto:{getCiphers:{"!type":"fn() -> [string]","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_getciphers","!doc":"Returns an array with the names of the supported ciphers."},getHashes:{"!type":"fn() -> [string]","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_gethashes","!doc":"Returns an array with the names of the supported hash algorithms."},createCredentials:{"!type":"fn(details?: ?) -> crypto.credentials","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createcredentials_details","!doc":"Creates a credentials object."},createHash:{"!type":"fn(algorithm: string) -> +crypto.Hash","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm","!doc":"Creates and returns a hash object, a cryptographic hash with the given algorithm which can be used to generate hash digests."},Hash:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",update:{"!type":"fn(data: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/crypto.html#crypto_hash_update_data_input_encoding","!doc":"Updates the hash content with the given data, the encoding of which is given in input_encoding and can be 'utf8', 'ascii' or 'binary'. If no encoding is provided, then a buffer is expected."},digest:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_hash_digest_encoding","!doc":"Calculates the digest of all of the passed data to be hashed. The encoding can be 'hex', 'binary' or 'base64'. If no encoding is provided, then a buffer is returned."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_hash","!doc":"The class for creating hash digests of data."},createHmac:{"!type":"fn(algorithm: string, key: string) -> +crypto.Hmac","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createhmac_algorithm_key","!doc":"Creates and returns a hmac object, a cryptographic hmac with the given algorithm and key."},Hmac:{"!type":"fn()",prototype:{update:{"!type":"fn(data: +Buffer)","!url":"http://nodejs.org/api/crypto.html#crypto_hmac_update_data","!doc":"Update the hmac content with the given data. This can be called many times with new data as it is streamed."},digest:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_hmac_digest_encoding","!doc":"Calculates the digest of all of the passed data to the hmac. The encoding can be 'hex', 'binary' or 'base64'. If no encoding is provided, then a buffer is returned."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_hmac","!doc":"Class for creating cryptographic hmac content."},createCipher:{"!type":"fn(algorithm: string, password: string) -> +crypto.Cipher","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createcipher_algorithm_password","!doc":"Creates and returns a cipher object, with the given algorithm and password."},createCipheriv:{"!type":"fn(algorithm: string, password: string, iv: string) -> +crypto.Cipher","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv","!doc":"Creates and returns a cipher object, with the given algorithm, key and iv."},Cipher:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",update:{"!type":"fn(data: +Buffer, input_encoding?: string, output_encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_cipher_update_data_input_encoding_output_encoding","!doc":"Updates the cipher with data, the encoding of which is given in input_encoding and can be 'utf8', 'ascii' or 'binary'. If no encoding is provided, then a buffer is expected."},"final":{"!type":"fn(output_encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_cipher_final_output_encoding","!doc":"Returns any remaining enciphered contents, with output_encoding being one of: 'binary', 'base64' or 'hex'. If no encoding is provided, then a buffer is returned."},setAutoPadding:{"!type":"fn(auto_padding: bool)","!url":"http://nodejs.org/api/crypto.html#crypto_cipher_setautopadding_auto_padding_true","!doc":"You can disable automatic padding of the input data to block size. If auto_padding is false, the length of the entire input data must be a multiple of the cipher's block size or final will fail. Useful for non-standard padding, e.g. using 0x0 instead of PKCS padding. You must call this before cipher.final."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_cipher","!doc":"Class for encrypting data."},createDecipher:{"!type":"fn(algorithm: string, password: string) -> +crypto.Decipher","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createdecipher_algorithm_password","!doc":"Creates and returns a decipher object, with the given algorithm and key. This is the mirror of the createCipher() above."},createDecipheriv:{"!type":"fn(algorithm: string, key: string, iv: string) -> +crypto.Decipher","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv","!doc":"Creates and returns a decipher object, with the given algorithm, key and iv. This is the mirror of the createCipheriv() above."},Decipher:{"!type":"fn()",prototype:{"!proto":"stream.Duplex.prototype",update:{"!type":"fn(data: +Buffer, input_encoding?: string, output_encoding?: string)","!url":"http://nodejs.org/api/crypto.html#crypto_decipher_update_data_input_encoding_output_encoding","!doc":"Updates the decipher with data, which is encoded in 'binary', 'base64' or 'hex'. If no encoding is provided, then a buffer is expected."},"final":{"!type":"fn(output_encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_decipher_final_output_encoding","!doc":"Returns any remaining plaintext which is deciphered, with output_encoding being one of: 'binary', 'ascii' or 'utf8'. If no encoding is provided, then a buffer is returned."},setAutoPadding:{"!type":"fn(auto_padding: bool)","!url":"http://nodejs.org/api/crypto.html#crypto_decipher_setautopadding_auto_padding_true","!doc":"You can disable auto padding if the data has been encrypted without standard block padding to prevent decipher.final from checking and removing it. Can only work if the input data's length is a multiple of the ciphers block size. You must call this before streaming data to decipher.update."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_decipher","!doc":"Class for decrypting data."},createSign:{"!type":"fn(algorithm: string) -> +crypto.Sign","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createsign_algorithm","!doc":"Creates and returns a signing object, with the given algorithm. On recent OpenSSL releases, openssl list-public-key-algorithms will display the available signing algorithms. Examples are 'RSA-SHA256'."},Sign:{"!type":"fn()",prototype:{"!proto":"stream.Writable.prototype",update:{"!type":"fn(data: +Buffer)","!url":"http://nodejs.org/api/crypto.html#crypto_sign_update_data","!doc":"Updates the sign object with data. This can be called many times with new data as it is streamed."},sign:{"!type":"fn(private_key: string, output_format: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format","!doc":"Calculates the signature on all the updated data passed through the sign. private_key is a string containing the PEM encoded private key for signing."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_sign","!doc":"Class for generating signatures."},createVerify:{"!type":"fn(algorith: string) -> +crypto.Verify","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_createverify_algorithm","!doc":"Creates and returns a verification object, with the given algorithm. This is the mirror of the signing object above."},Verify:{"!type":"fn()",prototype:{"!proto":"stream.Writable.prototype",update:{"!type":"fn(data: +Buffer)","!url":"http://nodejs.org/api/crypto.html#crypto_verifier_update_data","!doc":"Updates the verifier object with data. This can be called many times with new data as it is streamed."},verify:{"!type":"fn(object: string, signature: string, signature_format?: string) -> bool","!url":"http://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format","!doc":"Verifies the signed data by using the object and signature. object is a string containing a PEM encoded object, which can be one of RSA public key, DSA public key, or X.509 certificate. signature is the previously calculated signature for the data, in the signature_format which can be 'binary', 'hex' or 'base64'. If no encoding is specified, then a buffer is expected."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_verify","!doc":"Class for verifying signatures."},createDiffieHellman:{"!type":"fn(prime: number, encoding?: string) -> +crypto.DiffieHellman","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_creatediffiehellman_prime_length","!doc":"Creates a Diffie-Hellman key exchange object and generates a prime of the given bit length. The generator used is 2."},DiffieHellman:{"!type":"fn()",prototype:{generateKeys:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_generatekeys_encoding","!doc":"Generates private and public Diffie-Hellman key values, and returns the public key in the specified encoding. This key should be transferred to the other party. Encoding can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},computeSecret:{"!type":"fn(other_public_key: +Buffer, input_encoding?: string, output_encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_computesecret_other_public_key_input_encoding_output_encoding","!doc":"Computes the shared secret using other_public_key as the other party's public key and returns the computed shared secret. Supplied key is interpreted using specified input_encoding, and secret is encoded using specified output_encoding. Encodings can be 'binary', 'hex', or 'base64'. If the input encoding is not provided, then a buffer is expected."},getPrime:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_getprime_encoding","!doc":"Returns the Diffie-Hellman prime in the specified encoding, which can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},getGenerator:{"!type":"fn(encoding: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_getgenerator_encoding","!doc":"Returns the Diffie-Hellman prime in the specified encoding, which can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},getPublicKey:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_getpublickey_encoding","!doc":"Returns the Diffie-Hellman public key in the specified encoding, which can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},getPrivateKey:{"!type":"fn(encoding?: string) -> +Buffer","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_getprivatekey_encoding","!doc":"Returns the Diffie-Hellman private key in the specified encoding, which can be 'binary', 'hex', or 'base64'. If no encoding is provided, then a buffer is returned."},setPublicKey:{"!type":"fn(public_key: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_setpublickey_public_key_encoding","!doc":"Sets the Diffie-Hellman public key. Key encoding can be 'binary', 'hex' or 'base64'. If no encoding is provided, then a buffer is expected."},setPrivateKey:{"!type":"fn(public_key: +Buffer, encoding?: string)","!url":"http://nodejs.org/api/crypto.html#crypto_diffiehellman_setprivatekey_private_key_encoding","!doc":"Sets the Diffie-Hellman private key. Key encoding can be 'binary', 'hex' or 'base64'. If no encoding is provided, then a buffer is expected."}},"!url":"http://nodejs.org/api/crypto.html#crypto_class_diffiehellman","!doc":"The class for creating Diffie-Hellman key exchanges."},getDiffieHellman:{"!type":"fn(group_name: string) -> +crypto.DiffieHellman","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_getdiffiehellman_group_name","!doc":"Creates a predefined Diffie-Hellman key exchange object. The supported groups are: 'modp1', 'modp2', 'modp5' (defined in RFC 2412) and 'modp14', 'modp15', 'modp16', 'modp17', 'modp18' (defined in RFC 3526). The returned object mimics the interface of objects created by crypto.createDiffieHellman() above, but will not allow to change the keys (with diffieHellman.setPublicKey() for example). The advantage of using this routine is that the parties don't have to generate nor exchange group modulus beforehand, saving both processor and communication time."},pbkdf2:{"!type":"fn(password: string, salt: string, iterations: number, keylen: number, callback: fn(err: +Error, derivedKey: string))","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_callback","!doc":"Asynchronous PBKDF2 applies pseudorandom function HMAC-SHA1 to derive a key of given length from the given password, salt and iterations. The callback gets two arguments (err, derivedKey)."},pbkdf2Sync:{"!type":"fn(password: string, salt: string, iterations: number, keylen: number) -> string","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen","!doc":"Synchronous PBKDF2 function. Returns derivedKey or throws error."},randomBytes:{"!type":"fn(size: number, callback?: fn(err: +Error, buf: +Buffer))","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback","!doc":"Generates cryptographically strong pseudo-random data."},pseudoRandomBytes:{"!type":"fn(size: number, callback?: fn(err: +Error, buf: +Buffer))","!url":"http://nodejs.org/api/crypto.html#crypto_crypto_pseudorandombytes_size_callback","!doc":"Generates non-cryptographically strong pseudo-random data. The data returned will be unique if it is sufficiently long, but is not necessarily unpredictable. For this reason, the output of this function should never be used where unpredictability is important, such as in the generation of encryption keys."},DEFAULT_ENCODING:"string"},util:{format:{"!type":"fn(format: string) -> string","!url":"http://nodejs.org/api/util.html#util_util_format_format","!doc":"Returns a formatted string using the first argument as a printf-like format."},debug:{"!type":"fn(msg: string)","!url":"http://nodejs.org/api/util.html#util_util_debug_string","!doc":"A synchronous output function. Will block the process and output string immediately to stderr."},error:{"!type":"fn(msg: string)","!url":"http://nodejs.org/api/util.html#util_util_error","!doc":"Same as util.debug() except this will output all arguments immediately to stderr."},puts:{"!type":"fn(data: string)","!url":"http://nodejs.org/api/util.html#util_util_puts","!doc":"A synchronous output function. Will block the process and output all arguments to stdout with newlines after each argument."},print:{"!type":"fn(data: string)","!url":"http://nodejs.org/api/util.html#util_util_print","!doc":"A synchronous output function. Will block the process, cast each argument to a string then output to stdout. Does not place newlines after each argument."},log:{"!type":"fn(string: string)","!url":"http://nodejs.org/api/util.html#util_util_log_string","!doc":"Output with timestamp on stdout."},inspect:{"!type":"fn(object: ?, options: ?) -> string","!url":"http://nodejs.org/api/util.html#util_util_inspect_object_options","!doc":"Return a string representation of object, which is useful for debugging."},isArray:{"!type":"fn(object: ?) -> bool","!url":"http://nodejs.org/api/util.html#util_util_isarray_object","!doc":'Returns true if the given "object" is an Array. false otherwise.'},isRegExp:{"!type":"fn(object: ?) -> bool","!url":"http://nodejs.org/api/util.html#util_util_isregexp_object","!doc":'Returns true if the given "object" is a RegExp. false otherwise.'},isDate:{"!type":"fn(object: ?) -> bool","!url":"http://nodejs.org/api/util.html#util_util_isdate_object","!doc":'Returns true if the given "object" is a Date. false otherwise.'},isError:{"!type":"fn(object: ?) -> bool","!url":"http://nodejs.org/api/util.html#util_util_iserror_object","!doc":'Returns true if the given "object" is an Error. false otherwise.'},inherits:{"!type":"fn(constructor: ?, superConstructor: ?)","!url":"http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor","!doc":"Inherit the prototype methods from one constructor into another. The prototype of constructor will be set to a new object created from superConstructor."}},assert:{"!type":"fn(value: ?, message?: string)",fail:{"!type":"fn(actual: ?, expected: ?, message: string, operator: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_fail_actual_expected_message_operator","!doc":"Throws an exception that displays the values for actual and expected separated by the provided operator."},ok:{"!type":"fn(value: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert","!doc":"This module is used for writing unit tests for your applications, you can access it with require('assert')."},equal:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_equal_actual_expected_message","!doc":"Tests shallow, coercive equality with the equal comparison operator ( == )."},notEqual:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_notequal_actual_expected_message","!doc":"Tests shallow, coercive non-equality with the not equal comparison operator ( != )."},deepEqual:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_deepequal_actual_expected_message","!doc":"Tests for deep equality."},notDeepEqual:{"!type":"fn(acutal: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_notdeepequal_actual_expected_message","!doc":"Tests for any deep inequality."},strictEqual:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_strictequal_actual_expected_message","!doc":"Tests strict equality, as determined by the strict equality operator ( === )"},notStrictEqual:{"!type":"fn(actual: ?, expected: ?, message?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_notstrictequal_actual_expected_message","!doc":"Tests strict non-equality, as determined by the strict not equal operator ( !== )"},"throws":{"!type":"fn(block: fn(), error?: ?, messsage?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_throws_block_error_message","!doc":"Expects block to throw an error. error can be constructor, regexp or validation function."},doesNotThrow:{"!type":"fn(block: fn(), error?: ?, messsage?: string)","!url":"http://nodejs.org/api/assert.html#assert_assert_doesnotthrow_block_message","!doc":"Expects block not to throw an error."},ifError:{"!type":"fn(value: ?)","!url":"http://nodejs.org/api/assert.html#assert_assert_iferror_value","!doc":"Tests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks."},"!url":"http://nodejs.org/api/assert.html#assert_assert","!doc":"This module is used for writing unit tests for your applications, you can access it with require('assert')."},tty:{isatty:{"!type":"fn(fd: number) -> bool","!url":"http://nodejs.org/api/tty.html#tty_tty_isatty_fd","!doc":"Returns true or false depending on if the fd is associated with a terminal."}},domain:{create:{"!type":"fn() -> +events.EventEmitter","!url":"http://nodejs.org/api/domain.html#domain_domain_create","!doc":"Returns a new Domain object."},Domain:{"!type":"fn()",prototype:{"!proto":"events.EventEmitter.prototype",run:{"!type":"fn(fn: fn())","!url":"http://nodejs.org/api/domain.html#domain_domain_run_fn","!doc":"Run the supplied function in the context of the domain, implicitly binding all event emitters, timers, and lowlevel requests that are created in that context."},members:{"!type":"[+events.EventEmitter]","!url":"http://nodejs.org/api/domain.html#domain_domain_members","!doc":"An array of timers and event emitters that have been explicitly added to the domain."},add:{"!type":"fn(emitter: +events.EventEmitter)","!url":"http://nodejs.org/api/domain.html#domain_domain_add_emitter","!doc":"Explicitly adds an emitter to the domain. If any event handlers called by the emitter throw an error, or if the emitter emits an error event, it will be routed to the domain's error event, just like with implicit binding."},remove:{"!type":"fn(emitter: +events.EventEmitter)","!url":"http://nodejs.org/api/domain.html#domain_domain_remove_emitter","!doc":"The opposite of domain.add(emitter). Removes domain handling from the specified emitter."},bind:{"!type":"fn(callback: fn(err: +Error, data: ?)) -> !0","!url":"http://nodejs.org/api/domain.html#domain_domain_bind_callback","!doc":"The returned function will be a wrapper around the supplied callback function. When the returned function is called, any errors that are thrown will be routed to the domain's error event."},intercept:{"!type":"fn(cb: fn(data: ?)) -> !0","!url":"http://nodejs.org/api/domain.html#domain_domain_intercept_callback","!doc":"This method is almost identical to domain.bind(callback). However, in addition to catching thrown errors, it will also intercept Error objects sent as the first argument to the function."},dispose:{"!type":"fn()","!url":"http://nodejs.org/api/domain.html#domain_domain_dispose","!doc":"The dispose method destroys a domain, and makes a best effort attempt to clean up any and all IO that is associated with the domain. Streams are aborted, ended, closed, and/or destroyed. Timers are cleared. Explicitly bound callbacks are no longer called. Any error events that are raised as a result of this are ignored."}},"!url":"http://nodejs.org/api/domain.html#domain_class_domain","!doc":"The Domain class encapsulates the functionality of routing errors and uncaught exceptions to the active Domain object."}},"os.cpuSpec":{model:"string",speed:"number",times:{user:"number",nice:"number",sys:"number",idle:"number",irq:"number"}},"process.memoryUsage.type":{rss:"number",heapTotal:"?",number:"?",heapUsed:"number"},"net.address":{port:"number",family:"string",address:"string"},"url.type":{href:"string",protocol:"string",auth:"string",hostname:"string",port:"string",host:"string",pathname:"string",search:"string",query:"string",slashes:"bool",hash:"string"},"tls.Server.credentials":{key:"string",cert:"string",ca:"string"},"tls.cipher":{name:"string",version:"string"},"crypto.credentials":{pfx:"string",key:"string",passphrase:"string",cert:"string",ca:"string",crl:"string",ciphers:"string"},buffer:{Buffer:"Buffer",INSPECT_MAX_BYTES:"number",SlowBuffer:"Buffer"},module:{},timers:{setTimeout:{"!type":"fn(callback: fn(), ms: number) -> timers.Timer","!url":"http://nodejs.org/api/globals.html#globals_settimeout_cb_ms","!doc":"Run callback cb after at least ms milliseconds. The actual delay depends on external factors like OS timer granularity and system load."},clearTimeout:{"!type":"fn(id: timers.Timer)","!url":"http://nodejs.org/api/globals.html#globals_cleartimeout_t","!doc":"Stop a timer that was previously created with setTimeout(). The callback will not execute."},setInterval:{"!type":"fn(callback: fn(), ms: number) -> timers.Timer","!url":"http://nodejs.org/api/globals.html#globals_setinterval_cb_ms","!doc":"Run callback cb repeatedly every ms milliseconds. Note that the actual interval may vary, depending on external factors like OS timer granularity and system load. It's never less than ms but it may be longer."},clearInterval:{"!type":"fn(id: timers.Timer)","!url":"http://nodejs.org/api/globals.html#globals_clearinterval_t","!doc":"Stop a timer that was previously created with setInterval(). The callback will not execute."},setImmediate:{"!type":"fn(callback: fn()) -> timers.Timer","!url":"http://nodejs.org/api/timers.html#timers_setimmediate_callback_arg","!doc":"Schedule the 'immediate' execution of callback after I/O events callbacks."},clearImmediate:{"!type":"fn(id: timers.Timer)","!url":"http://nodejs.org/api/timers.html#timers_clearimmediate_immediateid","!doc":"Stops an immediate from triggering."},Timer:{unref:{"!type":"fn()","!url":"http://nodejs.org/api/timers.html#timers_unref","!doc":"Create a timer that is active but if it is the only item left in the event loop won't keep the program running."},ref:{"!type":"fn()","!url":"http://nodejs.org/api/timers.html#timers_unref","!doc":"Explicitly request the timer hold the program open (cancel the effect of 'unref')."}}}},process:{stdout:{"!type":"+stream.Writable","!url":"http://nodejs.org/api/process.html#process_process_stdout","!doc":"A Writable Stream to stdout."},stderr:{"!type":"+stream.Writable","!url":"http://nodejs.org/api/process.html#process_process_stderr","!doc":"A writable stream to stderr."},stdin:{"!type":"+stream.Readable","!url":"http://nodejs.org/api/process.html#process_process_stdin","!doc":"A Readable Stream for stdin. The stdin stream is paused by default, so one must call process.stdin.resume() to read from it."},argv:{"!type":"[string]","!url":"http://nodejs.org/api/process.html#process_process_argv","!doc":"An array containing the command line arguments. The first element will be 'node', the second element will be the name of the JavaScript file. The next elements will be any additional command line arguments."},execPath:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_execpath","!doc":"This is the absolute pathname of the executable that started the process."},abort:{"!type":"fn()","!url":"http://nodejs.org/api/process.html#process_process_abort","!doc":"This causes node to emit an abort. This will cause node to exit and generate a core file."},chdir:{"!type":"fn(directory: string)","!url":"http://nodejs.org/api/process.html#process_process_chdir_directory","!doc":"Changes the current working directory of the process or throws an exception if that fails."},cwd:{"!type":"fn()","!url":"http://nodejs.org/api/process.html#process_process_cwd","!doc":"Returns the current working directory of the process."},env:{"!url":"http://nodejs.org/api/process.html#process_process_env","!doc":"An object containing the user environment."},exit:{"!type":"fn(code?: number)","!url":"http://nodejs.org/api/process.html#process_process_exit_code","!doc":"Ends the process with the specified code. If omitted, exit uses the 'success' code 0."},getgid:{"!type":"fn() -> number","!url":"http://nodejs.org/api/process.html#process_process_getgid","!doc":"Gets the group identity of the process. This is the numerical group id, not the group name."},setgid:{"!type":"fn(id: number)","!url":"http://nodejs.org/api/process.html#process_process_setgid_id","!doc":"Sets the group identity of the process. This accepts either a numerical ID or a groupname string. If a groupname is specified, this method blocks while resolving it to a numerical ID."},getuid:{"!type":"fn() -> number","!url":"http://nodejs.org/api/process.html#process_process_getuid","!doc":"Gets the user identity of the process. This is the numerical userid, not the username."},setuid:{"!type":"fn(id: number)","!url":"http://nodejs.org/api/process.html#process_process_setuid_id","!doc":"Sets the user identity of the process. This accepts either a numerical ID or a username string. If a username is specified, this method blocks while resolving it to a numerical ID."},version:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_version","!doc":"A compiled-in property that exposes NODE_VERSION."},versions:{http_parser:"string",node:"string",v8:"string",ares:"string",uv:"string",zlib:"string",openssl:"string","!url":"http://nodejs.org/api/process.html#process_process_versions","!doc":"A property exposing version strings of node and its dependencies."},config:{target_defaults:{cflags:"[?]",default_configuration:"string",defines:"[string]",include_dirs:"[string]",libraries:"[string]"},variables:{clang:"number",host_arch:"string",node_install_npm:"bool",node_install_waf:"bool",node_prefix:"string",node_shared_openssl:"bool",node_shared_v8:"bool",node_shared_zlib:"bool",node_use_dtrace:"bool",node_use_etw:"bool",node_use_openssl:"bool",target_arch:"string",v8_no_strict_aliasing:"number",v8_use_snapshot:"bool",visibility:"string"},"!url":"http://nodejs.org/api/process.html#process_process_config","!doc":'An Object containing the JavaScript representation of the configure options that were used to compile the current node executable. This is the same as the "config.gypi" file that was produced when running the ./configure script.'},kill:{"!type":"fn(pid: number, signal?: string)","!url":"http://nodejs.org/api/process.html#process_process_kill_pid_signal","!doc":"Send a signal to a process. pid is the process id and signal is the string describing the signal to send. Signal names are strings like 'SIGINT' or 'SIGUSR1'. If omitted, the signal will be 'SIGTERM'."},pid:{"!type":"number","!url":"http://nodejs.org/api/process.html#process_process_pid","!doc":"The PID of the process."},title:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_title","!doc":"Getter/setter to set what is displayed in 'ps'."},arch:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_arch","!doc":"What processor architecture you're running on: 'arm', 'ia32', or 'x64'."},platform:{"!type":"string","!url":"http://nodejs.org/api/process.html#process_process_platform","!doc":"What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'"},memoryUsage:{"!type":"fn() -> process.memoryUsage.type","!url":"http://nodejs.org/api/process.html#process_process_memoryusage","!doc":"Returns an object describing the memory usage of the Node process measured in bytes."},nextTick:{"!type":"fn(callback: fn())","!url":"http://nodejs.org/api/process.html#process_process_nexttick_callback","!doc":"On the next loop around the event loop call this callback. This is not a simple alias to setTimeout(fn, 0), it's much more efficient. It typically runs before any other I/O events fire, but there are some exceptions."},maxTickDepth:{"!type":"number","!url":"http://nodejs.org/api/process.html#process_process_maxtickdepth","!doc":"The maximum depth of nextTick-calling nextTick-callbacks that will be evaluated before allowing other forms of I/O to occur."},umask:{"!type":"fn(mask?: number) -> number","!url":"http://nodejs.org/api/process.html#process_process_umask_mask","!doc":"Sets or reads the process's file mode creation mask. Child processes inherit the mask from the parent process. Returns the old mask if mask argument is given, otherwise returns the current mask."},uptime:{"!type":"fn() -> number","!url":"http://nodejs.org/api/process.html#process_process_uptime","!doc":"Number of seconds Node has been running."},hrtime:{"!type":"fn() -> [number]","!url":"http://nodejs.org/api/process.html#process_process_hrtime","!doc":"Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array. It is relative to an arbitrary time in the past. It is not related to the time of day and therefore not subject to clock drift. The primary use is for measuring performance between intervals."},"!url":"http://nodejs.org/api/globals.html#globals_process","!doc":"The process object."},global:{"!type":"","!url":"http://nodejs.org/api/globals.html#globals_global","!doc":"In browsers, the top-level scope is the global scope. That means that in browsers if you're in the global scope var something will define a global variable. In Node this is different. The top-level scope is not the global scope; var something inside a Node module will be local to that module."},console:{log:{"!type":"fn(text: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_log_data","!doc":"Prints to stdout with newline. This function can take multiple arguments in a printf()-like way."},info:{"!type":"fn(text: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_info_data","!doc":"Same as console.log."},error:{"!type":"fn(text: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_error_data","!doc":"Same as console.log but prints to stderr."},warn:{"!type":"fn(text: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_warn_data","!doc":"Same as console.error."},dir:{"!type":"fn(obj: ?)","!url":"http://nodejs.org/api/stdio.html#stdio_console_dir_obj","!doc":"Uses util.inspect on obj and prints resulting string to stdout."},time:{"!type":"fn(label: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_time_label","!doc":"Mark a time."},timeEnd:{"!type":"fn(label: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_timeend_label","!doc":"Finish timer, record output."},trace:{"!type":"fn(label: string)","!url":"http://nodejs.org/api/stdio.html#stdio_console_trace_label","!doc":"Print a stack trace to stderr of the current position."},assert:{"!type":"fn(expression: bool)","!url":"http://nodejs.org/api/stdio.html#stdio_console_assert_expression_message","!doc":"Same as assert.ok() where if the expression evaluates as false throw an AssertionError with message."},"!url":"http://nodejs.org/api/globals.html#globals_console","!doc":"Used to print to stdout and stderr."},__filename:{"!type":"string","!url":"http://nodejs.org/api/globals.html#globals_filename","!doc":"The filename of the code being executed. This is the resolved absolute path of this code file. For a main program this is not necessarily the same filename used in the command line. The value inside a module is the path to that module file."},__dirname:{"!type":"string","!url":"http://nodejs.org/api/globals.html#globals_dirname","!doc":"The name of the directory that the currently executing script resides in."},setTimeout:"timers.setTimeout",clearTimeout:"timers.clearTimeout",setInterval:"timers.setInterval",clearInterval:"timers.clearInterval",module:{"!type":"+Module","!url":"http://nodejs.org/api/globals.html#globals_module","!doc":"A reference to the current module. In particular module.exports is the same as the exports object. module isn't actually a global but rather local to each module."},Buffer:{"!type":"fn(str: string, encoding?: string) -> +Buffer",prototype:{"!proto":"String.prototype",write:"fn(string: string, offset?: number, length?: number, encoding?: string) -> number",toString:"fn(encoding?: string, start?: number, end?: number) -> string",length:"number",copy:"fn(targetBuffer: +Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number)",slice:"fn(start?: number, end?: number) -> +Buffer",readUInt8:"fn(offset: number, noAssert?: bool) -> number",readUInt16LE:"fn(offset: number, noAssert?: bool) -> number",readUInt16BE:"fn(offset: number, noAssert?: bool) -> number",readUInt32LE:"fn(offset: number, noAssert?: bool) -> number",readUInt32BE:"fn(offset: number, noAssert?: bool) -> number",readInt8:"fn(offset: number, noAssert?: bool) -> number",readInt16LE:"fn(offset: number, noAssert?: bool) -> number",readInt16BE:"fn(offset: number, noAssert?: bool) -> number",readInt32LE:"fn(offset: number, noAssert?: bool) -> number",readInt32BE:"fn(offset: number, noAssert?: bool) -> number",readFloatLE:"fn(offset: number, noAssert?: bool) -> number",readFloatBE:"fn(offset: number, noAssert?: bool) -> number",readDoubleLE:"fn(offset: number, noAssert?: bool) -> number",readDoubleBE:"fn(offset: number, noAssert?: bool) -> number",writeUInt8:"fn(value: number, offset: number, noAssert?: bool)",writeUInt16LE:"fn(value: number, offset: number, noAssert?: bool)",writeUInt16BE:"fn(value: number, offset: number, noAssert?: bool)",writeUInt32LE:"fn(value: number, offset: number, noAssert?: bool)",writeUInt32BE:"fn(value: number, offset: number, noAssert?: bool)",writeInt8:"fn(value: number, offset: number, noAssert?: bool)",writeInt16LE:"fn(value: number, offset: number, noAssert?: bool)",writeInt16BE:"fn(value: number, offset: number, noAssert?: bool)",writeInt32LE:"fn(value: number, offset: number, noAssert?: bool)",writeInt32BE:"fn(value: number, offset: number, noAssert?: bool)",writeFloatLE:"fn(value: number, offset: number, noAssert?: bool)",writeFloatBE:"fn(value: number, offset: number, noAssert?: bool)",writeDoubleLE:"fn(value: number, offset: number, noAssert?: bool)",writeDoubleBE:"fn(value: number, offset: number, noAssert?: bool)",fill:"fn(value: ?, offset?: number, end?: number)"},isBuffer:"fn(obj: ?) -> bool",byteLength:"fn(string: string, encoding?: string) -> number",concat:"fn(list: [+Buffer], totalLength?: number) -> +Buffer","!url":"http://nodejs.org/api/globals.html#globals_class_buffer","!doc":"Used to handle binary data."}} +}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionPostgres",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,r){function n(n,s,a,i){var l=t.resolvePos(n,a),c=e.findExpressionAround(n.ast,null,l,n.scope),p=r.getTemplatesForNode(o,c);if(p&&p.length>0)for(var d=0;d Query",copyFrom:"fn(queryText: string) -> stream.Writable",copyTo:"fn(queryText: string) -> stream.Readable",pauseDrain:"fn()",resumeDrain:"fn()",on:"fn(event: string, listener: fn()) -> Client"}},Query:{prototype:{on:"fn(event: string, listener: fn(row: ?, result?: ResultBuilder)) -> Query"}},Events:{prototype:{on:"fn(event: string, listener: fn(err: Error, client: Client)) -> Events"}}},"!name":"pg","!define":{"!node":{pg:{connect:"fn(connection: string, callback: fn(err: Error, client: Client, done: fn()))",end:"fn()",Client:"pg.Client"}}}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern"),require):"function"==typeof define&&define.amd?define("tern/plugin/orionRedis",["../lib/infer","../lib/tern","./resolver"],e):void e(infer,tern,resolver)}(function(e,t,r){function n(n,s,a,i){var l=t.resolvePos(n,a),c=e.findExpressionAround(n.ast,null,l,n.scope),p=r.getTemplatesForNode(o,c);if(p&&p.length>0)for(var d=0;d RedisClient",print:"fn(err: Error, reply: ?)",debug_mode:"bool",ClientOpts:"redis.ClientOpts"}}},ClientOpts:{parser:"string",return_buffers:"bool",detect_buffers:"bool",socket_nodelay:"bool",no_ready_check:"bool",enable_offline_queue:"bool",retry_max_delay:"number",connect_timeout:"number",max_attempts:"number",auth_pass:"string"},RedisClient:{connected:"bool",retry_delay:"number",retry_backoff:"number",command_queue:"[?]",offline_queue:"[?]",server_info:"ServerInfo",end:"fn()",auth:"fn(password: string, callback?: ?)",ping:"fn(callback?: ?)",append:"fn(key: string, value: string, callback?: ?)",bitcount:"fn(key: string, callback?: ?)",set:"fn(key: string, value: string, callback?: ?)",get:"fn(key: string, callback?: ?)",exists:"fn(key: string, value: string, callback?: ?)",publish:"fn(channel: string, value: ?)",subscribe:"fn(channel: string)",setnx:"fn(args: [?], callback?: ?)",setex:"fn(args: [?], callback?: ?)",strlen:"fn(args: [?], callback?: ?)",del:"fn(args: [?], callback?: ?)",setbit:"fn(args: [?], callback?: ?)",getbit:"fn(args: [?], callback?: ?)",setrange:"fn(args: [?], callback?: ?)",getrange:"fn(args: [?], callback?: ?)",substr:"fn(args: [?], callback?: ?)",incr:"fn(args: [?], callback?: ?)",decr:"fn(args: [?], callback?: ?)",mget:"fn(args: [?], callback?: ?)",rpush:"fn(args: [?])",lpush:"fn(args: [?], callback?: ?)",rpushx:"fn(args: [?], callback?: ?)",lpushx:"fn(args: [?], callback?: ?)",linsert:"fn(args: [?], callback?: ?)",rpop:"fn(args: [?], callback?: ?)",lpop:"fn(args: [?], callback?: ?)",brpop:"fn(args: [?], callback?: ?)",brpoplpush:"fn(args: [?], callback?: ?)",blpop:"fn(args: [?], callback?: ?)",llen:"fn(args: [?], callback?: ?)",lindex:"fn(args: [?], callback?: ?)",lset:"fn(args: [?], callback?: ?)",lrange:"fn(args: [?], callback?: ?)",ltrim:"fn(args: [?], callback?: ?)",lrem:"fn(args: [?], callback?: ?)",rpoplpush:"fn(args: [?], callback?: ?)",sadd:"fn(args: [?], callback?: ?)",srem:"fn(args: [?], callback?: ?)",smove:"fn(args: [?], callback?: ?)",sismember:"fn(args: [?], callback?: ?)",scard:"fn(args: [?], callback?: ?)",spop:"fn(args: [?], callback?: ?)",srandmember:"fn(args: [?], callback?: ?)",sinter:"fn(args: [?], callback?: ?)",sinterstore:"fn(args: [?], callback?: ?)",sunion:"fn(args: [?], callback?: ?)",sunionstore:"fn(args: [?], callback?: ?)",sdiff:"fn(args: [?], callback?: ?)",sdiffstore:"fn(args: [?], callback?: ?)",smembers:"fn(args: [?], callback?: ?)",zadd:"fn(args: [?], callback?: ?)",zincrby:"fn(args: [?], callback?: ?)",zrem:"fn(args: [?], callback?: ?)",zremrangebyscore:"fn(args: [?], callback?: ?)",zremrangebyrank:"fn(args: [?], callback?: ?)",zunionstore:"fn(args: [?], callback?: ?)",zinterstore:"fn(args: [?], callback?: ?)",zrange:"fn(args: [?], callback?: ?)",zrangebyscore:"fn(args: [?], callback?: ?)",zrevrangebyscore:"fn(args: [?], callback?: ?)",zcount:"fn(args: [?], callback?: ?)",zrevrange:"fn(args: [?], callback?: ?)",zcard:"fn(args: [?], callback?: ?)",zscore:"fn(args: [?], callback?: ?)",zrank:"fn(args: [?], callback?: ?)",zrevrank:"fn(args: [?], callback?: ?)",hset:"fn(args: [?], callback?: ?)",hsetnx:"fn(args: [?], callback?: ?)",hget:"fn(args: [?], callback?: ?)",hmset:"fn(args: [?], callback?: ?)",hmget:"fn(args: [?], callback?: ?)",hincrby:"fn(args: [?], callback?: ?)",hdel:"fn(args: [?], callback?: ?)",hlen:"fn(args: [?], callback?: ?)",hkeys:"fn(args: [?], callback?: ?)",hvals:"fn(args: [?], callback?: ?)",hgetall:"fn(args: [?], callback?: ?)",hexists:"fn(args: [?], callback?: ?)",incrby:"fn(args: [?], callback?: ?)",decrby:"fn(args: [?], callback?: ?)",getset:"fn(args: [?], callback?: ?)",mset:"fn(args: [?], callback?: ?)",msetnx:"fn(args: [?], callback?: ?)",randomkey:"fn(args: [?], callback?: ?)",select:"fn(args: [?], callback?: ?)",move:"fn(args: [?], callback?: ?)",rename:"fn(args: [?], callback?: ?)",renamenx:"fn(args: [?], callback?: ?)",expire:"fn(args: [?], callback?: ?)",expireat:"fn(args: [?], callback?: ?)",keys:"fn(args: [?], callback?: ?)",dbsize:"fn(args: [?], callback?: ?)",echo:"fn(args: [?], callback?: ?)",save:"fn(args: [?], callback?: ?)",bgsave:"fn(args: [?], callback?: ?)",bgrewriteaof:"fn(args: [?], callback?: ?)",shutdown:"fn(args: [?], callback?: ?)",lastsave:"fn(args: [?], callback?: ?)",type:"fn(args: [?], callback?: ?)",multi:"fn(args: [?], callback?: ?)",exec:"fn(args: [?], callback?: ?)",discard:"fn(args: [?], callback?: ?)",sync:"fn(args: [?], callback?: ?)",flushdb:"fn(args: [?], callback?: ?)",flushall:"fn(args: [?], callback?: ?)",sort:"fn(args: [?], callback?: ?)",info:"fn(args: [?], callback?: ?)",monitor:"fn(args: [?], callback?: ?)",ttl:"fn(args: [?], callback?: ?)",persist:"fn(args: [?], callback?: ?)",slaveof:"fn(args: [?], callback?: ?)",debug:"fn(args: [?], callback?: ?)",config:"fn(args: [?], callback?: ?)",unsubscribe:"fn(args: [?], callback?: ?)",psubscribe:"fn(args: [?], callback?: ?)",punsubscribe:"fn(args: [?], callback?: ?)",watch:"fn(args: [?], callback?: ?)",unwatch:"fn(args: [?], callback?: ?)",cluster:"fn(args: [?], callback?: ?)",restore:"fn(args: [?], callback?: ?)",migrate:"fn(args: [?], callback?: ?)",dump:"fn(args: [?], callback?: ?)",object:"fn(args: [?], callback?: ?)",client:"fn(args: [?], callback?: ?)",eval:"fn(args: [?], callback?: ?)",evalsha:"fn(args: [?], callback?: ?)",quit:"fn(args: [?], callback?: ?)"},createClient:"fn(port_arg: number, host_arg?: string, options?: ClientOpts) -> RedisClient",print:"fn(err: Error, reply: ?)",debug_mode:"bool",MessageHandler:{},ServerInfo:{redis_version:"string",versions:"[number]"}}}),function(e){return"object"==typeof exports&&"object"==typeof module?e(require("../lib/infer"),require("../lib/tern")):"function"==typeof define&&define.amd?define("tern/plugin/orionRequire",["../lib/infer","../lib/tern","./resolver"],e):void e(tern,tern)}(function(e,t,r){"use strict";function n(t,r){r.push(t?t:e.ANull)}function o(t){var r=new e.Obj(!0,"exports"),n=i(p(t.currentFile),t);return n&&n.addType(r,f),r}function s(t,r){if(r.options.override&&Object.prototype.hasOwnProperty.call(r.options.override,t)){var n=r.options.override[t];if("string"==typeof n&&"="===n.charAt(0))return e.def.parsePath(n.slice(1));if("object"==typeof n){var o=a(t,r);if(o)return o;var s=r.interfaces[p(t)]=new e.Obj(null,p(t));return e.def.load(n,s),s}t=n}return o=i(t,r),o&&r.server.addFile(o.origin,null,r.currentFile),o}function a(e,t){var n=r.getResolved(e);return n&&n.file?t.interfaces[p(n.file)]:null}function i(t,n){var o=a(t,n);if(!o){var s=r.getResolved(t);s&&s.file&&(o=n.interfaces[p(s.file)]=new e.AVal,o.origin=s.file)}return o}function l(t){return t.require||(t.require=new e.Fn("require",e.ANull,[e.cx().str],["module"],new e.AVal),t.require.computeRet=function(r,n,o){if(o.length&&"Literal"===o[0].type&&"string"==typeof o[0].value){var a=s(o[0].value,t);if(a)return a}return e.ANull}),t.require}function c(t,r){var n=new e.Obj(e.cx().definitions.requirejs.module,"module"),o=n.defProp("exports"),s=i(p(t.currentFile),t);return s&&o.propagate(s),r.propagate(o,f),n}function p(e){return e.replace(/\.js$/,"")}function d(e){switch(e.type){case"ArrayExpression":return e.elements.map(d);case"Literal":return e.value;case"ObjectExpression":var t={};return e.properties.forEach(function(e){var r=e.key.name||e.key.value;t[r]=d(e.value)}),t}}function u(t){var r=e.cx().parent._requireJS.interfaces,n=t.roots["!requirejs"]=new e.Obj(null);for(var o in r){var s=n.defProp(o.replace(/\./g,"`"));r[o].propagate(s),s.origin=r[o].origin}}function h(t){var r=e.cx(),n=r.definitions[t["!name"]]["!requirejs"],t=r.parent._requireJS;if(n)for(var o in n.props)n.props[o].propagate(s(o,t))}var f=50;e.registerFunction("requireJS",function(t,r,a){function i(e){return"require"===e?l(u):"exports"===e?g||(g=o(u)):"module"===e?b||(b=c(u,g||(g=o(u)))):s(e,u)}var d=e.cx().parent,u=d&&d._requireJS;if(!u||!r.length)return e.ANull;var h=u.currentFile,f=u.interfaces[p(h)]=new e.AVal;f.origin=h;var m,g,b,y=[];if(a&&r.length>1){var v=a[2===r.length?0:1];if("Literal"===v.type&&"string"==typeof v.value)n(i(v.value),y);else if("ArrayExpression"===v.type)for(var w=0;w ?"},config:{"!url":"http://requirejs.org/docs/api.html#config",baseUrl:{"!type":"string","!doc":"the root path to use for all module lookups","!url":"http://requirejs.org/docs/api.html#config-baseUrl"},paths:{"!type":"?","!doc":"path mappings for module names not found directly under baseUrl. The path settings are assumed to be relative to baseUrl, unless the paths setting starts with a '/' or has a URL protocol in it ('like http:').","!url":"http://requirejs.org/docs/api.html#config-paths"},shim:{"!type":"?","!doc":"Configure the dependencies, exports, and custom initialization for older, traditional 'browser globals' scripts that do not use define() to declare the dependencies and set a module value.","!url":"http://requirejs.org/docs/api.html#config-shim"},map:{"!type":"?","!doc":"For the given module prefix, instead of loading the module with the given ID, substitute a different module ID.","!url":"http://requirejs.org/docs/api.html#config-map"},config:{"!type":"?","!doc":"There is a common need to pass configuration info to a module. That configuration info is usually known as part of the application, and there needs to be a way to pass that down to a module. In RequireJS, that is done with the config option for requirejs.config(). Modules can then read that info by asking for the special dependency 'module' and calling module.config().","!url":"http://requirejs.org/docs/api.html#config-moduleconfig"},packages:{"!type":"?","!doc":"configures loading modules from CommonJS packages. See the packages topic for more information.","!url":"http://requirejs.org/docs/api.html#config-packages"},nodeIdCompat:{"!type":"?","!doc":"Node treats module ID example.js and example the same. By default these are two different IDs in RequireJS. If you end up using modules installed from npm, then you may need to set this config value to true to avoid resolution issues.","!url":"http://requirejs.org/docs/api.html#config-nodeIdCompat"},waitSeconds:{"!type":"number","!doc":"The number of seconds to wait before giving up on loading a script. Setting it to 0 disables the timeout. The default is 7 seconds.","!url":"http://requirejs.org/docs/api.html#config-waitSeconds"},context:{"!type":"number","!doc":"A name to give to a loading context. This allows require.js to load multiple versions of modules in a page, as long as each top-level require call specifies a unique context string. To use it correctly, see the Multiversion Support section.","!url":"http://requirejs.org/docs/api.html#config-context"},deps:{"!type":"?","!doc":"An array of dependencies to load. Useful when require is defined as a config object before require.js is loaded, and you want to specify dependencies to load as soon as require() is defined. Using deps is just like doing a require([]) call, but done as soon as the loader has processed the configuration. It does not block any other require() calls from starting their requests for modules, it is just a way to specify some modules to load asynchronously as part of a config block.","!url":"http://requirejs.org/docs/api.html#config-deps"},callback:{"!type":"fn()","!doc":"A function to execute after deps have been loaded. Useful when require is defined as a config object before require.js is loaded, and you want to specify a function to require after the configuration's deps array has been loaded.","!url":"http://requirejs.org/docs/api.html#config-callback"},enforceDefine:{"!type":"bool","!doc":"If set to true, an error will be thrown if a script loads that does not call define() or have a shim exports string value that can be checked. See Catching load failures in IE for more information.","!url":"http://requirejs.org/docs/api.html#config-enforceDefine"},xhtml:{"!type":"bool","!doc":"If set to true, document.createElementNS() will be used to create script elements.","!url":"http://requirejs.org/docs/api.html#config-xhtml"},urlArgs:{"!type":"string","!doc":"Extra query string arguments appended to URLs that RequireJS uses to fetch resources. Most useful to cache bust when the browser or server is not configured correctly.","!url":"http://requirejs.org/docs/api.html#config-urlArgs"},scriptType:{"!type":"string","!doc":"Specify the value for the type='' attribute used for script tags inserted into the document by RequireJS. Default is 'text/javascript'. To use Firefox's JavaScript 1.8 features, use 'text/javascript;version=1.8'.","!url":"http://requirejs.org/docs/api.html#config-scriptType"},skipDataMain:{"!type":"bool","!doc":"Introduced in RequireJS 2.1.9: If set to true, skips the data-main attribute scanning done to start module loading. Useful if RequireJS is embedded in a utility library that may interact with other RequireJS library on the page, and the embedded version should not do data-main loading.","!url":"http://requirejs.org/docs/api.html#config-skipDataMain"}}},requirejs:{"!type":"fn(deps: [string], callback: fn(), errback: fn()) -> !custom:requireJS",onError:{"!type":"fn(err: +Error)","!doc":"To detect errors that are not caught by local errbacks, you can override requirejs.onError()","!url":"http://requirejs.org/docs/api.html#requirejsonerror"},load:{"!type":"fn(context: ?, moduleName: string, url: string)"},config:"fn(config: config) -> !custom:requireJSConfig",version:"string",isBrowser:"bool"},require:"requirejs",define:{"!type":"fn(deps: [string], callback: fn()) -> !custom:requireJS",amd:{jQuery:"bool"}}}}),define("tern/plugin/ternPlugins",["../lib/infer","../lib/tern","acorn/util/walk"],function(e,t){t.registerPlugin("ternPlugins",function(){return{}}),t.defineQueryType("installed_plugins",{run:function(e){return e.options&&"object"==typeof e.options.plugins?e.options.plugins:null}}),t.defineQueryType("environments",{run:function(e){if(e.options&&"object"==typeof e.options.plugins){for(var t=e.options.plugins,r=Object.keys(t),n=Object.create(null),o=0;o/im,l=/]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!=typeof location&&location.href,p=c&&location.protocol&&location.protocol.replace(/\:/,""),d=c&&location.hostname,u=c&&(location.port||void 0),h={},f=e.config&&e.config()||{};return t={version:"2.0.12",strip:function(e){if(e){e=e.replace(i,"");var t=e.match(l);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:f.createXhr||function(){var e,t,r;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;3>t;t+=1){r=a[t];try{e=new ActiveXObject(r)}catch(n){}if(e){a=[r];break}}return e},parseName:function(e){var t,r,n,o=!1,s=e.indexOf("."),a=0===e.indexOf("./")||0===e.indexOf("../");return-1!==s&&(!a||s>1)?(t=e.substring(0,s),r=e.substring(s+1,e.length)):t=e,n=r||t,s=n.indexOf("!"),-1!==s&&(o="strip"===n.substring(s+1),n=n.substring(0,s),r?r=n:t=n),{moduleName:t,ext:r,strip:o}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,r,n,o){var s,a,i,l=t.xdRegExp.exec(e);return l?(s=l[2],a=l[3],a=a.split(":"),i=a[1],a=a[0],!(s&&s!==r||a&&a.toLowerCase()!==n.toLowerCase()||(i||a)&&i!==o)):!0},finishLoad:function(e,r,n,o){n=r?t.strip(n):n,f.isBuild&&(h[e]=n),o(n)},load:function(e,r,n,o){if(o&&o.isBuild&&!o.inlineText)return void n();f.isBuild=o&&o.isBuild;var s=t.parseName(e),a=s.moduleName+(s.ext?"."+s.ext:""),i=r.toUrl(a),l=f.useXhr||t.useXhr;return 0===i.indexOf("empty:")?void n():void(!c||l(i,p,d,u)?t.get(i,function(r){t.finishLoad(e,s.strip,r,n)},function(e){n.error&&n.error(e)}):r([a],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,n)}))},write:function(e,r,n){if(h.hasOwnProperty(r)){var o=t.jsEscape(h[r]);n.asModule(e+"!"+r,"define(function () { return '"+o+"';});\n")}},writeFile:function(e,r,n,o,s){var a=t.parseName(r),i=a.ext?"."+a.ext:"",l=a.moduleName+i,c=n.toUrl(a.moduleName+i)+".js";t.load(l,n,function(){var r=function(e){return o(c,e)};r.asModule=function(e,t){return o.asModule(e,c,t)},t.write(e,l,r,s)},s)}},"node"===f.env||!f.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(r=require.nodeRequire("fs"),t.get=function(e,t,n){try{var o=r.readFileSync(e,"utf8");0===o.indexOf("")&&(o=o.substring(1)),t(o)}catch(s){n&&n(s)}}):"xhr"===f.env||!f.env&&t.createXhr()?t.get=function(e,r,n,o){var s,a=t.createXhr();if(a.open("GET",e,!0),o)for(s in o)o.hasOwnProperty(s)&&a.setRequestHeader(s.toLowerCase(),o[s]);f.onXhr&&f.onXhr(a,e),a.onreadystatechange=function(){var t,o;4===a.readyState&&(t=a.status||0,t>399&&600>t?(o=new Error(e+" HTTP status: "+t),o.xhr=a,n&&n(o)):r(a.responseText),f.onXhrComplete&&f.onXhrComplete(a,e))},a.send(null)}:"rhino"===f.env||!f.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var r,n,o="utf-8",s=new java.io.File(e),a=java.lang.System.getProperty("line.separator"),i=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),o)),l="";try{for(r=new java.lang.StringBuffer,n=i.readLine(),n&&n.length()&&65279===n.charAt(0)&&(n=n.substring(1)),null!==n&&r.append(n);null!==(n=i.readLine());)r.append(a),r.append(n);l=String(r.toString())}finally{i.close()}t(l)}:("xpconnect"===f.env||!f.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(n=Components.classes,o=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in n,t.get=function(e,t){var r,a,i,l={};s&&(e=e.replace(/\//g,"\\")),i=new FileUtils.File(e);try{r=n["@mozilla.org/network/file-input-stream;1"].createInstance(o.nsIFileInputStream),r.init(i,1,0,!1),a=n["@mozilla.org/intl/converter-input-stream;1"].createInstance(o.nsIConverterInputStream),a.init(r,"utf-8",r.available(),o.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),a.readString(r.available(),l),a.close(),r.close(),t(l.value)}catch(c){throw new Error((i&&i.path||"")+": "+c)}}),t}),define("json",["requirejs/text"],function(e){var t=Object.create(null);return{load:function(r,n,o,s){e.get(n.toUrl(r),function(e){if(s.isBuild)t[r]=e,o(e);else{try{var n=JSON.parse(e)}catch(a){o.error(a)}o(n)}},o.error,{accept:"application/json"})},write:function(e,r,n){var o=t[r];o&&n('define("'+e+"!"+r+'", function(){ return '+o+";});\n")}}}),define("json!tern/defs/ecma5.json",function(){return{"!name":"ecma5","!define":{"Error.prototype":"Error.prototype"},Infinity:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Infinity","!doc":"A numeric value representing infinity."},undefined:{"!type":"?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/undefined","!doc":"The value undefined."},NaN:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/NaN","!doc":"A value representing Not-A-Number."},Object:{"!type":"fn()",getPrototypeOf:{"!type":"fn(obj: ?) -> ?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/getPrototypeOf","!doc":"Returns the prototype (i.e. the internal prototype) of the specified object."},create:{"!type":"fn(proto: ?) -> !custom:Object_create","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/create","!doc":"Creates a new object with the specified prototype object and properties."},defineProperty:{"!type":"fn(obj: ?, prop: string, desc: ?) -> !custom:Object_defineProperty","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/defineProperty","!doc":"Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. If you want to see how to use the Object.defineProperty method with a binary-flags-like syntax, see this article."},defineProperties:{"!type":"fn(obj: ?, props: ?)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/defineProperty","!doc":"Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. If you want to see how to use the Object.defineProperty method with a binary-flags-like syntax, see this article."},getOwnPropertyDescriptor:{"!type":"fn(obj: ?, prop: string) -> ?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor","!doc":"Returns a property descriptor for an own property (that is, one directly present on an object, not present by dint of being along an object's prototype chain) of a given object."},keys:{"!type":"fn(obj: ?) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/keys","!doc":"Returns an array of a given object's own enumerable properties, in the same order as that provided by a for-in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well)."},getOwnPropertyNames:{"!type":"fn(obj: ?) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames","!doc":"Returns an array of all properties (enumerable or not) found directly upon a given object."},seal:{"!type":"fn(obj: ?)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/seal","!doc":"Seals an object, preventing new properties from being added to it and marking all existing properties as non-configurable. Values of present properties can still be changed as long as they are writable."},isSealed:{"!type":"fn(obj: ?) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/isSealed","!doc":"Determine if an object is sealed."},freeze:{"!type":"fn(obj: ?)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/freeze","!doc":"Freezes an object: that is, prevents new properties from being added to it; prevents existing properties from being removed; and prevents existing properties, or their enumerability, configurability, or writability, from being changed. In essence the object is made effectively immutable. The method returns the object being frozen."},isFrozen:{"!type":"fn(obj: ?) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/isFrozen","!doc":"Determine if an object is frozen."},preventExtensions:{"!type":"fn(obj: ?)","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/preventExtensions","!doc":"Prevents new properties from ever being added to an object."},isExtensible:{"!type":"fn(obj: ?) -> bool","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible","!doc":"The Object.isExtensible() method determines if an object is extensible (whether it can have new properties added to it)."},prototype:{"!stdProto":"Object",toString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/toString","!doc":"Returns a string representing the object."},toLocaleString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/toLocaleString","!doc":"Returns a string representing the object. This method is meant to be overriden by derived objects for locale-specific purposes."},valueOf:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/valueOf","!doc":"Returns the primitive value of the specified object"},hasOwnProperty:{"!type":"fn(prop: string) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/hasOwnProperty","!doc":"Returns a boolean indicating whether the object has the specified property."},propertyIsEnumerable:{"!type":"fn(prop: string) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable","!doc":"Returns a Boolean indicating whether the specified property is enumerable."},isPrototypeOf:{"!type":"fn(obj: ?) -> bool","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf","!doc":"Tests for an object in another object's prototype chain."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object","!doc":"Creates an object wrapper."},Function:{"!type":"fn(body: string) -> fn()",prototype:{"!stdProto":"Function",apply:{"!type":"fn(this: ?, args: [?])","!effects":["call and return !this this=!0 !1. !1. !1."],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/apply","!doc":"Calls a function with a given this value and arguments provided as an array (or an array like object)."},call:{"!type":"fn(this: ?, args?: ?) -> !this.!ret","!effects":["call and return !this this=!0 !1 !2 !3 !4"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/call","!doc":"Calls a function with a given this value and arguments provided individually."},bind:{"!type":"fn(this: ?, args?: ?) -> !custom:Function_bind","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind","!doc":"Creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function was called."},prototype:"?"},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function","!doc":"Every function in JavaScript is actually a Function object."},Array:{"!type":"fn(size: number) -> !custom:Array_ctor",isArray:{"!type":"fn(value: ?) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/isArray","!doc":"Returns true if an object is an array, false if it is not."},prototype:{"!stdProto":"Array",length:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/length","!doc":"An unsigned, 32-bit integer that specifies the number of elements in an array."},concat:{"!type":"fn(other: [?]) -> !this","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/concat","!doc":"Returns a new array comprised of this array joined with other array(s) and/or value(s)."},join:{"!type":"fn(separator?: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/join","!doc":"Joins all elements of an array into a string."},splice:{"!type":"fn(pos: number, amount: number)","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/splice","!doc":"Changes the content of an array, adding new elements while removing old elements."},pop:{"!type":"fn() -> !this.","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/pop","!doc":"Removes the last element from an array and returns that element."},push:{"!type":"fn(newelt: ?) -> number","!effects":["propagate !0 !this."],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/push","!doc":"Mutates an array by appending the given elements and returning the new length of the array."},shift:{"!type":"fn() -> !this.","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/shift","!doc":"Removes the first element from an array and returns that element. This method changes the length of the array."},unshift:{"!type":"fn(newelt: ?) -> number","!effects":["propagate !0 !this."],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/unshift","!doc":"Adds one or more elements to the beginning of an array and returns the new length of the array."},slice:{"!type":"fn(from: number, to?: number) -> !this","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/slice","!doc":"Returns a shallow copy of a portion of an array."},reverse:{"!type":"fn()","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/reverse","!doc":"Reverses an array in place. The first array element becomes the last and the last becomes the first."},sort:{"!type":"fn(compare?: fn(a: ?, b: ?) -> number)","!effects":["call !0 !this. !this."],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort","!doc":"Sorts the elements of an array in place and returns the array."},indexOf:{"!type":"fn(elt: ?, from?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf","!doc":"Returns the first index at which a given element can be found in the array, or -1 if it is not present."},lastIndexOf:{"!type":"fn(elt: ?, from?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/lastIndexOf","!doc":"Returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex."},every:{"!type":"fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> bool","!effects":["call !0 this=!1 !this. number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/every","!doc":"Tests whether all elements in the array pass the test implemented by the provided function."},some:{"!type":"fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> bool","!effects":["call !0 this=!1 !this. number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/some","!doc":"Tests whether some element in the array passes the test implemented by the provided function."},filter:{"!type":"fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> !this","!effects":["call !0 this=!1 !this. number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/filter","!doc":"Creates a new array with all elements that pass the test implemented by the provided function."},forEach:{"!type":"fn(f: fn(elt: ?, i: number), context?: ?)","!effects":["call !0 this=!1 !this. number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach","!doc":"Executes a provided function once per array element."},map:{"!type":"fn(f: fn(elt: ?, i: number) -> ?, context?: ?) -> [!0.!ret]","!effects":["call !0 this=!1 !this. number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/map","!doc":"Creates a new array with the results of calling a provided function on every element in this array."},reduce:{"!type":"fn(combine: fn(sum: ?, elt: ?, i: number) -> ?, init?: ?) -> !0.!ret","!effects":["call !0 !1 !this. number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/Reduce","!doc":"Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value."},reduceRight:{"!type":"fn(combine: fn(sum: ?, elt: ?, i: number) -> ?, init?: ?) -> !0.!ret","!effects":["call !0 !1 !this. number"],"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/ReduceRight","!doc":"Apply a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array","!doc":"The JavaScript Array global object is a constructor for arrays, which are high-level, list-like objects."},String:{"!type":"fn(value: ?) -> string",fromCharCode:{"!type":"fn(code: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/fromCharCode","!doc":"Returns a string created by using the specified sequence of Unicode values."},prototype:{"!stdProto":"String",length:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/JavaScript/Reference/Global_Objects/String/length","!doc":"Represents the length of a string."},"":"string",charAt:{"!type":"fn(i: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/charAt","!doc":"Returns the specified character from a string."},charCodeAt:{"!type":"fn(i: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/charCodeAt","!doc":"Returns the numeric Unicode value of the character at the given index (except for unicode codepoints > 0x10000)."},indexOf:{"!type":"fn(char: string, from?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/indexOf","!doc":"Returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex,\nreturns -1 if the value is not found."},lastIndexOf:{"!type":"fn(char: string, from?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/lastIndexOf","!doc":"Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found. The calling string is searched backward, starting at fromIndex."},substring:{"!type":"fn(from: number, to?: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/substring","!doc":"Returns a subset of a string between one index and another, or through the end of the string."},substr:{"!type":"fn(from: number, length?: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/substr","!doc":"Returns the characters in a string beginning at the specified location through the specified number of characters."},slice:{"!type":"fn(from: number, to?: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/slice","!doc":"Extracts a section of a string and returns a new string."},trim:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim","!doc":"Removes whitespace from both ends of the string."},toUpperCase:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toUpperCase","!doc":"Returns the calling string value converted to uppercase."},toLowerCase:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toLowerCase","!doc":"Returns the calling string value converted to lowercase."},toLocaleUpperCase:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase","!doc":"Returns the calling string value converted to upper case, according to any locale-specific case mappings."},toLocaleLowerCase:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase","!doc":"Returns the calling string value converted to lower case, according to any locale-specific case mappings."},split:{"!type":"fn(pattern: string) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/split","!doc":"Splits a String object into an array of strings by separating the string into substrings."},concat:{"!type":"fn(other: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/concat","!doc":"Combines the text of two or more strings and returns a new string."},localeCompare:{"!type":"fn(other: string) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/localeCompare","!doc":"Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order."},match:{"!type":"fn(pattern: +RegExp) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/match","!doc":"Used to retrieve the matches when matching a string against a regular expression."},replace:{"!type":"fn(pattern: +RegExp, replacement: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/replace","!doc":"Returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match."},search:{"!type":"fn(pattern: +RegExp) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/search","!doc":"Executes the search for a match between a regular expression and this String object."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String","!doc":"The String global object is a constructor for strings, or a sequence of characters."},Number:{"!type":"fn(value: ?) -> number",MAX_VALUE:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/MAX_VALUE","!doc":"The maximum numeric value representable in JavaScript."},MIN_VALUE:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/MIN_VALUE","!doc":"The smallest positive numeric value representable in JavaScript."},POSITIVE_INFINITY:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY","!doc":"A value representing the positive Infinity value."},NEGATIVE_INFINITY:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY","!doc":"A value representing the negative Infinity value."},prototype:{"!stdProto":"Number",toString:{"!type":"fn(radix?: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toString","!doc":"Returns a string representing the specified Number object"},toFixed:{"!type":"fn(digits: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toFixed","!doc":"Formats a number using fixed-point notation"},toExponential:{"!type":"fn(digits: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toExponential","!doc":"Returns a string representing the Number object in exponential notation"},toPrecision:{"!type":"fn(digits: number) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toPrecision","!doc":"The toPrecision() method returns a string representing the number to the specified precision."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number","!doc":"The Number JavaScript object is a wrapper object allowing you to work with numerical values. A Number object is created using the Number() constructor."},Boolean:{"!type":"fn(value: ?) -> bool",prototype:{"!stdProto":"Boolean"},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean","!doc":"The Boolean object is an object wrapper for a boolean value."},RegExp:{"!type":"fn(source: string, flags?: string)",prototype:{"!stdProto":"RegExp",exec:{"!type":"fn(input: string) -> [string]","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/exec","!doc":"Executes a search for a match in a specified string. Returns a result array, or null."},test:{"!type":"fn(input: string) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/test","!doc":"Executes the search for a match between a regular expression and a specified string. Returns true or false."},global:{"!type":"bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp","!doc":"Creates a regular expression object for matching text with a pattern."},ignoreCase:{"!type":"bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp","!doc":"Creates a regular expression object for matching text with a pattern."},multiline:{"!type":"bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/multiline","!doc":"Reflects whether or not to search in strings across multiple lines.\n"},source:{"!type":"string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/source","!doc":"A read-only property that contains the text of the pattern, excluding the forward slashes.\n"},lastIndex:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp/lastIndex","!doc":"A read/write integer property that specifies the index at which to start the next match."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp","!doc":"Creates a regular expression object for matching text with a pattern."},Date:{"!type":"fn(ms: number)",parse:{"!type":"fn(source: string) -> +Date","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/parse","!doc":"Parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC."},UTC:{"!type":"fn(year: number, month: number, date: number, hour?: number, min?: number, sec?: number, ms?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/UTC","!doc":"Accepts the same parameters as the longest form of the constructor, and returns the number of milliseconds in a Date object since January 1, 1970, 00:00:00, universal time."},now:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/now","!doc":"Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC."},prototype:{toUTCString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toUTCString","!doc":"Converts a date to a string, using the universal time convention."},toISOString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toISOString","!doc":"JavaScript provides a direct way to convert a date object into a string in ISO format, the ISO 8601 Extended Format."},toDateString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toDateString","!doc":"Returns the date portion of a Date object in human readable form in American English."},toTimeString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toTimeString","!doc":"Returns the time portion of a Date object in human readable form in American English."},toLocaleDateString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toLocaleDateString","!doc":"Converts a date to a string, returning the \"date\" portion using the operating system's locale's conventions.\n"},toLocaleTimeString:{"!type":"fn() -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString","!doc":'Converts a date to a string, returning the "time" portion using the current locale\'s conventions.'},getTime:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTime","!doc":"Returns the numeric value corresponding to the time for the specified date according to universal time."},getFullYear:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getFullYear","!doc":"Returns the year of the specified date according to local time."},getYear:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getYear","!doc":"Returns the year in the specified date according to local time."},getMonth:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getMonth","!doc":"Returns the month in the specified date according to local time."},getUTCMonth:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCMonth","!doc":"Returns the month of the specified date according to universal time.\n"},getDate:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getDate","!doc":"Returns the day of the month for the specified date according to local time."},getUTCDate:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCDate","!doc":"Returns the day (date) of the month in the specified date according to universal time.\n"},getDay:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getDay","!doc":"Returns the day of the week for the specified date according to local time."},getUTCDay:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCDay","!doc":"Returns the day of the week in the specified date according to universal time.\n"},getHours:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getHours","!doc":"Returns the hour for the specified date according to local time."},getUTCHours:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCHours","!doc":"Returns the hours in the specified date according to universal time.\n"},getMinutes:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getMinutes","!doc":"Returns the minutes in the specified date according to local time."},getUTCMinutes:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date","!doc":"Creates JavaScript Date instances which let you work with dates and times."},getSeconds:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getSeconds","!doc":"Returns the seconds in the specified date according to local time."},getUTCSeconds:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCSeconds","!doc":"Returns the seconds in the specified date according to universal time.\n"},getMilliseconds:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getMilliseconds","!doc":"Returns the milliseconds in the specified date according to local time."},getUTCMilliseconds:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds","!doc":"Returns the milliseconds in the specified date according to universal time.\n"},getTimezoneOffset:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset","!doc":"Returns the time-zone offset from UTC, in minutes, for the current locale."},setTime:{"!type":"fn(date: +Date) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setTime","!doc":"Sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n"},setFullYear:{"!type":"fn(year: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setFullYear","!doc":"Sets the full year for a specified date according to local time.\n"},setUTCFullYear:{"!type":"fn(year: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCFullYear","!doc":"Sets the full year for a specified date according to universal time.\n"},setMonth:{"!type":"fn(month: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setMonth","!doc":"Set the month for a specified date according to local time."},setUTCMonth:{"!type":"fn(month: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCMonth","!doc":"Sets the month for a specified date according to universal time.\n"},setDate:{"!type":"fn(day: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setDate","!doc":"Sets the day of the month for a specified date according to local time."},setUTCDate:{"!type":"fn(day: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCDate","!doc":"Sets the day of the month for a specified date according to universal time.\n"},setHours:{"!type":"fn(hour: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setHours","!doc":"Sets the hours for a specified date according to local time, and returns the number of milliseconds since 1 January 1970 00:00:00 UTC until the time represented by the updated Date instance."},setUTCHours:{"!type":"fn(hour: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCHours","!doc":"Sets the hour for a specified date according to universal time.\n"},setMinutes:{"!type":"fn(min: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setMinutes","!doc":"Sets the minutes for a specified date according to local time."},setUTCMinutes:{"!type":"fn(min: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCMinutes","!doc":"Sets the minutes for a specified date according to universal time.\n"},setSeconds:{"!type":"fn(sec: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setSeconds","!doc":"Sets the seconds for a specified date according to local time."},setUTCSeconds:{"!type":"fn(sec: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCSeconds","!doc":"Sets the seconds for a specified date according to universal time.\n"},setMilliseconds:{"!type":"fn(ms: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setMilliseconds","!doc":"Sets the milliseconds for a specified date according to local time.\n"},setUTCMilliseconds:{"!type":"fn(ms: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds","!doc":"Sets the milliseconds for a specified date according to universal time.\n"}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date","!doc":"Creates JavaScript Date instances which let you work with dates and times."},Error:{"!type":"fn(message: string)",prototype:{name:{"!type":"string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Error/name","!doc":"A name for the type of error."},message:{"!type":"string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Error/message","!doc":"A human-readable description of the error."}},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Error","!doc":"Creates an error object."},SyntaxError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/SyntaxError","!doc":"Represents an error when trying to interpret syntactically invalid code."},ReferenceError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/ReferenceError","!doc":"Represents an error when a non-existent variable is referenced."},URIError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/URIError","!doc":"Represents an error when a malformed URI is encountered."},EvalError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/EvalError","!doc":"Represents an error regarding the eval function."},RangeError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RangeError","!doc":"Represents an error when a number is not within the correct range allowed."},TypeError:{"!type":"fn(message: string)",prototype:"Error.prototype","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/TypeError","!doc":"Represents an error an error when a value is not of the expected type."},parseInt:{"!type":"fn(string: string, radix?: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseInt","!doc":"Parses a string argument and returns an integer of the specified radix or base."},parseFloat:{"!type":"fn(string: string) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseFloat","!doc":"Parses a string argument and returns a floating point number."},isNaN:{"!type":"fn(value: number) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/isNaN","!doc":"Determines whether a value is NaN or not. Be careful, this function is broken. You may be interested in ECMAScript 6 Number.isNaN."},isFinite:{"!type":"fn(value: number) -> bool","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/isFinite","!doc":"Determines whether the passed value is a finite number."},eval:{"!type":"fn(code: string) -> ?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/eval","!doc":"Evaluates JavaScript code represented as a string."},encodeURI:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURI","!doc":'Encodes a Uniform Resource Identifier (URI) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).'},encodeURIComponent:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent","!doc":'Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).'},decodeURI:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/decodeURI","!doc":"Decodes a Uniform Resource Identifier (URI) previously created by encodeURI or by a similar routine."},decodeURIComponent:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/decodeURIComponent","!doc":"Decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent or by a similar routine."},Math:{E:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/E","!doc":"The base of natural logarithms, e, approximately 2.718."},LN2:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/LN2","!doc":"The natural logarithm of 2, approximately 0.693."},LN10:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/LN10","!doc":"The natural logarithm of 10, approximately 2.302."},LOG2E:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/LOG2E","!doc":"The base 2 logarithm of E (approximately 1.442)."},LOG10E:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/LOG10E","!doc":"The base 10 logarithm of E (approximately 0.434)."},SQRT1_2:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/SQRT1_2","!doc":"The square root of 1/2; equivalently, 1 over the square root of 2, approximately 0.707."},SQRT2:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/SQRT2","!doc":"The square root of 2, approximately 1.414."},PI:{"!type":"number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/PI","!doc":"The ratio of the circumference of a circle to its diameter, approximately 3.14159."},abs:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/abs","!doc":"Returns the absolute value of a number."},cos:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/cos","!doc":"Returns the cosine of a number."},sin:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/sin","!doc":"Returns the sine of a number."},tan:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/tan","!doc":"Returns the tangent of a number."},acos:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/acos","!doc":"Returns the arccosine (in radians) of a number."},asin:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/asin","!doc":"Returns the arcsine (in radians) of a number."},atan:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/atan","!doc":"Returns the arctangent (in radians) of a number."},atan2:{"!type":"fn(y: number, x: number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/atan2","!doc":"Returns the arctangent of the quotient of its arguments."},ceil:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/ceil","!doc":"Returns the smallest integer greater than or equal to a number."},floor:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/floor","!doc":"Returns the largest integer less than or equal to a number."},round:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/round","!doc":"Returns the value of a number rounded to the nearest integer."},exp:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/exp","!doc":"Returns Ex, where x is the argument, and E is Euler's constant, the base of the natural logarithms."},log:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/log","!doc":"Returns the natural logarithm (base E) of a number."},sqrt:{"!type":"fn(number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/sqrt","!doc":"Returns the square root of a number."},pow:{"!type":"fn(number, number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/pow","!doc":"Returns base to the exponent power, that is, baseexponent."},max:{"!type":"fn(number, number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/max","!doc":"Returns the largest of zero or more numbers."},min:{"!type":"fn(number, number) -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/min","!doc":"Returns the smallest of zero or more numbers."},random:{"!type":"fn() -> number","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/random","!doc":"Returns a floating-point, pseudo-random number in the range [0, 1) that is, from 0 (inclusive) up to but not including 1 (exclusive), which you can then scale to your desired range."},"!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math","!doc":"A built-in object that has properties and methods for mathematical constants and functions."},JSON:{parse:{"!type":"fn(json: string) -> ?","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/parse","!doc":"Parse a string as JSON, optionally transforming the value produced by parsing."},stringify:{"!type":"fn(value: ?) -> string","!url":"https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify","!doc":"Convert a value to JSON, optionally replacing values if a replacer function is specified, or optionally including only the specified properties if a replacer array is specified."},"!url":"https://developer.mozilla.org/en-US/docs/JSON","!doc":"JSON (JavaScript Object Notation) is a data-interchange format. It closely resembles a subset of JavaScript syntax, although it is not a strict subset. (See JSON in the JavaScript Reference for full details.) It is useful when writing any kind of JavaScript-based application, including websites and browser extensions. For example, you might store user information in JSON format in a cookie, or you might store extension preferences in JSON in a string-valued browser preference."}} +}),define("json!tern/defs/ecma6.json",function(){return{"!name":"ecma6","!define":{"Promise.prototype":{"catch":{"!doc":"The catch() method returns a Promise and deals with rejected cases only. It behaves the same as calling Promise.prototype.then(undefined, onRejected).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch","!type":"fn(onRejected: fn(reason: ?))"},then:{"!doc":"The then() method returns a Promise. It takes two arguments, both are callback functions for the success and failure cases of the Promise.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then","!type":"fn(onFulfilled: fn(value: ?), onRejected: fn(reason: ?))","!effects":["call !0 !this.value"]}},promiseReject:{"!type":"fn(reason: ?)"}},Array:{from:{"!type":"fn(arrayLike: [], mapFn?: fn(), thisArg?: ?) -> !custom:Array_ctor","!doc":"The Array.from() method creates a new Array instance from an array-like or iterable object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from"},of:{"!type":"fn(elementN: ?) -> !custom:Array_ctor","!doc":"The Array.of() method creates a new Array instance with a variable number of arguments, regardless of number or type of the arguments.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of"},prototype:{copyWithin:{"!type":"fn(target: number, start: number, end?: number) -> !custom:Array_ctor","!doc":"The copyWithin() method copies the sequence of array elements within the array to the position starting at target. The copy is taken from the index positions of the second and third arguments start and end. The end argument is optional and defaults to the length of the array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin"},entries:{"!type":"fn() -> TODO_ITERATOR","!doc":"The entries() method returns a new Array Iterator object that contains the key/value pairs for each index in the array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries"},fill:{"!type":"fn(value: ?, start?: number, end?: number)","!doc":"The fill() method fills all the elements of an array from a start index to an end index with a static value.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill"},find:{"!type":"fn(callback: fn(element: ?, index: number, array: []), thisArg?: ?) -> ?","!doc":"The find() method returns a value in the array, if an element in the array satisfies the provided testing function. Otherwise undefined is returned.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find"},findIndex:{"!type":"fn(callback: fn(element: ?, index: number, array: []), thisArg?: ?) -> number","!doc":"The findIndex() method returns an index in the array, if an element in the array satisfies the provided testing function. Otherwise -1 is returned.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex"},keys:{"!type":"fn() -> !custom:Array_ctor","!doc":"The keys() method returns a new Array Iterator that contains the keys for each index in the array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys"},values:{"!type":"fn() -> !custom:Array_ctor","!doc":"The values() method returns a new Array Iterator object that contains the values for each index in the array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values"}}},ArrayBuffer:{"!type":"fn(length: number)","!doc":"The ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer. You can not directly manipulate the contents of an ArrayBuffer; instead, you create one of the typed array objects or a DataView object which represents the buffer in a specific format, and use that to read and write the contents of the buffer.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",isView:{"!type":"fn(arg: ?) -> bool","!doc":"The ArrayBuffer.isView() method returns true if arg is a view one of the ArrayBuffer views, such as typed array objects or a DataView; false otherwise.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView"},transfer:{"!type":"fn(oldBuffer: ?, newByteLength: ?)","!doc":"The static ArrayBuffer.transfer() method returns a new ArrayBuffer whose contents are taken from the oldBuffer's data and then is either truncated or zero-extended by newByteLength. If newByteLength is undefined, the byteLength of the oldBuffer is used. This operation leaves oldBuffer in a detached state.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer"},prototype:{byteLength:{"!type":"number","!doc":"The byteLength accessor property represents the length of an ArrayBuffer in bytes.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/byteLength"},slice:{"!type":"fn(begin: number, end?: number) -> +ArrayBuffer","!doc":"The slice() method returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end, exclusive.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/slice"}}},DataView:{"!type":"fn(buffer: +ArrayBuffer, byteOffset?: number, byteLength?: number)","!doc":"The DataView view provides a low-level interface for reading data from and writing it to an ArrayBuffer.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",prototype:{buffer:{"!type":"+ArrayBuffer","!doc":"The buffer accessor property represents the ArrayBuffer referenced by the DataView at construction time.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/buffer"},byteLength:{"!type":"number","!doc":"The byteLength accessor property represents the length (in bytes) of this view from the start of its ArrayBuffer.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/byteLength"},byteOffset:{"!type":"number","!doc":"The byteOffset accessor property represents the offset (in bytes) of this view from the start of its ArrayBuffer.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/byteOffset"},getFloat32:{"!type":"fn(byteOffset: number, littleEndian?: bool) -> number","!doc":"The getFloat32() method gets a signed 32-bit integer (float) at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getFloat32"},getFloat64:{"!type":"fn(byteOffset: number, littleEndian?: bool) -> number","!doc":"The getFloat64() method gets a signed 64-bit float (double) at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getFloat64"},getInt16:{"!type":"fn(byteOffset: number, littleEndian?: bool) -> number","!doc":"The getInt16() method gets a signed 16-bit integer (short) at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getInt16"},getInt32:{"!type":"fn(byteOffset: number, littleEndian?: bool) -> number","!doc":"The getInt32() method gets a signed 32-bit integer (long) at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getInt32"},getInt8:{"!type":"fn(byteOffset: number, littleEndian?: bool) -> number","!doc":"The getInt8() method gets a signed 8-bit integer (byte) at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getInt8"},getUint16:{"!type":"fn(byteOffset: number, littleEndian?: bool) -> number","!doc":"The getUint16() method gets an unsigned 16-bit integer (unsigned short) at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint16"},getUint32:{"!type":"fn(byteOffset: number, littleEndian?: bool) -> number","!doc":"The getUint32() method gets an unsigned 32-bit integer (unsigned long) at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint32"},getUint8:{"!type":"fn(byteOffset: number) -> number","!doc":"The getUint8() method gets an unsigned 8-bit integer (unsigned byte) at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint8"},setFloat32:{"!type":"fn(byteOffset: number, value: number, littleEndian?: bool)","!doc":"The setFloat32() method stores a signed 32-bit integer (float) value at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setFloat32"},setFloat64:{"!type":"fn(byteOffset: number, value: number, littleEndian?: bool)","!doc":"The setFloat64() method stores a signed 64-bit integer (double) value at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setFloat64"},setInt16:{"!type":"fn(byteOffset: number, value: number, littleEndian?: bool)","!doc":"The setInt16() method stores a signed 16-bit integer (short) value at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setInt16"},setInt32:{"!type":"fn(byteOffset: number, value: number, littleEndian?: bool)","!doc":"The setInt32() method stores a signed 32-bit integer (long) value at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setInt32"},setInt8:{"!type":"fn(byteOffset: number, value: number)","!doc":"The setInt8() method stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setInt8"},setUint16:{"!type":"fn(byteOffset: number, value: number, littleEndian?: bool)","!doc":"The setUint16() method stores an unsigned 16-bit integer (unsigned short) value at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setUint16"},setUint32:{"!type":"fn(byteOffset: number, value: number, littleEndian?: bool)","!doc":"The setUint32() method stores an unsigned 32-bit integer (unsigned long) value at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setUint32"},setUint8:{"!type":"fn(byteOffset: number, value: number)","!doc":"The setUint8() method stores an unsigned 8-bit integer (byte) value at the specified byte offset from the start of the DataView.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setUint8"}}},Float32Array:{"!type":"fn(length: number)","!doc":"The Float32Array typed array represents an array of 32-bit floating point numbers (corresponding to the C float data type) in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",prototype:{"!proto":"TypedArray.prototype"},length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of"},Float64Array:{"!type":"fn(length: number)","!doc":"The Float64Array typed array represents an array of 64-bit floating point numbers (corresponding to the C double data type) in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",prototype:{"!proto":"TypedArray.prototype"},length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of"},Int16Array:{"!type":"fn(length: number)","!doc":"The Int16Array typed array represents an array of twos-complement 16-bit signed integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",prototype:{"!proto":"TypedArray.prototype"},length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of"},Int32Array:{"!type":"fn(length: number)","!doc":"The Int32Array typed array represents an array of twos-complement 32-bit signed integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",prototype:{"!proto":"TypedArray.prototype"},length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of"},Int8Array:{"!type":"fn(length: number)","!doc":"The Int8Array typed array represents an array of twos-complement 8-bit signed integers. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",prototype:{"!proto":"TypedArray.prototype"},length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of"},Map:{"!type":"fn(iterable?: [])","!doc":"The Map object is a simple key/value map. Any value (both objects and primitive values) may be used as either a key or a value.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",prototype:{clear:{"!type":"fn()","!doc":"The clear() method removes all elements from a Map object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear"},"delete":{"!type":"fn(key: ?)","!doc":"The delete() method removes the specified element from a Map object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete"},entries:{"!type":"fn() -> TODO_ITERATOR","!doc":"The entries() method returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries"},forEach:{"!type":"fn(callback: fn(value: ?, key: ?, map: +Map), thisArg?: ?)","!effects":["call !0 this=!1 !this. number !this"],"!doc":"The forEach() method executes a provided function once per each key/value pair in the Map object, in insertion order.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach"},get:{"!type":"fn(key: ?) -> !this.","!doc":"The get() method returns a specified element from a Map object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get"},has:{"!type":"fn(key: ?) -> bool","!doc":"The has() method returns a boolean indicating whether an element with the specified key exists or not.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has"},keys:{"!type":"fn() -> TODO_ITERATOR","!doc":"The keys() method returns a new Iterator object that contains the keys for each element in the Map object in insertion order.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/keys"},set:{"!type":"fn(key: ?, value: ?) -> !this","!doc":"The set() method adds a new element with a specified key and value to a Map object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set"},size:{"!type":"number","!doc":"The size accessor property returns the number of elements in a Map object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size"},values:{"!type":"fn() -> TODO_ITERATOR","!doc":"The values() method returns a new Iterator object that contains the values for each element in the Map object in insertion order.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/values"},"prototype[@@iterator]":{"!type":"fn()","!doc":"The initial value of the @@iterator property is the same function object as the initial value of the entries property.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/@@iterator"}}},Math:{acosh:{"!type":"fn(x: number) -> number","!doc":"The Math.acosh() function returns the hyperbolic arc-cosine of a number, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh"},asinh:{"!type":"fn(x: number) -> number","!doc":"The Math.asinh() function returns the hyperbolic arcsine of a number, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asinh"},atanh:{"!type":"fn(x: number) -> number","!doc":"The Math.atanh() function returns the hyperbolic arctangent of a number, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh"},cbrt:{"!type":"fn(x: number) -> number","!doc":"The Math.cbrt() function returns the cube root of a number, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt"},clz32:{"!type":"fn(x: number) -> number","!doc":"The Math.clz32() function returns the number of leading zero bits in the 32-bit binary representation of a number.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32"},cosh:{"!type":"fn(x: number) -> number","!doc":"The Math.cosh() function returns the hyperbolic cosine of a number, that can be expressed using the constant e:","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh"},expm1:{"!type":"fn(x: number) -> number","!doc":"The Math.expm1() function returns ex - 1, where x is the argument, and e the base of the natural logarithms.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/expm1"},fround:{"!type":"fn(x: number) -> number","!doc":"The Math.fround() function returns the nearest single precision float representation of a number.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround"},hypot:{"!type":"fn(value: number) -> number","!doc":"The Math.hypot() function returns the square root of the sum of squares of its arguments, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot"},imul:{"!type":"fn(a: number, b: number) -> number","!doc":"The Math.imul() function returns the result of the C-like 32-bit multiplication of the two parameters.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul"},log10:{"!type":"fn(x: number) -> number","!doc":"The Math.log10() function returns the base 10 logarithm of a number, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log10"},log1p:{"!type":"fn(x: number) -> number","!doc":"The Math.log1p() function returns the natural logarithm (base e) of 1 + a number, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p"},log2:{"!type":"fn(x: number) -> number","!doc":"The Math.log2() function returns the base 2 logarithm of a number, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2"},sign:{"!type":"fn(x: number) -> number","!doc":"The Math.sign() function returns the sign of a number, indicating whether the number is positive, negative or zero.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign"},sinh:{"!type":"fn(x: number) -> number","!doc":"The Math.sinh() function returns the hyperbolic sine of a number, that can be expressed using the constant e:","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sinh"},tanh:{"!type":"fn(x: number) -> number","!doc":"The Math.tanh() function returns the hyperbolic tangent of a number, that is","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tanh"},trunc:{"!type":"fn(x: number) -> number","!doc":"The Math.trunc() function returns the integral part of a number by removing any fractional digits. It does not round any numbers. The function can be expressed with the floor() and ceil() function:","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc"}},Number:{EPSILON:{"!type":"number","!doc":"The Number.EPSILON property represents the difference between one and the smallest value greater than one that can be represented as a Number.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON"},MAX_SAFE_INTEGER:{"!type":"number","!doc":"The Number.MAX_SAFE_INTEGER constant represents the maximum safe integer in JavaScript (253 - 1).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER"},MIN_SAFE_INTEGER:{"!type":"number","!doc":"The Number.MIN_SAFE_INTEGER constant represents the minimum safe integer in JavaScript (-(253 - 1)).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER"},isFinite:{"!type":"fn(testValue: ?) -> bool","!doc":"The Number.isFinite() method determines whether the passed value is finite.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite"},isInteger:{"!type":"fn(testValue: ?) -> bool","!doc":"The Number.isInteger() method determines whether the passed value is an integer.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger"},isNaN:{"!type":"fn(testValue: ?) -> bool","!doc":"The Number.isNaN() method determines whether the passed value is NaN. More robust version of the original global isNaN().","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN"},isSafeInteger:{"!type":"fn(testValue: ?) -> bool","!doc":"The Number.isSafeInteger() method determines whether the provided value is a number that is a safe integer. A safe integer is an integer that","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger"},parseFloat:{"!type":"fn(string: string) -> number","!doc":"The Number.parseFloat() method parses a string argument and returns a floating point number. This method behaves identically to the global function parseFloat() and is part of ECMAScript 6 (its purpose is modularization of globals).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat"},parseInt:{"!type":"fn(string: string, radix?: number) -> number","!doc":"The Number.parseInt() method parses a string argument and returns an integer of the specified radix or base. This method behaves identically to the global function parseInt() and is part of ECMAScript 6 (its purpose is modularization of globals).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt"}},Object:{assign:{"!type":"fn(target: ?, sources: ?) -> ?","!doc":"The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign"},getOwnPropertySymbols:{"!type":"fn(obj: ?) -> [?]","!doc":"The Object.getOwnPropertySymbols() method returns an array of all symbol properties found directly upon a given object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertySymbols"},is:{"!type":"fn(value1: ?, value2: ?) -> bool","!doc":"The Object.is() method determines whether two values are the same value.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is"},setPrototypeOf:{"!type":"fn(obj: ?, prototype: ?)","!doc":"The Object.setPrototype() method sets the prototype (i.e., the internal [[Prototype]] property) of a specified object to another object or null.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf"}},Promise:{"!type":"fn(executor: fn(resolve: fn(value: ?), reject: promiseReject)) -> !custom:Promise_ctor","!doc":"The Promise object is used for deferred and asynchronous computations. A Promise is in one of the three states:","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",all:{"!type":"fn(iterable: [+Promise]) -> !0.","!doc":"The Promise.all(iterable) method returns a promise that resolves when all of the promises in the iterable argument have resolved.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all"},race:{"!type":"fn(iterable: [+Promise]) -> !0.","!doc":"The Promise.race(iterable) method returns a promise that resolves or rejects as soon as one of the promises in the iterable resolves or rejects, with the value or reason from that promise.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race"},reject:{"!type":"fn(reason: ?) -> !this","!doc":"The Promise.reject(reason) method returns a Promise object that is rejected with the given reason.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject"},resolve:{"!type":"fn(value: ?) -> +Promise[value=!0]","!doc":"The Promise.resolve(value) method returns a Promise object that is resolved with the given value. If the value is a thenable (i.e. has a then method), the returned promise will 'follow' that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the value.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve"},prototype:"Promise.prototype"},Proxy:{"!type":"fn(target: ?, handler: ?)","!doc":"The Proxy object is used to define the custom behavior in JavaScript fundamental operation (e.g. property lookup, assignment, enumeration, function invocation, etc).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",revocable:{"!doc":"The Proxy.revocable() method is used to create a revocable Proxy object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable"}},RegExp:{prototype:{flags:{"!type":"string","!doc":"The flags property returns a string consisting of the flags of the current regular expression object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags"},sticky:{"!type":"bool","!doc":"The sticky property reflects whether or not the search is sticky (searches in strings only from the index indicated by the lastIndex property of this regular expression). sticky is a read-only property of an individual regular expression object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky"}}},Set:{"!type":"fn(iterable: [?])","!doc":"The Set object lets you store unique values of any type, whether primitive values or object references.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",length:{"!type":"number","!doc":"The value of the length property is 1."},prototype:{add:{"!type":"fn(value: ?) -> !this","!doc":"The add() method appends a new element with a specified value to the end of a Set object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/add"},clear:{"!type":"fn()","!doc":"The clear() method removes all elements from a Set object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/clear"},"delete":{"!type":"fn(value: ?) -> bool","!doc":"The delete() method removes the specified element from a Set object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/delete"},entries:{"!type":"fn() -> TODO_ITERATOR","!doc":"The entries() method returns a new Iterator object that contains an array of [value, value] for each element in the Set object, in insertion order. For Set objects there is no key like in Map objects. However, to keep the API similar to the Map object, each entry has the same value for its key and value here, so that an array [value, value] is returned.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/entries"},forEach:{"!type":"fn(callback: fn(value: ?, value2: ?, set: +Set), thisArg?: ?)","!effects":["call !0 this=!1 !this. number !this"]},has:{"!type":"fn(value: ?) -> bool","!doc":"The has() method returns a boolean indicating whether an element with the specified value exists in a Set object or not.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/has"},keys:{"!type":"fn() -> TODO_ITERATOR","!doc":"The values() method returns a new Iterator object that contains the values for each element in the Set object in insertion order.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/keys"},size:{"!type":"number","!doc":"The size accessor property returns the number of elements in a Set object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/size"},values:{"!type":"fn() -> TODO_ITERATOR","!doc":"The values() method returns a new Iterator object that contains the values for each element in the Set object in insertion order.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/values"},"prototype[@@iterator]":{"!type":"fn()","!doc":"The initial value of the @@iterator property is the same function object as the initial value of the values property.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/@@iterator"}}},String:{fromCodePoint:{"!type":"fn(num1: ?) -> string","!doc":"The static String.fromCodePoint() method returns a string created by using the specified sequence of code points.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint"},raw:{"!type":"fn(callSite: ?, substitutions: ?, templateString: ?) -> string","!doc":"The static String.raw() method is a tag function of template strings, like the r prefix in Python or the @ prefix in C# for string literals, this function is used to get the raw string form of template strings.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw"},prototype:{codePointAt:{"!type":"fn(pos: number) -> number","!doc":"The codePointAt() method returns a non-negative integer that is the UTF-16 encoded code point value.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt"},endsWith:{"!type":"fn(searchString: string, position?: number) -> bool","!doc":"The endsWith() method determines whether a string ends with the characters of another string, returning true or false as appropriate.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith"},includes:{"!type":"fn(searchString: string, position?: number) -> bool","!doc":"The includes() method determines whether one string may be found within another string, returning true or false as appropriate.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/contains"},normalize:{"!type":"fn(form: string) -> string","!doc":"The normalize() method returns the Unicode Normalization Form of a given string (if the value isn't a string, it will be converted to one first).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize"},repeat:{"!type":"fn(count: number) -> string","!doc":"The repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat"},startsWith:{"!type":"fn(searchString: string, position?: number) -> bool","!doc":"The startsWith() method determines whether a string begins with the characters of another string, returning true or false as appropriate.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith"}}},Symbol:{"!type":"fn(description?: string)","!doc":"A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol","for":{"!type":"fn(key: string) -> +Symbol","!doc":"The Symbol.for(key) method searches for existing symbols in a runtime-wide symbol registry with the given key and returns it if found. Otherwise a new symbol gets created in the global symbol registry with this key.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/for"},keyFor:{"!type":"fn(sym: +Symbol) -> +Symbol","!doc":"The Symbol.keyFor(sym) method retrieves a shared symbol key from the global symbol registry for the given symbol.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/keyFor"},prototype:{toString:{"!type":"fn() -> string","!doc":"The toString() method returns a string representing the specified Symbol object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toString"},valueOf:{"!type":"fn() -> ?","!doc":"The valueOf() method returns the primitive value of a Symbol object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/valueOf"}}},TypedArray:{"!type":"fn(length: number)","!doc":"A TypedArray object describes an array-like view of an underlying binary data buffer. There is no global property named TypedArray, nor is there a directly visible TypedArray constructor. Instead, there are a number of different global properties, whose values are typed array constructors for specific element types, listed below. On the following pages you will find common properties and methods that can be used with any typed array containing elements of any type.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray",BYTES_PER_ELEMENT:{"!type":"number","!doc":"The TypedArray.BYTES_PER_ELEMENT property represents the size in bytes of each element in an typed array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT"},length:{"!type":"number","!doc":"The length accessor property represents the length (in elements) of a typed array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length"},name:{"!type":"string","!doc":"The TypedArray.name property represents a string value of the typed array constructor name.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/name"},prototype:{buffer:{"!type":"+ArrayBuffer","!doc":"The buffer accessor property represents the ArrayBuffer referenced by a TypedArray at construction time.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer"},byteLength:{"!type":"number","!doc":"The byteLength accessor property represents the length (in bytes) of a typed array from the start of its ArrayBuffer.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength"},byteOffset:{"!type":"number","!doc":"The byteOffset accessor property represents the offset (in bytes) of a typed array from the start of its ArrayBuffer.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset"},copyWithin:{"!type":"fn(target: number, start: number, end?: number) -> ?","!doc":"The copyWithin() method copies the sequence of array elements within the array to the position starting at target. The copy is taken from the index positions of the second and third arguments start and end. The end argument is optional and defaults to the length of the array. This method has the same algorithm as Array.prototype.copyWithin. TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin"},entries:{"!type":"fn() -> TODO_ITERATOR","!doc":"The entries() method returns a new Array Iterator object that contains the key/value pairs for each index in the array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/entries"},every:{"!type":"fn(callback: fn(currentValue: ?, index: number, array: +TypedArray) -> bool, thisArg?: ?) -> bool","!effects":["call !0 this=!1 !this. number !this"],"!doc":"The every() method tests whether all elements in the typed array pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.every(). TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every"},fill:{"!type":"fn(value: ?, start?: number, end?: number)","!doc":"The fill() method fills all the elements of a typed array from a start index to an end index with a static value. This method has the same algorithm as Array.prototype.fill(). TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill"},filter:{"!type":"fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> !this","!effects":["call !0 this=!1 !this. number"],"!doc":"Creates a new array with all of the elements of this array for which the provided filtering function returns true. See also Array.prototype.filter().","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter"},find:{"!type":"fn(callback: fn(element: ?, index: number, array: +TypedArray) -> bool, thisArg?: ?) -> ?","!effects":["call !0 this=!1 !this. number !this"],"!doc":"The find() method returns a value in the typed array, if an element satisfies the provided testing function. Otherwise undefined is returned. TypedArray is one of the typed array types here.\nSee also the findIndex() method, which returns the index of a found element in the typed array instead of its value.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find"},findIndex:{"!type":"fn(callback: fn(element: ?, index: number, array: +TypedArray) -> bool, thisArg?: ?) -> number","!effects":["call !0 this=!1 !this. number !this"],"!doc":"The findIndex() method returns an index in the typed array, if an element in the typed array satisfies the provided testing function. Otherwise -1 is returned.\nSee also the find() method, which returns the value of a found element in the typed array instead of its index.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex"},forEach:{"!type":"fn(callback: fn(value: ?, key: ?, array: +TypedArray), thisArg?: ?)","!effects":["call !0 this=!1 !this. number !this"],"!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach"},includes:{"!type":"fn(searchElement: ?, fromIndex?: number) -> bool","!doc":"The includes() method determines whether a typed array includes a certain element, returning true or false as appropriate. This method has the same algorithm as Array.prototype.includes(). TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes"},indexOf:{"!type":"fn(searchElement: ?, fromIndex?: number) -> number","!doc":"The indexOf() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present. This method has the same algorithm as Array.prototype.indexOf(). TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf"},join:{"!type":"fn(separator?: string) -> string","!doc":"The join() method joins all elements of an array into a string. This method has the same algorithm as Array.prototype.join(). TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join"},keys:{"!type":"fn() -> TODO_ITERATOR","!doc":"The keys() method returns a new Array Iterator object that contains the keys for each index in the array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/keys"},lastIndexOf:{"!type":"fn(searchElement: ?, fromIndex?: number) -> number","!doc":"The lastIndexOf() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present. The typed array is searched backwards, starting at fromIndex. This method has the same algorithm as Array.prototype.lastIndexOf(). TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf"},length:{"!type":"number","!doc":"Returns the number of elements hold in the typed array. Fixed at construction time and thus read only.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length"},map:{"!type":"fn(f: fn(elt: ?, i: number) -> ?, context?: ?) -> [!0.!ret]","!effects":["call !0 this=!1 !this. number"],"!doc":"Creates a new array with the results of calling a provided function on every element in this array. See also Array.prototype.map().","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map"},reduce:{"!type":"fn(combine: fn(sum: ?, elt: ?, i: number) -> ?, init?: ?) -> !0.!ret","!effects":["call !0 !1 !this. number"],"!doc":"Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value. See also Array.prototype.reduce().","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce"},reduceRight:{"!type":"fn(combine: fn(sum: ?, elt: ?, i: number) -> ?, init?: ?) -> !0.!ret","!effects":["call !0 !1 !this. number"],"!doc":"Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value. See also Array.prototype.reduceRight().","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight"},reverse:{"!type":"fn()","!doc":"The reverse() method reverses a typed array in place. The first typed array element becomes the last and the last becomes the first. This method has the same algorithm as Array.prototype.reverse(). TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse"},set:{"!type":"fn(array: [?], offset?: ?)","!doc":"The set() method stores multiple values in the typed array, reading input values from a specified array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set"},slice:{"!type":"fn(from: number, to?: number) -> !this","!type":"Extracts a section of an array and returns a new array. See also Array.prototype.slice().","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice"},some:{"!type":"fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> bool","!effects":["call !0 this=!1 !this. number"],"!doc":"The some() method tests whether some element in the typed array passes the test implemented by the provided function. This method has the same algorithm as Array.prototype.some(). TypedArray is one of the typed array types here.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some"},sort:{"!type":"fn(compare?: fn(a: ?, b: ?) -> number)","!effects":["call !0 !this. !this."],"!doc":"Sorts the elements of an array in place and returns the array. See also Array.prototype.sort().","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort"},subarray:{"!type":"fn(begin?: number, end?: number) -> +TypedArray","!doc":"The subarray() method returns a new TypedArray on the same ArrayBuffer store and with the same element types as for this TypedArray object. The begin offset is inclusive and the end offset is exclusive. TypedArray is one of the typed array types.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray"},values:{"!type":"fn() -> TODO_ITERATOR","!doc":"The values() method returns a new Array Iterator object that contains the values for each index in the array.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/values"},"prototype[@@iterator]":{"!type":"fn()","!doc":"The initial value of the @@iterator property is the same function object as the initial value of the values property.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/@@iterator"}}},Uint16Array:{"!type":"fn()","!doc":"The Uint16Array typed array represents an array of 16-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of",prototype:{"!proto":"TypedArray.prototype"}},Uint32Array:{"!type":"fn()","!doc":"The Uint32Array typed array represents an array of 32-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of",prototype:{"!proto":"TypedArray.prototype"}},Uint8Array:{"!type":"fn()","!doc":"The Uint8Array typed array represents an array of 8-bit unsigned integers. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of",prototype:{"!proto":"TypedArray.prototype"}},Uint8ClampedArray:{"!type":"fn()","!doc":"The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0-255. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",length:"TypedArray.length",BYTES_PER_ELEMENT:"TypedArray.BYTES_PER_ELEMENT",name:"TypedArray.name",from:"TypedArray.from",of:"TypedArray.of",prototype:{"!proto":"TypedArray.prototype"}},WeakMap:{"!type":"fn(iterable: [?])","!doc":"The WeakMap object is a collection of key/value pairs in which the keys are objects and the values can be arbitrary values.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",prototype:{"delete":{"!type":"fn(key: ?) -> bool","!doc":"The delete() method removes the specified element from a WeakMap object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/delete"},get:{"!type":"fn(key: ?) !this.","!doc":"The get() method returns a specified element from a WeakMap object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/get"},has:{"!type":"fn(key: ?) -> bool","!doc":"The has() method returns a boolean indicating whether an element with the specified key exists in the WeakMap object or not.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/has"},set:{"!type":"fn(key: ?, value: ?)","!doc":"The set() method adds a new element with a specified key and value to a WeakMap object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/set"}}},WeakSet:{"!type":"fn(iterable: [?])","!doc":"The WeakSet object lets you store weakly held objects in a collection.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",prototype:{add:{"!type":"fn(value: ?)","!doc":"The add() method appends a new object to the end of a WeakSet object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/add"},"delete":{"!type":"fn(value: ?) -> bool","!doc":"The delete() method removes the specified element from a WeakSet object.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/delete"},has:{"!type":"fn(value: ?) -> bool","!doc":"The has() method returns a boolean indicating whether an object exists in a WeakSet or not.","!url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/has"}}}} +}),define("json!tern/defs/browser.json",function(){return{"!name":"browser",location:{assign:{"!type":"fn(url: string)","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"Load the document at the provided URL."},replace:{"!type":"fn(url: string)","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"Replace the current document with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session history, meaning the user won't be able to use the Back button to navigate to it."},reload:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"Reload the document from the current URL. forceget is a boolean, which, when it is true, causes the page to always be reloaded from the server. If it is false or not specified, the browser may reload the page from its cache."},origin:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The origin of the URL."},hash:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The part of the URL that follows the # symbol, including the # symbol."},search:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The part of the URL that follows the ? symbol, including the ? symbol."},pathname:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The path (relative to the host)."},port:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The port number of the URL."},hostname:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The host name (without the port number or square brackets)."},host:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The host name and port number."},protocol:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The protocol of the URL."},href:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"The entire URL."},"!url":"https://developer.mozilla.org/en/docs/DOM/window.location","!doc":"Returns a location object with information about the current location of the document. Assigning to the location property changes the current page to the new address."},Node:{"!type":"fn()",prototype:{parentElement:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.parentElement","!doc":"Returns the DOM node's parent Element, or null if the node either has no parent, or its parent isn't a DOM Element."},textContent:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.textContent","!doc":"Gets or sets the text content of a node and its descendants."},baseURI:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.baseURI","!doc":"The absolute base URI of a node or null if unable to obtain an absolute URI."},localName:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.localName","!doc":"Returns the local part of the qualified name of this node."},prefix:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.prefix","!doc":"Returns the namespace prefix of the specified node, or null if no prefix is specified. This property is read only."},namespaceURI:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.namespaceURI","!doc":"The namespace URI of the node, or null if the node is not in a namespace (read-only). When the node is a document, it returns the XML namespace for the current document."},ownerDocument:{"!type":"+Document","!url":"https://developer.mozilla.org/en/docs/DOM/Node.ownerDocument","!doc":"The ownerDocument property returns the top-level document object for this node."},attributes:{"!type":"+NamedNodeMap","!url":"https://developer.mozilla.org/en/docs/DOM/Node.attributes","!doc":"A collection of all attribute nodes registered to the specified node. It is a NamedNodeMap,not an Array, so it has no Array methods and the Attr nodes' indexes may differ among browsers."},nextSibling:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nextSibling","!doc":"Returns the node immediately following the specified one in its parent's childNodes list, or null if the specified node is the last node in that list."},previousSibling:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.previousSibling","!doc":"Returns the node immediately preceding the specified one in its parent's childNodes list, null if the specified node is the first in that list."},lastChild:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.lastChild","!doc":"Returns the last child of a node."},firstChild:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.firstChild","!doc":"Returns the node's first child in the tree, or null if the node is childless. If the node is a Document, it returns the first node in the list of its direct children."},childNodes:{"!type":"+NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/Node.childNodes","!doc":"Returns a collection of child nodes of the given element."},parentNode:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.parentNode","!doc":"Returns the parent of the specified node in the DOM tree."},nodeType:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nodeType","!doc":"Returns an integer code representing the type of the node."},nodeValue:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nodeValue","!doc":"Returns or sets the value of the current node."},nodeName:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nodeName","!doc":"Returns the name of the current node as a string."},tagName:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.nodeName","!doc":"Returns the name of the current node as a string."},insertBefore:{"!type":"fn(newElt: +Element, before: +Element) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.insertBefore","!doc":"Inserts the specified node before a reference element as a child of the current node."},replaceChild:{"!type":"fn(newElt: +Element, oldElt: +Element) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.replaceChild","!doc":"Replaces one child node of the specified element with another."},removeChild:{"!type":"fn(oldElt: +Element) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.removeChild","!doc":"Removes a child node from the DOM. Returns removed node."},appendChild:{"!type":"fn(newElt: +Element) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.appendChild","!doc":"Adds a node to the end of the list of children of a specified parent node. If the node already exists it is removed from current parent node, then added to new parent node."},hasChildNodes:{"!type":"fn() -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.hasChildNodes","!doc":"Returns a Boolean value indicating whether the current Node has child nodes or not."},cloneNode:{"!type":"fn(deep: bool) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Node.cloneNode","!doc":"Returns a duplicate of the node on which this method was called."},normalize:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/Node.normalize","!doc":'Puts the specified node and all of its subtree into a "normalized" form. In a normalized subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.'},isSupported:{"!type":"fn(features: string, version: number) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.isSupported","!doc":"Tests whether the DOM implementation implements a specific feature and that feature is supported by this node."},hasAttributes:{"!type":"fn() -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.hasAttributes","!doc":"Returns a boolean value of true or false, indicating if the current element has any attributes or not."},lookupPrefix:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.lookupPrefix","!doc":"Returns the prefix for a given namespaceURI if present, and null if not. When multiple prefixes are possible, the result is implementation-dependent."},isDefaultNamespace:{"!type":"fn(uri: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.isDefaultNamespace","!doc":"Accepts a namespace URI as an argument and returns true if the namespace is the default namespace on the given node or false if not."},lookupNamespaceURI:{"!type":"fn(uri: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/Node.lookupNamespaceURI","!doc":"Takes a prefix and returns the namespaceURI associated with it on the given node if found (and null if not). Supplying null for the prefix will return the default namespace."},addEventListener:{"!type":"fn(type: string, listener: fn(e: +Event), capture: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.addEventListener","!doc":"Registers a single event listener on a single target. The event target may be a single element in a document, the document itself, a window, or an XMLHttpRequest."},removeEventListener:{"!type":"fn(type: string, listener: fn(), capture: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.removeEventListener","!doc":"Allows the removal of event listeners from the event target."},isSameNode:{"!type":"fn(other: +Node) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.isSameNode","!doc":"Tests whether two nodes are the same, that is they reference the same object."},isEqualNode:{"!type":"fn(other: +Node) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.isEqualNode","!doc":"Tests whether two nodes are equal."},compareDocumentPosition:{"!type":"fn(other: +Node) -> number","!url":"https://developer.mozilla.org/en/docs/DOM/Node.compareDocumentPosition","!doc":"Compares the position of the current node against another node in any other document."},contains:{"!type":"fn(other: +Node) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/Node.contains","!doc":"Indicates whether a node is a descendent of a given node."},dispatchEvent:{"!type":"fn(event: +Event) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/EventTarget.dispatchEvent","!doc":"Dispatches an event into the event system. The event is subject to the same capturing and bubbling behavior as directly dispatched events."},ELEMENT_NODE:"number",ATTRIBUTE_NODE:"number",TEXT_NODE:"number",CDATA_SECTION_NODE:"number",ENTITY_REFERENCE_NODE:"number",ENTITY_NODE:"number",PROCESSING_INSTRUCTION_NODE:"number",COMMENT_NODE:"number",DOCUMENT_NODE:"number",DOCUMENT_TYPE_NODE:"number",DOCUMENT_FRAGMENT_NODE:"number",NOTATION_NODE:"number",DOCUMENT_POSITION_DISCONNECTED:"number",DOCUMENT_POSITION_PRECEDING:"number",DOCUMENT_POSITION_FOLLOWING:"number",DOCUMENT_POSITION_CONTAINS:"number",DOCUMENT_POSITION_CONTAINED_BY:"number",DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:"number"},"!url":"https://developer.mozilla.org/en/docs/DOM/Node","!doc":"A Node is an interface from which a number of DOM types inherit, and allows these various types to be treated (or tested) similarly."},Element:{"!type":"fn()",prototype:{"!proto":"Node.prototype",getAttribute:{"!type":"fn(name: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/element.getAttribute","!doc":'Returns the value of the named attribute on the specified element. If the named attribute does not exist, the value returned will either be null or "" (the empty string).'},setAttribute:{"!type":"fn(name: string, value: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.setAttribute","!doc":"Adds a new attribute or changes the value of an existing attribute on the specified element."},removeAttribute:{"!type":"fn(name: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.removeAttribute","!doc":"Removes an attribute from the specified element."},getAttributeNode:{"!type":"fn(name: string) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.getAttributeNode","!doc":"Returns the specified attribute of the specified element, as an Attr node."},getElementsByTagName:{"!type":"fn(tagName: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/element.getElementsByTagName","!doc":"Returns a list of elements with the given tag name. The subtree underneath the specified element is searched, excluding the element itself. The returned list is live, meaning that it updates itself with the DOM tree automatically. Consequently, there is no need to call several times element.getElementsByTagName with the same element and arguments."},getElementsByTagNameNS:{"!type":"fn(ns: string, tagName: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/element.getElementsByTagNameNS","!doc":"Returns a list of elements with the given tag name belonging to the given namespace."},getAttributeNS:{"!type":"fn(ns: string, name: string) -> string","!url":"https://developer.mozilla.org/en/docs/DOM/element.getAttributeNS","!doc":'Returns the string value of the attribute with the specified namespace and name. If the named attribute does not exist, the value returned will either be null or "" (the empty string).'},setAttributeNS:{"!type":"fn(ns: string, name: string, value: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.setAttributeNS","!doc":"Adds a new attribute or changes the value of an attribute with the given namespace and name."},removeAttributeNS:{"!type":"fn(ns: string, name: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.removeAttributeNS","!doc":"removeAttributeNS removes the specified attribute from an element."},getAttributeNodeNS:{"!type":"fn(ns: string, name: string) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.getAttributeNodeNS","!doc":"Returns the Attr node for the attribute with the given namespace and name."},hasAttribute:{"!type":"fn(name: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/element.hasAttribute","!doc":"hasAttribute returns a boolean value indicating whether the specified element has the specified attribute or not."},hasAttributeNS:{"!type":"fn(ns: string, name: string) -> bool","!url":"https://developer.mozilla.org/en/docs/DOM/element.hasAttributeNS","!doc":"hasAttributeNS returns a boolean value indicating whether the current element has the specified attribute."},focus:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/element.focus","!doc":"Sets focus on the specified element, if it can be focused."},blur:{"!type":"fn()","!url":"https://developer.mozilla.org/en/docs/DOM/element.blur","!doc":"The blur method removes keyboard focus from the current element."},scrollIntoView:{"!type":"fn(top: bool)","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollIntoView","!doc":"The scrollIntoView() method scrolls the element into view."},scrollByLines:{"!type":"fn(lines: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollByLines","!doc":"Scrolls the document by the given number of lines."},scrollByPages:{"!type":"fn(pages: number)","!url":"https://developer.mozilla.org/en/docs/DOM/window.scrollByPages","!doc":"Scrolls the current document by the specified number of pages."},getElementsByClassName:{"!type":"fn(name: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/document.getElementsByClassName","!doc":"Returns a set of elements which have all the given class names. When called on the document object, the complete document is searched, including the root node. You may also call getElementsByClassName on any element; it will return only elements which are descendants of the specified root element with the given class names."},querySelector:{"!type":"fn(selectors: string) -> +Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.querySelector","!doc":"Returns the first element that is a descendent of the element on which it is invoked that matches the specified group of selectors."},querySelectorAll:{"!type":"fn(selectors: string) -> +NodeList","!url":"https://developer.mozilla.org/en/docs/DOM/Element.querySelectorAll","!doc":"Returns a non-live NodeList of all elements descended from the element on which it is invoked that match the specified group of CSS selectors."},getClientRects:{"!type":"fn() -> [+ClientRect]","!url":"https://developer.mozilla.org/en/docs/DOM/element.getClientRects","!doc":"Returns a collection of rectangles that indicate the bounding rectangles for each box in a client."},getBoundingClientRect:{"!type":"fn() -> +ClientRect","!url":"https://developer.mozilla.org/en/docs/DOM/element.getBoundingClientRect","!doc":"Returns a text rectangle object that encloses a group of text rectangles."},setAttributeNode:{"!type":"fn(attr: +Attr) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.setAttributeNode","!doc":"Adds a new Attr node to the specified element."},removeAttributeNode:{"!type":"fn(attr: +Attr) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.removeAttributeNode","!doc":"Removes the specified attribute from the current element."},setAttributeNodeNS:{"!type":"fn(attr: +Attr) -> +Attr","!url":"https://developer.mozilla.org/en/docs/DOM/element.setAttributeNodeNS","!doc":"Adds a new namespaced attribute node to an element."},insertAdjacentHTML:{"!type":"fn(position: string, text: string)","!url":"https://developer.mozilla.org/en/docs/DOM/element.insertAdjacentHTML","!doc":"Parses the specified text as HTML or XML and inserts the resulting nodes into the DOM tree at a specified position. It does not reparse the element it is being used on and thus it does not corrupt the existing elements inside the element. This, and avoiding the extra step of serialization make it much faster than direct innerHTML manipulation."},children:{"!type":"+HTMLCollection","!url":"https://developer.mozilla.org/en/docs/DOM/Element.children","!doc":"Returns a collection of child elements of the given element."},childElementCount:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/Element.childElementCount","!doc":"Returns the number of child elements of the given element."},className:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/element.className","!doc":"Gets and sets the value of the class attribute of the specified element."},style:{cssText:"string",alignmentBaseline:"string",background:"string",backgroundAttachment:"string",backgroundClip:"string",backgroundColor:"string",backgroundImage:"string",backgroundOrigin:"string",backgroundPosition:"string",backgroundPositionX:"string",backgroundPositionY:"string",backgroundRepeat:"string",backgroundRepeatX:"string",backgroundRepeatY:"string",backgroundSize:"string",baselineShift:"string",border:"string",borderBottom:"string",borderBottomColor:"string",borderBottomLeftRadius:"string",borderBottomRightRadius:"string",borderBottomStyle:"string",borderBottomWidth:"string",borderCollapse:"string",borderColor:"string",borderImage:"string",borderImageOutset:"string",borderImageRepeat:"string",borderImageSlice:"string",borderImageSource:"string",borderImageWidth:"string",borderLeft:"string",borderLeftColor:"string",borderLeftStyle:"string",borderLeftWidth:"string",borderRadius:"string",borderRight:"string",borderRightColor:"string",borderRightStyle:"string",borderRightWidth:"string",borderSpacing:"string",borderStyle:"string",borderTop:"string",borderTopColor:"string",borderTopLeftRadius:"string",borderTopRightRadius:"string",borderTopStyle:"string",borderTopWidth:"string",borderWidth:"string",bottom:"string",boxShadow:"string",boxSizing:"string",captionSide:"string",clear:"string",clip:"string",clipPath:"string",clipRule:"string",color:"string",colorInterpolation:"string",colorInterpolationFilters:"string",colorProfile:"string",colorRendering:"string",content:"string",counterIncrement:"string",counterReset:"string",cursor:"string",direction:"string",display:"string",dominantBaseline:"string",emptyCells:"string",enableBackground:"string",fill:"string",fillOpacity:"string",fillRule:"string",filter:"string","float":"string",floodColor:"string",floodOpacity:"string",font:"string",fontFamily:"string",fontSize:"string",fontStretch:"string",fontStyle:"string",fontVariant:"string",fontWeight:"string",glyphOrientationHorizontal:"string",glyphOrientationVertical:"string",height:"string",imageRendering:"string",kerning:"string",left:"string",letterSpacing:"string",lightingColor:"string",lineHeight:"string",listStyle:"string",listStyleImage:"string",listStylePosition:"string",listStyleType:"string",margin:"string",marginBottom:"string",marginLeft:"string",marginRight:"string",marginTop:"string",marker:"string",markerEnd:"string",markerMid:"string",markerStart:"string",mask:"string",maxHeight:"string",maxWidth:"string",minHeight:"string",minWidth:"string",opacity:"string",orphans:"string",outline:"string",outlineColor:"string",outlineOffset:"string",outlineStyle:"string",outlineWidth:"string",overflow:"string",overflowWrap:"string",overflowX:"string",overflowY:"string",padding:"string",paddingBottom:"string",paddingLeft:"string",paddingRight:"string",paddingTop:"string",page:"string",pageBreakAfter:"string",pageBreakBefore:"string",pageBreakInside:"string",pointerEvents:"string",position:"string",quotes:"string",resize:"string",right:"string",shapeRendering:"string",size:"string",speak:"string",src:"string",stopColor:"string",stopOpacity:"string",stroke:"string",strokeDasharray:"string",strokeDashoffset:"string",strokeLinecap:"string",strokeLinejoin:"string",strokeMiterlimit:"string",strokeOpacity:"string",strokeWidth:"string",tabSize:"string",tableLayout:"string",textAlign:"string",textAnchor:"string",textDecoration:"string",textIndent:"string",textLineThrough:"string",textLineThroughColor:"string",textLineThroughMode:"string",textLineThroughStyle:"string",textLineThroughWidth:"string",textOverflow:"string",textOverline:"string",textOverlineColor:"string",textOverlineMode:"string",textOverlineStyle:"string",textOverlineWidth:"string",textRendering:"string",textShadow:"string",textTransform:"string",textUnderline:"string",textUnderlineColor:"string",textUnderlineMode:"string",textUnderlineStyle:"string",textUnderlineWidth:"string",top:"string",unicodeBidi:"string",unicodeRange:"string",vectorEffect:"string",verticalAlign:"string",visibility:"string",whiteSpace:"string",width:"string",wordBreak:"string",wordSpacing:"string",wordWrap:"string",writingMode:"string",zIndex:"string",zoom:"string","!url":"https://developer.mozilla.org/en/docs/DOM/element.style","!doc":"Returns an object that represents the element's style attribute."},classList:{"!type":"+DOMTokenList","!url":"https://developer.mozilla.org/en/docs/DOM/element.classList","!doc":"Returns a token list of the class attribute of the element."},contentEditable:{"!type":"bool","!url":"https://developer.mozilla.org/en/docs/DOM/Element.contentEditable","!doc":"Indicates whether or not the element is editable."},firstElementChild:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.firstElementChild","!doc":"Returns the element's first child element or null if there are no child elements."},lastElementChild:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.lastElementChild","!doc":"Returns the element's last child element or null if there are no child elements."},nextElementSibling:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.nextElementSibling","!doc":"Returns the element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list."},previousElementSibling:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/Element.previousElementSibling","!doc":"Returns the element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list."},tabIndex:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.tabIndex","!doc":"Gets/sets the tab order of the current element."},title:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/element.title","!doc":"Establishes the text to be displayed in a 'tool tip' popup when the mouse is over the displayed node."},width:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetWidth","!doc":"Returns the layout width of an element."},height:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetHeight","!doc":"Height of an element relative to the element's offsetParent."},getContext:{"!type":"fn(id: string) -> CanvasRenderingContext2D","!url":"https://developer.mozilla.org/en/docs/DOM/HTMLCanvasElement","!doc":"DOM canvas elements expose the HTMLCanvasElement interface, which provides properties and methods for manipulating the layout and presentation of canvas elements. The HTMLCanvasElement interface inherits the properties and methods of the element object interface."},supportsContext:"fn(id: string) -> bool",oncopy:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.oncopy","!doc":"The oncopy property returns the onCopy event handler code on the current element."},oncut:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.oncut","!doc":"The oncut property returns the onCut event handler code on the current element."},onpaste:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onpaste","!doc":"The onpaste property returns the onPaste event handler code on the current element."},onbeforeunload:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/HTML/Element/body","!doc":"The HTML element represents the main content of an HTML document. There is only one element in a document."},onfocus:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onfocus","!doc":"The onfocus property returns the onFocus event handler code on the current element."},onblur:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onblur","!doc":"The onblur property returns the onBlur event handler code, if any, that exists on the current element."},onchange:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onchange","!doc":"The onchange property sets and returns the onChange event handler code for the current element."},onclick:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onclick","!doc":"The onclick property returns the onClick event handler code on the current element."},ondblclick:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.ondblclick","!doc":"The ondblclick property returns the onDblClick event handler code on the current element."},onmousedown:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmousedown","!doc":"The onmousedown property returns the onMouseDown event handler code on the current element."},onmouseup:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmouseup","!doc":"The onmouseup property returns the onMouseUp event handler code on the current element."},onmousewheel:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/wheel","!doc":"The wheel event is fired when a wheel button of a pointing device (usually a mouse) is rotated. This event deprecates the legacy mousewheel event."},onmouseover:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmouseover","!doc":"The onmouseover property returns the onMouseOver event handler code on the current element."},onmouseout:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmouseout","!doc":"The onmouseout property returns the onMouseOut event handler code on the current element."},onmousemove:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onmousemove","!doc":"The onmousemove property returns the mousemove event handler code on the current element."},oncontextmenu:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/window.oncontextmenu","!doc":'An event handler property for right-click events on the window. Unless the default behavior is prevented, the browser context menu will activate. Note that this event will occur with any non-disabled right-click event and does not depend on an element possessing the "contextmenu" attribute.'},onkeydown:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onkeydown","!doc":"The onkeydown property returns the onKeyDown event handler code on the current element."},onkeyup:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onkeyup","!doc":"The onkeyup property returns the onKeyUp event handler code for the current element."},onkeypress:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onkeypress","!doc":"The onkeypress property sets and returns the onKeyPress event handler code for the current element."},onresize:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onresize","!doc":"onresize returns the element's onresize event handler code. It can also be used to set the code to be executed when the resize event occurs."},onscroll:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/element.onscroll","!doc":"The onscroll property returns the onScroll event handler code on the current element."},ondragstart:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DragDrop/Drag_Operations","!doc":"The following describes the steps that occur during a drag and drop operation."},ondragover:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/dragover","!doc":"The dragover event is fired when an element or text selection is being dragged over a valid drop target (every few hundred milliseconds)."},ondragleave:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/dragleave","!doc":"The dragleave event is fired when a dragged element or text selection leaves a valid drop target."},ondragenter:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/dragenter","!doc":"The dragenter event is fired when a dragged element or text selection enters a valid drop target."},ondragend:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/dragend","!doc":"The dragend event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key)."},ondrag:{"!type":"?","!url":"https://developer.mozilla.org/en/docs/DOM/Mozilla_event_reference/drag","!doc":"The drag event is fired when an element or text selection is being dragged (every few hundred milliseconds)."},offsetTop:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetTop","!doc":"Returns the distance of the current element relative to the top of the offsetParent node."},offsetLeft:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetLeft","!doc":"Returns the number of pixels that the upper left corner of the current element is offset to the left within the offsetParent node."},offsetHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetHeight","!doc":"Height of an element relative to the element's offsetParent."},offsetWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.offsetWidth","!doc":"Returns the layout width of an element."},scrollTop:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollTop","!doc":"Gets or sets the number of pixels that the content of an element is scrolled upward."},scrollLeft:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollLeft","!doc":"Gets or sets the number of pixels that an element's content is scrolled to the left."},scrollHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollHeight","!doc":"Height of the scroll view of an element; it includes the element padding but not its margin."},scrollWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.scrollWidth","!doc":"Read-only property that returns either the width in pixels of the content of an element or the width of the element itself, whichever is greater."},clientTop:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.clientTop","!doc":"The width of the top border of an element in pixels. It does not include the top margin or padding. clientTop is read-only."},clientLeft:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.clientLeft","!doc":"The width of the left border of an element in pixels. It includes the width of the vertical scrollbar if the text direction of the element is right-to-left and if there is an overflow causing a left vertical scrollbar to be rendered. clientLeft does not include the left margin or the left padding. clientLeft is read-only."},clientHeight:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.clientHeight","!doc":"Returns the inner height of an element in pixels, including padding but not the horizontal scrollbar height, border, or margin."},clientWidth:{"!type":"number","!url":"https://developer.mozilla.org/en/docs/DOM/element.clientWidth","!doc":"The inner width of an element in pixels. It includes padding but not the vertical scrollbar (if present, if rendered), border or margin."},innerHTML:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/element.innerHTML","!doc":"Sets or gets the HTML syntax describing the element's descendants."},createdCallback:{"!type":"fn()","!url":"http://w3c.github.io/webcomponents/spec/custom/index.html#dfn-created-callback","!doc":"This callback is invoked after custom element instance is created and its definition is registered. The actual timing of this callback is defined further in this specification."},attachedCallback:{"!type":"fn()","!url":"http://w3c.github.io/webcomponents/spec/custom/index.html#dfn-entered-view-callback","!doc":"Unless specified otherwise, this callback must be enqueued whenever custom element is inserted into a document and this document has a browsing context."},detachedCallback:{"!type":"fn()","!url":"http://w3c.github.io/webcomponents/spec/custom/index.html#dfn-left-view-callback","!doc":"Unless specified otherwise, this callback must be enqueued whenever custom element is removed from the document and this document has a browsing context."},attributeChangedCallback:{"!type":"fn()","!url":"http://w3c.github.io/webcomponents/spec/custom/index.html#dfn-attribute-changed-callback","!doc":"Unless specified otherwise, this callback must be enqueued whenever custom element's attribute is added, changed or removed."}},"!url":"https://developer.mozilla.org/en/docs/DOM/Element","!doc":"Represents an element in an HTML or XML document."},Text:{"!type":"fn()",prototype:{"!proto":"Node.prototype",wholeText:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/Text.wholeText","!doc":"Returns all text of all Text nodes logically adjacent to the node. The text is concatenated in document order. This allows you to specify any text node and obtain all adjacent text as a single string."},splitText:{"!type":"fn(offset: number) -> +Text","!url":"https://developer.mozilla.org/en/docs/DOM/Text.splitText","!doc":"Breaks the Text node into two nodes at the specified offset, keeping both nodes in the tree as siblings."}},"!url":"https://developer.mozilla.org/en/docs/DOM/Text","!doc":"In the DOM, the Text interface represents the textual content of an Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children."},Document:{"!type":"fn()",prototype:{"!proto":"Node.prototype",activeElement:{"!type":"+Element","!url":"https://developer.mozilla.org/en/docs/DOM/document.activeElement","!doc":"Returns the currently focused element, that is, the element that will get keystroke events if the user types any. This attribute is read only."},compatMode:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.compatMode","!doc":"Indicates whether the document is rendered in Quirks mode or Strict mode."},designMode:{"!type":"string","!url":"https://developer.mozilla.org/en/docs/DOM/document.designMode","!doc":"Can be used to make any document editable, for example in a