Merge m-c to autoland, a=merge
authorWes Kocher <wkocher@mozilla.com>
Mon, 08 May 2017 16:24:51 -0700
changeset 407631 cfba1f56a0add4354f0d33f71cdf0d8dce0fcf77
parent 407630 e426d513c19c8533b405a20c538d6ef255572c2b (current diff)
parent 407588 b21b974d60d3075ae24f6fb1bae75d0f122f28fc (diff)
child 407632 1464933ce7c8732d64b121c9b3f961b6fba26b34
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge m-c to autoland, a=merge MozReview-Commit-ID: 3BrkDVl7521
.eslintignore
browser/app/profile/firefox.js
browser/components/downloads/DownloadsCommon.jsm
browser/components/downloads/test/browser/browser_downloads_panel_footer.js
dom/base/ScriptSettings.cpp
dom/base/ScriptSettings.h
dom/base/nsIScriptElement.h
dom/base/nsIScriptLoaderObserver.idl
dom/base/nsScriptElement.cpp
dom/base/nsScriptElement.h
dom/base/nsScriptLoader.cpp
dom/base/nsScriptLoader.h
toolkit/library/gtest/rust/Cargo.lock
toolkit/library/rust/Cargo.lock
--- a/.eslintignore
+++ b/.eslintignore
@@ -4,17 +4,16 @@
 # Exclude expected objdirs.
 obj*/**
 
 # We ignore all these directories by default, until we get them enabled.
 # If you are enabling a directory, please add directory specific exclusions
 # below.
 addon-sdk/**
 build/**
-caps/**
 chrome/**
 config/**
 db/**
 docshell/**
 editor/**
 embedding/**
 extensions/**
 gfx/**
@@ -73,16 +72,19 @@ browser/extensions/pocket/content/panels
 browser/extensions/pocket/content/panels/js/vendor/**
 browser/locales/**
 # generated or library files in activity-stream
 browser/extensions/activity-stream/data/content/activity-stream.bundle.js
 browser/extensions/activity-stream/vendor/**
 # imported from chromium
 browser/extensions/mortar/**
 
+# caps/ exclusions
+caps/tests/mochitest/browser_checkloaduri.js
+
 # devtools/ exclusions
 devtools/client/canvasdebugger/**
 devtools/client/commandline/**
 devtools/client/debugger/**
 devtools/client/framework/**
 !devtools/client/framework/devtools.js
 !devtools/client/framework/devtools-browser.js
 !devtools/client/framework/selection.js
--- a/accessible/tests/mochitest/treeupdate/test_ariaowns.html
+++ b/accessible/tests/mochitest/treeupdate/test_ariaowns.html
@@ -671,16 +671,68 @@
         testAccessibleTree("t9_container", tree);
       }
 
       this.getID = () => {
         return `Set ARIA owns on a document (part3)`;
       }
     }
 
+    /**
+     * Put ARIA owned child back when ARIA owner removed.
+     */
+    function test10_removeARIAOwner()
+    {
+      this.eventSeq = [
+        new invokerChecker(EVENT_HIDE, getAccessible('t10_owner'))
+      ];
+
+      this.invoke = () => {
+        let tree =
+          { SECTION: [ // t10_container
+            { SECTION: [ // t10_owner
+              { ENTRY: [] } // t10_child
+            ] }
+          ] };
+        testAccessibleTree('t10_container', tree);
+
+        getNode('t10_owner').remove();
+      }
+
+      this.getID = () => {
+        return 'Put aria owned child back when aria owner removed';
+      }
+    }
+
+    function test10_finishTest()
+    {
+      this.eventSeq = [
+        new invokerChecker(EVENT_REORDER, 't10_container')
+      ];
+
+      this.invoke = () => {
+        // trigger a tree update.
+        getNode('t10_container').append(document.createElement('p'));
+      }
+
+      this.finalCheck = () => {
+        let tree =
+          { SECTION: [ // t10_container
+            // { ENTRY: [] }, // t10_child
+            { PARAGRAPH: [] }
+          ] };
+        testAccessibleTree('t10_container', tree);
+        todo(false, 'Input accessible has be moved back in the tree');
+      }
+
+      this.getID = () => {
+        return `Put aria owned child back when aria owner removed (finish test)`;
+      }
+    }
+
     ////////////////////////////////////////////////////////////////////////////
     // Test
     ////////////////////////////////////////////////////////////////////////////
 
     //gA11yEventDumpToConsole = true;
     //enableLogging("tree,eventTree,verbose"); // debug stuff
 
     var gQueue = null;
@@ -723,16 +775,19 @@
 
       gQueue.push(new setARIAOwnsOnElToRemove("t7_parent", "t7_child"));
 
       gQueue.push(new test8());
       gQueue.push(new test9_prepare());
       gQueue.push(new test9_setARIAOwns());
       gQueue.push(new test9_finish());
 
+      gQueue.push(new test10_removeARIAOwner());
+      gQueue.push(new test10_finishTest());
+
       gQueue.invoke(); // SimpleTest.finish() will be called in the end
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
 
   </script>
 </head>
@@ -787,11 +842,16 @@
     </div>
   </div>
 
   <div id="t8_container">
     <input id="t8_button" type="button"><span id="t8_span"><input><input><input></span>
   </div>
 
   <iframe id="t9_container"></iframe>
+
+  <div id="t10_container">
+    <div id="t10_owner" aria-owns="t10_child"></div>
+    <input id="t10_child">
+  </div>
 </body>
 
 </html>
--- a/browser/app/blocklist.xml
+++ b/browser/app/blocklist.xml
@@ -112,16 +112,20 @@
     <emItem blockID="i523" id="/^({7e8a1050-cf67-4575-92df-dcc60e7d952d}|{b3420a9c-a397-4409-b90d-bcf22da1a08a}|{eca6641f-2176-42ba-bdbe-f3e327f8e0af}|{707dca12-3f99-4d94-afea-06dcc0ae0108}|{aea20431-87fc-40be-bc5b-18066fe2819c}|{30ee6676-1ba6-455a-a7e8-298fa863a546})$/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i732" id="{e935dd68-f90d-46a6-b89e-c4657534b353}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
+    <emItem blockID="edad04eb-ea16-42f3-a4a7-20dded33cc37" id="@safesearchscoutee">
+      <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
+    </emItem>
     <emItem blockID="i436" id="/(\{7aeae561-714b-45f6-ace3-4a8aed6e227b\})|(\{01e86e69-a2f8-48a0-b068-83869bdba3d0\})|(\{77f5fe49-12e3-4cf5-abb4-d993a0164d9e\})/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i700" id="2bbadf1f-a5af-499f-9642-9942fcdb7c76@f05a14cc-8842-4eee-be17-744677a917ed.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
@@ -176,16 +180,20 @@
     <emItem blockID="i626" id="{20AD702C-661E-4534-8CE9-BA4EC9AD6ECC}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i334" id="{0F827075-B026-42F3-885D-98981EE7B1AE}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
+    <emItem blockID="3fd71895-7fc6-4f3f-aa22-1cbb0c5fd922" id="/^({95E84BD3-3604-4AAC-B2CA-D9AC3E55B64B}|{E3605470-291B-44EB-8648-745EE356599A}|{95E5E0AD-65F9-4FFC-A2A2-0008DCF6ED25}|{FF20459C-DA6E-41A7-80BC-8F4FEFD9C575}|{6E727987-C8EA-44DA-8749-310C0FBE3C3E}|{12E8A6C2-B125-479F-AB3C-13B8757C7F04}|{EB6628CF-0675-4DAE-95CE-EFFA23169743})$/">
+      <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
+    </emItem>
     <emItem blockID="i716" id="{cc6cc772-f121-49e0-b1f0-c26583cb0c5e}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i501" id="xivars@aol.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -355,22 +355,16 @@ pref("browser.download.loglevel", "Error
 // feedback from their action.
 pref("browser.download.saveLinkAsFilenameTimeout", 4000);
 
 pref("browser.download.useDownloadDir", true);
 pref("browser.download.folderList", 1);
 pref("browser.download.manager.addToRecentDocs", true);
 pref("browser.download.manager.resumeOnWakeDelay", 10000);
 
-#ifdef RELEASE_OR_BETA
-pref("browser.download.showPanelDropmarker", false);
-#else
-pref("browser.download.showPanelDropmarker", true);
-#endif
-
 // This allows disabling the animated notifications shown by
 // the Downloads Indicator when a download starts or completes.
 pref("browser.download.animateNotifications", true);
 
 // This records whether or not the panel has been shown at least once.
 pref("browser.download.panel.shown", false);
 
 #ifndef XP_MACOSX
--- a/browser/components/downloads/DownloadsCommon.jsm
+++ b/browser/components/downloads/DownloadsCommon.jsm
@@ -66,18 +66,16 @@ XPCOMUtils.defineLazyGetter(this, "Downl
   let { ConsoleAPI } = Cu.import("resource://gre/modules/Console.jsm", {});
   let consoleOptions = {
     maxLogLevelPref: "browser.download.loglevel",
     prefix: "Downloads"
   };
   return new ConsoleAPI(consoleOptions);
 });
 
-const nsIDM = Ci.nsIDownloadManager;
-
 const kDownloadsStringBundleUrl =
   "chrome://browser/locale/downloads/downloads.properties";
 
 const kDownloadsStringsRequiringFormatting = {
   sizeWithUnits: true,
   statusSeparator: true,
   statusSeparatorBeforeNumber: true,
   fileExecutableSecurityWarning: true
@@ -119,27 +117,39 @@ var PrefObserver = {
       });
     }
   },
 };
 
 PrefObserver.register({
   // prefName: defaultValue
   animateNotifications: true,
-  showPanelDropmarker: true,
 });
 
 
 // DownloadsCommon
 
 /**
  * This object is exposed directly to the consumers of this JavaScript module,
  * and provides shared methods for all the instances of the user interface.
  */
 this.DownloadsCommon = {
+  // The following legacy constants are still returned by stateOfDownload, but
+  // individual properties of the Download object should normally be used.
+  DOWNLOAD_NOTSTARTED: -1,
+  DOWNLOAD_DOWNLOADING: 0,
+  DOWNLOAD_FINISHED: 1,
+  DOWNLOAD_FAILED: 2,
+  DOWNLOAD_CANCELED: 3,
+  DOWNLOAD_PAUSED: 4,
+  DOWNLOAD_BLOCKED_PARENTAL: 6,
+  DOWNLOAD_DIRTY: 8,
+  DOWNLOAD_BLOCKED_POLICY: 9,
+
+  // The following are the possible values of the "attention" property.
   ATTENTION_NONE: "",
   ATTENTION_SUCCESS: "success",
   ATTENTION_WARNING: "warning",
   ATTENTION_SEVERE: "severe",
 
   /**
    * Returns an object whose keys are the string names from the downloads string
    * bundle, and whose values are either the translated strings or functions
@@ -179,23 +189,16 @@ this.DownloadsCommon = {
    * Indicates whether we should show visual notification on the indicator
    * when a download event is triggered.
    */
   get animateNotifications() {
     return PrefObserver.animateNotifications;
   },
 
   /**
-   * Indicates whether we should show the dropmarker in the Downloads Panel.
-   */
-  get showPanelDropmarker() {
-    return PrefObserver.showPanelDropmarker;
-  },
-
-  /**
    * Get access to one of the DownloadsData or PrivateDownloadsData objects,
    * depending on the privacy status of the window in question.
    *
    * @param aWindow
    *        The browser window which owns the download button.
    */
   getData(aWindow) {
     if (PrivateBrowsingUtils.isContentWindowPrivate(aWindow)) {
@@ -251,37 +254,37 @@ this.DownloadsCommon = {
   _privateSummary: null,
 
   /**
    * Returns the legacy state integer value for the provided Download object.
    */
   stateOfDownload(download) {
     // Collapse state using the correct priority.
     if (!download.stopped) {
-      return nsIDM.DOWNLOAD_DOWNLOADING;
+      return DownloadsCommon.DOWNLOAD_DOWNLOADING;
     }
     if (download.succeeded) {
-      return nsIDM.DOWNLOAD_FINISHED;
+      return DownloadsCommon.DOWNLOAD_FINISHED;
     }
     if (download.error) {
       if (download.error.becauseBlockedByParentalControls) {
-        return nsIDM.DOWNLOAD_BLOCKED_PARENTAL;
+        return DownloadsCommon.DOWNLOAD_BLOCKED_PARENTAL;
       }
       if (download.error.becauseBlockedByReputationCheck) {
-        return nsIDM.DOWNLOAD_DIRTY;
+        return DownloadsCommon.DOWNLOAD_DIRTY;
       }
-      return nsIDM.DOWNLOAD_FAILED;
+      return DownloadsCommon.DOWNLOAD_FAILED;
     }
     if (download.canceled) {
       if (download.hasPartialData) {
-        return nsIDM.DOWNLOAD_PAUSED;
+        return DownloadsCommon.DOWNLOAD_PAUSED;
       }
-      return nsIDM.DOWNLOAD_CANCELED;
+      return DownloadsCommon.DOWNLOAD_CANCELED;
     }
-    return nsIDM.DOWNLOAD_NOTSTARTED;
+    return DownloadsCommon.DOWNLOAD_NOTSTARTED;
   },
 
   /**
    * Helper function required because the Downloads Panel and the Downloads View
    * don't share the controller yet.
    */
   removeAndFinalizeDownload(download) {
     Downloads.getList(Downloads.ALL)
--- a/browser/components/downloads/DownloadsViewUI.jsm
+++ b/browser/components/downloads/DownloadsViewUI.jsm
@@ -320,28 +320,28 @@ this.DownloadsViewUI.DownloadElementShel
   /**
    * Returns the name of the default command to use for the current state of the
    * download, when there is a double click or another default interaction. If
    * there is no default command for the current state, returns an empty string.
    * The commands are implemented as functions on this object or derived ones.
    */
   get currentDefaultCommandName() {
     switch (DownloadsCommon.stateOfDownload(this.download)) {
-      case Ci.nsIDownloadManager.DOWNLOAD_NOTSTARTED:
+      case DownloadsCommon.DOWNLOAD_NOTSTARTED:
         return "downloadsCmd_cancel";
-      case Ci.nsIDownloadManager.DOWNLOAD_FAILED:
-      case Ci.nsIDownloadManager.DOWNLOAD_CANCELED:
+      case DownloadsCommon.DOWNLOAD_FAILED:
+      case DownloadsCommon.DOWNLOAD_CANCELED:
         return "downloadsCmd_retry";
-      case Ci.nsIDownloadManager.DOWNLOAD_PAUSED:
+      case DownloadsCommon.DOWNLOAD_PAUSED:
         return "downloadsCmd_pauseResume";
-      case Ci.nsIDownloadManager.DOWNLOAD_FINISHED:
+      case DownloadsCommon.DOWNLOAD_FINISHED:
         return "downloadsCmd_open";
-      case Ci.nsIDownloadManager.DOWNLOAD_BLOCKED_PARENTAL:
+      case DownloadsCommon.DOWNLOAD_BLOCKED_PARENTAL:
         return "downloadsCmd_openReferrer";
-      case Ci.nsIDownloadManager.DOWNLOAD_DIRTY:
+      case DownloadsCommon.DOWNLOAD_DIRTY:
         return "downloadsCmd_showBlockedInfo";
     }
     return "";
   },
 
   /**
    * Returns true if the specified command can be invoked on the current item.
    * The commands are implemented as functions on this object or derived ones.
--- a/browser/components/downloads/content/allDownloadsViewOverlay.js
+++ b/browser/components/downloads/content/allDownloadsViewOverlay.js
@@ -25,18 +25,16 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
                                   "resource:///modules/RecentWindow.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Services",
                                   "resource://gre/modules/Services.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
                                   "resource://gre/modules/Task.jsm");
 
-const nsIDM = Ci.nsIDownloadManager;
-
 const DESTINATION_FILE_URI_ANNO  = "downloads/destinationFileURI";
 const DOWNLOAD_META_DATA_ANNO    = "downloads/metaData";
 
 /**
  * Represents a download from the browser history. It implements part of the
  * interface of the Download object.
  *
  * @param aPlacesNode
@@ -67,27 +65,27 @@ HistoryDownload.prototype = {
       this.target.path = Cc["@mozilla.org/network/protocol;1?name=file"]
                            .getService(Ci.nsIFileProtocolHandler)
                            .getFileFromURLSpec(metaData.targetFileSpec).path;
     } catch (ex) {
       this.target.path = undefined;
     }
 
     if ("state" in metaData) {
-      this.succeeded = metaData.state == nsIDM.DOWNLOAD_FINISHED;
-      this.canceled = metaData.state == nsIDM.DOWNLOAD_CANCELED ||
-                      metaData.state == nsIDM.DOWNLOAD_PAUSED;
+      this.succeeded = metaData.state == DownloadsCommon.DOWNLOAD_FINISHED;
+      this.canceled = metaData.state == DownloadsCommon.DOWNLOAD_CANCELED ||
+                      metaData.state == DownloadsCommon.DOWNLOAD_PAUSED;
       this.endTime = metaData.endTime;
 
       // Recreate partial error information from the state saved in history.
-      if (metaData.state == nsIDM.DOWNLOAD_FAILED) {
+      if (metaData.state == DownloadsCommon.DOWNLOAD_FAILED) {
         this.error = { message: "History download failed." };
-      } else if (metaData.state == nsIDM.DOWNLOAD_BLOCKED_PARENTAL) {
+      } else if (metaData.state == DownloadsCommon.DOWNLOAD_BLOCKED_PARENTAL) {
         this.error = { becauseBlockedByParentalControls: true };
-      } else if (metaData.state == nsIDM.DOWNLOAD_DIRTY) {
+      } else if (metaData.state == DownloadsCommon.DOWNLOAD_DIRTY) {
         this.error = {
           becauseBlockedByReputationCheck: true,
           reputationCheckVerdict: metaData.reputationCheckVerdict || "",
         };
       } else {
         this.error = null;
       }
 
--- a/browser/components/downloads/content/downloads.css
+++ b/browser/components/downloads/content/downloads.css
@@ -8,35 +8,29 @@ richlistitem[type="download"] {
   -moz-binding: url('chrome://browser/content/downloads/download.xml#download');
 }
 
 richlistitem[type="download"]:not([selected]) button {
   /* Only focus buttons in the selected item. */
   -moz-user-focus: none;
 }
 
-.downloadsHideDropmarker > #downloadsFooterButtonsSplitter,
-.downloadsHideDropmarker > #downloadsFooterDropmarker {
-  display: none;
-}
-
 richlistitem[type="download"].download-state[state="1"]:not([exists]) > .downloadButtonArea,
 richlistitem[type="download"].download-state[state="1"]:not([exists]) > toolbarseparator {
   display: none;
 }
 
 #downloadsSummary:not([inprogress]) > vbox > #downloadsSummaryProgress,
 #downloadsSummary:not([inprogress]) > vbox > #downloadsSummaryDetails,
 #downloadsFooter:not([showingsummary]) #downloadsSummary {
   display: none;
 }
 
-#downloadsFooter[showingdropdown] > stack > #downloadsSummary,
 #downloadsFooter[showingsummary] > stack:hover > #downloadsSummary,
-#downloadsFooter[showingsummary]:not([showingdropdown]) > stack:not(:hover) > #downloadsFooterButtons {
+#downloadsFooter[showingsummary] > stack:not(:hover) > #downloadsFooterButtons {
   /* If we used "visibility: hidden;" then the mouseenter event of
      #downloadsHistory wouldn't be triggered immediately, and the hover styling
      of the button would not apply until the mouse is moved again.
 
      "-moz-user-focus: ignore;" prevents the elements with "opacity: 0;" from
      being focused with the keyboard. */
   opacity: 0;
   -moz-user-focus: ignore;
--- a/browser/components/downloads/content/downloads.js
+++ b/browser/components/downloads/content/downloads.js
@@ -219,24 +219,16 @@ const DownloadsPanel = {
 
     if (this.isPanelShowing) {
       DownloadsCommon.log("Panel is already showing - focusing instead.");
       this._focusPanel();
       return;
     }
 
     this.initialize(() => {
-      let downloadsFooterButtons =
-        document.getElementById("downloadsFooterButtons");
-      if (DownloadsCommon.showPanelDropmarker) {
-        downloadsFooterButtons.classList.remove("downloadsHideDropmarker");
-      } else {
-        downloadsFooterButtons.classList.add("downloadsHideDropmarker");
-      }
-
       // Delay displaying the panel because this function will sometimes be
       // called while another window is closing (like the window for selecting
       // whether to save or open the file), and that would cause the panel to
       // close immediately.
       setTimeout(() => this._openPopupIfDataReady(), 0);
     });
 
     DownloadsCommon.log("Waiting for the downloads panel to appear.");
@@ -382,55 +374,30 @@ const DownloadsPanel = {
 
     // Allow the anchor to be hidden.
     DownloadsButton.releaseAnchor();
 
     // Allow the panel to be reopened.
     this._state = this.kStateHidden;
   },
 
-  onFooterPopupShowing(aEvent) {
-    let itemClearList = document.getElementById("downloadsDropdownItemClearList");
-    if (DownloadsCommon.getData(window).canRemoveFinished) {
-      itemClearList.removeAttribute("hidden");
-    } else {
-      itemClearList.setAttribute("hidden", "true");
-    }
-    DownloadsViewController.updateCommands();
-
-    document.getElementById("downloadsFooter")
-      .setAttribute("showingdropdown", true);
-  },
-
-  onFooterPopupHidden(aEvent) {
-    document.getElementById("downloadsFooter")
-      .removeAttribute("showingdropdown");
-  },
-
   // Related operations
 
   /**
    * Shows or focuses the user interface dedicated to downloads history.
    */
   showDownloadsHistory() {
     DownloadsCommon.log("Showing download history.");
     // Hide the panel before showing another window, otherwise focus will return
     // to the browser window when the panel closes automatically.
     this.hidePanel();
 
     BrowserDownloadsUI();
   },
 
-  openDownloadsFolder() {
-    Downloads.getPreferredDownloadsDirectory().then(downloadsPath => {
-      DownloadsCommon.showDirectory(new FileUtils.File(downloadsPath));
-    }).catch(Cu.reportError);
-    this.hidePanel();
-  },
-
   // Internal functions
 
   /**
    * Attach event listeners to a panel element. These listeners should be
    * removed in _unattachEventListeners. This is called automatically after the
    * panel has successfully loaded.
    */
   _attachEventListeners() {
--- a/browser/components/downloads/content/downloadsOverlay.xul
+++ b/browser/components/downloads/content/downloadsOverlay.xul
@@ -149,33 +149,16 @@
               </hbox>
               <hbox id="downloadsFooterButtons">
                 <button id="downloadsHistory"
                         class="downloadsPanelFooterButton"
                         label="&downloadsHistory.label;"
                         accesskey="&downloadsHistory.accesskey;"
                         flex="1"
                         oncommand="DownloadsPanel.showDownloadsHistory();"/>
-                <toolbarseparator id="downloadsFooterButtonsSplitter"
-                        class="downloadsDropmarkerSplitter"/>
-                <button id="downloadsFooterDropmarker"
-                        class="downloadsPanelFooterButton downloadsDropmarker"
-                        type="menu">
-                  <menupopup id="downloadSubPanel"
-                             onpopupshowing="DownloadsPanel.onFooterPopupShowing(event);"
-                             onpopuphidden="DownloadsPanel.onFooterPopupHidden(event);"
-                             position="after_end">
-                    <menuitem id="downloadsDropdownItemClearList"
-                              command="downloadsCmd_clearList"
-                              label="&cmd.clearList2.label;"/>
-                    <menuitem id="downloadsDropdownItemOpenDownloadsFolder"
-                              oncommand="DownloadsPanel.openDownloadsFolder();"
-                              label="&openDownloadsFolder.label;"/>
-                  </menupopup>
-                </button>
               </hbox>
             </stack>
           </vbox>
         </panelview>
 
         <panelview id="downloadsPanel-blockedSubview"
                    orient="vertical"
                    flex="1">
--- a/browser/components/downloads/test/browser/browser.ini
+++ b/browser/components/downloads/test/browser/browser.ini
@@ -7,10 +7,9 @@ skip-if = os == "linux" # Bug 949434
 [browser_overflow_anchor.js]
 skip-if = os == "linux" # Bug 952422
 [browser_confirm_unblock_download.js]
 [browser_iframe_gone_mid_download.js]
 [browser_indicatorDrop.js]
 [browser_libraryDrop.js]
 [browser_downloads_panel_block.js]
 skip-if = true # Bug 1352792
-[browser_downloads_panel_footer.js]
 [browser_downloads_panel_height.js]
--- a/browser/components/downloads/test/browser/browser_basic_functionality.js
+++ b/browser/components/downloads/test/browser/browser_basic_functionality.js
@@ -9,21 +9,21 @@ registerCleanupFunction(function*() {
 
 /**
  * Make sure the downloads panel can display items in the right order and
  * contains the expected data.
  */
 add_task(function* test_basic_functionality() {
   // Display one of each download state.
   const DownloadData = [
-    { state: nsIDM.DOWNLOAD_NOTSTARTED },
-    { state: nsIDM.DOWNLOAD_PAUSED },
-    { state: nsIDM.DOWNLOAD_FINISHED },
-    { state: nsIDM.DOWNLOAD_FAILED },
-    { state: nsIDM.DOWNLOAD_CANCELED },
+    { state: DownloadsCommon.DOWNLOAD_NOTSTARTED },
+    { state: DownloadsCommon.DOWNLOAD_PAUSED },
+    { state: DownloadsCommon.DOWNLOAD_FINISHED },
+    { state: DownloadsCommon.DOWNLOAD_FAILED },
+    { state: DownloadsCommon.DOWNLOAD_CANCELED },
   ];
 
   // Wait for focus first
   yield promiseFocus();
 
   // Ensure that state is reset in case previous tests didn't finish.
   yield task_resetState();
 
--- a/browser/components/downloads/test/browser/browser_downloads_panel_block.js
+++ b/browser/components/downloads/test/browser/browser_downloads_panel_block.js
@@ -134,17 +134,17 @@ function promisePanelHidden() {
     DownloadsPanel.panel.addEventListener("popuphidden", function() {
       setTimeout(resolve, 0);
     }, {once: true});
   });
 }
 
 function makeDownload(verdict) {
   return {
-    state: nsIDM.DOWNLOAD_DIRTY,
+    state: DownloadsCommon.DOWNLOAD_DIRTY,
     hasBlockedData: true,
     errorObj: {
       result: Components.results.NS_ERROR_FAILURE,
       message: "Download blocked.",
       becauseBlocked: true,
       becauseBlockedByReputationCheck: true,
       reputationCheckVerdict:  verdict,
     },
deleted file mode 100644
--- a/browser/components/downloads/test/browser/browser_downloads_panel_footer.js
+++ /dev/null
@@ -1,95 +0,0 @@
-"use strict";
-
-function *task_openDownloadsSubPanel() {
-  let downloadSubPanel = document.getElementById("downloadSubPanel");
-  let popupShownPromise = BrowserTestUtils.waitForEvent(downloadSubPanel, "popupshown");
-
-  let downloadsDropmarker = document.getElementById("downloadsFooterDropmarker");
-  EventUtils.synthesizeMouseAtCenter(downloadsDropmarker, {}, window);
-
-  yield popupShownPromise;
-}
-
-add_task(function* test_openDownloadsFolder() {
-  yield SpecialPowers.pushPrefEnv({"set": [["browser.download.showPanelDropmarker", true]]});
-  yield task_openPanel();
-
-  yield task_openDownloadsSubPanel();
-
-  yield new Promise(resolve => {
-    sinon.stub(DownloadsCommon, "showDirectory", file => {
-      resolve(Downloads.getPreferredDownloadsDirectory().then(downloadsPath => {
-        is(file.path, downloadsPath, "Check the download folder path.");
-      }));
-    });
-
-    let itemOpenDownloadsFolder =
-      document.getElementById("downloadsDropdownItemOpenDownloadsFolder");
-    EventUtils.synthesizeMouseAtCenter(itemOpenDownloadsFolder, {}, window);
-  });
-
-  yield task_resetState();
-});
-
-add_task(function* test_clearList() {
-  const kTestCases = [{
-    downloads: [
-      { state: nsIDM.DOWNLOAD_NOTSTARTED },
-      { state: nsIDM.DOWNLOAD_FINISHED },
-      { state: nsIDM.DOWNLOAD_FAILED },
-      { state: nsIDM.DOWNLOAD_CANCELED },
-    ],
-    expectClearListShown: true,
-    expectedItemNumber: 0,
-  }, {
-    downloads: [
-      { state: nsIDM.DOWNLOAD_NOTSTARTED },
-      { state: nsIDM.DOWNLOAD_FINISHED },
-      { state: nsIDM.DOWNLOAD_FAILED },
-      { state: nsIDM.DOWNLOAD_PAUSED },
-      { state: nsIDM.DOWNLOAD_CANCELED },
-    ],
-    expectClearListShown: true,
-    expectedItemNumber: 1,
-  }, {
-    downloads: [
-      { state: nsIDM.DOWNLOAD_PAUSED },
-    ],
-    expectClearListShown: false,
-    expectedItemNumber: 1,
-  }];
-
-  for (let testCase of kTestCases) {
-    yield verify_clearList(testCase);
-  }
-});
-
-function *verify_clearList(testCase) {
-  let downloads = testCase.downloads;
-  yield task_addDownloads(downloads);
-
-  yield task_openPanel();
-  is(DownloadsView._downloads.length, downloads.length,
-    "Expect the number of download items");
-
-  yield task_openDownloadsSubPanel();
-
-  let itemClearList = document.getElementById("downloadsDropdownItemClearList");
-  let itemNumberPromise = BrowserTestUtils.waitForCondition(() => {
-    return DownloadsView._downloads.length === testCase.expectedItemNumber;
-  });
-  if (testCase.expectClearListShown) {
-    isnot("true", itemClearList.getAttribute("hidden"),
-      "Should show Clear Preview Panel button");
-    EventUtils.synthesizeMouseAtCenter(itemClearList, {}, window);
-  } else {
-    is("true", itemClearList.getAttribute("hidden"),
-      "Should not show Clear Preview Panel button");
-  }
-
-  yield itemNumberPromise;
-  is(DownloadsView._downloads.length, testCase.expectedItemNumber,
-    "Download items remained.");
-
-  yield task_resetState();
-}
--- a/browser/components/downloads/test/browser/browser_downloads_panel_height.js
+++ b/browser/components/downloads/test/browser/browser_downloads_panel_height.js
@@ -5,17 +5,17 @@
 
 /**
  * This test exists because we use a <panelmultiview> element and it handles
  * some of the height changes for us. We need to verify that the height is
  * updated correctly if downloads are removed while the panel is hidden.
  */
 add_task(function* test_height_reduced_after_removal() {
   yield task_addDownloads([
-    { state: nsIDM.DOWNLOAD_FINISHED },
+    { state: DownloadsCommon.DOWNLOAD_FINISHED },
   ]);
 
   yield task_openPanel();
   let panel = document.getElementById("downloadsPanel");
   let heightBeforeRemoval = panel.getBoundingClientRect().height;
 
   // We want to close the panel before we remove the download from the list.
   DownloadsPanel.hidePanel();
--- a/browser/components/downloads/test/browser/head.js
+++ b/browser/components/downloads/test/browser/head.js
@@ -19,18 +19,16 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
                                   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
                                   "resource://gre/modules/PlacesUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "HttpServer",
     "resource://testing-common/httpd.js");
 
-const nsIDM = Ci.nsIDownloadManager;
-
 var gTestTargetFile = FileUtils.getFile("TmpD", ["dm-ui-test.file"]);
 gTestTargetFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, FileUtils.PERMS_FILE);
 
 // Load mocking/stubbing library, sinon
 // docs: http://sinonjs.org/docs/
 /* global sinon:false */
 Services.scriptloader.loadSubScript("resource://testing-common/sinon-1.16.1.js");
 
@@ -158,21 +156,22 @@ function* task_addDownloads(aItems) {
   for (let item of aItems) {
     let download = {
       source: {
         url: "http://www.example.com/test-download.txt",
       },
       target: {
         path: gTestTargetFile.path,
       },
-      succeeded: item.state == nsIDM.DOWNLOAD_FINISHED,
-      canceled: item.state == nsIDM.DOWNLOAD_CANCELED ||
-                item.state == nsIDM.DOWNLOAD_PAUSED,
-      error: item.state == nsIDM.DOWNLOAD_FAILED ? new Error("Failed.") : null,
-      hasPartialData: item.state == nsIDM.DOWNLOAD_PAUSED,
+      succeeded: item.state == DownloadsCommon.DOWNLOAD_FINISHED,
+      canceled: item.state == DownloadsCommon.DOWNLOAD_CANCELED ||
+                item.state == DownloadsCommon.DOWNLOAD_PAUSED,
+      error: item.state == DownloadsCommon.DOWNLOAD_FAILED ?
+             new Error("Failed.") : null,
+      hasPartialData: item.state == DownloadsCommon.DOWNLOAD_PAUSED,
       hasBlockedData: item.hasBlockedData || false,
       startTime: new Date(startTimeMs++),
     };
     // `"errorObj" in download` must be false when there's no error.
     if (item.errorObj) {
       download.errorObj = item.errorObj;
     }
     yield publicList.add(yield Downloads.createDownload(download));
--- a/browser/extensions/pdfjs/README.mozilla
+++ b/browser/extensions/pdfjs/README.mozilla
@@ -1,5 +1,5 @@
 This is the PDF.js project output, https://github.com/mozilla/pdf.js
 
-Current extension version is: 1.8.314
+Current extension version is: 1.8.331
 
-Taken from upstream commit: 3adda80f
+Taken from upstream commit: 0dbc68a6
--- a/browser/extensions/pdfjs/content/build/pdf.js
+++ b/browser/extensions/pdfjs/content/build/pdf.js
@@ -93,17 +93,23 @@ return /******/ (function(modules) { // 
 /************************************************************************/
 /******/ ([
 /* 0 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 /* WEBPACK VAR INJECTION */(function(global) {
 
-var compatibility = __w_pdfjs_require__(14);
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isInt = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.isArray = exports.info = exports.globalScope = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.error = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.StatTimer = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
+
+__w_pdfjs_require__(14);
+
 var globalScope = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : undefined;
 var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
 var TextRenderingMode = {
   FILL: 0,
   STROKE: 1,
   FILL_STROKE: 2,
   INVISIBLE: 3,
   FILL_ADD_TO_PATH: 4,
@@ -3381,18 +3387,18 @@ var _UnsupportedManager = function Unsup
       for (var i = 0, ii = listeners.length; i < ii; i++) {
         listeners[i](featureId);
       }
     }
   };
 }();
 var version, build;
 {
-  exports.version = version = '1.8.314';
-  exports.build = build = '3adda80f';
+  exports.version = version = '1.8.331';
+  exports.build = build = '0dbc68a6';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;
 exports.PDFDataRangeTransport = PDFDataRangeTransport;
 exports.PDFWorker = PDFWorker;
 exports.PDFDocumentProxy = PDFDocumentProxy;
 exports.PDFPageProxy = PDFPageProxy;
 exports._UnsupportedManager = _UnsupportedManager;
@@ -4384,18 +4390,18 @@ var _text_layer = __w_pdfjs_require__(5)
 var _svg = __w_pdfjs_require__(4);
 
 var isWorker = typeof window === 'undefined';
 if (!_util.globalScope.PDFJS) {
   _util.globalScope.PDFJS = {};
 }
 var PDFJS = _util.globalScope.PDFJS;
 {
-  PDFJS.version = '1.8.314';
-  PDFJS.build = '3adda80f';
+  PDFJS.version = '1.8.331';
+  PDFJS.build = '0dbc68a6';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {
   (0, _util.setVerbosityLevel)(PDFJS.verbosity);
 }
 delete PDFJS.verbosity;
 Object.defineProperty(PDFJS, 'verbosity', {
   get() {
@@ -6699,30 +6705,30 @@ exports.TilingPattern = TilingPattern;
 
 /***/ }),
 /* 13 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
 
-var pdfjsVersion = '1.8.314';
-var pdfjsBuild = '3adda80f';
+var pdfjsVersion = '1.8.331';
+var pdfjsBuild = '0dbc68a6';
 var pdfjsSharedUtil = __w_pdfjs_require__(0);
 var pdfjsDisplayGlobal = __w_pdfjs_require__(8);
 var pdfjsDisplayAPI = __w_pdfjs_require__(3);
 var pdfjsDisplayTextLayer = __w_pdfjs_require__(5);
 var pdfjsDisplayAnnotationLayer = __w_pdfjs_require__(2);
 var pdfjsDisplayDOMUtils = __w_pdfjs_require__(1);
 var pdfjsDisplaySVG = __w_pdfjs_require__(4);
 exports.PDFJS = pdfjsDisplayGlobal.PDFJS;
 exports.build = pdfjsDisplayAPI.build;
 exports.version = pdfjsDisplayAPI.version;
 exports.getDocument = pdfjsDisplayAPI.getDocument;
-exports.LoobpackPort = pdfjsDisplayAPI.LoopbackPort;
+exports.LoopbackPort = pdfjsDisplayAPI.LoopbackPort;
 exports.PDFDataRangeTransport = pdfjsDisplayAPI.PDFDataRangeTransport;
 exports.PDFWorker = pdfjsDisplayAPI.PDFWorker;
 exports.renderTextLayer = pdfjsDisplayTextLayer.renderTextLayer;
 exports.AnnotationLayer = pdfjsDisplayAnnotationLayer.AnnotationLayer;
 exports.CustomStyle = pdfjsDisplayDOMUtils.CustomStyle;
 exports.createPromiseCapability = pdfjsSharedUtil.createPromiseCapability;
 exports.PasswordResponses = pdfjsSharedUtil.PasswordResponses;
 exports.InvalidPDFException = pdfjsSharedUtil.InvalidPDFException;
@@ -6743,11 +6749,13 @@ exports.addLinkAttributes = pdfjsDisplay
 
 /***/ }),
 /* 14 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
 
+;
+
 /***/ })
 /******/ ]);
 });
\ No newline at end of file
--- a/browser/extensions/pdfjs/content/build/pdf.worker.js
+++ b/browser/extensions/pdfjs/content/build/pdf.worker.js
@@ -93,17 +93,23 @@ return /******/ (function(modules) { // 
 /************************************************************************/
 /******/ ([
 /* 0 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 /* WEBPACK VAR INJECTION */(function(global) {
 
-var compatibility = __w_pdfjs_require__(36);
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isInt = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.isArray = exports.info = exports.globalScope = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.error = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.StatTimer = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
+
+__w_pdfjs_require__(36);
+
 var globalScope = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : undefined;
 var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
 var TextRenderingMode = {
   FILL: 0,
   STROKE: 1,
   FILL_STROKE: 2,
   INVISIBLE: 3,
   FILL_ADD_TO_PATH: 4,
@@ -36621,24 +36627,26 @@ exports.Type1Parser = Type1Parser;
 
 /***/ }),
 /* 35 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
 
-var pdfjsVersion = '1.8.314';
-var pdfjsBuild = '3adda80f';
+var pdfjsVersion = '1.8.331';
+var pdfjsBuild = '0dbc68a6';
 var pdfjsCoreWorker = __w_pdfjs_require__(17);
 ;
 exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
 
 /***/ }),
 /* 36 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
 
+;
+
 /***/ })
 /******/ ]);
 });
\ No newline at end of file
--- a/browser/extensions/pdfjs/content/web/debugger.js
+++ b/browser/extensions/pdfjs/content/web/debugger.js
@@ -144,21 +144,21 @@ var FontInspector = (function FontInspec
       font.appendChild(document.createTextNode(' '));
       font.appendChild(download);
       font.appendChild(document.createTextNode(' '));
       font.appendChild(logIt);
       font.appendChild(moreInfo);
       fonts.appendChild(font);
       // Somewhat of a hack, should probably add a hook for when the text layer
       // is done rendering.
-      setTimeout(function() {
+      setTimeout(() => {
         if (this.active) {
           resetSelection();
         }
-      }.bind(this), 2000);
+      }, 2000);
     }
   };
 })();
 
 var opMap;
 
 // Manages all the page steppers.
 var StepperManager = (function StepperManagerClosure() {
--- a/browser/extensions/pdfjs/content/web/viewer.js
+++ b/browser/extensions/pdfjs/content/web/viewer.js
@@ -86,17 +86,17 @@
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
 
 
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
-exports.localized = exports.animationStarted = exports.normalizeWheelEventDelta = exports.binarySearchFirstItem = exports.watchScroll = exports.scrollIntoView = exports.getOutputScale = exports.approximateFraction = exports.roundToDivide = exports.getVisibleElements = exports.parseQueryString = exports.noContextMenuHandler = exports.getPDFFileNameFromURL = exports.ProgressBar = exports.EventBus = exports.mozL10n = exports.RendererType = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = undefined;
+exports.localized = exports.animationStarted = exports.normalizeWheelEventDelta = exports.binarySearchFirstItem = exports.watchScroll = exports.scrollIntoView = exports.getOutputScale = exports.approximateFraction = exports.roundToDivide = exports.getVisibleElements = exports.parseQueryString = exports.noContextMenuHandler = exports.getPDFFileNameFromURL = exports.ProgressBar = exports.EventBus = exports.mozL10n = exports.RendererType = exports.cloneObj = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = undefined;
 
 var _pdfjs = __webpack_require__(1);
 
 var CSS_UNITS = 96.0 / 72.0;
 var DEFAULT_SCALE_VALUE = 'auto';
 var DEFAULT_SCALE = 1.0;
 var MIN_SCALE = 0.25;
 var MAX_SCALE = 10.0;
@@ -354,16 +354,25 @@ function normalizeWheelEventDelta(evt) {
   var MOUSE_LINES_PER_PAGE = 30;
   if (evt.deltaMode === MOUSE_DOM_DELTA_PIXEL_MODE) {
     delta /= MOUSE_PIXELS_PER_LINE * MOUSE_LINES_PER_PAGE;
   } else if (evt.deltaMode === MOUSE_DOM_DELTA_LINE_MODE) {
     delta /= MOUSE_LINES_PER_PAGE;
   }
   return delta;
 }
+function cloneObj(obj) {
+  var result = {};
+  for (var i in obj) {
+    if (Object.prototype.hasOwnProperty.call(obj, i)) {
+      result[i] = obj[i];
+    }
+  }
+  return result;
+}
 var animationStarted = new Promise(function (resolve) {
   window.requestAnimationFrame(resolve);
 });
 var localized = new Promise(function (resolve, reject) {
   if (!mozL10n) {
     resolve();
     return;
   }
@@ -474,16 +483,17 @@ exports.CSS_UNITS = CSS_UNITS;
 exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE;
 exports.DEFAULT_SCALE = DEFAULT_SCALE;
 exports.MIN_SCALE = MIN_SCALE;
 exports.MAX_SCALE = MAX_SCALE;
 exports.UNKNOWN_SCALE = UNKNOWN_SCALE;
 exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE;
 exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING;
 exports.VERTICAL_PADDING = VERTICAL_PADDING;
+exports.cloneObj = cloneObj;
 exports.RendererType = RendererType;
 exports.mozL10n = mozL10n;
 exports.EventBus = EventBus;
 exports.ProgressBar = ProgressBar;
 exports.getPDFFileNameFromURL = getPDFFileNameFromURL;
 exports.noContextMenuHandler = noContextMenuHandler;
 exports.parseQueryString = parseQueryString;
 exports.getVisibleElements = getVisibleElements;
@@ -1162,16 +1172,17 @@ var PDFViewerApplication = {
     }
     var promise = this.pdfLoadingTask.destroy();
     this.pdfLoadingTask = null;
     if (this.pdfDocument) {
       this.pdfDocument = null;
       this.pdfThumbnailViewer.setDocument(null);
       this.pdfViewer.setDocument(null);
       this.pdfLinkService.setDocument(null, null);
+      this.pdfDocumentProperties.setDocument(null, null);
     }
     this.store = null;
     this.isInitialViewSet = false;
     this.pdfSidebar.reset();
     this.pdfOutlineViewer.reset();
     this.pdfAttachmentViewer.reset();
     this.findController.reset();
     this.findBar.reset();
@@ -1305,39 +1316,39 @@ var PDFViewerApplication = {
     if (percent > this.loadingBar.percent || isNaN(percent)) {
       this.loadingBar.percent = percent;
       if (_pdfjs.PDFJS.disableAutoFetch && percent) {
         if (this.disableAutoFetchLoadingBarTimeout) {
           clearTimeout(this.disableAutoFetchLoadingBarTimeout);
           this.disableAutoFetchLoadingBarTimeout = null;
         }
         this.loadingBar.show();
-        this.disableAutoFetchLoadingBarTimeout = setTimeout(function () {
+        this.disableAutoFetchLoadingBarTimeout = setTimeout(() => {
           this.loadingBar.hide();
           this.disableAutoFetchLoadingBarTimeout = null;
-        }.bind(this), DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT);
+        }, DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT);
       }
     }
   },
   load: function pdfViewLoad(pdfDocument, scale) {
     var self = this;
     scale = scale || _ui_utils.UNKNOWN_SCALE;
     this.pdfDocument = pdfDocument;
-    this.pdfDocumentProperties.setDocumentAndUrl(pdfDocument, this.url);
     var downloadedPromise = pdfDocument.getDownloadInfo().then(function () {
       self.downloadComplete = true;
       self.loadingBar.hide();
     });
     this.toolbar.setPagesCount(pdfDocument.numPages, false);
     this.secondaryToolbar.setPagesCount(pdfDocument.numPages);
     var id = this.documentFingerprint = pdfDocument.fingerprint;
     var store = this.store = new _view_history.ViewHistory(id);
     var baseDocumentUrl;
     baseDocumentUrl = this.baseUrl;
     this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl);
+    this.pdfDocumentProperties.setDocument(pdfDocument, this.url);
     var pdfViewer = this.pdfViewer;
     pdfViewer.currentScale = scale;
     pdfViewer.setDocument(pdfDocument);
     var firstPagePromise = pdfViewer.firstPagePromise;
     var pagesPromise = pdfViewer.pagesPromise;
     var onePageRendered = pdfViewer.onePageRendered;
     this.pageRotation = 0;
     var pdfThumbnailViewer = this.pdfThumbnailViewer;
@@ -2268,88 +2279,88 @@ exports.PDFPrintServiceFactory = PDFPrin
 
 
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
 var OverlayManager = {
   overlays: {},
   active: null,
-  register: function overlayManagerRegister(name, element, callerCloseMethod, canForceClose) {
-    return new Promise(function (resolve) {
+  register(name, element, callerCloseMethod, canForceClose) {
+    return new Promise(resolve => {
       var container;
       if (!name || !element || !(container = element.parentNode)) {
         throw new Error('Not enough parameters.');
       } else if (this.overlays[name]) {
         throw new Error('The overlay is already registered.');
       }
       this.overlays[name] = {
         element,
         container,
         callerCloseMethod: callerCloseMethod || null,
         canForceClose: canForceClose || false
       };
       resolve();
-    }.bind(this));
+    });
   },
-  unregister: function overlayManagerUnregister(name) {
-    return new Promise(function (resolve) {
+  unregister(name) {
+    return new Promise(resolve => {
       if (!this.overlays[name]) {
         throw new Error('The overlay does not exist.');
       } else if (this.active === name) {
         throw new Error('The overlay cannot be removed while it is active.');
       }
       delete this.overlays[name];
       resolve();
-    }.bind(this));
+    });
   },
-  open: function overlayManagerOpen(name) {
-    return new Promise(function (resolve) {
+  open(name) {
+    return new Promise(resolve => {
       if (!this.overlays[name]) {
         throw new Error('The overlay does not exist.');
       } else if (this.active) {
         if (this.overlays[name].canForceClose) {
           this._closeThroughCaller();
         } else if (this.active === name) {
           throw new Error('The overlay is already active.');
         } else {
           throw new Error('Another overlay is currently active.');
         }
       }
       this.active = name;
       this.overlays[this.active].element.classList.remove('hidden');
       this.overlays[this.active].container.classList.remove('hidden');
       window.addEventListener('keydown', this._keyDown);
       resolve();
-    }.bind(this));
+    });
   },
-  close: function overlayManagerClose(name) {
-    return new Promise(function (resolve) {
+  close(name) {
+    return new Promise(resolve => {
       if (!this.overlays[name]) {
         throw new Error('The overlay does not exist.');
       } else if (!this.active) {
         throw new Error('The overlay is currently not active.');
       } else if (this.active !== name) {
         throw new Error('Another overlay is currently active.');
       }
       this.overlays[this.active].container.classList.add('hidden');
       this.overlays[this.active].element.classList.add('hidden');
       this.active = null;
       window.removeEventListener('keydown', this._keyDown);
       resolve();
-    }.bind(this));
+    });
   },
-  _keyDown: function overlayManager_keyDown(evt) {
+  _keyDown(evt) {
     var self = OverlayManager;
     if (self.active && evt.keyCode === 27) {
       self._closeThroughCaller();
       evt.preventDefault();
     }
   },
-  _closeThroughCaller: function overlayManager_closeThroughCaller() {
+  _closeThroughCaller() {
     if (this.overlays[this.active].callerCloseMethod) {
       this.overlays[this.active].callerCloseMethod();
     }
     if (this.active) {
       this.close(this.active);
     }
   }
 };
@@ -2890,25 +2901,25 @@ var PDFFindController = function PDFFind
       extractPageText(0);
     },
     executeCommand: function PDFFindController_executeCommand(cmd, state) {
       if (this.state === null || cmd !== 'findagain') {
         this.dirtyMatch = true;
       }
       this.state = state;
       this.updateUIState(FindStates.FIND_PENDING);
-      this._firstPagePromise.then(function () {
+      this._firstPagePromise.then(() => {
         this.extractText();
         clearTimeout(this.findTimeout);
         if (cmd === 'find') {
           this.findTimeout = setTimeout(this.nextMatch.bind(this), 250);
         } else {
           this.nextMatch();
         }
-      }.bind(this));
+      });
     },
     updatePage: function PDFFindController_updatePage(index) {
       if (this.selected.pageIdx === index) {
         this.pdfViewer.currentPageNumber = index + 1;
       }
       var page = this.pdfViewer.getPageView(index);
       if (page.textLayer) {
         page.textLayer.updateMatches();
@@ -3207,27 +3218,28 @@ var DownloadManager = function DownloadM
       FirefoxCom.request('download', {
         blobUrl,
         originalUrl: blobUrl,
         filename,
         isAttachment: true
       });
     },
     download: function DownloadManager_download(blob, url, filename) {
-      var blobUrl = window.URL.createObjectURL(blob);
+      let blobUrl = window.URL.createObjectURL(blob);
+      let onResponse = err => {
+        if (err && this.onerror) {
+          this.onerror(err);
+        }
+        window.URL.revokeObjectURL(blobUrl);
+      };
       FirefoxCom.request('download', {
         blobUrl,
         originalUrl: url,
         filename
-      }, function response(err) {
-        if (err && this.onerror) {
-          this.onerror(err);
-        }
-        window.URL.revokeObjectURL(blobUrl);
-      }.bind(this));
+      }, onResponse);
     }
   };
   return DownloadManager;
 }();
 class FirefoxPreferences extends _preferences.BasePreferences {
   _writeToStorage(prefObj) {
     return new Promise(function (resolve) {
       FirefoxCom.request('setPreferences', prefObj, resolve);
@@ -3603,26 +3615,26 @@ var HandTool = function HandToolClosure(
       }
     });
     this.eventBus.on('togglehandtool', this.toggle.bind(this));
     Promise.all([_ui_utils.localized, preferences.get('enableHandToolOnLoad')]).then(values => {
       if (values[1] === true) {
         this.handTool.activate();
       }
     }).catch(function rejected(reason) {});
-    this.eventBus.on('presentationmodechanged', function (e) {
-      if (e.switchInProgress) {
+    this.eventBus.on('presentationmodechanged', evt => {
+      if (evt.switchInProgress) {
         return;
       }
-      if (e.active) {
+      if (evt.active) {
         this.enterPresentationMode();
       } else {
         this.exitPresentationMode();
       }
-    }.bind(this));
+    });
   }
   HandTool.prototype = {
     get isActive() {
       return !!this.handTool.active;
     },
     toggle: function HandTool_toggle() {
       this.handTool.toggle();
     },
@@ -3795,18 +3807,18 @@ class PDFAttachmentViewer {
       } else {
         this._bindLink(button, item.content, filename);
       }
       div.appendChild(button);
       this.container.appendChild(div);
     }
     this._dispatchEvent(attachmentsCount);
   }
-  _appendAttachment(item) {
-    this._renderedCapability.promise.then(function (id, filename, content) {
+  _appendAttachment({ id, filename, content }) {
+    this._renderedCapability.promise.then(() => {
       var attachments = this.attachments;
       if (!attachments) {
         attachments = Object.create(null);
       } else {
         for (var name in attachments) {
           if (id === name) {
             return;
           }
@@ -3815,17 +3827,17 @@ class PDFAttachmentViewer {
       attachments[id] = {
         filename,
         content
       };
       this.render({
         attachments,
         keepRenderedCapability: true
       });
-    }.bind(this, item.id, item.filename, item.content));
+    });
   }
 }
 exports.PDFAttachmentViewer = PDFAttachmentViewer;
 
 /***/ }),
 /* 15 */
 /***/ (function(module, exports, __webpack_require__) {
 
@@ -3838,105 +3850,129 @@ Object.defineProperty(exports, "__esModu
 exports.PDFDocumentProperties = undefined;
 
 var _ui_utils = __webpack_require__(0);
 
 var _pdfjs = __webpack_require__(1);
 
 var _overlay_manager = __webpack_require__(5);
 
+const DEFAULT_FIELD_CONTENT = '-';
 class PDFDocumentProperties {
-  constructor(options) {
-    this.overlayName = options.overlayName;
-    this.fields = options.fields;
-    this.container = options.container;
-    this.rawFileSize = 0;
-    this.url = null;
-    this.pdfDocument = null;
-    if (options.closeButton) {
-      options.closeButton.addEventListener('click', this.close.bind(this));
-    }
-    this._dataAvailableCapability = (0, _pdfjs.createPromiseCapability)();
+  constructor({ overlayName, fields, container, closeButton }) {
+    this.overlayName = overlayName;
+    this.fields = fields;
+    this.container = container;
+    this._reset();
+    if (closeButton) {
+      closeButton.addEventListener('click', this.close.bind(this));
+    }
     _overlay_manager.OverlayManager.register(this.overlayName, this.container, this.close.bind(this));
   }
   open() {
+    let freezeFieldData = data => {
+      Object.defineProperty(this, 'fieldData', {
+        value: Object.freeze(data),
+        writable: false,
+        enumerable: true,
+        configurable: true
+      });
+    };
     Promise.all([_overlay_manager.OverlayManager.open(this.overlayName), this._dataAvailableCapability.promise]).then(() => {
-      this._getProperties();
+      if (this.fieldData) {
+        this._updateUI();
+        return;
+      }
+      this.pdfDocument.getMetadata().then(({ info, metadata }) => {
+        freezeFieldData({
+          'fileName': (0, _ui_utils.getPDFFileNameFromURL)(this.url),
+          'fileSize': this._parseFileSize(this.maybeFileSize),
+          'title': info.Title,
+          'author': info.Author,
+          'subject': info.Subject,
+          'keywords': info.Keywords,
+          'creationDate': this._parseDate(info.CreationDate),
+          'modificationDate': this._parseDate(info.ModDate),
+          'creator': info.Creator,
+          'producer': info.Producer,
+          'version': info.PDFFormatVersion,
+          'pageCount': this.pdfDocument.numPages
+        });
+        this._updateUI();
+        return this.pdfDocument.getDownloadInfo();
+      }).then(({ length }) => {
+        let data = (0, _ui_utils.cloneObj)(this.fieldData);
+        data['fileSize'] = this._parseFileSize(length);
+        freezeFieldData(data);
+        this._updateUI();
+      });
     });
   }
   close() {
     _overlay_manager.OverlayManager.close(this.overlayName);
   }
-  setFileSize(fileSize) {
-    if (fileSize > 0) {
-      this.rawFileSize = fileSize;
-    }
-  }
-  setDocumentAndUrl(pdfDocument, url) {
+  setDocument(pdfDocument, url) {
+    if (this.pdfDocument) {
+      this._reset();
+      this._updateUI(true);
+    }
+    if (!pdfDocument) {
+      return;
+    }
     this.pdfDocument = pdfDocument;
     this.url = url;
     this._dataAvailableCapability.resolve();
   }
-  _getProperties() {
-    if (!_overlay_manager.OverlayManager.active) {
+  setFileSize(fileSize) {
+    if (typeof fileSize === 'number' && fileSize > 0) {
+      this.maybeFileSize = fileSize;
+    }
+  }
+  _reset() {
+    this.pdfDocument = null;
+    this.url = null;
+    this.maybeFileSize = 0;
+    delete this.fieldData;
+    this._dataAvailableCapability = (0, _pdfjs.createPromiseCapability)();
+  }
+  _updateUI(reset = false) {
+    if (reset || !this.fieldData) {
+      for (let id in this.fields) {
+        this.fields[id].textContent = DEFAULT_FIELD_CONTENT;
+      }
       return;
     }
-    this.pdfDocument.getDownloadInfo().then(data => {
-      if (data.length === this.rawFileSize) {
-        return;
-      }
-      this.setFileSize(data.length);
-      this._updateUI(this.fields['fileSize'], this._parseFileSize());
-    });
-    this.pdfDocument.getMetadata().then(data => {
-      var content = {
-        'fileName': (0, _ui_utils.getPDFFileNameFromURL)(this.url),
-        'fileSize': this._parseFileSize(),
-        'title': data.info.Title,
-        'author': data.info.Author,
-        'subject': data.info.Subject,
-        'keywords': data.info.Keywords,
-        'creationDate': this._parseDate(data.info.CreationDate),
-        'modificationDate': this._parseDate(data.info.ModDate),
-        'creator': data.info.Creator,
-        'producer': data.info.Producer,
-        'version': data.info.PDFFormatVersion,
-        'pageCount': this.pdfDocument.numPages
-      };
-      for (var identifier in content) {
-        this._updateUI(this.fields[identifier], content[identifier]);
-      }
-    });
-  }
-  _updateUI(field, content) {
-    if (field && content !== undefined && content !== '') {
-      field.textContent = content;
-    }
-  }
-  _parseFileSize() {
-    var fileSize = this.rawFileSize,
-        kb = fileSize / 1024;
+    if (_overlay_manager.OverlayManager.active !== this.overlayName) {
+      return;
+    }
+    for (let id in this.fields) {
+      let content = this.fieldData[id];
+      this.fields[id].textContent = content || content === 0 ? content : DEFAULT_FIELD_CONTENT;
+    }
+  }
+  _parseFileSize(fileSize = 0) {
+    let kb = fileSize / 1024;
     if (!kb) {
       return;
     } else if (kb < 1024) {
       return _ui_utils.mozL10n.get('document_properties_kb', {
         size_kb: (+kb.toPrecision(3)).toLocaleString(),
         size_b: fileSize.toLocaleString()
       }, '{{size_kb}} KB ({{size_b}} bytes)');
     }
     return _ui_utils.mozL10n.get('document_properties_mb', {
       size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(),
       size_b: fileSize.toLocaleString()
     }, '{{size_mb}} MB ({{size_b}} bytes)');
   }
   _parseDate(inputDate) {
-    var dateToParse = inputDate;
-    if (dateToParse === undefined) {
-      return '';
-    }
+    if (!inputDate) {
+      return;
+    }
+    let dateToParse = inputDate;
     if (dateToParse.substring(0, 2) === 'D:') {
       dateToParse = dateToParse.substring(2);
     }
     var year = parseInt(dateToParse.substring(0, 4), 10);
     var month = parseInt(dateToParse.substring(4, 6), 10) - 1;
     var day = parseInt(dateToParse.substring(6, 8), 10);
     var hours = parseInt(dateToParse.substring(8, 10), 10);
     var minutes = parseInt(dateToParse.substring(10, 12), 10);
@@ -6015,31 +6051,31 @@ var PDFThumbnailViewer = function PDFThu
       if (this.pdfDocument) {
         this._cancelRendering();
         this._resetView();
       }
       this.pdfDocument = pdfDocument;
       if (!pdfDocument) {
         return Promise.resolve();
       }
-      return pdfDocument.getPage(1).then(function (firstPage) {
+      return pdfDocument.getPage(1).then(firstPage => {
         var pagesCount = pdfDocument.numPages;
         var viewport = firstPage.getViewport(1.0);
-        for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) {
+        for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {
           var thumbnail = new _pdf_thumbnail_view.PDFThumbnailView({
             container: this.container,
             id: pageNum,
             defaultViewport: viewport.clone(),
             linkService: this.linkService,
             renderingQueue: this.renderingQueue,
             disableCanvasToImageConversion: false
           });
           this.thumbnails.push(thumbnail);
         }
-      }.bind(this));
+      });
     },
     _cancelRendering: function PDFThumbnailViewer_cancelRendering() {
       for (var i = 0, ii = this.thumbnails.length; i < ii; i++) {
         if (this.thumbnails[i]) {
           this.thumbnails[i].cancelRendering();
         }
       }
     },
@@ -6349,27 +6385,27 @@ var PDFViewer = function pdfViewer() {
           this._pages.push(pageView);
         }
         onePageRenderedCapability.promise.then(() => {
           if (_pdfjs.PDFJS.disableAutoFetch) {
             pagesCapability.resolve();
             return;
           }
           var getPagesLeft = pagesCount;
-          for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) {
-            pdfDocument.getPage(pageNum).then(function (pageNum, pdfPage) {
+          for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {
+            pdfDocument.getPage(pageNum).then(pdfPage => {
               var pageView = this._pages[pageNum - 1];
               if (!pageView.pdfPage) {
                 pageView.setPdfPage(pdfPage);
               }
               this.linkService.cachePageRef(pageNum, pdfPage.ref);
               if (--getPagesLeft === 0) {
                 pagesCapability.resolve();
               }
-            }.bind(this, pageNum));
+            });
           }
         });
         this.eventBus.dispatch('pagesinit', { source: this });
         if (this.defaultRenderingQueue) {
           this.update();
         }
         if (this.findController) {
           this.findController.resolveFirstPage();
@@ -6780,16 +6816,20 @@ exports.PDFViewer = PDFViewer;
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
 
 
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
+exports.BasePreferences = undefined;
+
+var _ui_utils = __webpack_require__(0);
+
 var defaultPreferences = null;
 function getDefaultPreferences() {
   if (!defaultPreferences) {
     defaultPreferences = Promise.resolve({
       "showPreviousViewOnLoad": true,
       "defaultZoomValue": "",
       "sidebarViewOnLoad": 0,
       "enableHandToolOnLoad": false,
@@ -6806,55 +6846,46 @@ function getDefaultPreferences() {
       "renderer": "canvas",
       "renderInteractiveForms": false,
       "enablePrintAutoRotate": false,
       "disablePageLabels": false
     });
   }
   return defaultPreferences;
 }
-function cloneObj(obj) {
-  var result = {};
-  for (var i in obj) {
-    if (Object.prototype.hasOwnProperty.call(obj, i)) {
-      result[i] = obj[i];
-    }
-  }
-  return result;
-}
 class BasePreferences {
   constructor() {
     if (this.constructor === BasePreferences) {
       throw new Error('Cannot initialize BasePreferences.');
     }
     this.prefs = null;
     this._initializedPromise = getDefaultPreferences().then(defaults => {
       Object.defineProperty(this, 'defaults', {
         value: Object.freeze(defaults),
         writable: false,
         enumerable: true,
         configurable: false
       });
-      this.prefs = cloneObj(defaults);
+      this.prefs = (0, _ui_utils.cloneObj)(defaults);
       return this._readFromStorage(defaults);
     }).then(prefObj => {
       if (prefObj) {
         this.prefs = prefObj;
       }
     });
   }
   _writeToStorage(prefObj) {
     return Promise.reject(new Error('Not implemented: _writeToStorage'));
   }
   _readFromStorage(prefObj) {
     return Promise.reject(new Error('Not implemented: _readFromStorage'));
   }
   reset() {
     return this._initializedPromise.then(() => {
-      this.prefs = cloneObj(this.defaults);
+      this.prefs = (0, _ui_utils.cloneObj)(this.defaults);
       return this._writeToStorage(this.defaults);
     });
   }
   reload() {
     return this._initializedPromise.then(() => {
       return this._readFromStorage(this.defaults);
     }).then(prefObj => {
       if (prefObj) {
@@ -7004,28 +7035,26 @@ var SecondaryToolbar = function Secondar
       var items = this.items;
       items.firstPage.disabled = this.pageNumber <= 1;
       items.lastPage.disabled = this.pageNumber >= this.pagesCount;
       items.pageRotateCw.disabled = this.pagesCount === 0;
       items.pageRotateCcw.disabled = this.pagesCount === 0;
     },
     _bindClickListeners: function SecondaryToolbar_bindClickListeners() {
       this.toggleButton.addEventListener('click', this.toggle.bind(this));
-      for (var button in this.buttons) {
-        var element = this.buttons[button].element;
-        var eventName = this.buttons[button].eventName;
-        var close = this.buttons[button].close;
-        element.addEventListener('click', function (eventName, close) {
+      for (let button in this.buttons) {
+        let { element, eventName, close } = this.buttons[button];
+        element.addEventListener('click', evt => {
           if (eventName !== null) {
             this.eventBus.dispatch(eventName, { source: this });
           }
           if (close) {
             this.close();
           }
-        }.bind(this, eventName, close));
+        });
       }
     },
     _bindHandToolListener: function SecondaryToolbar_bindHandToolListener(toggleHandToolButton) {
       var isHandToolActive = false;
       this.eventBus.on('handtoolchanged', function (e) {
         if (isHandToolActive === e.isActive) {
           return;
         }
@@ -7136,21 +7165,21 @@ var TextLayerBuilder = function TextLaye
       this.textLayerRenderTask = (0, _pdfjs.renderTextLayer)({
         textContent: this.textContent,
         container: textLayerFrag,
         viewport: this.viewport,
         textDivs: this.textDivs,
         timeout,
         enhanceTextSelection: this.enhanceTextSelection
       });
-      this.textLayerRenderTask.promise.then(function () {
+      this.textLayerRenderTask.promise.then(() => {
         this.textLayerDiv.appendChild(textLayerFrag);
         this._finishRendering();
         this.updateMatches();
-      }.bind(this), function (reason) {});
+      }, function (reason) {});
     },
     cancel: function TextLayerBuilder_cancel() {
       if (this.textLayerRenderTask) {
         this.textLayerRenderTask.cancel();
         this.textLayerRenderTask = null;
       }
     },
     setTextContent: function TextLayerBuilder_setTextContent(textContent) {
--- a/browser/locales/en-US/chrome/browser/downloads/downloads.dtd
+++ b/browser/locales/en-US/chrome/browser/downloads/downloads.dtd
@@ -129,17 +129,21 @@
 <!-- LOCALIZATION NOTE (downloadsHistory.label, downloadsHistory.accesskey):
      This string is shown at the bottom of the Downloads Panel when all the
      downloads fit in the available space, or when there are no downloads in
      the panel at all.
      -->
 <!ENTITY downloadsHistory.label           "Show All Downloads">
 <!ENTITY downloadsHistory.accesskey       "S">
 
-<!ENTITY openDownloadsFolder.label       "Open Downloads Folder">
+<!-- LOCALIZATION NOTE (openDownloadsFolder.label):
+     This command is not currently available in the user interface, but the
+     string was preserved by bug 1362207 to be used in a future version.
+     -->
+<!ENTITY openDownloadsFolder.label        "Open Downloads Folder">
 
 <!ENTITY clearDownloadsButton.label       "Clear Downloads">
 <!ENTITY clearDownloadsButton.tooltip     "Clears completed, canceled and failed downloads">
 
 <!-- LOCALIZATION NOTE (downloadsListEmpty.label):
      This string is shown when there are no items in the Downloads view, when it
      is displayed inside a browser tab.
      -->
--- a/browser/themes/shared/downloads/downloads.inc.css
+++ b/browser/themes/shared/downloads/downloads.inc.css
@@ -92,64 +92,24 @@
   padding: 0;
 }
 
 #downloadsHistory {
   padding-inline-start: 10px;
   padding-inline-end: 10px;
 }
 
-#downloadsPanel[hasdownloads] #downloadsFooterButtons:not(.downloadsHideDropmarker) > #downloadsHistory {
-  padding-inline-start: 68px;
-}
-
-toolbarseparator.downloadsDropmarkerSplitter {
-  margin: 7px 0;
-}
-
 @item@ > toolbarseparator {
   margin: 10px 0;
 }
 
-@item@:hover > toolbarseparator,
-#downloadsFooter:hover toolbarseparator.downloadsDropmarkerSplitter,
-#downloadsFooter[showingdropdown] toolbarseparator {
+@item@:hover > toolbarseparator {
   margin: 0;
 }
 
-.downloadsDropmarker {
-  padding: 0 21px;
-}
-
-.downloadsDropmarker > .button-box > hbox {
-  display: none;
-}
-
-.downloadsDropmarker > .button-box > .button-menu-dropmarker {
-  /* This is to override the linux !important */
-  -moz-appearance: none !important;
-  display: -moz-box;
-  padding: 0;
-  margin: 0;
-}
-
-.downloadsDropmarker > .button-box > .button-menu-dropmarker > .dropmarker-icon {
-  width: 16px;
-  height: 16px;
-  list-style-image: url("chrome://global/skin/icons/menubutton-dropmarker.svg");
-  filter: url("chrome://global/skin/filters.svg#fill");
-  fill: currentColor;
-}
-
-/* Override default icon size which is too small for this dropdown */
-.downloadsDropmarker > .button-box > .button-menu-dropmarker {
-  width: 16px;
-  height: 16px;
-}
-
 #downloadsSummary {
   -moz-user-focus: normal;
 }
 
 #downloadsSummary > .downloadTypeIcon {
   list-style-image: url("chrome://browser/skin/downloads/download-summary.svg");
 }
 
new file mode 100644
--- /dev/null
+++ b/caps/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "plugin:mozilla/recommended"
+  ]
+};
new file mode 100644
--- /dev/null
+++ b/caps/tests/mochitest/.eslintrc.js
@@ -0,0 +1,8 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "plugin:mozilla/mochitest-test",
+    "plugin:mozilla/browser-test"
+  ]
+};
--- a/caps/tests/mochitest/test_addonMayLoad.html
+++ b/caps/tests/mochitest/test_addonMayLoad.html
@@ -17,18 +17,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   const Cu = Components.utils;
   Cu.import("resource://gre/modules/Services.jsm");
   let ssm = Services.scriptSecurityManager;
   let aps = Cc["@mozilla.org/addons/policy-service;1"].getService(Ci.nsIAddonPolicyService).wrappedJSObject;
 
   SimpleTest.waitForExplicitFinish();
   let oldAddonIdCallback = aps.setExtensionURIToAddonIdCallback(uri => uri.host);
   SimpleTest.registerCleanupFunction(function() {
-    aps.setAddonLoadURICallback('addona', null);
-    aps.setAddonLoadURICallback('addonb', null);
+    aps.setAddonLoadURICallback("addona", null);
+    aps.setAddonLoadURICallback("addonb", null);
     aps.setExtensionURIToAddonIdCallback(oldAddonIdCallback);
   });
 
   function tryLoad(sb, uri) {
     let p = new Promise(function(resolve, reject) {
       Cu.exportFunction(resolve, sb, { defineAs: "finish" });
       Cu.exportFunction(reject, sb, { defineAs: "error" });
       sb.eval("try { (function () { " +
@@ -36,38 +36,38 @@ https://bugzilla.mozilla.org/show_bug.cg
               "  xhr.onreadystatechange = function() { if (xhr.readyState == XMLHttpRequest.DONE) { finish(xhr.status == 200); } };" +
               "  xhr.open('GET', '" + uri + "', true);" +
               "  xhr.send();" +
               "})() } catch (e) { error(e); }");
     });
     return p;
   }
 
-  let addonA = new Cu.Sandbox(ssm.createCodebasePrincipal(Services.io.newURI('moz-extension://addonA/'), {}),
-                              {wantGlobalProperties: ['XMLHttpRequest']});
-  let addonB = new Cu.Sandbox(ssm.createCodebasePrincipal(Services.io.newURI('moz-extension://addonB/'), {}),
-                              {wantGlobalProperties: ['XMLHttpRequest']});
+  let addonA = new Cu.Sandbox(ssm.createCodebasePrincipal(Services.io.newURI("moz-extension://addonA/"), {}),
+                              {wantGlobalProperties: ["XMLHttpRequest"]});
+  let addonB = new Cu.Sandbox(ssm.createCodebasePrincipal(Services.io.newURI("moz-extension://addonB/"), {}),
+                              {wantGlobalProperties: ["XMLHttpRequest"]});
 
-  function uriForDomain(d) { return d + '/tests/caps/tests/mochitest/file_data.txt' }
+  function uriForDomain(d) { return d + "/tests/caps/tests/mochitest/file_data.txt" }
 
-  tryLoad(addonA, uriForDomain('http://test1.example.org'))
+  tryLoad(addonA, uriForDomain("http://test1.example.org"))
   .then(function(success) {
     ok(!success, "cross-origin load should fail for addon A");
-    aps.setAddonLoadURICallback('addona', function(uri) { return /test1/.test(uri.host); });
-    aps.setAddonLoadURICallback('addonb', function(uri) { return /test2/.test(uri.host); });
-    return tryLoad(addonA, uriForDomain('http://test1.example.org'));
+    aps.setAddonLoadURICallback("addona", function(uri) { return /test1/.test(uri.host); });
+    aps.setAddonLoadURICallback("addonb", function(uri) { return /test2/.test(uri.host); });
+    return tryLoad(addonA, uriForDomain("http://test1.example.org"));
   }).then(function(success) {
     ok(success, "whitelisted cross-origin load of test1 should succeed for addon A");
-    return tryLoad(addonB, uriForDomain('http://test1.example.org'));
+    return tryLoad(addonB, uriForDomain("http://test1.example.org"));
   }).then(function(success) {
     ok(!success, "non-whitelisted cross-origin load of test1 should fail for addon B");
-    return tryLoad(addonB, uriForDomain('http://test2.example.org'));
+    return tryLoad(addonB, uriForDomain("http://test2.example.org"));
   }).then(function(success) {
     ok(success, "whitelisted cross-origin load of test2 should succeed for addon B");
-    return tryLoad(addonA, uriForDomain('http://test2.example.org'));
+    return tryLoad(addonA, uriForDomain("http://test2.example.org"));
   }).then(function(success) {
     ok(!success, "non-whitelisted cross-origin load of test2 should fail for addon A");
     SimpleTest.finish();
   }, function(e) {
     ok(false, "Rejected promise chain: " + e);
     SimpleTest.finish();
   });
 
--- a/caps/tests/mochitest/test_bug246699.html
+++ b/caps/tests/mochitest/test_bug246699.html
@@ -16,45 +16,41 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /**
  ** Test for Bug 246699
  ** (should produce stack information for caps errors)
  **/
-function isError(e)
-{
+function isError(e) {
   return e.constructor.name === "Error" || e.constructor.name === "TypeError";
 }
 
-function hasStack(e)
-{
+function hasStack(e) {
   return isError(e) && /inciteCaps/.test(e.stack);
 }
 
-function inciteCaps(f)
-{
+function inciteCaps(f) {
     try {
         f();
         return "operation succeeded";
-    } catch (e if hasStack(e)) {
-        return "denied-stack";
     } catch (e) {
+        if (hasStack(e)) {
+          return "denied-stack";
+        }
         return "unexpected: " + e;
     }
 }
 
-function tryChromeLoad()
-{
+function tryChromeLoad() {
     window.frames[0].location = "chrome://global/content/mozilla.xhtml";
 }
 
-function tryComponentsClasses()
-{
+function tryComponentsClasses() {
     return SpecialPowers.Components.classes["@mozilla.org/dummy;1"];
 }
 
 
 is(inciteCaps(tryChromeLoad), "denied-stack",
    "should get stack for content-loading-chrome rejection");
 is(inciteCaps(tryComponentsClasses), "denied-stack",
    "should get stack for SpecialPowers.Components.classes rejection");
--- a/caps/tests/mochitest/test_bug292789.html
+++ b/caps/tests/mochitest/test_bug292789.html
@@ -20,16 +20,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 292789
  **
  ** Selectively allow access to whitelisted chrome packages
  ** even for ALLOW_CHROME mechanisms (<script>, <img> etc)
  **/
 
+/* import-globals-from ../../../toolkit/content/treeUtils.js */
+
 SimpleTest.waitForExplicitFinish();
 
 /** <script src=""> test **/
 function testScriptSrc(aCallback) {
     is(typeof gTreeUtils.sort, "function",
        "content can still load <script> from chrome://global");
     is(typeof XPInstallConfirm, "undefined",
        "content should not be able to load <script> from chrome://mozapps");
@@ -70,36 +72,36 @@ function runImgTest() {
 }
 
 function finishTest() {
   SimpleTest.finish();
 }
 
 function fail(event) {
     is("fail", event.target.expected,
-       "content should not be allowed to load "+event.target.src);
+       "content should not be allowed to load " + event.target.src);
     if (event.target.callback)
       event.target.callback();
 }
 
 function success(event) {
     is("success", event.target.expected,
-       "content should be able to load "+event.target.src);
+       "content should be able to load " + event.target.src);
     if (event.target.callback)
       event.target.callback();
 }
 
 function loadImage(uri, expect, callback) {
     var img = document.createElement("img");
     img.onerror = fail;
     img.onload = success;
     img.expected = expect;
     img.callback = callback;
     img.src = uri;
-    //document.getElementById("content").appendChild(img);
+    // document.getElementById("content").appendChild(img);
 }
 
 // Start off the script src test, and have it start the img tests when complete.
 testScriptSrc(runImgTest);
 </script>
 </pre>
 </body>
 </html>
--- a/caps/tests/mochitest/test_bug423375.html
+++ b/caps/tests/mochitest/test_bug423375.html
@@ -16,24 +16,24 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /**
  ** Test for Bug 423375
  ** (content shouldn't be able to load chrome: or resource:)
  **/
-function tryLoad(url)
-{
+function tryLoad(url) {
     try {
         window.frames[0].location = url;
         return "loaded";
-    } catch (e if /Access.*denied/.test(String(e))) {
-        return "denied";
     } catch (e) {
+        if (/Access.*denied/.test(String(e))) {
+          return "denied";
+        }
         return "unexpected: " + e;
     }
 }
 
 is(tryLoad("chrome://global/content/mozilla.xhtml"), "denied",
    "content should have been prevented from loading chrome: URL");
 is(tryLoad("resource://gre-resources/html.css"), "denied",
    "content should have been prevented from loading resource: URL");
--- a/caps/tests/mochitest/test_extensionURL.html
+++ b/caps/tests/mochitest/test_extensionURL.html
@@ -18,93 +18,93 @@ https://bugzilla.mozilla.org/show_bug.cg
   var oldLoadCallback = aps.setExtensionURILoadCallback(null);
   var oldMapCallback = aps.setExtensionURIToAddonIdCallback(null);
   var resourceHandler = SpecialPowers.Services.io.getProtocolHandler("resource")
                                      .QueryInterface(SpecialPowers.Ci.nsISubstitutingProtocolHandler);
   var extensionHandler = SpecialPowers.Services.io.getProtocolHandler("moz-extension")
                                      .QueryInterface(SpecialPowers.Ci.nsISubstitutingProtocolHandler);
 
   SimpleTest.registerCleanupFunction(function() {
-      extensionHandler.setSubstitution('cherise', null);
-      extensionHandler.setSubstitution('liebchen', null);
+      extensionHandler.setSubstitution("cherise", null);
+      extensionHandler.setSubstitution("liebchen", null);
       aps.setExtensionURILoadCallback(oldLoadCallback);
       aps.setExtensionURIToAddonIdCallback(oldMapCallback);
   });
 
   addLoadEvent(function() {
 
     // First, get a file:// URI to something - open to suggestions on how to do
     //  this more easily.
-    var resURI = SpecialPowers.Services.io.newURI('resource://testing-common/resource_test_file.html');
+    var resURI = SpecialPowers.Services.io.newURI("resource://testing-common/resource_test_file.html");
     var filePath = resourceHandler.resolveURI(resURI);
-    ok(filePath.startsWith('file://'), 'resource:// URI resolves where we expect: ' + filePath);
+    ok(filePath.startsWith("file://"), "resource:// URI resolves where we expect: " + filePath);
     var fileURI = SpecialPowers.Services.io.newURI(filePath);
 
     // Register a moz-extension:// URI.
-    extensionHandler.setSubstitution('cherise', fileURI);
+    extensionHandler.setSubstitution("cherise", fileURI);
 
     // Alias the above.
-    extensionHandler.setSubstitution('liebchen', SpecialPowers.Services.io.newURI('moz-extension://cherise'));
+    extensionHandler.setSubstitution("liebchen", SpecialPowers.Services.io.newURI("moz-extension://cherise"));
 
     //
     // Make sure that non-file:// URIs don't work.
     //
 
     // resource://
     try {
-      extensionHandler.setSubstitution('interdit', resURI);
+      extensionHandler.setSubstitution("interdit", resURI);
       ok(false, "Should have thrown for mapping moz-extension to resource");
     } catch (e) {
       ok(true, "Threw correctly: " + e);
     }
 
     // chrome://
     try {
-      var chromeURI = SpecialPowers.Services.io.newURI('chrome://global/content/mozilla.xhtml');
-      extensionHandler.setSubstitution('verboten', chromeURI);
+      var chromeURI = SpecialPowers.Services.io.newURI("chrome://global/content/mozilla.xhtml");
+      extensionHandler.setSubstitution("verboten", chromeURI);
       ok(false, "Should have thrown for mapping moz-extension to chrome");
     } catch (e) {
       ok(true, "Threw correctly: " + e);
     }
 
     function navigateWithLocation(ifr, url) { ifr.contentWindow.location = url; }
-    function navigateWithSrc(ifr, url) { ifr.setAttribute('src', url); }
+    function navigateWithSrc(ifr, url) { ifr.setAttribute("src", url); }
     function navigateFromChromeWithLocation(ifr, url) { SpecialPowers.wrap(ifr).contentWindow.location = url; }
     function navigateFromChromeWithWebNav(ifr, url) {
       SpecialPowers.wrap(ifr).contentWindow
                    .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
                    .getInterface(SpecialPowers.Ci.nsIWebNavigation)
                    .loadURI(url, 0, null, null, null);
     }
 
 
     function setWhitelistCallback(rgxp) {
       var cb = SpecialPowers.wrapCallback(function(uri) { return rgxp.test(uri.spec); });
       aps.setExtensionURILoadCallback(cb);
     }
 
-    aps.setExtensionURIToAddonIdCallback(SpecialPowers.wrapCallback(function (uri) { return 'imaginaryaddon-' + uri.host[0]; }));
+    aps.setExtensionURIToAddonIdCallback(SpecialPowers.wrapCallback(function(uri) { return "imaginaryaddon-" + uri.host[0]; }));
 
     function testLoad(url, navigate, shouldThrow) {
-      var ifr = document.createElement('iframe');
+      var ifr = document.createElement("iframe");
       var p = new Promise(function(resolve, reject) {
         ifr.onload = function() {
-          ok(true, 'Loaded ' + url);
+          ok(true, "Loaded " + url);
           var prin = SpecialPowers.wrap(ifr.contentWindow).document.nodePrincipal;
-          function stripTrailingSlash(s) { return s.replace(/\/$/, ''); };
-          is(stripTrailingSlash(prin.URI.spec), url, 'Principal uri is correct: ' + url);
-          function stripPath(s) { return s.replace(/(.*\/\/.+)\/.*/, '$1'); };
-          is(prin.originNoSuffix, stripPath(url), 'Principal origin is correct: ' + prin.originNoSuffix);
-          is(prin.addonId, 'imaginaryaddon-' + url[url.indexOf('/') + 2], 'addonId is correct');
+          function stripTrailingSlash(s) { return s.replace(/\/$/, ""); }
+          is(stripTrailingSlash(prin.URI.spec), url, "Principal uri is correct: " + url);
+          function stripPath(s) { return s.replace(/(.*\/\/.+)\/.*/, "$1"); }
+          is(prin.originNoSuffix, stripPath(url), "Principal origin is correct: " + prin.originNoSuffix);
+          is(prin.addonId, "imaginaryaddon-" + url[url.indexOf("/") + 2], "addonId is correct");
           if (/_blank/.test(url)) {
             is(SpecialPowers.wrap(ifr.contentWindow).document.documentElement.innerHTML,
-               '<head></head><body></body>', 'blank document looks right');
+               "<head></head><body></body>", "blank document looks right");
           } else {
-            is(SpecialPowers.wrap(ifr.contentWindow).document.title, 'resource test file',
-               'document looks right');
+            is(SpecialPowers.wrap(ifr.contentWindow).document.title, "resource test file",
+               "document looks right");
           }
           ifr.remove();
           resolve();
         };
         document.body.appendChild(ifr);
 
         var threw = false;
         try {
@@ -129,30 +129,30 @@ https://bugzilla.mozilla.org/show_bug.cg
         xhr.open("GET", url, true);
         xhr.send();
       });
     }
 
     //
     // Perform some loads and make sure they work correctly.
     //
-    testLoad.bind(null, 'moz-extension://cherise', navigateFromChromeWithLocation)()
-    .then(testLoad.bind(null, 'moz-extension://cherise', navigateFromChromeWithWebNav))
-    .then(testLoad.bind(null, 'moz-extension://cherise', navigateWithLocation, /* shouldThrow = */ true))
-    .then(testXHR.bind(null, 'moz-extension://cherise', /* shouldError = */ true))
+    testLoad.bind(null, "moz-extension://cherise", navigateFromChromeWithLocation)()
+    .then(testLoad.bind(null, "moz-extension://cherise", navigateFromChromeWithWebNav))
+    .then(testLoad.bind(null, "moz-extension://cherise", navigateWithLocation, /* shouldThrow = */ true))
+    .then(testXHR.bind(null, "moz-extension://cherise", /* shouldError = */ true))
     .then(setWhitelistCallback.bind(null, /cherise/))
-    .then(testLoad.bind(null, 'moz-extension://cherise', navigateWithLocation))
-    .then(testXHR.bind(null, 'moz-extension://cherise'))
-    .then(testLoad.bind(null, 'moz-extension://liebchen', navigateWithLocation, /* shouldThrow = */ true))
-    .then(testXHR.bind(null, 'moz-extension://liebchen', /* shouldError = */ true))
+    .then(testLoad.bind(null, "moz-extension://cherise", navigateWithLocation))
+    .then(testXHR.bind(null, "moz-extension://cherise"))
+    .then(testLoad.bind(null, "moz-extension://liebchen", navigateWithLocation, /* shouldThrow = */ true))
+    .then(testXHR.bind(null, "moz-extension://liebchen", /* shouldError = */ true))
     .then(setWhitelistCallback.bind(null, /cherise|liebchen/))
-    .then(testLoad.bind(null, 'moz-extension://liebchen', navigateWithLocation))
-    .then(testLoad.bind(null, 'moz-extension://liebchen', navigateWithSrc))
-    .then(testLoad.bind(null, 'moz-extension://cherise', navigateWithSrc))
-    .then(testLoad.bind(null, 'moz-extension://cherise/_blank.html', navigateWithSrc))
+    .then(testLoad.bind(null, "moz-extension://liebchen", navigateWithLocation))
+    .then(testLoad.bind(null, "moz-extension://liebchen", navigateWithSrc))
+    .then(testLoad.bind(null, "moz-extension://cherise", navigateWithSrc))
+    .then(testLoad.bind(null, "moz-extension://cherise/_blank.html", navigateWithSrc))
     .then(SimpleTest.finish.bind(SimpleTest),
           function(e) { ok(false, "rejected promise: " + e); SimpleTest.finish() }
     );
   });
 
   </script>
 </head>
 <body>
new file mode 100644
--- /dev/null
+++ b/caps/tests/unit/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "plugin:mozilla/xpcshell-test"
+  ]
+};
--- a/caps/tests/unit/test_origin.js
+++ b/caps/tests/unit/test_origin.js
@@ -20,20 +20,20 @@ function checkCrossOrigin(a, b) {
   do_check_false(b.subsumes(a));
   do_check_false(b.subsumesConsideringDomain(a));
 }
 
 function checkOriginAttributes(prin, attrs, suffix) {
   attrs = attrs || {};
   do_check_eq(prin.originAttributes.appId, attrs.appId || 0);
   do_check_eq(prin.originAttributes.inIsolatedMozBrowser, attrs.inIsolatedMozBrowser || false);
-  do_check_eq(prin.originSuffix, suffix || '');
-  do_check_eq(ChromeUtils.originAttributesToSuffix(attrs), suffix || '');
+  do_check_eq(prin.originSuffix, suffix || "");
+  do_check_eq(ChromeUtils.originAttributesToSuffix(attrs), suffix || "");
   do_check_true(ChromeUtils.originAttributesMatchPattern(prin.originAttributes, attrs));
-  if (!prin.isNullPrincipal && !prin.origin.startsWith('[')) {
+  if (!prin.isNullPrincipal && !prin.origin.startsWith("[")) {
     do_check_true(ssm.createCodebasePrincipalFromOrigin(prin.origin).equals(prin));
   } else {
     checkThrows(() => ssm.createCodebasePrincipalFromOrigin(prin.origin));
   }
 }
 
 function checkSandboxOriginAttributes(arr, attrs, options) {
   options = options || {};
@@ -50,147 +50,147 @@ function printAttrs(name, attrs) {
            "\tinIsolatedMozBrowser: " + attrs.inIsolatedMozBrowser + ",\n" +
            "\tprivateBrowsingId: '" + attrs.privateBrowsingId + "',\n" +
            "\tfirstPartyDomain: '" + attrs.firstPartyDomain + "'\n}");
 }
 
 
 function checkValues(attrs, values) {
   values = values || {};
-  //printAttrs("attrs", attrs);
-  //printAttrs("values", values);
+  // printAttrs("attrs", attrs);
+  // printAttrs("values", values);
   do_check_eq(attrs.appId, values.appId || 0);
   do_check_eq(attrs.userContextId, values.userContextId || 0);
   do_check_eq(attrs.inIsolatedMozBrowser, values.inIsolatedMozBrowser || false);
-  do_check_eq(attrs.privateBrowsingId, values.privateBrowsingId || '');
-  do_check_eq(attrs.firstPartyDomain, values.firstPartyDomain || '');
+  do_check_eq(attrs.privateBrowsingId, values.privateBrowsingId || "");
+  do_check_eq(attrs.firstPartyDomain, values.firstPartyDomain || "");
 }
 
 function run_test() {
   // Attributeless origins.
-  do_check_eq(ssm.getSystemPrincipal().origin, '[System Principal]');
+  do_check_eq(ssm.getSystemPrincipal().origin, "[System Principal]");
   checkOriginAttributes(ssm.getSystemPrincipal());
-  var exampleOrg = ssm.createCodebasePrincipal(makeURI('http://example.org'), {});
-  do_check_eq(exampleOrg.origin, 'http://example.org');
+  var exampleOrg = ssm.createCodebasePrincipal(makeURI("http://example.org"), {});
+  do_check_eq(exampleOrg.origin, "http://example.org");
   checkOriginAttributes(exampleOrg);
-  var exampleCom = ssm.createCodebasePrincipal(makeURI('https://www.example.com:123'), {});
-  do_check_eq(exampleCom.origin, 'https://www.example.com:123');
+  var exampleCom = ssm.createCodebasePrincipal(makeURI("https://www.example.com:123"), {});
+  do_check_eq(exampleCom.origin, "https://www.example.com:123");
   checkOriginAttributes(exampleCom);
   var nullPrin = Cu.getObjectPrincipal(new Cu.Sandbox(null));
   do_check_true(/^moz-nullprincipal:\{([0-9]|[a-z]|\-){36}\}$/.test(nullPrin.origin));
   checkOriginAttributes(nullPrin);
-  var ipv6Prin = ssm.createCodebasePrincipal(makeURI('https://[2001:db8::ff00:42:8329]:123'), {});
-  do_check_eq(ipv6Prin.origin, 'https://[2001:db8::ff00:42:8329]:123');
+  var ipv6Prin = ssm.createCodebasePrincipal(makeURI("https://[2001:db8::ff00:42:8329]:123"), {});
+  do_check_eq(ipv6Prin.origin, "https://[2001:db8::ff00:42:8329]:123");
   checkOriginAttributes(ipv6Prin);
-  var ipv6NPPrin = ssm.createCodebasePrincipal(makeURI('https://[2001:db8::ff00:42:8329]'), {});
-  do_check_eq(ipv6NPPrin.origin, 'https://[2001:db8::ff00:42:8329]');
+  var ipv6NPPrin = ssm.createCodebasePrincipal(makeURI("https://[2001:db8::ff00:42:8329]"), {});
+  do_check_eq(ipv6NPPrin.origin, "https://[2001:db8::ff00:42:8329]");
   checkOriginAttributes(ipv6NPPrin);
   var ep = Cu.getObjectPrincipal(Cu.Sandbox([exampleCom, nullPrin, exampleOrg]));
   checkOriginAttributes(ep);
   checkCrossOrigin(exampleCom, exampleOrg);
   checkCrossOrigin(exampleOrg, nullPrin);
 
   // nsEP origins should be in lexical order.
   do_check_eq(ep.origin, `[Expanded Principal [${exampleOrg.origin}, ${exampleCom.origin}, ${nullPrin.origin}]]`);
 
   // Make sure createCodebasePrincipal does what the rest of gecko does.
-  do_check_true(exampleOrg.equals(Cu.getObjectPrincipal(new Cu.Sandbox('http://example.org'))));
+  do_check_true(exampleOrg.equals(Cu.getObjectPrincipal(new Cu.Sandbox("http://example.org"))));
 
   //
   // Test origin attributes.
   //
 
   // Just app.
-  var exampleOrg_app = ssm.createCodebasePrincipal(makeURI('http://example.org'), {appId: 42});
+  var exampleOrg_app = ssm.createCodebasePrincipal(makeURI("http://example.org"), {appId: 42});
   var nullPrin_app = ssm.createNullPrincipal({appId: 42});
-  checkOriginAttributes(exampleOrg_app, {appId: 42}, '^appId=42');
-  checkOriginAttributes(nullPrin_app, {appId: 42}, '^appId=42');
-  do_check_eq(exampleOrg_app.origin, 'http://example.org^appId=42');
+  checkOriginAttributes(exampleOrg_app, {appId: 42}, "^appId=42");
+  checkOriginAttributes(nullPrin_app, {appId: 42}, "^appId=42");
+  do_check_eq(exampleOrg_app.origin, "http://example.org^appId=42");
 
   // Just browser.
-  var exampleOrg_browser = ssm.createCodebasePrincipal(makeURI('http://example.org'), {inIsolatedMozBrowser: true});
+  var exampleOrg_browser = ssm.createCodebasePrincipal(makeURI("http://example.org"), {inIsolatedMozBrowser: true});
   var nullPrin_browser = ssm.createNullPrincipal({inIsolatedMozBrowser: true});
-  checkOriginAttributes(exampleOrg_browser, {inIsolatedMozBrowser: true}, '^inBrowser=1');
-  checkOriginAttributes(nullPrin_browser, {inIsolatedMozBrowser: true}, '^inBrowser=1');
-  do_check_eq(exampleOrg_browser.origin, 'http://example.org^inBrowser=1');
+  checkOriginAttributes(exampleOrg_browser, {inIsolatedMozBrowser: true}, "^inBrowser=1");
+  checkOriginAttributes(nullPrin_browser, {inIsolatedMozBrowser: true}, "^inBrowser=1");
+  do_check_eq(exampleOrg_browser.origin, "http://example.org^inBrowser=1");
 
   // App and browser.
-  var exampleOrg_appBrowser = ssm.createCodebasePrincipal(makeURI('http://example.org'), {inIsolatedMozBrowser: true, appId: 42});
+  var exampleOrg_appBrowser = ssm.createCodebasePrincipal(makeURI("http://example.org"), {inIsolatedMozBrowser: true, appId: 42});
   var nullPrin_appBrowser = ssm.createNullPrincipal({inIsolatedMozBrowser: true, appId: 42});
-  checkOriginAttributes(exampleOrg_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, '^appId=42&inBrowser=1');
-  checkOriginAttributes(nullPrin_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, '^appId=42&inBrowser=1');
-  do_check_eq(exampleOrg_appBrowser.origin, 'http://example.org^appId=42&inBrowser=1');
+  checkOriginAttributes(exampleOrg_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, "^appId=42&inBrowser=1");
+  checkOriginAttributes(nullPrin_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, "^appId=42&inBrowser=1");
+  do_check_eq(exampleOrg_appBrowser.origin, "http://example.org^appId=42&inBrowser=1");
 
   // App and browser, different domain.
-  var exampleCom_appBrowser = ssm.createCodebasePrincipal(makeURI('https://www.example.com:123'), {appId: 42, inIsolatedMozBrowser: true});
-  checkOriginAttributes(exampleCom_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, '^appId=42&inBrowser=1');
-  do_check_eq(exampleCom_appBrowser.origin, 'https://www.example.com:123^appId=42&inBrowser=1');
+  var exampleCom_appBrowser = ssm.createCodebasePrincipal(makeURI("https://www.example.com:123"), {appId: 42, inIsolatedMozBrowser: true});
+  checkOriginAttributes(exampleCom_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, "^appId=42&inBrowser=1");
+  do_check_eq(exampleCom_appBrowser.origin, "https://www.example.com:123^appId=42&inBrowser=1");
 
   // First party Uri
-  var exampleOrg_firstPartyDomain = ssm.createCodebasePrincipal(makeURI('http://example.org'), {firstPartyDomain: 'example.org'});
-  checkOriginAttributes(exampleOrg_firstPartyDomain, { firstPartyDomain: "example.org" }, '^firstPartyDomain=example.org');
-  do_check_eq(exampleOrg_firstPartyDomain.origin, 'http://example.org^firstPartyDomain=example.org');
+  var exampleOrg_firstPartyDomain = ssm.createCodebasePrincipal(makeURI("http://example.org"), {firstPartyDomain: "example.org"});
+  checkOriginAttributes(exampleOrg_firstPartyDomain, { firstPartyDomain: "example.org" }, "^firstPartyDomain=example.org");
+  do_check_eq(exampleOrg_firstPartyDomain.origin, "http://example.org^firstPartyDomain=example.org");
 
   // Make sure we don't crash when serializing principals with UNKNOWN_APP_ID.
   try {
     let binaryStream = Cc["@mozilla.org/binaryoutputstream;1"].
                        createInstance(Ci.nsIObjectOutputStream);
     let pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
     pipe.init(false, false, 0, 0xffffffff, null);
     binaryStream.setOutputStream(pipe.outputStream);
-    binaryStream.writeCompoundObject(simplePrin, Ci.nsISupports, true);
+    binaryStream.writeCompoundObject(simplePrin, Ci.nsISupports, true); // eslint-disable-line no-undef
     binaryStream.close();
   } catch (e) {
     do_check_true(true);
   }
 
 
   // Just userContext.
-  var exampleOrg_userContext = ssm.createCodebasePrincipal(makeURI('http://example.org'), {userContextId: 42});
-  checkOriginAttributes(exampleOrg_userContext, { userContextId: 42 }, '^userContextId=42');
-  do_check_eq(exampleOrg_userContext.origin, 'http://example.org^userContextId=42');
+  var exampleOrg_userContext = ssm.createCodebasePrincipal(makeURI("http://example.org"), {userContextId: 42});
+  checkOriginAttributes(exampleOrg_userContext, { userContextId: 42 }, "^userContextId=42");
+  do_check_eq(exampleOrg_userContext.origin, "http://example.org^userContextId=42");
 
   // UserContext and App.
-  var exampleOrg_userContextApp = ssm.createCodebasePrincipal(makeURI('http://example.org'), {appId: 24, userContextId: 42});
+  var exampleOrg_userContextApp = ssm.createCodebasePrincipal(makeURI("http://example.org"), {appId: 24, userContextId: 42});
   var nullPrin_userContextApp = ssm.createNullPrincipal({appId: 24, userContextId: 42});
-  checkOriginAttributes(exampleOrg_userContextApp, {appId: 24, userContextId: 42}, '^appId=24&userContextId=42');
-  checkOriginAttributes(nullPrin_userContextApp, {appId: 24, userContextId: 42}, '^appId=24&userContextId=42');
-  do_check_eq(exampleOrg_userContextApp.origin, 'http://example.org^appId=24&userContextId=42');
+  checkOriginAttributes(exampleOrg_userContextApp, {appId: 24, userContextId: 42}, "^appId=24&userContextId=42");
+  checkOriginAttributes(nullPrin_userContextApp, {appId: 24, userContextId: 42}, "^appId=24&userContextId=42");
+  do_check_eq(exampleOrg_userContextApp.origin, "http://example.org^appId=24&userContextId=42");
 
   checkSandboxOriginAttributes(null, {});
-  checkSandboxOriginAttributes('http://example.org', {});
-  checkSandboxOriginAttributes('http://example.org', {}, {originAttributes: {}});
-  checkSandboxOriginAttributes('http://example.org', {appId: 42}, {originAttributes: {appId: 42}});
-  checkSandboxOriginAttributes(['http://example.org'], {});
-  checkSandboxOriginAttributes(['http://example.org'], {}, {originAttributes: {}});
-  checkSandboxOriginAttributes(['http://example.org'], {appId: 42}, {originAttributes: {appId: 42}});
+  checkSandboxOriginAttributes("http://example.org", {});
+  checkSandboxOriginAttributes("http://example.org", {}, {originAttributes: {}});
+  checkSandboxOriginAttributes("http://example.org", {appId: 42}, {originAttributes: {appId: 42}});
+  checkSandboxOriginAttributes(["http://example.org"], {});
+  checkSandboxOriginAttributes(["http://example.org"], {}, {originAttributes: {}});
+  checkSandboxOriginAttributes(["http://example.org"], {appId: 42}, {originAttributes: {appId: 42}});
 
   // Check that all of the above are cross-origin.
   checkCrossOrigin(exampleOrg_app, exampleOrg);
   checkCrossOrigin(exampleOrg_app, nullPrin_app);
   checkCrossOrigin(exampleOrg_browser, exampleOrg_app);
   checkCrossOrigin(exampleOrg_browser, nullPrin_browser);
   checkCrossOrigin(exampleOrg_appBrowser, exampleOrg_app);
   checkCrossOrigin(exampleOrg_appBrowser, nullPrin_appBrowser);
   checkCrossOrigin(exampleOrg_appBrowser, exampleCom_appBrowser);
   checkCrossOrigin(exampleOrg_firstPartyDomain, exampleOrg);
   checkCrossOrigin(exampleOrg_userContext, exampleOrg);
   checkCrossOrigin(exampleOrg_userContext, exampleOrg_userContextApp);
 
   // Check Principal kinds.
   function checkKind(prin, kind) {
-    do_check_eq(prin.isNullPrincipal, kind == 'nullPrincipal');
-    do_check_eq(prin.isCodebasePrincipal, kind == 'codebasePrincipal');
-    do_check_eq(prin.isExpandedPrincipal, kind == 'expandedPrincipal');
-    do_check_eq(prin.isSystemPrincipal, kind == 'systemPrincipal');
+    do_check_eq(prin.isNullPrincipal, kind == "nullPrincipal");
+    do_check_eq(prin.isCodebasePrincipal, kind == "codebasePrincipal");
+    do_check_eq(prin.isExpandedPrincipal, kind == "expandedPrincipal");
+    do_check_eq(prin.isSystemPrincipal, kind == "systemPrincipal");
   }
-  checkKind(ssm.createNullPrincipal({}), 'nullPrincipal');
-  checkKind(ssm.createCodebasePrincipal(makeURI('http://www.example.com'), {}), 'codebasePrincipal');
-  checkKind(Cu.getObjectPrincipal(Cu.Sandbox([ssm.createCodebasePrincipal(makeURI('http://www.example.com'), {})])), 'expandedPrincipal');
-  checkKind(ssm.getSystemPrincipal(), 'systemPrincipal');
+  checkKind(ssm.createNullPrincipal({}), "nullPrincipal");
+  checkKind(ssm.createCodebasePrincipal(makeURI("http://www.example.com"), {}), "codebasePrincipal");
+  checkKind(Cu.getObjectPrincipal(Cu.Sandbox([ssm.createCodebasePrincipal(makeURI("http://www.example.com"), {})])), "expandedPrincipal");
+  checkKind(ssm.getSystemPrincipal(), "systemPrincipal");
 
   //
   // Test Origin Attribute Manipulation
   //
 
   // check that we can create an empty origin attributes dict with default
   // members and values.
   var emptyAttrs = ChromeUtils.fillNonDefaultOriginAttributes({});
@@ -255,17 +255,17 @@ function run_test() {
     [ "^appId=5", {appId: 5}, {appId: 5}, "^appId=5" ],
     [ "^appId=5&userContextId=3", {appId: 5, userContextId: 3}, {appId: 5}, "^appId=5" ] ];
 
   // check that we can set the userContextId to default properly
   dflt_tests.forEach(t => {
     let orig = ChromeUtils.createOriginAttributesFromOrigin(uri + t[0]);
     checkValues(orig, t[1]);
     let mod = orig;
-    mod['userContextId'] = 0;
+    mod["userContextId"] = 0;
     checkValues(mod, t[2]);
     do_check_eq(ChromeUtils.originAttributesToSuffix(mod), t[3]);
   });
 
   // each row in the dflt2_tests array has these values:
   // [0] - the suffix used to create an origin attribute from
   // [1] - the expected result of creating an origin attributes from [0]
   // [2] - the expected result after setting firstPartyUri to the default
@@ -276,29 +276,29 @@ function run_test() {
     [ "^appId=5", {appId: 5}, {appId: 5}, "^appId=5" ],
     [ "^appId=5&firstPartyDomain=foo.com", {appId: 5, firstPartyDomain: "foo.com"}, {appId: 5}, "^appId=5" ] ];
 
   // check that we can set the userContextId to default properly
   dflt2_tests.forEach(t => {
     let orig = ChromeUtils.createOriginAttributesFromOrigin(uri + t[0]);
     checkValues(orig, t[1]);
     let mod = orig;
-    mod['firstPartyDomain'] = "";
+    mod["firstPartyDomain"] = "";
     checkValues(mod, t[2]);
     do_check_eq(ChromeUtils.originAttributesToSuffix(mod), t[3]);
   });
 
-  var fileURI = makeURI('file:///foo/bar').QueryInterface(Ci.nsIFileURL);
+  var fileURI = makeURI("file:///foo/bar").QueryInterface(Ci.nsIFileURL);
   var fileTests = [
     [true, fileURI.spec],
     [false, "file://UNIVERSAL_FILE_URI_ORIGIN"],
   ];
   fileTests.forEach(t => {
     Services.prefs.setBoolPref("security.fileuri.strict_origin_policy", t[0]);
     var filePrin = ssm.createCodebasePrincipal(fileURI, {});
     do_check_eq(filePrin.origin, t[1]);
   });
   Services.prefs.clearUserPref("security.fileuri.strict_origin_policy");
 
-  var aboutBlankURI = makeURI('about:blank');
+  var aboutBlankURI = makeURI("about:blank");
   var aboutBlankPrin = ssm.createCodebasePrincipal(aboutBlankURI, {});
   do_check_true(/^moz-nullprincipal:\{([0-9]|[a-z]|\-){36}\}$/.test(aboutBlankPrin.origin));
 }
--- a/chrome/nsChromeRegistry.cpp
+++ b/chrome/nsChromeRegistry.cpp
@@ -14,39 +14,40 @@
 #include "nsNetUtil.h"
 #include "nsString.h"
 #include "nsQueryObject.h"
 
 #include "mozilla/dom/URL.h"
 #include "nsIConsoleService.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
-#include "nsIDOMLocation.h"
 #include "nsIDOMWindowCollection.h"
 #include "nsIDOMWindow.h"
 #include "nsIObserverService.h"
 #include "nsIPresShell.h"
 #include "nsIScriptError.h"
 #include "nsIWindowMediator.h"
 #include "nsIPrefService.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Printf.h"
 #include "mozilla/StyleSheet.h"
 #include "mozilla/StyleSheetInlines.h"
+#include "mozilla/dom/Location.h"
 
 #ifdef ENABLE_INTL_API
 #include "unicode/uloc.h"
 #endif
 
 nsChromeRegistry* nsChromeRegistry::gChromeRegistry;
 
 // DO NOT use namespace mozilla; it'll break due to a naming conflict between
 // mozilla::TextRange and a TextRange in OSX headers.
 using mozilla::StyleSheet;
 using mozilla::dom::IsChromeURI;
+using mozilla::dom::Location;
 
 ////////////////////////////////////////////////////////////////////////////////
 
 void
 nsChromeRegistry::LogMessage(const char* aMsg, ...)
 {
   nsCOMPtr<nsIConsoleService> console 
     (do_GetService(NS_CONSOLESERVICE_CONTRACTID));
@@ -503,17 +504,17 @@ nsChromeRegistry::ReloadChrome()
       rv = windowEnumerator->HasMoreElements(&more);
       if (NS_FAILED(rv)) return rv;
       while (more) {
         nsCOMPtr<nsISupports> protoWindow;
         rv = windowEnumerator->GetNext(getter_AddRefs(protoWindow));
         if (NS_SUCCEEDED(rv)) {
           nsCOMPtr<nsPIDOMWindowOuter> domWindow = do_QueryInterface(protoWindow);
           if (domWindow) {
-            nsIDOMLocation* location = domWindow->GetLocation();
+            Location* location = domWindow->Location();
             if (location) {
               rv = location->Reload(false);
               if (NS_FAILED(rv)) return rv;
             }
           }
         }
         rv = windowEnumerator->HasMoreElements(&more);
         if (NS_FAILED(rv)) return rv;
--- a/devtools/client/debugger/new/debugger.css
+++ b/devtools/client/debugger/new/debugger.css
@@ -197,16 +197,101 @@
   color: var(--theme-selection-color);
   cursor: pointer;
 }
 
 .landing-page .sidebar li:hover a,
 .landing-page .sidebar li:focus a {
   color: inherit;
 }
+menu {
+  display: inline;
+  padding: 0;
+}
+
+menu > menuitem::after {
+  content: "\25BA";
+  float: right;
+}
+
+menu > menupopup {
+  display: none;
+}
+
+menu > menuitem:hover + menupopup,
+menu > menupopup:hover {
+  display: block;
+}
+
+menupopup {
+  position: fixed;
+  z-index: 10000;
+  background: white;
+  border: 1px solid #cccccc;
+  padding: 5px 0;
+  background: #f2f2f2;
+  border-radius: 5px;
+  color: #585858;
+  box-shadow: 0 0 4px 0 rgba(190, 190, 190, 0.8);
+  min-width: 130px;
+}
+
+menuitem {
+  display: block;
+  padding: 0 20px;
+  line-height: 20px;
+  font-weight: 500;
+  font-size: 13px;
+  -moz-user-select: none;
+  user-select: none;
+}
+
+menuitem:hover {
+  background: #3780fb;
+  color: white;
+  cursor: pointer;
+}
+
+menuitem[disabled=true] {
+  color: #cccccc;
+}
+
+menuitem[disabled=true]:hover {
+  background-color: transparent;
+  cursor: default;
+}
+
+menuitem[type=checkbox]::before {
+  content: "";
+  width: 10px;
+  display: inline-block;
+}
+
+menuitem[type=checkbox][checked=true]::before {
+  content: "\2713";
+  left: -8px;
+  position: relative;
+}
+
+menuseparator {
+  border-bottom: 1px solid #cacdd3;
+  width: 100%;
+  height: 5px;
+  display: block;
+  margin-bottom: 5px;
+}
+
+#contextmenu-mask.show {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 999;
+}
 :root.theme-light,
 :root .theme-light {
   --theme-search-overlays-semitransparent: rgba(221, 225, 228, 0.66);
 }
 
 * {
   box-sizing: border-box;
 }
@@ -238,700 +323,16 @@ body {
 ::-webkit-scrollbar-thumb {
   border-radius: 8px;
   background: rgba(113, 113, 113, 0.5);
 }
 
 :root.theme-dark .CodeMirror-scrollbar-filler {
   background: transparent;
 }
-/* BASICS */
-
-.CodeMirror {
-  /* Set height, width, borders, and global font properties here */
-  font-family: monospace;
-  height: 300px;
-  color: black;
-}
-
-/* PADDING */
-
-.CodeMirror-lines {
-  padding: 4px 0; /* Vertical padding around content */
-}
-.CodeMirror pre {
-  padding: 0 4px; /* Horizontal padding of content */
-}
-
-.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
-  background-color: white; /* The little square between H and V scrollbars */
-}
-
-/* GUTTER */
-
-.CodeMirror-gutters {
-  border-right: 1px solid #ddd;
-  background-color: #f7f7f7;
-  white-space: nowrap;
-}
-.CodeMirror-linenumbers {}
-.CodeMirror-linenumber {
-  padding: 0 3px 0 5px;
-  min-width: 20px;
-  text-align: right;
-  color: #999;
-  white-space: nowrap;
-}
-
-.CodeMirror-guttermarker { color: black; }
-.CodeMirror-guttermarker-subtle { color: #999; }
-
-/* CURSOR */
-
-.CodeMirror-cursor {
-  border-left: 1px solid black;
-  border-right: none;
-  width: 0;
-}
-/* Shown when moving in bi-directional text */
-.CodeMirror div.CodeMirror-secondarycursor {
-  border-left: 1px solid silver;
-}
-.cm-fat-cursor .CodeMirror-cursor {
-  width: auto;
-  border: 0 !important;
-  background: #7e7;
-}
-.cm-fat-cursor div.CodeMirror-cursors {
-  z-index: 1;
-}
-
-.cm-animate-fat-cursor {
-  width: auto;
-  border: 0;
-  -webkit-animation: blink 1.06s steps(1) infinite;
-  -moz-animation: blink 1.06s steps(1) infinite;
-  animation: blink 1.06s steps(1) infinite;
-  background-color: #7e7;
-}
-@-moz-keyframes blink {
-  0% {}
-  50% { background-color: transparent; }
-  100% {}
-}
-@-webkit-keyframes blink {
-  0% {}
-  50% { background-color: transparent; }
-  100% {}
-}
-@keyframes blink {
-  0% {}
-  50% { background-color: transparent; }
-  100% {}
-}
-
-/* Can style cursor different in overwrite (non-insert) mode */
-.CodeMirror-overwrite .CodeMirror-cursor {}
-
-.cm-tab { display: inline-block; text-decoration: inherit; }
-
-.CodeMirror-rulers {
-  position: absolute;
-  left: 0; right: 0; top: -50px; bottom: -20px;
-  overflow: hidden;
-}
-.CodeMirror-ruler {
-  border-left: 1px solid #ccc;
-  top: 0; bottom: 0;
-  position: absolute;
-}
-
-/* DEFAULT THEME */
-
-.cm-s-default .cm-header {color: blue;}
-.cm-s-default .cm-quote {color: #090;}
-.cm-negative {color: #d44;}
-.cm-positive {color: #292;}
-.cm-header, .cm-strong {font-weight: bold;}
-.cm-em {font-style: italic;}
-.cm-link {text-decoration: underline;}
-.cm-strikethrough {text-decoration: line-through;}
-
-.cm-s-default .cm-keyword {color: #708;}
-.cm-s-default .cm-atom {color: #219;}
-.cm-s-default .cm-number {color: #164;}
-.cm-s-default .cm-def {color: #00f;}
-.cm-s-default .cm-variable,
-.cm-s-default .cm-punctuation,
-.cm-s-default .cm-property,
-.cm-s-default .cm-operator {}
-.cm-s-default .cm-variable-2 {color: #05a;}
-.cm-s-default .cm-variable-3 {color: #085;}
-.cm-s-default .cm-comment {color: #a50;}
-.cm-s-default .cm-string {color: #a11;}
-.cm-s-default .cm-string-2 {color: #f50;}
-.cm-s-default .cm-meta {color: #555;}
-.cm-s-default .cm-qualifier {color: #555;}
-.cm-s-default .cm-builtin {color: #30a;}
-.cm-s-default .cm-bracket {color: #997;}
-.cm-s-default .cm-tag {color: #170;}
-.cm-s-default .cm-attribute {color: #00c;}
-.cm-s-default .cm-hr {color: #999;}
-.cm-s-default .cm-link {color: #00c;}
-
-.cm-s-default .cm-error {color: #f00;}
-.cm-invalidchar {color: #f00;}
-
-.CodeMirror-composing { border-bottom: 2px solid; }
-
-/* Default styles for common addons */
-
-div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
-div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
-.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
-.CodeMirror-activeline-background {background: #e8f2ff;}
-
-/* STOP */
-
-/* The rest of this file contains styles related to the mechanics of
-   the editor. You probably shouldn't touch them. */
-
-.CodeMirror {
-  position: relative;
-  overflow: hidden;
-  background: white;
-}
-
-.CodeMirror-scroll {
-  overflow: scroll !important; /* Things will break if this is overridden */
-  /* 30px is the magic margin used to hide the element's real scrollbars */
-  /* See overflow: hidden in .CodeMirror */
-  margin-bottom: -30px; margin-right: -30px;
-  padding-bottom: 30px;
-  height: 100%;
-  outline: none; /* Prevent dragging from highlighting the element */
-  position: relative;
-}
-.CodeMirror-sizer {
-  position: relative;
-  border-right: 30px solid transparent;
-}
-
-/* The fake, visible scrollbars. Used to force redraw during scrolling
-   before actual scrolling happens, thus preventing shaking and
-   flickering artifacts. */
-.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
-  position: absolute;
-  z-index: 6;
-  display: none;
-}
-.CodeMirror-vscrollbar {
-  right: 0; top: 0;
-  overflow-x: hidden;
-  overflow-y: scroll;
-}
-.CodeMirror-hscrollbar {
-  bottom: 0; left: 0;
-  overflow-y: hidden;
-  overflow-x: scroll;
-}
-.CodeMirror-scrollbar-filler {
-  right: 0; bottom: 0;
-}
-.CodeMirror-gutter-filler {
-  left: 0; bottom: 0;
-}
-
-.CodeMirror-gutters {
-  position: absolute; left: 0; top: 0;
-  min-height: 100%;
-  z-index: 3;
-}
-.CodeMirror-gutter {
-  white-space: normal;
-  height: 100%;
-  display: inline-block;
-  vertical-align: top;
-  margin-bottom: -30px;
-}
-.CodeMirror-gutter-wrapper {
-  position: absolute;
-  z-index: 4;
-  background: none !important;
-  border: none !important;
-}
-.CodeMirror-gutter-background {
-  position: absolute;
-  top: 0; bottom: 0;
-  z-index: 4;
-}
-.CodeMirror-gutter-elt {
-  position: absolute;
-  cursor: default;
-  z-index: 4;
-}
-.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
-.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
-
-.CodeMirror-lines {
-  cursor: text;
-  min-height: 1px; /* prevents collapsing before first draw */
-}
-.CodeMirror pre {
-  /* Reset some styles that the rest of the page might have set */
-  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
-  border-width: 0;
-  background: transparent;
-  font-family: inherit;
-  font-size: inherit;
-  margin: 0;
-  white-space: pre;
-  word-wrap: normal;
-  line-height: inherit;
-  color: inherit;
-  z-index: 2;
-  position: relative;
-  overflow: visible;
-  -webkit-tap-highlight-color: transparent;
-  -webkit-font-variant-ligatures: contextual;
-  font-variant-ligatures: contextual;
-}
-.CodeMirror-wrap pre {
-  word-wrap: break-word;
-  white-space: pre-wrap;
-  word-break: normal;
-}
-
-.CodeMirror-linebackground {
-  position: absolute;
-  left: 0; right: 0; top: 0; bottom: 0;
-  z-index: 0;
-}
-
-.CodeMirror-linewidget {
-  position: relative;
-  z-index: 2;
-  overflow: auto;
-}
-
-.CodeMirror-widget {}
-
-.CodeMirror-rtl pre { direction: rtl; }
-
-.CodeMirror-code {
-  outline: none;
-}
-
-/* Force content-box sizing for the elements where we expect it */
-.CodeMirror-scroll,
-.CodeMirror-sizer,
-.CodeMirror-gutter,
-.CodeMirror-gutters,
-.CodeMirror-linenumber {
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-
-.CodeMirror-measure {
-  position: absolute;
-  width: 100%;
-  height: 0;
-  overflow: hidden;
-  visibility: hidden;
-}
-
-.CodeMirror-cursor {
-  position: absolute;
-  pointer-events: none;
-}
-.CodeMirror-measure pre { position: static; }
-
-div.CodeMirror-cursors {
-  visibility: hidden;
-  position: relative;
-  z-index: 3;
-}
-div.CodeMirror-dragcursors {
-  visibility: visible;
-}
-
-.CodeMirror-focused div.CodeMirror-cursors {
-  visibility: visible;
-}
-
-.CodeMirror-selected { background: #d9d9d9; }
-.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
-.CodeMirror-crosshair { cursor: crosshair; }
-.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
-.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
-
-.cm-searching {
-  background: #ffa;
-  background: rgba(255, 255, 0, .4);
-}
-
-/* Used to force a border model for a node */
-.cm-force-border { padding-right: .1px; }
-
-@media print {
-  /* Hide the cursor when printing */
-  .CodeMirror div.CodeMirror-cursors {
-    visibility: hidden;
-  }
-}
-
-/* See issue #2901 */
-.cm-tab-wrap-hack:after { content: ''; }
-
-/* Help users use markselection to safely style text background */
-span.CodeMirror-selectedtext { background: none; }
-:root {
-  /* --breakpoint-background: url("chrome://devtools/skin/images/breakpoint.svg#light"); */
-  /* --breakpoint-hover-background: url("chrome://devtools/skin/images/breakpoint.svg#light-hover"); */
-  --breakpoint-active-color: rgba(44,187,15,.2);
-  --breakpoint-active-color-hover: rgba(44,187,15,.5);
-  /* --breakpoint-conditional-background: url("chrome://devtools/skin/images/breakpoint.svg#light-conditional"); */
-}
-
-.theme-dark:root {
-  /* --breakpoint-background: url("chrome://devtools/skin/images/breakpoint.svg#dark"); */
-  /* --breakpoint-hover-background: url("chrome://devtools/skin/images/breakpoint.svg#dark-hover"); */
-  --breakpoint-active-color: rgba(45,210,158,0.5);
-  --breakpoint-active-color-hover: rgba(0,255,175,.7);
-  /* --breakpoint-conditional-background: url("chrome://devtools/skin/images/breakpoint.svg#dark-conditional"); */
-}
-
-.CodeMirror .errors {
-  width: 16px;
-}
-
-.CodeMirror .error {
-  display: inline-block;
-  margin-left: 5px;
-  width: 12px;
-  height: 12px;
-  background-repeat: no-repeat;
-  background-position: center;
-  background-size: contain;
-  /* background-image: url("chrome://devtools/skin/images/editor-error.png"); */
-  opacity: 0.75;
-}
-
-.CodeMirror .hit-counts {
-  width: 6px;
-}
-
-.CodeMirror .hit-count {
-  display: inline-block;
-  height: 12px;
-  border: solid rgba(0,0,0,0.2);
-  border-width: 1px 1px 1px 0;
-  border-radius: 0 3px 3px 0;
-  padding: 0 3px;
-  font-size: 10px;
-  pointer-events: none;
-}
-
-.CodeMirror-linenumber:before {
-  content: " ";
-  display: block;
-  width: calc(100% - 3px);
-  position: absolute;
-  top: 1px;
-  left: 0;
-  height: 12px;
-  z-index: -1;
-  background-size: calc(100% - 2px) 12px;
-  background-repeat: no-repeat;
-  background-position: right center;
-  padding-inline-end: 9px;
-}
-
-.breakpoint .CodeMirror-linenumber {
-  color: var(--theme-body-background);
-}
-
-.breakpoint .CodeMirror-linenumber:before {
-  background-image: var(--breakpoint-background) !important;
-}
-
-.conditional .CodeMirror-linenumber:before {
-  background-image: var(--breakpoint-conditional-background) !important;
-}
-
-.debug-line .CodeMirror-linenumber {
-  background-color: var(--breakpoint-active-color);
-}
-
-.theme-dark .debug-line .CodeMirror-linenumber {
-  color: #c0c0c0;
-}
-
-.debug-line .CodeMirror-line {
-  background-color: var(--breakpoint-active-color) !important;
-}
-
-/* Don't display the highlight color since the debug line
-   is already highlighted */
-.debug-line .CodeMirror-activeline-background {
-  display: none;
-}
-
-.CodeMirror {
-  cursor: text;
-  height: 100%;
-}
-
-.CodeMirror-gutters {
-  cursor: default;
-}
-
-/* This is to avoid the fake horizontal scrollbar div of codemirror to go 0
-height when floating scrollbars are active. Make sure that this value is equal
-to the maximum of `min-height` specific to the `scrollbar[orient="horizontal"]`
-selector in floating-scrollbar-light.css across all platforms. */
-.CodeMirror-hscrollbar {
-  min-height: 10px;
-}
-
-/* This is to avoid the fake vertical scrollbar div of codemirror to go 0
-width when floating scrollbars are active. Make sure that this value is equal
-to the maximum of `min-width` specific to the `scrollbar[orient="vertical"]`
-selector in floating-scrollbar-light.css across all platforms. */
-.CodeMirror-vscrollbar {
-  min-width: 10px;
-}
-
-.cm-trailingspace {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==");
-  opacity: 0.75;
-  background-position: left bottom;
-  background-repeat: repeat-x;
-}
-
-.cm-highlight {
-  position: relative;
-}
-
-.cm-highlight:before {
-  position: absolute;
-  border-top-style: solid;
-  border-bottom-style: solid;
-  border-top-color: var(--theme-comment-alt);
-  border-bottom-color: var(--theme-comment-alt);
-  border-top-width: 1px;
-  border-bottom-width: 1px;
-  top: -1px;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  content: "";
-  margin-bottom: -1px;
-}
-
-.cm-highlight-full:before {
-  border: 1px solid var(--theme-comment-alt);
-}
-
-.cm-highlight-start:before {
-  border-left-width: 1px;
-  border-left-style: solid;
-  border-left-color: var(--theme-comment-alt);
-  margin: 0 0 -1px -1px;
-  border-top-left-radius: 2px;
-  border-bottom-left-radius: 2px;
-}
-
-.cm-highlight-end:before {
-  border-right-width: 1px;
-  border-right-style: solid;
-  border-right-color: var(--theme-comment-alt);
-  margin: 0 -1px -1px 0;
-  border-top-right-radius: 2px;
-  border-bottom-right-radius: 2px;
-}
-
-/* CodeMirror dialogs styling */
-
-.CodeMirror-dialog {
-  padding: 4px 3px;
-}
-
-.CodeMirror-dialog,
-.CodeMirror-dialog input {
-  font: message-box;
-}
-
-/* Fold addon */
-
-.CodeMirror-foldmarker {
-  color: blue;
-  text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
-  font-family: sans-serif;
-  line-height: .3;
-  cursor: pointer;
-}
-
-.CodeMirror-foldgutter {
-  width: 10px;
-}
-
-.CodeMirror-foldgutter-open,
-.CodeMirror-foldgutter-folded {
-  color: #555;
-  cursor: pointer;
-  line-height: 1;
-  padding: 0 1px;
-}
-
-.CodeMirror-foldgutter-open::after,
-.CodeMirror-foldgutter-open::before,
-.CodeMirror-foldgutter-folded::after,
-.CodeMirror-foldgutter-folded::before {
-  content: '';
-  height: 0;
-  width: 0;
-  position: absolute;
-  border: 4px solid transparent;
-}
-
-.CodeMirror-foldgutter-open::after {
-  border-top-color: var(--theme-codemirror-gutter-background);
-  top: 4px;
-}
-
-.CodeMirror-foldgutter-open::before {
-  border-top-color: var(--theme-body-color);
-  top: 5px;
-}
-
-.new-breakpoint .CodeMirror-foldgutter-open::after {
-  border-top-color: var(--theme-selection-background);
-}
-
-.new-breakpoint .CodeMirror-foldgutter-open::before {
-  border-top-color: white;
-}
-
-.CodeMirror-foldgutter-folded::after {
-  border-left-color: var(--theme-codemirror-gutter-background);
-  left: 3px;
-  top: 3px;
-}
-
-.CodeMirror-foldgutter-folded::before {
-  border-left-color: var(--theme-body-color);
-  left: 4px;
-  top: 3px;
-}
-
-.new-breakpoint .CodeMirror-foldgutter-folded::after {
-  border-left-color: var(--theme-selection-background);
-}
-
-.new-breakpoint .CodeMirror-foldgutter-folded::before {
-  border-left-color: white;
-}
-
-.CodeMirror-hints {
-  position: absolute;
-  z-index: 10;
-  overflow: hidden;
-  list-style: none;
-  margin: 0;
-  padding: 2px;
-  border-radius: 3px;
-  font-size: 90%;
-  max-height: 20em;
-  overflow-y: auto;
-}
-
-.CodeMirror-hint {
-  margin: 0;
-  padding: 0 4px;
-  border-radius: 2px;
-  max-width: 19em;
-  overflow: hidden;
-  white-space: pre;
-  cursor: pointer;
-}
-
-.CodeMirror-Tern-completion {
-  padding-inline-start: 22px;
-  position: relative;
-  line-height: 18px;
-}
-
-.CodeMirror-Tern-completion:before {
-  position: absolute;
-  left: 2px;
-  bottom: 2px;
-  border-radius: 50%;
-  font-size: 12px;
-  font-weight: bold;
-  height: 15px;
-  width: 15px;
-  line-height: 16px;
-  text-align: center;
-  color: #ffffff;
-  box-sizing: border-box;
-}
-
-.CodeMirror-Tern-completion-unknown:before {
-  content: "?";
-}
-
-.CodeMirror-Tern-completion-object:before {
-  content: "O";
-}
-
-.CodeMirror-Tern-completion-fn:before {
-  content: "F";
-}
-
-.CodeMirror-Tern-completion-array:before {
-  content: "A";
-}
-
-.CodeMirror-Tern-completion-number:before {
-  content: "N";
-}
-
-.CodeMirror-Tern-completion-string:before {
-  content: "S";
-}
-
-.CodeMirror-Tern-completion-bool:before {
-  content: "B";
-}
-
-.CodeMirror-Tern-completion-guess {
-  color: #999;
-}
-
-.CodeMirror-Tern-tooltip {
-  border-radius: 3px;
-  padding: 2px 5px;
-  white-space: pre-wrap;
-  max-width: 40em;
-  position: absolute;
-  z-index: 10;
-}
-
-.CodeMirror-Tern-hint-doc {
-  max-width: 25em;
-}
-
-.CodeMirror-Tern-farg-current {
-  text-decoration: underline;
-}
-
-.CodeMirror-Tern-fhint-guess {
-  opacity: .7;
-}
 :root.theme-light,
 :root .theme-light {
   --search-overlays-semitransparent: rgba(221, 225, 228, 0.66);
 }
 
 :root.theme-dark,
 :root .theme-dark {
   --search-overlays-semitransparent: rgba(42, 46, 56, 0.66);
@@ -1554,20 +955,28 @@ html .arrow.expanded svg {
 .search-field .search-nav-buttons {
   display: flex;
   user-select: none;
 }
 
 .search-field .search-nav-buttons .nav-btn {
   display: flex;
   height: 100%;
-  border-radius: 50%;
-}
-
-.search-field .search-nav-buttons .nav-btn:hover path,
+  background: transparent;
+  transition: all 0.25s ease-in-out;
+  border: 1px solid transparent;
+  justify-content: center;
+  padding-top: 4px;
+}
+
+.search-field .search-nav-buttons .nav-btn:hover {
+  cursor: pointer;
+  background: var(--theme-toolbar-background-hover);
+}
+
 .search-field .search-nav-buttons .nav-btn:active path {
   fill: var(--theme-comment-alt);
 }
 
 .search-field .search-nav-buttons .nav-btn path {
   fill: var(--theme-comment);
 }
 
@@ -1790,171 +1199,16 @@ html[dir="rtl"] .tree .node > div {
   font-size: 14px;
   color: var(--theme-comment);
   line-height: 30px;
 }
 
 .conditional-breakpoint-panel input:focus {
   outline-width: 0;
 }
-/* vim:set ts=2 sw=2 sts=2 et: */
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * There's a known codemirror flex issue with chrome that this addresses.
- * BUG https://github.com/devtools-html/debugger.html/issues/63
- */
-.editor-wrapper {
-  position: absolute;
-  height: calc(100% - 31px);
-  width: 100%;
-  top: 30px;
-  left: 0px;
-  --editor-footer-height: 27px;
-  --editor-searchbar-height: 27px;
-  --editor-second-searchbar-height: 27px;
-}
-
-html[dir="rtl"] .editor-mount {
-  direction: ltr;
-}
-
-.editor-wrapper .breakpoints {
-  position: absolute;
-  top: 0;
-  left: 0;
-}
-
-.function-search {
-  max-height: 300px;
-  overflow: hidden;
-}
-
-.function-search .results {
-  height: auto;
-}
-
-.editor.hit-marker {
-  height: 14px;
-}
-
-.coverage-on .CodeMirror-code :not(.hit-marker) .CodeMirror-line,
-.coverage-on .CodeMirror-code :not(.hit-marker) .CodeMirror-gutter-wrapper {
-  opacity: 0.5;
-}
-
-.editor.new-breakpoint svg {
-  fill: var(--theme-selection-background);
-  width: 60px;
-  height: 14px;
-  position: absolute;
-  top: 0px;
-  right: -4px;
-}
-
-.editor.new-breakpoint.folding-enabled svg {
-  right: -16px;
-}
-
-.new-breakpoint.has-condition svg {
-  fill: var(--theme-graphs-yellow);
-}
-
-.editor.new-breakpoint.breakpoint-disabled svg {
-  opacity: 0.3;
-}
-
-.CodeMirror {
-  width: 100%;
-  height: 100%;
-}
-
-.editor-wrapper .editor-mount {
-  width: 100%;
-  background-color: var(--theme-body-background);
-}
-
-.CodeMirror-linenumber {
-  font-size: 11px;
-  line-height: 14px;
-}
-
-.folding-enabled .CodeMirror-linenumber {
-  text-align: left;
-  padding: 0 0 0 2px;
-}
-
-/* set the linenumber white when there is a breakpoint */
-.new-breakpoint .CodeMirror-gutter-wrapper .CodeMirror-linenumber {
-  color: white;
-}
-
-/* move the breakpoint below the other gutter elements */
-.new-breakpoint .CodeMirror-gutter-elt:nth-child(2) {
-  z-index: 0;
-}
-
-.editor-wrapper .CodeMirror-line {
-  font-size: 11px;
-  line-height: 14px;
-}
-
-.theme-dark .editor-wrapper .CodeMirror-line .cm-comment {
-  color: var(--theme-content-color3);
-}
-
-.debug-line .CodeMirror-line {
-  background-color: var(--breakpoint-active-color) !important;
-}
-
-/* Don't display the highlight color since the debug line
-   is already highlighted */
-.debug-line .CodeMirror-activeline-background {
-  display: none;
-}
-
-.highlight-line .CodeMirror-line {
-  animation: fade-highlight-out 1.5s normal forwards;
-}
-
-@keyframes fade-highlight-out {
-  0% { background-color: var(--theme-highlight-gray); }
-  100% { background-color: transparent; }
-}
-
-.theme-dark .highlight-line .CodeMirror-line {
-  animation: fade-highlight-out-dark 1.5s normal forwards;
-}
-
-@keyframes fade-highlight-out-dark {
-  0% { background-color: var(--theme-content-color3); }
-  100% { background-color: transparent; }
-}
-
-.welcomebox {
-  width: calc(100% - 1px);
-
-  /* Offsetting it by 30px for the sources-header area */
-  height: calc(100% - 30px);
-  position: absolute;
-  top: 30px;
-  left: 0;
-  padding: 50px 0;
-  text-align: center;
-  font-size: 1.25em;
-  color: var(--theme-comment-alt);
-  background-color: var(--theme-tab-toolbar-background);
-  font-weight: lighter;
-  z-index: 100;
-  -moz-user-select: none;
-  user-select: none;
-}
 .toggle-button-start,
 .toggle-button-end {
   transform: translate(0, 2px);
   transition: transform 0.25s ease-in-out;
   cursor: pointer;
   padding: 4px 2px;
 }
 
@@ -1965,22 +1219,22 @@ html[dir="rtl"] .editor-mount {
 }
 
 .theme-dark .toggle-button-start svg,
 .theme-dark .toggle-button-end svg {
   fill: var(--theme-comment-alt);
 }
 
 .toggle-button-end {
-  margin-left: auto;
-  margin-right: 5px;
+  margin-inline-end: 5px;
+  margin-inline-start: auto;
 }
 
 .toggle-button-start {
-  margin-left: 5px;
+  margin-inline-start: 5px;
 }
 
 html:not([dir="rtl"]) .toggle-button-end svg,
 html[dir="rtl"] .toggle-button-start svg {
   transform: rotate(180deg);
 }
 
 html .toggle-button-end.vertical svg {
@@ -2219,16 +1473,17 @@ html .toggle-button-end.vertical svg {
 }
 
 .function-signature .comma {
   color: var(--object-color);
 }
 .popover {
   position: fixed;
   z-index: 100;
+  box-shadow: 1px 2px 4px 1px var(--theme-toolbar-background-alt);
 }
 
 .popover .gap {
   height: 5px;
   padding-top: 5px;
 }
 
 .popover::before,
@@ -2277,17 +1532,16 @@ html .toggle-button-end.vertical svg {
   width: 350px;
   min-height: 80px;
   border: 1px solid var(--theme-splitter-color);
   padding: 10px;
   height: auto;
   min-height: inherit;
   max-height: 200px;
   overflow: auto;
-  box-shadow: 1px 2px 4px 1px var(--theme-toolbar-background-alt);
 }
 
 .popover .preview .header {
   width: 100%;
   line-height: 20px;
   border-bottom: 1px solid #cccccc;
   display: flex;
   flex-direction: column;
@@ -2345,147 +1599,241 @@ html .toggle-button-end.vertical svg {
 .theme-dark .tooltip .preview {
   border-color: var(--theme-body-color);
 }
 
 .tooltip .gap {
   height: 4px;
   padding-top: 4px;
 }
-.input-expression {
-  width: 100%;
-  margin: 0px;
-  border: 1px;
-  cursor: pointer;
-  background-color: var(--theme-body-background);
-  font-size: 12px;
-  padding: 0px 20px;
-  color: var(--theme-body-color);
-}
-
-.input-expression::placeholder {
-  text-align: center;
-  font-style: italic;
+
+.add-to-expression-bar {
+  border: 1px solid var(--theme-splitter-color);
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  font-size: 14px;
+  line-height: 30px;
+  background: var(--theme-toolbar-background);
   color: var(--theme-comment-alt);
-  opacity: 1;
-}
-
-.input-expression:focus {
-  outline: none;
-  cursor: text;
-}
-
-.expression-input-container {
-  padding: 0.5em;
-  display: flex;
-}
-
-.expression-container {
-  border: 1px;
-  padding: 8px 5px 0px 0px;
+}
+
+.add-to-expression-bar .prompt {
+  padding-left: 3px;
+  width: 1em;
+}
+
+.add-to-expression-bar .expression-to-save-label {
+  width: calc(100% - 4em);
+}
+
+.add-to-expression-bar .expression-to-save-button {
+  font-size: 14px;
+  color: var(--theme-comment);
+  cursor: pointer;
+}
+/* vim:set ts=2 sw=2 sts=2 et: */
+
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/**
+ * There's a known codemirror flex issue with chrome that this addresses.
+ * BUG https://github.com/devtools-html/debugger.html/issues/63
+ */
+.editor-wrapper {
+  position: absolute;
+  height: calc(100% - 31px);
   width: 100%;
-  color: var(--theme-body-color);
+  top: 30px;
+  left: 0px;
+  --editor-footer-height: 27px;
+  --editor-searchbar-height: 27px;
+  --editor-second-searchbar-height: 27px;
+}
+
+html[dir="rtl"] .editor-mount {
+  direction: ltr;
+}
+
+.editor-wrapper .breakpoints {
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.function-search {
+  max-height: 300px;
+  overflow: hidden;
+}
+
+.function-search .results {
+  height: auto;
+}
+
+.editor.hit-marker {
+  height: 14px;
+}
+
+.coverage-on .CodeMirror-code :not(.hit-marker) .CodeMirror-line,
+.coverage-on .CodeMirror-code :not(.hit-marker) .CodeMirror-gutter-wrapper {
+  opacity: 0.5;
+}
+
+.editor.new-breakpoint svg {
+  fill: var(--theme-selection-background);
+  width: 60px;
+  height: 14px;
+  position: absolute;
+  top: 0px;
+  right: -4px;
+}
+
+.inline-bp {
+  background-color: #9ddfff;
+  width: 20px;
+  padding: 0px 5px;
+  margin: 0px 4px;
+  border-radius: 5px;
+  border-color: blue;
+  border: 1px solid #00b6ff;
+}
+
+.inline-bp:hover {
+  cursor: pointer;
+}
+
+.editor.new-breakpoint.folding-enabled svg {
+  right: -16px;
+}
+
+.new-breakpoint.has-condition svg {
+  fill: var(--theme-graphs-yellow);
+}
+
+.editor.new-breakpoint.breakpoint-disabled svg {
+  opacity: 0.3;
+}
+
+.CodeMirror {
+  width: 100%;
+  height: 100%;
+}
+
+.editor-wrapper .editor-mount {
+  width: 100%;
   background-color: var(--theme-body-background);
-  display: flex;
-  position: relative;
-}
-
-.expression-container > .tree {
-  width: 100%;
-  overflow: hidden;
-}
-
-:root.theme-light .expression-container:hover {
+}
+
+.CodeMirror-linenumber {
+  font-size: 11px;
+  line-height: 14px;
+}
+
+.folding-enabled .CodeMirror-linenumber {
+  text-align: left;
+  padding: 0 0 0 2px;
+}
+
+/* set the linenumber white when there is a breakpoint */
+.new-breakpoint .CodeMirror-gutter-wrapper .CodeMirror-linenumber {
+  color: white;
+}
+
+/* move the breakpoint below the other gutter elements */
+.new-breakpoint .CodeMirror-gutter-elt:nth-child(2) {
+  z-index: 0;
+}
+
+.editor-wrapper .CodeMirror-line {
+  font-size: 11px;
+  line-height: 14px;
+}
+
+.theme-dark .editor-wrapper .CodeMirror-line .cm-comment {
+  color: var(--theme-content-color3);
+}
+
+.debug-line .CodeMirror-line {
+  background-color: var(--breakpoint-active-color) !important;
+}
+
+/* Don't display the highlight color since the debug line
+   is already highlighted */
+.debug-line .CodeMirror-activeline-background {
+  display: none;
+}
+
+.highlight-line .CodeMirror-line {
+  animation: fade-highlight-out 1.5s normal forwards;
+}
+
+@keyframes fade-highlight-out {
+  0% { background-color: var(--theme-highlight-gray); }
+  100% { background-color: transparent; }
+}
+
+.theme-dark .highlight-line .CodeMirror-line {
+  animation: fade-highlight-out-dark 1.5s normal forwards;
+}
+
+@keyframes fade-highlight-out-dark {
+  0% { background-color: var(--theme-content-color3); }
+  100% { background-color: transparent; }
+}
+
+.welcomebox {
+  width: calc(100% - 1px);
+
+  /* Offsetting it by 30px for the sources-header area */
+  height: calc(100% - 30px);
+  position: absolute;
+  top: 30px;
+  left: 0;
+  padding: 50px 0;
+  text-align: center;
+  font-size: 1.25em;
+  color: var(--theme-comment-alt);
   background-color: var(--theme-tab-toolbar-background);
-}
-
-:root.theme-dark .expression-container:hover {
-  background-color: var(--search-overlays-semitransparent);
-}
-
-.expression-container .close-btn {
-  position: absolute;
-  offset-inline-end: 6px;
-  top: 6px;
-}
-
-.expression-container .close-btn {
-  display: none;
-}
-
-.expression-container:hover .close-btn {
-  display: block;
-}
-
-.expression-input {
-  cursor: pointer;
-  max-width: 50%;
-}
-
-.expression-separator {
-  padding: 0px 5px;
-}
-
-.expression-value {
-  overflow-x: scroll;
-  color: var(--theme-content-color2);
-  max-width: 50% !important;
-}
-
-.expression-error {
-  color: var(--theme-highlight-red);
-}
-.secondary-panes {
-  display: flex;
-  flex-direction: column;
-  flex: 1;
-  white-space: nowrap;
-}
-
-.secondary-panes * {
+  font-weight: lighter;
+  z-index: 100;
   -moz-user-select: none;
   user-select: none;
 }
 
-.secondary-panes .accordion {
-  overflow-y: auto;
-  overflow-x: hidden;
-  flex: 1 0 auto;
-}
-
-.pane {
-  color: var(--theme-body-color);
-}
-
-.pane .pane-info {
-  font-style: italic;
-  text-align: center;
-  padding: 0.5em;
-  -moz-user-select: none;
-  user-select: none;
-}
-
-.theme-dark .secondary-panes .accordion .arrow svg {
-  fill: var(--theme-comment);
+.CodeMirror-guttermarker-subtle {
+  visibility: hidden;
+}
+
+.visible {
+  visibility: visible;
 }
 
 .why-paused {
   background-color: var(--breakpoint-active-color);
   color: var(--theme-highlight-blue);
   padding: 10px 10px 10px 20px;
   white-space: normal;
   opacity: 0.9;
   font-size: 12px;
   font-weight: bold;
   flex: 0 1 auto;
 }
 
 .theme-dark .secondary-panes .why-paused {
   color: white;
 }
+
+.why-paused .message {
+  font-size: 10px;
+}
 .breakpoints-list * {
   -moz-user-select: none;
   user-select: none;
 }
 
 .breakpoints-list .breakpoint {
   font-size: 12px;
   color: var(--theme-content-color1);
@@ -2574,46 +1922,120 @@ html .breakpoints-list .breakpoint.pause
 
 .breakpoint .close {
   visibility: hidden;
 }
 
 .breakpoint:hover .close {
   visibility: visible;
 }
-
-.object-node.default-property {
-  opacity: 0.6;
-}
-
-.object-label {
+.input-expression {
+  width: 100%;
+  margin: 0px;
+  border: 1px;
+  cursor: pointer;
+  background-color: var(--theme-body-background);
+  font-size: 12px;
+  padding: 0px 20px;
+  color: var(--theme-body-color);
+}
+
+.input-expression::placeholder {
+  text-align: center;
+  font-style: italic;
+  color: var(--theme-comment-alt);
+  opacity: 1;
+}
+
+.input-expression:focus {
+  outline: none;
+  cursor: text;
+}
+
+.expression-input-container {
+  padding: 0.5em;
+  display: flex;
+}
+
+.expression-container {
+  border: 1px;
+  padding: 8px 5px 0px 0px;
+  width: 100%;
+  color: var(--theme-body-color);
+  background-color: var(--theme-body-background);
+  display: flex;
+  position: relative;
+}
+
+.expression-container > .tree {
+  width: 100%;
+  overflow: hidden;
+}
+
+:root.theme-light .expression-container:hover {
+  background-color: var(--theme-tab-toolbar-background);
+}
+
+:root.theme-dark .expression-container:hover {
+  background-color: var(--search-overlays-semitransparent);
+}
+
+.expression-container .close-btn {
+  position: absolute;
+  offset-inline-end: 6px;
+  top: 6px;
+}
+
+.expression-container .close-btn {
+  display: none;
+}
+
+.expression-container:hover .close-btn {
+  display: block;
+}
+
+.expression-input {
+  cursor: pointer;
+  max-width: 50%;
+}
+
+.expression-separator {
+  padding: 0px 5px;
+}
+
+.expression-value {
+  overflow-x: scroll;
+  color: var(--theme-content-color2);
+  max-width: 50% !important;
+}
+
+.expression-error {
+  color: var(--theme-highlight-red);
+}
+.frames ul .frames-group .group,
+.frames ul .frames-group .group .location {
+  font-weight: 500;
+}
+
+.frames ul .frames-group.expanded .group,
+.frames ul .frames-group.expanded .group .location {
   color: var(--theme-highlight-blue);
 }
 
-.objectBox-object,
-.objectBox-string,
-.objectBox-text,
-.objectBox-table,
-.objectLink-textNode,
-.objectLink-event,
-.objectLink-eventLog,
-.objectLink-regexp,
-.objectLink-object,
-.objectLink-Date,
-.theme-dark .objectBox-object,
-.theme-light .objectBox-object {
-  white-space: nowrap;
-}
-
-.scopes-list .tree-node {
-  overflow: hidden;
-}
-
-.scopes-list .function-signature {
-  display: inline-block;
+.frames ul .frames-group.expanded .react path {
+  fill: var(--theme-highlight-blue);
+}
+
+.frames ul .frames-group .frames-list li {
+  padding-left: 30px;
+}
+
+.frames ul .frames-group .frames-list {
+  border-top: 1px solid var(--theme-splitter-color);
+  border-bottom: 1px solid var(--theme-splitter-color);
 }
 .frames ul {
   list-style: none;
   margin: 0;
   padding: 0;
 }
 
 .frames ul li {
@@ -2622,22 +2044,16 @@ html .breakpoints-list .breakpoint.pause
   overflow: hidden;
   display: flex;
   justify-content: space-between;
   flex-direction: row;
   align-items: center;
   margin: 0;
 }
 
-/* Style the focused call frame like so:
-.frames ul li:focus {
-  border: 3px solid red;
-}
-*/
-
 .frames ul li * {
   -moz-user-select: none;
   user-select: none;
 }
 
 .frames ul li:nth-of-type(2n) {
   background-color: var(--theme-tab-toolbar-background);
 }
@@ -2682,16 +2098,20 @@ html .breakpoints-list .breakpoint.pause
   background-color: var(--theme-tab-toolbar-background);
 }
 
 .frames ul li.selected {
   background-color: var(--theme-selection-background);
   color: white;
 }
 
+.frames ul li.selected i.annotation-logo svg path {
+  fill: white;
+}
+
 :root.theme-light .frames ul li.selected .location,
 :root.theme-firebug .frames ul li.selected .location,
 :root.theme-dark .frames ul li.selected .location {
   color: white;
 }
 
 :root.theme-dark .frames ul li:hover .location,
 :root.theme-dark .frames ul li.selected .location {
@@ -2708,17 +2128,18 @@ html .breakpoints-list .breakpoint.pause
 }
 
 .show-more:hover {
   background-color: var(--theme-toolbar-background-hover);
 }
 
 .annotation-logo {
   width: 12px;
-  margin-left: 2px;
+  margin-left: 3px;
+  line-height: 8px;
 }
 
 :root.theme-dark .annotation-logo svg path {
   fill: var(--theme-highlight-blue);
 }
 .event-listeners {
   list-style: none;
   margin: 0;
@@ -2837,16 +2258,20 @@ html .breakpoints-list .breakpoint.pause
   height: 30px;
   overflow: hidden;
   position: sticky;
   top: 0;
   z-index: 1;
   background-color: var(--theme-body-background);
 }
 
+html[dir="rtl"] .command-bar {
+  border-right: 1px solid var(--theme-splitter-color);
+}
+
 .theme-dark .command-bar {
   background-color: var(--theme-tab-toolbar-background);
 }
 
 .command-bar > button {
   -webkit-appearance: none;
   -moz-appearance: none;
   appearance: none;
@@ -2899,16 +2324,80 @@ html .command-bar > button:disabled {
 
 .command-bar button.pause-exceptions.uncaught {
   color: var(--theme-highlight-purple);
 }
 
 .command-bar button.pause-exceptions.all {
   color: var(--theme-highlight-blue);
 }
+
+.object-node.default-property {
+  opacity: 0.6;
+}
+
+.object-label {
+  color: var(--theme-highlight-blue);
+}
+
+.objectBox-object,
+.objectBox-string,
+.objectBox-text,
+.objectBox-table,
+.objectLink-textNode,
+.objectLink-event,
+.objectLink-eventLog,
+.objectLink-regexp,
+.objectLink-object,
+.objectLink-Date,
+.theme-dark .objectBox-object,
+.theme-light .objectBox-object {
+  white-space: nowrap;
+}
+
+.scopes-list .tree-node {
+  overflow: hidden;
+}
+
+.scopes-list .function-signature {
+  display: inline-block;
+}
+.secondary-panes {
+  display: flex;
+  flex-direction: column;
+  flex: 1;
+  white-space: nowrap;
+}
+
+.secondary-panes * {
+  -moz-user-select: none;
+  user-select: none;
+}
+
+.secondary-panes .accordion {
+  overflow-y: auto;
+  overflow-x: hidden;
+  flex: 1 0 auto;
+}
+
+.pane {
+  color: var(--theme-body-color);
+}
+
+.pane .pane-info {
+  font-style: italic;
+  text-align: center;
+  padding: 0.5em;
+  -moz-user-select: none;
+  user-select: none;
+}
+
+.theme-dark .secondary-panes .accordion .arrow svg {
+  fill: var(--theme-comment);
+}
 .welcomebox {
   width: calc(100% - 1px);
 
   /* Offsetting it by 30px for the sources-header area */
   height: calc(100% - 30px);
   position: absolute;
   top: 30px;
   left: 0;
@@ -2965,17 +2454,16 @@ html .welcomebox .toggle-button-end {
   display: inline-flex;
   align-items: center;
   position: relative;
   transition: all 0.25s ease;
   min-width: 40px;
   overflow: hidden;
   padding: 6px;
   margin-inline-start: 3px;
-  margin-top: 2px;
 }
 
 .source-tab:hover {
   background-color: var(--theme-toolbar-background-alt);
   border-color: var(--theme-splitter-color);
   cursor: pointer;
 }
 
@@ -2999,16 +2487,30 @@ html .welcomebox .toggle-button-end {
   height: 12px;
   width: 12px;
 }
 
 .source-tab .prettyPrint path {
   fill: var(--theme-textbox-box-shadow);
 }
 
+.source-tab .blackBox {
+  line-height: 0;
+  padding: 5px;
+}
+
+.source-tab .blackBox svg {
+  height: 12px;
+  width: 12px;
+}
+
+.source-tab .blackBox path {
+  fill: var(--theme-textbox-box-shadow);
+}
+
 .source-tab .filename {
   white-space: nowrap;
   text-overflow: ellipsis;
   overflow: hidden;
 }
 
 .source-tab.pretty .filename {
   padding-inline-start: 8px;
--- a/devtools/client/debugger/new/debugger.js
+++ b/devtools/client/debugger/new/debugger.js
@@ -1,18 +1,18 @@
 (function webpackUniversalModuleDefinition(root, factory) {
 	if(typeof exports === 'object' && typeof module === 'object')
-		module.exports = factory(require("devtools/client/shared/vendor/react"), require("Services"), require("devtools/shared/flags"));
+		module.exports = factory(require("devtools/client/shared/vendor/react"), require("Services"), require("devtools/shared/flags"), require("devtools/client/sourceeditor/editor"));
 	else if(typeof define === 'function' && define.amd)
-		define(["devtools/client/shared/vendor/react", "Services", "devtools/shared/flags"], factory);
+		define(["devtools/client/shared/vendor/react", "Services", "devtools/shared/flags", "devtools/client/sourceeditor/editor"], factory);
 	else {
-		var a = typeof exports === 'object' ? factory(require("devtools/client/shared/vendor/react"), require("Services"), require("devtools/shared/flags")) : factory(root["devtools/client/shared/vendor/react"], root["Services"], root["devtools/shared/flags"]);
+		var a = typeof exports === 'object' ? factory(require("devtools/client/shared/vendor/react"), require("Services"), require("devtools/shared/flags"), require("devtools/client/sourceeditor/editor")) : factory(root["devtools/client/shared/vendor/react"], root["Services"], root["devtools/shared/flags"], root["devtools/client/sourceeditor/editor"]);
 		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
 	}
-})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_29__, __WEBPACK_EXTERNAL_MODULE_121__) {
+})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_29__, __WEBPACK_EXTERNAL_MODULE_121__, __WEBPACK_EXTERNAL_MODULE_994__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
 
 /******/ 	// The require function
 /******/ 	function __webpack_require__(moduleId) {
 
 /******/ 		// Check if module is in cache
@@ -60,16 +60,21 @@ return /******/ (function(modules) { // 
 /***/ },
 /* 1 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	var React = __webpack_require__(2);
 	var ReactDOM = __webpack_require__(22);
+	//
+	// if (process.env.NODE_ENV !== "production") {
+	//   const Perf = require("react-addons-perf");
+	//   window.Perf = Perf;
+	// }
 
 	var _require = __webpack_require__(131),
 	    bootstrap = _require.bootstrap,
 	    L10N = _require.L10N,
 	    unmountRoot = _require.unmountRoot;
 
 	var _require2 = __webpack_require__(828),
 	    isFirefoxPanel = _require2.isFirefoxPanel;
@@ -1170,26 +1175,26 @@ return /******/ (function(modules) { // 
 /* 46 */,
 /* 47 */,
 /* 48 */,
 /* 49 */,
 /* 50 */,
 /* 51 */
 /***/ function(module, exports) {
 
-	module.exports = function(module) {
-		if(!module.webpackPolyfill) {
-			module.deprecate = function() {};
-			module.paths = [];
-			// module.parent = undefined by default
-			module.children = [];
-			module.webpackPolyfill = 1;
-		}
-		return module;
-	}
+	module.exports = function(module) {
+		if(!module.webpackPolyfill) {
+			module.deprecate = function() {};
+			module.paths = [];
+			// module.parent = undefined by default
+			module.children = [];
+			module.webpackPolyfill = 1;
+		}
+		return module;
+	}
 
 
 /***/ },
 /* 52 */,
 /* 53 */,
 /* 54 */,
 /* 55 */,
 /* 56 */,
@@ -2778,17 +2783,17 @@ return /******/ (function(modules) { // 
 
 	module.exports = isIndex;
 
 
 /***/ },
 /* 118 */
 /***/ function(module, exports) {
 
-
+	
 
 /***/ },
 /* 119 */
 /***/ function(module, exports, __webpack_require__) {
 
 	/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
 	//
 	// Permission is hereby granted, free of charge, to any person obtaining a
@@ -3185,16 +3190,20 @@ return /******/ (function(modules) { // 
 
 	process.on = noop;
 	process.addListener = noop;
 	process.once = noop;
 	process.off = noop;
 	process.removeListener = noop;
 	process.removeAllListeners = noop;
 	process.emit = noop;
+	process.prependListener = noop;
+	process.prependOnceListener = noop;
+
+	process.listeners = function (name) { return [] }
 
 	process.binding = function (name) {
 	    throw new Error('process.binding is not supported');
 	};
 
 	process.cwd = function () { return '/' };
 	process.chdir = function (dir) {
 	    throw new Error('process.chdir is not supported');
@@ -3269,17 +3278,17 @@ return /******/ (function(modules) { // 
 	    var store = createStore(combineReducers(reducers));
 	    var actions = bindActionCreators(__webpack_require__(181), store.dispatch);
 
 	    debugGlobal("launchpadStore", store);
 
 	    if (isDevelopment()) {
 	      var config = yield updateConfig();
 	      actions.setConfig(config);
-	      AppConstants.DEBUG_JS_MODULES = true;
+	      // AppConstants.DEBUG_JS_MODULES = true;
 	    }
 
 	    return { store, actions, LaunchpadApp };
 	  });
 
 	  return function initApp() {
 	    return _ref2.apply(this, arguments);
 	  };
@@ -3353,40 +3362,38 @@ return /******/ (function(modules) { // 
 
 	var _require = __webpack_require__(3),
 	    bindActionCreators = _require.bindActionCreators,
 	    combineReducers = _require.combineReducers;
 
 	var _require2 = __webpack_require__(151),
 	    Provider = _require2.Provider;
 
-	var _require3 = __webpack_require__(830),
-	    DevToolsUtils = _require3.DevToolsUtils,
-	    AppConstants = _require3.AppConstants,
+	var _require3 = __webpack_require__(137),
 	    defer = _require3.defer;
 
 	var _require4 = __webpack_require__(184),
 	    debugGlobal = _require4.debugGlobal;
 
 	var _require5 = __webpack_require__(828),
 	    setConfig = _require5.setConfig,
 	    getValue = _require5.getValue,
 	    isDevelopment = _require5.isDevelopment;
 
 	var L10N = __webpack_require__(185);
 
-	var _require6 = __webpack_require__(180),
+	var _require6 = __webpack_require__(966),
 	    showMenu = _require6.showMenu,
 	    buildMenu = _require6.buildMenu;
 
-	setConfig(({"environment":"firefox-panel","logging":false,"clientLogging":false,"firefox":{"mcPath":"./firefox"},"workers":{"parserURL":"resource://devtools/client/debugger/new/parser-worker.js","prettyPrintURL":"resource://devtools/client/debugger/new/pretty-print-worker.js"},"features":{"blackbox":{"enabled":true},"watchExpressions":{"enabled":true},"chromeScopes":{"enabled":false},"eventListeners":{"enabled":false},"codeCoverage":{"enabled":false},"searchModifiers":{"enabled":true},"symbolSearch":{"enabled":true},"editorPreview":{"enabled":true},"showSource":{"enabled":true}}}));
+	setConfig(({"environment":"firefox-panel","logging":false,"clientLogging":false,"firefox":{"mcPath":"./firefox"},"workers":{"parserURL":"resource://devtools/client/debugger/new/parser-worker.js","prettyPrintURL":"resource://devtools/client/debugger/new/pretty-print-worker.js"},"features":{"blackbox":{"enabled":true},"chromeScopes":{"enabled":false},"eventListeners":{"enabled":false},"codeCoverage":{"enabled":false}}}));
 
 	// Set various flags before requiring app code.
 	if (getValue("logging.client")) {
-	  DevToolsUtils.dumpn.wantLogging = true;
+	  // DevToolsUtils.dumpn.wantLogging = true;
 	}
 
 	var _require7 = __webpack_require__(885),
 	    firefox = _require7.firefox,
 	    chrome = _require7.chrome,
 	    startDebugging = _require7.startDebugging;
 
 	var Root = __webpack_require__(186);
@@ -3685,17 +3692,17 @@ return /******/ (function(modules) { // 
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	/* This Source Code Form is subject to the terms of the Mozilla Public
 	 * License, v. 2.0. If a copy of the MPL was not distributed with this
 	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-	var _require = __webpack_require__(830),
+	var _require = __webpack_require__(137),
 	    defer = _require.defer;
 
 	var _require2 = __webpack_require__(138),
 	    entries = _require2.entries,
 	    toObject = _require2.toObject;
 
 	var _require3 = __webpack_require__(140),
 	    executeSoon = _require3.executeSoon;
@@ -3747,33 +3754,56 @@ return /******/ (function(modules) { // 
 	    });
 	    return deferred.promise;
 	  };
 	}
 
 	exports.promise = promiseMiddleware;
 
 /***/ },
-/* 137 */,
+/* 137 */
+/***/ function(module, exports) {
+
+	"use strict";
+
+	/**
+	 * Returns a deferred object, with a resolve and reject property.
+	 * https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred
+	 */
+	module.exports = function defer() {
+	  var resolve = void 0,
+	      reject = void 0;
+	  var promise = new Promise(function () {
+	    resolve = arguments[0];
+	    reject = arguments[1];
+	  });
+	  return {
+	    resolve: resolve,
+	    reject: reject,
+	    promise: promise
+	  };
+	};
+
+/***/ },
 /* 138 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
 	function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
 	/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 	/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 	/* This Source Code Form is subject to the terms of the Mozilla Public
 	 * License, v. 2.0. If a copy of the MPL was not distributed with this
 	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-	var co = __webpack_require__(882);
+	var co = __webpack_require__(965);
 
 	function asPaused(client, func) {
 	  if (client.state != "paused") {
 	    return co(function* () {
 	      yield client.interrupt();
 	      var result = void 0;
 
 	      try {
@@ -4528,17 +4558,17 @@ return /******/ (function(modules) { // 
 	      }
 	      return ii;
 	    };
 
 	    ArraySeq.prototype.__iterator = function(type, reverse) {
 	      var array = this._array;
 	      var maxIndex = array.length - 1;
 	      var ii = 0;
-	      return new Iterator(function()
+	      return new Iterator(function() 
 	        {return ii > maxIndex ?
 	          iteratorDone() :
 	          iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}
 	      );
 	    };
 
 
 
@@ -4999,17 +5029,17 @@ return /******/ (function(modules) { // 
 	          return ii + 1;
 	        }
 	      }
 	      return ii;
 	    };
 
 	    Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;
 	      var ii = 0;
-	      return new Iterator(function()
+	      return new Iterator(function() 
 	        {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}
 	      );
 	    };
 
 	    Repeat.prototype.equals = function(other) {
 	      return other instanceof Repeat ?
 	        is(this._value, other._value) :
 	        deepEqual(other);
@@ -7197,17 +7227,17 @@ return /******/ (function(modules) { // 
 	    reversedSequence.reverse = function()  {return iterable};
 	    if (iterable.flip) {
 	      reversedSequence.flip = function () {
 	        var flipSequence = flipFactory(iterable);
 	        flipSequence.reverse = function()  {return iterable.flip()};
 	        return flipSequence;
 	      };
 	    }
-	    reversedSequence.get = function(key, notSetValue)
+	    reversedSequence.get = function(key, notSetValue) 
 	      {return iterable.get(useKeys ? key : -1 - key, notSetValue)};
 	    reversedSequence.has = function(key )
 	      {return iterable.has(useKeys ? key : -1 - key)};
 	    reversedSequence.includes = function(value ) {return iterable.includes(value)};
 	    reversedSequence.cacheResult = cacheResultThrough;
 	    reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;
 	      return iterable.__iterate(function(v, k)  {return fn(v, k, this$0)}, !reverse);
 	    };
@@ -7396,17 +7426,17 @@ return /******/ (function(modules) { // 
 
 	  function takeWhileFactory(iterable, predicate, context) {
 	    var takeSequence = makeSequence(iterable);
 	    takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
 	      if (reverse) {
 	        return this.cacheResult().__iterate(fn, reverse);
 	      }
 	      var iterations = 0;
-	      iterable.__iterate(function(v, k, c)
+	      iterable.__iterate(function(v, k, c) 
 	        {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}
 	      );
 	      return iterations;
 	    };
 	    takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
 	      if (reverse) {
 	        return this.cacheResult().__iterator(type, reverse);
 	      }
@@ -7587,17 +7617,17 @@ return /******/ (function(modules) { // 
 	  }
 
 
 	  function interposeFactory(iterable, separator) {
 	    var interposedSequence = makeSequence(iterable);
 	    interposedSequence.size = iterable.size && iterable.size * 2 -1;
 	    interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
 	      var iterations = 0;
-	      iterable.__iterate(function(v, k)
+	      iterable.__iterate(function(v, k) 
 	        {return (!iterations || fn(separator, iterations++, this$0) !== false) &&
 	        fn(v, iterations++, this$0) !== false},
 	        reverse
 	      );
 	      return iterations;
 	    };
 	    interposedSequence.__iteratorUncached = function(type, reverse) {
 	      var iterator = iterable.__iterator(ITERATE_VALUES, reverse);
@@ -11581,17 +11611,17 @@ return /******/ (function(modules) { // 
 /* 179 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	var React = __webpack_require__(2);
 	var dom = React.DOM;
 
-	var _require = __webpack_require__(180),
+	var _require = __webpack_require__(966),
 	    showMenu = _require.showMenu,
 	    buildMenu = _require.buildMenu;
 
 	var Settings = React.createClass({
 	  propTypes: {
 	    config: React.PropTypes.object.isRequired,
 	    setValue: React.PropTypes.func.isRequired
 	  },
@@ -11693,115 +11723,17 @@ return /******/ (function(modules) { // 
 
 	    return dom.div({ className: "tab-group" }, dom.h3({}, "Configurations"), this.renderConfig(config), config.features ? (dom.h3({}, "Features"), this.renderFeatures(config.features)) : null);
 	  }
 	});
 
 	module.exports = Settings;
 
 /***/ },
-/* 180 */
-/***/ function(module, exports, __webpack_require__) {
-
-	"use strict";
-
-	var _require = __webpack_require__(830),
-	    Menu = _require.Menu,
-	    MenuItem = _require.MenuItem;
-
-	var _require2 = __webpack_require__(828),
-	    isFirefoxPanel = _require2.isFirefoxPanel;
-
-	function createPopup(doc) {
-	  var popup = doc.createElement("menupopup");
-	  popup.className = "landing-popup";
-	  if (popup.openPopupAtScreen) {
-	    return popup;
-	  }
-
-	  function preventDefault(e) {
-	    e.preventDefault();
-	    e.returnValue = false;
-	  }
-
-	  var mask = document.querySelector("#contextmenu-mask");
-	  if (!mask) {
-	    mask = doc.createElement("div");
-	    mask.id = "contextmenu-mask";
-	    document.body.appendChild(mask);
-	  }
-
-	  mask.onclick = () => popup.hidePopup();
-
-	  popup.openPopupAtScreen = function (clientX, clientY) {
-	    this.style.setProperty("left", `${clientX}px`);
-	    this.style.setProperty("top", `${clientY}px`);
-	    mask = document.querySelector("#contextmenu-mask");
-	    window.onwheel = preventDefault;
-	    mask.classList.add("show");
-	    this.dispatchEvent(new Event("popupshown"));
-	    this.popupshown;
-	  };
-
-	  popup.hidePopup = function () {
-	    this.remove();
-	    mask = document.querySelector("#contextmenu-mask");
-	    mask.classList.remove("show");
-	    window.onwheel = null;
-	  };
-
-	  return popup;
-	}
-
-	if (!isFirefoxPanel()) {
-	  Menu.prototype.createPopup = createPopup;
-	}
-
-	function onShown(menu, popup) {
-	  popup.childNodes.forEach((menuitem, index) => {
-	    var item = menu.items[index];
-
-	    if (!item.disabled) {
-	      menuitem.onclick = () => {
-	        item.click();
-	        popup.hidePopup();
-	      };
-	    }
-	  });
-	}
-
-	function showMenu(e, items) {
-	  if (items.length === 0) {
-	    return;
-	  }
-
-	  var menu = new Menu();
-	  items.forEach(item => menu.append(new MenuItem(item)));
-
-	  if (isFirefoxPanel()) {
-	    return menu.popup(e.screenX, e.screenY, { doc: window.parent.document });
-	  }
-
-	  menu.on("open", (_, popup) => onShown(menu, popup));
-	  menu.popup(e.clientX, e.clientY, { doc: document });
-	}
-
-	function buildMenu(items) {
-	  return items.map(itm => {
-	    var hide = typeof itm.hidden === "function" ? itm.hidden() : itm.hidden;
-	    return hide ? null : itm.item;
-	  }).filter(itm => itm !== null);
-	}
-
-	module.exports = {
-	  showMenu,
-	  buildMenu
-	};
-
-/***/ },
+/* 180 */,
 /* 181 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	var tabs = __webpack_require__(182);
 	var config = __webpack_require__(183);
 
@@ -12006,17 +11938,17 @@ return /******/ (function(modules) { // 
 /***/ },
 /* 185 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
-	var _require = __webpack_require__(830),
+	var _require = __webpack_require__(975),
 	    sprintf = _require.sprintf;
 
 	var _require2 = __webpack_require__(883),
 	    parse = _require2.parse;
 
 	var strings = {};
 
 	function setBundle(bundle) {
@@ -12096,94 +12028,93 @@ return /******/ (function(modules) { // 
 
 /***/ },
 /* 188 */,
 /* 189 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
-	/* This Source Code Form is subject to the terms of the Mozilla Public
-	 * License, v. 2.0. If a copy of the MPL was not distributed with this
-	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-	/* global window */
-
-	/**
-	 * Redux store utils
-	 * @module utils/create-store
-	 */
-
-	var _require = __webpack_require__(3),
-	    createStore = _require.createStore,
-	    applyMiddleware = _require.applyMiddleware;
-
-	var _require2 = __webpack_require__(190),
-	    waitUntilService = _require2.waitUntilService;
-
-	var _require3 = __webpack_require__(191),
-	    log = _require3.log;
-
-	var _require4 = __webpack_require__(192),
-	    history = _require4.history;
-
-	var _require5 = __webpack_require__(193),
-	    promise = _require5.promise;
-
-	var _require6 = __webpack_require__(224),
-	    thunk = _require6.thunk;
-
-	/**
-	 * @memberof utils/create-store
-	 * @static
-	 */
-
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+
+	var _redux = __webpack_require__(3);
+
+	var _waitService = __webpack_require__(190);
+
+	var _log = __webpack_require__(191);
+
+	var _history = __webpack_require__(192);
+
+	var _promise = __webpack_require__(193);
+
+	var _thunk = __webpack_require__(224);
 
 	/**
 	 * This creates a dispatcher with all the standard middleware in place
 	 * that all code requires. It can also be optionally configured in
 	 * various ways, such as logging and recording.
 	 *
 	 * @param {object} opts:
 	 *        - log: log all dispatched actions to console
 	 *        - history: an array to store every action in. Should only be
 	 *                   used in tests.
 	 *        - middleware: array of middleware to be included in the redux store
 	 * @memberof utils/create-store
 	 * @static
 	 */
+
+
+	/**
+	 * @memberof utils/create-store
+	 * @static
+	 */
+
+
+	/* This Source Code Form is subject to the terms of the Mozilla Public
+	 * License, v. 2.0. If a copy of the MPL was not distributed with this
+	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+	/* global window */
+
+	/**
+	 * Redux store utils
+	 * @module utils/create-store
+	 */
+
 	var configureStore = function () {
 	  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
-	  var middleware = [thunk(opts.makeThunkArgs), promise,
+	  var middleware = [(0, _thunk.thunk)(opts.makeThunkArgs), _promise.promise,
 
 	  // Order is important: services must go last as they always
 	  // operate on "already transformed" actions. Actions going through
 	  // them shouldn't have any special fields like promises, they
 	  // should just be normal JSON objects.
-	  waitUntilService];
+	  _waitService.waitUntilService];
 
 	  if (opts.history) {
-	    middleware.push(history(opts.history));
+	    middleware.push((0, _history.history)(opts.history));
 	  }
 
 	  if (opts.middleware) {
 	    opts.middleware.forEach(fn => middleware.push(fn));
 	  }
 
 	  if (opts.log) {
-	    middleware.push(log);
+	    middleware.push(_log.log);
 	  }
 
 	  // Hook in the redux devtools browser extension if it exists
 	  var devtoolsExt = typeof window === "object" && window.devToolsExtension ? window.devToolsExtension() : f => f;
 
-	  return applyMiddleware.apply(undefined, middleware)(devtoolsExt(createStore));
-	};
-
-	module.exports = configureStore;
+	  return _redux.applyMiddleware.apply(undefined, middleware)(devtoolsExt(_redux.createStore));
+	};
+
+	exports.default = configureStore;
 
 /***/ },
 /* 190 */
 /***/ function(module, exports) {
 
 	"use strict";
 
 	/**
@@ -12250,90 +12181,109 @@ return /******/ (function(modules) { // 
 	exports.waitUntilService = waitUntilService;
 
 /***/ },
 /* 191 */
 /***/ function(module, exports) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.log = log;
 	/**
 	 * A middleware that logs all actions coming through the system
 	 * to the console.
 	 */
 	function log(_ref) {
 	  var dispatch = _ref.dispatch,
 	      getState = _ref.getState;
 
 	  return next => action => {
 	    var actionText = JSON.stringify(action, null, 2);
 	    var truncatedActionText = `${actionText.slice(0, 1000)}...`;
 	    console.log(`[DISPATCH ${action.type}]`, action, truncatedActionText);
 	    next(action);
 	  };
 	}
 
-	exports.log = log;
-
 /***/ },
 /* 192 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
-	var _require = __webpack_require__(828),
-	    isDevelopment = _require.isDevelopment;
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.history = undefined;
+
+	var _devtoolsConfig = __webpack_require__(828);
 
 	/**
 	 * A middleware that stores every action coming through the store in the passed
 	 * in logging object. Should only be used for tests, as it collects all
 	 * action information, which will cause memory bloat.
 	 */
-	exports.history = function () {
+	var history = exports.history = function () {
 	  var log = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
 	  return (_ref) => {
 	    var dispatch = _ref.dispatch,
 	        getState = _ref.getState;
 
-	    if (isDevelopment()) {
+	    if ((0, _devtoolsConfig.isDevelopment)()) {
 	      console.warn("Using history middleware stores all actions in state for " + "testing and devtools is not currently running in test " + "mode. Be sure this is intentional.");
 	    }
 	    return next => action => {
 	      log.push(action);
 	      next(action);
 	    };
 	  };
 	};
 
 /***/ },
 /* 193 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.promise = exports.PROMISE = undefined;
+
+	var _defer = __webpack_require__(194);
+
+	var _defer2 = _interopRequireDefault(_defer);
+
+	var _toPairs = __webpack_require__(195);
+
+	var _toPairs2 = _interopRequireDefault(_toPairs);
+
+	var _fromPairs = __webpack_require__(221);
+
+	var _fromPairs2 = _interopRequireDefault(_fromPairs);
+
+	var _DevToolsUtils = __webpack_require__(222);
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
 	/* This Source Code Form is subject to the terms of the Mozilla Public
 	 * License, v. 2.0. If a copy of the MPL was not distributed with this
 	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-	var defer = __webpack_require__(194);
-	var toPairs = __webpack_require__(195);
-	var fromPairs = __webpack_require__(221);
-
-	var _require = __webpack_require__(222),
-	    executeSoon = _require.executeSoon;
-
-	var PROMISE = exports.PROMISE = "@@dispatch/promise";
 	var seqIdVal = 1;
 
 	function seqIdGen() {
 	  return seqIdVal++;
 	}
 
 	function filterAction(action) {
-	  return fromPairs(toPairs(action).filter(pair => pair[0] !== PROMISE));
+	  return (0, _fromPairs2.default)((0, _toPairs2.default)(action).filter(pair => pair[0] !== PROMISE));
 	}
 
 	function promiseMiddleware(_ref) {
 	  var dispatch = _ref.dispatch,
 	      getState = _ref.getState;
 
 	  return next => action => {
 	    if (!(PROMISE in action)) {
@@ -12346,62 +12296,65 @@ return /******/ (function(modules) { // 
 	    // Create a new action that doesn't have the promise field and has
 	    // the `seqId` field that represents the sequence id
 	    action = Object.assign(filterAction(action), { seqId });
 
 	    dispatch(Object.assign({}, action, { status: "start" }));
 
 	    // Return the promise so action creators can still compose if they
 	    // want to.
-	    var deferred = defer();
+	    var deferred = (0, _defer2.default)();
 	    promiseInst.then(value => {
-	      executeSoon(() => {
+	      (0, _DevToolsUtils.executeSoon)(() => {
 	        dispatch(Object.assign({}, action, {
 	          status: "done",
 	          value: value
 	        }));
 	        deferred.resolve(value);
 	      });
 	    }, error => {
-	      executeSoon(() => {
+	      (0, _DevToolsUtils.executeSoon)(() => {
 	        dispatch(Object.assign({}, action, {
 	          status: "error",
 	          error: error.message || error
 	        }));
 	        deferred.reject(error);
 	      });
 	    });
 	    return deferred.promise;
 	  };
 	}
 
+	var PROMISE = exports.PROMISE = "@@dispatch/promise";
 	exports.promise = promiseMiddleware;
 
 /***/ },
 /* 194 */
 /***/ function(module, exports) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.default = defer;
 	function defer() {
 	  var resolve = void 0; // eslint-disable-line no-unused-vars
 	  var reject = void 0; // eslint-disable-line no-unused-vars
 	  var promise = new Promise(function (innerResolve, innerReject) {
 	    resolve = innerResolve;
 	    reject = innerReject;
 	  });
 	  return {
 	    resolve,
 	    reject,
 	    promise
 	  };
 	}
 
-	module.exports = defer;
-
 /***/ },
 /* 195 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var createToPairs = __webpack_require__(196),
 	    keys = __webpack_require__(205);
 
 	/**
@@ -13251,43 +13204,55 @@ return /******/ (function(modules) { // 
 
 
 /***/ },
 /* 222 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
-	var assert = __webpack_require__(223);
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.reportException = reportException;
+	exports.executeSoon = executeSoon;
+
+	var _assert = __webpack_require__(223);
+
+	var _assert2 = _interopRequireDefault(_assert);
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 	function reportException(who, exception) {
 	  var msg = `${who} threw an exception: `;
 	  console.error(msg, exception);
 	}
 
 	function executeSoon(fn) {
 	  setTimeout(fn, 0);
 	}
 
-	module.exports = { reportException, executeSoon, assert };
+	exports.default = _assert2.default;
 
 /***/ },
 /* 223 */
 /***/ function(module, exports) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.default = assert;
 	function assert(condition, message) {
 	  if (!condition) {
 	    throw new Error(`Assertion failure: ${message}`);
 	  }
 	}
 
-	module.exports = assert;
-
 /***/ },
 /* 224 */
 /***/ function(module, exports) {
 
 	"use strict";
 
 	/**
 	 * A middleware that allows thunks (functions) to be dispatched. If
@@ -13354,65 +13319,93 @@ return /******/ (function(modules) { // 
 
 
 /***/ },
 /* 227 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+
+	var _expressions = __webpack_require__(228);
+
+	var _expressions2 = _interopRequireDefault(_expressions);
+
+	var _eventListeners = __webpack_require__(231);
+
+	var _eventListeners2 = _interopRequireDefault(_eventListeners);
+
+	var _sources = __webpack_require__(232);
+
+	var _sources2 = _interopRequireDefault(_sources);
+
+	var _breakpoints = __webpack_require__(236);
+
+	var _breakpoints2 = _interopRequireDefault(_breakpoints);
+
+	var _asyncRequests = __webpack_require__(238);
+
+	var _asyncRequests2 = _interopRequireDefault(_asyncRequests);
+
+	var _pause = __webpack_require__(239);
+
+	var _pause2 = _interopRequireDefault(_pause);
+
+	var _ui = __webpack_require__(240);
+
+	var _ui2 = _interopRequireDefault(_ui);
+
+	var _coverage = __webpack_require__(241);
+
+	var _coverage2 = _interopRequireDefault(_coverage);
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
 	/* This Source Code Form is subject to the terms of the Mozilla Public
 	 * License, v. 2.0. If a copy of the MPL was not distributed with this
 	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-	var expressions = __webpack_require__(228);
-	var eventListeners = __webpack_require__(231);
-	var sources = __webpack_require__(232);
-	var breakpoints = __webpack_require__(236);
-	var asyncRequests = __webpack_require__(238);
-	var pause = __webpack_require__(239);
-	var ui = __webpack_require__(240);
-	var coverage = __webpack_require__(241);
-
-	module.exports = {
-	  expressions: expressions.update,
-	  eventListeners: eventListeners.update,
-	  sources: sources.update,
-	  breakpoints: breakpoints.update,
-	  pause: pause.update,
-	  asyncRequests,
-	  ui: ui.update,
-	  coverage: coverage.update
+	exports.default = {
+	  expressions: _expressions2.default,
+	  eventListeners: _eventListeners2.default,
+	  sources: _sources2.default,
+	  breakpoints: _breakpoints2.default,
+	  asyncRequests: _asyncRequests2.default,
+	  pause: _pause2.default,
+	  ui: _ui2.default,
+	  coverage: _coverage2.default
 	};
 
 /***/ },
 /* 228 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	Object.defineProperty(exports, "__esModule", {
 	  value: true
 	});
-	exports.State = undefined;
-	exports.update = update;
-	exports.getExpressions = getExpressions;
-	exports.getVisibleExpressions = getVisibleExpressions;
+	exports.getVisibleExpressions = exports.getExpressions = exports.State = undefined;
 	exports.getExpression = getExpression;
 
 	var _constants = __webpack_require__(229);
 
 	var _constants2 = _interopRequireDefault(_constants);
 
 	var _makeRecord = __webpack_require__(230);
 
 	var _makeRecord2 = _interopRequireDefault(_makeRecord);
 
 	var _immutable = __webpack_require__(146);
 
+	var _reselect = __webpack_require__(992);
+
 	var _prefs = __webpack_require__(226);
 
 	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 	var State = exports.State = (0, _makeRecord2.default)({
 	  expressions: (0, _immutable.List)(restoreExpressions())
 	});
 
@@ -13485,86 +13478,95 @@ return /******/ (function(modules) { // 
 
 	function deleteExpression(state, input) {
 	  var index = getExpressions({ expressions: state }).findKey(e => e.input == input);
 	  var newState = state.deleteIn(["expressions", index]);
 	  storeExpressions(newState);
 	  return newState;
 	}
 
-	function getExpressions(state) {
-	  return state.expressions.get("expressions");
-	}
-
-	function getVisibleExpressions(state) {
-	  return state.expressions.get("expressions").filter(e => e.visible);
-	}
+	var getExpressionsWrapper = state => state.expressions;
+
+	var getExpressions = exports.getExpressions = (0, _reselect.createSelector)(getExpressionsWrapper, expressions => expressions.get("expressions"));
+
+	var getVisibleExpressions = exports.getVisibleExpressions = (0, _reselect.createSelector)(getExpressions, expressions => expressions.filter(e => e.visible));
 
 	function getExpression(state, input) {
 	  return getExpressions(state).find(exp => exp.input == input);
 	}
 
+	exports.default = update;
+
 /***/ },
 /* 229 */
 /***/ function(module, exports) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+
+
 	/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 	/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 	/* This Source Code Form is subject to the terms of the Mozilla Public
 	 * License, v. 2.0. If a copy of the MPL was not distributed with this
 	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-	exports.UPDATE_EVENT_BREAKPOINTS = "UPDATE_EVENT_BREAKPOINTS";
-	exports.FETCH_EVENT_LISTENERS = "FETCH_EVENT_LISTENERS";
-
-	exports.TOGGLE_PRETTY_PRINT = "TOGGLE_PRETTY_PRINT";
-	exports.BLACKBOX = "BLACKBOX";
-
-	exports.ADD_BREAKPOINT = "ADD_BREAKPOINT";
-	exports.REMOVE_BREAKPOINT = "REMOVE_BREAKPOINT";
-	exports.ENABLE_BREAKPOINT = "ENABLE_BREAKPOINT";
-	exports.DISABLE_BREAKPOINT = "DISABLE_BREAKPOINT";
-	exports.SET_BREAKPOINT_CONDITION = "SET_BREAKPOINT_CONDITION";
-	exports.TOGGLE_BREAKPOINTS = "TOGGLE_BREAKPOINTS";
-
-	exports.ADD_SOURCE = "ADD_SOURCE";
-	exports.ADD_SOURCES = "ADD_SOURCES";
-	exports.LOAD_SOURCE_TEXT = "LOAD_SOURCE_TEXT";
-	exports.SELECT_SOURCE = "SELECT_SOURCE";
-	exports.SELECT_SOURCE_URL = "SELECT_SOURCE_URL";
-	exports.CLOSE_TAB = "CLOSE_TAB";
-	exports.CLOSE_TABS = "CLOSE_TABS";
-	exports.NAVIGATE = "NAVIGATE";
-	exports.RELOAD = "RELOAD";
-
-	exports.ADD_TABS = "ADD_TABS";
-	exports.SELECT_TAB = "SELECT_TAB";
-
-	exports.BREAK_ON_NEXT = "BREAK_ON_NEXT";
-	exports.RESUME = "RESUME";
-	exports.PAUSED = "PAUSED";
-	exports.PAUSE_ON_EXCEPTIONS = "PAUSE_ON_EXCEPTIONS";
-	exports.COMMAND = "COMMAND";
-	exports.SELECT_FRAME = "SELECT_FRAME";
-	exports.LOAD_OBJECT_PROPERTIES = "LOAD_OBJECT_PROPERTIES";
-	exports.ADD_EXPRESSION = "ADD_EXPRESSION";
-	exports.EVALUATE_EXPRESSION = "EVALUATE_EXPRESSION";
-	exports.UPDATE_EXPRESSION = "UPDATE_EXPRESSION";
-	exports.DELETE_EXPRESSION = "DELETE_EXPRESSION";
-
-	exports.RECORD_COVERAGE = "RECORD_COVERAGE";
-
-	exports.TOGGLE_PROJECT_SEARCH = "TOGGLE_PROJECT_SEARCH";
-	exports.TOGGLE_FILE_SEARCH = "TOGGLE_FILE_SEARCH";
-	exports.UPDATE_FILE_SEARCH_QUERY = "UPDATE_FILE_SEARCH_QUERY";
-	exports.TOGGLE_FILE_SEARCH_MODIFIER = "TOGGLE_FILE_SEARCH_MODIFIER";
-	exports.SHOW_SOURCE = "SHOW_SOURCE";
-	exports.TOGGLE_PANE = "TOGGLE_PANE";
+	exports.default = {
+	  UPDATE_EVENT_BREAKPOINTS: "UPDATE_EVENT_BREAKPOINTS",
+	  FETCH_EVENT_LISTENERS: "FETCH_EVENT_LISTENERS",
+
+	  TOGGLE_PRETTY_PRINT: "TOGGLE_PRETTY_PRINT",
+	  BLACKBOX: "BLACKBOX",
+
+	  ADD_BREAKPOINT: "ADD_BREAKPOINT",
+	  REMOVE_BREAKPOINT: "REMOVE_BREAKPOINT",
+	  ENABLE_BREAKPOINT: "ENABLE_BREAKPOINT",
+	  DISABLE_BREAKPOINT: "DISABLE_BREAKPOINT",
+	  SET_BREAKPOINT_CONDITION: "SET_BREAKPOINT_CONDITION",
+	  TOGGLE_BREAKPOINTS: "TOGGLE_BREAKPOINTS",
+
+	  ADD_SOURCE: "ADD_SOURCE",
+	  ADD_SOURCES: "ADD_SOURCES",
+	  LOAD_SOURCE_TEXT: "LOAD_SOURCE_TEXT",
+	  SELECT_SOURCE: "SELECT_SOURCE",
+	  SELECT_SOURCE_URL: "SELECT_SOURCE_URL",
+	  CLOSE_TAB: "CLOSE_TAB",
+	  CLOSE_TABS: "CLOSE_TABS",
+	  NAVIGATE: "NAVIGATE",
+	  RELOAD: "RELOAD",
+
+	  ADD_TABS: "ADD_TABS",
+	  SELECT_TAB: "SELECT_TAB",
+
+	  BREAK_ON_NEXT: "BREAK_ON_NEXT",
+	  RESUME: "RESUME",
+	  PAUSED: "PAUSED",
+	  PAUSE_ON_EXCEPTIONS: "PAUSE_ON_EXCEPTIONS",
+	  COMMAND: "COMMAND",
+	  SELECT_FRAME: "SELECT_FRAME",
+	  LOAD_OBJECT_PROPERTIES: "LOAD_OBJECT_PROPERTIES",
+	  ADD_EXPRESSION: "ADD_EXPRESSION",
+	  EVALUATE_EXPRESSION: "EVALUATE_EXPRESSION",
+	  UPDATE_EXPRESSION: "UPDATE_EXPRESSION",
+	  DELETE_EXPRESSION: "DELETE_EXPRESSION",
+
+	  RECORD_COVERAGE: "RECORD_COVERAGE",
+
+	  TOGGLE_PROJECT_SEARCH: "TOGGLE_PROJECT_SEARCH",
+	  TOGGLE_FILE_SEARCH: "TOGGLE_FILE_SEARCH",
+	  TOGGLE_SYMBOL_SEARCH: "TOGGLE_SYMBOL_SEARCH",
+	  SET_SYMBOL_SEARCH_TYPE: "SET_SYMBOL_SEARCH_TYPE",
+	  UPDATE_FILE_SEARCH_QUERY: "UPDATE_FILE_SEARCH_QUERY",
+	  TOGGLE_FILE_SEARCH_MODIFIER: "TOGGLE_FILE_SEARCH_MODIFIER",
+	  SHOW_SOURCE: "SHOW_SOURCE",
+	  TOGGLE_PANE: "TOGGLE_PANE"
+	};
 
 /***/ },
 /* 230 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	/**
@@ -13601,17 +13603,16 @@ return /******/ (function(modules) { // 
 /* 231 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	Object.defineProperty(exports, "__esModule", {
 	  value: true
 	});
-	exports.update = update;
 	exports.getEventListeners = getEventListeners;
 
 	var _constants = __webpack_require__(229);
 
 	var _constants2 = _interopRequireDefault(_constants);
 
 	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
@@ -13647,48 +13648,69 @@ return /******/ (function(modules) { // 
 
 	  return state;
 	}
 
 	function getEventListeners(state) {
 	  return state.eventListeners.listeners;
 	}
 
+	exports.default = update;
+
 /***/ },
 /* 232 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.getSelectedSource = exports.getSelectedLocation = exports.getSourcesForTabs = exports.getSourceTabs = exports.getSources = exports.State = undefined;
+	exports.getSource = getSource;
+	exports.getSourceByURL = getSourceByURL;
+	exports.getSourceText = getSourceText;
+	exports.getPendingSelectedLocation = getPendingSelectedLocation;
+	exports.getPrettySource = getPrettySource;
+	exports.getSourceInSources = getSourceInSources;
+
+	var _immutable = __webpack_require__(146);
+
+	var I = _interopRequireWildcard(_immutable);
+
+	var _reselect = __webpack_require__(992);
+
+	var _makeRecord = __webpack_require__(230);
+
+	var _makeRecord2 = _interopRequireDefault(_makeRecord);
+
+	var _source2 = __webpack_require__(233);
+
+	var _prefs = __webpack_require__(226);
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+	function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+	var State = exports.State = (0, _makeRecord2.default)({
+	  sources: I.Map(),
+	  selectedLocation: undefined,
+	  pendingSelectedLocation: _prefs.prefs.pendingSelectedLocation,
+	  sourcesText: I.Map(),
+	  tabs: I.List(restoreTabs())
+	});
 	/* This Source Code Form is subject to the terms of the Mozilla Public
 	 * License, v. 2.0. If a copy of the MPL was not distributed with this
 	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 	/**
 	 * Sources reducer
 	 * @module reducers/sources
 	 */
 
-	var I = __webpack_require__(146);
-	var makeRecord = __webpack_require__(230);
-
-	var _require = __webpack_require__(233),
-	    getPrettySourceURL = _require.getPrettySourceURL;
-
-	var _require2 = __webpack_require__(226),
-	    prefs = _require2.prefs;
-
-	var State = makeRecord({
-	  sources: I.Map(),
-	  selectedLocation: undefined,
-	  pendingSelectedLocation: prefs.pendingSelectedLocation,
-	  sourcesText: I.Map(),
-	  tabs: I.List(restoreTabs())
-	});
-
 	function update() {
 	  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State();
 	  var action = arguments[1];
 
 	  var availableTabs = null;
 	  var location = null;
 
 	  switch (action.type) {
@@ -13707,33 +13729,33 @@ return /******/ (function(modules) { // 
 	        return state;
 	      }
 
 	    case "SELECT_SOURCE":
 	      location = {
 	        line: action.line,
 	        url: action.source.url
 	      };
-	      prefs.pendingSelectedLocation = location;
+	      _prefs.prefs.pendingSelectedLocation = location;
 
 	      var sourceUrl = action.source.url || "";
 	      return state.set("selectedLocation", {
 	        sourceId: action.source.id,
 	        line: action.line
 	      }).set("pendingSelectedLocation", location).merge({
 	        tabs: updateTabList({ sources: state }, sourceUrl, action.tabIndex)
 	      });
 
 	    case "SELECT_SOURCE_URL":
 	      location = {
 	        url: action.url,
 	        line: action.line
 	      };
 
-	      prefs.pendingSelectedLocation = location;
+	      _prefs.prefs.pendingSelectedLocation = location;
 	      return state.set("pendingSelectedLocation", location);
 
 	    case "CLOSE_TAB":
 	      availableTabs = removeSourceFromTabList(state.tabs, action.url);
 
 	      return state.merge({ tabs: availableTabs }).set("selectedLocation", {
 	        sourceId: getNewSelectedSourceId(state, availableTabs)
 	      });
@@ -13755,17 +13777,17 @@ return /******/ (function(modules) { // 
 	      break;
 
 	    case "TOGGLE_PRETTY_PRINT":
 	      return _updateText(state, action);
 
 	    case "NAVIGATE":
 	      var source = getSelectedSource({ sources: state });
 	      var _url = source && source.get("url");
-	      prefs.pendingSelectedLocation = { url: _url };
+	      _prefs.prefs.pendingSelectedLocation = { url: _url };
 	      return State().set("pendingSelectedLocation", { url: _url });
 	  }
 
 	  return state;
 	}
 
 	// TODO: Action is coerced to `any` unfortunately because how we type
 	// asynchronous actions is wrong. The `value` may be null for the
@@ -13794,26 +13816,26 @@ return /******/ (function(modules) { // 
 	    text: sourceText.text,
 	    id: source.id,
 	    contentType: sourceText.contentType
 	  }));
 	}
 
 	function removeSourceFromTabList(tabs, url) {
 	  var newTabs = tabs.filter(tab => tab != url);
-	  prefs.tabs = newTabs;
+	  _prefs.prefs.tabs = newTabs;
 	  return newTabs;
 	}
 
 	function removeSourcesFromTabList(tabs, urls) {
 	  return urls.reduce((t, url) => removeSourceFromTabList(t, url), tabs);
 	}
 
 	function restoreTabs() {
-	  var prefsTabs = prefs.tabs || [];
+	  var prefsTabs = _prefs.prefs.tabs || [];
 	  if (Object.keys(prefsTabs).length == 0) {
 	    return;
 	  }
 
 	  return prefsTabs;
 	}
 
 	/**
@@ -13830,17 +13852,17 @@ return /******/ (function(modules) { // 
 	  if (includesUrl) {
 	    if (tabIndex != undefined) {
 	      tabs = tabs.delete(urlIndex).insert(tabIndex, url);
 	    }
 	  } else {
 	    tabs = tabs.insert(0, url);
 	  }
 
-	  prefs.tabs = tabs.toJS();
+	  _prefs.prefs.tabs = tabs.toJS();
 	  return tabs;
 	}
 
 	/**
 	 * Gets the next tab to select when a tab closes. Heuristics:
 	 * 1. if the selected tab is available, it remains selected
 	 * 2. if it is gone, the next available tab to the left should be active
 	 * 3. if the first tab is active and closed, select the second tab
@@ -13872,17 +13894,18 @@ return /******/ (function(modules) { // 
 
 	    return "";
 	  }
 
 	  var tabUrls = state.tabs.toJS();
 	  var leftNeighborIndex = Math.max(tabUrls.indexOf(selectedTabUrl) - 1, 0);
 	  var lastAvailbleTabIndex = availableTabs.size - 1;
 	  var newSelectedTabIndex = Math.min(leftNeighborIndex, lastAvailbleTabIndex);
-	  var tabSource = state.sources.find(source => source.get("url") === availableTabs.toJS()[newSelectedTabIndex]);
+	  var availableTab = availableTabs.toJS()[newSelectedTabIndex];
+	  var tabSource = getSourceByUrlInSources(state.sources, availableTab);
 
 	  if (tabSource) {
 	    return tabSource.get("id");
 	  }
 
 	  return "";
 	}
 
@@ -13892,106 +13915,103 @@ return /******/ (function(modules) { // 
 	// the state that we care about and still type it with Flow. The
 	// problem is that we want to re-export all selectors from a single
 	// module for the UI, and all of those selectors should take the
 	// top-level app state, so we'd have to "wrap" them to automatically
 	// pick off the piece of state we're interested in. It's impossible
 	// (right now) to type those wrapped functions.
 
 
+	var getSourcesState = state => state.sources;
+
 	function getSource(state, id) {
-	  return state.sources.sources.get(id);
+	  return getSourceInSources(getSources(state), id);
 	}
 
 	function getSourceByURL(state, url) {
-	  return state.sources.sources.find(source => source.get("url") == url);
-	}
-
-	function getSourceById(state, id) {
-	  return state.sources.sources.find(source => source.get("id") == id);
-	}
-
-	function getSources(state) {
-	  return state.sources.sources;
+	  return getSourceByUrlInSources(state.sources.sources, url);
 	}
 
 	function getSourceText(state, id) {
 	  if (id) {
 	    return state.sources.sourcesText.get(id);
 	  }
 	}
 
-	function getSourceTabs(state) {
-	  return state.sources.tabs.filter(tab => getSourceByURL(state, tab));
-	}
-
-	function getSelectedSource(state) {
-	  var selectedLocation = state.sources.selectedLocation;
-	  if (!selectedLocation) {
-	    return;
-	  }
-
-	  return state.sources.sources.find(source => source.get("id") == selectedLocation.sourceId);
-	}
-
-	function getSelectedLocation(state) {
-	  return state.sources.selectedLocation;
-	}
-
 	function getPendingSelectedLocation(state) {
 	  return state.sources.pendingSelectedLocation;
 	}
 
 	function getPrettySource(state, id) {
 	  var source = getSource(state, id);
 	  if (!source) {
 	    return;
 	  }
 
-	  return getSourceByURL(state, getPrettySourceURL(source.get("url")));
-	}
-
-	module.exports = {
-	  State,
-	  update,
-	  getSource,
-	  getSourceByURL,
-	  getSourceById,
-	  getSources,
-	  getSourceText,
-	  getSourceTabs,
-	  getSelectedSource,
-	  getSelectedLocation,
-	  getPendingSelectedLocation,
-	  getPrettySource
-	};
+	  return getSourceByURL(state, (0, _source2.getPrettySourceURL)(source.get("url")));
+	}
+
+	function getSourceByUrlInSources(sources, url) {
+	  return sources.find(source => source.get("url") === url);
+	}
+
+	function getSourceInSources(sources, id) {
+	  return sources.get(id);
+	}
+
+	var getSources = exports.getSources = (0, _reselect.createSelector)(getSourcesState, sources => sources.sources);
+
+	var getTabs = (0, _reselect.createSelector)(getSourcesState, sources => sources.tabs);
+
+	var getSourceTabs = exports.getSourceTabs = (0, _reselect.createSelector)(getTabs, getSources, (tabs, sources) => tabs.filter(tab => getSourceByUrlInSources(sources, tab)));
+
+	var getSourcesForTabs = exports.getSourcesForTabs = (0, _reselect.createSelector)(getSourceTabs, getSources, (tabs, sources) => {
+	  return tabs.map(tab => getSourceByUrlInSources(sources, tab)).filter(source => source);
+	});
+
+	var getSelectedLocation = exports.getSelectedLocation = (0, _reselect.createSelector)(getSourcesState, sources => sources.selectedLocation);
+
+	var getSelectedSource = exports.getSelectedSource = (0, _reselect.createSelector)(getSelectedLocation, getSources, (selectedLocation, sources) => {
+	  if (!selectedLocation) {
+	    return;
+	  }
+
+	  return sources.find(source => source.get("id") == selectedLocation.sourceId);
+	});
+
+	exports.default = update;
 
 /***/ },
 /* 233 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
-	/**
-	 * Utils for working with Source URLs
-	 * @module utils/source
-	 */
-
-	var _require = __webpack_require__(234),
-	    endTruncateStr = _require.endTruncateStr;
-
-	var _require2 = __webpack_require__(235),
-	    basename = _require2.basename;
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.getMode = exports.getFilenameFromURL = exports.getFilename = exports.getRawSourceURL = exports.getPrettySourceURL = exports.isPretty = exports.isJavaScript = undefined;
+
+	var _utils = __webpack_require__(234);
+
+	var _path = __webpack_require__(235);
 
 	/**
 	 * Trims the query part or reference identifier of a url string, if necessary.
 	 *
 	 * @memberof utils/source
 	 * @static
 	 */
+
+
+	/**
+	 * Utils for working with Source URLs
+	 * @module utils/source
+	 */
+
 	function trimUrlQuery(url) {
 	  var length = url.length;
 	  var q1 = url.indexOf("?");
 	  var q2 = url.indexOf("&");
 	  var q3 = url.indexOf("#");
 	  var q = Math.min(q1 != -1 ? q1 : length, q2 != -1 ? q2 : length, q3 != -1 ? q3 : length);
 
 	  return url.slice(0, q);
@@ -14021,31 +14041,34 @@ return /******/ (function(modules) { // 
 	  return source.url ? /formatted$/.test(source.url) : false;
 	}
 
 	/**
 	 * @memberof utils/source
 	 * @static
 	 */
 	function getPrettySourceURL(url) {
+	  if (!url) {
+	    url = "";
+	  }
 	  return `${url}:formatted`;
 	}
 
 	/**
 	 * @memberof utils/source
 	 * @static
 	 */
 	function getRawSourceURL(url) {
 	  return url.replace(/:formatted$/, "");
 	}
 
 	function getFilenameFromURL(url) {
 	  url = getRawSourceURL(url || "");
-	  var name = basename(url) || "(index)";
-	  return endTruncateStr(name, 50);
+	  var name = (0, _path.basename)(url) || "(index)";
+	  return (0, _utils.endTruncateStr)(name, 50);
 	}
 
 	/**
 	 * Show a source url's filename.
 	 * If the source does not have a url, use the source id.
 	 *
 	 * @memberof utils/source
 	 * @static
@@ -14108,39 +14131,33 @@ return /******/ (function(modules) { // 
 	  // character is `<` regardless of extension.
 	  if (text.match(/^\s*</)) {
 	    return { name: "htmlmixed" };
 	  }
 
 	  return { name: "text" };
 	}
 
-	module.exports = {
-	  isJavaScript,
-	  isPretty,
-	  getPrettySourceURL,
-	  getRawSourceURL,
-	  getFilename,
-	  getFilenameFromURL,
-	  getMode
-	};
+	exports.isJavaScript = isJavaScript;
+	exports.isPretty = isPretty;
+	exports.getPrettySourceURL = getPrettySourceURL;
+	exports.getRawSourceURL = getRawSourceURL;
+	exports.getFilename = getFilename;
+	exports.getFilenameFromURL = getFilenameFromURL;
+	exports.getMode = getMode;
 
 /***/ },
 /* 234 */
-/***/ function(module, exports, __webpack_require__) {
-
-	"use strict";
-
-	var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-
-	var _zip = __webpack_require__(704);
-
-	var _zip2 = _interopRequireDefault(_zip);
-
-	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/***/ function(module, exports) {
+
+	"use strict";
+
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
 
 	function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
 	/**
 	 * Utils for utils, by utils
 	 * @module utils/utils
 	 */
 
@@ -14213,37 +14230,22 @@ return /******/ (function(modules) { // 
 	    }
 	  };
 	}
 
 	function waitForMs(ms) {
 	  return new Promise(resolve => setTimeout(resolve, ms));
 	}
 
-	function filterDuplicates(list, predicate) {
-	  var lastItem = list[list.length - 1];
-	  var pairs = (0, _zip2.default)(list.slice(1), list.slice(0, -1));
-	  return pairs.filter(predicate).map((_ref) => {
-	    var _ref2 = _slicedToArray(_ref, 2),
-	        prev = _ref2[0],
-	        item = _ref2[1];
-
-	    return item;
-	  }).concat(lastItem);
-	}
-
-	module.exports = {
-	  handleError,
-	  promisify,
-	  endTruncateStr,
-	  updateObj,
-	  throttle,
-	  waitForMs,
-	  filterDuplicates
-	};
+	exports.handleError = handleError;
+	exports.promisify = promisify;
+	exports.endTruncateStr = endTruncateStr;
+	exports.updateObj = updateObj;
+	exports.throttle = throttle;
+	exports.waitForMs = waitForMs;
 
 /***/ },
 /* 235 */
 /***/ function(module, exports) {
 
 	"use strict";
 
 	function basename(path) {
@@ -14276,44 +14278,66 @@ return /******/ (function(modules) { // 
 	};
 
 /***/ },
 /* 236 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.State = undefined;
+	exports.makeLocationId = makeLocationId;
+	exports.getBreakpoint = getBreakpoint;
+	exports.getBreakpoints = getBreakpoints;
+	exports.getBreakpointsForSource = getBreakpointsForSource;
+	exports.getBreakpointsDisabled = getBreakpointsDisabled;
+	exports.getBreakpointsLoading = getBreakpointsLoading;
+	exports.getPendingBreakpoints = getPendingBreakpoints;
+
+	var _fromJS = __webpack_require__(237);
+
+	var _fromJS2 = _interopRequireDefault(_fromJS);
+
+	var _utils = __webpack_require__(234);
+
+	var _immutable = __webpack_require__(146);
+
+	var I = _interopRequireWildcard(_immutable);
+
+	var _makeRecord = __webpack_require__(230);
+
+	var _makeRecord2 = _interopRequireDefault(_makeRecord);
+
+	var _prefs = __webpack_require__(226);
+
+	function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+	var State = exports.State = (0, _makeRecord2.default)({
+	  breakpoints: I.Map(),
+	  pendingBreakpoints: restorePendingBreakpoints(),
+	  breakpointsDisabled: false
+	});
+
+	// Return the first argument that is a string, or null if nothing is a
+	// string.
+
 	/* This Source Code Form is subject to the terms of the Mozilla Public
 	 * License, v. 2.0. If a copy of the MPL was not distributed with this
 	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 	/**
 	 * Breakpoints reducer
 	 * @module reducers/breakpoints
 	 */
 
-	var fromJS = __webpack_require__(237);
-
-	var _require = __webpack_require__(234),
-	    updateObj = _require.updateObj;
-
-	var I = __webpack_require__(146);
-	var makeRecord = __webpack_require__(230);
-
-	var _require2 = __webpack_require__(226),
-	    prefs = _require2.prefs;
-
-	var State = makeRecord({
-	  breakpoints: I.Map(),
-	  pendingBreakpoints: restorePendingBreakpoints(),
-	  breakpointsDisabled: false
-	});
-
-	// Return the first argument that is a string, or null if nothing is a
-	// string.
 	function firstString() {
 	  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
 	    args[_key] = arguments[_key];
 	  }
 
 	  for (var arg of args) {
 	    if (typeof arg === "string") {
 	      return arg;
@@ -14322,17 +14346,22 @@ return /******/ (function(modules) { // 
 	  return null;
 	}
 
 	function locationMoved(location, newLocation) {
 	  return location.line !== newLocation.line || location.column != null && location.column !== newLocation.column;
 	}
 
 	function makeLocationId(location) {
-	  return `${location.sourceId}:${location.line}`;
+	  var sourceId = location.sourceId,
+	      line = location.line,
+	      column = location.column;
+
+	  column = column || "";
+	  return `${sourceId}:${line}:${column}`;
 	}
 
 	function allBreakpointsDisabled(state) {
 	  return state.breakpoints.every(x => x.disabled);
 	}
 
 	function update() {
 	  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State();
@@ -14364,23 +14393,23 @@ return /******/ (function(modules) { // 
 	      }
 
 	    case "SET_BREAKPOINT_CONDITION":
 	      {
 	        var id = makeLocationId(action.breakpoint.location);
 
 	        if (action.status === "start") {
 	          var bp = state.breakpoints.get(id);
-	          return state.setIn(["breakpoints", id], updateObj(bp, {
+	          return state.setIn(["breakpoints", id], (0, _utils.updateObj)(bp, {
 	            loading: true,
 	            condition: action.condition
 	          }));
 	        } else if (action.status === "done") {
 	          var _bp = state.breakpoints.get(id);
-	          return state.setIn(["breakpoints", id], updateObj(_bp, {
+	          return state.setIn(["breakpoints", id], (0, _utils.updateObj)(_bp, {
 	            id: action.value.id,
 	            loading: false
 	          }));
 	        } else if (action.status === "error") {
 	          return state.deleteIn(["breakpoints", id]);
 	        }
 
 	        break;
@@ -14391,17 +14420,17 @@ return /******/ (function(modules) { // 
 	}
 
 	function addBreakpoint(state, action) {
 	  var id = makeLocationId(action.breakpoint.location);
 
 	  if (action.status === "start") {
 	    var bp = state.breakpoints.get(id) || action.breakpoint;
 
-	    return state.setIn(["breakpoints", id], updateObj(bp, {
+	    return state.setIn(["breakpoints", id], (0, _utils.updateObj)(bp, {
 	      disabled: false,
 	      loading: true,
 	      // We want to do an OR here, but we can't because we need
 	      // empty strings to be truthy, i.e. an empty string is a valid
 	      // condition.
 	      condition: firstString(action.condition, bp.condition)
 	    })).set("breakpointsDisabled", false);
 	  }
@@ -14415,25 +14444,25 @@ return /******/ (function(modules) { // 
 	    var actualLocation = action.value.actualLocation;
 
 	    // If the breakpoint moved, update the map
 
 	    if (locationMoved(location, actualLocation)) {
 	      state = state.deleteIn(["breakpoints", id]);
 
 	      var movedId = makeLocationId(actualLocation);
-	      var currentBp = state.breakpoints.get(movedId) || fromJS(action.breakpoint);
-	      var newBp = updateObj(currentBp, { location: actualLocation });
+	      var currentBp = state.breakpoints.get(movedId) || (0, _fromJS2.default)(action.breakpoint);
+	      var newBp = (0, _utils.updateObj)(currentBp, { location: actualLocation });
 	      state = state.setIn(["breakpoints", movedId], newBp);
 	      location = actualLocation;
 	    }
 
 	    var locationId = makeLocationId(location);
 	    var _bp2 = state.breakpoints.get(locationId);
-	    return state.setIn(["breakpoints", locationId], updateObj(_bp2, {
+	    return state.setIn(["breakpoints", locationId], (0, _utils.updateObj)(_bp2, {
 	      id: breakpointId,
 	      disabled: false,
 	      loading: false,
 	      text: text
 	    }));
 	  }
 
 	  if (action.status === "error") {
@@ -14443,17 +14472,17 @@ return /******/ (function(modules) { // 
 	}
 
 	function removeBreakpoint(state, action) {
 	  if (action.status === "done") {
 	    var id = makeLocationId(action.breakpoint.location);
 
 	    if (action.disabled) {
 	      var bp = state.breakpoints.get(id);
-	      var _updatedState = state.setIn(["breakpoints", id], updateObj(bp, {
+	      var _updatedState = state.setIn(["breakpoints", id], (0, _utils.updateObj)(bp, {
 	        loading: false,
 	        disabled: true
 	      }));
 
 	      return _updatedState.set("breakpointsDisabled", allBreakpointsDisabled(_updatedState));
 	    }
 
 	    var updatedState = state.deleteIn(["breakpoints", id]);
@@ -14463,34 +14492,35 @@ return /******/ (function(modules) { // 
 
 	  return state;
 	}
 
 	function makePendingBreakpoint(bp) {
 	  var _bp$location = bp.location,
 	      sourceUrl = _bp$location.sourceUrl,
 	      line = _bp$location.line,
+	      column = _bp$location.column,
 	      condition = bp.condition,
 	      disabled = bp.disabled;
 
 
-	  var location = { sourceUrl, line };
+	  var location = { sourceUrl, line, column };
 	  return { condition, disabled, location };
 	}
 
 	function filterByNotLoading(bp) {
 	  return !bp.loading;
 	}
 
 	function setPendingBreakpoints(state) {
-	  prefs.pendingBreakpoints = Object.values(state.get("breakpoints").toJS()).filter(filterByNotLoading).map(makePendingBreakpoint);
+	  _prefs.prefs.pendingBreakpoints = Object.values(state.get("breakpoints").toJS()).filter(filterByNotLoading).map(makePendingBreakpoint);
 	}
 
 	function restorePendingBreakpoints() {
-	  return prefs.pendingBreakpoints;
+	  return _prefs.prefs.pendingBreakpoints;
 	}
 
 	// Selectors
 
 	function getBreakpoint(state, location) {
 	  return state.breakpoints.breakpoints.get(makeLocationId(location));
 	}
 
@@ -14514,27 +14544,17 @@ return /******/ (function(modules) { // 
 
 	  return breakpoints.size > 0 && isLoading;
 	}
 
 	function getPendingBreakpoints(state) {
 	  return state.breakpoints.pendingBreakpoints;
 	}
 
-	module.exports = {
-	  State,
-	  update,
-	  makeLocationId,
-	  getBreakpoint,
-	  getBreakpoints,
-	  getBreakpointsForSource,
-	  getBreakpointsDisabled,
-	  getBreakpointsLoading,
-	  getPendingBreakpoints
-	};
+	exports.default = update;
 
 /***/ },
 /* 237 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	/**
@@ -14617,135 +14637,170 @@ return /******/ (function(modules) { // 
 	module.exports = fromJS;
 
 /***/ },
 /* 238 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
-	function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-
-	/* This Source Code Form is subject to the terms of the Mozilla Public
-	 * License, v. 2.0. If a copy of the MPL was not distributed with this
-	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-	var constants = __webpack_require__(229);
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+
+	var _constants = __webpack_require__(229);
+
+	var _constants2 = _interopRequireDefault(_constants);
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+	function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /* This Source Code Form is subject to the terms of the Mozilla Public
+	                                                                                                                                                                                                     * License, v. 2.0. If a copy of the MPL was not distributed with this
+	                                                                                                                                                                                                     * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
 	var initialState = [];
 
 	function update() {
 	  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
 	  var action = arguments[1];
 	  var seqId = action.seqId;
 
 
-	  if (action.type === constants.NAVIGATE) {
+	  if (action.type === _constants2.default.NAVIGATE) {
 	    return initialState;
 	  } else if (seqId) {
 	    var newState = void 0;
 	    if (action.status === "start") {
 	      newState = [].concat(_toConsumableArray(state), [seqId]);
 	    } else if (action.status === "error" || action.status === "done") {
 	      newState = state.filter(id => id !== seqId);
 	    }
 
 	    return newState;
 	  }
 
 	  return state;
 	}
 
-	module.exports = update;
+	exports.default = update;
 
 /***/ },
 /* 239 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.getSelectedFrame = exports.getLoadedObjects = exports.getPause = exports.State = undefined;
+	exports.getLoadedObject = getLoadedObject;
+	exports.getObjectProperties = getObjectProperties;
+	exports.getIsWaitingOnBreak = getIsWaitingOnBreak;
+	exports.getShouldPauseOnExceptions = getShouldPauseOnExceptions;
+	exports.getShouldIgnoreCaughtExceptions = getShouldIgnoreCaughtExceptions;
+	exports.getFrames = getFrames;
+	exports.getDebuggeeUrl = getDebuggeeUrl;
+	exports.getChromeScopes = getChromeScopes;
+
+	var _reselect = __webpack_require__(992);
+
+	var _fromJS = __webpack_require__(237);
+
+	var _fromJS2 = _interopRequireDefault(_fromJS);
+
+	var _makeRecord = __webpack_require__(230);
+
+	var _makeRecord2 = _interopRequireDefault(_makeRecord);
+
+	var _prefs = __webpack_require__(226);
+
+	var _immutable = __webpack_require__(146);
+
+	var I = _interopRequireWildcard(_immutable);
+
+	var _constants = __webpack_require__(229);
+
+	var _constants2 = _interopRequireDefault(_constants);
+
+	function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
 	/* This Source Code Form is subject to the terms of the Mozilla Public
 	 * License, v. 2.0. If a copy of the MPL was not distributed with this
 	 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-	var constants = __webpack_require__(229);
-	var fromJS = __webpack_require__(237);
-	var makeRecord = __webpack_require__(230);
-
-	var _require = __webpack_require__(226),
-	    prefs = _require.prefs;
-
-	var I = __webpack_require__(146);
-
-	var State = makeRecord({
+	var State = exports.State = (0, _makeRecord2.default)({
 	  pause: undefined,
 	  isWaitingOnBreak: false,
 	  frames: undefined,
 	  selectedFrameId: undefined,
 	  loadedObjects: I.Map(),
-	  shouldPauseOnExceptions: prefs.pauseOnExceptions,
-	  shouldIgnoreCaughtExceptions: prefs.ignoreCaughtExceptions,
+	  shouldPauseOnExceptions: _prefs.prefs.pauseOnExceptions,
+	  shouldIgnoreCaughtExceptions: _prefs.prefs.ignoreCaughtExceptions,
 	  debuggeeUrl: ""
 	});
 
 	function update() {
 	  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State();
 	  var action = arguments[1];
 
 	  switch (action.type) {
-	    case constants.PAUSED:
+	    case _constants2.default.PAUSED:
 	      {
 	        var _selectedFrameId = action.selectedFrameId,
 	            _frames = action.frames,
 	            _loadedObjects = action.loadedObjects,
 	            pauseInfo = action.pauseInfo;
 
 	        pauseInfo.isInterrupted = pauseInfo.why.type === "interrupted";
 
 	        // turn this into an object keyed by object id
 	        var objectMap = {};
 	        _loadedObjects.forEach(obj => {
 	          objectMap[obj.value.objectId] = obj;
 	        });
 
 	        return state.merge({
 	          isWaitingOnBreak: false,
-	          pause: fromJS(pauseInfo),
+	          pause: (0, _fromJS2.default)(pauseInfo),
 	          selectedFrameId: _selectedFrameId,
 	          frames: _frames,
 	          loadedObjects: objectMap
 	        });
 	      }
 
-	    case constants.RESUME:
+	    case _constants2.default.RESUME:
 	      return state.merge({
 	        pause: null,
 	        frames: null,
 	        selectedFrameId: null,
 	        loadedObjects: {}
 	      });
 
-	    case constants.TOGGLE_PRETTY_PRINT:
+	    case _constants2.default.TOGGLE_PRETTY_PRINT:
 	      if (action.status == "done") {
 	        var _frames2 = action.value.frames;
 	        var _pause = state.get("pause");
 	        if (_pause) {
-	          _pause = _pause.set("frame", fromJS(_frames2[0]));
+	          _pause = _pause.set("frame", (0, _fromJS2.default)(_frames2[0]));
 	        }
 
 	        return state.merge({ pause: _pause, frames: _frames2 });
 	      }
 
 	      break;
-	    case constants.BREAK_ON_NEXT:
+	    case _constants2.default.BREAK_ON_NEXT:
 	      return state.set("isWaitingOnBreak", true);
 
-	    case constants.SELECT_FRAME:
+	    case _constants2.default.SELECT_FRAME:
 	      return state.set("selectedFrameId", action.frame.id);
 
-	    case constants.LOAD_OBJECT_PROPERTIES:
+	    case _constants2.default.LOAD_OBJECT_PROPERTIES:
 	      if (action.status === "start") {
 	        return state.setIn(["loadedObjects", action.objectId], {});
 	      }
 
 	      if (action.status === "done") {
 	        if (!action.value) {
 	          return state;
 	        }
@@ -14757,26 +14812,26 @@ return /******/ (function(modules) { // 
 	        return state.setIn(["loadedObjects", action.objectId], {
 	          ownProperties,
 	          prototype,
 	          ownSymbols
 	        });
 	      }
 	      break;
 
-	    case constants.NAVIGATE:
+	    case _constants2.default.NAVIGATE:
 	      return State().set("debuggeeUrl", action.url);
 
-	    case constants.PAUSE_ON_EXCEPTIONS:
+	    case _constants2.default.PAUSE_ON_EXCEPTIONS:
 	      var _shouldPauseOnExceptions = action.shouldPauseOnExceptions,
 	          _shouldIgnoreCaughtExceptions = action.shouldIgnoreCaughtExceptions;
 
 
-	      prefs.pauseOnExceptions = _shouldPauseOnExceptions;
-	      prefs.ignoreCaughtExceptions = _shouldIgnoreCaughtExceptions;
+	      _prefs.prefs.pauseOnExceptions = _shouldPauseOnExceptions;
+	      _prefs.prefs.ignoreCaughtExceptions = _shouldIgnoreCaughtExceptions;
 
 	      return state.merge({
 	        shouldPauseOnExceptions: _shouldPauseOnExceptions,
 	        shouldIgnoreCaughtExceptions: _shouldIgnoreCaughtExceptions
 	      });
 	  }
 
 	  return state;
@@ -14788,23 +14843,21 @@ return /******/ (function(modules) { // 
 	// the state that we care about and still type it with Flow. The
 	// problem is that we want to re-export all selectors from a single
 	// module for the UI, and all of those selectors should take the
 	// top-level app state, so we'd have to "wrap" them to automatically
 	// pick off the piece of state we're interested in. It's impossible
 	// (right now) to type those wrapped functions.
 
 
-	function getPause(state) {
-	  return state.pause.get("pause");
-	}
-
-	function getLoadedObjects(state) {
-	  return state.pause.get("loadedObjects");
-	}
+	var getPauseState = state => state.pause;
+
+	var getPause = exports.getPause = (0, _reselect.createSelector)(getPauseState, pauseWrapper => pauseWrapper.get("pause"));
+
+	var getLoadedObjects = exports.getLoadedObjects = (0, _reselect.createSelector)(getPauseState, pauseWrapper => pauseWrapper.get("loadedObjects"));
 
 	function getLoadedObject(state, objectId) {
 	  return getLoadedObjects(state).get(objectId);
 	}
 
 	function getObjectProperties(state, parentId) {
 	  return getLoadedObjects(state).filter(obj => obj.get("parentId") == parentId);
 	}
@@ -14820,121 +14873,135 @@ return /******/ (function(modules) { // 
 	function getShouldIgnoreCaughtExceptions(state) {
 	  return state.pause.get("shouldIgnoreCaughtExceptions");
 	}
 
 	function getFrames(state) {
 	  return state.pause.get("frames");
 	}
 
-	function getSelectedFrame(state) {
-	  var selectedFrameId = state.pause.get("selectedFrameId");
-	  var frames = state.pause.get("frames");
+	var getSelectedFrameId = (0, _reselect.createSelector)(getPauseState, pauseWrapper => pauseWrapper.get("selectedFrameId"));
+
+	var getSelectedFrame = exports.getSelectedFrame = (0, _reselect.createSelector)(getSelectedFrameId, getFrames, (selectedFrameId, frames) => {
 	  if (!frames) {
 	    return null;
 	  }
 
 	  return frames.find(frame => frame.get("id") == selectedFrameId).toJS();
-	}
+	});
 
 	function getDebuggeeUrl(state) {
 	  return state.pause.get("debuggeeUrl");
 	}
 
 	// NOTE: currently only used for chrome
 	function getChromeScopes(state) {
 	  var frame = getSelectedFrame(state);
 	  return frame ? frame.scopeChain : undefined;
 	}
 
-	module.exports = {
-	  State,
-	  update,
-	  getPause,
-	  getChromeScopes,
-	  getLoadedObjects,
-	  getLoadedObject,
-	  getObjectProperties,
-	  getIsWaitingOnBreak,
-	  getShouldPauseOnExceptions,
-	  getShouldIgnoreCaughtExceptions,
-	  getFrames,
-	  getSelectedFrame,
-	  getDebuggeeUrl
-	};
+	exports.default = update;
 
 /***/ },
 /* 240 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
-	/**
-	 * UI reducer
-	 * @module reducers/ui
-	 */
-
-	var constants = __webpack_require__(229);
-	var makeRecord = __webpack_require__(230);
-
-	var _require = __webpack_require__(226),
-	    prefs = _require.prefs;
-
-	var State = makeRecord({
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.getSymbolSearchState = exports.getFileSearchState = exports.getProjectSearchState = exports.State = undefined;
+	exports.getFileSearchQueryState = getFileSearchQueryState;
+	exports.getFileSearchModifierState = getFileSearchModifierState;
+	exports.getSymbolSearchType = getSymbolSearchType;
+	exports.getShownSource = getShownSource;
+	exports.getPaneCollapse = getPaneCollapse;
+
+	var _makeRecord = __webpack_require__(230);
+
+	var _makeRecord2 = _interopRequireDefault(_makeRecord);
+
+	var _prefs = __webpack_require__(226);
+
+	var _constants = __webpack_require__(229);
+
+	var _constants2 = _interopRequireDefault(_constants);
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+	var State = exports.State = (0, _makeRecord2.default)({
 	  fileSearchOn: false,
 	  fileSearchQuery: "",
-	  fileSearchModifiers: makeRecord({
+	  fileSearchModifiers: (0, _makeRecord2.default)({
 	    caseSensitive: true,
 	    wholeWord: false,
 	    regexMatch: false
 	  })(),
 	  projectSearchOn: false,
+	  symbolSearchOn: false,
+	  symbolSearchType: "functions",
 	  shownSource: "",
-	  startPanelCollapsed: prefs.startPanelCollapsed,
-	  endPanelCollapsed: prefs.endPanelCollapsed
-	});
+	  startPanelCollapsed: _prefs.prefs.startPanelCollapsed,
+	  endPanelCollapsed: _prefs.prefs.endPanelCollapsed
+	});
+
+	/**
+	 * UI reducer
+	 * @module reducers/ui
+	 */
 
 	function update() {
 	  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State();
 	  var action = arguments[1];
 
 	  switch (action.type) {
-	    case constants.TOGGLE_PROJECT_SEARCH:
+	    case _constants2.default.TOGGLE_PROJECT_SEARCH:
 	      {
 	        return state.set("projectSearchOn", action.value);
 	      }
 
-	    case constants.TOGGLE_FILE_SEARCH:
+	    case _constants2.default.TOGGLE_FILE_SEARCH:
 	      {
 	        return state.set("fileSearchOn", action.value);
 	      }
 
-	    case constants.UPDATE_FILE_SEARCH_QUERY:
+	    case _constants2.default.TOGGLE_SYMBOL_SEARCH:
+	      {
+	        return state.set("symbolSearchOn", action.value);
+	      }
+
+	    case _constants2.default.UPDATE_FILE_SEARCH_QUERY:
 	      {
 	        return state.set("fileSearchQuery", action.query);
 	      }
 
-	    case constants.TOGGLE_FILE_SEARCH_MODIFIER:
+	    case _constants2.default.TOGGLE_FILE_SEARCH_MODIFIER:
 	      {
 	        return state.setIn(["fileSearchModifiers", action.modifier], !state.getIn(["fileSearchModifiers", action.modifier]));
 	      }
 
-	    case constants.SHOW_SOURCE:
+	    case _constants2.default.SET_SYMBOL_SEARCH_TYPE:
+	      {
+	        return state.set("symbolSearchType", action.symbolType);
+	      }
+
+	    case _constants2.default.SHOW_SOURCE:
 	      {
 	        return state.set("shownSource", action.sourceUrl);
 	      }
 
-	    case constants.TOGGLE_PANE:
+	    case _constants2.default.TOGGLE_PANE:
 	      {
 	        if (action.position == "start") {
-	          prefs.startPanelCollapsed = action.paneCollapsed;
+	          _prefs.prefs.startPanelCollapsed = action.paneCollapsed;
 	          return state.set("startPanelCollapsed", action.paneCollapsed);
 	        }
 
-	        prefs.endPanelCollapsed = action.paneCollapsed;
+	        _prefs.prefs.endPanelCollapsed = action.paneCollapsed;
 	        return state.set("endPanelCollapsed", action.paneCollapsed);
 	      }
 
 	    default:
 	      {
 	        return state;
 	      }
 	  }
@@ -14950,97 +15017,108 @@ return /******/ (function(modules) { // 
 	function getFileSearchQueryState(state) {
 	  return state.ui.get("fileSearchQuery");
 	}
 
 	function getFileSearchModifierState(state) {
 	  return state.ui.get("fileSearchModifiers");
 	}
 
-	var getProjectSearchState = getSearchState.bind(null, "projectSearchOn");
-	var getFileSearchState = getSearchState.bind(null, "fileSearchOn");
+	function getSymbolSearchType(state) {
+	  return state.ui.get("symbolSearchType");
+	}
+
+	var getProjectSearchState = exports.getProjectSearchState = getSearchState.bind(null, "projectSearchOn");
+	var getFileSearchState = exports.getFileSearchState = getSearchState.bind(null, "fileSearchOn");
+	var getSymbolSearchState = exports.getSymbolSearchState = getSearchState.bind(null, "symbolSearchOn");
 
 	function getShownSource(state) {
 	  return state.ui.get("shownSource");
 	}
 
 	function getPaneCollapse(state, position) {
 	  if (position == "start") {
 	    return state.ui.get("startPanelCollapsed");
 	  }
 
 	  return state.ui.get("endPanelCollapsed");
 	}
 
-	module.exports = {
-	  State,
-	  update,
-	  getProjectSearchState,
-	  getFileSearchState,
-	  getFileSearchQueryState,
-	  getFileSearchModifierState,
-	  getShownSource,
-	  getPaneCollapse
-	};
+	exports.default = update;
 
 /***/ },
 /* 241 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.State = undefined;
+	exports.getHitCountForSource = getHitCountForSource;
+	exports.getCoverageEnabled = getCoverageEnabled;
+
+	var _makeRecord = __webpack_require__(230);
+
+	var _makeRecord2 = _interopRequireDefault(_makeRecord);
+
+	var _immutable = __webpack_require__(146);
+
+	var I = _interopRequireWildcard(_immutable);
+
+	var _fromJS = __webpack_require__(237);
+
+	var _fromJS2 = _interopRequireDefault(_fromJS);
+
+	var _constants = __webpack_require__(229);
+
+	var _constants2 = _interopRequireDefault(_constants);
+
+	function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
 	/**
 	 * Code Coverage reducer
 	 * @module reducers/coverage
 	 */
 
-	var constants = __webpack_require__(229);
-	var makeRecord = __webpack_require__(230);
-	var I = __webpack_require__(146);
-	var fromJS = __webpack_require__(237);
-
-	var State = makeRecord({
+	var State = exports.State = (0, _makeRecord2.default)({
 	  coverageOn: false,
 	  hitCount: I.Map()
 	});
 
 	function update() {
 	  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State();
 	  var action = arguments[1];
 
 	  switch (action.type) {
-	    case constants.RECORD_COVERAGE:
-	      return state.mergeIn(["hitCount"], fromJS(action.value.coverage)).setIn(["coverageOn"], true);
+	    case _constants2.default.RECORD_COVERAGE:
+	      return state.mergeIn(["hitCount"], (0, _fromJS2.default)(action.value.coverage)).setIn(["coverageOn"], true);
 
 	    default:
 	      {
 	        return state;
 	      }
 	  }
 	}
 
 	// NOTE: we'd like to have the app state fully typed
 	// https://github.com/devtools-html/debugger.html/blob/master/src/reducers/sources.js#L179-L185
-
-
 	function getHitCountForSource(state, sourceId) {
 	  var hitCount = state.coverage.get("hitCount");
 	  return hitCount.get(sourceId);
 	}
 
 	function getCoverageEnabled(state) {
 	  return state.coverage.get("coverageOn");
 	}
 
-	module.exports = {
-	  State,
-	  update,
-	  getHitCountForSource,
-	  getCoverageEnabled
-	};
+	exports.default = update;
 
 /***/ },
 /* 242 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
 	var expressions = __webpack_require__(228);
@@ -15053,20 +15131,21 @@ return /******/ (function(modules) { // 
 
 	/**
 	 * @param object - location
 	 */
 
 	module.exports = {
 	  getSource: sources.getSource,
 	  getSourceByURL: sources.getSourceByURL,
-	  getSourceById: sources.getSourceById,
+	  getSourceInSources: sources.getSourceInSources,
 	  getSources: sources.getSources,
 	  getSourceText: sources.getSourceText,
 	  getSourceTabs: sources.getSourceTabs,
+	  getSourcesForTabs: sources.getSourcesForTabs,
 	  getSelectedSource: sources.getSelectedSource,
 	  getSelectedLocation: sources.getSelectedLocation,
 	  getPendingSelectedLocation: sources.getPendingSelectedLocation,
 	  getPrettySource: sources.getPrettySource,
 
 	  getBreakpoint: breakpoints.getBreakpoint,
 	  getBreakpoints: breakpoints.getBreakpoints,
 	  getPendingBreakpoints: breakpoints.getPendingBreakpoints,
@@ -15090,16 +15169,18 @@ return /******/ (function(modules) { // 
 	  getCoverageEnabled: coverage.getCoverageEnabled,
 
 	  getEventListeners: eventListeners.getEventListeners,
 
 	  getProjectSearchState: ui.getProjectSearchState,
 	  getFileSearchState: ui.getFileSearchState,
 	  getFileSearchQueryState: ui.getFileSearchQueryState,
 	  getFileSearchModifierState: ui.getFileSearchModifierState,
+	  getSymbolSearchState: ui.getSymbolSearchState,
+	  getSymbolSearchType: ui.getSymbolSearchType,
 	  getShownSource: ui.getShownSource,
 	  getPaneCollapse: ui.getPaneCollapse,
 
 	  getExpressions: expressions.getExpressions,
 	  getVisibleExpressions: expressions.getVisibleExpressions,
 	  getExpression: expressions.getExpression
 	};
 
@@ -15130,29 +15211,63 @@ return /******/ (function(modules) { // 
 	__webpack_require__(323);
 
 	__webpack_require__(325);
 
 	__webpack_require__(327);
 
 	__webpack_require__(331);
 
+	var _devtoolsSplitter = __webpack_require__(910);
+
+	var _devtoolsSplitter2 = _interopRequireDefault(_devtoolsSplitter);
+
+	var _ProjectSearch2 = __webpack_require__(915);
+
+	var _ProjectSearch3 = _interopRequireDefault(_ProjectSearch2);
+
+	var _Sources2 = __webpack_require__(388);
+
+	var _Sources3 = _interopRequireDefault(_Sources2);
+
+	var _Editor2 = __webpack_require__(426);
+
+	var _Editor3 = _interopRequireDefault(_Editor2);
+
+	var _SecondaryPanes2 = __webpack_require__(718);
+
+	var _SecondaryPanes3 = _interopRequireDefault(_SecondaryPanes2);
+
+	var _WelcomeBox2 = __webpack_require__(747);
+
+	var _WelcomeBox3 = _interopRequireDefault(_WelcomeBox2);
+
+	var _Tabs = __webpack_require__(750);
+
+	var _Tabs2 = _interopRequireDefault(_Tabs);
+
 	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 	var shortcuts = new _devtoolsModules.KeyShortcuts({ window });
 
 	var verticalLayoutBreakpoint = window.matchMedia("(min-width: 800px)");
 
-	var SplitBox = (0, _react.createFactory)(__webpack_require__(910));
-	var ProjectSearch = (0, _react.createFactory)(__webpack_require__(915).default);
-	var Sources = (0, _react.createFactory)(__webpack_require__(388).default);
-	var Editor = (0, _react.createFactory)(__webpack_require__(426).default);
-	var SecondaryPanes = (0, _react.createFactory)(__webpack_require__(718).default);
-	var WelcomeBox = (0, _react.createFactory)(__webpack_require__(747).default);
-	var EditorTabs = (0, _react.createFactory)(__webpack_require__(750));
+	var SplitBox = (0, _react.createFactory)(_devtoolsSplitter2.default);
+
+	var ProjectSearch = (0, _react.createFactory)(_ProjectSearch3.default);
+
+	var Sources = (0, _react.createFactory)(_Sources3.default);
+
+	var Editor = (0, _react.createFactory)(_Editor3.default);
+
+	var SecondaryPanes = (0, _react.createFactory)(_SecondaryPanes3.default);
+
+	var WelcomeBox = (0, _react.createFactory)(_WelcomeBox3.default);
+
+	var EditorTabs = (0, _react.createFactory)(_Tabs2.default);
 
 	class App extends _react.Component {
 
 	  constructor(props) {
 	    super(props);
 	    this.state = {
 	      horizontal: verticalLayoutBreakpoint.matches,
 	      startPanelSize: 0,
@@ -15194,32 +15309,31 @@ return /******/ (function(modules) { // 
 	      endPanelCollapsed,
 	      horizontal,
 	      endPanelSize
 	    }), Editor({ horizontal }), !this.props.selectedSource ? WelcomeBox({ horizontal }) : null, ProjectSearch()));
 	  }
 
 	  renderHorizontalLayout() {
 	    var _props2 = this.props,
-	        sources = _props2.sources,
 	        startPanelCollapsed = _props2.startPanelCollapsed,
 	        endPanelCollapsed = _props2.endPanelCollapsed;
 	    var horizontal = this.state.horizontal;
 
 
 	    var overflowX = endPanelCollapsed ? "hidden" : "auto";
 
 	    return _react.DOM.div({ className: "debugger" }, SplitBox({
 	      style: { width: "100vw" },
 	      initialSize: "250px",
 	      minSize: 10,
 	      maxSize: "50%",
 	      splitterSize: 1,
 	      onResizeEnd: size => this.setState({ startPanelSize: size }),
-	      startPanel: Sources({ sources, horizontal }),
+	      startPanel: Sources({ horizontal }),
 	      startPanelCollapsed,
 	      endPanel: SplitBox({
 	        style: { overflowX },
 	        initialSize: "300px",
 	        minSize: 10,
 	        maxSize: "80%",
 	        splitterSize: 1,
 	        onResizeEnd: size => this.setState({ endPanelSize: size }),
@@ -15229,17 +15343,16 @@ return /******/ (function(modules) { // 
 	        endPanelCollapsed,
 	        vert: horizontal
 	      })
 	    }));
 	  }
 
 	  renderVerticalLayout() {
 	    var _props3 = this.props,
-	        sources = _props3.sources,
 	        startPanelCollapsed = _props3.startPanelCollapsed,
 	        endPanelCollapsed = _props3.endPanelCollapsed;
 	    var horizontal = this.state.horizontal;
 
 
 	    return _react.DOM.div({ className: "debugger" }, SplitBox({
 	      style: { width: "100vw" },
 	      initialSize: "300px",
@@ -15249,43 +15362,41 @@ return /******/ (function(modules) { // 
 	      vert: horizontal,
 	      startPanel: SplitBox({
 	        style: { width: "100vw" },
 	        initialSize: "250px",
 	        minSize: 10,
 	        maxSize: "40%",
 	        splitterSize: 1,
 	        startPanelCollapsed,
-	        startPanel: Sources({ sources, horizontal }),
+	        startPanel: Sources({ horizontal }),
 	        endPanel: this.renderEditorPane()
 	      }),
 	      endPanel: SecondaryPanes({ horizontal }),
 	      endPanelCollapsed
 	    }));
 	  }
 
 	  render() {
 	    return this.state.horizontal ? this.renderHorizontalLayout() : this.renderVerticalLayout();
 	  }
 	}
 
 	App.propTypes = {
-	  sources: _react.PropTypes.object,
 	  selectSource: _react.PropTypes.func,
 	  selectedSource: _react.PropTypes.object,
 	  startPanelCollapsed: _react.PropTypes.bool,
 	  endPanelCollapsed: _react.PropTypes.bool
 	};
 
 	App.displayName = "App";
 
 	App.childContextTypes = { shortcuts: _react.PropTypes.object };
 
 	exports.default = (0, _reactRedux.connect)(state => ({
-	  sources: (0, _selectors.getSources)(state),
 	  selectedSource: (0, _selectors.getSelectedSource)(state),
 	  startPanelCollapsed: (0, _selectors.getPaneCollapse)(state, "start"),
 	  endPanelCollapsed: (0, _selectors.getPaneCollapse)(state, "end")
 	}), dispatch => (0, _redux.bindActionCreators)(_actions2.default, dispatch))(App);
 
 /***/ },
 /* 244 */
 /***/ function(module, exports, __webpack_require__) {
@@ -15577,176 +15688,176 @@ return /******/ (function(modules) { // 
 	}
 
 /***/ },
 /* 246 */,
 /* 247 */,
 /* 248 */
 /***/ function(module, exports, __webpack_require__) {
 
-	(function(){
-	  var crypt = __webpack_require__(249),
-	      utf8 = __webpack_require__(250).utf8,
-	      isBuffer = __webpack_require__(251),
-	      bin = __webpack_require__(250).bin,
-
-	  // The core
-	  md5 = function (message, options) {
-	    // Convert to byte array
-	    if (message.constructor == String)
-	      if (options && options.encoding === 'binary')
-	        message = bin.stringToBytes(message);
-	      else
-	        message = utf8.stringToBytes(message);
-	    else if (isBuffer(message))
-	      message = Array.prototype.slice.call(message, 0);
-	    else if (!Array.isArray(message))
-	      message = message.toString();
-	    // else, assume byte array already
-
-	    var m = crypt.bytesToWords(message),
-	        l = message.length * 8,
-	        a =  1732584193,
-	        b = -271733879,
-	        c = -1732584194,
-	        d =  271733878;
-
-	    // Swap endian
-	    for (var i = 0; i < m.length; i++) {
-	      m[i] = ((m[i] <<  8) | (m[i] >>> 24)) & 0x00FF00FF |
-	             ((m[i] << 24) | (m[i] >>>  8)) & 0xFF00FF00;
-	    }
-
-	    // Padding
-	    m[l >>> 5] |= 0x80 << (l % 32);
-	    m[(((l + 64) >>> 9) << 4) + 14] = l;
-
-	    // Method shortcuts
-	    var FF = md5._ff,
-	        GG = md5._gg,
-	        HH = md5._hh,
-	        II = md5._ii;
-
-	    for (var i = 0; i < m.length; i += 16) {
-
-	      var aa = a,
-	          bb = b,
-	          cc = c,
-	          dd = d;
-
-	      a = FF(a, b, c, d, m[i+ 0],  7, -680876936);
-	      d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
-	      c = FF(c, d, a, b, m[i+ 2], 17,  606105819);
-	      b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
-	      a = FF(a, b, c, d, m[i+ 4],  7, -176418897);
-	      d = FF(d, a, b, c, m[i+ 5], 12,  1200080426);
-	      c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
-	      b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
-	      a = FF(a, b, c, d, m[i+ 8],  7,  1770035416);
-	      d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
-	      c = FF(c, d, a, b, m[i+10], 17, -42063);
-	      b = FF(b, c, d, a, m[i+11], 22, -1990404162);
-	      a = FF(a, b, c, d, m[i+12],  7,  1804603682);
-	      d = FF(d, a, b, c, m[i+13], 12, -40341101);
-	      c = FF(c, d, a, b, m[i+14], 17, -1502002290);
-	      b = FF(b, c, d, a, m[i+15], 22,  1236535329);
-
-	      a = GG(a, b, c, d, m[i+ 1],  5, -165796510);
-	      d = GG(d, a, b, c, m[i+ 6],  9, -1069501632);
-	      c = GG(c, d, a, b, m[i+11], 14,  643717713);
-	      b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
-	      a = GG(a, b, c, d, m[i+ 5],  5, -701558691);
-	      d = GG(d, a, b, c, m[i+10],  9,  38016083);
-	      c = GG(c, d, a, b, m[i+15], 14, -660478335);
-	      b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
-	      a = GG(a, b, c, d, m[i+ 9],  5,  568446438);
-	      d = GG(d, a, b, c, m[i+14],  9, -1019803690);
-	      c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
-	      b = GG(b, c, d, a, m[i+ 8], 20,  1163531501);
-	      a = GG(a, b, c, d, m[i+13],  5, -1444681467);
-	      d = GG(d, a, b, c, m[i+ 2],  9, -51403784);
-	      c = GG(c, d, a, b, m[i+ 7], 14,  1735328473);
-	      b = GG(b, c, d, a, m[i+12], 20, -1926607734);
-
-	      a = HH(a, b, c, d, m[i+ 5],  4, -378558);
-	      d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
-	      c = HH(c, d, a, b, m[i+11], 16,  1839030562);
-	      b = HH(b, c, d, a, m[i+14], 23, -35309556);
-	      a = HH(a, b, c, d, m[i+ 1],  4, -1530992060);
-	      d = HH(d, a, b, c, m[i+ 4], 11,  1272893353);
-	      c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
-	      b = HH(b, c, d, a, m[i+10], 23, -1094730640);
-	      a = HH(a, b, c, d, m[i+13],  4,  681279174);
-	      d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
-	      c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
-	      b = HH(b, c, d, a, m[i+ 6], 23,  76029189);
-	      a = HH(a, b, c, d, m[i+ 9],  4, -640364487);
-	      d = HH(d, a, b, c, m[i+12], 11, -421815835);
-	      c = HH(c, d, a, b, m[i+15], 16,  530742520);
-	      b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
-
-	      a = II(a, b, c, d, m[i+ 0],  6, -198630844);
-	      d = II(d, a, b, c, m[i+ 7], 10,  1126891415);
-	      c = II(c, d, a, b, m[i+14], 15, -1416354905);
-	      b = II(b, c, d, a, m[i+ 5], 21, -57434055);
-	      a = II(a, b, c, d, m[i+12],  6,  1700485571);
-	      d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
-	      c = II(c, d, a, b, m[i+10], 15, -1051523);
-	      b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
-	      a = II(a, b, c, d, m[i+ 8],  6,  1873313359);
-	      d = II(d, a, b, c, m[i+15], 10, -30611744);
-	      c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
-	      b = II(b, c, d, a, m[i+13], 21,  1309151649);
-	      a = II(a, b, c, d, m[i+ 4],  6, -145523070);
-	      d = II(d, a, b, c, m[i+11], 10, -1120210379);
-	      c = II(c, d, a, b, m[i+ 2], 15,  718787259);
-	      b = II(b, c, d, a, m[i+ 9], 21, -343485551);
-
-	      a = (a + aa) >>> 0;
-	      b = (b + bb) >>> 0;
-	      c = (c + cc) >>> 0;
-	      d = (d + dd) >>> 0;
-	    }
-
-	    return crypt.endian([a, b, c, d]);
-	  };
-
-	  // Auxiliary functions
-	  md5._ff  = function (a, b, c, d, x, s, t) {
-	    var n = a + (b & c | ~b & d) + (x >>> 0) + t;
-	    return ((n << s) | (n >>> (32 - s))) + b;
-	  };
-	  md5._gg  = function (a, b, c, d, x, s, t) {
-	    var n = a + (b & d | c & ~d) + (x >>> 0) + t;
-	    return ((n << s) | (n >>> (32 - s))) + b;
-	  };
-	  md5._hh  = function (a, b, c, d, x, s, t) {
-	    var n = a + (b ^ c ^ d) + (x >>> 0) + t;
-	    return ((n << s) | (n >>> (32 - s))) + b;
-	  };
-	  md5._ii  = function (a, b, c, d, x, s, t) {
-	    var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
-	    return ((n << s) | (n >>> (32 - s))) + b;
-	  };
-
-	  // Package private blocksize
-	  md5._blocksize = 16;
-	  md5._digestsize = 16;
-
-	  module.exports = function (message, options) {
-	    if (message === undefined || message === null)
-	      throw new Error('Illegal argument ' + message);
-
-	    var digestbytes = crypt.wordsToBytes(md5(message, options));
-	    return options && options.asBytes ? digestbytes :
-	        options && options.asString ? bin.bytesToString(digestbytes) :
-	        crypt.bytesToHex(digestbytes);
-	  };
-
-	})();
+	(function(){
+	  var crypt = __webpack_require__(249),
+	      utf8 = __webpack_require__(250).utf8,
+	      isBuffer = __webpack_require__(251),
+	      bin = __webpack_require__(250).bin,
+
+	  // The core
+	  md5 = function (message, options) {
+	    // Convert to byte array
+	    if (message.constructor == String)
+	      if (options && options.encoding === 'binary')
+	        message = bin.stringToBytes(message);
+	      else
+	        message = utf8.stringToBytes(message);
+	    else if (isBuffer(message))
+	      message = Array.prototype.slice.call(message, 0);
+	    else if (!Array.isArray(message))
+	      message = message.toString();
+	    // else, assume byte array already
+
+	    var m = crypt.bytesToWords(message),
+	        l = message.length * 8,
+	        a =  1732584193,
+	        b = -271733879,
+	        c = -1732584194,
+	        d =  271733878;
+
+	    // Swap endian
+	    for (var i = 0; i < m.length; i++) {
+	      m[i] = ((m[i] <<  8) | (m[i] >>> 24)) & 0x00FF00FF |
+	             ((m[i] << 24) | (m[i] >>>  8)) & 0xFF00FF00;
+	    }
+
+	    // Padding
+	    m[l >>> 5] |= 0x80 << (l % 32);
+	    m[(((l + 64) >>> 9) << 4) + 14] = l;
+
+	    // Method shortcuts
+	    var FF = md5._ff,
+	        GG = md5._gg,
+	        HH = md5._hh,
+	        II = md5._ii;
+
+	    for (var i = 0; i < m.length; i += 16) {
+
+	      var aa = a,
+	          bb = b,
+	          cc = c,
+	          dd = d;
+
+	      a = FF(a, b, c, d, m[i+ 0],  7, -680876936);
+	      d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
+	      c = FF(c, d, a, b, m[i+ 2], 17,  606105819);
+	      b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
+	      a = FF(a, b, c, d, m[i+ 4],  7, -176418897);
+	      d = FF(d, a, b, c, m[i+ 5], 12,  1200080426);
+	      c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
+	      b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
+	      a = FF(a, b, c, d, m[i+ 8],  7,  1770035416);
+	      d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
+	      c = FF(c, d, a, b, m[i+10], 17, -42063);
+	      b = FF(b, c, d, a, m[i+11], 22, -1990404162);
+	      a = FF(a, b, c, d, m[i+12],  7,  1804603682);
+	      d = FF(d, a, b, c, m[i+13], 12, -40341101);
+	      c = FF(c, d, a, b, m[i+14], 17, -1502002290);
+	      b = FF(b, c, d, a, m[i+15], 22,  1236535329);
+
+	      a = GG(a, b, c, d, m[i+ 1],  5, -165796510);
+	      d = GG(d, a, b, c, m[i+ 6],  9, -1069501632);
+	      c = GG(c, d, a, b, m[i+11], 14,  643717713);
+	      b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
+	      a = GG(a, b, c, d, m[i+ 5],  5, -701558691);
+	      d = GG(d, a, b, c, m[i+10],  9,  38016083);
+	      c = GG(c, d, a, b, m[i+15], 14, -660478335);
+	      b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
+	      a = GG(a, b, c, d, m[i+ 9],  5,  568446438);
+	      d = GG(d, a, b, c, m[i+14],  9, -1019803690);
+	      c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
+	      b = GG(b, c, d, a, m[i+ 8], 20,  1163531501);
+	      a = GG(a, b, c, d, m[i+13],  5, -1444681467);
+	      d = GG(d, a, b, c, m[i+ 2],  9, -51403784);
+	      c = GG(c, d, a, b, m[i+ 7], 14,  1735328473);
+	      b = GG(b, c, d, a, m[i+12], 20, -1926607734);
+
+	      a = HH(a, b, c, d, m[i+ 5],  4, -378558);
+	      d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
+	      c = HH(c, d, a, b, m[i+11], 16,  1839030562);
+	      b = HH(b, c, d, a, m[i+14], 23, -35309556);
+	      a = HH(a, b, c, d, m[i+ 1],  4, -1530992060);
+	      d = HH(d, a, b, c, m[i+ 4], 11,  1272893353);
+	      c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
+	      b = HH(b, c, d, a, m[i+10], 23, -1094730640);
+	      a = HH(a, b, c, d, m[i+13],  4,  681279174);
+	      d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
+	      c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
+	      b = HH(b, c, d, a, m[i+ 6], 23,  76029189);
+	      a = HH(a, b, c, d, m[i+ 9],  4, -640364487);
+	      d = HH(d, a, b, c, m[i+12], 11, -421815835);
+	      c = HH(c, d, a, b, m[i+15], 16,  530742520);
+	      b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
+
+	      a = II(a, b, c, d, m[i+ 0],  6, -198630844);
+	      d = II(d, a, b, c, m[i+ 7], 10,  1126891415);
+	      c = II(c, d, a, b, m[i+14], 15, -1416354905);
+	      b = II(b, c, d, a, m[i+ 5], 21, -57434055);
+	      a = II(a, b, c, d, m[i+12],  6,  1700485571);
+	      d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
+	      c = II(c, d, a, b, m[i+10], 15, -1051523);
+	      b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
+	      a = II(a, b, c, d, m[i+ 8],  6,  1873313359);
+	      d = II(d, a, b, c, m[i+15], 10, -30611744);
+	      c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
+	      b = II(b, c, d, a, m[i+13], 21,  1309151649);
+	      a = II(a, b, c, d, m[i+ 4],  6, -145523070);
+	      d = II(d, a, b, c, m[i+11], 10, -1120210379);
+	      c = II(c, d, a, b, m[i+ 2], 15,  718787259);
+	      b = II(b, c, d, a, m[i+ 9], 21, -343485551);
+
+	      a = (a + aa) >>> 0;
+	      b = (b + bb) >>> 0;
+	      c = (c + cc) >>> 0;
+	      d = (d + dd) >>> 0;
+	    }
+
+	    return crypt.endian([a, b, c, d]);
+	  };
+
+	  // Auxiliary functions
+	  md5._ff  = function (a, b, c, d, x, s, t) {
+	    var n = a + (b & c | ~b & d) + (x >>> 0) + t;
+	    return ((n << s) | (n >>> (32 - s))) + b;
+	  };
+	  md5._gg  = function (a, b, c, d, x, s, t) {
+	    var n = a + (b & d | c & ~d) + (x >>> 0) + t;
+	    return ((n << s) | (n >>> (32 - s))) + b;
+	  };
+	  md5._hh  = function (a, b, c, d, x, s, t) {
+	    var n = a + (b ^ c ^ d) + (x >>> 0) + t;
+	    return ((n << s) | (n >>> (32 - s))) + b;
+	  };
+	  md5._ii  = function (a, b, c, d, x, s, t) {
+	    var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
+	    return ((n << s) | (n >>> (32 - s))) + b;
+	  };
+
+	  // Package private blocksize
+	  md5._blocksize = 16;
+	  md5._digestsize = 16;
+
+	  module.exports = function (message, options) {
+	    if (message === undefined || message === null)
+	      throw new Error('Illegal argument ' + message);
+
+	    var digestbytes = crypt.wordsToBytes(md5(message, options));
+	    return options && options.asBytes ? digestbytes :
+	        options && options.asString ? bin.bytesToString(digestbytes) :
+	        crypt.bytesToHex(digestbytes);
+	  };
+
+	})();
 
 
 /***/ },
 /* 249 */
 /***/ function(module, exports) {
 
 	(function() {
 	  var base64map
@@ -16318,16 +16429,18 @@ return /******/ (function(modules) { // 
 	var _assert = __webpack_require__(223);
 
 	var _assert2 = _interopRequireDefault(_assert);
 
 	var _pause = __webpack_require__(255);
 
 	var _breakpoints = __webpack_require__(245);
 
+	var _devtoolsConfig = __webpack_require__(828);
+
 	var _prettyPrint = __webpack_require__(903);
 
 	var _source = __webpack_require__(233);
 
 	var _constants = __webpack_require__(229);
 
 	var _constants2 = _interopRequireDefault(_constants);
 
@@ -16362,26 +16475,31 @@ return /******/ (function(modules) { // 
 	function checkPendingBreakpoints(state, dispatch, source) {
 	  var pendingBreakpoints = (0, _selectors.getPendingBreakpoints)(state);
 
 	  if (pendingBreakpoints) {
 	    pendingBreakpoints.forEach(pendingBreakpoint => {
 	      var _pendingBreakpoint$lo = pendingBreakpoint.location,
 	          line = _pendingBreakpoint$lo.line,
 	          sourceUrl = _pendingBreakpoint$lo.sourceUrl,
+	          column = _pendingBreakpoint$lo.column,
 	          condition = pendingBreakpoint.condition;
 
 	      var sameSource = sourceUrl && sourceUrl == source.url;
 
-	      var location = { sourceId: source.id, sourceUrl, line };
+	      var location = { sourceId: source.id, sourceUrl, line, column };
 
 	      var bp = (0, _selectors.getBreakpoint)(state, location);
 
 	      if (sameSource && !bp) {
-	        dispatch((0, _breakpoints.addBreakpoint)(location, { condition }));
+	        if (location.column && (0, _devtoolsConfig.isEnabled)("columnBreakpoints")) {
+	          dispatch((0, _breakpoints.addBreakpoint)(location, { condition }));
+	        } else {
+	          dispatch((0, _breakpoints.addBreakpoint)(location, { condition }));
+	        }
 	      }
 	    });
 	  }
 	}
 
 	/**
 	 * Handler for the debugger client's unsolicited newSource notification.
 	 * @memberof actions/sources
@@ -16885,54 +17003,58 @@ return /******/ (function(modules) { // 
 
 /***/ },
 /* 256 */,
 /* 257 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
+	var _devtoolsConfig = __webpack_require__(828);
+
+	var _source = __webpack_require__(233);
+
+	var _devtoolsSourceMap = __webpack_require__(898);
+
+	var _buildQuery = __webpack_require__(258);
+
+	var _buildQuery2 = _interopRequireDefault(_buildQuery);
+
+	var _sourceDocuments = __webpack_require__(260);
+
+	var sourceDocumentUtils = _interopRequireWildcard(_sourceDocuments);
+
 	var _expression = __webpack_require__(904);
 
 	var expressionUtils = _interopRequireWildcard(_expression);
 
+	var _sourceSearch = __webpack_require__(261);
+
+	var sourceSearchUtils = _interopRequireWildcard(_sourceSearch);
+
+	var _devtoolsSourceEditor = __webpack_require__(993);
+
 	function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
 
-	var _require = __webpack_require__(828),
-	    isEnabled = _require.isEnabled;
-
-	var _require2 = __webpack_require__(233),
-	    isPretty = _require2.isPretty,
-	    isJavaScript = _require2.isJavaScript;
-
-	var _require3 = __webpack_require__(898),
-	    isOriginalId = _require3.isOriginalId;
-
-	var buildQuery = __webpack_require__(258);
-	var sourceDocumentUtils = __webpack_require__(260);
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
 	var getDocument = sourceDocumentUtils.getDocument;
-
-
-	var sourceSearchUtils = __webpack_require__(261);
 	var findNext = sourceSearchUtils.findNext,
 	    findPrev = sourceSearchUtils.findPrev;
 
-	var _require4 = __webpack_require__(965),
-	    SourceEditor = _require4.SourceEditor,
-	    SourceEditorUtils = _require4.SourceEditorUtils;
 
 	function shouldShowPrettyPrint(selectedSource) {
 	  if (!selectedSource) {
 	    return false;
 	  }
 
 	  selectedSource = selectedSource.toJS();
-	  var _isPretty = isPretty(selectedSource);
-	  var _isJavaScript = isJavaScript(selectedSource.url);
-	  var isOriginal = isOriginalId(selectedSource.id);
+	  var _isPretty = (0, _source.isPretty)(selectedSource);
+	  var _isJavaScript = (0, _source.isJavaScript)(selectedSource.url);
+	  var isOriginal = (0, _devtoolsSourceMap.isOriginalId)(selectedSource.id);
 	  var hasSourceMap = selectedSource.sourceMapURL;
 
 	  if (_isPretty || isOriginal || hasSourceMap || !_isJavaScript) {
 	    return false;
 	  }
 
 	  return true;
 	}
@@ -16944,19 +17066,23 @@ return /******/ (function(modules) { // 
 
 	  return shouldShowPrettyPrint(selectedSource);
 	}
 
 	function isTextForSource(sourceText) {
 	  return !sourceText.get("loading") && !sourceText.get("error");
 	}
 
-	function breakpointAtLine(breakpoints, line) {
-	  return breakpoints.find(b => {
-	    return b.location.line === line + 1;
+	function breakpointAtLocation(breakpoints, _ref) {
+	  var line = _ref.line,
+	      _ref$column = _ref.column,
+	      column = _ref$column === undefined ? undefined : _ref$column;
+
+	  return breakpoints.find(bp => {
+	    return bp.location.line === line + 1 && bp.location.column === column;
 	  });
 	}
 
 	function traverseResults(e, ctx, query, dir, modifiers) {
 	  e.stopPropagation();
 	  e.preventDefault();
 
 	  if (dir == "prev") {
@@ -16964,23 +17090,24 @@ return /******/ (function(modules) { // 
 	  } else if (dir == "next") {
 	    findNext(ctx, query, true, modifiers);
 	  }
 	}
 
 	function createEditor() {
 	  var gutters = ["breakpoints", "hit-markers", "CodeMirror-linenumbers"];
 
-	  if (isEnabled("codeFolding")) {
+	  if ((0, _devtoolsConfig.isEnabled)("codeFolding")) {
 	    gutters.push("CodeMirror-foldgutter");
 	  }
 
-	  return new SourceEditor({
+	  return new _devtoolsSourceEditor.SourceEditor({
 	    mode: "javascript",
-	    foldGutter: isEnabled("codeFolding"),
+	    foldGutter: (0, _devtoolsConfig.isEnabled)("codeFolding"),
+	    enableCodeFolding: (0, _devtoolsConfig.isEnabled)("codeFolding"),
 	    readOnly: true,
 	    lineNumbers: true,
 	    theme: "mozilla",
 	    lineWrapping: false,
 	    matchBrackets: true,
 	    showAnnotationRuler: true,
 	    gutters,
 	    value: " ",
@@ -16998,46 +17125,56 @@ return /******/ (function(modules) { // 
 	    var sourceId = selectedSource.get("id");
 	    var doc = getDocument(sourceId) || editor.createDocument();
 	    editor.replaceDocument(doc);
 	  } else if (sourceText) {
 	    this.setText(sourceText.get("text"));
 	  }
 	}
 
-	module.exports = Object.assign({}, expressionUtils, sourceDocumentUtils, sourceSearchUtils, SourceEditorUtils, {
+	module.exports = Object.assign({}, expressionUtils, sourceDocumentUtils, sourceSearchUtils, _devtoolsSourceEditor.SourceEditorUtils, {
 	  createEditor,
 	  shouldShowPrettyPrint,
 	  shouldShowFooter,
-	  buildQuery,
+	  buildQuery: _buildQuery2.default,
 	  isTextForSource,
-	  breakpointAtLine,
+	  breakpointAtLocation,
 	  traverseResults,
 	  updateDocument
 	});
 
 /***/ },
 /* 258 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
-	var escapeRegExp = __webpack_require__(259);
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.default = buildQuery;
+
+	var _escapeRegExp = __webpack_require__(259);
+
+	var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp);
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 	/**
 	 * Ignore doing outline matches for less than 3 whitespaces
 	 *
 	 * @memberof utils/source-search
 	 * @static
 	 */
 	function ignoreWhiteSpace(str) {
 	  return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str
 	  );
 	}
 
+
 	function wholeMatch(query, wholeWord) {
 	  if (query == "" || !wholeWord) {
 	    return query;
 	  }
 
 	  return `\\b${query}\\b`;
 	}
 
@@ -17072,31 +17209,29 @@ return /******/ (function(modules) { // 
 	  }
 
 	  var query = originalQuery;
 	  if (ignoreSpaces) {
 	    query = ignoreWhiteSpace(query);
 	  }
 
 	  if (!regexMatch) {
-	    query = escapeRegExp(query);
+	    query = (0, _escapeRegExp2.default)(query);
 	  }
 
 	  query = wholeMatch(query, wholeWord);
 	  var flags = buildFlags(caseSensitive, isGlobal);
 
 	  if (flags) {
 	    return new RegExp(query, flags);
 	  }
 
 	  return new RegExp(query);
 	}
 
-	module.exports = buildQuery;
-
 /***/ },
 /* 259 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var toString = __webpack_require__(108);
 
 	/**
 	 * Used to match `RegExp`
@@ -17131,16 +17266,19 @@ return /******/ (function(modules) { // 
 
 
 /***/ },
 /* 260 */
 /***/ function(module, exports) {
 
 	"use strict";
 
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
 	var sourceDocs = {};
 
 	function getDocument(key) {
 	  return sourceDocs[key];
 	}
 
 	function setDocument(key, doc) {
 	  sourceDocs[key] = doc;
@@ -17149,38 +17287,48 @@ return /******/ (function(modules) { // 
 	function removeDocument(key) {
 	  delete sourceDocs[key];
 	}
 
 	function clearDocuments() {
 	  sourceDocs = {};
 	}
 
-	module.exports = {
-	  getDocument,
-	  setDocument,
-	  removeDocument,
-	  clearDocuments
-	};
+	exports.getDocument = getDocument;
+	exports.setDocument = setDocument;
+	exports.removeDocument = removeDocument;
+	exports.clearDocuments = clearDocuments;
 
 /***/ },
 /* 261 */
 /***/ function(module, exports, __webpack_require__) {
 
 	"use strict";
 
-	var buildQuery = __webpack_require__(258);
-	var findIndex = __webpack_require__(262);
+	Object.defineProperty(exports, "__esModule", {
+	  value: true
+	});
+	exports.getMatchIndex = exports.removeOverlay = exports.findPrev = exports.findNext = exports.find = exports.countMatches = exports.clearIndex = exports.buildQuery = undefined;
+
+	var _buildQuery = __webpack_require__(258);
+
+	var _buildQuery2 = _interopRequireDefault(_buildQuery);
+
+	var _findIndex = __webpack_require__(262);
+
+	var _findIndex2 = _interopRequireDefault(_findIndex);
+
+	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 	/**
 	 * @memberof utils/source-search
 	 * @static
 	 */
 	function getSearchCursor(cm, query, pos, modifiers) {
-	  var regexQuery = buildQuery(query, modifiers, { isGlobal: true });
+	  var regexQuery = (0, _buildQuery2.default)(query, modifiers, { isGlobal: true });
 	  return cm.getSearchCursor(regexQuery, pos);
 	}
 
 	/**
 	 * @memberof utils/source-search
 	 * @static
 	 */
 	function SearchState() {
@@ -17224,17 +17372,17 @@ return /******/ (function(modules) { // 
 	 *
 	 * Also the token function code is mainly based of work done
 	 * by the chrome devtools team. Thanks guys! :)
 	 *
 	 * @memberof utils/source-search
 	 * @static
 	 */
 	function searchOverlay(query, modifiers) {
-	  var regexQuery = buildQuery(query, modifiers, {
+	  var regexQuery = (0, _buildQuery2.default)(query, modifiers, {
 	    ignoreSpaces: true
 	  });
 
 	  var matchLength = null;
 
 	  return {
 	    token: function (stream) {
 	      if (stream.column() === 0) {
@@ -17328,17 +17476,17 @@ return /******/ (function(modules) { // 
 	    state.query = query;
 
 	    updateOverlay(cm, state, query, modifiers);
 	    updateCursor(cm, state, keepSelection);
 
 	    var nextMatch = searchNext(ctx, rev, query, newQuery, modifiers);
 	    if (nextMatch) {
 	      if (state.matchIndex === -1) {
-	        matchIndex = findIndex(state.results, nextMatch);
+	        matchIndex = (0, _findIndex2.default)(state.results, nextMatch);
 	      } else {
 	        var count = state.results.length;
 	        var currentIndex = state.matchIndex;
 	        matchIndex = getMatchIndex(count, currentIndex, rev);
 	      }
 
 	      state.matchIndex = matchIndex;
 	    }
@@ -17461,33 +17609,31 @@ return /******/ (function(modules) { // 
 	}
 
 	function clearIndex(ctx, query, modifiers) {
 	  var state = getSearchState(ctx.cm, query, modifiers);
 	  state.matchIndex = -1;
 	}
 
 	function countMatches(query, text, modifiers) {
-	  var regexQuery = buildQuery(query, modifiers, {
+	  var regexQuery = (0, _buildQuery2.default)(query, modifiers, {
 	    isGlobal: true
 	  });
 	  var match = text.match(regexQuery);
 	  return match ? match.length : 0;
 	}
 
-	module.exports = {
-	  buildQuery,
-	  clearIndex,
-	  countMatches,
-	  find,
-	  findNext,
-	  findPrev,
-	  removeOverlay,
-	  getMatchIndex
-	};
+	exports.buildQuery = _buildQuery2.default;
+	exports.clearIndex = clearIndex;
+	exports.countMatches = countMatches;
+	exports.find = find;
+	exports.findNext = findNext;
+	exports.findPrev = findPrev;
+	exports.removeOverlay = removeOverlay;
+	exports.getMatchIndex = getMatchIndex;
 
 /***/ },
 /* 262 */
 /***/ function(module, exports, __webpack_require__) {
 
 	var baseFindIndex = __webpack_require__(263),
 	    baseIteratee = __webpack_require__(264),
 	    toInteger = __webpack_require__(302);
@@ -19109,12460 +19255,29 @@ return /******/ (function(modules) { // 
 	    : (reIsBadHex.test(value) ? NAN : +value);
 	}
 
 	module.exports = toNumber;
 
 
 /***/ },
 /* 305 */,
-/* 306 */
-/***/ function(module, exports, __webpack_require__) {
-
-	// CodeMirror, copyright (c) by Marijn Haverbeke and others
-	// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-	// This is CodeMirror (http://codemirror.net), a code editor
-	// implemented in JavaScript on top of the browser's DOM.
-	//
-	// You can find some technical background for some of the code below
-	// at http://marijnhaverbeke.nl/blog/#cm-internals .
-
-	(function (global, factory) {
-		 true ? module.exports = factory() :
-		typeof define === 'function' && define.amd ? define(factory) :
-		(global.CodeMirror = factory());
-	}(this, (function () { 'use strict';
-
-	// Kludges for bugs and behavior differences that can't be feature
-	// detected are enabled based on userAgent etc sniffing.
-	var userAgent = navigator.userAgent;
-	var platform = navigator.platform;
-
-	var gecko = /gecko\/\d/i.test(userAgent);
-	var ie_upto10 = /MSIE \d/.test(userAgent);
-	var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);
-	var edge = /Edge\/(\d+)/.exec(userAgent);
-	var ie = ie_upto10 || ie_11up || edge;
-	var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
-	var webkit = !edge && /WebKit\//.test(userAgent);
-	var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
-	var chrome = !edge && /Chrome\//.test(userAgent);
-	var presto = /Opera\//.test(userAgent);
-	var safari = /Apple Computer/.test(navigator.vendor);
-	var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
-	var phantom = /PhantomJS/.test(userAgent);
-
-	var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent);
-	var android = /Android/.test(userAgent);
-	// This is woefully incomplete. Suggestions for alternative methods welcome.
-	var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
-	var mac = ios || /Mac/.test(platform);
-	var chromeOS = /\bCrOS\b/.test(userAgent);
-	var windows = /win/i.test(platform);
-
-	var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
-	if (presto_version) { presto_version = Number(presto_version[1]); }
-	if (presto_version && presto_version >= 15) { presto = false; webkit = true; }
-	// Some browsers use the wrong event properties to signal cmd/ctrl on OS X
-	var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
-	var captureRightClick = gecko || (ie && ie_version >= 9);
-
-	function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
-
-	var rmClass = function(node, cls) {
-	  var current = node.className;
-	  var match = classTest(cls).exec(current);
-	  if (match) {
-	    var after = current.slice(match.index + match[0].length);
-	    node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
-	  }
-	};
-
-	function removeChildren(e) {
-	  for (var count = e.childNodes.length; count > 0; --count)
-	    { e.removeChild(e.firstChild); }
-	  return e
-	}
-
-	function removeChildrenAndAdd(parent, e) {
-	  return removeChildren(parent).appendChild(e)
-	}
-
-	function elt(tag, content, className, style) {
-	  var e = document.createElement(tag);
-	  if (className) { e.className = className; }
-	  if (style) { e.style.cssText = style; }
-	  if (typeof content == "string") { e.appendChild(document.createTextNode(content)); }
-	  else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }
-	  return e
-	}
-	// wrapper for elt, which removes the elt from the accessibility tree
-	function eltP(tag, content, className, style) {
-	  var e = elt(tag, content, className, style);
-	  e.setAttribute("role", "presentation");
-	  return e
-	}
-
-	var range;
-	if (document.createRange) { range = function(node, start, end, endNode) {
-	  var r = document.createRange();
-	  r.setEnd(endNode || node, end);
-	  r.setStart(node, start);
-	  return r
-	}; }
-	else { range = function(node, start, end) {
-	  var r = document.body.createTextRange();
-	  try { r.moveToElementText(node.parentNode); }
-	  catch(e) { return r }
-	  r.collapse(true);
-	  r.moveEnd("character", end);
-	  r.moveStart("character", start);
-	  return r
-	}; }
-
-	function contains(parent, child) {
-	  if (child.nodeType == 3) // Android browser always returns false when child is a textnode
-	    { child = child.parentNode; }
-	  if (parent.contains)
-	    { return parent.contains(child) }
-	  do {
-	    if (child.nodeType == 11) { child = child.host; }
-	    if (child == parent) { return true }
-	  } while (child = child.parentNode)
-	}
-
-	function activeElt() {
-	  // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
-	  // IE < 10 will throw when accessed while the page is loading or in an iframe.
-	  // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
-	  var activeElement;
-	  try {
-	    activeElement = document.activeElement;
-	  } catch(e) {
-	    activeElement = document.body || null;
-	  }
-	  while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)
-	    { activeElement = activeElement.shadowRoot.activeElement; }
-	  return activeElement
-	}
-
-	function addClass(node, cls) {
-	  var current = node.className;
-	  if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; }
-	}
-	function joinClasses(a, b) {
-	  var as = a.split(" ");
-	  for (var i = 0; i < as.length; i++)
-	    { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } }
-	  return b
-	}
-
-	var selectInput = function(node) { node.select(); };
-	if (ios) // Mobile Safari apparently has a bug where select() is broken.
-	  { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }
-	else if (ie) // Suppress mysterious IE10 errors
-	  { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }
-
-	function bind(f) {
-	  var args = Array.prototype.slice.call(arguments, 1);
-	  return function(){return f.apply(null, args)}
-	}
-
-	function copyObj(obj, target, overwrite) {
-	  if (!target) { target = {}; }
-	  for (var prop in obj)
-	    { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
-	      { target[prop] = obj[prop]; } }
-	  return target
-	}
-
-	// Counts the column offset in a string, taking tabs into account.
-	// Used mostly to find indentation.
-	function countColumn(string, end, tabSize, startIndex, startValue) {
-	  if (end == null) {
-	    end = string.search(/[^\s\u00a0]/);
-	    if (end == -1) { end = string.length; }
-	  }
-	  for (var i = startIndex || 0, n = startValue || 0;;) {
-	    var nextTab = string.indexOf("\t", i);
-	    if (nextTab < 0 || nextTab >= end)
-	      { return n + (end - i) }
-	    n += nextTab - i;
-	    n += tabSize - (n % tabSize);
-	    i = nextTab + 1;
-	  }
-	}
-
-	var Delayed = function() {this.id = null;};
-	Delayed.prototype.set = function (ms, f) {
-	  clearTimeout(this.id);
-	  this.id = setTimeout(f, ms);
-	};
-
-	function indexOf(array, elt) {
-	  for (var i = 0; i < array.length; ++i)
-	    { if (array[i] == elt) { return i } }
-	  return -1
-	}
-
-	// Number of pixels added to scroller and sizer to hide scrollbar
-	var scrollerGap = 30;
-
-	// Returned or thrown by various protocols to signal 'I'm not
-	// handling this'.
-	var Pass = {toString: function(){return "CodeMirror.Pass"}};
-
-	// Reused option objects for setSelection & friends
-	var sel_dontScroll = {scroll: false};
-	var sel_mouse = {origin: "*mouse"};
-	var sel_move = {origin: "+move"};
-
-	// The inverse of countColumn -- find the offset that corresponds to
-	// a particular column.
-	function findColumn(string, goal, tabSize) {
-	  for (var pos = 0, col = 0;;) {
-	    var nextTab = string.indexOf("\t", pos);
-	    if (nextTab == -1) { nextTab = string.length; }
-	    var skipped = nextTab - pos;
-	    if (nextTab == string.length || col + skipped >= goal)
-	      { return pos + Math.min(skipped, goal - col) }
-	    col += nextTab - pos;
-	    col += tabSize - (col % tabSize);
-	    pos = nextTab + 1;
-	    if (col >= goal) { return pos }
-	  }
-	}
-
-	var spaceStrs = [""];
-	function spaceStr(n) {
-	  while (spaceStrs.length <= n)
-	    { spaceStrs.push(lst(spaceStrs) + " "); }
-	  return spaceStrs[n]
-	}
-
-	function lst(arr) { return arr[arr.length-1] }
-
-	function map(array, f) {
-	  var out = [];
-	  for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }
-	  return out
-	}
-
-	function insertSorted(array, value, score) {
-	  var pos = 0, priority = score(value);
-	  while (pos < array.length && score(array[pos]) <= priority) { pos++; }
-	  array.splice(pos, 0, value);
-	}
-
-	function nothing() {}
-
-	function createObj(base, props) {
-	  var inst;
-	  if (Object.create) {
-	    inst = Object.create(base);
-	  } else {
-	    nothing.prototype = base;
-	    inst = new nothing();
-	  }
-	  if (props) { copyObj(props, inst); }
-	  return inst
-	}
-
-	var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
-	function isWordCharBasic(ch) {
-	  return /\w/.test(ch) || ch > "\x80" &&
-	    (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))
-	}
-	function isWordChar(ch, helper) {
-	  if (!helper) { return isWordCharBasic(ch) }
-	  if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { return true }
-	  return helper.test(ch)
-	}
-
-	function isEmpty(obj) {
-	  for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }
-	  return true
-	}
-
-	// Extending unicode characters. A series of a non-extending char +
-	// any number of extending chars is treated as a single unit as far
-	// as editing and measuring is concerned. This is not fully correct,
-	// since some scripts/fonts/browsers also treat other configurations
-	// of code points as a group.
-	var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
-	function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }
-
-	// Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
-	function skipExtendingChars(str, pos, dir) {
-	  while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }
-	  return pos
-	}
-
-	// Returns the value from the range [`from`; `to`] that satisfies
-	// `pred` and is closest to `from`. Assumes that at least `to` satisfies `pred`.
-	function findFirst(pred, from, to) {
-	  for (;;) {
-	    if (Math.abs(from - to) <= 1) { return pred(from) ? from : to }
-	    var mid = Math.floor((from + to) / 2);
-	    if (pred(mid)) { to = mid; }
-	    else { from = mid; }
-	  }
-	}
-
-	// The display handles the DOM integration, both for input reading
-	// and content drawing. It holds references to DOM nodes and
-	// display-related state.
-
-	function Display(place, doc, input) {
-	  var d = this;
-	  this.input = input;
-
-	  // Covers bottom-right square when both scrollbars are present.
-	  d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
-	  d.scrollbarFiller.setAttribute("cm-not-content", "true");
-	  // Covers bottom of gutter when coverGutterNextToScrollbar is on
-	  // and h scrollbar is present.
-	  d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
-	  d.gutterFiller.setAttribute("cm-not-content", "true");
-	  // Will contain the actual code, positioned to cover the viewport.
-	  d.lineDiv = eltP("div", null, "CodeMirror-code");
-	  // Elements are added to these to represent selection and cursors.
-	  d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
-	  d.cursorDiv = elt("div", null, "CodeMirror-cursors");
-	  // A visibility: hidden element used to find the size of things.
-	  d.measure = elt("div", null, "CodeMirror-measure");
-	  // When lines outside of the viewport are measured, they are drawn in this.
-	  d.lineMeasure = elt("div", null, "CodeMirror-measure");
-	  // Wraps everything that needs to exist inside the vertically-padded coordinate system
-	  d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
-	                    null, "position: relative; outline: none");
-	  var lines = eltP("div", [d.lineSpace], "CodeMirror-lines");
-	  // Moved around its parent to cover visible view.
-	  d.mover = elt("div", [lines], null, "position: relative");
-	  // Set to the height of the document, allowing scrolling.
-	  d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
-	  d.sizerWidth = null;
-	  // Behavior of elts with overflow: auto and padding is
-	  // inconsistent across browsers. This is used to ensure the
-	  // scrollable area is big enough.
-	  d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");
-	  // Will contain the gutters, if any.
-	  d.gutters = elt("div", null, "CodeMirror-gutters");
-	  d.lineGutter = null;
-	  // Actual scrollable element.
-	  d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
-	  d.scroller.setAttribute("tabIndex", "-1");
-	  // The element in which the editor lives.
-	  d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
-
-	  // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
-	  if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
-	  if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }
-
-	  if (place) {
-	    if (place.appendChild) { place.appendChild(d.wrapper); }
-	    else { place(d.wrapper); }
-	  }
-
-	  // Current rendered range (may be bigger than the view window).
-	  d.viewFrom = d.viewTo = doc.first;
-	  d.reportedViewFrom = d.reportedViewTo = doc.first;
-	  // Information about the rendered lines.
-	  d.view = [];
-	  d.renderedView = null;
-	  // Holds info about a single rendered line when it was rendered
-	  // for measurement, while not in view.
-	  d.externalMeasured = null;
-	  // Empty space (in pixels) above the view
-	  d.viewOffset = 0;
-	  d.lastWrapHeight = d.lastWrapWidth = 0;
-	  d.updateLineNumbers = null;
-
-	  d.nativeBarWidth = d.barHeight = d.barWidth = 0;
-	  d.scrollbarsClipped = false;
-
-	  // Used to only resize the line number gutter when necessary (when
-	  // the amount of lines crosses a boundary that makes its width change)
-	  d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
-	  // Set to true when a non-horizontal-scrolling line widget is
-	  // added. As an optimization, line widget aligning is skipped when
-	  // this is false.
-	  d.alignWidgets = false;
-
-	  d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
-
-	  // Tracks the maximum line length so that the horizontal scrollbar
-	  // can be kept static when scrolling.
-	  d.maxLine = null;
-	  d.maxLineLength = 0;
-	  d.maxLineChanged = false;
-
-	  // Used for measuring wheel scrolling granularity
-	  d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
-
-	  // True when shift is held down.
-	  d.shift = false;
-
-	  // Used to track whether anything happened since the context menu
-	  // was opened.
-	  d.selForContextMenu = null;
-
-	  d.activeTouch = null;
-
-	  input.init(d);
-	}
-
-	// Find the line object corresponding to the given line number.
-	function getLine(doc, n) {
-	  n -= doc.first;
-	  if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") }
-	  var chunk = doc;
-	  while (!chunk.lines) {
-	    for (var i = 0;; ++i) {
-	      var child = chunk.children[i], sz = child.chunkSize();
-	      if (n < sz) { chunk = child; break }
-	      n -= sz;
-	    }
-	  }
-	  return chunk.lines[n]
-	}
-
-	// Get the part of a document between two positions, as an array of
-	// strings.
-	function getBetween(doc, start, end) {
-	  var out = [], n = start.line;
-	  doc.iter(start.line, end.line + 1, function (line) {
-	    var text = line.text;
-	    if (n == end.line) { text = text.slice(0, end.ch); }
-	    if (n == start.line) { text = text.slice(start.ch); }
-	    out.push(text);
-	    ++n;
-	  });
-	  return out
-	}
-	// Get the lines between from and to, as array of strings.
-	function getLines(doc, from, to) {
-	  var out = [];
-	  doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value
-	  return out
-	}
-
-	// Update the height of a line, propagating the height change
-	// upwards to parent nodes.
-	function updateLineHeight(line, height) {
-	  var diff = height - line.height;
-	  if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }
-	}
-
-	// Given a line object, find its line number by walking up through
-	// its parent links.
-	function lineNo(line) {
-	  if (line.parent == null) { return null }
-	  var cur = line.parent, no = indexOf(cur.lines, line);
-	  for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
-	    for (var i = 0;; ++i) {
-	      if (chunk.children[i] == cur) { break }
-	      no += chunk.children[i].chunkSize();
-	    }
-	  }
-	  return no + cur.first
-	}
-
-	// Find the line at the given vertical position, using the height
-	// information in the document tree.
-	function lineAtHeight(chunk, h) {
-	  var n = chunk.first;
-	  outer: do {
-	    for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
-	      var child = chunk.children[i$1], ch = child.height;
-	      if (h < ch) { chunk = child; continue outer }
-	      h -= ch;
-	      n += child.chunkSize();
-	    }
-	    return n
-	  } while (!chunk.lines)
-	  var i = 0;
-	  for (; i < chunk.lines.length; ++i) {
-	    var line = chunk.lines[i], lh = line.height;
-	    if (h < lh) { break }
-	    h -= lh;
-	  }
-	  return n + i
-	}
-
-	function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}
-
-	function lineNumberFor(options, i) {
-	  return String(options.lineNumberFormatter(i + options.firstLineNumber))
-	}
-
-	// A Pos instance represents a position within the text.
-	function Pos(line, ch, sticky) {
-	  if ( sticky === void 0 ) sticky = null;
-
-	  if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }
-	  this.line = line;
-	  this.ch = ch;
-	  this.sticky = sticky;
-	}
-
-	// Compare two positions, return 0 if they are the same, a negative
-	// number when a is less, and a positive number otherwise.
-	function cmp(a, b) { return a.line - b.line || a.ch - b.ch }
-
-	function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }
-
-	function copyPos(x) {return Pos(x.line, x.ch)}
-	function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }
-	function minPos(a, b) { return cmp(a, b) < 0 ? a : b }
-
-	// Most of the external API clips given positions to make sure they
-	// actually exist within the document.
-	function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}
-	function clipPos(doc, pos) {
-	  if (pos.line < doc.first) { return Pos(doc.first, 0) }
-	  var last = doc.first + doc.size - 1;
-	  if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }
-	  return clipToLen(pos, getLine(doc, pos.line).text.length)
-	}
-	function clipToLen(pos, linelen) {
-	  var ch = pos.ch;
-	  if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }
-	  else if (ch < 0) { return Pos(pos.line, 0) }
-	  else { return pos }
-	}
-	function clipPosArray(doc, array) {
-	  var out = [];
-	  for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }
-	  return out
-	}
-
-	// Optimize some code when these features are not used.
-	var sawReadOnlySpans = false;
-	var sawCollapsedSpans = false;
-
-	function seeReadOnlySpans() {
-	  sawReadOnlySpans = true;
-	}
-
-	function seeCollapsedSpans() {
-	  sawCollapsedSpans = true;
-	}
-
-	// TEXTMARKER SPANS
-
-	function MarkedSpan(marker, from, to) {
-	  this.marker = marker;
-	  this.from = from; this.to = to;
-	}
-
-	// Search an array of spans for a span matching the given marker.
-	function getMarkedSpanFor(spans, marker) {
-	  if (spans) { for (var i = 0; i < spans.length; ++i) {
-	    var span = spans[i];
-	    if (span.marker == marker) { return span }
-	  } }
-	}
-	// Remove a span from an array, returning undefined if no spans are
-	// left (we don't store arrays for lines without spans).
-	function removeMarkedSpan(spans, span) {
-	  var r;
-	  for (var i = 0; i < spans.length; ++i)
-	    { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }
-	  return r
-	}
-	// Add a span to a line.
-	function addMarkedSpan(line, span) {
-	  line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
-	  span.marker.attachLine(line);
-	}
-
-	// Used for the algorithm that adjusts markers for a change in the
-	// document. These functions cut an array of spans at a given
-	// character position, returning an array of remaining chunks (or
-	// undefined if nothing remains).
-	function markedSpansBefore(old, startCh, isInsert) {
-	  var nw;
-	  if (old) { for (var i = 0; i < old.length; ++i) {
-	    var span = old[i], marker = span.marker;
-	    var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
-	    if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
-	      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
-	    }
-	  } }
-	  return nw
-	}
-	function markedSpansAfter(old, endCh, isInsert) {
-	  var nw;
-	  if (old) { for (var i = 0; i < old.length; ++i) {
-	    var span = old[i], marker = span.marker;
-	    var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
-	    if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
-	      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
-	                                            span.to == null ? null : span.to - endCh));
-	    }
-	  } }
-	  return nw
-	}
-
-	// Given a change object, compute the new set of marker spans that
-	// cover the line in which the change took place. Removes spans
-	// entirely within the change, reconnects spans belonging to the
-	// same marker that appear on both sides of the change, and cuts off
-	// spans partially within the change. Returns an array of span
-	// arrays with one element for each line in (after) the change.
-	function stretchSpansOverChange(doc, change) {
-	  if (change.full) { return null }
-	  var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
-	  var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
-	  if (!oldFirst && !oldLast) { return null }
-
-	  var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;
-	  // Get the spans that 'stick out' on both sides
-	  var first = markedSpansBefore(oldFirst, startCh, isInsert);
-	  var last = markedSpansAfter(oldLast, endCh, isInsert);
-
-	  // Next, merge those two ends
-	  var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
-	  if (first) {
-	    // Fix up .to properties of first
-	    for (var i = 0; i < first.length; ++i) {
-	      var span = first[i];
-	      if (span.to == null) {
-	        var found = getMarkedSpanFor(last, span.marker);
-	        if (!found) { span.to = startCh; }
-	        else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }
-	      }
-	    }
-	  }
-	  if (last) {
-	    // Fix up .from in last (or move them into first in case of sameLine)
-	    for (var i$1 = 0; i$1 < last.length; ++i$1) {
-	      var span$1 = last[i$1];
-	      if (span$1.to != null) { span$1.to += offset; }
-	      if (span$1.from == null) {
-	        var found$1 = getMarkedSpanFor(first, span$1.marker);
-	        if (!found$1) {
-	          span$1.from = offset;
-	          if (sameLine) { (first || (first = [])).push(span$1); }
-	        }
-	      } else {
-	        span$1.from += offset;
-	        if (sameLine) { (first || (first = [])).push(span$1); }
-	      }
-	    }
-	  }
-	  // Make sure we didn't create any zero-length spans
-	  if (first) { first = clearEmptySpans(first); }
-	  if (last && last != first) { last = clearEmptySpans(last); }
-
-	  var newMarkers = [first];
-	  if (!sameLine) {
-	    // Fill gap with whole-line-spans
-	    var gap = change.text.length - 2, gapMarkers;
-	    if (gap > 0 && first)
-	      { for (var i$2 = 0; i$2 < first.length; ++i$2)
-	        { if (first[i$2].to == null)
-	          { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }
-	    for (var i$3 = 0; i$3 < gap; ++i$3)
-	      { newMarkers.push(gapMarkers); }
-	    newMarkers.push(last);
-	  }
-	  return newMarkers
-	}
-
-	// Remove spans that are empty and don't have a clearWhenEmpty
-	// option of false.
-	function clearEmptySpans(spans) {
-	  for (var i = 0; i < spans.length; ++i) {
-	    var span = spans[i];
-	    if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
-	      { spans.splice(i--, 1); }
-	  }
-	  if (!spans.length) { return null }
-	  return spans
-	}
-
-	// Used to 'clip' out readOnly ranges when making a change.
-	function removeReadOnlyRanges(doc, from, to) {
-	  var markers = null;
-	  doc.iter(from.line, to.line + 1, function (line) {
-	    if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
-	      var mark = line.markedSpans[i].marker;
-	      if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
-	        { (markers || (markers = [])).push(mark); }
-	    } }
-	  });
-	  if (!markers) { return null }
-	  var parts = [{from: from, to: to}];
-	  for (var i = 0; i < markers.length; ++i) {
-	    var mk = markers[i], m = mk.find(0);
-	    for (var j = 0; j < parts.length; ++j) {
-	      var p = parts[j];
-	      if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }
-	      var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);
-	      if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
-	        { newParts.push({from: p.from, to: m.from}); }
-	      if (dto > 0 || !mk.inclusiveRight && !dto)
-	        { newParts.push({from: m.to, to: p.to}); }
-	      parts.splice.apply(parts, newParts);
-	      j += newParts.length - 3;
-	    }
-	  }
-	  return parts
-	}
-
-	// Connect or disconnect spans from a line.
-	function detachMarkedSpans(line) {
-	  var spans = line.markedSpans;
-	  if (!spans) { return }
-	  for (var i = 0; i < spans.length; ++i)
-	    { spans[i].marker.detachLine(line); }
-	  line.markedSpans = null;
-	}
-	function attachMarkedSpans(line, spans) {
-	  if (!spans) { return }
-	  for (var i = 0; i < spans.length; ++i)
-	    { spans[i].marker.attachLine(line); }
-	  line.markedSpans = spans;
-	}
-
-	// Helpers used when computing which overlapping collapsed span
-	// counts as the larger one.
-	function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }
-	function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }
-
-	// Returns a number indicating which of two overlapping collapsed
-	// spans is larger (and thus includes the other). Falls back to
-	// comparing ids when the spans cover exactly the same range.
-	function compareCollapsedMarkers(a, b) {
-	  var lenDiff = a.lines.length - b.lines.length;
-	  if (lenDiff != 0) { return lenDiff }
-	  var aPos = a.find(), bPos = b.find();
-	  var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
-	  if (fromCmp) { return -fromCmp }
-	  var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
-	  if (toCmp) { return toCmp }
-	  return b.id - a.id
-	}
-
-	// Find out whether a line ends or starts in a collapsed span. If
-	// so, return the marker for that span.
-	function collapsedSpanAtSide(line, start) {
-	  var sps = sawCollapsedSpans && line.markedSpans, found;
-	  if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
-	    sp = sps[i];
-	    if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
-	        (!found || compareCollapsedMarkers(found, sp.marker) < 0))
-	      { found = sp.marker; }
-	  } }
-	  return found
-	}
-	function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
-	function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
-
-	// Test whether there exists a collapsed span that partially
-	// overlaps (covers the start or end, but not both) of a new span.
-	// Such overlap is not allowed.
-	function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {
-	  var line = getLine(doc, lineNo$$1);
-	  var sps = sawCollapsedSpans && line.markedSpans;
-	  if (sps) { for (var i = 0; i < sps.length; ++i) {
-	    var sp = sps[i];
-	    if (!sp.marker.collapsed) { continue }
-	    var found = sp.marker.find(0);
-	    var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
-	    var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
-	    if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }
-	    if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
-	        fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
-	      { return true }
-	  } }
-	}
-
-	// A visual line is a line as drawn on the screen. Folding, for
-	// example, can cause multiple logical lines to appear on the same
-	// visual line. This finds the start of the visual line that the
-	// given line is part of (usually that is the line itself).
-	function visualLine(line) {
-	  var merged;
-	  while (merged = collapsedSpanAtStart(line))
-	    { line = merged.find(-1, true).line; }
-	  return line
-	}
-
-	function visualLineEnd(line) {
-	  var merged;
-	  while (merged = collapsedSpanAtEnd(line))
-	    { line = merged.find(1, true).line; }
-	  return line
-	}
-
-	// Returns an array of logical lines that continue the visual line
-	// started by the argument, or undefined if there are no such lines.
-	function visualLineContinued(line) {
-	  var merged, lines;
-	  while (merged = collapsedSpanAtEnd(line)) {
-	    line = merged.find(1, true).line
-	    ;(lines || (lines = [])).push(line);
-	  }
-	  return lines
-	}
-
-	// Get the line number of the start of the visual line that the
-	// given line number is part of.
-	function visualLineNo(doc, lineN) {
-	  var line = getLine(doc, lineN), vis = visualLine(line);
-	  if (line == vis) { return lineN }
-	  return lineNo(vis)
-	}
-
-	// Get the line number of the start of the next visual line after
-	// the given line.
-	function visualLineEndNo(doc, lineN) {
-	  if (lineN > doc.lastLine()) { return lineN }
-	  var line = getLine(doc, lineN), merged;
-	  if (!lineIsHidden(doc, line)) { return lineN }
-	  while (merged = collapsedSpanAtEnd(line))
-	    { line = merged.find(1, true).line; }
-	  return lineNo(line) + 1
-	}
-
-	// Compute whether a line is hidden. Lines count as hidden when they
-	// are part of a visual line that starts with another line, or when
-	// they are entirely covered by collapsed, non-widget span.
-	function lineIsHidden(doc, line) {
-	  var sps = sawCollapsedSpans && line.markedSpans;
-	  if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
-	    sp = sps[i];
-	    if (!sp.marker.collapsed) { continue }
-	    if (sp.from == null) { return true }
-	    if (sp.marker.widgetNode) { continue }
-	    if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
-	      { return true }
-	  } }
-	}
-	function lineIsHiddenInner(doc, line, span) {
-	  if (span.to == null) {
-	    var end = span.marker.find(1, true);
-	    return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))
-	  }
-	  if (span.marker.inclusiveRight && span.to == line.text.length)
-	    { return true }
-	  for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {
-	    sp = line.markedSpans[i];
-	    if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
-	        (sp.to == null || sp.to != span.from) &&
-	        (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
-	        lineIsHiddenInner(doc, line, sp)) { return true }
-	  }
-	}
-
-	// Find the height above the given line.
-	function heightAtLine(lineObj) {
-	  lineObj = visualLine(lineObj);
-
-	  var h = 0, chunk = lineObj.parent;
-	  for (var i = 0; i < chunk.lines.length; ++i) {
-	    var line = chunk.lines[i];
-	    if (line == lineObj) { break }
-	    else { h += line.height; }
-	  }
-	  for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
-	    for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
-	      var cur = p.children[i$1];
-	      if (cur == chunk) { break }
-	      else { h += cur.height; }
-	    }
-	  }
-	  return h
-	}
-
-	// Compute the character length of a line, taking into account
-	// collapsed ranges (see markText) that might hide parts, and join
-	// other lines onto it.
-	function lineLength(line) {
-	  if (line.height == 0) { return 0 }
-	  var len = line.text.length, merged, cur = line;
-	  while (merged = collapsedSpanAtStart(cur)) {
-	    var found = merged.find(0, true);
-	    cur = found.from.line;
-	    len += found.from.ch - found.to.ch;
-	  }
-	  cur = line;
-	  while (merged = collapsedSpanAtEnd(cur)) {
-	    var found$1 = merged.find(0, true);
-	    len -= cur.text.length - found$1.from.ch;
-	    cur = found$1.to.line;
-	    len += cur.text.length - found$1.to.ch;
-	  }
-	  return len
-	}
-
-	// Find the longest line in the document.
-	function findMaxLine(cm) {
-	  var d = cm.display, doc = cm.doc;
-	  d.maxLine = getLine(doc, doc.first);
-	  d.maxLineLength = lineLength(d.maxLine);
-	  d.maxLineChanged = true;
-	  doc.iter(function (line) {
-	    var len = lineLength(line);
-	    if (len > d.maxLineLength) {
-	      d.maxLineLength = len;
-	      d.maxLine = line;
-	    }
-	  });
-	}
-
-	// BIDI HELPERS
-
-	function iterateBidiSections(order, from, to, f) {
-	  if (!order) { return f(from, to, "ltr") }
-	  var found = false;
-	  for (var i = 0; i < order.length; ++i) {
-	    var part = order[i];
-	    if (part.from < to && part.to > from || from == to && part.to == from) {
-	      f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr");
-	      found = true;
-	    }
-	  }
-	  if (!found) { f(from, to, "ltr"); }
-	}
-
-	var bidiOther = null;
-	function getBidiPartAt(order, ch, sticky) {
-	  var found;
-	  bidiOther = null;
-	  for (var i = 0; i < order.length; ++i) {
-	    var cur = order[i];
-	    if (cur.from < ch && cur.to > ch) { return i }
-	    if (cur.to == ch) {
-	      if (cur.from != cur.to && sticky == "before") { found = i; }
-	      else { bidiOther = i; }
-	    }
-	    if (cur.from == ch) {
-	      if (cur.from != cur.to && sticky != "before") { found = i; }
-	      else { bidiOther = i; }
-	    }
-	  }
-	  return found != null ? found : bidiOther
-	}
-
-	// Bidirectional ordering algorithm
-	// See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
-	// that this (partially) implements.
-
-	// One-char codes used for character types:
-	// L (L):   Left-to-Right
-	// R (R):   Right-to-Left
-	// r (AL):  Right-to-Left Arabic
-	// 1 (EN):  European Number
-	// + (ES):  European Number Separator
-	// % (ET):  European Number Terminator
-	// n (AN):  Arabic Number
-	// , (CS):  Common Number Separator
-	// m (NSM): Non-Spacing Mark
-	// b (BN):  Boundary Neutral
-	// s (B):   Paragraph Separator
-	// t (S):   Segment Separator
-	// w (WS):  Whitespace
-	// N (ON):  Other Neutrals
-
-	// Returns null if characters are ordered as they appear
-	// (left-to-right), or an array of sections ({from, to, level}
-	// objects) in the order in which they occur visually.
-	var bidiOrdering = (function() {
-	  // Character types for codepoints 0 to 0xff
-	  var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
-	  // Character types for codepoints 0x600 to 0x6f9
-	  var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
-	  function charType(code) {
-	    if (code <= 0xf7) { return lowTypes.charAt(code) }
-	    else if (0x590 <= code && code <= 0x5f4) { return "R" }
-	    else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }
-	    else if (0x6ee <= code && code <= 0x8ac) { return "r" }
-	    else if (0x2000 <= code && code <= 0x200b) { return "w" }
-	    else if (code == 0x200c) { return "b" }
-	    else { return "L" }
-	  }
-
-	  var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
-	  var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
-
-	  function BidiSpan(level, from, to) {
-	    this.level = level;
-	    this.from = from; this.to = to;
-	  }
-
-	  return function(str, direction) {
-	    var outerType = direction == "ltr" ? "L" : "R";
-
-	    if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false }
-	    var len = str.length, types = [];
-	    for (var i = 0; i < len; ++i)
-	      { types.push(charType(str.charCodeAt(i))); }
-
-	    // W1. Examine each non-spacing mark (NSM) in the level run, and
-	    // change the type of the NSM to the type of the previous
-	    // character. If the NSM is at the start of the level run, it will
-	    // get the type of sor.
-	    for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
-	      var type = types[i$1];
-	      if (type == "m") { types[i$1] = prev; }
-	      else { prev = type; }
-	    }
-
-	    // W2. Search backwards from each instance of a European number
-	    // until the first strong type (R, L, AL, or sor) is found. If an
-	    // AL is found, change the type of the European number to Arabic
-	    // number.
-	    // W3. Change all ALs to R.
-	    for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
-	      var type$1 = types[i$2];
-	      if (type$1 == "1" && cur == "r") { types[i$2] = "n"; }
-	      else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } }
-	    }
-
-	    // W4. A single European separator between two European numbers
-	    // changes to a European number. A single common separator between
-	    // two numbers of the same type changes to that type.
-	    for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
-	      var type$2 = types[i$3];
-	      if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; }
-	      else if (type$2 == "," && prev$1 == types[i$3+1] &&
-	               (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; }
-	      prev$1 = type$2;
-	    }
-
-	    // W5. A sequence of European terminators adjacent to European
-	    // numbers changes to all European numbers.
-	    // W6. Otherwise, separators and terminators change to Other
-	    // Neutral.
-	    for (var i$4 = 0; i$4 < len; ++i$4) {
-	      var type$3 = types[i$4];
-	      if (type$3 == ",") { types[i$4] = "N"; }
-	      else if (type$3 == "%") {
-	        var end = (void 0);
-	        for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}
-	        var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N";
-	        for (var j = i$4; j < end; ++j) { types[j] = replace; }
-	        i$4 = end - 1;
-	      }
-	    }
-
-	    // W7. Search backwards from each instance of a European number
-	    // until the first strong type (R, L, or sor) is found. If an L is
-	    // found, then change the type of the European number to L.
-	    for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
-	      var type$4 = types[i$5];
-	      if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; }
-	      else if (isStrong.test(type$4)) { cur$1 = type$4; }
-	    }
-
-	    // N1. A sequence of neutrals takes the direction of the
-	    // surrounding strong text if the text on both sides has the same
-	    // direction. European and Arabic numbers act as if they were R in
-	    // terms of their influence on neutrals. Start-of-level-run (sor)
-	    // and end-of-level-run (eor) are used at level run boundaries.
-	    // N2. Any remaining neutrals take the embedding direction.
-	    for (var i$6 = 0; i$6 < len; ++i$6) {
-	      if (isNeutral.test(types[i$6])) {
-	        var end$1 = (void 0);
-	        for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}
-	        var before = (i$6 ? types[i$6-1] : outerType) == "L";
-	        var after = (end$1 < len ? types[end$1] : outerType) == "L";
-	        var replace$1 = before == after ? (before ? "L" : "R") : outerType;
-	        for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }
-	        i$6 = end$1 - 1;
-	      }
-	    }
-
-	    // Here we depart from the documented algorithm, in order to avoid
-	    // building up an actual levels array. Since there are only three
-	    // levels (0, 1, 2) in an implementation that doesn't take
-	    // explicit embedding into account, we can build up the order on
-	    // the fly, without following the level-based algorithm.
-	    var order = [], m;
-	    for (var i$7 = 0; i$7 < len;) {
-	      if (countsAsLeft.test(types[i$7])) {
-	        var start = i$7;
-	        for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
-	        order.push(new BidiSpan(0, start, i$7));
-	      } else {
-	        var pos = i$7, at = order.length;
-	        for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
-	        for (var j$2 = pos; j$2 < i$7;) {
-	          if (countsAsNum.test(types[j$2])) {
-	            if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }
-	            var nstart = j$2;
-	            for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
-	            order.splice(at, 0, new BidiSpan(2, nstart, j$2));
-	            pos = j$2;
-	          } else { ++j$2; }
-	        }
-	        if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }
-	      }
-	    }
-	    if (order[0].level == 1 && (m = str.match(/^\s+/))) {
-	      order[0].from = m[0].length;
-	      order.unshift(new BidiSpan(0, 0, m[0].length));
-	    }
-	    if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
-	      lst(order).to -= m[0].length;
-	      order.push(new BidiSpan(0, len - m[0].length, len));
-	    }
-
-	    return direction == "rtl" ? order.reverse() : order
-	  }
-	})();
-
-	// Get the bidi ordering for the given line (and cache it). Returns
-	// false for lines that are fully left-to-right, and an array of
-	// BidiSpan objects otherwise.
-	function getOrder(line, direction) {
-	  var order = line.order;
-	  if (order == null) { order = line.order = bidiOrdering(line.text, direction); }
-	  return order
-	}
-
-	function moveCharLogically(line, ch, dir) {
-	  var target = skipExtendingChars(line.text, ch + dir, dir);
-	  return target < 0 || target > line.text.length ? null : target
-	}
-
-	function moveLogically(line, start, dir) {
-	  var ch = moveCharLogically(line, start.ch, dir);
-	  return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before")
-	}
-
-	function endOfLine(visually, cm, lineObj, lineNo, dir) {
-	  if (visually) {
-	    var order = getOrder(lineObj, cm.doc.direction);
-	    if (order) {
-	      var part = dir < 0 ? lst(order) : order[0];
-	      var moveInStorageOrder = (dir < 0) == (part.level == 1);
-	      var sticky = moveInStorageOrder ? "after" : "before";
-	      var ch;
-	      // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
-	      // it could be that the last bidi part is not on the last visual line,
-	      // since visual lines contain content order-consecutive chunks.
-	      // Thus, in rtl, we are looking for the first (content-order) character
-	      // in the rtl chunk that is on the last line (that is, the same line
-	      // as the last (content-order) character).
-	      if (part.level > 0) {
-	        var prep = prepareMeasureForLine(cm, lineObj);
-	        ch = dir < 0 ? lineObj.text.length - 1 : 0;
-	        var targetTop = measureCharPrepared(cm, prep, ch).top;
-	        ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);
-	        if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1, true); }
-	      } else { ch = dir < 0 ? part.to : part.from; }
-	      return new Pos(lineNo, ch, sticky)
-	    }
-	  }
-	  return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after")
-	}
-
-	function moveVisually(cm, line, start, dir) {
-	  var bidi = getOrder(line, cm.doc.direction);
-	  if (!bidi) { return moveLogically(line, start, dir) }
-	  if (start.ch >= line.text.length) {
-	    start.ch = line.text.length;
-	    start.sticky = "before";
-	  } else if (start.ch <= 0) {
-	    start.ch = 0;
-	    start.sticky = "after";
-	  }
-	  var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];
-	  if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
-	    // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,
-	    // nothing interesting happens.
-	    return moveLogically(line, start, dir)
-	  }
-
-	  var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };
-	  var prep;
-	  var getWrappedLineExtent = function (ch) {
-	    if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }
-	    prep = prep || prepareMeasureForLine(cm, line);
-	    return wrappedLineExtentChar(cm, line, prep, ch)
-	  };
-	  var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);
-
-	  if (cm.doc.direction == "rtl" || part.level == 1) {
-	    var moveInStorageOrder = (part.level == 1) == (dir < 0);
-	    var ch = mv(start, moveInStorageOrder ? 1 : -1);
-	    if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
-	      // Case 2: We move within an rtl part or in an rtl editor on the same visual line
-	      var sticky = moveInStorageOrder ? "before" : "after";
-	      return new Pos(start.line, ch, sticky)
-	    }
-	  }
-
-	  // Case 3: Could not move within this bidi part in this visual line, so leave
-	  // the current bidi part
-
-	  var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {
-	    var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder
-	      ? new Pos(start.line, mv(ch, 1), "before")
-	      : new Pos(start.line, ch, "after"); };
-
-	    for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
-	      var part = bidi[partPos];
-	      var moveInStorageOrder = (dir > 0) == (part.level != 1);
-	      var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);
-	      if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }
-	      ch = moveInStorageOrder ? part.from : mv(part.to, -1);
-	      if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }
-	    }
-	  };
-
-	  // Case 3a: Look for other bidi parts on the same visual line
-	  var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);
-	  if (res) { return res }
-
-	  // Case 3b: Look for other bidi parts on the next visual line
-	  var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);
-	  if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
-	    res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));
-	    if (res) { return res }
-	  }
-
-	  // Case 4: Nowhere to move
-	  return null
-	}
-
-	// EVENT HANDLING
-
-	// Lightweight event framework. on/off also work on DOM nodes,
-	// registering native DOM handlers.
-
-	var noHandlers = [];
-
-	var on = function(emitter, type, f) {
-	  if (emitter.addEventListener) {
-	    emitter.addEventListener(type, f, false);
-	  } else if (emitter.attachEvent) {
-	    emitter.attachEvent("on" + type, f);
-	  } else {
-	    var map$$1 = emitter._handlers || (emitter._handlers = {});
-	    map$$1[type] = (map$$1[type] || noHandlers).concat(f);
-	  }
-	};
-
-	function getHandlers(emitter, type) {
-	  return emitter._handlers && emitter._handlers[type] || noHandlers
-	}
-
-	function off(emitter, type, f) {
-	  if (emitter.removeEventListener) {
-	    emitter.removeEventListener(type, f, false);
-	  } else if (emitter.detachEvent) {
-	    emitter.detachEvent("on" + type, f);
-	  } else {
-	    var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type];
-	    if (arr) {
-	      var index = indexOf(arr, f);
-	      if (index > -1)
-	        { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }
-	    }
-	  }
-	}
-
-	function signal(emitter, type /*, values...*/) {
-	  var handlers = getHandlers(emitter, type);
-	  if (!handlers.length) { return }
-	  var args = Array.prototype.slice.call(arguments, 2);
-	  for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }
-	}
-
-	// The DOM events that CodeMirror handles can be overridden by
-	// registering a (non-DOM) handler on the editor for the event name,
-	// and preventDefault-ing the event in that handler.
-	function signalDOMEvent(cm, e, override) {
-	  if (typeof e == "string")
-	    { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }
-	  signal(cm, override || e.type, cm, e);
-	  return e_defaultPrevented(e) || e.codemirrorIgnore
-	}
-
-	function signalCursorActivity(cm) {
-	  var arr = cm._handlers && cm._handlers.cursorActivity;
-	  if (!arr) { return }
-	  var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);
-	  for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)
-	    { set.push(arr[i]); } }
-	}
-
-	function hasHandler(emitter, type) {
-	  return getHandlers(emitter, type).length > 0
-	}
-
-	// Add on and off methods to a constructor's prototype, to make
-	// registering events on such objects more convenient.
-	function eventMixin(ctor) {
-	  ctor.prototype.on = function(type, f) {on(this, type, f);};
-	  ctor.prototype.off = function(type, f) {off(this, type, f);};
-	}
-
-	// Due to the fact that we still support jurassic IE versions, some
-	// compatibility wrappers are needed.
-
-	function e_preventDefault(e) {
-	  if (e.preventDefault) { e.preventDefault(); }
-	  else { e.returnValue = false; }
-	}
-	function e_stopPropagation(e) {
-	  if (e.stopPropagation) { e.stopPropagation(); }
-	  else { e.cancelBubble = true; }
-	}
-	function e_defaultPrevented(e) {
-	  return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false
-	}
-	function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
-
-	function e_target(e) {return e.target || e.srcElement}
-	function e_button(e) {
-	  var b = e.which;
-	  if (b == null) {
-	    if (e.button & 1) { b = 1; }
-	    else if (e.button & 2) { b = 3; }
-	    else if (e.button & 4) { b = 2; }
-	  }
-	  if (mac && e.ctrlKey && b == 1) { b = 3; }
-	  return b
-	}
-
-	// Detect drag-and-drop
-	var dragAndDrop = function() {
-	  // There is *some* kind of drag-and-drop support in IE6-8, but I
-	  // couldn't get it to work yet.
-	  if (ie && ie_version < 9) { return false }
-	  var div = elt('div');
-	  return "draggable" in div || "dragDrop" in div
-	}();
-
-	var zwspSupported;
-	function zeroWidthElement(measure) {
-	  if (zwspSupported == null) {
-	    var test = elt("span", "\u200b");
-	    removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
-	    if (measure.firstChild.offsetHeight != 0)
-	      { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }
-	  }
-	  var node = zwspSupported ? elt("span", "\u200b") :
-	    elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
-	  node.setAttribute("cm-text", "");
-	  return node
-	}
-
-	// Feature-detect IE's crummy client rect reporting for bidi text
-	var badBidiRects;
-	function hasBadBidiRects(measure) {
-	  if (badBidiRects != null) { return badBidiRects }
-	  var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
-	  var r0 = range(txt, 0, 1).getBoundingClientRect();
-	  var r1 = range(txt, 1, 2).getBoundingClientRect();
-	  removeChildren(measure);
-	  if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)
-	  return badBidiRects = (r1.right - r0.right < 3)
-	}
-
-	// See if "".split is the broken IE version, if so, provide an
-	// alternative way to split lines.
-	var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) {
-	  var pos = 0, result = [], l = string.length;
-	  while (pos <= l) {
-	    var nl = string.indexOf("\n", pos);
-	    if (nl == -1) { nl = string.length; }
-	    var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
-	    var rt = line.indexOf("\r");
-	    if (rt != -1) {
-	      result.push(line.slice(0, rt));
-	      pos += rt + 1;
-	    } else {
-	      result.push(line);
-	      pos = nl + 1;
-	    }
-	  }
-	  return result
-	} : function (string) { return string.split(/\r\n?|\n/); };
-
-	var hasSelection = window.getSelection ? function (te) {
-	  try { return te.selectionStart != te.selectionEnd }
-	  catch(e) { return false }
-	} : function (te) {
-	  var range$$1;
-	  try {range$$1 = te.ownerDocument.selection.createRange();}
-	  catch(e) {}
-	  if (!range$$1 || range$$1.parentElement() != te) { return false }
-	  return range$$1.compareEndPoints("StartToEnd", range$$1) != 0
-	};
-
-	var hasCopyEvent = (function () {
-	  var e = elt("div");
-	  if ("oncopy" in e) { return true }
-	  e.setAttribute("oncopy", "return;");
-	  return typeof e.oncopy == "function"
-	})();
-
-	var badZoomedRects = null;
-	function hasBadZoomedRects(measure) {
-	  if (badZoomedRects != null) { return badZoomedRects }
-	  var node = removeChildrenAndAdd(measure, elt("span", "x"));
-	  var normal = node.getBoundingClientRect();
-	  var fromRange = range(node, 0, 1).getBoundingClientRect();
-	  return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1
-	}
-
-	// Known modes, by name and by MIME
-	var modes = {};
-	var mimeModes = {};
-
-	// Extra arguments are stored as the mode's dependencies, which is
-	// used by (legacy) mechanisms like loadmode.js to automatically
-	// load a mode. (Preferred mechanism is the require/define calls.)
-	function defineMode(name, mode) {
-	  if (arguments.length > 2)
-	    { mode.dependencies = Array.prototype.slice.call(arguments, 2); }
-	  modes[name] = mode;
-	}
-
-	function defineMIME(mime, spec) {
-	  mimeModes[mime] = spec;
-	}
-
-	// Given a MIME type, a {name, ...options} config object, or a name
-	// string, return a mode config object.
-	function resolveMode(spec) {
-	  if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
-	    spec = mimeModes[spec];
-	  } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
-	    var found = mimeModes[spec.name];
-	    if (typeof found == "string") { found = {name: found}; }
-	    spec = createObj(found, spec);
-	    spec.name = found.name;
-	  } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
-	    return resolveMode("application/xml")
-	  } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
-	    return resolveMode("application/json")
-	  }
-	  if (typeof spec == "string") { return {name: spec} }
-	  else { return spec || {name: "null"} }
-	}
-
-	// Given a mode spec (anything that resolveMode accepts), find and
-	// initialize an actual mode object.
-	function getMode(options, spec) {
-	  spec = resolveMode(spec);
-	  var mfactory = modes[spec.name];
-	  if (!mfactory) { return getMode(options, "text/plain") }
-	  var modeObj = mfactory(options, spec);
-	  if (modeExtensions.hasOwnProperty(spec.name)) {
-	    var exts = modeExtensions[spec.name];
-	    for (var prop in exts) {
-	      if (!exts.hasOwnProperty(prop)) { continue }
-	      if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; }
-	      modeObj[prop] = exts[prop];
-	    }
-	  }
-	  modeObj.name = spec.name;
-	  if (spec.helperType) { modeObj.helperType = spec.helperType; }
-	  if (spec.modeProps) { for (var prop$1 in spec.modeProps)
-	    { modeObj[prop$1] = spec.modeProps[prop$1]; } }
-
-	  return modeObj
-	}
-
-	// This can be used to attach properties to mode objects from
-	// outside the actual mode definition.
-	var modeExtensions = {};
-	function extendMode(mode, properties) {
-	  var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
-	  copyObj(properties, exts);
-	}
-
-	function copyState(mode, state) {
-	  if (state === true) { return state }
-	  if (mode.copyState) { return mode.copyState(state) }
-	  var nstate = {};
-	  for (var n in state) {
-	    var val = state[n];
-	    if (val instanceof Array) { val = val.concat([]); }
-	    nstate[n] = val;
-	  }
-	  return nstate
-	}
-
-	// Given a mode and a state (for that mode), find the inner mode and
-	// state at the position that the state refers to.
-	function innerMode(mode, state) {
-	  var info;
-	  while (mode.innerMode) {
-	    info = mode.innerMode(state);
-	    if (!info || info.mode == mode) { break }
-	    state = info.state;
-	    mode = info.mode;
-	  }
-	  return info || {mode: mode, state: state}
-	}
-
-	function startState(mode, a1, a2) {
-	  return mode.startState ? mode.startState(a1, a2) : true
-	}
-
-	// STRING STREAM
-
-	// Fed to the mode parsers, provides helper functions to make
-	// parsers more succinct.
-
-	var StringStream = function(string, tabSize) {
-	  this.pos = this.start = 0;
-	  this.string = string;
-	  this.tabSize = tabSize || 8;
-	  this.lastColumnPos = this.lastColumnValue = 0;
-	  this.lineStart = 0;
-	};
-
-	StringStream.prototype.eol = function () {return this.pos >= this.string.length};
-	StringStream.prototype.sol = function () {return this.pos == this.lineStart};
-	StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};
-	StringStream.prototype.next = function () {
-	  if (this.pos < this.string.length)
-	    { return this.string.charAt(this.pos++) }
-	};
-	StringStream.prototype.eat = function (match) {
-	  var ch = this.string.charAt(this.pos);
-	  var ok;
-	  if (typeof match == "string") { ok = ch == match; }
-	  else { ok = ch && (match.test ? match.test(ch) : match(ch)); }
-	  if (ok) {++this.pos; return ch}
-	};
-	StringStream.prototype.eatWhile = function (match) {
-	  var start = this.pos;
-	  while (this.eat(match)){}
-	  return this.pos > start
-	};
-	StringStream.prototype.eatSpace = function () {
-	    var this$1 = this;
-
-	  var start = this.pos;
-	  while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; }
-	  return this.pos > start
-	};
-	StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};
-	StringStream.prototype.skipTo = function (ch) {
-	  var found = this.string.indexOf(ch, this.pos);
-	  if (found > -1) {this.pos = found; return true}
-	};
-	StringStream.prototype.backUp = function (n) {this.pos -= n;};
-	StringStream.prototype.column = function () {
-	  if (this.lastColumnPos < this.start) {
-	    this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
-	    this.lastColumnPos = this.start;
-	  }
-	  return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
-	};
-	StringStream.prototype.indentation = function () {
-	  return countColumn(this.string, null, this.tabSize) -
-	    (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
-	};
-	StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
-	  if (typeof pattern == "string") {
-	    var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };
-	    var substr = this.string.substr(this.pos, pattern.length);
-	    if (cased(substr) == cased(pattern)) {
-	      if (consume !== false) { this.pos += pattern.length; }
-	      return true
-	    }
-	  } else {
-	    var match = this.string.slice(this.pos).match(pattern);
-	    if (match && match.index > 0) { return null }
-	    if (match && consume !== false) { this.pos += match[0].length; }
-	    return match
-	  }
-	};
-	StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};
-	StringStream.prototype.hideFirstChars = function (n, inner) {
-	  this.lineStart += n;
-	  try { return inner() }
-	  finally { this.lineStart -= n; }
-	};
-
-	// Compute a style array (an array starting with a mode generation
-	// -- for invalidation -- followed by pairs of end positions and
-	// style strings), which is used to highlight the tokens on the
-	// line.
-	function highlightLine(cm, line, state, forceToEnd) {
-	  // A styles array always starts with a number identifying the
-	  // mode/overlays that it is based on (for easy invalidation).
-	  var st = [cm.state.modeGen], lineClasses = {};
-	  // Compute the base array of styles
-	  runMode(cm, line.text, cm.doc.mode, state, function (end, style) { return st.push(end, style); },
-	    lineClasses, forceToEnd);
-
-	  // Run overlays, adjust style array.
-	  var loop = function ( o ) {
-	    var overlay = cm.state.overlays[o], i = 1, at = 0;
-	    runMode(cm, line.text, overlay.mode, true, function (end, style) {
-	      var start = i;
-	      // Ensure there's a token end at the current position, and that i points at it
-	      while (at < end) {
-	        var i_end = st[i];
-	        if (i_end > end)
-	          { st.splice(i, 1, end, st[i+1], i_end); }
-	        i += 2;
-	        at = Math.min(end, i_end);
-	      }
-	      if (!style) { return }
-	      if (overlay.opaque) {
-	        st.splice(start, i - start, end, "overlay " + style);
-	        i = start + 2;
-	      } else {
-	        for (; start < i; start += 2) {
-	          var cur = st[start+1];
-	          st[start+1] = (cur ? cur + " " : "") + "overlay " + style;
-	        }
-	      }
-	    }, lineClasses);
-	  };
-
-	  for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );
-
-	  return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}
-	}
-
-	function getLineStyles(cm, line, updateFrontier) {
-	  if (!line.styles || line.styles[0] != cm.state.modeGen) {
-	    var state = getStateBefore(cm, lineNo(line));
-	    var result = highlightLine(cm, line, line.text.length > cm.options.maxHighlightLength ? copyState(cm.doc.mode, state) : state);
-	    line.stateAfter = state;
-	    line.styles = result.styles;
-	    if (result.classes) { line.styleClasses = result.classes; }
-	    else if (line.styleClasses) { line.styleClasses = null; }
-	    if (updateFrontier === cm.doc.frontier) { cm.doc.frontier++; }
-	  }
-	  return line.styles
-	}
-
-	function getStateBefore(cm, n, precise) {
-	  var doc = cm.doc, display = cm.display;
-	  if (!doc.mode.startState) { return true }
-	  var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;
-	  if (!state) { state = startState(doc.mode); }
-	  else { state = copyState(doc.mode, state); }
-	  doc.iter(pos, n, function (line) {
-	    processLine(cm, line.text, state);
-	    var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo;
-	    line.stateAfter = save ? copyState(doc.mode, state) : null;
-	    ++pos;
-	  });
-	  if (precise) { doc.frontier = pos; }
-	  return state
-	}
-
-	// Lightweight form of highlight -- proceed over this line and
-	// update state, but don't save a style array. Used for lines that
-	// aren't currently visible.
-	function processLine(cm, text, state, startAt) {
-	  var mode = cm.doc.mode;
-	  var stream = new StringStream(text, cm.options.tabSize);
-	  stream.start = stream.pos = startAt || 0;
-	  if (text == "") { callBlankLine(mode, state); }
-	  while (!stream.eol()) {
-	    readToken(mode, stream, state);
-	    stream.start = stream.pos;
-	  }
-	}
-
-	function callBlankLine(mode, state) {
-	  if (mode.blankLine) { return mode.blankLine(state) }
-	  if (!mode.innerMode) { return }
-	  var inner = innerMode(mode, state);
-	  if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }
-	}
-
-	function readToken(mode, stream, state, inner) {
-	  for (var i = 0; i < 10; i++) {
-	    if (inner) { inner[0] = innerMode(mode, state).mode; }
-	    var style = mode.token(stream, state);
-	    if (stream.pos > stream.start) { return style }
-	  }
-	  throw new Error("Mode " + mode.name + " failed to advance stream.")
-	}
-
-	// Utility for getTokenAt and getLineTokens
-	function takeToken(cm, pos, precise, asArray) {
-	  var getObj = function (copy) { return ({
-	    start: stream.start, end: stream.pos,
-	    string: stream.current(),
-	    type: style || null,
-	    state: copy ? copyState(doc.mode, state) : state
-	  }); };
-
-	  var doc = cm.doc, mode = doc.mode, style;
-	  pos = clipPos(doc, pos);
-	  var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);
-	  var stream = new StringStream(line.text, cm.options.tabSize), tokens;
-	  if (asArray) { tokens = []; }
-	  while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
-	    stream.start = stream.pos;
-	    style = readToken(mode, stream, state);
-	    if (asArray) { tokens.push(getObj(true)); }
-	  }
-	  return asArray ? tokens : getObj()
-	}
-
-	function extractLineClasses(type, output) {
-	  if (type) { for (;;) {
-	    var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);
-	    if (!lineClass) { break }
-	    type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
-	    var prop = lineClass[1] ? "bgClass" : "textClass";
-	    if (output[prop] == null)
-	      { output[prop] = lineClass[2]; }
-	    else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop]))
-	      { output[prop] += " " + lineClass[2]; }
-	  } }
-	  return type
-	}
-
-	// Run the given mode's parser over a line, calling f for each token.
-	function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {
-	  var flattenSpans = mode.flattenSpans;
-	  if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }
-	  var curStart = 0, curStyle = null;
-	  var stream = new StringStream(text, cm.options.tabSize), style;
-	  var inner = cm.options.addModeClass && [null];
-	  if (text == "") { extractLineClasses(callBlankLine(mode, state), lineClasses); }
-	  while (!stream.eol()) {
-	    if (stream.pos > cm.options.maxHighlightLength) {
-	      flattenSpans = false;
-	      if (forceToEnd) { processLine(cm, text, state, stream.pos); }
-	      stream.pos = text.length;
-	      style = null;
-	    } else {
-	      style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);
-	    }
-	    if (inner) {
-	      var mName = inner[0].name;
-	      if (mName) { style = "m-" + (style ? mName + " " + style : mName); }
-	    }
-	    if (!flattenSpans || curStyle != style) {
-	      while (curStart < stream.start) {
-	        curStart = Math.min(stream.start, curStart + 5000);
-	        f(curStart, curStyle);
-	      }
-	      curStyle = style;
-	    }
-	    stream.start = stream.pos;
-	  }
-	  while (curStart < stream.pos) {
-	    // Webkit seems to refuse to render text nodes longer than 57444
-	    // characters, and returns inaccurate measurements in nodes
-	    // starting around 5000 chars.
-	    var pos = Math.min(stream.pos, curStart + 5000);
-	    f(pos, curStyle);
-	    curStart = pos;
-	  }
-	}
-
-	// Finds the line to start with when starting a parse. Tries to
-	// find a line with a stateAfter, so that it can start with a
-	// valid state. If that fails, it returns the line with the
-	// smallest indentation, which tends to need the least context to
-	// parse correctly.
-	function findStartLine(cm, n, precise) {
-	  var minindent, minline, doc = cm.doc;
-	  var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
-	  for (var search = n; search > lim; --search) {
-	    if (search <= doc.first) { return doc.first }
-	    var line = getLine(doc, search - 1);
-	    if (line.stateAfter && (!precise || search <= doc.frontier)) { return search }
-	    var indented = countColumn(line.text, null, cm.options.tabSize);
-	    if (minline == null || minindent > indented) {
-	      minline = search - 1;
-	      minindent = indented;
-	    }
-	  }
-	  return minline
-	}
-
-	// LINE DATA STRUCTURE
-
-	// Line objects. These hold state related to a line, including
-	// highlighting info (the styles array).
-	var Line = function(text, markedSpans, estimateHeight) {
-	  this.text = text;
-	  attachMarkedSpans(this, markedSpans);
-	  this.height = estimateHeight ? estimateHeight(this) : 1;
-	};
-
-	Line.prototype.lineNo = function () { return lineNo(this) };
-	eventMixin(Line);
-
-	// Change the content (text, markers) of a line. Automatically
-	// invalidates cached information and tries to re-estimate the
-	// line's height.
-	function updateLine(line, text, markedSpans, estimateHeight) {
-	  line.text = text;
-	  if (line.stateAfter) { line.stateAfter = null; }
-	  if (line.styles) { line.styles = null; }
-	  if (line.order != null) { line.order = null; }
-	  detachMarkedSpans(line);
-	  attachMarkedSpans(line, markedSpans);
-	  var estHeight = estimateHeight ? estimateHeight(line) : 1;
-	  if (estHeight != line.height) { updateLineHeight(line, estHeight); }
-	}
-
-	// Detach a line from the document tree and its markers.
-	function cleanUpLine(line) {
-	  line.parent = null;
-	  detachMarkedSpans(line);
-	}
-
-	// Convert a style as returned by a mode (either null, or a string
-	// containing one or more styles) to a CSS style. This is cached,
-	// and also looks for line-wide styles.
-	var styleToClassCache = {};
-	var styleToClassCacheWithMode = {};
-	function interpretTokenStyle(style, options) {
-	  if (!style || /^\s*$/.test(style)) { return null }
-	  var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
-	  return cache[style] ||
-	    (cache[style] = style.replace(/\S+/g, "cm-$&"))
-	}
-
-	// Render the DOM representation of the text of a line. Also builds
-	// up a 'line map', which points at the DOM nodes that represent
-	// specific stretches of text, and is used by the measuring code.
-	// The returned object contains the DOM node, this map, and
-	// information about line-wide styles that were set by the mode.
-	function buildLineContent(cm, lineView) {
-	  // The padding-right forces the element to have a 'border', which
-	  // is needed on Webkit to be able to get line-level bounding
-	  // rectangles for it (in measureChar).
-	  var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);
-	  var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content,
-	                 col: 0, pos: 0, cm: cm,
-	                 trailingSpace: false,
-	                 splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")};
-	  lineView.measure = {};
-
-	  // Iterate over the logical lines that make up this visual line.
-	  for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
-	    var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);
-	    builder.pos = 0;
-	    builder.addToken = buildToken;
-	    // Optionally wire in some hacks into the token-rendering
-	    // algorithm, to deal with browser quirks.
-	    if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))
-	      { builder.addToken = buildTokenBadBidi(builder.addToken, order); }
-	    builder.map = [];
-	    var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
-	    insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));
-	    if (line.styleClasses) {
-	      if (line.styleClasses.bgClass)
-	        { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); }
-	      if (line.styleClasses.textClass)
-	        { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); }
-	    }
-
-	    // Ensure at least a single node is present, for measuring.
-	    if (builder.map.length == 0)
-	      { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }
-
-	    // Store the map and a cache object for the current logical line
-	    if (i == 0) {
-	      lineView.measure.map = builder.map;
-	      lineView.measure.cache = {};
-	    } else {
-	      (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)
-	      ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});
-	    }
-	  }
-
-	  // See issue #2901
-	  if (webkit) {
-	    var last = builder.content.lastChild;
-	    if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))
-	      { builder.content.className = "cm-tab-wrap-hack"; }
-	  }
-
-	  signal(cm, "renderLine", cm, lineView.line, builder.pre);
-	  if (builder.pre.className)
-	    { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); }
-
-	  return builder
-	}
-
-	function defaultSpecialCharPlaceholder(ch) {
-	  var token = elt("span", "\u2022", "cm-invalidchar");
-	  token.title = "\\u" + ch.charCodeAt(0).toString(16);
-	  token.setAttribute("aria-label", token.title);
-	  return token
-	}
-
-	// Build up the DOM representation for a single token, and add it to
-	// the line map. Takes care to render special characters separately.
-	function buildToken(builder, text, style, startStyle, endStyle, title, css) {
-	  if (!text) { return }
-	  var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;
-	  var special = builder.cm.state.specialChars, mustWrap = false;
-	  var content;
-	  if (!special.test(text)) {
-	    builder.col += text.length;
-	    content = document.createTextNode(displayText);
-	    builder.map.push(builder.pos, builder.pos + text.length, content);
-	    if (ie && ie_version < 9) { mustWrap = true; }
-	    builder.pos += text.length;
-	  } else {
-	    content = document.createDocumentFragment();
-	    var pos = 0;
-	    while (true) {
-	      special.lastIndex = pos;
-	      var m = special.exec(text);
-	      var skipped = m ? m.index - pos : text.length - pos;
-	      if (skipped) {
-	        var txt = document.createTextNode(displayText.slice(pos, pos + skipped));
-	        if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); }
-	        else { content.appendChild(txt); }
-	        builder.map.push(builder.pos, builder.pos + skipped, txt);
-	        builder.col += skipped;
-	        builder.pos += skipped;
-	      }
-	      if (!m) { break }
-	      pos += skipped + 1;
-	      var txt$1 = (void 0);
-	      if (m[0] == "\t") {
-	        var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
-	        txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
-	        txt$1.setAttribute("role", "presentation");
-	        txt$1.setAttribute("cm-text", "\t");
-	        builder.col += tabWidth;
-	      } else if (m[0] == "\r" || m[0] == "\n") {
-	        txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar"));
-	        txt$1.setAttribute("cm-text", m[0]);
-	        builder.col += 1;
-	      } else {
-	        txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);
-	        txt$1.setAttribute("cm-text", m[0]);
-	        if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); }
-	        else { content.appendChild(txt$1); }
-	        builder.col += 1;
-	      }
-	      builder.map.push(builder.pos, builder.pos + 1, txt$1);
-	      builder.pos++;
-	    }
-	  }
-	  builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;
-	  if (style || startStyle || endStyle || mustWrap || css) {
-	    var fullStyle = style || "";
-	    if (startStyle) { fullStyle += startStyle; }
-	    if (endStyle) { fullStyle += endStyle; }
-	    var token = elt("span", [content], fullStyle, css);
-	    if (title) { token.title = title; }
-	    return builder.content.appendChild(token)
-	  }
-	  builder.content.appendChild(content);
-	}
-
-	function splitSpaces(text, trailingBefore) {
-	  if (text.length > 1 && !/  /.test(text)) { return text }
-	  var spaceBefore = trailingBefore, result = "";
-	  for (var i = 0; i < text.length; i++) {
-	    var ch = text.charAt(i);
-	    if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))
-	      { ch = "\u00a0"; }
-	    result += ch;
-	    spaceBefore = ch == " ";
-	  }
-	  return result
-	}
-
-	// Work around nonsense dimensions being reported for stretches of
-	// right-to-left text.
-	function buildTokenBadBidi(inner, order) {
-	  return function (builder, text, style, startStyle, endStyle, title, css) {
-	    style = style ? style + " cm-force-border" : "cm-force-border";
-	    var start = builder.pos, end = start + text.length;
-	    for (;;) {
-	      // Find the part that overlaps with the start of this text
-	      var part = (void 0);
-	      for (var i = 0; i < order.length; i++) {
-	        part = order[i];
-	        if (part.to > start && part.from <= start) { break }
-	      }
-	      if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, title, css) }
-	      inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);
-	      startStyle = null;
-	      text = text.slice(part.to - start);
-	      start = part.to;
-	    }
-	  }
-	}
-
-	function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
-	  var widget = !ignoreWidget && marker.widgetNode;
-	  if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }
-	  if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
-	    if (!widget)
-	      { widget = builder.content.appendChild(document.createElement("span")); }
-	    widget.setAttribute("cm-marker", marker.id);
-	  }
-	  if (widget) {
-	    builder.cm.display.input.setUneditable(widget);
-	    builder.content.appendChild(widget);
-	  }
-	  builder.pos += size;
-	  builder.trailingSpace = false;
-	}
-
-	// Outputs a number of spans to make up a line, taking highlighting
-	// and marked text into account.
-	function insertLineContent(line, builder, styles) {
-	  var spans = line.markedSpans, allText = line.text, at = 0;
-	  if (!spans) {
-	    for (var i$1 = 1; i$1 < styles.length; i$1+=2)
-	      { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }
-	    return
-	  }
-
-	  var len = allText.length, pos = 0, i = 1, text = "", style, css;
-	  var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;
-	  for (;;) {
-	    if (nextChange == pos) { // Update current marker set
-	      spanStyle = spanEndStyle = spanStartStyle = title = css = "";
-	      collapsed = null; nextChange = Infinity;
-	      var foundBookmarks = [], endStyles = (void 0);
-	      for (var j = 0; j < spans.length; ++j) {
-	        var sp = spans[j], m = sp.marker;
-	        if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
-	          foundBookmarks.push(m);
-	        } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
-	          if (sp.to != null && sp.to != pos && nextChange > sp.to) {
-	            nextChange = sp.to;
-	            spanEndStyle = "";
-	          }
-	          if (m.className) { spanStyle += " " + m.className; }
-	          if (m.css) { css = (css ? css + ";" : "") + m.css; }
-	          if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; }
-	          if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }
-	          if (m.title && !title) { title = m.title; }
-	          if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
-	            { collapsed = sp; }
-	        } else if (sp.from > pos && nextChange > sp.from) {
-	          nextChange = sp.from;
-	        }
-	      }
-	      if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)
-	        { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } }
-
-	      if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)
-	        { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }
-	      if (collapsed && (collapsed.from || 0) == pos) {
-	        buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
-	                           collapsed.marker, collapsed.from == null);
-	        if (collapsed.to == null) { return }
-	        if (collapsed.to == pos) { collapsed = false; }
-	      }
-	    }
-	    if (pos >= len) { break }
-
-	    var upto = Math.min(len, nextChange);
-	    while (true) {
-	      if (text) {
-	        var end = pos + text.length;
-	        if (!collapsed) {
-	          var tokenText = end > upto ? text.slice(0, upto - pos) : text;
-	          builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
-	                           spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css);
-	        }
-	        if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}
-	        pos = end;
-	        spanStartStyle = "";
-	      }
-	      text = allText.slice(at, at = styles[i++]);
-	      style = interpretTokenStyle(styles[i++], builder.cm.options);
-	    }
-	  }
-	}
-
-
-	// These objects are used to represent the visible (currently drawn)
-	// part of the document. A LineView may correspond to multiple
-	// logical lines, if those are connected by collapsed ranges.
-	function LineView(doc, line, lineN) {
-	  // The starting line
-	  this.line = line;
-	  // Continuing lines, if any
-	  this.rest = visualLineContinued(line);
-	  // Number of logical lines in this visual line
-	  this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
-	  this.node = this.text = null;
-	  this.hidden = lineIsHidden(doc, line);
-	}
-
-	// Create a range of LineView objects for the given lines.
-	function buildViewArray(cm, from, to) {
-	  var array = [], nextPos;
-	  for (var pos = from; pos < to; pos = nextPos) {
-	    var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
-	    nextPos = pos + view.size;
-	    array.push(view);
-	  }
-	  return array
-	}
-
-	var operationGroup = null;
-
-	function pushOperation(op) {
-	  if (operationGroup) {
-	    operationGroup.ops.push(op);
-	  } else {
-	    op.ownsGroup = operationGroup = {
-	      ops: [op],
-	      delayedCallbacks: []
-	    };
-	  }
-	}
-
-	function fireCallbacksForOps(group) {
-	  // Calls delayed callbacks and cursorActivity handlers until no
-	  // new ones appear
-	  var callbacks = group.delayedCallbacks, i = 0;
-	  do {
-	    for (; i < callbacks.length; i++)
-	      { callbacks[i].call(null); }
-	    for (var j = 0; j < group.ops.length; j++) {
-	      var op = group.ops[j];
-	      if (op.cursorActivityHandlers)
-	        { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)
-	          { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }
-	    }
-	  } while (i < callbacks.length)
-	}
-
-	function finishOperation(op, endCb) {
-	  var group = op.ownsGroup;
-	  if (!group) { return }
-
-	  try { fireCallbacksForOps(group); }
-	  finally {
-	    operationGroup = null;
-	    endCb(group);
-	  }
-	}
-
-	var orphanDelayedCallbacks = null;
-
-	// Often, we want to signal events at a point where we are in the
-	// middle of some work, but don't want the handler to start calling
-	// other methods on the editor, which might be in an inconsistent
-	// state or simply not expect any other events to happen.
-	// signalLater looks whether there are any handlers, and schedules
-	// them to be executed when the last operation ends, or, if no
-	// operation is active, when a timeout fires.
-	function signalLater(emitter, type /*, values...*/) {
-	  var arr = getHandlers(emitter, type);
-	  if (!arr.length) { return }
-	  var args = Array.prototype.slice.call(arguments, 2), list;
-	  if (operationGroup) {
-	    list = operationGroup.delayedCallbacks;
-	  } else if (orphanDelayedCallbacks) {
-	    list = orphanDelayedCallbacks;
-	  } else {
-	    list = orphanDelayedCallbacks = [];
-	    setTimeout(fireOrphanDelayed, 0);
-	  }
-	  var loop = function ( i ) {
-	    list.push(function () { return arr[i].apply(null, args); });
-	  };
-
-	  for (var i = 0; i < arr.length; ++i)
-	    loop( i );
-	}
-
-	function fireOrphanDelayed() {
-	  var delayed = orphanDelayedCallbacks;
-	  orphanDelayedCallbacks = null;
-	  for (var i = 0; i < delayed.length; ++i) { delayed[i](); }
-	}
-
-	// When an aspect of a line changes, a string is added to
-	// lineView.changes. This updates the relevant part of the line's
-	// DOM structure.
-	function updateLineForChanges(cm, lineView, lineN, dims) {
-	  for (var j = 0; j < lineView.changes.length; j++) {
-	    var type = lineView.changes[j];
-	    if (type == "text") { updateLineText(cm, lineView); }
-	    else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); }
-	    else if (type == "class") { updateLineClasses(cm, lineView); }
-	    else if (type == "widget") { updateLineWidgets(cm, lineView, dims); }
-	  }
-	  lineView.changes = null;
-	}
-
-	// Lines with gutter elements, widgets or a background class need to
-	// be wrapped, and have the extra elements added to the wrapper div
-	function ensureLineWrapped(lineView) {
-	  if (lineView.node == lineView.text) {
-	    lineView.node = elt("div", null, null, "position: relative");
-	    if (lineView.text.parentNode)
-	      { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }
-	    lineView.node.appendChild(lineView.text);
-	    if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }
-	  }
-	  return lineView.node
-	}
-
-	function updateLineBackground(cm, lineView) {
-	  var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
-	  if (cls) { cls += " CodeMirror-linebackground"; }
-	  if (lineView.background) {
-	    if (cls) { lineView.background.className = cls; }
-	    else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
-	  } else if (cls) {
-	    var wrap = ensureLineWrapped(lineView);
-	    lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
-	    cm.display.input.setUneditable(lineView.background);
-	  }
-	}
-
-	// Wrapper around buildLineContent which will reuse the structure
-	// in display.externalMeasured when possible.
-	function getLineContent(cm, lineView) {
-	  var ext = cm.display.externalMeasured;
-	  if (ext && ext.line == lineView.line) {
-	    cm.display.externalMeasured = null;
-	    lineView.measure = ext.measure;
-	    return ext.built
-	  }
-	  return buildLineContent(cm, lineView)
-	}
-
-	// Redraw the line's text. Interacts with the background and text
-	// classes because the mode may output tokens that influence these
-	// classes.
-	function updateLineText(cm, lineView) {
-	  var cls = lineView.text.className;
-	  var built = getLineContent(cm, lineView);
-	  if (lineView.text == lineView.node) { lineView.node = built.pre; }
-	  lineView.text.parentNode.replaceChild(built.pre, lineView.text);
-	  lineView.text = built.pre;
-	  if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
-	    lineView.bgClass = built.bgClass;
-	    lineView.textClass = built.textClass;
-	    updateLineClasses(cm, lineView);
-	  } else if (cls) {
-	    lineView.text.className = cls;
-	  }
-	}
-
-	function updateLineClasses(cm, lineView) {
-	  updateLineBackground(cm, lineView);
-	  if (lineView.line.wrapClass)
-	    { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }
-	  else if (lineView.node != lineView.text)
-	    { lineView.node.className = ""; }
-	  var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
-	  lineView.text.className = textClass || "";
-	}
-
-	function updateLineGutter(cm, lineView, lineN, dims) {
-	  if (lineView.gutter) {
-	    lineView.node.removeChild(lineView.gutter);
-	    lineView.gutter = null;
-	  }
-	  if (lineView.gutterBackground) {
-	    lineView.node.removeChild(lineView.gutterBackground);
-	    lineView.gutterBackground = null;
-	  }
-	  if (lineView.line.gutterClass) {
-	    var wrap = ensureLineWrapped(lineView);
-	    lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
-	                                    ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px"));
-	    cm.display.input.setUneditable(lineView.gutterBackground);
-	    wrap.insertBefore(lineView.gutterBackground, lineView.text);
-	  }
-	  var markers = lineView.line.gutterMarkers;
-	  if (cm.options.lineNumbers || markers) {
-	    var wrap$1 = ensureLineWrapped(lineView);
-	    var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));
-	    cm.display.input.setUneditable(gutterWrap);
-	    wrap$1.insertBefore(gutterWrap, lineView.text);
-	    if (lineView.line.gutterClass)
-	      { gutterWrap.className += " " + lineView.line.gutterClass; }
-	    if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
-	      { lineView.lineNumber = gutterWrap.appendChild(
-	        elt("div", lineNumberFor(cm.options, lineN),
-	            "CodeMirror-linenumber CodeMirror-gutter-elt",
-	            ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); }
-	    if (markers) { for (var k = 0; k < cm.options.gutters.length; ++k) {
-	      var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];
-	      if (found)
-	        { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt",
-	                                   ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); }
-	    } }
-	  }
-	}
-
-	function updateLineWidgets(cm, lineView, dims) {
-	  if (lineView.alignable) { lineView.alignable = null; }
-	  for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {
-	    next = node.nextSibling;
-	    if (node.className == "CodeMirror-linewidget")
-	      { lineView.node.removeChild(node); }
-	  }
-	  insertLineWidgets(cm, lineView, dims);
-	}
-
-	// Build a line's DOM representation from scratch
-	function buildLineElement(cm, lineView, lineN, dims) {
-	  var built = getLineContent(cm, lineView);
-	  lineView.text = lineView.node = built.pre;
-	  if (built.bgClass) { lineView.bgClass = built.bgClass; }
-	  if (built.textClass) { lineView.textClass = built.textClass; }
-
-	  updateLineClasses(cm, lineView);
-	  updateLineGutter(cm, lineView, lineN, dims);
-	  insertLineWidgets(cm, lineView, dims);
-	  return lineView.node
-	}
-
-	// A lineView may contain multiple logical lines (when merged by
-	// collapse