aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/storage
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-13 09:49:11 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-13 09:49:11 +0000
commite44a7e37b6c7b5961adaffc62b9042b8d442938e (patch)
tree95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojox/storage
parenta62b9742ee5e28bcec6872d88f50f25b820914f6 (diff)
downloadsemanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz
semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/storage')
-rw-r--r--includes/js/dojox/storage/AirDBStorageProvider.js252
-rw-r--r--includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js221
-rw-r--r--includes/js/dojox/storage/AirFileStorageProvider.js232
-rw-r--r--includes/js/dojox/storage/FlashStorageProvider.js346
-rw-r--r--includes/js/dojox/storage/GearsStorageProvider.js320
-rw-r--r--includes/js/dojox/storage/Provider.js331
-rw-r--r--includes/js/dojox/storage/README76
-rw-r--r--includes/js/dojox/storage/Storage.as399
-rw-r--r--includes/js/dojox/storage/Storage.swfbin0 -> 3256 bytes
-rw-r--r--includes/js/dojox/storage/WhatWGStorageProvider.js278
-rw-r--r--includes/js/dojox/storage/_common.js20
-rw-r--r--includes/js/dojox/storage/buildFlashStorage.sh4
-rw-r--r--includes/js/dojox/storage/demos/helloworld.html90
-rw-r--r--includes/js/dojox/storage/manager.js261
-rw-r--r--includes/js/dojox/storage/storage_dialog.flabin0 -> 344064 bytes
-rw-r--r--includes/js/dojox/storage/tests/resources/testBook.txt7104
-rw-r--r--includes/js/dojox/storage/tests/resources/testXML.xml203
-rw-r--r--includes/js/dojox/storage/tests/test_storage.html189
-rw-r--r--includes/js/dojox/storage/tests/test_storage.js493
19 files changed, 10819 insertions, 0 deletions
diff --git a/includes/js/dojox/storage/AirDBStorageProvider.js b/includes/js/dojox/storage/AirDBStorageProvider.js
new file mode 100644
index 0000000..a846b94
--- /dev/null
+++ b/includes/js/dojox/storage/AirDBStorageProvider.js
@@ -0,0 +1,252 @@
+if(!dojo._hasResource["dojox.storage.AirDBStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage.AirDBStorageProvider"] = true;
+dojo.provide("dojox.storage.AirDBStorageProvider");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.storage.Provider");
+
+if (dojo.isAIR) {
+ (function(){
+
+ if (!air) {
+ var air = {};
+ }
+ air.File = window.runtime.flash.filesystem.File;
+ air.SQLConnection = window.runtime.flash.data.SQLConnection;
+ air.SQLStatement = window.runtime.flash.data.SQLStatement;
+
+ // summary:
+ // Storage provider that uses features in the Adobe AIR runtime to achieve
+ // permanent storage
+ dojo.declare("dojox.storage.AirDBStorageProvider", [ dojox.storage.Provider ], {
+ DATABASE_FILE: "dojo.db",
+ TABLE_NAME: "__DOJO_STORAGE",
+ initialized: false,
+
+ _db: null,
+
+ initialize: function(){
+ this.initialized = false;
+
+ // need to initialize our storage database
+ try{
+ this._db = new air.SQLConnection();
+ this._db.open(air.File.applicationStorageDirectory.resolvePath(this.DATABASE_FILE));
+
+ this._sql("CREATE TABLE IF NOT EXISTS " + this.TABLE_NAME + "(namespace TEXT, key TEXT, value TEXT)");
+ this._sql("CREATE UNIQUE INDEX IF NOT EXISTS namespace_key_index ON " + this.TABLE_NAME + " (namespace, key)");
+
+ this.initialized = true;
+ }catch(e){
+ console.debug("dojox.storage.AirDBStorageProvider.initialize:", e);
+ }
+
+ // indicate that this storage provider is now loaded
+ dojox.storage.manager.loaded();
+ },
+
+ _sql: function(query, params){
+ var stmt = new air.SQLStatement();
+ stmt.sqlConnection = this._db;
+ stmt.text = query;
+ if (params){
+ for (var param in params){
+ stmt.parameters[param] = params[param];
+ }
+ }
+ stmt.execute();
+ return stmt.getResult();
+ },
+
+ _beginTransaction: function(){
+ this._db.begin();
+ },
+
+ _commitTransaction: function(){
+ this._db.commit();
+ },
+
+ isAvailable: function(){
+ return true;
+ },
+
+ put: function(key, value, resultsHandler, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ // try to store the value
+ try{
+ this._sql("DELETE FROM " + this.TABLE_NAME + " WHERE namespace = :namespace AND key = :key",
+ { ":namespace":namespace, ":key":key });
+ this._sql("INSERT INTO " + this.TABLE_NAME + " VALUES (:namespace, :key, :value)",
+ { ":namespace":namespace, ":key":key, ":value":value });
+ }catch(e){
+ // indicate we failed
+ console.debug("dojox.storage.AirDBStorageProvider.put:", e);
+ resultsHandler(this.FAILED, key, e.toString());
+ return;
+ }
+
+ if(resultsHandler){
+ resultsHandler(this.SUCCESS, key, null);
+ }
+ },
+
+ get: function(key, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ var results = this._sql("SELECT * FROM " + this.TABLE_NAME + " WHERE namespace = :namespace AND key = :key",
+ { ":namespace":namespace, ":key":key });
+
+ if(results.data && results.data.length){
+ return results.data[0].value;
+ }
+
+ return null;
+ },
+
+ getNamespaces: function(){
+ var results = [ this.DEFAULT_NAMESPACE ];
+ var rs = this._sql("SELECT namespace FROM " + this.TABLE_NAME + " DESC GROUP BY namespace");
+ if (rs.data){
+ for(var i = 0; i < rs.data.length; i++){
+ if(rs.data[i].namespace != this.DEFAULT_NAMESPACE){
+ results.push(rs.data[i].namespace);
+ }
+ }
+ }
+ return results;
+ },
+
+ getKeys: function(namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var results = [];
+ var rs = this._sql("SELECT key FROM " + this.TABLE_NAME + " WHERE namespace = :namespace", { ":namespace":namespace });
+ if (rs.data){
+ for(var i = 0; i < rs.data.length; i++){
+ results.push(rs.data[i].key);
+ }
+ }
+ return results;
+ },
+
+ clear: function(namespace){
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+ this._sql("DELETE FROM " + this.TABLE_NAME + " WHERE namespace = :namespace", { ":namespace":namespace });
+ },
+
+ remove: function(key, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ this._sql("DELETE FROM " + this.TABLE_NAME + " WHERE namespace = :namespace AND key = :key",
+ { ":namespace":namespace, ":key":key });
+ },
+
+ putMultiple: function(keys, values, resultsHandler, namespace) {
+ if(this.isValidKeyArray(keys) === false
+ || ! values instanceof Array
+ || keys.length != values.length){
+ throw new Error("Invalid arguments: keys = [" + keys + "], values = [" + values + "]");
+ }
+
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = this.DEFAULT_NAMESPACE;
+ }
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ this._statusHandler = resultsHandler;
+
+ // try to store the value
+ try{
+ this._beginTransaction();
+ for(var i=0;i<keys.length;i++) {
+ this._sql("DELETE FROM " + this.TABLE_NAME + " WHERE namespace = :namespace AND key = :key",
+ { ":namespace":namespace, ":key":key[i] });
+ this._sql("INSERT INTO " + this.TABLE_NAME + " VALUES (:namespace, :key, :value)",
+ { ":namespace":namespace, ":key":key[i], ":value":value });
+ }
+ this._commitTransaction();
+ }catch(e){
+ // indicate we failed
+ console.debug("dojox.storage.AirDBStorageProvider.putMultiple:", e);
+ if(resultsHandler){
+ resultsHandler(this.FAILED, keys, e.toString());
+ }
+ return;
+ }
+
+ if(resultsHandler){
+ resultsHandler(this.SUCCESS, key, null);
+ }
+ },
+
+ getMultiple: function(keys, namespace){
+ if(this.isValidKeyArray(keys) === false){
+ throw new Error("Invalid key array given: " + keys);
+ }
+
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = this.DEFAULT_NAMESPACE;
+ }
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var results = [];
+ for(var i=0;i<keys.length;i++){
+ var result = this._sql("SELECT * FROM " + this.TABLE_NAME + " WHERE namespace = :namespace AND key = :key",
+ { ":namespace":namespace, ":key":keys[i] });
+ results[i] = result.data && result.data.length ? result.data[0].value : null;
+ }
+
+ return results;
+ },
+
+ removeMultiple: function(keys, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ this._beginTransaction();
+ for(var i=0;i<keys.length;i++){
+ this._sql("DELETE FROM " + this.TABLE_NAME + " WHERE namespace = namespace = :namespace AND key = :key",
+ { ":namespace":namespace, ":key":keys[i] });
+ }
+ this._commitTransaction();
+ },
+
+ isPermanent: function(){ return true; },
+
+ getMaximumSize: function(){ return this.SIZE_NO_LIMIT; },
+
+ hasSettingsUI: function(){ return false; },
+
+ showSettingsUI: function(){
+ throw new Error(this.declaredClass + " does not support a storage settings user-interface");
+ },
+
+ hideSettingsUI: function(){
+ throw new Error(this.declaredClass + " does not support a storage settings user-interface");
+ }
+ });
+
+ dojox.storage.manager.register("dojox.storage.AirDBStorageProvider", new dojox.storage.AirDBStorageProvider());
+ dojox.storage.manager.initialize();
+ })();
+}
+
+}
diff --git a/includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js b/includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js
new file mode 100644
index 0000000..500ac0f
--- /dev/null
+++ b/includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js
@@ -0,0 +1,221 @@
+if(!dojo._hasResource["dojox.storage.AirEncryptedLocalStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage.AirEncryptedLocalStorageProvider"] = true;
+dojo.provide("dojox.storage.AirEncryptedLocalStorageProvider");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.storage.Provider");
+
+if (dojo.isAIR) {
+ (function(){
+
+ if (!air) {
+ var air = {};
+ }
+ air.ByteArray = window.runtime.flash.utils.ByteArray;
+ air.EncryptedLocalStore = window.runtime.flash.data.EncryptedLocalStore,
+
+ // summary:
+ // Storage provider that uses features in the Adobe AIR runtime to achieve
+ // permanent storage
+ dojo.declare("dojox.storage.AirEncryptedLocalStorageProvider", [ dojox.storage.Provider ], {
+ initialize: function(){
+ // indicate that this storage provider is now loaded
+ dojox.storage.manager.loaded();
+ },
+
+ isAvailable: function(){
+ return true;
+ },
+
+ _getItem: function(key){
+ var storedValue = air.EncryptedLocalStore.getItem("__dojo_" + key);
+ return storedValue ? storedValue.readUTFBytes(storedValue.length) : "";
+ },
+
+ _setItem: function(key, value){
+ var bytes = new air.ByteArray();
+ bytes.writeUTFBytes(value);
+ air.EncryptedLocalStore.setItem("__dojo_" + key, bytes);
+ },
+
+ _removeItem: function(key){
+ air.EncryptedLocalStore.removeItem("__dojo_" + key);
+ },
+
+ put: function(key, value, resultsHandler, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ // try to store the value
+ try{
+ var namespaces = this._getItem("namespaces")||'|';
+ if(namespaces.indexOf('|'+namespace+'|')==-1){
+ this._setItem("namespaces", namespaces + namespace + '|');
+ }
+ var keys = this._getItem(namespace + "_keys")||'|';
+ if(keys.indexOf('|'+key+'|')==-1){
+ this._setItem(namespace + "_keys", keys + key + '|');
+ }
+ this._setItem('_' + namespace + '_' + key, value);
+ }catch(e){
+ // indicate we failed
+ console.debug("dojox.storage.AirEncryptedLocalStorageProvider.put:", e);
+ resultsHandler(this.FAILED, key, e.toString());
+ return;
+ }
+
+ if(resultsHandler){
+ resultsHandler(this.SUCCESS, key, null);
+ }
+ },
+
+ get: function(key, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ return this._getItem('_' + namespace + '_' + key);
+ },
+
+ getNamespaces: function(){
+ var results = [ this.DEFAULT_NAMESPACE ];
+ var namespaces = (this._getItem("namespaces")||'|').split('|');
+ for (var i=0;i<namespaces.length;i++){
+ if(namespaces[i].length && namespaces[i] != this.DEFAULT_NAMESPACE){
+ results.push(namespaces[i]);
+ }
+ }
+ return results;
+ },
+
+ getKeys: function(namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var results = [];
+ var keys = (this._getItem(namespace + "_keys")||'|').split('|');
+ for (var i=0;i<keys.length;i++){
+ if (keys[i].length){
+ results.push(keys[i]);
+ }
+ }
+ return results;
+ },
+
+ clear: function(namespace){
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+ var namespaces = this._getItem("namespaces")||'|';
+ if(namespaces.indexOf('|'+namespace+'|')!=-1){
+ this._setItem("namespaces", namespaces.replace('|' + namespace + '|', '|'));
+ }
+ var keys = (this._getItem(namespace + "_keys")||'|').split('|');
+ for (var i=0;i<keys.length;i++){
+ if (keys[i].length){
+ this._removeItem(namespace + "_" + keys[i]);
+ }
+ }
+ this._removeItem(namespace + "_keys");
+ },
+
+ remove: function(key, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ var keys = this._getItem(namespace + "_keys")||'|';
+ if(keys.indexOf('|'+key+'|')!=-1){
+ this._setItem(namespace + "_keys", keys.replace('|' + key + '|', '|'));
+ }
+ this._removeItem('_' + namespace + '_' + key);
+ },
+
+ putMultiple: function(keys, values, resultsHandler, namespace) {
+ if(this.isValidKeyArray(keys) === false
+ || ! values instanceof Array
+ || keys.length != values.length){
+ throw new Error("Invalid arguments: keys = [" + keys + "], values = [" + values + "]");
+ }
+
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = this.DEFAULT_NAMESPACE;
+ }
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ this._statusHandler = resultsHandler;
+
+ // try to store the value
+ try{
+ for(var i=0;i<keys.length;i++) {
+ this.put(keys[i], value[i], null, namespace);
+ }
+ }catch(e){
+ // indicate we failed
+ console.debug("dojox.storage.AirEncryptedLocalStorageProvider.putMultiple:", e);
+ if(resultsHandler){
+ resultsHandler(this.FAILED, keys, e.toString());
+ }
+ return;
+ }
+
+ if(resultsHandler){
+ resultsHandler(this.SUCCESS, key, null);
+ }
+ },
+
+ getMultiple: function(keys, namespace){
+ if(this.isValidKeyArray(keys) === false){
+ throw new Error("Invalid key array given: " + keys);
+ }
+
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = this.DEFAULT_NAMESPACE;
+ }
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var results = [];
+ for(var i=0;i<keys.length;i++){
+ results[i] = this.get(keys[i], namespace);
+ }
+ return results;
+ },
+
+ removeMultiple: function(keys, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ for(var i=0;i<keys.length;i++){
+ this.remove(keys[i], namespace);
+ }
+ },
+
+ isPermanent: function(){ return true; },
+
+ getMaximumSize: function(){ return this.SIZE_NO_LIMIT; },
+
+ hasSettingsUI: function(){ return false; },
+
+ showSettingsUI: function(){
+ throw new Error(this.declaredClass + " does not support a storage settings user-interface");
+ },
+
+ hideSettingsUI: function(){
+ throw new Error(this.declaredClass + " does not support a storage settings user-interface");
+ }
+ });
+
+ dojox.storage.manager.register("dojox.storage.AirEncryptedLocalStorageProvider", new dojox.storage.AirEncryptedLocalStorageProvider());
+ dojox.storage.manager.initialize();
+ })();
+}
+
+}
diff --git a/includes/js/dojox/storage/AirFileStorageProvider.js b/includes/js/dojox/storage/AirFileStorageProvider.js
new file mode 100644
index 0000000..8187a6c
--- /dev/null
+++ b/includes/js/dojox/storage/AirFileStorageProvider.js
@@ -0,0 +1,232 @@
+if(!dojo._hasResource["dojox.storage.AirFileStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage.AirFileStorageProvider"] = true;
+dojo.provide("dojox.storage.AirFileStorageProvider");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.storage.Provider");
+
+if (dojo.isAIR) {
+ (function(){
+
+ if (!air) {
+ var air = {};
+ }
+ air.File = window.runtime.flash.filesystem.File;
+ air.FileStream = window.runtime.flash.filesystem.FileStream;
+ air.FileMode = window.runtime.flash.filesystem.FileMode;
+
+ // summary:
+ // Storage provider that uses features in the Adobe AIR runtime to achieve
+ // permanent storage
+ dojo.declare("dojox.storage.AirFileStorageProvider", [ dojox.storage.Provider ], {
+ initialized: false,
+
+ _storagePath: "__DOJO_STORAGE/",
+
+ initialize: function(){
+ this.initialized = false;
+
+ // need to initialize our storage directory
+ try{
+ var dir = air.File.applicationStorageDirectory.resolvePath(this._storagePath);
+ if (!dir.exists){
+ dir.createDirectory();
+ }
+ this.initialized = true;
+ }catch(e){
+ console.debug("dojox.storage.AirFileStorageProvider.initialize:", e);
+ }
+
+ // indicate that this storage provider is now loaded
+ dojox.storage.manager.loaded();
+ },
+
+ isAvailable: function(){
+ return true;
+ },
+
+ put: function(key, value, resultsHandler, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ // try to store the value
+ try{
+ this.remove(key, namespace);
+
+ var dir = air.File.applicationStorageDirectory.resolvePath(this._storagePath + namespace);
+ if (!dir.exists){
+ dir.createDirectory();
+ }
+
+ var file = dir.resolvePath(key);
+ var stream = new air.FileStream();
+ stream.open(file, air.FileMode.WRITE);
+ stream.writeObject(value);
+ stream.close();
+ }catch(e){
+ // indicate we failed
+ console.debug("dojox.storage.AirFileStorageProvider.put:", e);
+ resultsHandler(this.FAILED, key, e.toString());
+ return;
+ }
+
+ if(resultsHandler){
+ resultsHandler(this.SUCCESS, key, null);
+ }
+ },
+
+ get: function(key, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ var results = null;
+
+ var file = air.File.applicationStorageDirectory.resolvePath(this._storagePath + namespace + '/' + key);
+ if (file.exists && !file.isDirectory){
+ var stream = new air.FileStream();
+ stream.open(file, air.FileMode.READ);
+ results = stream.readObject();
+ stream.close();
+ }
+
+ return results;
+ },
+
+ getNamespaces: function(){
+ var results = [ this.DEFAULT_NAMESPACE ];
+ var dir = air.File.applicationStorageDirectory.resolvePath(this._storagePath);
+ var files = dir.getDirectoryListing();
+ for (i = 0; i < files.length; i++) {
+ if(files[i].isDirectory && files[i].name != this.DEFAULT_NAMESPACE){
+ results.push(files[i].name);
+ }
+ }
+ return results;
+ },
+
+ getKeys: function(namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var results = [];
+ var dir = air.File.applicationStorageDirectory.resolvePath(this._storagePath + namespace);
+ if (dir.exists && dir.isDirectory){
+ var files = dir.getDirectoryListing();
+ for (i = 0; i < files.length; i++) {
+ results.push(files[i].name);
+ }
+ }
+ return results;
+ },
+
+ clear: function(namespace){
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+ var dir = air.File.applicationStorageDirectory.resolvePath(this._storagePath + namespace);
+ if (dir.exists && dir.isDirectory){
+ dir.deleteDirectory(true);
+ }
+ },
+
+ remove: function(key, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ var file = air.File.applicationStorageDirectory.resolvePath(this._storagePath + namespace + '/' + key);
+ if (file.exists && !file.isDirectory){
+ file.deleteFile();
+ }
+ },
+
+ putMultiple: function(keys, values, resultsHandler, namespace) {
+ if(this.isValidKeyArray(keys) === false
+ || ! values instanceof Array
+ || keys.length != values.length){
+ throw new Error("Invalid arguments: keys = [" + keys + "], values = [" + values + "]");
+ }
+
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = this.DEFAULT_NAMESPACE;
+ }
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ this._statusHandler = resultsHandler;
+
+ // try to store the value
+ try{
+ for(var i=0;i<keys.length;i++) {
+ this.put(keys[i], value[i], null, namespace);
+ }
+ }catch(e){
+ // indicate we failed
+ console.debug("dojox.storage.AirFileStorageProvider.putMultiple:", e);
+ if(resultsHandler){
+ resultsHandler(this.FAILED, keys, e.toString());
+ }
+ return;
+ }
+
+ if(resultsHandler){
+ resultsHandler(this.SUCCESS, key, null);
+ }
+ },
+
+ getMultiple: function(keys, namespace){
+ if(this.isValidKeyArray(keys) === false){
+ throw new Error("Invalid key array given: " + keys);
+ }
+
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = this.DEFAULT_NAMESPACE;
+ }
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var results = [];
+ for(var i=0;i<keys.length;i++){
+ results[i] = this.get(keys[i], namespace);
+ }
+ return results;
+ },
+
+ removeMultiple: function(keys, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ for(var i=0;i<keys.length;i++){
+ this.remove(keys[i], namespace);
+ }
+ },
+
+ isPermanent: function(){ return true; },
+
+ getMaximumSize: function(){ return this.SIZE_NO_LIMIT; },
+
+ hasSettingsUI: function(){ return false; },
+
+ showSettingsUI: function(){
+ throw new Error(this.declaredClass + " does not support a storage settings user-interface");
+ },
+
+ hideSettingsUI: function(){
+ throw new Error(this.declaredClass + " does not support a storage settings user-interface");
+ }
+ });
+
+ dojox.storage.manager.register("dojox.storage.AirFileStorageProvider", new dojox.storage.AirFileStorageProvider());
+ dojox.storage.manager.initialize();
+ })();
+}
+
+}
diff --git a/includes/js/dojox/storage/FlashStorageProvider.js b/includes/js/dojox/storage/FlashStorageProvider.js
new file mode 100644
index 0000000..42cd7dc
--- /dev/null
+++ b/includes/js/dojox/storage/FlashStorageProvider.js
@@ -0,0 +1,346 @@
+if(!dojo._hasResource["dojox.storage.FlashStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage.FlashStorageProvider"] = true;
+dojo.provide("dojox.storage.FlashStorageProvider");
+
+dojo.require("dojox.flash");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.storage.Provider");
+
+// summary:
+// Storage provider that uses features in Flash to achieve permanent
+// storage
+// description:
+// Authors of this storage provider-
+// Brad Neuberg, bkn3@columbia.edu
+dojo.declare("dojox.storage.FlashStorageProvider", dojox.storage.Provider, {
+ initialized: false,
+
+ _available: null,
+ _statusHandler: null,
+ _flashReady: false,
+ _pageReady: false,
+
+ initialize: function(){
+ //console.debug("FlashStorageProvider.initialize");
+ if(dojo.config["disableFlashStorage"] == true){
+ return;
+ }
+
+ // initialize our Flash
+ dojox.flash.addLoadedListener(dojo.hitch(this, function(){
+ //console.debug("flashReady");
+ // indicate our Flash subsystem is now loaded
+ this._flashReady = true;
+ if(this._flashReady && this._pageReady){
+ this._loaded();
+ }
+ }));
+ var swfLoc = dojo.moduleUrl("dojox", "storage/Storage.swf").toString();
+ dojox.flash.setSwf(swfLoc, false);
+
+ // wait till page is finished loading
+ dojo.connect(dojo, "loaded", this, function(){
+ //console.debug("pageReady");
+ this._pageReady = true;
+ if(this._flashReady && this._pageReady){
+ this._loaded();
+ }
+ });
+ },
+
+ // Set a new value for the flush delay timer.
+ // Possible values:
+ // 0 : Perform the flush synchronously after each "put" request
+ // > 0 : Wait until 'newDelay' ms have passed without any "put" request to flush
+ // -1 : Do not automatically flush
+ setFlushDelay: function(newDelay){
+ if(newDelay === null || typeof newDelay === "undefined" || isNaN(newDelay)){
+ throw new Error("Invalid argunment: " + newDelay);
+ }
+
+ dojox.flash.comm.setFlushDelay(String(newDelay));
+ },
+
+ getFlushDelay: function(){
+ return Number(dojox.flash.comm.getFlushDelay());
+ },
+
+ flush: function(namespace){
+ //FIXME: is this test necessary? Just use !namespace
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+ dojox.flash.comm.flush(namespace);
+ },
+
+ isAvailable: function(){
+ return (this._available = !dojo.config["disableFlashStorage"]);
+ },
+
+ put: function(key, value, resultsHandler, namespace){
+ if(!this.isValidKey(key)){
+ throw new Error("Invalid key given: " + key);
+ }
+
+ if(!namespace){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(!this.isValidKey(namespace)){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ this._statusHandler = resultsHandler;
+
+ // serialize the value;
+ // handle strings differently so they have better performance
+ if(dojo.isString(value)){
+ value = "string:" + value;
+ }else{
+ value = dojo.toJson(value);
+ }
+
+ dojox.flash.comm.put(key, value, namespace);
+ },
+
+ putMultiple: function(keys, values, resultsHandler, namespace){
+ if(!this.isValidKeyArray(keys) || ! values instanceof Array
+ || keys.length != values.length){
+ throw new Error("Invalid arguments: keys = [" + keys + "], values = [" + values + "]");
+ }
+
+ if(!namespace){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(!this.isValidKey(namespace)){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ this._statusHandler = resultsHandler;
+
+ // Convert the arguments on strings we can pass along to Flash
+ var metaKey = keys.join(",");
+ var lengths = [];
+ for(var i=0;i<values.length;i++){
+ if(dojo.isString(values[i])){
+ values[i] = "string:" + values[i];
+ }else{
+ values[i] = dojo.toJson(values[i]);
+ }
+ lengths[i] = values[i].length;
+ }
+ var metaValue = values.join("");
+ var metaLengths = lengths.join(",");
+
+ dojox.flash.comm.putMultiple(metaKey, metaValue, metaLengths, this.namespace);
+ },
+
+ get: function(key, namespace){
+ if(!this.isValidKey(key)){
+ throw new Error("Invalid key given: " + key);
+ }
+
+ if(!namespace){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(!this.isValidKey(namespace)){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var results = dojox.flash.comm.get(key, namespace);
+
+ if(results == ""){
+ return null;
+ }
+
+ return this._destringify(results);
+ },
+
+ getMultiple: function(/*array*/ keys, /*string?*/ namespace){ /*Object*/
+ if(!this.isValidKeyArray(keys)){
+ throw new ("Invalid key array given: " + keys);
+ }
+
+ if(!namespace){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(!this.isValidKey(namespace)){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var metaKey = keys.join(",");
+ var metaResults = dojox.flash.comm.getMultiple(metaKey, this.namespace);
+ var results = eval("(" + metaResults + ")");
+
+ // destringify each entry back into a real JS object
+ //FIXME: use dojo.map
+ for(var i = 0; i < results.length; i++){
+ results[i] = (results[i] == "") ? null : this._destringify(results[i]);
+ }
+
+ return results;
+ },
+
+ _destringify: function(results){
+ // destringify the content back into a
+ // real JavaScript object;
+ // handle strings differently so they have better performance
+ if(dojo.isString(results) && (/^string:/.test(results))){
+ results = results.substring("string:".length);
+ }else{
+ results = dojo.fromJson(results);
+ }
+
+ return results;
+ },
+
+ getKeys: function(namespace){
+ if(!namespace){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(!this.isValidKey(namespace)){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var results = dojox.flash.comm.getKeys(namespace);
+
+ // Flash incorrectly returns an empty string as "null"
+ if(results == null || results == "null"){
+ results = "";
+ }
+
+ results = results.split(",");
+ results.sort();
+
+ return results;
+ },
+
+ getNamespaces: function(){
+ var results = dojox.flash.comm.getNamespaces();
+
+ // Flash incorrectly returns an empty string as "null"
+ if(results == null || results == "null"){
+ results = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ results = results.split(",");
+ results.sort();
+
+ return results;
+ },
+
+ clear: function(namespace){
+ if(!namespace){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(!this.isValidKey(namespace)){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ dojox.flash.comm.clear(namespace);
+ },
+
+ remove: function(key, namespace){
+ if(!namespace){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(!this.isValidKey(namespace)){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ dojox.flash.comm.remove(key, namespace);
+ },
+
+ removeMultiple: function(/*array*/ keys, /*string?*/ namespace){ /*Object*/
+ if(!this.isValidKeyArray(keys)){
+ dojo.raise("Invalid key array given: " + keys);
+ }
+ if(!namespace){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(!this.isValidKey(namespace)){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var metaKey = keys.join(",");
+ dojox.flash.comm.removeMultiple(metaKey, this.namespace);
+ },
+
+ isPermanent: function(){
+ return true;
+ },
+
+ getMaximumSize: function(){
+ return dojox.storage.SIZE_NO_LIMIT;
+ },
+
+ hasSettingsUI: function(){
+ return true;
+ },
+
+ showSettingsUI: function(){
+ dojox.flash.comm.showSettings();
+ dojox.flash.obj.setVisible(true);
+ dojox.flash.obj.center();
+ },
+
+ hideSettingsUI: function(){
+ // hide the dialog
+ dojox.flash.obj.setVisible(false);
+
+ // call anyone who wants to know the dialog is
+ // now hidden
+ if(dojo.isFunction(dojox.storage.onHideSettingsUI)){
+ dojox.storage.onHideSettingsUI.call(null);
+ }
+ },
+
+ getResourceList: function(){ /* Array[] */
+ // Dojo Offline no longer uses the FlashStorageProvider for offline
+ // storage; Gears is now required
+ return [];
+ },
+
+ /** Called when Flash and the page are finished loading. */
+ _loaded: function(){
+ // get available namespaces
+ this._allNamespaces = this.getNamespaces();
+
+ this.initialized = true;
+
+ // indicate that this storage provider is now loaded
+ dojox.storage.manager.loaded();
+ },
+
+ // Called if the storage system needs to tell us about the status
+ // of a put() request.
+ _onStatus: function(statusResult, key, namespace){
+ //console.debug("onStatus, statusResult="+statusResult+", key="+key);
+ var ds = dojox.storage;
+ var dfo = dojox.flash.obj;
+
+ if(statusResult == ds.PENDING){
+ dfo.center();
+ dfo.setVisible(true);
+ }else{
+ dfo.setVisible(false);
+ }
+
+ if(ds._statusHandler){
+ ds._statusHandler.call(null, statusResult, key, namespace);
+ }
+ }
+ }
+);
+
+dojox.storage.manager.register("dojox.storage.FlashStorageProvider",
+ new dojox.storage.FlashStorageProvider());
+
+}
diff --git a/includes/js/dojox/storage/GearsStorageProvider.js b/includes/js/dojox/storage/GearsStorageProvider.js
new file mode 100644
index 0000000..1e80634
--- /dev/null
+++ b/includes/js/dojox/storage/GearsStorageProvider.js
@@ -0,0 +1,320 @@
+if(!dojo._hasResource["dojox.storage.GearsStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage.GearsStorageProvider"] = true;
+dojo.provide("dojox.storage.GearsStorageProvider");
+dojo.require("dojox.storage.Provider");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.sql");
+
+if(dojo.isGears){
+
+ (function(){
+ // make sure we don't define the gears provider if we're not gears
+ // enabled
+
+ dojo.declare("dojox.storage.GearsStorageProvider", dojox.storage.Provider, {
+ // summary:
+ // Storage provider that uses the features of Google Gears
+ // to store data (it is saved into the local SQL database
+ // provided by Gears, using dojox.sql)
+ // description:
+ // You can disable this storage provider with the following djConfig
+ // variable:
+ // var djConfig = { disableGearsStorage: true };
+ //
+ // Authors of this storage provider-
+ // Brad Neuberg, bkn3@columbia.edu
+ constructor: function(){
+ },
+ // instance methods and properties
+ TABLE_NAME: "__DOJO_STORAGE",
+ initialized: false,
+
+ _available: null,
+
+ initialize: function(){
+ //console.debug("dojox.storage.GearsStorageProvider.initialize");
+ if(dojo.config["disableGearsStorage"] == true){
+ return;
+ }
+
+ // partition our storage data so that multiple apps
+ // on the same host won't collide
+ this.TABLE_NAME = "__DOJO_STORAGE";
+
+ // create the table that holds our data
+ try{
+ dojox.sql("CREATE TABLE IF NOT EXISTS " + this.TABLE_NAME + "( "
+ + " namespace TEXT, "
+ + " key TEXT, "
+ + " value TEXT "
+ + ")"
+ );
+ dojox.sql("CREATE UNIQUE INDEX IF NOT EXISTS namespace_key_index"
+ + " ON " + this.TABLE_NAME
+ + " (namespace, key)");
+ }catch(e){
+ console.debug("dojox.storage.GearsStorageProvider.initialize:", e);
+
+ this.initialized = false; // we were unable to initialize
+ dojox.storage.manager.loaded();
+ return;
+ }
+
+ // indicate that this storage provider is now loaded
+ this.initialized = true;
+ dojox.storage.manager.loaded();
+ },
+
+ isAvailable: function(){
+ // is Google Gears available and defined?
+ return this._available = dojo.isGears;
+ },
+
+ put: function(key, value, resultsHandler, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ // serialize the value;
+ // handle strings differently so they have better performance
+ if(dojo.isString(value)){
+ value = "string:" + value;
+ }else{
+ value = dojo.toJson(value);
+ }
+
+ // try to store the value
+ try{
+ dojox.sql("DELETE FROM " + this.TABLE_NAME
+ + " WHERE namespace = ? AND key = ?",
+ namespace, key);
+ dojox.sql("INSERT INTO " + this.TABLE_NAME
+ + " VALUES (?, ?, ?)",
+ namespace, key, value);
+ }catch(e){
+ // indicate we failed
+ console.debug("dojox.storage.GearsStorageProvider.put:", e);
+ resultsHandler(this.FAILED, key, e.toString());
+ return;
+ }
+
+ if(resultsHandler){
+ resultsHandler(dojox.storage.SUCCESS, key, null);
+ }
+ },
+
+ get: function(key, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ // try to find this key in the database
+ var results = dojox.sql("SELECT * FROM " + this.TABLE_NAME
+ + " WHERE namespace = ? AND "
+ + " key = ?",
+ namespace, key);
+ if(!results.length){
+ return null;
+ }else{
+ results = results[0].value;
+ }
+
+ // destringify the content back into a
+ // real JavaScript object;
+ // handle strings differently so they have better performance
+ if(dojo.isString(results) && (/^string:/.test(results))){
+ results = results.substring("string:".length);
+ }else{
+ results = dojo.fromJson(results);
+ }
+
+ return results;
+ },
+
+ getNamespaces: function(){
+ var results = [ dojox.storage.DEFAULT_NAMESPACE ];
+
+ var rs = dojox.sql("SELECT namespace FROM " + this.TABLE_NAME
+ + " DESC GROUP BY namespace");
+ for(var i = 0; i < rs.length; i++){
+ if(rs[i].namespace != dojox.storage.DEFAULT_NAMESPACE){
+ results.push(rs[i].namespace);
+ }
+ }
+
+ return results;
+ },
+
+ getKeys: function(namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var rs = dojox.sql("SELECT key FROM " + this.TABLE_NAME
+ + " WHERE namespace = ?",
+ namespace);
+
+ var results = [];
+ for(var i = 0; i < rs.length; i++){
+ results.push(rs[i].key);
+ }
+
+ return results;
+ },
+
+ clear: function(namespace){
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ dojox.sql("DELETE FROM " + this.TABLE_NAME
+ + " WHERE namespace = ?",
+ namespace);
+ },
+
+ remove: function(key, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ dojox.sql("DELETE FROM " + this.TABLE_NAME
+ + " WHERE namespace = ? AND"
+ + " key = ?",
+ namespace,
+ key);
+ },
+
+ putMultiple: function(keys, values, resultsHandler, namespace) {
+ if(this.isValidKeyArray(keys) === false
+ || ! values instanceof Array
+ || keys.length != values.length){
+ throw new Error("Invalid arguments: keys = ["
+ + keys + "], values = [" + values + "]");
+ }
+
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ this._statusHandler = resultsHandler;
+
+ // try to store the value
+ try{
+ dojox.sql.open();
+ dojox.sql.db.execute("BEGIN TRANSACTION");
+ var _stmt = "REPLACE INTO " + this.TABLE_NAME + " VALUES (?, ?, ?)";
+ for(var i=0;i<keys.length;i++) {
+ // serialize the value;
+ // handle strings differently so they have better performance
+ var value = values[i];
+ if(dojo.isString(value)){
+ value = "string:" + value;
+ }else{
+ value = dojo.toJson(value);
+ }
+
+ dojox.sql.db.execute( _stmt,
+ [namespace, keys[i], value]);
+ }
+ dojox.sql.db.execute("COMMIT TRANSACTION");
+ dojox.sql.close();
+ }catch(e){
+ // indicate we failed
+ console.debug("dojox.storage.GearsStorageProvider.putMultiple:", e);
+ if(resultsHandler){
+ resultsHandler(this.FAILED, keys, e.toString());
+ }
+ return;
+ }
+
+ if(resultsHandler){
+ resultsHandler(dojox.storage.SUCCESS, key, null);
+ }
+ },
+
+ getMultiple: function(keys, namespace){
+ // TODO: Maybe use SELECT IN instead
+
+ if(this.isValidKeyArray(keys) === false){
+ throw new ("Invalid key array given: " + keys);
+ }
+
+ if(namespace == null || typeof namespace == "undefined"){
+ namespace = dojox.storage.DEFAULT_NAMESPACE;
+ }
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ var _stmt = "SELECT * FROM " + this.TABLE_NAME +
+ " WHERE namespace = ? AND " + " key = ?";
+
+ var results = [];
+ for(var i=0;i<keys.length;i++){
+ var result = dojox.sql( _stmt, namespace, keys[i]);
+
+ if( ! result.length){
+ results[i] = null;
+ }else{
+ result = result[0].value;
+
+ // destringify the content back into a
+ // real JavaScript object;
+ // handle strings differently so they have better performance
+ if(dojo.isString(result) && (/^string:/.test(result))){
+ results[i] = result.substring("string:".length);
+ }else{
+ results[i] = dojo.fromJson(result);
+ }
+ }
+ }
+
+ return results;
+ },
+
+ removeMultiple: function(keys, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ dojox.sql.open();
+ dojox.sql.db.execute("BEGIN TRANSACTION");
+ var _stmt = "DELETE FROM " + this.TABLE_NAME + " WHERE namespace = ? AND key = ?";
+
+ for(var i=0;i<keys.length;i++){
+ dojox.sql.db.execute( _stmt,
+ [namespace, keys[i]]);
+ }
+ dojox.sql.db.execute("COMMIT TRANSACTION");
+ dojox.sql.close();
+ },
+
+ isPermanent: function(){ return true; },
+
+ getMaximumSize: function(){ return this.SIZE_NO_LIMIT; },
+
+ hasSettingsUI: function(){ return false; },
+
+ showSettingsUI: function(){
+ throw new Error(this.declaredClass
+ + " does not support a storage settings user-interface");
+ },
+
+ hideSettingsUI: function(){
+ throw new Error(this.declaredClass
+ + " does not support a storage settings user-interface");
+ }
+ });
+
+ // register the existence of our storage providers
+ dojox.storage.manager.register("dojox.storage.GearsStorageProvider",
+ new dojox.storage.GearsStorageProvider());
+ })();
+}
+
+}
diff --git a/includes/js/dojox/storage/Provider.js b/includes/js/dojox/storage/Provider.js
new file mode 100644
index 0000000..2637fbe
--- /dev/null
+++ b/includes/js/dojox/storage/Provider.js
@@ -0,0 +1,331 @@
+if(!dojo._hasResource["dojox.storage.Provider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage.Provider"] = true;
+dojo.provide("dojox.storage.Provider");
+
+dojo.declare("dojox.storage.Provider", null, {
+ // summary: A singleton for working with dojox.storage.
+ // description:
+ // dojox.storage exposes the current available storage provider on this
+ // platform. It gives you methods such as dojox.storage.put(),
+ // dojox.storage.get(), etc.
+ //
+ // For more details on dojox.storage, see the primary documentation
+ // page at
+ // http://manual.dojotoolkit.org/storage.html
+ //
+ // Note for storage provider developers who are creating subclasses-
+ // This is the base class for all storage providers Specific kinds of
+ // Storage Providers should subclass this and implement these methods.
+ // You should avoid initialization in storage provider subclass's
+ // constructor; instead, perform initialization in your initialize()
+ // method.
+ constructor: function(){
+ },
+
+ // SUCCESS: String
+ // Flag that indicates a put() call to a
+ // storage provider was succesful.
+ SUCCESS: "success",
+
+ // FAILED: String
+ // Flag that indicates a put() call to
+ // a storage provider failed.
+ FAILED: "failed",
+
+ // PENDING: String
+ // Flag that indicates a put() call to a
+ // storage provider is pending user approval.
+ PENDING: "pending",
+
+ // SIZE_NOT_AVAILABLE: String
+ // Returned by getMaximumSize() if this storage provider can not determine
+ // the maximum amount of data it can support.
+ SIZE_NOT_AVAILABLE: "Size not available",
+
+ // SIZE_NO_LIMIT: String
+ // Returned by getMaximumSize() if this storage provider has no theoretical
+ // limit on the amount of data it can store.
+ SIZE_NO_LIMIT: "No size limit",
+
+ // DEFAULT_NAMESPACE: String
+ // The namespace for all storage operations. This is useful if several
+ // applications want access to the storage system from the same domain but
+ // want different storage silos.
+ DEFAULT_NAMESPACE: "default",
+
+ // onHideSettingsUI: Function
+ // If a function is assigned to this property, then when the settings
+ // provider's UI is closed this function is called. Useful, for example,
+ // if the user has just cleared out all storage for this provider using
+ // the settings UI, and you want to update your UI.
+ onHideSettingsUI: null,
+
+ initialize: function(){
+ // summary:
+ // Allows this storage provider to initialize itself. This is
+ // called after the page has finished loading, so you can not do
+ // document.writes(). Storage Provider subclasses should initialize
+ // themselves inside of here rather than in their function
+ // constructor.
+ console.warn("dojox.storage.initialize not implemented");
+ },
+
+ isAvailable: function(){ /*Boolean*/
+ // summary:
+ // Returns whether this storage provider is available on this
+ // platform.
+ console.warn("dojox.storage.isAvailable not implemented");
+ },
+
+ put: function( /*string*/ key,
+ /*object*/ value,
+ /*function*/ resultsHandler,
+ /*string?*/ namespace){
+ // summary:
+ // Puts a key and value into this storage system.
+ // description:
+ // Example-
+ // var resultsHandler = function(status, key, message){
+ // alert("status="+status+", key="+key+", message="+message);
+ // };
+ // dojox.storage.put("test", "hello world", resultsHandler);
+ //
+ // Important note: if you are using Dojo Storage in conjunction with
+ // Dojo Offline, then you don't need to provide
+ // a resultsHandler; this is because for Dojo Offline we
+ // use Google Gears to persist data, which has unlimited data
+ // once the user has given permission. If you are using Dojo
+ // Storage apart from Dojo Offline, then under the covers hidden
+ // Flash might be used, which is both asychronous and which might
+ // get denied; in this case you must provide a resultsHandler.
+ // key:
+ // A string key to use when retrieving this value in the future.
+ // value:
+ // A value to store; this can be any JavaScript type.
+ // resultsHandler:
+ // A callback function that will receive three arguments. The
+ // first argument is one of three values: dojox.storage.SUCCESS,
+ // dojox.storage.FAILED, or dojox.storage.PENDING; these values
+ // determine how the put request went. In some storage systems
+ // users can deny a storage request, resulting in a
+ // dojox.storage.FAILED, while in other storage systems a storage
+ // request must wait for user approval, resulting in a
+ // dojox.storage.PENDING status until the request is either
+ // approved or denied, resulting in another call back with
+ // dojox.storage.SUCCESS.
+ // The second argument in the call back is the key name that was being stored.
+ // The third argument in the call back is an optional message that
+ // details possible error messages that might have occurred during
+ // the storage process.
+ // namespace:
+ // Optional string namespace that this value will be placed into;
+ // if left off, the value will be placed into dojox.storage.DEFAULT_NAMESPACE
+
+ console.warn("dojox.storage.put not implemented");
+ },
+
+ get: function(/*string*/ key, /*string?*/ namespace){ /*Object*/
+ // summary:
+ // Gets the value with the given key. Returns null if this key is
+ // not in the storage system.
+ // key:
+ // A string key to get the value of.
+ // namespace:
+ // Optional string namespace that this value will be retrieved from;
+ // if left off, the value will be retrieved from dojox.storage.DEFAULT_NAMESPACE
+ // return: Returns any JavaScript object type; null if the key is not present
+ console.warn("dojox.storage.get not implemented");
+ },
+
+ hasKey: function(/*string*/ key, /*string?*/ namespace){
+ // summary: Determines whether the storage has the given key.
+ return !!this.get(key, namespace); // Boolean
+ },
+
+ getKeys: function(/*string?*/ namespace){ /*Array*/
+ // summary: Enumerates all of the available keys in this storage system.
+ // return: Array of available keys
+ console.warn("dojox.storage.getKeys not implemented");
+ },
+
+ clear: function(/*string?*/ namespace){
+ // summary:
+ // Completely clears this storage system of all of it's values and
+ // keys. If 'namespace' is provided just clears the keys in that
+ // namespace.
+ console.warn("dojox.storage.clear not implemented");
+ },
+
+ remove: function(/*string*/ key, /*string?*/ namespace){
+ // summary: Removes the given key from this storage system.
+ console.warn("dojox.storage.remove not implemented");
+ },
+
+ getNamespaces: function(){ /*string[]*/
+ console.warn("dojox.storage.getNamespaces not implemented");
+ },
+
+ isPermanent: function(){ /*Boolean*/
+ // summary:
+ // Returns whether this storage provider's values are persisted
+ // when this platform is shutdown.
+ console.warn("dojox.storage.isPermanent not implemented");
+ },
+
+ getMaximumSize: function(){ /* mixed */
+ // summary: The maximum storage allowed by this provider
+ // returns:
+ // Returns the maximum storage size
+ // supported by this provider, in
+ // thousands of bytes (i.e., if it
+ // returns 60 then this means that 60K
+ // of storage is supported).
+ //
+ // If this provider can not determine
+ // it's maximum size, then
+ // dojox.storage.SIZE_NOT_AVAILABLE is
+ // returned; if there is no theoretical
+ // limit on the amount of storage
+ // this provider can return, then
+ // dojox.storage.SIZE_NO_LIMIT is
+ // returned
+ console.warn("dojox.storage.getMaximumSize not implemented");
+ },
+
+ putMultiple: function( /*array*/ keys,
+ /*array*/ values,
+ /*function*/ resultsHandler,
+ /*string?*/ namespace){
+ // summary:
+ // Puts multiple keys and values into this storage system.
+ // description:
+ // Example-
+ // var resultsHandler = function(status, key, message){
+ // alert("status="+status+", key="+key+", message="+message);
+ // };
+ // dojox.storage.put(["test"], ["hello world"], resultsHandler);
+ //
+ // Important note: if you are using Dojo Storage in conjunction with
+ // Dojo Offline, then you don't need to provide
+ // a resultsHandler; this is because for Dojo Offline we
+ // use Google Gears to persist data, which has unlimited data
+ // once the user has given permission. If you are using Dojo
+ // Storage apart from Dojo Offline, then under the covers hidden
+ // Flash might be used, which is both asychronous and which might
+ // get denied; in this case you must provide a resultsHandler.
+ // keys:
+ // An array of string keys to use when retrieving this value in the future,
+ // one per value to be stored
+ // values:
+ // An array of values to store; this can be any JavaScript type, though the
+ // performance of plain strings is considerably better
+ // resultsHandler:
+ // A callback function that will receive three arguments. The
+ // first argument is one of three values: dojox.storage.SUCCESS,
+ // dojox.storage.FAILED, or dojox.storage.PENDING; these values
+ // determine how the put request went. In some storage systems
+ // users can deny a storage request, resulting in a
+ // dojox.storage.FAILED, while in other storage systems a storage
+ // request must wait for user approval, resulting in a
+ // dojox.storage.PENDING status until the request is either
+ // approved or denied, resulting in another call back with
+ // dojox.storage.SUCCESS.
+ // The second argument in the call back is the key name that was being stored.
+ // The third argument in the call back is an optional message that
+ // details possible error messages that might have occurred during
+ // the storage process.
+ // namespace:
+ // Optional string namespace that this value will be placed into;
+ // if left off, the value will be placed into dojox.storage.DEFAULT_NAMESPACE
+
+ console.warn("dojox.storage.putMultiple not implemented");
+ // JAC: We could implement a 'default' puMultiple here by just doing
+ // each put individually
+ },
+
+ getMultiple: function(/*array*/ keys, /*string?*/ namespace){ /*Object*/
+ // summary:
+ // Gets the valuse corresponding to each of the given keys.
+ // Returns a null array element for each given key that is
+ // not in the storage system.
+ // keys:
+ // An array of string keys to get the value of.
+ // namespace:
+ // Optional string namespace that this value will be retrieved from;
+ // if left off, the value will be retrieved from dojox.storage.DEFAULT_NAMESPACE
+ // return: Returns any JavaScript object type; null if the key is not present
+
+ console.warn("dojox.storage.getMultiple not implemented");
+ // JAC: We could implement a 'default' getMultiple here by just
+ // doing each get individually
+ },
+
+ removeMultiple: function(/*array*/ keys, /*string?*/ namespace) {
+ // summary: Removes the given keys from this storage system.
+
+ // JAC: We could implement a 'default' removeMultiple here by just
+ // doing each remove individually
+ console.warn("dojox.storage.remove not implemented");
+ },
+
+ isValidKeyArray: function( keys) {
+ if(keys === null || keys === undefined || !dojo.isArray(keys)){
+ return false;
+ }
+
+ // JAC: This could be optimized by running the key validity test
+ // directly over a joined string
+ return !dojo.some(keys, function(key){
+ return !this.isValidKey(key);
+ }); // Boolean
+ },
+
+ hasSettingsUI: function(){ /*Boolean*/
+ // summary: Determines whether this provider has a settings UI.
+ return false;
+ },
+
+ showSettingsUI: function(){
+ // summary: If this provider has a settings UI, determined
+ // by calling hasSettingsUI(), it is shown.
+ console.warn("dojox.storage.showSettingsUI not implemented");
+ },
+
+ hideSettingsUI: function(){
+ // summary: If this provider has a settings UI, hides it.
+ console.warn("dojox.storage.hideSettingsUI not implemented");
+ },
+
+ isValidKey: function(/*string*/ keyName){ /*Boolean*/
+ // summary:
+ // Subclasses can call this to ensure that the key given is valid
+ // in a consistent way across different storage providers. We use
+ // the lowest common denominator for key values allowed: only
+ // letters, numbers, and underscores are allowed. No spaces.
+ if(keyName === null || keyName === undefined){
+ return false;
+ }
+
+ return /^[0-9A-Za-z_]*$/.test(keyName);
+ },
+
+ getResourceList: function(){ /* Array[] */
+ // summary:
+ // Returns a list of URLs that this
+ // storage provider might depend on.
+ // description:
+ // This method returns a list of URLs that this
+ // storage provider depends on to do its work.
+ // This list is used by the Dojo Offline Toolkit
+ // to cache these resources to ensure the machinery
+ // used by this storage provider is available offline.
+ // What is returned is an array of URLs.
+ // Note that Dojo Offline uses Gears as its native
+ // storage provider, and does not support using other
+ // kinds of storage providers while offline anymore.
+
+ return [];
+ }
+});
+
+}
diff --git a/includes/js/dojox/storage/README b/includes/js/dojox/storage/README
new file mode 100644
index 0000000..28cd2a9
--- /dev/null
+++ b/includes/js/dojox/storage/README
@@ -0,0 +1,76 @@
+-------------------------------------------------------------------------------
+Dojo Storage
+-------------------------------------------------------------------------------
+Version X.XXX (does not have separate versioning -- versioned by release date)
+Last Release date: March 2008
+-------------------------------------------------------------------------------
+Project state:
+experimental
+-------------------------------------------------------------------------------
+Credits
+ Brad Neuberg
+ Alex Russell
+-------------------------------------------------------------------------------
+Project description
+
+dojox.storage provides a JavaScript abstraction for persistent storage
+as well as pluggable implementations which typically use native browser extensions
+(e.g. Flash player, Gears)
+
+-------------------------------------------------------------------------------
+Dependencies:
+
+FlashStorageProvider requires the Flash player
+GearsStorageProvider requires the Gears extension
+The various Air*StorageProviders require Adobe's AIR software
+
+The open source mtasc compiler (www.mtasc.org) is needed to build the
+ActionScript into SWF format. The SWF object is maintained within svn, so
+this step is only necessary if Storage.as is modified. A sample build script
+is provided (buildFlashStorage.sh)
+
+-------------------------------------------------------------------------------
+Documentation
+
+See http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book50 for the
+authoritative Dojo Storage docs.
+
+See dojox/storage/demos/helloworld.html for a simple Hello World example
+you can base your code off of.
+
+-------------------------------------------------------------------------------
+Installation instructions
+
+If you want to use Dojo Storage in a web browser:
+
+These installation instructions are to use Dojo Storage in a web browser; at
+runtime, Dojo Storage will autodetect and use the best available storage
+option. This includes:
+
+ * Google Gears
+ * HTML 5 Web Browsers (Firefox 2+)
+ * Hidden Flash
+
+If you are using a release build (if you downloaded Dojo from the Dojo
+website then this is a release build -- if you checked it out from
+Subversion yourself then you will have to build things yourself), if you
+only want to grab just the files from Dojo to use Dojo Storage
+in the browser, take the following (but make sure to keep the directory
+layout the same, or else things won't work correctly!):
+
+* dojo/dojo.js
+* dojox/storage/storage-browser.js
+* dojox/storage/Storage.swf
+
+To help with testing and development and to make sure you have everything
+right, its also useful to grab the following files:
+
+* dojox/storage/README
+* dojox/storage/demos/helloworld.html
+
+If you want to use Dojo Storage with Adobe AIR:
+
+[TBD! Why don't you write this and contribute!]
+
+-------------------------------------------------------------------------------
+Additional Notes
diff --git a/includes/js/dojox/storage/Storage.as b/includes/js/dojox/storage/Storage.as
new file mode 100644
index 0000000..8fdd4ed
--- /dev/null
+++ b/includes/js/dojox/storage/Storage.as
@@ -0,0 +1,399 @@
+import DojoExternalInterface;
+
+class Storage{
+ public static var SUCCESS = "success";
+ public static var FAILED = "failed";
+ public static var PENDING = "pending";
+
+ // Wait the following number of milliseconds before flushing
+ public static var FLUSH_DELAY_DEFAULT = 500;
+
+ public var flush_delay;
+ public var so;
+ public var timer;
+
+ private var _NAMESPACE_KEY = "allNamespaces";
+
+ public function Storage(){
+ flush_delay = Storage.FLUSH_DELAY_DEFAULT;
+
+ DojoExternalInterface.initialize();
+ DojoExternalInterface.addCallback("put", this, put);
+ DojoExternalInterface.addCallback("putMultiple", this, putMultiple);
+ DojoExternalInterface.addCallback("get", this, get);
+ DojoExternalInterface.addCallback("getMultiple", this, getMultiple);
+ DojoExternalInterface.addCallback("showSettings", this, showSettings);
+ DojoExternalInterface.addCallback("clear", this, clear);
+ DojoExternalInterface.addCallback("getKeys", this, getKeys);
+ DojoExternalInterface.addCallback("getNamespaces", this, getNamespaces);
+ DojoExternalInterface.addCallback("remove", this, remove);
+ DojoExternalInterface.addCallback("removeMultiple", this, removeMultiple);
+ DojoExternalInterface.addCallback("flush", this, flush);
+ DojoExternalInterface.addCallback("setFlushDelay", this, setFlushDelay);
+ DojoExternalInterface.addCallback("getFlushDelay", this, getFlushDelay);
+ DojoExternalInterface.loaded();
+
+ // preload the System Settings finished button movie for offline
+ // access so it is in the cache
+ _root.createEmptyMovieClip("_settingsBackground", 1);
+ _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath + "storage_dialog.swf");
+ }
+
+ // FIXME: Whoever added this Flush code did not document why it
+ // exists. Please also put your name and a bug number so I know
+ // who to contact. -- Brad Neuberg
+
+ // Set a new value for the flush delay timer.
+ // Possible values:
+ // 0 : Perform the flush synchronously after each "put" request
+ // > 0 : Wait until 'newDelay' ms have passed without any "put" request to flush
+ // -1 : Do not automatically flush
+ public function setFlushDelay(newDelay){
+ flush_delay = Number(newDelay);
+ }
+
+ public function getFlushDelay(){
+ return String(flush_delay);
+ }
+
+ public function flush(namespace){
+ if(timer){
+ _global.clearTimeout(timer);
+ delete timer;
+ }
+
+ var so = SharedObject.getLocal(namespace);
+ var flushResults = so.flush();
+
+ // return results of this command to JavaScript
+ var statusResults;
+ if(flushResults == true){
+ statusResults = Storage.SUCCESS;
+ }else if(flushResults == "pending"){
+ statusResults = Storage.PENDING;
+ }else{
+ statusResults = Storage.FAILED;
+ }
+
+ DojoExternalInterface.call("dojox.storage._onStatus", statusResults,
+ null, namespace);
+ }
+
+ public function put(keyName, keyValue, namespace){
+ // Get the SharedObject for these values and save it
+ so = SharedObject.getLocal(namespace);
+
+ // Save the key and value
+ so.data[keyName] = keyValue;
+
+ // Save the namespace
+ // FIXME: Tie this into the flush/no-flush stuff below; right now
+ // we immediately write out this namespace. -- Brad Neuberg
+ addNamespace(namespace, keyName);
+
+ // Do all the flush/no-flush stuff
+ var keyNames = new Array();
+ keyNames[0] = keyName;
+ postWrite(so, keyNames, namespace);
+ }
+
+ // FIXME: Whoever added this code did not document what the
+ // put/get multiple functionality is and why it exists. Please
+ // also put your name and a bug number so I know who to contact.
+ // -- Brad Neuberg
+ public function putMultiple(metaKey, metaValue, metaLengths, namespace){
+ // Get the SharedObject for these values and save it
+ so = SharedObject.getLocal(namespace);
+
+ // Create array of keys and value lengths
+ var keys = metaKey.split(",");
+ var lengths = metaLengths.split(",");
+
+ // Loop through the array and write the values
+ for(var i=0;i<keys.length;i++){
+ so.data[keys[i]] = metaValue.slice(0,lengths[i]);
+ metaValue = metaValue.slice(lengths[i]);
+ }
+
+ // Do all the flush/no-flush stuff
+ postWrite(so, keys, namespace);
+ }
+
+ public function postWrite(so, keyNames, namespace){
+ // TODO: Review all this 'handler' stuff. In particular, the flush
+ // could now be with keys pending from several different requests, not
+ // only the ones passed in this method call
+
+ // prepare a storage status handler
+ var self = this;
+ so.onStatus = function(infoObject:Object){
+ //trace("onStatus, infoObject="+infoObject.code);
+
+ // delete the data value if the request was denied
+ if(infoObject.code == "SharedObject.Flush.Failed"){
+ for(var i=0;i<keyNames.length;i++){
+ delete self.so.data[keyNames[i]];
+ }
+ }
+
+ var statusResults;
+ if(infoObject.code == "SharedObject.Flush.Failed"){
+ statusResults = Storage.FAILED;
+ }else if(infoObject.code == "SharedObject.Flush.Pending"){
+ statusResults = Storage.PENDING;
+ }else if(infoObject.code == "SharedObject.Flush.Success"){
+ // if we have succeeded saving our value, see if we
+ // need to update our list of namespaces
+ if(self.hasNamespace(namespace) == true){
+ statusResults = Storage.SUCCESS;
+ }else{
+ // we have a new namespace we must store
+ self.addNamespace(namespace, keyNames[0]);
+ return;
+ }
+ }
+ //trace("onStatus, statusResults="+statusResults);
+
+ // give the status results to JavaScript
+ DojoExternalInterface.call("dojox.storage._onStatus", statusResults,
+ keyNames[0], namespace);
+ }
+
+ // Clear any pending flush timers
+ if(timer){
+ _global.clearTimeout(timer);
+ }
+
+ // If we have a flush delay set, set a timer for its execution
+ if(flush_delay > 0){
+ timer = _global.setTimeout(flush, flush_delay, namespace);
+ // With a flush_delay value of 0, execute the flush request synchronously
+ }else if(flush_delay == 0){
+ flush(namespace);
+ }
+ // Otherwise just don't flush - will be probably be flushed manually
+ }
+
+ public function get(keyName, namespace){
+ // Get the SharedObject for these values and save it
+ so = SharedObject.getLocal(namespace);
+ var results = so.data[keyName];
+
+ return results;
+ }
+
+ // Returns an array with the contents of each key value on the metaKeys array
+ public function getMultiple(metaKeys, namespace){
+ // get the storage object
+ so = SharedObject.getLocal(namespace);
+
+ // Create array of keys to read
+ var keys = metaKeys.split(",");
+ var results = new Array();
+
+ // Read from storage into results array
+ for(var i = 0;i < keys.length;i++){
+ var val = so.data[keys[i]];
+ val = val.split("\\").join("\\\\");
+ val = val.split('"').join('\\"');
+ results.push( val);
+ }
+
+ // Make the results array into a string
+ var metaResults = '["' + results.join('","') + '"]';
+
+ return metaResults;
+ }
+
+ public function showSettings(){
+ // Show the configuration options for the Flash player, opened to the
+ // section for local storage controls (pane 1)
+ System.showSettings(1);
+
+ // there is no way we can intercept when the Close button is pressed, allowing us
+ // to hide the Flash dialog. Instead, we need to load a movie in the
+ // background that we can show a close button on.
+ _root.createEmptyMovieClip("_settingsBackground", 1);
+ _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath + "storage_dialog.swf");
+ }
+
+ public function clear(namespace){
+ so = SharedObject.getLocal(namespace);
+ so.clear();
+ so.flush();
+
+ // remove this namespace entry now
+ removeNamespace(namespace);
+ }
+
+ public function getKeys(namespace) : String{
+ // Returns a list of the available keys in this namespace
+
+ // get the storage object
+ so = SharedObject.getLocal(namespace);
+ // get all of the keys
+ var results = [];
+ for(var i in so.data){
+ results.push(i);
+ }
+
+ // remove our key that records our list of namespaces
+ for(var i = 0; i < results.length; i++){
+ if(results[i] == _NAMESPACE_KEY){
+ results.splice(i, 1);
+ break;
+ }
+ }
+
+ // a bug in ExternalInterface transforms Arrays into
+ // Strings, so we can't use those here! -- BradNeuberg
+ results = results.join(",");
+
+ return results;
+ }
+
+ public function getNamespaces() : String{
+ var allNamespaces = SharedObject.getLocal(_NAMESPACE_KEY);
+ var results = [];
+
+ for(var i in allNamespaces.data){
+ results.push(i);
+ }
+
+ // a bug in ExternalInterface transforms Arrays into
+ // Strings, so we can use those here! -- BradNeuberg
+ results = results.join(",");
+
+ return results;
+ }
+
+ public function remove(keyName, namespace){
+ // Removes a key
+
+ // get the storage object
+ so = SharedObject.getLocal(namespace);
+
+ // delete this value
+ delete so.data[keyName];
+
+ // save the changes
+ so.flush();
+
+ // see if we are the last entry for this namespace
+ var availableKeys = getKeys(namespace);
+ if(availableKeys == ""){
+ // we are empty
+ removeNamespace(namespace);
+ }
+ }
+
+ // Removes all the values for each keys on the metaKeys array
+ public function removeMultiple(metaKeys, namespace){
+ // get the storage object
+ so = SharedObject.getLocal(namespace);
+
+ // Create array of keys to read
+ var keys = metaKeys.split(",");
+ var results = new Array();
+
+ // Delete elements
+ for(var i=0;i<keys.length;i++){
+ delete so.data[keys[i]];
+ }
+
+ // see if there are no more entries for this namespace
+ var availableKeys = getKeys(namespace);
+ if(availableKeys == ""){
+ // we are empty
+ removeNamespace(namespace);
+ }
+ }
+
+ private function hasNamespace(namespace):Boolean{
+ // Get the SharedObject for the namespace list
+ var allNamespaces = SharedObject.getLocal(_NAMESPACE_KEY);
+
+ var results = false;
+ for(var i in allNamespaces.data){
+ if(i == namespace){
+ results = true;
+ break;
+ }
+ }
+
+ return results;
+ }
+
+ // FIXME: This code has gotten ugly -- refactor
+ private function addNamespace(namespace, keyName){
+ if(hasNamespace(namespace) == true){
+ return;
+ }
+
+ // Get the SharedObject for the namespace list
+ var allNamespaces = SharedObject.getLocal(_NAMESPACE_KEY);
+
+ // prepare a storage status handler if the keyName is
+ // not null
+ if(keyName != null && typeof keyName != "undefined"){
+ var self = this;
+ allNamespaces.onStatus = function(infoObject:Object){
+ // delete the data value if the request was denied
+ if(infoObject.code == "SharedObject.Flush.Failed"){
+ delete self.so.data[keyName];
+ }
+
+ var statusResults;
+ if(infoObject.code == "SharedObject.Flush.Failed"){
+ statusResults = Storage.FAILED;
+ }else if(infoObject.code == "SharedObject.Flush.Pending"){
+ statusResults = Storage.PENDING;
+ }else if(infoObject.code == "SharedObject.Flush.Success"){
+ statusResults = Storage.SUCCESS;
+ }
+
+ // give the status results to JavaScript
+ DojoExternalInterface.call("dojox.storage._onStatus", statusResults,
+ keyName, namespace);
+ }
+ }
+
+ // save the namespace list
+ allNamespaces.data[namespace] = true;
+ var flushResults = allNamespaces.flush();
+
+ // return results of this command to JavaScript
+ if(keyName != null && typeof keyName != "undefined"){
+ var statusResults;
+ if(flushResults == true){
+ statusResults = Storage.SUCCESS;
+ }else if(flushResults == "pending"){
+ statusResults = Storage.PENDING;
+ }else{
+ statusResults = Storage.FAILED;
+ }
+
+ DojoExternalInterface.call("dojox.storage._onStatus", statusResults,
+ keyName, namespace);
+ }
+ }
+
+ // FIXME: This code has gotten ugly -- refactor
+ private function removeNamespace(namespace){
+ if(hasNamespace(namespace) == false){
+ return;
+ }
+
+ // try to save the namespace list; don't have a return
+ // callback; if we fail on this, the worst that will happen
+ // is that we have a spurious namespace entry
+ var allNamespaces = SharedObject.getLocal(_NAMESPACE_KEY);
+ delete allNamespaces.data[namespace];
+ allNamespaces.flush();
+ }
+
+ static function main(mc){
+ _root.app = new Storage();
+ }
+}
+
diff --git a/includes/js/dojox/storage/Storage.swf b/includes/js/dojox/storage/Storage.swf
new file mode 100644
index 0000000..1d50775
--- /dev/null
+++ b/includes/js/dojox/storage/Storage.swf
Binary files differ
diff --git a/includes/js/dojox/storage/WhatWGStorageProvider.js b/includes/js/dojox/storage/WhatWGStorageProvider.js
new file mode 100644
index 0000000..4bd4c22
--- /dev/null
+++ b/includes/js/dojox/storage/WhatWGStorageProvider.js
@@ -0,0 +1,278 @@
+if(!dojo._hasResource["dojox.storage.WhatWGStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage.WhatWGStorageProvider"] = true;
+dojo.provide("dojox.storage.WhatWGStorageProvider");
+dojo.require("dojox.storage.Provider");
+dojo.require("dojox.storage.manager");
+
+dojo.declare("dojox.storage.WhatWGStorageProvider", [ dojox.storage.Provider ], {
+ // summary:
+ // Storage provider that uses WHAT Working Group features in Firefox 2
+ // to achieve permanent storage.
+ // description:
+ // The WHAT WG storage API is documented at
+ // http://www.whatwg.org/specs/web-apps/current-work/#scs-client-side
+ //
+ // You can disable this storage provider with the following djConfig
+ // variable:
+ // var djConfig = { disableWhatWGStorage: true };
+ //
+ // Authors of this storage provider-
+ // JB Boisseau, jb.boisseau@eutech-ssii.com
+ // Brad Neuberg, bkn3@columbia.edu
+
+ initialized: false,
+
+ _domain: null,
+ _available: null,
+ _statusHandler: null,
+ _allNamespaces: null,
+ _storageEventListener: null,
+
+ initialize: function(){
+ if(dojo.config["disableWhatWGStorage"] == true){
+ return;
+ }
+
+ // get current domain
+ // see: https://bugzilla.mozilla.org/show_bug.cgi?id=357323
+ this._domain = (location.hostname == "localhost") ? "localhost.localdomain" : location.hostname;
+ // console.debug(this._domain);
+
+ // indicate that this storage provider is now loaded
+ this.initialized = true;
+ dojox.storage.manager.loaded();
+ },
+
+ isAvailable: function(){
+ try{
+ // see: https://bugzilla.mozilla.org/show_bug.cgi?id=357323
+ var myStorage = globalStorage[((location.hostname == "localhost") ? "localhost.localdomain" : location.hostname)];
+ }catch(e){
+ this._available = false;
+ return this._available;
+ }
+
+ this._available = true;
+ return this._available;
+ },
+
+ put: function(key, value, resultsHandler, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ // get our full key name, which is namespace + key
+ key = this.getFullKey(key, namespace);
+
+ this._statusHandler = resultsHandler;
+
+ // serialize the value;
+ // handle strings differently so they have better performance
+ if(dojo.isString(value)){
+ value = "string:" + value;
+ }else{
+ value = dojo.toJson(value);
+ }
+
+ // register for successful storage events.
+ var storageListener = dojo.hitch(this, function(evt){
+ // remove any old storage event listener we might have added
+ // to the window on old put() requests; Firefox has a bug
+ // where it can occassionaly go into infinite loops calling
+ // our storage event listener over and over -- this is a
+ // workaround
+ // FIXME: Simplify this into a test case and submit it
+ // to Firefox
+ window.removeEventListener("storage", storageListener, false);
+
+ // indicate we succeeded
+ if(resultsHandler){
+ resultsHandler.call(null, this.SUCCESS, key);
+ }
+ });
+
+ window.addEventListener("storage", storageListener, false);
+
+ // try to store the value
+ try{
+ var myStorage = globalStorage[this._domain];
+ myStorage.setItem(key, value);
+ }catch(e){
+ // indicate we failed
+ this._statusHandler.call(null, this.FAILED, key, e.toString());
+ }
+ },
+
+ get: function(key, namespace){
+ if(this.isValidKey(key) == false){
+ throw new Error("Invalid key given: " + key);
+ }
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ // get our full key name, which is namespace + key
+ key = this.getFullKey(key, namespace);
+
+ // sometimes, even if a key doesn't exist, Firefox
+ // will return a blank string instead of a null --
+ // this _might_ be due to having underscores in the
+ // keyname, but I am not sure.
+
+ // FIXME: Simplify this bug into a testcase and
+ // submit it to Firefox
+ var myStorage = globalStorage[this._domain];
+ var results = myStorage.getItem(key);
+
+ if(results == null || results == ""){
+ return null;
+ }
+
+ results = results.value;
+
+ // destringify the content back into a
+ // real JavaScript object;
+ // handle strings differently so they have better performance
+ if(dojo.isString(results) && (/^string:/.test(results))){
+ results = results.substring("string:".length);
+ }else{
+ results = dojo.fromJson(results);
+ }
+
+ return results;
+ },
+
+ getNamespaces: function(){
+ var results = [ this.DEFAULT_NAMESPACE ];
+
+ // simply enumerate through our array and save any string
+ // that starts with __
+ var found = {};
+ var myStorage = globalStorage[this._domain];
+ var tester = /^__([^_]*)_/;
+ for(var i = 0; i < myStorage.length; i++){
+ var currentKey = myStorage.key(i);
+ if(tester.test(currentKey) == true){
+ var currentNS = currentKey.match(tester)[1];
+ // have we seen this namespace before?
+ if(typeof found[currentNS] == "undefined"){
+ found[currentNS] = true;
+ results.push(currentNS);
+ }
+ }
+ }
+
+ return results;
+ },
+
+ getKeys: function(namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ // create a regular expression to test the beginning
+ // of our key names to see if they match our namespace;
+ // if it is the default namespace then test for the presence
+ // of no namespace for compatibility with older versions
+ // of dojox.storage
+ var namespaceTester;
+ if(namespace == this.DEFAULT_NAMESPACE){
+ namespaceTester = new RegExp("^([^_]{2}.*)$");
+ }else{
+ namespaceTester = new RegExp("^__" + namespace + "_(.*)$");
+ }
+
+ var myStorage = globalStorage[this._domain];
+ var keysArray = [];
+ for(var i = 0; i < myStorage.length; i++){
+ var currentKey = myStorage.key(i);
+ if(namespaceTester.test(currentKey) == true){
+ // strip off the namespace portion
+ currentKey = currentKey.match(namespaceTester)[1];
+ keysArray.push(currentKey);
+ }
+ }
+
+ return keysArray;
+ },
+
+ clear: function(namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ // create a regular expression to test the beginning
+ // of our key names to see if they match our namespace;
+ // if it is the default namespace then test for the presence
+ // of no namespace for compatibility with older versions
+ // of dojox.storage
+ var namespaceTester;
+ if(namespace == this.DEFAULT_NAMESPACE){
+ namespaceTester = new RegExp("^[^_]{2}");
+ }else{
+ namespaceTester = new RegExp("^__" + namespace + "_");
+ }
+
+ var myStorage = globalStorage[this._domain];
+ var keys = [];
+ for(var i = 0; i < myStorage.length; i++){
+ if(namespaceTester.test(myStorage.key(i)) == true){
+ keys[keys.length] = myStorage.key(i);
+ }
+ }
+
+ dojo.forEach(keys, dojo.hitch(myStorage, "removeItem"));
+ },
+
+ remove: function(key, namespace){
+ // get our full key name, which is namespace + key
+ key = this.getFullKey(key, namespace);
+
+ var myStorage = globalStorage[this._domain];
+ myStorage.removeItem(key);
+ },
+
+ isPermanent: function(){
+ return true;
+ },
+
+ getMaximumSize: function(){
+ return this.SIZE_NO_LIMIT;
+ },
+
+ hasSettingsUI: function(){
+ return false;
+ },
+
+ showSettingsUI: function(){
+ throw new Error(this.declaredClass + " does not support a storage settings user-interface");
+ },
+
+ hideSettingsUI: function(){
+ throw new Error(this.declaredClass + " does not support a storage settings user-interface");
+ },
+
+ getFullKey: function(key, namespace){
+ namespace = namespace||this.DEFAULT_NAMESPACE;
+
+ if(this.isValidKey(namespace) == false){
+ throw new Error("Invalid namespace given: " + namespace);
+ }
+
+ // don't append a namespace string for the default namespace,
+ // for compatibility with older versions of dojox.storage
+ if(namespace == this.DEFAULT_NAMESPACE){
+ return key;
+ }else{
+ return "__" + namespace + "_" + key;
+ }
+ }
+});
+
+dojox.storage.manager.register("dojox.storage.WhatWGStorageProvider",
+ new dojox.storage.WhatWGStorageProvider());
+
+}
diff --git a/includes/js/dojox/storage/_common.js b/includes/js/dojox/storage/_common.js
new file mode 100644
index 0000000..c511ba5
--- /dev/null
+++ b/includes/js/dojox/storage/_common.js
@@ -0,0 +1,20 @@
+if(!dojo._hasResource["dojox.storage._common"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage._common"] = true;
+dojo.provide("dojox.storage._common");
+dojo.require("dojox.storage.Provider");
+dojo.require("dojox.storage.manager");
+
+/*
+ Note: if you are doing Dojo Offline builds you _must_
+ have offlineProfile=true when you run the build script:
+ ./build.sh action=release profile=offline offlineProfile=true
+*/
+dojo.require("dojox.storage.GearsStorageProvider");
+dojo.require("dojox.storage.WhatWGStorageProvider");
+dojo.require("dojox.storage.FlashStorageProvider");
+
+// now that we are loaded and registered tell the storage manager to
+// initialize itself
+dojox.storage.manager.initialize();
+
+}
diff --git a/includes/js/dojox/storage/buildFlashStorage.sh b/includes/js/dojox/storage/buildFlashStorage.sh
new file mode 100644
index 0000000..892dca1
--- /dev/null
+++ b/includes/js/dojox/storage/buildFlashStorage.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# TODO: FIXME: Get rid of this and hook it into Dojo's general build script
+# You must have mtasc to run this
+mtasc -trace DojoExternalInterface.trace -main -cp ../flash -swf Storage.swf -version 8 -header 215:138:10 Storage.as
diff --git a/includes/js/dojox/storage/demos/helloworld.html b/includes/js/dojox/storage/demos/helloworld.html
new file mode 100644
index 0000000..44fd739
--- /dev/null
+++ b/includes/js/dojox/storage/demos/helloworld.html
@@ -0,0 +1,90 @@
+<html>
+ <head>
+ <script src="../../../dojo/dojo.js"></script>
+ <script src="../storage-browser.js"></script>
+
+ <script>
+ dojo.require("dojox.storage");
+
+ function runDemo(){
+ // setup event handlers
+ dojo.byId("saveButton").onclick = saveValue;
+
+ // write out what our storage provider is for debugging
+ dojo.byId("currentProvider").innerHTML =
+ dojox.storage.manager.currentProvider.declaredClass;
+
+ loadValues();
+ }
+
+ function loadValues(){
+ // get any values that were saved before and write them into the page
+ var results = dojox.storage.get("myValues");
+
+ if(results){
+ var printMe = "<ul>";
+ for(var i = 0; i < results.length; i++){
+ printMe += "<li>" + results[i] + "</li>";
+ }
+ printMe += "</ul>";
+ dojo.byId("allValues").innerHTML = printMe;
+ }
+ }
+
+ function saveValue(){
+ var value = dojo.byId("saveValue").value;
+ if(value == undefined || value === ""){
+ alert("Please enter a correct value");
+ return;
+ }
+
+ // get the old values first, since we are saving everything
+ // as one key
+ var results = dojox.storage.get("myValues");
+ if(!results){
+ results = new Array();
+ }
+
+ // add new value
+ results.push(value);
+
+ dojox.storage.put("myValues", results, function(status, keyName){
+ if(status == dojox.storage.FAILED){
+ alert("You do not have permission to store data for this web site.");
+ }else if(status == dojox.storage.SUCCESS){
+ loadValues();
+ }
+ });
+ }
+
+ // wait until the storage system is finished loading
+ if(!dojox.storage.manager.isInitialized()){
+ dojo.connect(dojox.storage.manager, "loaded", runDemo);
+ }else{
+ dojo.connect(dojo, "loaded", runDemo);
+ }
+ </script>
+ </head>
+
+ <body>
+ <h1>Dojo Storage Hello World</h1>
+
+ <p>Simple Dojo Storage example. Enter values below to have them
+ persisted in Dojo Storage; refresh browser page or close browser
+ and then return to this page to see the values again. Note that
+ Dojo Storage will not work from file:// URLs.</p>
+
+ <h2>Save Values:</h2>
+ <div>
+ <input id="saveValue" type="text"></input>
+ <button id="saveButton">Save Value</button>
+ </div>
+
+ <h2>All Saved Values:</h2>
+ <p id="allValues"></p>
+
+ <p>Using Dojo Storage Provider (autodetected):
+ <span id="currentProvider"></span>
+ <p>
+ </body>
+</html> \ No newline at end of file
diff --git a/includes/js/dojox/storage/manager.js b/includes/js/dojox/storage/manager.js
new file mode 100644
index 0000000..0198a6d
--- /dev/null
+++ b/includes/js/dojox/storage/manager.js
@@ -0,0 +1,261 @@
+if(!dojo._hasResource["dojox.storage.manager"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.storage.manager"] = true;
+dojo.provide("dojox.storage.manager");
+//dojo.require("dojo.AdapterRegistry");
+// FIXME: refactor this to use an AdapterRegistry
+
+dojox.storage.manager = new function(){
+ // summary: A singleton class in charge of the dojox.storage system
+ // description:
+ // Initializes the storage systems and figures out the best available
+ // storage options on this platform.
+
+ // currentProvider: Object
+ // The storage provider that was automagically chosen to do storage
+ // on this platform, such as dojox.storage.FlashStorageProvider.
+ this.currentProvider = null;
+
+ // available: Boolean
+ // Whether storage of some kind is available.
+ this.available = false;
+
+ // providers: Array
+ // Array of all the static provider instances, useful if you want to
+ // loop through and see what providers have been registered.
+ this.providers = [];
+
+ this._initialized = false;
+
+ this._onLoadListeners = [];
+
+ this.initialize = function(){
+ // summary:
+ // Initializes the storage system and autodetects the best storage
+ // provider we can provide on this platform
+ this.autodetect();
+ };
+
+ this.register = function(/*string*/ name, /*Object*/ instance){
+ // summary:
+ // Registers the existence of a new storage provider; used by
+ // subclasses to inform the manager of their existence. The
+ // storage manager will select storage providers based on
+ // their ordering, so the order in which you call this method
+ // matters.
+ // name:
+ // The full class name of this provider, such as
+ // "dojox.storage.FlashStorageProvider".
+ // instance:
+ // An instance of this provider, which we will use to call
+ // isAvailable() on.
+
+ // keep list of providers as a list so that we can know what order
+ // storage providers are preferred; also, store the providers hashed
+ // by name in case someone wants to get a provider that uses
+ // a particular storage backend
+ this.providers.push(instance);
+ this.providers[name] = instance;
+ };
+
+ this.setProvider = function(storageClass){
+ // summary:
+ // Instructs the storageManager to use the given storage class for
+ // all storage requests.
+ // description:
+ // Example-
+ // dojox.storage.setProvider(
+ // dojox.storage.IEStorageProvider)
+
+ };
+
+ this.autodetect = function(){
+ // summary:
+ // Autodetects the best possible persistent storage provider
+ // available on this platform.
+
+ //console.debug("dojox.storage.manager.autodetect");
+
+ if(this._initialized){ // already finished
+ return;
+ }
+
+ // a flag to force the storage manager to use a particular
+ // storage provider type, such as
+ // djConfig = {forceStorageProvider: "dojox.storage.WhatWGStorageProvider"};
+ var forceProvider = dojo.config["forceStorageProvider"] || false;
+
+ // go through each provider, seeing if it can be used
+ var providerToUse;
+ //FIXME: use dojo.some
+ for(var i = 0; i < this.providers.length; i++){
+ providerToUse = this.providers[i];
+ if(forceProvider && forceProvider == providerToUse.declaredClass){
+ // still call isAvailable for this provider, since this helps some
+ // providers internally figure out if they are available
+ // FIXME: This should be refactored since it is non-intuitive
+ // that isAvailable() would initialize some state
+ providerToUse.isAvailable();
+ break;
+ }else if(!forceProvider && providerToUse.isAvailable()){
+ break;
+ }
+ }
+
+ if(!providerToUse){ // no provider available
+ this._initialized = true;
+ this.available = false;
+ this.currentProvider = null;
+ console.warn("No storage provider found for this platform");
+ this.loaded();
+ return;
+ }
+
+ // create this provider and mix in it's properties
+ // so that developers can do dojox.storage.put rather
+ // than dojox.storage.currentProvider.put, for example
+ this.currentProvider = providerToUse;
+ dojo.mixin(dojox.storage, this.currentProvider);
+
+ // have the provider initialize itself
+ dojox.storage.initialize();
+
+ this._initialized = true;
+ this.available = true;
+ };
+
+ this.isAvailable = function(){ /*Boolean*/
+ // summary: Returns whether any storage options are available.
+ return this.available;
+ };
+
+ this.addOnLoad = function(func){ /* void */
+ // summary:
+ // Adds an onload listener to know when Dojo Offline can be used.
+ // description:
+ // Adds a listener to know when Dojo Offline can be used. This
+ // ensures that the Dojo Offline framework is loaded and that the
+ // local dojox.storage system is ready to be used. This method is
+ // useful if you don't want to have a dependency on Dojo Events
+ // when using dojox.storage.
+ // func: Function
+ // A function to call when Dojo Offline is ready to go
+ this._onLoadListeners.push(func);
+
+ if(this.isInitialized()){
+ this._fireLoaded();
+ }
+ };
+
+ this.removeOnLoad = function(func){ /* void */
+ // summary: Removes the given onLoad listener
+ for(var i = 0; i < this._onLoadListeners.length; i++){
+ if(func == this._onLoadListeners[i]){
+ this._onLoadListeners = this._onLoadListeners.splice(i, 1);
+ break;
+ }
+ }
+ };
+
+ this.isInitialized = function(){ /*Boolean*/
+ // summary:
+ // Returns whether the storage system is initialized and ready to
+ // be used.
+
+ // FIXME: This should REALLY not be in here, but it fixes a tricky
+ // Flash timing bug.
+ // Confirm that this is still needed with the newly refactored Dojo
+ // Flash. Used to be for Internet Explorer. -- Brad Neuberg
+ if(this.currentProvider != null
+ && this.currentProvider.declaredClass == "dojox.storage.FlashStorageProvider"
+ && dojox.flash.ready == false){
+ return false;
+ }else{
+ return this._initialized;
+ }
+ };
+
+ this.supportsProvider = function(/*string*/ storageClass){ /* Boolean */
+ // summary: Determines if this platform supports the given storage provider.
+ // description:
+ // Example-
+ // dojox.storage.manager.supportsProvider(
+ // "dojox.storage.InternetExplorerStorageProvider");
+
+ // construct this class dynamically
+ try{
+ // dynamically call the given providers class level isAvailable()
+ // method
+ var provider = eval("new " + storageClass + "()");
+ var results = provider.isAvailable();
+ if(!results){ return false; }
+ return results;
+ }catch(e){
+ return false;
+ }
+ };
+
+ this.getProvider = function(){ /* Object */
+ // summary: Gets the current provider
+ return this.currentProvider;
+ };
+
+ this.loaded = function(){
+ // summary:
+ // The storage provider should call this method when it is loaded
+ // and ready to be used. Clients who will use the provider will
+ // connect to this method to know when they can use the storage
+ // system. You can either use dojo.connect to connect to this
+ // function, or can use dojox.storage.manager.addOnLoad() to add
+ // a listener that does not depend on the dojo.event package.
+ // description:
+ // Example 1-
+ // if(dojox.storage.manager.isInitialized() == false){
+ // dojo.connect(dojox.storage.manager, "loaded", TestStorage, "initialize");
+ // }else{
+ // dojo.connect(dojo, "loaded", TestStorage, "initialize");
+ // }
+ // Example 2-
+ // dojox.storage.manager.addOnLoad(someFunction);
+
+
+ // FIXME: we should just provide a Deferred for this. That way you
+ // don't care when this happens or has happened. Deferreds are in Base
+ this._fireLoaded();
+ };
+
+ this._fireLoaded = function(){
+ //console.debug("dojox.storage.manager._fireLoaded");
+
+ dojo.forEach(this._onLoadListeners, function(i){
+ try{
+ i();
+ }catch(e){ console.debug(e); }
+ });
+ };
+
+ this.getResourceList = function(){
+ // summary:
+ // Returns a list of whatever resources are necessary for storage
+ // providers to work.
+ // description:
+ // This will return all files needed by all storage providers for
+ // this particular environment type. For example, if we are in the
+ // browser environment, then this will return the hidden SWF files
+ // needed by the FlashStorageProvider, even if we don't need them
+ // for the particular browser we are working within. This is meant
+ // to faciliate Dojo Offline, which must retrieve all resources we
+ // need offline into the offline cache -- we retrieve everything
+ // needed, in case another browser that requires different storage
+ // mechanisms hits the local offline cache. For example, if we
+ // were to sync against Dojo Offline on Firefox 2, then we would
+ // not grab the FlashStorageProvider resources needed for Safari.
+ var results = [];
+ dojo.forEach(dojox.storage.manager.providers, function(currentProvider){
+ results = results.concat(currentProvider.getResourceList());
+ });
+
+ return results;
+ }
+};
+
+}
diff --git a/includes/js/dojox/storage/storage_dialog.fla b/includes/js/dojox/storage/storage_dialog.fla
new file mode 100644
index 0000000..1273c10
--- /dev/null
+++ b/includes/js/dojox/storage/storage_dialog.fla
Binary files differ
diff --git a/includes/js/dojox/storage/tests/resources/testBook.txt b/includes/js/dojox/storage/tests/resources/testBook.txt
new file mode 100644
index 0000000..40e4aec
--- /dev/null
+++ b/includes/js/dojox/storage/tests/resources/testBook.txt
@@ -0,0 +1,7104 @@
+The Project Gutenberg EBook of Faust, by Goethe
+
+This eBook is for the use of anyone anywhere at no cost and with
+almost no restrictions whatsoever. You may copy it, give it away or
+re-use it under the terms of the Project Gutenberg License included
+with this eBook or online at www.gutenberg.net
+
+
+Title: Faust
+
+Author: Goethe
+
+Release Date: December 25, 2004 [EBook #14460]
+
+Language: English
+
+Character set encoding: ISO-8859-1
+
+*** START OF THIS PROJECT GUTENBERG EBOOK FAUST ***
+
+
+
+
+Produced by Juliet Sutherland, Charles Bidwell and the PG Online
+Distributed Proofreading Team
+
+
+
+
+
+
+FAUST
+
+
+A TRAGEDY
+
+TRANSLATED FROM THE GERMAN
+
+OF
+
+GOETHE
+
+
+WITH NOTES
+
+BY
+
+CHARLES T BROOKS
+
+
+SEVENTH EDITION.
+
+BOSTON
+TICKNOR AND FIELDS
+
+MDCCCLXVIII.
+
+
+
+Entered according to Act of Congress, in the year 1856,
+by CHARLES T. BROOKS,
+In the Clerk's Office of the District Court
+of the District of Rhode Island.
+
+UNIVERSITY PRESS:
+WELCH, BIGELOW, AND COMPANY,
+CAMBRIDGE.
+
+
+
+
+TRANSLATOR'S PREFACE.
+
+
+Perhaps some apology ought to be given to English scholars, that is, those
+who do not know German, (to those, at least, who do not know what sort of
+a thing Faust is in the original,) for offering another translation to the
+public, of a poem which has been already translated, not only in a literal
+prose form, but also, twenty or thirty times, in metre, and sometimes with
+great spirit, beauty, and power.
+
+The author of the present version, then, has no knowledge that a rendering
+of this wonderful poem into the exact and ever-changing metre of the
+original has, until now, been so much as attempted. To name only one
+defect, the very best versions which he has seen neglect to follow the
+exquisite artist in the evidently planned and orderly intermixing of
+_male_ and _female_ rhymes, _i.e._ rhymes which fall on the last syllable
+and those which fall on the last but one. Now, every careful student of
+the versification of Faust must feel and see that Goethe did not
+intersperse the one kind of rhyme with the other, at random, as those
+translators do; who, also, give the female rhyme (on which the vivacity of
+dialogue and description often so much depends,) in so small a proportion.
+
+A similar criticism might be made of their liberty in neglecting Goethe's
+method of alternating different measures with each other.
+
+It seems as if, in respect to metre, at least, they had asked themselves,
+how would Goethe have written or shaped this in English, had that been his
+native language, instead of seeking _con amore_ (and _con fidelità_) as
+they should have done, to reproduce, both in spirit and in form, the
+movement, so free and yet orderly, of the singularly endowed and
+accomplished poet whom they undertook to represent.
+
+As to the objections which Hayward and some of his reviewers have
+instituted in advance against the possibility of a good and faithful
+metrical translation of a poem like Faust, they seem to the present
+translator full of paradox and sophistry. For instance, take this
+assertion of one of the reviewers: "The sacred and mysterious union of
+thought with verse, twin-born and immortally wedded from the moment of
+their common birth, can never be understood by those who desire verse
+translations of good poetry." If the last part of this statement had read
+"by those who can be contented with _prose_ translations of good poetry,"
+the position would have been nearer the truth. This much we might well
+admit, that, if the alternative were either to have a poem like Faust in a
+metre different and glaringly different from the original, or to have it
+in simple and strong prose, then the latter alternative would be the one
+every tasteful and feeling scholar would prefer; but surely to every one
+who can read the original or wants to know how this great song _sung
+itself_ (as Carlyle says) out of Goethe's soul, a mere prose rendering
+must be, comparatively, a _corpus mortuum._
+
+The translator most heartily dissents from Hayward's assertion that a
+translator of Faust "must sacrifice either metre or meaning." At least he
+flatters himself that he has made, in the main, (not a compromise between
+meaning and melody, though in certain instances he may have fallen into
+that, but) a combination of the meaning with the melody, which latter is
+so important, so vital a part of the lyric poem's meaning, in any worthy
+sense. "No poetic translation," says Hayward's reviewer, already quoted,
+"can give the rhythm and rhyme of the original; it can only substitute the
+rhythm and rhyme of the translator." One might just as well say "no
+_prose_ translation can give the _sense and spirit_ of the original; it
+can only substitute the _sense and spirit of the words and phrases of the
+translator's language_;" and then, these two assertions balancing each
+other, there will remain in the metrical translator's favor, that he may
+come as near to giving both the letter and the spirit, as the effects of
+the Babel dispersion will allow.
+
+As to the original creation, which he has attempted here to reproduce, the
+translator might say something, but prefers leaving his readers to the
+poet himself, as revealed in the poem, and to the various commentaries of
+which we have some accounts, at least, in English. A French translator of
+the poem speaks in his introduction as follows: "This Faust, conceived by
+him in his youth, completed in ripe age, the idea of which he carried with
+him through all the commotions of his life, as Camoens bore his poem with
+him through the waves, this Faust contains him entire. The thirst for
+knowledge and the martyrdom of doubt, had they not tormented his early
+years? Whence came to him the thought of taking refuge in a supernatural
+realm, of appealing to invisible powers, which plunged him, for a
+considerable time, into the dreams of Illuminati and made him even invent
+a religion? This irony of Mephistopheles, who carries on so audacious a
+game with the weakness and the desires of man, is it not the mocking,
+scornful side of the poet's spirit, a leaning to sullenness, which can be
+traced even into the earliest years of his life, a bitter leaven thrown
+into a strong soul forever by early satiety? The character of Faust
+especially, the man whose burning, untiring heart can neither enjoy
+fortune nor do without it, who gives himself unconditionally and watches
+himself with mistrust, who unites the enthusiasm of passion and the
+dejectedness of despair, is not this an eloquent opening up of the most
+secret and tumultuous part of the poet's soul? And now, to complete the
+image of his inner life, he has added the transcendingly sweet person of
+Margaret, an exalted reminiscence of a young girl, by whom, at the age of
+fourteen, he thought himself beloved, whose image ever floated round him,
+and has contributed some traits to each of his heroines. This heavenly
+surrender of a simple, good, and tender heart contrasts wonderfully with
+the sensual and gloomy passion of the lover, who, in the midst of his
+love-dreams, is persecuted by the phantoms of his imagination and by the
+nightmares of thought, with those sorrows of a soul, which is crushed, but
+not extinguished, which is tormented by the invincible want of happiness
+and the bitter feeling, how hard a thing it is to receive or to bestow."
+
+
+
+
+DEDICATION.[1]
+
+Once more ye waver dreamily before me,
+Forms that so early cheered my troubled eyes!
+To hold you fast doth still my heart implore me?
+Still bid me clutch the charm that lures and flies?
+Ye crowd around! come, then, hold empire o'er me,
+As from the mist and haze of thought ye rise;
+The magic atmosphere, your train enwreathing,
+Through my thrilled bosom youthful bliss is breathing.
+
+Ye bring with you the forms of hours Elysian,
+And shades of dear ones rise to meet my gaze;
+First Love and Friendship steal upon my vision
+Like an old tale of legendary days;
+Sorrow renewed, in mournful repetition,
+Runs through life's devious, labyrinthine ways;
+And, sighing, names the good (by Fortune cheated
+Of blissful hours!) who have before me fleeted.
+
+These later songs of mine, alas! will never
+Sound in their ears to whom the first were sung!
+Scattered like dust, the friendly throng forever!
+Mute the first echo that so grateful rung!
+To the strange crowd I sing, whose very favor
+Like chilling sadness on my heart is flung;
+And all that kindled at those earlier numbers
+Roams the wide earth or in its bosom slumbers.
+
+And now I feel a long-unwonted yearning
+For that calm, pensive spirit-realm, to-day;
+Like an Aeolian lyre, (the breeze returning,)
+Floats in uncertain tones my lisping lay;
+Strange awe comes o'er me, tear on tear falls burning,
+The rigid heart to milder mood gives way!
+What I possess I see afar off lying,
+And what I lost is real and undying.
+
+
+
+
+PRELUDE
+
+IN THE THEATRE.
+
+
+ _Manager. Dramatic Poet. Merry Person._
+
+_Manager_. You who in trouble and distress
+Have both held fast your old allegiance,
+What think ye? here in German regions
+Our enterprise may hope success?
+To please the crowd my purpose has been steady,
+Because they live and let one live at least.
+The posts are set, the boards are laid already,
+And every one is looking for a feast.
+They sit, with lifted brows, composed looks wearing,
+Expecting something that shall set them staring.
+I know the public palate, that's confest;
+Yet never pined so for a sound suggestion;
+True, they are not accustomed to the best,
+But they have read a dreadful deal, past question.
+How shall we work to make all fresh and new,
+Acceptable and profitable, too?
+For sure I love to see the torrent boiling,
+When towards our booth they crowd to find a place,
+Now rolling on a space and then recoiling,
+Then squeezing through the narrow door of grace:
+Long before dark each one his hard-fought station
+In sight of the box-office window takes,
+And as, round bakers' doors men crowd to escape starvation,
+For tickets here they almost break their necks.
+This wonder, on so mixed a mass, the Poet
+Alone can work; to-day, my friend, O, show it!
+
+_Poet_. Oh speak not to me of that motley ocean,
+Whose roar and greed the shuddering spirit chill!
+Hide from my sight that billowy commotion
+That draws us down the whirlpool 'gainst our will.
+No, lead me to that nook of calm devotion,
+Where blooms pure joy upon the Muses' hill;
+Where love and friendship aye create and cherish,
+With hand divine, heart-joys that never perish.
+Ah! what, from feeling's deepest fountain springing,
+Scarce from the stammering lips had faintly passed,
+Now, hopeful, venturing forth, now shyly clinging,
+To the wild moment's cry a prey is cast.
+Oft when for years the brain had heard it ringing
+It comes in full and rounded shape at last.
+What shines, is born but for the moment's pleasure;
+The genuine leaves posterity a treasure.
+
+_Merry Person_. Posterity! I'm sick of hearing of it;
+Supposing I the future age would profit,
+Who then would furnish ours with fun?
+For it must have it, ripe and mellow;
+The presence of a fine young fellow,
+Is cheering, too, methinks, to any one.
+Whoso can pleasantly communicate,
+Will not make war with popular caprices,
+For, as the circle waxes great,
+The power his word shall wield increases.
+Come, then, and let us now a model see,
+Let Phantasy with all her various choir,
+Sense, reason, passion, sensibility,
+But, mark me, folly too! the scene inspire.
+
+_Manager_. But the great point is action! Every one
+Comes as spectator, and the show's the fun.
+Let but the plot be spun off fast and thickly,
+So that the crowd shall gape in broad surprise,
+Then have you made a wide impression quickly,
+You are the man they'll idolize.
+The mass can only be impressed by masses;
+Then each at last picks out his proper part.
+Give much, and then to each one something passes,
+And each one leaves the house with happy heart.
+Have you a piece, give it at once in pieces!
+Such a ragout your fame increases;
+It costs as little pains to play as to invent.
+But what is gained, if you a whole present?
+Your public picks it presently to pieces.
+
+_Poet_. You do not feel how mean a trade like that must be!
+In the true Artist's eyes how false and hollow!
+Our genteel botchers, well I see,
+Have given the maxims that you follow.
+
+_Manager_. Such charges pass me like the idle wind;
+A man who has right work in mind
+Must choose the instruments most fitting.
+Consider what soft wood you have for splitting,
+And keep in view for whom you write!
+If this one from _ennui_ seeks flight,
+That other comes full from the groaning table,
+Or, the worst case of all to cite,
+From reading journals is for thought unable.
+Vacant and giddy, all agog for wonder,
+As to a masquerade they wing their way;
+The ladies give themselves and all their precious plunder
+And without wages help us play.
+On your poetic heights what dream comes o'er you?
+What glads a crowded house? Behold
+Your patrons in array before you!
+One half are raw, the other cold.
+One, after this play, hopes to play at cards,
+One a wild night to spend beside his doxy chooses,
+Poor fools, why court ye the regards,
+For such a set, of the chaste muses?
+I tell you, give them more and ever more and more,
+And then your mark you'll hardly stray from ever;
+To mystify be your endeavor,
+To satisfy is labor sore....
+What ails you? Are you pleased or pained? What notion----
+
+_Poet_. Go to, and find thyself another slave!
+What! and the lofty birthright Nature gave,
+The noblest talent Heaven to man has lent,
+Thou bid'st the Poet fling to folly's ocean!
+How does he stir each deep emotion?
+How does he conquer every element?
+But by the tide of song that from his bosom springs,
+And draws into his heart all living things?
+When Nature's hand, in endless iteration,
+The thread across the whizzing spindle flings,
+When the complex, monotonous creation
+Jangles with all its million strings:
+Who, then, the long, dull series animating,
+Breaks into rhythmic march the soulless round?
+And, to the law of All each member consecrating,
+Bids one majestic harmony resound?
+Who bids the tempest rage with passion's power?
+The earnest soul with evening-redness glow?
+Who scatters vernal bud and summer flower
+Along the path where loved ones go?
+Who weaves each green leaf in the wind that trembles
+To form the wreath that merit's brow shall crown?
+Who makes Olympus fast? the gods assembles?
+The power of manhood in the Poet shown.
+
+_Merry Person_. Come, then, put forth these noble powers,
+And, Poet, let thy path of flowers
+Follow a love-adventure's winding ways.
+One comes and sees by chance, one burns, one stays,
+And feels the gradual, sweet entangling!
+The pleasure grows, then comes a sudden jangling,
+Then rapture, then distress an arrow plants,
+And ere one dreams of it, lo! _there_ is a romance.
+Give us a drama in this fashion!
+Plunge into human life's full sea of passion!
+Each lives it, few its meaning ever guessed,
+Touch where you will, 'tis full of interest.
+Bright shadows fleeting o'er a mirror,
+A spark of truth and clouds of error,
+By means like these a drink is brewed
+To cheer and edify the multitude.
+The fairest flower of the youth sit listening
+Before your play, and wait the revelation;
+Each melancholy heart, with soft eyes glistening,
+Draws sad, sweet nourishment from your creation;
+This passion now, now that is stirred, by turns,
+And each one sees what in his bosom burns.
+Open alike, as yet, to weeping and to laughter,
+They still admire the flights, they still enjoy the show;
+Him who is formed, can nothing suit thereafter;
+The yet unformed with thanks will ever glow.
+
+_Poet_. Ay, give me back the joyous hours,
+When I myself was ripening, too,
+When song, the fount, flung up its showers
+Of beauty ever fresh and new.
+When a soft haze the world was veiling,
+Each bud a miracle bespoke,
+And from their stems a thousand flowers I broke,
+Their fragrance through the vales exhaling.
+I nothing and yet all possessed,
+Yearning for truth and in illusion blest.
+Give me the freedom of that hour,
+The tear of joy, the pleasing pain,
+Of hate and love the thrilling power,
+Oh, give me back my youth again!
+
+_Merry Person_. Youth, my good friend, thou needest certainly
+When ambushed foes are on thee springing,
+When loveliest maidens witchingly
+Their white arms round thy neck are flinging,
+When the far garland meets thy glance,
+High on the race-ground's goal suspended,
+When after many a mazy dance
+In drink and song the night is ended.
+But with a free and graceful soul
+To strike the old familiar lyre,
+And to a self-appointed goal
+Sweep lightly o'er the trembling wire,
+There lies, old gentlemen, to-day
+Your task; fear not, no vulgar error blinds us.
+Age does not make us childish, as they say,
+But we are still true children when it finds us.
+
+_Manager_. Come, words enough you two have bandied,
+Now let us see some deeds at last;
+While you toss compliments full-handed,
+The time for useful work flies fast.
+Why talk of being in the humor?
+Who hesitates will never be.
+If you are poets (so says rumor)
+Now then command your poetry.
+You know full well our need and pleasure,
+We want strong drink in brimming measure;
+Brew at it now without delay!
+To-morrow will not do what is not done to-day.
+Let not a day be lost in dallying,
+But seize the possibility
+Right by the forelock, courage rallying,
+And forth with fearless spirit sallying,--
+Once in the yoke and you are free.
+ Upon our German boards, you know it,
+What any one would try, he may;
+Then stint me not, I beg, to-day,
+In scenery or machinery, Poet.
+With great and lesser heavenly lights make free,
+Spend starlight just as you desire;
+No want of water, rocks or fire
+Or birds or beasts to you shall be.
+So, in this narrow wooden house's bound,
+Stride through the whole creation's round,
+And with considerate swiftness wander
+From heaven, through this world, to the world down yonder.
+
+
+
+
+ PROLOGUE
+
+
+ IN HEAVEN.
+
+
+[THE LORD. THE HEAVENLY HOSTS _afterward_ MEPHISTOPHELES.
+_The three archangels_, RAPHAEL, GABRIEL, _and_ MICHAEL, _come forward_.]
+
+_Raphael_. The sun, in ancient wise, is sounding,
+ With brother-spheres, in rival song;
+And, his appointed journey rounding,
+ With thunderous movement rolls along.
+His look, new strength to angels lending,
+ No creature fathom can for aye;
+The lofty works, past comprehending,
+ Stand lordly, as on time's first day.
+
+_Gabriel_. And swift, with wondrous swiftness fleeting,
+ The pomp of earth turns round and round,
+The glow of Eden alternating
+ With shuddering midnight's gloom profound;
+Up o'er the rocks the foaming ocean
+ Heaves from its old, primeval bed,
+And rocks and seas, with endless motion,
+ On in the spheral sweep are sped.
+
+_Michael_. And tempests roar, glad warfare waging,
+ From sea to land, from land to sea,
+And bind round all, amidst their raging,
+ A chain of giant energy.
+There, lurid desolation, blazing,
+ Foreruns the volleyed thunder's way:
+Yet, Lord, thy messengers[2] are praising
+ The mild procession of thy day.
+
+_All Three_. The sight new strength to angels lendeth,
+ For none thy being fathom may,
+The works, no angel comprehendeth,
+ Stand lordly as on time's first day.
+
+_Mephistopheles_. Since, Lord, thou drawest near us once again,
+And how we do, dost graciously inquire,
+And to be pleased to see me once didst deign,
+I too among thy household venture nigher.
+Pardon, high words I cannot labor after,
+Though the whole court should look on me with scorn;
+My pathos certainly would stir thy laughter,
+Hadst thou not laughter long since quite forsworn.
+Of sun and worlds I've nought to tell worth mention,
+How men torment themselves takes my attention.
+The little God o' the world jogs on the same old way
+And is as singular as on the world's first day.
+A pity 'tis thou shouldst have given
+The fool, to make him worse, a gleam of light from heaven;
+He calls it reason, using it
+To be more beast than ever beast was yet.
+He seems to me, (your grace the word will pardon,)
+Like a long-legg'd grasshopper in the garden,
+Forever on the wing, and hops and sings
+The same old song, as in the grass he springs;
+Would he but stay there! no; he needs must muddle
+His prying nose in every puddle.
+
+_The Lord_. Hast nothing for our edification?
+Still thy old work of accusation?
+Will things on earth be never right for thee?
+
+_Mephistopheles_. No, Lord! I find them still as bad as bad can be.
+Poor souls! their miseries seem so much to please 'em,
+I scarce can find it in my heart to tease 'em.
+
+_The Lord_. Knowest thou Faust?
+
+_Mephistopheles_. The Doctor?
+
+_The Lord_. Ay, my servant!
+
+_Mephistopheles_. He!
+Forsooth! he serves you in a famous fashion;
+No earthly meat or drink can feed his passion;
+Its grasping greed no space can measure;
+Half-conscious and half-crazed, he finds no rest;
+The fairest stars of heaven must swell his treasure.
+Each highest joy of earth must yield its zest,
+Not all the world--the boundless azure--
+Can fill the void within his craving breast.
+
+_The Lord_. He serves me somewhat darkly, now, I grant,
+Yet will he soon attain the light of reason.
+Sees not the gardener, in the green young plant,
+That bloom and fruit shall deck its coming season?
+
+_Mephistopheles_. What will you bet? You'll surely lose your wager!
+If you will give me leave henceforth,
+To lead him softly on, like an old stager.
+
+_The Lord_. So long as he shall live on earth,
+Do with him all that you desire.
+Man errs and staggers from his birth.
+
+_Mephistopheles_. Thank you; I never did aspire
+To have with dead folk much transaction.
+In full fresh cheeks I take the greatest satisfaction.
+A corpse will never find me in the house;
+I love to play as puss does with the mouse.
+
+_The Lord_. All right, I give thee full permission!
+Draw down this spirit from its source,
+And, canst thou catch him, to perdition
+Carry him with thee in thy course,
+But stand abashed, if thou must needs confess,
+That a good man, though passion blur his vision,
+Has of the right way still a consciousness.
+
+_Mephistopheles_. Good! but I'll make it a short story.
+About my wager I'm by no means sorry.
+And if I gain my end with glory
+Allow me to exult from a full breast.
+Dust shall he eat and that with zest,
+Like my old aunt, the snake, whose fame is hoary.
+
+_The Lord_. Well, go and come, and make thy trial;
+The like of thee I never yet did hate.
+Of all the spirits of denial
+The scamp is he I best can tolerate.
+Man is too prone, at best, to seek the way that's easy,
+He soon grows fond of unconditioned rest;
+And therefore such a comrade suits him best,
+Who spurs and works, true devil, always busy.
+But you, true sons of God, in growing measure,
+Enjoy rich beauty's living stores of pleasure!
+The Word[3] divine that lives and works for aye,
+Fold you in boundless love's embrace alluring,
+And what in floating vision glides away,
+That seize ye and make fast with thoughts enduring.
+
+[_Heaven closes, the archangels disperse._]
+
+_Mephistopheles. [Alone.]_ I like at times to exchange with him a word,
+And take care not to break with him. 'Tis civil
+In the old fellow[4] and so great a Lord
+To talk so kindly with the very devil.
+
+
+
+
+ FAUST.
+
+
+ _Night. In a narrow high-arched Gothic room_,
+ FAUST _sitting uneasy at his desk_.
+
+_Faust_. Have now, alas! quite studied through
+Philosophy and Medicine,
+And Law, and ah! Theology, too,
+With hot desire the truth to win!
+And here, at last, I stand, poor fool!
+As wise as when I entered school;
+Am called Magister, Doctor, indeed,--
+Ten livelong years cease not to lead
+Backward and forward, to and fro,
+My scholars by the nose--and lo!
+Just nothing, I see, is the sum of our learning,
+To the very core of my heart 'tis burning.
+'Tis true I'm more clever than all the foplings,
+Doctors, Magisters, Authors, and Popelings;
+Am plagued by no scruple, nor doubt, nor cavil,
+Nor lingering fear of hell or devil--
+What then? all pleasure is fled forever;
+To know one thing I vainly endeavor,
+There's nothing wherein one fellow-creature
+Could be mended or bettered with me for a teacher.
+And then, too, nor goods nor gold have I,
+Nor fame nor worldly dignity,--
+A condition no dog could longer live in!
+And so to magic my soul I've given,
+If, haply, by spirits' mouth and might,
+Some mysteries may not be brought to light;
+That to teach, no longer may be my lot,
+With bitter sweat, what I need to be taught;
+That I may know what the world contains
+In its innermost heart and finer veins,
+See all its energies and seeds
+And deal no more in words but in deeds.
+ O full, round Moon, didst thou but thine
+For the last time on this woe of mine!
+Thou whom so many a midnight I
+Have watched, at this desk, come up the sky:
+O'er books and papers, a dreary pile,
+Then, mournful friend! uprose thy smile!
+Oh that I might on the mountain-height,
+Walk in the noon of thy blessed light,
+Round mountain-caverns with spirits hover,
+Float in thy gleamings the meadows over,
+And freed from the fumes of a lore-crammed brain,
+Bathe in thy dew and be well again!
+ Woe! and these walls still prison me?
+Dull, dismal hole! my curse on thee!
+Where heaven's own light, with its blessed beams,
+Through painted panes all sickly gleams!
+Hemmed in by these old book-piles tall,
+Which, gnawed by worms and deep in must,
+Rise to the roof against a wall
+Of smoke-stained paper, thick with dust;
+'Mid glasses, boxes, where eye can see,
+Filled with old, obsolete instruments,
+Stuffed with old heirlooms of implements--
+That is thy world! There's a world for thee!
+ And still dost ask what stifles so
+The fluttering heart within thy breast?
+By what inexplicable woe
+The springs of life are all oppressed?
+Instead of living nature, where
+God made and planted men, his sons,
+Through smoke and mould, around thee stare
+Grim skeletons and dead men's bones.
+ Up! Fly! Far out into the land!
+And this mysterious volume, see!
+By Nostradamus's[5] own hand,
+Is it not guide enough for thee?
+Then shalt thou thread the starry skies,
+And, taught by nature in her walks,
+The spirit's might shall o'er thee rise,
+As ghost to ghost familiar talks.
+Vain hope that mere dry sense should here
+Explain the holy signs to thee.
+I feel you, spirits, hovering near;
+Oh, if you hear me, answer me!
+ [_He opens the book and beholds the sign of the Macrocosm.[_6]]
+Ha! as I gaze, what ecstasy is this,
+In one full tide through all my senses flowing!
+I feel a new-born life, a holy bliss
+Through nerves and veins mysteriously glowing.
+Was it a God who wrote each sign?
+Which, all my inner tumult stilling,
+And this poor heart with rapture filling,
+Reveals to me, by force divine,
+Great Nature's energies around and through me thrilling?
+Am I a God? It grows so bright to me!
+Each character on which my eye reposes
+Nature in act before my soul discloses.
+The sage's word was truth, at last I see:
+"The spirit-world, unbarred, is waiting;
+Thy sense is locked, thy heart is dead!
+Up, scholar, bathe, unhesitating,
+The earthly breast in morning-red!"
+ [_He contemplates the sign._]
+How all one whole harmonious weaves,
+Each in the other works and lives!
+See heavenly powers ascending and descending,
+The golden buckets, one long line, extending!
+See them with bliss-exhaling pinions winging
+Their way from heaven through earth--their singing
+Harmonious through the universe is ringing!
+ Majestic show! but ah! a show alone!
+Nature! where find I thee, immense, unknown?
+Where you, ye breasts? Ye founts all life sustaining,
+On which hang heaven and earth, and where
+Men's withered hearts their waste repair--
+Ye gush, ye nurse, and I must sit complaining?
+ [_He opens reluctantly the book and sees the sign of the earth-spirit._]
+How differently works on me this sign!
+Thou, spirit of the earth, art to me nearer;
+I feel my powers already higher, clearer,
+I glow already as with new-pressed wine,
+I feel the mood to brave life's ceaseless clashing,
+To bear its frowning woes, its raptures flashing,
+To mingle in the tempest's dashing,
+And not to tremble in the shipwreck's crashing;
+Clouds gather o'er my head--
+Them moon conceals her light--
+The lamp goes out!
+It smokes!--Red rays are darting, quivering
+Around my head--comes down
+A horror from the vaulted roof
+And seizes me!
+Spirit that I invoked, thou near me art,
+Unveil thyself!
+Ha! what a tearing in my heart!
+Upheaved like an ocean
+My senses toss with strange emotion!
+I feel my heart to thee entirely given!
+Thou must! and though the price were life--were heaven!
+ [_He seizes the book and pronounces mysteriously the sign of the spirit.
+ A ruddy flame darts out, the spirit appears in the flame._]
+
+_Spirit_. Who calls upon me?
+
+_Faust. [Turning away.]_ Horrid sight!
+
+_Spirit_. Long have I felt the mighty action,
+Upon my sphere, of thy attraction,
+And now--
+
+_Faust_. Away, intolerable sprite!
+
+_Spirit_. Thou breath'st a panting supplication
+To hear my voice, my face to see;
+Thy mighty prayer prevails on me,
+I come!--what miserable agitation
+Seizes this demigod! Where is the cry of thought?
+Where is the breast? that in itself a world begot,
+And bore and cherished, that with joy did tremble
+And fondly dream us spirits to resemble.
+Where art thou, Faust? whose voice rang through my ear,
+Whose mighty yearning drew me from my sphere?
+Is this thing thou? that, blasted by my breath,
+Through all life's windings shuddereth,
+A shrinking, cringing, writhing worm!
+
+_Faust_. Thee, flame-born creature, shall I fear?
+'Tis I, 'tis Faust, behold thy peer!
+
+_Spirit_. In life's tide currents, in action's storm,
+Up and down, like a wave,
+Like the wind I sweep!
+Cradle and grave--
+A limitless deep---
+An endless weaving
+To and fro,
+A restless heaving
+Of life and glow,--
+So shape I, on Destiny's thundering loom,
+The Godhead's live garment, eternal in bloom.
+
+_Faust_. Spirit that sweep'st the world from end to end,
+How near, this hour, I feel myself to thee!
+
+_Spirit_. Thou'rt like the spirit thou canst comprehend,
+Not me! [_Vanishes._]
+
+_Faust_. [_Collapsing_.] Not thee?
+ Whom then?
+ I, image of the Godhead,
+ And no peer for thee!
+ [_A knocking_.]
+O Death! I know it!--'tis my Famulus--
+Good-bye, ye dreams of bliss Elysian!
+Shame! that so many a glowing vision
+This dried-up sneak must scatter thus!
+
+ [WAGNER, _in sleeping-gown and night-cap, a lamp in his hand._
+ FAUST _turns round with an annoyed look_.]
+
+_Wagner_. Excuse me! you're engaged in declamation;
+'Twas a Greek tragedy no doubt you read?
+I in this art should like initiation,
+For nowadays it stands one well instead.
+I've often heard them boast, a preacher
+Might profit with a player for his teacher.
+
+_Faust_. Yes, when the preacher is a player, granted:
+As often happens in our modern ways.
+
+_Wagner_. Ah! when one with such love of study's haunted,
+And scarcely sees the world on holidays,
+And takes a spy-glass, as it were, to read it,
+How can one by persuasion hope to lead it?
+
+_Faust_. What you don't feel, you'll never catch by hunting,
+It must gush out spontaneous from the soul,
+And with a fresh delight enchanting
+The hearts of all that hear control.
+Sit there forever! Thaw your glue-pot,--
+Blow up your ash-heap to a flame, and brew,
+With a dull fire, in your stew-pot,
+Of other men's leavings a ragout!
+Children and apes will gaze delighted,
+If their critiques can pleasure impart;
+But never a heart will be ignited,
+Comes not the spark from the speaker's heart.
+
+_Wagner_. Delivery makes the orator's success;
+There I'm still far behindhand, I confess.
+
+_Faust_. Seek honest gains, without pretence!
+Be not a cymbal-tinkling fool!
+Sound understanding and good sense
+Speak out with little art or rule;
+And when you've something earnest to utter,
+Why hunt for words in such a flutter?
+Yes, your discourses, that are so refined'
+In which humanity's poor shreds you frizzle,
+Are unrefreshing as the mist and wind
+That through the withered leaves of autumn whistle!
+
+_Wagner_. Ah God! well, art is long!
+And life is short and fleeting.
+What headaches have I felt and what heart-beating,
+When critical desire was strong.
+How hard it is the ways and means to master
+By which one gains each fountain-head!
+
+And ere one yet has half the journey sped,
+The poor fool dies--O sad disaster!
+
+_Faust_. Is parchment, then, the holy well-spring, thinkest,
+A draught from which thy thirst forever slakes?
+No quickening element thou drinkest,
+Till up from thine own soul the fountain breaks.
+
+_Wagner_. Excuse me! in these olden pages
+We catch the spirit of the by-gone ages,
+We see what wisest men before our day have thought,
+And to what glorious heights we their bequests have brought.
+
+_Faust_. O yes, we've reached the stars at last!
+My friend, it is to us,--the buried past,--
+A book with seven seals protected;
+Your spirit of the times is, then,
+At bottom, your own spirit, gentlemen,
+In which the times are seen reflected.
+And often such a mess that none can bear it;
+At the first sight of it they run away.
+A dust-bin and a lumber-garret,
+At most a mock-heroic play[8]
+With fine, pragmatic maxims teeming,
+The mouths of puppets well-beseeming!
+
+_Wagner_. But then the world! the heart and mind of man!
+To know of these who would not pay attention?
+
+_Faust_. To know them, yes, as weaklings can!
+Who dares the child's true name outright to mention?
+The few who any thing thereof have learned,
+Who out of their heart's fulness needs must gabble,
+And show their thoughts and feelings to the rabble,
+Have evermore been crucified and burned.
+I pray you, friend, 'tis wearing into night,
+Let us adjourn here, for the present.
+
+_Wagner_. I had been glad to stay till morning light,
+This learned talk with you has been so pleasant,
+But the first day of Easter comes to-morrow.
+And then an hour or two I'll borrow.
+With zeal have I applied myself to learning,
+True, I know much, yet to know all am burning.
+ [_Exit_.]
+
+_Faust_. [_Alone_.] See how in _his_ head only, hope still lingers,
+Who evermore to empty rubbish clings,
+With greedy hand grubs after precious things,
+And leaps for joy when some poor worm he fingers!
+ That such a human voice should dare intrude,
+Where all was full of ghostly tones and features!
+Yet ah! this once, my gratitude
+Is due to thee, most wretched of earth's creatures.
+Thou snatchedst me from the despairing state
+In which my senses, well nigh crazed, were sunken.
+The apparition was so giant-great,
+That to a very dwarf my soul had shrunken.
+ I, godlike, who in fancy saw but now
+Eternal truth's fair glass in wondrous nearness,
+Rejoiced in heavenly radiance and clearness,
+Leaving the earthly man below;
+I, more than cherub, whose free force
+Dreamed, through the veins of nature penetrating,
+To taste the life of Gods, like them creating,
+Behold me this presumption expiating!
+A word of thunder sweeps me from my course.
+ Myself with thee no longer dare I measure;
+Had I the power to draw thee down at pleasure;
+To hold thee here I still had not the force.
+Oh, in that blest, ecstatic hour,
+I felt myself so small, so great;
+Thou drovest me with cruel power
+Back upon man's uncertain fate
+What shall I do? what slum, thus lonely?
+That impulse must I, then, obey?
+Alas! our very deeds, and not our sufferings only,
+How do they hem and choke life's way!
+ To all the mind conceives of great and glorious
+A strange and baser mixture still adheres;
+Striving for earthly good are we victorious?
+A dream and cheat the better part appears.
+The feelings that could once such noble life inspire
+Are quenched and trampled out in passion's mire.
+ Where Fantasy, erewhile, with daring flight
+Out to the infinite her wings expanded,
+A little space can now suffice her quite,
+When hope on hope time's gulf has wrecked and stranded.
+Care builds her nest far down the heart's recesses,
+There broods o'er dark, untold distresses,
+Restless she sits, and scares thy joy and peace away;
+She puts on some new mask with each new day,
+Herself as house and home, as wife and child presenting,
+As fire and water, bane and blade;
+What never hits makes thee afraid,
+And what is never lost she keeps thee still lamenting.
+ Not like the Gods am I! Too deep that truth is thrust!
+But like the worm, that wriggles through the dust;
+Who, as along the dust for food he feels,
+Is crushed and buried by the traveller's heels.
+ Is it not dust that makes this lofty wall
+Groan with its hundred shelves and cases;
+The rubbish and the thousand trifles all
+That crowd these dark, moth-peopled places?
+Here shall my craving heart find rest?
+Must I perchance a thousand books turn over,
+To find that men are everywhere distrest,
+And here and there one happy one discover?
+Why grin'st thou down upon me, hollow skull?
+But that thy brain, like mine, once trembling, hoping,
+Sought the light day, yet ever sorrowful,
+Burned for the truth in vain, in twilight groping?
+Ye, instruments, of course, are mocking me;
+Its wheels, cogs, bands, and barrels each one praises.
+I waited at the door; you were the key;
+Your ward is nicely turned, and yet no bolt it raises.
+Unlifted in the broadest day,
+Doth Nature's veil from prying eyes defend her,
+And what (he chooses not before thee to display,
+Not all thy screws and levers can force her to surrender.
+Old trumpery! not that I e'er used thee, but
+Because my father used thee, hang'st thou o'er me,
+Old scroll! thou hast been stained with smoke and smut
+Since, on this desk, the lamp first dimly gleamed before me.
+Better have squandered, far, I now can clearly see,
+My little all, than melt beneath it, in this Tophet!
+That which thy fathers have bequeathed to thee,
+Earn and become possessor of it!
+What profits not a weary load will be;
+What it brings forth alone can yield the moment profit.
+ Why do I gaze as if a spell had bound me
+Up yonder? Is that flask a magnet to the eyes?
+What lovely light, so sudden, blooms around me?
+As when in nightly woods we hail the full-moon-rise.
+ I greet thee, rarest phial, precious potion!
+As now I take thee down with deep devotion,
+In thee I venerate man's wit and art.
+Quintessence of all soporific flowers,
+Extract of all the finest deadly powers,
+Thy favor to thy master now impart!
+I look on thee, the sight my pain appeases,
+I handle thee, the strife of longing ceases,
+The flood-tide of the spirit ebbs away.
+Far out to sea I'm drawn, sweet voices listening,
+The glassy waters at my feet are glistening,
+To new shores beckons me a new-born day.
+ A fiery chariot floats, on airy pinions,
+To where I sit! Willing, it beareth me,
+On a new path, through ether's blue dominions,
+To untried spheres of pure activity.
+This lofty life, this bliss elysian,
+Worm that thou waft erewhile, deservest thou?
+Ay, on this earthly sun, this charming vision,
+Turn thy back resolutely now!
+Boldly draw near and rend the gates asunder,
+By which each cowering mortal gladly steals.
+Now is the time to show by deeds of wonder
+That manly greatness not to godlike glory yields;
+Before that gloomy pit to stand, unfearing,
+Where Fantasy self-damned in its own torment lies,
+Still onward to that pass-way steering,
+Around whose narrow mouth hell-flames forever rise;
+Calmly to dare the step, serene, unshrinking,
+Though into nothingness the hour should see thee sinking.
+ Now, then, come down from thy old case, I bid thee,
+Where thou, forgotten, many a year hast hid thee,
+Into thy master's hand, pure, crystal glass!
+The joy-feasts of the fathers thou hast brightened,
+The hearts of gravest guests were lightened,
+When, pledged, from hand to hand they saw thee pass.
+Thy sides, with many a curious type bedight,
+Which each, as with one draught he quaffed the liquor
+Must read in rhyme from off the wondrous beaker,
+Remind me, ah! of many a youthful night.
+I shall not hand thee now to any neighbor,
+Not now to show my wit upon thy carvings labor;
+Here is a juice of quick-intoxicating might.
+The rich brown flood adown thy sides is streaming,
+With my own choice ingredients teeming;
+Be this last draught, as morning now is gleaming,
+Drained as a lofty pledge to greet the festal light!
+ [_He puts the goblet to his lips_.
+
+_Ringing of bells and choral song_.
+
+_Chorus of Angels_. Christ hath arisen!
+ Joy to humanity!
+ No more shall vanity,
+ Death and inanity
+ Hold thee in prison!
+
+_Faust_. What hum of music, what a radiant tone,
+Thrills through me, from my lips the goblet stealing!
+Ye murmuring bells, already make ye known
+The Easter morn's first hour, with solemn pealing?
+Sing you, ye choirs, e'en now, the glad, consoling song,
+That once, from angel-lips, through gloom sepulchral rung,
+A new immortal covenant sealing?
+
+_Chorus of Women_. Spices we carried,
+ Laid them upon his breast;
+ Tenderly buried
+ Him whom we loved the best;
+
+ Cleanly to bind him
+ Took we the fondest care,
+ Ah! and we find him
+ Now no more there.
+
+_Chorus of Angels_. Christ hath ascended!
+ Reign in benignity!
+ Pain and indignity,
+ Scorn and malignity,
+ _Their_ work have ended.
+
+_Faust_. Why seek ye me in dust, forlorn,
+Ye heavenly tones, with soft enchanting?
+Go, greet pure-hearted men this holy morn!
+Your message well I hear, but faith to me is wanting;
+Wonder, its dearest child, of Faith is born.
+To yonder spheres I dare no more aspire,
+Whence the sweet tidings downward float;
+And yet, from childhood heard, the old, familiar note
+Calls back e'en now to life my warm desire.
+Ah! once how sweetly fell on me the kiss
+Of heavenly love in the still Sabbath stealing!
+Prophetically rang the bells with solemn pealing;
+A prayer was then the ecstasy of bliss;
+A blessed and mysterious yearning
+Drew me to roam through meadows, woods, and skies;
+And, midst a thousand tear-drops burning,
+I felt a world within me rise
+That strain, oh, how it speaks youth's gleesome plays and feelings,
+Joys of spring-festivals long past;
+Remembrance holds me now, with childhood's fond appealings,
+Back from the fatal step, the last.
+Sound on, ye heavenly strains, that bliss restore me!
+Tears gush, once more the spell of earth is o'er me
+
+_Chorus of Disciples_. Has the grave's lowly one
+ Risen victorious?
+ Sits he, God's Holy One,
+ High-throned and glorious?
+ He, in this blest new birth,
+ Rapture creative knows;[9]
+ Ah! on the breast of earth
+ Taste we still nature's woes.
+ Left here to languish
+ Lone in a world like this,
+ Fills us with anguish
+ Master, thy bliss!
+
+_Chorus of Angels_. Christ has arisen
+ Out of corruption's gloom.
+ Break from your prison,
+ Burst every tomb!
+ Livingly owning him,
+ Lovingly throning him,
+ Feasting fraternally,
+ Praying diurnally,
+ Bearing his messages,
+ Sharing his promises,
+ Find ye your master near,
+ Find ye him here![10]
+
+
+
+
+ BEFORE THE GATE.
+
+ _Pedestrians of all descriptions stroll forth_.
+
+_Mechanics' Apprentices_. Where are you going to carouse?
+
+_Others_. We're all going out to the Hunter's House.
+
+_The First_. We're going, ourselves, out to the Mill-House, brothers.
+
+_An Apprentice_. The Fountain-House I rather recommend.
+
+_Second_. 'Tis not a pleasant road, my friend.
+
+_The second group_. What will you do, then?
+
+_A Third_. I go with the others.
+
+_Fourth_. Come up to Burgdorf, there you're sure to find good cheer,
+The handsomest of girls and best of beer,
+And rows, too, of the very first water.
+
+_Fifth_. You monstrous madcap, does your skin
+Itch for the third time to try that inn?
+I've had enough for _my_ taste in that quarter.
+
+_Servant-girl_. No! I'm going back again to town for one.
+
+_Others_. Under those poplars we are sure to meet him.
+
+_First Girl_. But that for me is no great fun;
+For you are always sure to get him,
+He never dances with any but you.
+Great good to me your luck will do!
+
+_Others_. He's not alone, I heard him say,
+The curly-head would be with him to-day.
+
+_Scholar_. Stars! how the buxom wenches stride there!
+Quick, brother! we must fasten alongside there.
+Strong beer, good smart tobacco, and the waist
+Of a right handsome gall, well rigg'd, now that's my taste.
+
+_Citizen's Daughter_. Do see those fine, young fellows yonder!
+'Tis, I declare, a great disgrace;
+When they might have the very best, I wonder,
+After these galls they needs must race!
+
+_Second scholar_ [_to the first_].
+Stop! not so fast! there come two more behind,
+My eyes! but ain't they dressed up neatly?
+One is my neighbor, or I'm blind;
+I love the girl, she looks so sweetly.
+Alone all quietly they go,
+You'll find they'll take us, by and bye, in tow.
+
+_First_. No, brother! I don't like these starched up ways.
+Make haste! before the game slips through our fingers.
+The hand that swings the broom o' Saturdays
+On Sundays round thy neck most sweetly lingers.
+
+_Citizen_. No, I don't like at all this new-made burgomaster!
+His insolence grows daily ever faster.
+No good from him the town will get!
+Will things grow better with him? Never!
+We're under more constraint than ever,
+And pay more tax than ever yet.
+
+_Beggar_. [_Sings_.] Good gentlemen, and you, fair ladies,
+ With such red cheeks and handsome dress,
+ Think what my melancholy trade is,
+ And see and pity my distress!
+ Help the poor harper, sisters, brothers!
+ Who loves to give, alone is gay.
+ This day, a holiday to others,
+ Make it for me a harvest day.
+
+_Another citizen_.
+Sundays and holidays, I like, of all things, a good prattle
+Of war and fighting, and the whole array,
+When back in Turkey, far away,
+The peoples give each other battle.
+One stands before the window, drinks his glass,
+And sees the ships with flags glide slowly down the river;
+Comes home at night, when out of sight they pass,
+And sings with joy, "Oh, peace forever!"
+
+_Third citizen_. So I say, neighbor! let them have their way,
+Crack skulls and in their crazy riot
+Turn all things upside down they may,
+But leave us here in peace and quiet.
+
+_Old Woman_ [_to the citizen's daughter_].
+Heyday, brave prinking this! the fine young blood!
+Who is not smitten that has met you?--
+But not so proud! All very good!
+And what you want I'll promise soon to get you.
+
+_Citizen's Daughter_. Come, Agatha! I dread in public sight
+To prattle with such hags; don't stay, O, Luddy!
+'Tis true she showed me, on St. Andrew's night,
+My future sweetheart in the body.
+
+_The other_. She showed me mine, too, in a glass,
+Right soldierlike, with daring comrades round him.
+I look all round, I study all that pass,
+But to this hour I have not found him.
+
+_Soldiers_. Castles with lowering
+ Bulwarks and towers,
+ Maidens with towering
+ Passions and powers,
+ Both shall be ours!
+ Daring the venture,
+ Glorious the pay!
+
+ When the brass trumpet
+ Summons us loudly,
+ Joy-ward or death-ward,
+ On we march proudly.
+ That is a storming!
+
+ Life in its splendor!
+ Castles and maidens
+ Both must surrender.
+ Daring the venture,
+ Glorious the pay.
+ There go the soldiers
+ Marching away!
+
+
+ FAUST _and_ WAGNER.
+
+_Faust_. Spring's warm look has unfettered the fountains,
+Brooks go tinkling with silvery feet;
+Hope's bright blossoms the valley greet;
+Weakly and sickly up the rough mountains
+Pale old Winter has made his retreat.
+Thence he launches, in sheer despite,
+Sleet and hail in impotent showers,
+O'er the green lawn as he takes his flight;
+But the sun will suffer no white,
+Everywhere waking the formative powers,
+Living colors he yearns to spread;
+Yet, as he finds it too early for flowers,
+Gayly dressed people he takes instead.
+Look from this height whereon we find us
+Back to the town we have left behind us,
+Where from the dark and narrow door
+Forth a motley multitude pour.
+They sun themselves gladly and all are gay,
+They celebrate Christ's resurrection to-day.
+For have not they themselves arisen?
+From smoky huts and hovels and stables,
+From labor's bonds and traffic's prison,
+From the confinement of roofs and gables,
+From many a cramping street and alley,
+From churches full of the old world's night,
+All have come out to the day's broad light.
+See, only see! how the masses sally
+Streaming and swarming through gardens and fields
+How the broad stream that bathes the valley
+Is everywhere cut with pleasure boats' keels,
+And that last skiff, so heavily laden,
+Almost to sinking, puts off in the stream;
+Ribbons and jewels of youngster and maiden
+From the far paths of the mountain gleam.
+How it hums o'er the fields and clangs from the steeple!
+This is the real heaven of the people,
+Both great and little are merry and gay,
+I am a man, too, I can be, to-day.
+
+_Wagner_. With you, Sir Doctor, to go out walking
+Is at all times honor and gain enough;
+But to trust myself here alone would be shocking,
+For I am a foe to all that is rough.
+Fiddling and bowling and screams and laughter
+To me are the hatefullest noises on earth;
+They yell as if Satan himself were after,
+And call it music and call it mirth.
+
+ [_Peasants (under the linden). Dance and song._]
+
+The shepherd prinked him for the dance,
+With jacket gay and spangle's glance,
+And all his finest quiddle.
+And round the linden lass and lad
+They wheeled and whirled and danced like mad.
+Huzza! huzza!
+Huzza! Ha, ha, ha!
+And tweedle-dee went the fiddle.
+
+And in he bounded through the whirl,
+And with his elbow punched a girl,
+Heigh diddle, diddle!
+The buxom wench she turned round quick,
+"Now that I call a scurvy trick!"
+Huzza! huzza!
+Huzza! ha, ha, ha!
+Tweedle-dee, tweedle-dee went the fiddle.
+
+And petticoats and coat-tails flew
+As up and down they went, and through,
+Across and down the middle.
+They all grew red, they all grew warm,
+And rested, panting, arm in arm,
+Huzza! huzza!
+Ta-ra-la!
+Tweedle-dee went the fiddle!
+
+"And don't be so familiar there!
+How many a one, with speeches fair,
+His trusting maid will diddle!"
+But still he flattered her aside--
+And from the linden sounded wide:
+Huzza! huzza!
+Huzza! huzza! ha! ha! ha!
+And tweedle-dee the fiddle.
+
+_Old Peasant._ Sir Doctor, this is kind of you,
+That with us here you deign to talk,
+And through the crowd of folk to-day
+A man so highly larned, walk.
+So take the fairest pitcher here,
+Which we with freshest drink have filled,
+I pledge it to you, praying aloud
+That, while your thirst thereby is stilled,
+So many days as the drops it contains
+May fill out the life that to you remains.
+
+_Faust._ I take the quickening draught and call
+For heaven's best blessing on one and all.
+
+ [_The people form a circle round him._]
+
+_Old Peasant._ Your presence with us, this glad day,
+We take it very kind, indeed!
+In truth we've found you long ere this
+In evil days a friend in need!
+Full many a one stands living here,
+Whom, at death's door already laid,
+Your father snatched from fever's rage,
+When, by his skill, the plague he stayed.
+You, a young man, we daily saw
+Go with him to the pest-house then,
+And many a corpse was carried forth,
+But you came out alive again.
+With a charmed life you passed before us,
+Helped by the Helper watching o'er us.
+
+_All._ The well-tried man, and may he live,
+Long years a helping hand to give!
+
+_Faust._ Bow down to Him on high who sends
+His heavenly help and helping friends!
+ [_He goes on with_ WAGNER.]
+
+_Wagner._ What feelings, O great man, thy heart must swell
+Thus to receive a people's veneration!
+O worthy all congratulation,
+Whose gifts to such advantage tell.
+The father to his son shows thee with exultation,
+All run and crowd and ask, the circle closer draws,
+The fiddle stops, the dancers pause,
+Thou goest--the lines fall back for thee.
+They fling their gay-decked caps on high;
+A little more and they would bow the knee
+As if the blessed Host came by.
+
+_Faust._ A few steps further on, until we reach that stone;
+There will we rest us from our wandering.
+How oft in prayer and penance there alone,
+Fasting, I sate, on holy mysteries pondering.
+There, rich in hope, in faith still firm,
+I've wept, sighed, wrung my hands and striven
+This plague's removal to extort (poor worm!)
+From the almighty Lord of Heaven.
+The crowd's applause has now a scornful tone;
+O couldst thou hear my conscience tell its story,
+How little either sire or son
+Has done to merit such a glory!
+My father was a worthy man, confused
+And darkened with his narrow lucubrations,
+Who with a whimsical, though well-meant patience,
+On Nature's holy circles mused.
+Shut up in his black laboratory,
+Experimenting without end,
+'Midst his adepts, till he grew hoary,
+He sought the opposing powers to blend.
+Thus, a red lion,[11] a bold suitor, married
+The silver lily, in the lukewarm bath,
+And, from one bride-bed to another harried,
+The two were seen to fly before the flaming wrath.
+If then, with colors gay and splendid,
+The glass the youthful queen revealed,
+Here was the physic, death the patients' sufferings ended,
+And no one asked, who then was healed?
+Thus, with electuaries so satanic,
+Worse than the plague with all its panic,
+We rioted through hill and vale;
+Myself, with my own hands, the drug to thousands giving,
+They passed away, and I am living
+To hear men's thanks the murderers hail!
+
+_Wagner._ Forbear! far other name that service merits!
+Can a brave man do more or less
+Than with nice conscientiousness
+To exercise the calling he inherits?
+If thou, as youth, thy father honorest,
+To learn from him thou wilt desire;
+If thou, as man, men with new light hast blest,
+Then may thy son to loftier heights aspire.
+
+_Faust._ O blest! who hopes to find repose,
+Up from this mighty sea of error diving!
+Man cannot use what he already knows,
+To use the unknown ever striving.
+But let not such dark thoughts a shadow throw
+O'er the bright joy this hour inspires!
+See how the setting sun, with ruddy glow,
+The green-embosomed hamlet fires!
+He sinks and fades, the day is lived and gone,
+He hastens forth new scenes of life to waken.
+O for a wing to lift and bear me on,
+And on, to where his last rays beckon!
+Then should I see the world's calm breast
+In everlasting sunset glowing,
+The summits all on fire, each valley steeped in rest,
+The silver brook to golden rivers flowing.
+No savage mountain climbing to the skies
+Should stay the godlike course with wild abysses;
+And now the sea, with sheltering, warm recesses
+Spreads out before the astonished eyes.
+At last it seems as if the God were sinking;
+But a new impulse fires the mind,
+Onward I speed, his endless glory drinking,
+The day before me and the night behind,
+The heavens above my head and under me the ocean.
+A lovely dream,--meanwhile he's gone from sight.
+Ah! sure, no earthly wing, in swiftest flight,
+May with the spirit's wings hold equal motion.
+Yet has each soul an inborn feeling
+Impelling it to mount and soar away,
+When, lost in heaven's blue depths, the lark is pealing
+High overhead her airy lay;
+When o'er the mountain pine's black shadow,
+With outspread wing the eagle sweeps,
+And, steering on o'er lake and meadow,
+The crane his homeward journey keeps.
+
+_Wagner._ I've had myself full many a wayward hour,
+But never yet felt such a passion's power.
+One soon grows tired of field and wood and brook,
+I envy not the fowl of heaven his pinions.
+Far nobler joy to soar through thought's dominions
+From page to page, from book to book!
+Ah! winter nights, so dear to mind and soul!
+Warm, blissful life through all the limbs is thrilling,
+And when thy hands unfold a genuine ancient scroll,
+It seems as if all heaven the room were filling.
+
+_Faust_. One passion only has thy heart possessed;
+The other, friend, O, learn it never!
+Two souls, alas! are lodged in my wild breast,
+Which evermore opposing ways endeavor,
+The one lives only on the joys of time,
+Still to the world with clamp-like organs clinging;
+The other leaves this earthly dust and slime,
+To fields of sainted sires up-springing.
+O, are there spirits in the air,
+That empire hold 'twixt earth's and heaven's dominions,
+Down from your realm of golden haze repair,
+Waft me to new, rich life, upon your rosy pinions!
+Ay! were a magic mantle only mine,
+To soar o'er earth's wide wildernesses,
+I would not sell it for the costliest dresses,
+Not for a royal robe the gift resign.
+
+_Wagner_. O, call them not, the well known powers of air,
+That swarm through all the middle kingdom, weaving
+Their fairy webs, with many a fatal snare
+The feeble race of men deceiving.
+First, the sharp spirit-tooth, from out the North,
+And arrowy tongues and fangs come thickly flying;
+Then from the East they greedily dart forth,
+Sucking thy lungs, thy life-juice drying;
+If from the South they come with fever thirst,
+Upon thy head noon's fiery splendors heaping;
+The Westwind brings a swarm, refreshing first,
+Then all thy world with thee in stupor steeping.
+They listen gladly, aye on mischief bent,
+Gladly draw near, each weak point to espy,
+They make believe that they from heaven are sent,
+Whispering like angels, while they lie.
+But let us go! The earth looks gray, my friend,
+The air grows cool, the mists ascend!
+At night we learn our homes to prize.--
+Why dost thou stop and stare with all thy eyes?
+What can so chain thy sight there, in the gloaming?
+
+_Faust_. Seest thou that black dog through stalks and stubble roaming?
+
+_Wagner_. I saw him some time since, he seemed not strange to me.
+
+_Faust_. Look sharply! What dost take the beast to be?
+
+_Wagner_. For some poor poodle who has lost his master,
+And, dog-like, scents him o'er the ground.
+
+_Faust_. Markst thou how, ever nearer, ever faster,
+Towards us his spiral track wheels round and round?
+And if my senses suffer no confusion,
+Behind him trails a fiery glare.
+
+_Wagner_. 'Tis probably an optical illusion;
+I still see only a black poodle there.
+
+_Faust_. He seems to me as he were tracing slyly
+His magic rings our feet at last to snare.
+
+_Wagner_. To me he seems to dart around our steps so shyly,
+As if he said: is one of them my master there?
+
+_Faust_. The circle narrows, he is near!
+
+_Wagner_. Thou seest! a dog we have, no spectre, here!
+He growls and stops, crawls on his belly, too,
+And wags his tail,--as all dogs do.
+
+_Faust_. Come here, sir! come, our comrade be!
+
+_Wagner_. He has a poodle's drollery.
+Stand still, and he, too, waits to see;
+Speak to him, and he jumps on thee;
+Lose something, drop thy cane or sling it
+Into the stream, he'll run and bring it.
+
+_Faust_. I think you're right; I trace no spirit here,
+'Tis all the fruit of training, that is clear.
+
+_Wagner_. A well-trained dog is a great treasure,
+Wise men in such will oft take pleasure.
+And he deserves your favor and a collar,
+He, of the students the accomplished scholar.
+
+ [_They go in through the town gate._]
+
+
+
+
+ STUDY-CHAMBER.
+
+ _Enter_ FAUST _with the_ POODLE.
+
+
+I leave behind me field and meadow
+Veiled in the dusk of holy night,
+Whose ominous and awful shadow
+Awakes the better soul to light.
+To sleep are lulled the wild desires,
+The hand of passion lies at rest;
+The love of man the bosom fires,
+The love of God stirs up the breast.
+
+Be quiet, poodle! what worrisome fiend hath possest thee,
+Nosing and snuffling so round the door?
+Go behind the stove there and rest thee,
+There's my best pillow--what wouldst thou more?
+As, out on the mountain-paths, frisking and leaping,
+Thou, to amuse us, hast done thy best,
+So now in return lie still in my keeping,
+A quiet, contented, and welcome guest.
+
+When, in our narrow chamber, nightly,
+The friendly lamp begins to burn,
+Then in the bosom thought beams brightly,
+Homeward the heart will then return.
+Reason once more bids passion ponder,
+Hope blooms again and smiles on man;
+Back to life's rills he yearns to wander,
+Ah! to the source where life began.
+
+Stop growling, poodle! In the music Elysian
+That laps my soul at this holy hour,
+These bestial noises have jarring power.
+We know that men will treat with derision
+Whatever they cannot understand,
+At goodness and truth and beauty's vision
+Will shut their eyes and murmur and howl at it;
+And must the dog, too, snarl and growl at it?
+
+But ah, with the best will, I feel already,
+No peace will well up in me, clear and steady.
+But why must hope so soon deceive us,
+And the dried-up stream in fever leave us?
+For in this I have had a full probation.
+And yet for this want a supply is provided,
+To a higher than earth the soul is guided,
+We are ready and yearn for revelation:
+And where are its light and warmth so blent
+As here in the New Testament?
+I feel, this moment, a mighty yearning
+To expound for once the ground text of all,
+The venerable original
+Into my own loved German honestly turning.
+ [_He opens the volume, and applies himself to the task_.]
+"In the beginning was the _Word_." I read.
+But here I stick! Who helps me to proceed?
+The _Word_--so high I cannot--dare not, rate it,
+I must, then, otherwise translate it,
+If by the spirit I am rightly taught.
+It reads: "In the beginning was the _thought_."
+But study well this first line's lesson,
+Nor let thy pen to error overhasten!
+Is it the _thought_ does all from time's first hour?
+"In the beginning," read then, "was the _power_."
+Yet even while I write it down, my finger
+Is checked, a voice forbids me there to linger.
+The spirit helps! At once I dare to read
+And write: "In the beginning was the _deed_."
+
+If I with thee must share my chamber,
+Poodle, now, remember,
+No more howling,
+No more growling!
+I had as lief a bull should bellow,
+As have for a chum such a noisy fellow.
+Stop that yell, now,
+One of us must quit this cell now!
+'Tis hard to retract hospitality,
+But the door is open, thy way is free.
+But what ails the creature?
+Is this in the course of nature?
+Is it real? or one of Fancy's shows?
+
+How long and broad my poodle grows!
+He rises from the ground;
+That is no longer the form of a hound!
+Heaven avert the curse from us!
+He looks like a hippopotamus,
+With his fiery eyes and the terrible white
+Of his grinning teeth! oh what a fright
+Have I brought with me into the house! Ah now,
+No mystery art thou!
+Methinks for such half hellish brood
+The key of Solomon were good.
+
+_Spirits_ [_in the passage_]. Softly! a fellow is caught there!
+ Keep back, all of you, follow him not there!
+ Like the fox in the trap,
+ Mourns the old hell-lynx his mishap.
+ But give ye good heed!
+ This way hover, that way hover,
+ Over and over,
+ And he shall right soon be freed.
+ Help can you give him,
+ O do not leave him!
+ Many good turns he's done us,
+ Many a fortune won us.
+
+_Faust_. First, to encounter the creature
+By the spell of the Four, says the teacher:
+ Salamander shall glisten,[12]
+ Undina lapse lightly,
+ Sylph vanish brightly,
+ Kobold quick listen.
+
+He to whom Nature
+Shows not, as teacher,
+Every force
+And secret source,
+Over the spirits
+No power inherits.
+
+ Vanish in glowing
+ Flame, Salamander!
+ Inward, spirally flowing,
+ Gurgle, Undine!
+ Gleam in meteoric splendor,
+ Airy Queen!
+ Thy homely help render,
+ Incubus! Incubus!
+ Forth and end the charm for us!
+
+No kingdom of Nature
+Resides in the creature.
+He lies there grinning--'tis clear, my charm
+Has done the monster no mite of harm.
+I'll try, for thy curing,
+Stronger adjuring.
+
+ Art thou a jail-bird,
+ A runaway hell-bird?
+ This sign,[13] then--adore it!
+ They tremble before it
+ All through the dark dwelling.
+
+His hair is bristling--his body swelling.
+
+ Reprobate creature!
+ Canst read his nature?
+ The Uncreated,
+ Ineffably Holy,
+ With Deity mated,
+ Sin's victim lowly?
+
+Driven behind the stove by my spells,
+Like an elephant he swells;
+He fills the whole room, so huge he's grown,
+He waxes shadowy faster and faster.
+Rise not up to the ceiling--down!
+Lay thyself at the feet of thy master!
+Thou seest, there's reason to dread my ire.
+I'll scorch thee with the holy fire!
+Wait not for the sight
+Of the thrice-glowing light!
+Wait not to feel the might
+Of the potentest spell in all my treasure!
+
+
+ MEPHISTOPHELES.
+ [_As the mist sinks, steps forth from behind the stove,
+ dressed as a travelling scholasticus_.]
+Why all this noise? What is your worship's pleasure?
+
+_Faust_. This was the poodle's essence then!
+A travelling clark? Ha! ha! The casus is too funny.
+
+_Mephistopheles_. I bow to the most learned among men!
+'Faith you did sweat me without ceremony.
+
+_Faust_. What is thy name?
+
+_Mephistopheles_. The question seems too small
+For one who holds the _word_ so very cheaply,
+Who, far removed from shadows all,
+For substances alone seeks deeply.
+
+_Faust_. With gentlemen like him in my presence,
+The name is apt to express the essence,
+Especially if, when you inquire,
+You find it God of flies,[14] Destroyer, Slanderer, Liar.
+Well now, who art thou then?
+
+_Mephistopheles_. A portion of that power,
+Which wills the bad and works the good at every hour.
+
+_Faust_. Beneath thy riddle-word what meaning lies?
+
+_Mephistopheles_. I am the spirit that denies!
+And justly so; for all that time creates,
+He does well who annihilates!
+Better, it ne'er had had beginning;
+And so, then, all that you call sinning,
+Destruction,--all you pronounce ill-meant,--
+Is my original element.
+
+_Faust_. Thou call'st thyself a part, yet lookst complete to me.
+
+_Mephistopheles_. I speak the modest truth to thee.
+A world of folly in one little soul,
+_Man_ loves to think himself a whole;
+Part of the part am I, which once was all, the Gloom
+That brought forth Light itself from out her mighty womb,
+The upstart proud, that now with mother Night
+Disputes her ancient rank and space and right,
+Yet never shall prevail, since, do whate'er he will,
+He cleaves, a slave, to bodies still;
+From bodies flows, makes bodies fair to sight;
+A body in his course can check him,
+His doom, I therefore hope, will soon o'ertake him,
+With bodies merged in nothingness and night.
+
+_Faust_. Ah, now I see thy high vocation!
+In gross thou canst not harm creation,
+And so in small hast now begun.
+
+_Mephistopheles_. And, truth to tell, e'en here, not much have done.
+That which at nothing the gauntlet has hurled,
+This, what's its name? this clumsy world,
+So far as I have undertaken,
+I have to own, remains unshaken
+By wave, storm, earthquake, fiery brand.
+Calm, after all, remain both sea and land.
+And the damn'd living fluff, of man and beast the brood,
+It laughs to scorn my utmost power.
+I've buried myriads by the hour,
+And still there circulates each hour a new, fresh blood.
+It were enough to drive one to distraction!
+Earth, water, air, in constant action,
+Through moist and dry, through warm and cold,
+Going forth in endless germination!
+Had I not claimed of fire a reservation,
+Not one thing I alone should hold.
+
+_Faust_. Thus, with the ever-working power
+Of good dost thou in strife persist,
+And in vain malice, to this hour,
+Clenchest thy cold and devilish fist!
+Go try some other occupation,
+Singular son of Chaos, thou!
+
+_Mephistopheles_. We'll give the thing consideration,
+When next we meet again! But now
+Might I for once, with leave retire?
+
+_Faust_. Why thou shouldst ask I do not see.
+Now that I know thee, when desire
+Shall prompt thee, freely visit me.
+Window and door give free admission.
+At least there's left the chimney flue.
+
+_Mephistopheles_. Let me confess there's one small prohibition
+
+Lies on thy threshold, 'gainst my walking through,
+The wizard-foot--[15]
+
+_Faust_. Does that delay thee?
+The Pentagram disturbs thee? Now,
+Come tell me, son of hell, I pray thee,
+If that spell-binds thee, then how enteredst thou?
+_Thou_ shouldst proceed more circumspectly!
+
+_Mephistopheles_. Mark well! the figure is not drawn correctly;
+One of the angles, 'tis the outer one,
+Is somewhat open, dost perceive it?
+
+_Faust_. That was a lucky hit, believe it!
+And I have caught thee then? Well done!
+'Twas wholly chance--I'm quite astounded!
+
+_Mephistopheles_. The _poodle_ took no heed,
+as through the door he bounded;
+The case looks differently now;
+The _devil_ can leave the house no-how.
+
+_Faust_. The window offers free emission.
+
+_Mephistopheles_. Devils and ghosts are bound by this condition:
+
+The way they entered in, they must come out. Allow
+In the first clause we're free, yet not so in the second.
+
+_Faust_. In hell itself, then, laws are reckoned?
+Now that I like; so then, one may, in fact,
+Conclude a binding compact with you gentry?
+
+_Mephistopheles_. Whatever promise on our books finds entry,
+We strictly carry into act.
+But hereby hangs a grave condition,
+Of this we'll talk when next we meet;
+But for the present I entreat
+Most urgently your kind dismission.
+
+_Faust_. Do stay but just one moment longer, then,
+Tell me good news and I'll release thee.
+
+_Mephistopheles_. Let me go now! I'll soon come back again,
+Then may'st thou ask whate'er shall please thee.
+
+_Faust_. I laid no snare for thee, old chap!
+Thou shouldst have watched and saved thy bacon.
+Who has the devil in his trap
+Must hold him fast, next time he'll not so soon be taken.
+
+_Mephistopheles_. Well, if it please thee, I'm content to stay
+For company, on one condition,
+That I, for thy amusement, may
+To exercise my arts have free permission.
+
+_Faust_. I gladly grant it, if they be
+Not disagreeable to me.
+
+_Mephistopheles_. Thy senses, friend, in this one hour
+Shall grasp the world with clearer power
+Than in a year's monotony.
+The songs the tender spirits sing thee,
+The lovely images they bring thee
+Are not an idle magic play.
+Thou shalt enjoy the daintiest savor,
+Then feast thy taste on richest flavor,
+Then thy charmed heart shall melt away.
+Come, all are here, and all have been
+Well trained and practised, now begin!
+
+_Spirits_. Vanish, ye gloomy
+ Vaulted abysses!
+ Tenderer, clearer,
+ Friendlier, nearer,
+ Ether, look through!
+ O that the darkling
+ Cloud-piles were riven!
+ Starlight is sparkling,
+ Purer is heaven,
+ Holier sunshine
+ Softens the blue.
+ Graces, adorning
+ Sons of the morning--
+ Shadowy wavings--
+ Float along over;
+ Yearnings and cravings
+ After them hover.
+ Garments ethereal,
+ Tresses aerial,
+ Float o'er the flowers,
+ Float o'er the bowers,
+ Where, with deep feeling,
+ Thoughtful and tender,
+ Lovers, embracing,
+ Life-vows are sealing.
+ Bowers on bowers!
+ Graceful and slender
+ Vines interlacing!
+ Purple and blushing,
+ Under the crushing
+ Wine-presses gushing,
+ Grape-blood, o'erflowing,
+ Down over gleaming
+ Precious stones streaming,
+ Leaves the bright glowing
+ Tops of the mountains,
+ Leaves the red fountains,
+ Widening and rushing,
+ Till it encloses
+ Green hills all flushing,
+ Laden with roses.
+ Happy ones, swarming,
+ Ply their swift pinions,
+ Glide through the charming
+ Airy dominions,
+ Sunward still fleering,
+ Onward, where peering
+ Far o'er the ocean,
+ Islets are dancing
+ With an entrancing,
+ Magical motion;
+ Hear them, in chorus,
+ Singing high o'er us;
+ Over the meadows
+ Flit the bright shadows;
+ Glad eyes are glancing,
+ Tiny feet dancing.
+ Up the high ridges
+ Some of them clamber,
+ Others are skimming
+ Sky-lakes of amber,
+ Others are swimming
+ Over the ocean;--
+ All are in motion,
+ Life-ward all yearning,
+ Longingly turning
+ To the far-burning
+ Star-light of bliss.
+
+_Mephistopheles_. He sleeps! Ye airy, tender youths, your numbers
+Have sung him into sweetest slumbers!
+You put me greatly in your debt by this.
+Thou art not yet the man that shall hold fast the devil!
+Still cheat his senses with your magic revel,
+Drown him in dreams of endless youth;
+But this charm-mountain on the sill to level,
+I need, O rat, thy pointed tooth!
+Nor need I conjure long, they're near me,
+E'en now comes scampering one, who presently will hear me.
+
+The sovereign lord of rats and mice,
+Of flies and frogs and bugs and lice,
+Commands thee to come forth this hour,
+And gnaw this threshold with great power,
+As he with oil the same shall smear--
+Ha! with a skip e'en now thou'rt here!
+But brisk to work! The point by which I'm cowered,
+Is on the ledge, the farthest forward.
+Yet one more bite, the deed is done.--
+Now, Faust, until we meet again, dream on!
+
+_Faust_. [_Waking_.] Again has witchcraft triumphed o'er me?
+Was it a ghostly show, so soon withdrawn?
+I dream, the devil stands himself before me--wake, to find a poodle gone!
+
+
+
+
+ STUDY-CHAMBER.
+
+ FAUST. MEPHISTOPHELES.
+
+
+_Faust_. A knock? Walk in! Who comes again to tease me?
+
+_Mephistopheles_. 'Tis I.
+
+_Faust_. Come in!
+
+_Mephistopheles_. Must say it thrice, to please me.
+
+_Faust_. Come in then!
+
+_Mephistopheles_. That I like to hear.
+We shall, I hope, bear with each other;
+For to dispel thy crotchets, brother,
+As a young lord, I now appear,
+In scarlet dress, trimmed with gold lacing,
+A stiff silk cloak with stylish facing,
+A tall cock's feather in my hat,
+A long, sharp rapier to defend me,
+And I advise thee, short and flat,
+In the same costume to attend me;
+If thou wouldst, unembarrassed, see
+What sort of thing this life may be.
+
+_Faust_. In every dress I well may feel the sore
+Of this low earth-life's melancholy.
+I am too old to live for folly,
+Too young, to wish for nothing more.
+Am I content with all creation?
+Renounce! renounce! Renunciation--
+Such is the everlasting song
+That in the ears of all men rings,
+Which every hour, our whole life long,
+With brazen accents hoarsely sings.
+With terror I behold each morning's light,
+With bitter tears my eyes are filling,
+To see the day that shall not in its flight
+Fulfil for me one wish, not one, but killing
+Every presentiment of zest
+With wayward skepticism, chases
+The fair creations from my breast
+With all life's thousand cold grimaces.
+And when at night I stretch me on my bed
+And darkness spreads its shadow o'er me;
+No rest comes then anigh my weary head,
+Wild dreams and spectres dance before me.
+The God who dwells within my soul
+Can heave its depths at any hour;
+Who holds o'er all my faculties control
+Has o'er the outer world no power;
+Existence lies a load upon my breast,
+Life is a curse and death a long'd-for rest.
+
+_Mephistopheles_. And yet death never proves a wholly welcome guest.
+
+_Faust_. O blest! for whom, when victory's joy fire blazes,
+Death round his brow the bloody laurel windeth,
+Whom, weary with the dance's mazes,
+He on a maiden's bosom findeth.
+O that, beneath the exalted spirit's power,
+I had expired, in rapture sinking!
+
+_Mephistopheles_. And yet I knew one, in a midnight hour,
+Who a brown liquid shrank from drinking.
+
+_Faust_. Eaves-dropping seems a favorite game with thee.
+
+_Mephistopheles_. Omniscient am I not; yet much is known to me.
+
+_Faust_. Since that sweet tone, with fond appealing,
+Drew me from witchcraft's horrid maze,
+And woke the lingering childlike feeling
+With harmonies of happier days;
+My curse on all the mock-creations
+That weave their spell around the soul,
+And bind it with their incantations
+And orgies to this wretched hole!
+Accursed be the high opinion
+Hugged by the self-exalting mind!
+Accursed all the dream-dominion
+That makes the dazzled senses blind!
+Curs'd be each vision that befools us,
+Of fame, outlasting earthly life!
+Curs'd all that, as possession, rules us,
+As house and barn, as child and wife!
+Accurs'd be mammon, when with treasure
+He fires our hearts for deeds of might,
+When, for a dream of idle pleasure,
+He makes our pillow smooth and light!
+Curs'd be the grape-vine's balsam-juices!
+On love's high grace my curses fall!
+On faith! On hope that man seduces,
+On patience last, not least, of all!
+
+_Choir of spirits_. [_Invisible_.] Woe! Woe!
+ Thou hast ground it to dust,
+ The beautiful world,
+ With mighty fist;
+ To ruins 'tis hurled;
+ A demi-god's blow hath done it!
+ A moment we look upon it,
+ Then carry (sad duty!)
+ The fragments over into nothingness,
+ With tears unavailing
+ Bewailing
+ All the departed beauty.
+ Lordlier
+ Than all sons of men,
+ Proudlier
+ Build it again,
+ Build it up in thy breast anew!
+ A fresh career pursue,
+ Before thee
+ A clearer view,
+ And, from the Empyréan,
+ A new-born Paean
+ Shall greet thee, too!
+
+_Mephistopheles_. Be pleased to admire
+ My juvenile choir!
+ Hear how they counsel in manly measure
+ Action and pleasure!
+ Out into life,
+ Its joy and strife,
+ Away from this lonely hole,
+ Where senses and soul
+ Rot in stagnation,
+ Calls thee their high invitation.
+
+Give over toying with thy sorrow
+Which like a vulture feeds upon thy heart;
+Thou shalt, in the worst company, to-morrow
+Feel that with men a man thou art.
+Yet I do not exactly intend
+Among the canaille to plant thee.
+I'm none of your magnates, I grant thee;
+Yet if thou art willing, my friend,
+Through life to jog on beside me,
+Thy pleasure in all things shall guide me,
+To thee will I bind me,
+A friend thou shalt find me,
+And, e'en to the grave,
+Shalt make me thy servant, make me thy slave!
+
+_Faust_. And in return what service shall I render?
+
+_Mephistopheles_. There's ample grace--no hurry, not the least.
+
+_Faust_. No, no, the devil is an egotist,
+And does not easily "for God's sake" tender
+That which a neighbor may assist.
+Speak plainly the conditions, come!
+'Tis dangerous taking such a servant home.
+
+_Mephistopheles_. I to thy service _here_ agree to bind me,
+To run and never rest at call of thee;
+When _over yonder_ thou shalt find me,
+Then thou shalt do as much for me.
+
+_Faust_. I care not much what's over yonder:
+When thou hast knocked this world asunder,
+Come if it will the other may!
+Up from this earth my pleasures all are streaming,
+Down on my woes this earthly sun is beaming;
+Let me but end this fit of dreaming,
+Then come what will, I've nought to say.
+I'll hear no more of barren wonder
+If in that world they hate and love,
+And whether in that future yonder
+There's a Below and an Above.
+
+_Mephistopheles._ In such a mood thou well mayst venture.
+Bind thyself to me, and by this indenture
+Thou shalt enjoy with relish keen
+Fruits of my arts that man had never seen.
+
+_Faust_. And what hast thou to give, poor devil?
+Was e'er a human mind, upon its lofty level,
+Conceived of by the like of thee?
+Yet hast thou food that brings satiety,
+Not satisfaction; gold that reftlessly,
+Like quicksilver, melts down within
+The hands; a game in which men never win;
+A maid that, hanging on my breast,
+Ogles a neighbor with her wanton glances;
+Of fame the glorious godlike zest,
+That like a short-lived meteor dances--
+Show me the fruit that, ere it's plucked, will rot,
+And trees from which new green is daily peeping!
+
+_Mephistopheles_. Such a requirement scares me not;
+Such treasures have I in my keeping.
+Yet shall there also come a time, good friend,
+When we may feast on good things at our leisure.
+
+_Faust_. If e'er I lie content upon a lounge of pleasure--
+Then let there be of me an end!
+When thou with flattery canst cajole me,
+Till I self-satisfied shall be,
+When thou with pleasure canst befool me,
+Be that the last of days for me!
+I lay the wager!
+
+_Mephistopheles_. Done!
+
+_Faust_. And heartily!
+Whenever to the passing hour
+I cry: O stay! thou art so fair!
+To chain me down I give thee power
+To the black bottom of despair!
+Then let my knell no longer linger,
+Then from my service thou art free,
+Fall from the clock the index-finger,
+Be time all over, then, for me!
+
+_Mephistopheles_. Think well, for we shall hold you to the letter.
+
+_Faust_. Full right to that just now I gave;
+I spoke not as an idle braggart better.
+Henceforward I remain a slave,
+What care I who puts on the setter?
+
+_Mephistopheles_. I shall this very day, at Doctor's-feast,[16]
+My bounden service duly pay thee.
+But one thing!--For insurance' sake, I pray thee,
+Grant me a line or two, at least.
+
+_Faust_. Pedant! will writing gain thy faith, alone?
+In all thy life, no man, nor man's word hast thou known?
+Is't not enough that I the fatal word
+That passes on my future days have spoken?
+The world-stream raves and rushes (hast not heard?)
+And shall a promise hold, unbroken?
+Yet this delusion haunts the human breast,
+Who from his soul its roots would sever?
+Thrice happy in whose heart pure truth finds rest.
+No sacrifice shall he repent of ever!
+But from a formal, written, sealed attest,
+As from a spectre, all men shrink forever.
+The word and spirit die together,
+Killed by the sight of wax and leather.
+What wilt thou, evil sprite, from me?
+Brass, marble, parchment, paper, shall it be?
+Shall I subscribe with pencil, pen or graver?
+Among them all thy choice is free.
+
+_Mephistopheles_. This rhetoric of thine to me
+Hath a somewhat bombastic savor.
+Any small scrap of paper's good.
+Thy signature will need a single drop of blood.[17]
+
+_Faust_. If this will satisfy thy mood,
+I will consent thy whim to favor.
+
+_Mephistopheles._ Quite a peculiar juice is blood.
+
+_Faust_. Fear not that I shall break this bond; O, never!
+My promise, rightly understood,
+Fulfils my nature's whole endeavor.
+I've puffed myself too high, I see;
+To _thy_ rank only I belong.
+The Lord of Spirits scorneth me,
+Nature, shut up, resents the wrong.
+The thread of thought is snapt asunder,
+All science to me is a stupid blunder.
+Let us in sensuality's deep
+Quench the passions within us blazing!
+And, the veil of sorcery raising,
+Wake each miracle from its long sleep!
+Plunge we into the billowy dance,
+The rush and roll of time and chance!
+Then may pleasure and distress,
+Disappointment and success,
+Follow each other as fast as they will;
+Man's restless activity flourishes still.
+
+_Mephistopheles_. No bound or goal is set to you;
+Where'er you like to wander sipping,
+And catch a tit-bit in your skipping,
+Eschew all coyness, just fall to,
+And may you find a good digestion!
+
+_Faust_. Now, once for all, pleasure is not the question.
+I'm sworn to passion's whirl, the agony of bliss,
+The lover's hate, the sweets of bitterness.
+My heart, no more by pride of science driven,
+Shall open wide to let each sorrow enter,
+And all the good that to man's race is given,
+I will enjoy it to my being's centre,
+Through life's whole range, upward and downward sweeping,
+Their weal and woe upon my bosom heaping,
+Thus in my single self their selves all comprehending
+And with them in a common shipwreck ending.
+
+_Mephistopheles_. O trust me, who since first I fell from heaven,
+Have chewed this tough meat many a thousand year,
+No man digests the ancient leaven,
+No mortal, from the cradle to the bier.
+Trust one of _us_--the _whole_ creation
+To God alone belongs by right;
+_He_ has in endless day his habitation,
+_Us_ He hath made for utter night,
+_You_ for alternate dark and light.
+
+_Faust_. But then I _will!_
+
+_Mephistopheles_. Now that's worth hearing!
+But one thing haunts me, the old song,
+That time is short and art is long.
+You need some slight advice, I'm fearing.
+Take to you one of the poet-feather,
+Let the gentleman's thought, far-sweeping,
+Bring all the noblest traits together,
+On your one crown their honors heaping,
+The lion's mood
+The stag's rapidity,
+The fiery blood of Italy,
+The Northman's hardihood.
+Bid him teach thee the art of combining
+Greatness of soul with fly designing,
+And how, with warm and youthful passion,
+To fall in love by plan and fashion.
+Should like, myself, to come across 'm,
+Would name him Mr. Microcosm.
+
+_Faust_. What am I then? if that for which my heart
+Yearns with invincible endeavor,
+The crown of man, must hang unreached forever?
+
+_Mephistopheles_. Thou art at last--just what thou art.
+Pile perukes on thy head whose curls cannot be counted,
+On yard-high buskins let thy feet be mounted,
+Still thou art only what thou art.
+
+_Faust_. Yes, I have vainly, let me not deny it,
+Of human learning ransacked all the stores,
+And when, at last, I set me down in quiet,
+There gushes up within no new-born force;
+I am not by a hair's-breadth higher,
+Am to the Infinite no nigher.
+
+_Mephistopheles_. My worthy sir, you see the matter
+As people generally see;
+But we must learn to take things better,
+Before life pleasures wholly flee.
+The deuce! thy head and all that's in it,
+Hands, feet and ------ are thine;
+What I enjoy with zest each minute,
+Is surely not the less mine?
+If I've six horses in my span,
+Is it not mine, their every power?
+I fly along as an undoubted man,
+On four and twenty legs the road I scour.
+Cheer up, then! let all thinking be,
+And out into the world with me!
+I tell thee, friend, a speculating churl
+Is like a beast, some evil spirit chases
+Along a barren heath in one perpetual whirl,
+While round about lie fair, green pasturing places.
+
+_Faust_. But how shall we begin?
+
+_Mephistopheles_. We sally forth e'en now.
+What martyrdom endurest thou!
+What kind of life is this to be living,
+Ennui to thyself and youngsters giving?
+Let Neighbor Belly that way go!
+To stay here threshing straw why car'st thou?
+The best that thou canst think and know
+To tell the boys not for the whole world dar'st thou.
+E'en now I hear one in the entry.
+
+_Faust_. I have no heart the youth to see.
+
+_Mephistopheles_. The poor boy waits there like a sentry,
+He shall not want a word from me.
+Come, give me, now, thy robe and bonnet;
+This mask will suit me charmingly.
+ [_He puts them on_.]
+Now for my wit--rely upon it!
+'Twill take but fifteen minutes, I am sure.
+Meanwhile prepare thyself to make the pleasant tour!
+
+ [_Exit_ FAUST.]
+
+_Mephistopheles [in_ FAUST'S _long gown_].
+Only despise all human wit and lore,
+The highest flights that thought can soar--
+Let but the lying spirit blind thee,
+And with his spells of witchcraft bind thee,
+Into my snare the victim creeps.--
+To him has destiny a spirit given,
+That unrestrainedly still onward sweeps,
+To scale the skies long since hath striven,
+And all earth's pleasures overleaps.
+He shall through life's wild scenes be driven,
+And through its flat unmeaningness,
+I'll make him writhe and stare and stiffen,
+And midst all sensual excess,
+His fevered lips, with thirst all parched and riven,
+Insatiably shall haunt refreshment's brink;
+And had he not, himself, his soul to Satan given,
+Still must he to perdition sink!
+
+ [_Enter_ A SCHOLAR.]
+
+_Scholar_. I have but lately left my home,
+And with profound submission come,
+To hold with one some conversation
+Whom all men name with veneration.
+
+_Mephistopheles._ Your courtesy greatly flatters me
+A man like many another you see.
+Have you made any applications elsewhere?
+
+_Scholar_. Let me, I pray, your teachings share!
+With all good dispositions I come,
+A fresh young blood and money some;
+My mother would hardly hear of my going;
+But I long to learn here something worth knowing.
+
+_Mephistopheles_. You've come to the very place for it, then.
+
+_Scholar_. Sincerely, could wish I were off again:
+My soul already has grown quite weary
+Of walls and halls, so dark and dreary,
+The narrowness oppresses me.
+One sees no green thing, not a tree.
+On the lecture-seats, I know not what ails me,
+Sight, hearing, thinking, every thing fails me.
+
+_Mephistopheles_. 'Tis all in use, we daily see.
+The child takes not the mother's breast
+In the first instance willingly,
+But soon it feeds itself with zest.
+So you at wisdom's breast your pleasure
+Will daily find in growing measure.
+
+_Scholar_. I'll hang upon her neck, a raptured wooer,
+But only tell me, who shall lead me to her?
+
+_Mephistopheles_. Ere you go further, give your views
+As to which faculty you choose?
+
+_Scholar_. To be right learn'd I've long desired,
+And of the natural world aspired
+To have a perfect comprehension
+In this and in the heavenly sphere.
+
+_Mephistopheles_. I see you're on the right track here;
+But you'll have to give undivided attention.
+
+_Scholar_. My heart and soul in the work'll be found;
+Only, of course, it would give me pleasure,
+When summer holidays come round,
+To have for amusement a little leisure.
+
+_Mephistopheles_. Use well the precious time, it flips away so,
+Yet method gains you time, if I may say so.
+I counsel you therefore, my worthy friend,
+The logical leisures first to attend.
+Then is your mind well trained and cased
+In Spanish boots,[18] all snugly laced,
+So that henceforth it can creep ahead
+On the road of thought with a cautious tread.
+And not at random shoot and strike,
+Zig-zagging Jack-o'-lanthorn-like.
+Then will you many a day be taught
+That what you once to do had thought
+Like eating and drinking, extempore,
+Requires the rule of one, two, three.
+It is, to be sure, with the fabric of thought,
+As with the _chef d'Å“uvre_ by weavers wrought,
+Where a thousand threads one treadle plies,
+Backward and forward the shuttles keep going,
+Invisibly the threads keep flowing,
+One stroke a thousand fastenings ties:
+Comes the philosopher and cries:
+I'll show you, it could not be otherwise:
+The first being so, the second so,
+The third and fourth must of course be so;
+And were not the first and second, you see,
+The third and fourth could never be.
+The scholars everywhere call this clever,
+But none have yet become weavers ever.
+Whoever will know a live thing and expound it,
+First kills out the spirit it had when he found it,
+And then the parts are all in his hand,
+Minus only the spiritual band!
+Encheiresin naturæ's[19] the chemical name,
+By which dunces themselves unwittingly shame.
+
+_Scholar_. Cannot entirely comprehend you.
+
+_Mephistopheles_. Better success will shortly attend you,
+When you learn to analyze all creation
+And give it a proper classification.
+
+_Scholar_. I feel as confused by all you've said,
+As if 'twere a mill-wheel going round in my head!
+
+_Mephistopheles_. The next thing most important to mention,
+Metaphysics will claim your attention!
+There see that you can clearly explain
+What fits not into the human brain:
+For that which will not go into the head,
+A pompous word will stand you in stead.
+But, this half-year, at least, observe
+From regularity never to swerve.
+You'll have five lectures every day;
+Be in at the stroke of the bell I pray!
+And well prepared in every part;
+Study each paragraph by heart,
+So that you scarce may need to look
+To see that he says no more than's in the book;
+And when he dictates, be at your post,
+As if you wrote for the Holy Ghost!
+
+_Scholar_. That caution is unnecessary!
+I know it profits one to write,
+For what one has in black and white,
+He to his home can safely carry.
+
+_Mephistopheles_. But choose some faculty, I pray!
+
+_Scholar_. I feel a strong dislike to try the legal college.
+
+_Mephistopheles_. I cannot blame you much, I must acknowledge.
+I know how this profession stands to-day.
+Statutes and laws through all the ages
+Like a transmitted malady you trace;
+In every generation still it rages
+And softly creeps from place to place.
+Reason is nonsense, right an impudent suggestion;
+Alas for thee, that thou a grandson art!
+Of inborn law in which each man has part,
+Of that, unfortunately, there's no question.
+
+_Scholar_. My loathing grows beneath your speech.
+O happy he whom you shall teach!
+To try theology I'm almost minded.
+
+_Mephistopheles_. I must not let you by zeal be blinded.
+This is a science through whose field
+Nine out of ten in the wrong road will blunder,
+And in it so much poison lies concealed,
+That mould you this mistake for physic, no great wonder.
+Here also it were best, if only one you heard
+And swore to that one master's word.
+Upon the whole--words only heed you!
+These through the temple door will lead you
+Safe to the shrine of certainty.
+
+_Scholar_. Yet in the word a thought must surely be.
+
+_Mephistopheles_. All right! But one must not perplex himself about it;
+For just where one must go without it,
+The word comes in, a friend in need, to thee.
+With words can one dispute most featly,
+With words build up a system neatly,
+In words thy faith may stand unshaken,
+From words there can be no iota taken.
+
+_Scholar_. Forgive my keeping you with many questions,
+Yet must I trouble you once more,
+Will you not give me, on the score
+Of medicine, some brief suggestions?
+Three years are a short time, O God!
+And then the field is quite too broad.
+If one had only before his nose
+Something else as a hint to follow!--
+
+_Mephistopheles_ [_aside_]. I'm heartily tired of this dry prose,
+Must play the devil again out hollow.
+ [_Aloud_.]
+The healing art is quickly comprehended;
+Through great and little world you look abroad,
+And let it wag, when all is ended,
+As pleases God.
+Vain is it that your science sweeps the skies,
+Each, after all, learns only what he can;
+Who grasps the moment as it flies
+He is the real man.
+Your person somewhat takes the eye,
+Boldness you'll find an easy science,
+And if you on yourself rely,
+Others on you will place reliance.
+In the women's good graces seek first to be seated;
+Their oh's and ah's, well known of old,
+So thousand-fold,
+Are all from a single point to be treated;
+Be decently modest and then with ease
+You may get the blind side of them when you please.
+A title, first, their confidence must waken,
+That _your_ art many another art transcends,
+Then may you, lucky man, on all those trifles reckon
+For which another years of groping spends:
+Know how to press the little pulse that dances,
+And fearlessly, with sly and fiery glances,
+Clasp the dear creatures round the waist
+To see how tightly they are laced.
+
+_Scholar_. This promises! One loves the How and Where to see!
+
+_Mephistopheles_. Gray, worthy friend, is all your theory
+And green the golden tree of life.
+
+_Scholar_. I seem,
+I swear to you, like one who walks in dream.
+Might I another time, without encroaching,
+Hear you the deepest things of wisdom broaching?
+
+_Mephistopheles_. So far as I have power, you may.
+
+_Scholar_. I cannot tear myself away,
+Till I to you my album have presented.
+Grant me one line and I'm contented!
+
+_Mephistopheles_. With pleasure.
+ [_Writes and returns it_.]
+
+_Scholar [reads]._ Eritis sicut Deus, scientes bonum et malum.
+ [_Shuts it reverently, and bows himself out_.]
+
+_Mephistopheles_.
+Let but the brave old saw and my aunt, the serpent, guide thee,
+And, with thy likeness to God, shall woe one day betide thee!
+
+_Faust [enters_]. Which way now shall we go?
+
+_Mephistopheles_. Which way it pleases thee.
+The little world and then the great we see.
+O with what gain, as well as pleasure,
+Wilt thou the rollicking cursus measure!
+
+_Faust_. I fear the easy life and free
+With my long beard will scarce agree.
+'Tis vain for me to think of succeeding,
+I never could learn what is called good-breeding.
+In the presence of others I feel so small;
+I never can be at my ease at all.
+
+_Mephistopheles_. Dear friend, vain trouble to yourself you're giving;
+Whence once you trust yourself, you know the art of living.
+
+_Faust_. But how are we to start, I pray?
+Where are thy servants, coach and horses?
+
+_Mephistopheles_. We spread the mantle, and away
+It bears us on our airy courses.
+But, on this bold excursion, thou
+Must take no great portmanteau now.
+A little oxygen, which I will soon make ready,
+From earth uplifts us, quick and steady.
+And if we're light, we'll soon surmount the sphere;
+I give thee hearty joy in this thy new career.
+
+
+
+
+ AUERBACH'S CELLAR IN LEIPSIC.[20]
+
+ _Carousal of Jolly Companions_.
+
+
+_Frosch_.[21] Will nobody drink? Stop those grimaces!
+I'll teach you how to be cutting your faces!
+Laugh out! You're like wet straw to-day,
+And blaze, at other times, like dry hay.
+
+_Brander_. 'Tis all your fault; no food for fun you bring,
+Not a nonsensical nor nasty thing.
+
+_Frosch [dashes a glass of wine over his bead_]. There you have both!
+
+_Brander_. You hog twice o'er!
+
+_Frosch_. You wanted it, what would you more?
+
+_Siebel_ Out of the door with them that brawl!
+Strike up a round; swill, shout there, one and all!
+Wake up! Hurra!
+
+_Altmayer_. Woe's me, I'm lost! Bring cotton!
+The rascal splits my ear-drum.
+
+_Siebel_. Only shout on!
+When all the arches ring and yell,
+Then does the base make felt its true ground-swell.
+
+_Frosch_. That's right, just throw him out, who undertakes to fret!
+A! tara! lara da!
+
+_Altmayer_. A! tara! lara da!
+
+_Frosch_. Our whistles all are wet.
+ [_Sings_.]
+ The dear old holy Romish realm,
+ What holds it still together?
+
+_Brander_. A sorry song! Fie! a political song!
+A tiresome song! Thank God each morning therefor,
+That you have not the Romish realm to care for!
+At least I count it a great gain that He
+Kaiser nor chancellor has made of me.
+E'en we can't do without a head, however;
+To choose a pope let us endeavour.
+You know what qualification throws
+The casting vote and the true man shows.
+
+_Frosch [sings_].
+ Lady Nightingale, upward soar,
+ Greet me my darling ten thousand times o'er.
+
+_Siebel_. No greetings to that girl! Who does so, I resent it!
+
+_Frosch_. A greeting and a kiss! And you will not prevent it!
+ [_Sings.]_
+ Draw the bolts! the night is clear.
+ Draw the bolts! Love watches near.
+ Close the bolts! the dawn is here.
+
+_Siebel_. Ay, sing away and praise and glorify your dear!
+Soon I shall have my time for laughter.
+The jade has jilted me, and will you too hereafter;
+May Kobold, for a lover, be her luck!
+At night may he upon the cross-way meet her;
+Or, coming from the Blocksberg, some old buck
+May, as he gallops by, a good-night bleat her!
+A fellow fine of real flesh and blood
+Is for the wench a deal too good.
+She'll get from me but one love-token,
+That is to have her window broken!
+
+_Brander [striking on the table_]. Attend! attend! To me give ear!
+I know what's life, ye gents, confess it:
+We've lovesick people sitting near,
+And it is proper they should hear
+A good-night strain as well as I can dress it.
+Give heed! And hear a bran-new song!
+Join in the chorus loud and strong!
+ [_He sings_.]
+ A rat in the cellar had built his nest,
+ He daily grew sleeker and smoother,
+ He lined his paunch from larder and chest,
+ And was portly as Doctor Luther.
+ The cook had set him poison one day;
+ From that time forward he pined away
+ As if he had love in his body.
+
+_Chorus [flouting_]. As if he had love in his body.
+
+_Brander_. He raced about with a terrible touse,
+ From all the puddles went swilling,
+ He gnawed and he scratched all over the house,
+ His pain there was no stilling;
+ He made full many a jump of distress,
+ And soon the poor beast got enough, I guess,
+ As if he had love in his body.
+
+_Chorus_. As if he had love in his body.
+
+_Brander_. With pain he ran, in open day,
+ Right up into the kitchen;
+ He fell on the hearth and there he lay
+ Gasping and moaning and twitchin'.
+ Then laughed the poisoner: "He! he! he!
+ He's piping on the last hole," said she,
+ "As if he had love in his body."
+
+_Chorus_. As if he had love in his body.
+
+_Siebel_. Just hear now how the ninnies giggle!
+That's what I call a genuine art,
+To make poor rats with poison wriggle!
+
+_Brander_. You take their case so much to heart?
+
+_Altmayer_. The bald pate and the butter-belly!
+The sad tale makes him mild and tame;
+He sees in the swollen rat, poor fellow!
+His own true likeness set in a frame.
+
+
+ FAUST _and_ MEPHISTOPHELES.
+
+_Mephistopheles_. Now, first of all, 'tis necessary
+To show you people making merry,
+That you may see how lightly life can run.
+Each day to this small folk's a feast of fun;
+Not over-witty, self-contented,
+Still round and round in circle-dance they whirl,
+As with their tails young kittens twirl.
+If with no headache they're tormented,
+Nor dunned by landlord for his pay,
+They're careless, unconcerned, and gay.
+
+_Brander_. They're fresh from travel, one might know it,
+Their air and manner plainly show it;
+They came here not an hour ago.
+
+_Frosch_. Thou verily art right! My Leipsic well I know!
+Paris in small it is, and cultivates its people.
+
+_Siebel_. What do the strangers seem to thee?
+
+_Frosch_. Just let me go! When wine our friendship mellows,
+Easy as drawing a child's tooth 'twill be
+To worm their secrets out of these two fellows.
+They're of a noble house, I dare to swear,
+They have a proud and discontented air.
+
+_Brander_. They're mountebanks, I'll bet a dollar!
+
+_Altmayer_. Perhaps.
+
+_Frosch_. I'll smoke them, mark you that!
+
+_Mephistopheles_ [_to Faust_]. These people never smell the old rat,
+E'en when he has them by the collar.
+
+_Faust_. Fair greeting to you, sirs!
+
+_Siebel_. The same, and thanks to boot.
+ [_In a low tone, faking a side look at MEPHISTOPHELES_.]
+Why has the churl one halting foot?
+
+_Mephistopheles_. With your permission, shall we make one party?
+Instead of a good drink, which get here no one can,
+Good company must make us hearty.
+
+_Altmayer_. You seem a very fastidious man.
+
+_Frosch_. I think you spent some time at Rippach[22] lately?
+You supped with Mister Hans not long since, I dare say?
+
+_Mephistopheles_. We passed him on the road today!
+Fine man! it grieved us parting with him, greatly.
+He'd much to say to us about his cousins,
+And sent to each, through us, his compliments by dozens.
+ [_He bows to_ FROSCH.]
+
+_Altmayer_ [_softly_]. You've got it there! he takes!
+
+_Siebel_. The chap don't want for wit!
+
+_Frosch_. I'll have him next time, wait a bit!
+
+_Mephistopheles_. If I mistook not, didn't we hear
+Some well-trained voices chorus singing?
+'Faith, music must sound finely here.
+From all these echoing arches ringing!
+
+_Frosch_. You are perhaps a connoisseur?
+
+_Mephistopheles_. O no! my powers are small, I'm but an amateur.
+
+_Altmayer_. Give us a song!
+
+_Mephistopheles_. As many's you desire.
+
+_Siebel_. But let it be a bran-new strain!
+
+_Mephistopheles_. No fear of that! We've just come back from Spain,
+The lovely land of wine and song and lyre.
+ [_Sings_.]
+ There was a king, right stately,
+ Who had a great, big flea,--
+
+_Frosch_. Hear him! A flea! D'ye take there, boys? A flea!
+I call that genteel company.
+
+_Mephistopheles_ [_resumes_]. There was a king, right stately,
+ Who had a great, big flea,
+ And loved him very greatly,
+ As if his own son were he.
+ He called the knight of stitches;
+ The tailor came straightway:
+ Ho! measure the youngster for breeches,
+ And make him a coat to-day!
+
+_Brander_. But don't forget to charge the knight of stitches,
+The measure carefully to take,
+And, as he loves his precious neck,
+To leave no wrinkles in the breeches.
+
+_Mephistopheles_. In silk and velvet splendid
+ The creature now was drest,
+ To his coat were ribbons appended,
+ A cross was on his breast.
+ He had a great star on his collar,
+ Was a minister, in short;
+ And his relatives, greater and smaller,
+ Became great people at court.
+
+ The lords and ladies of honor
+ Fared worse than if they were hung,
+ The queen, she got them upon her,
+ And all were bitten and stung,
+ And did not dare to attack them,
+ Nor scratch, but let them stick.
+ We choke them and we crack them
+ The moment we feel one prick.
+
+_Chorus_ [_loud_]. We choke 'em and we crack 'em
+The moment we feel one prick.
+
+_Frosch_. Bravo! Bravo! That was fine!
+
+_Siebel_. So shall each flea his life resign!
+
+_Brander_. Point your fingers and nip them fine!
+
+_Altmayer_. Hurra for Liberty! Hurra for Wine!
+
+_Mephistopheles_. I'd pledge the goddess, too, to show how high I set her,
+Right gladly, if your wines were just a trifle better.
+
+_Siebel_. Don't say that thing again, you fretter!
+
+_Mephistopheles_. Did I not fear the landlord to affront;
+I'd show these worthy guests this minute
+What kind of stuff our stock has in it.
+
+_Siebel_. Just bring it on! I'll bear the brunt.
+
+_Frosch_. Give us a brimming glass, our praise shall then be ample,
+But don't dole out too small a sample;
+For if I'm to judge and criticize,
+I need a good mouthful to make me wise.
+
+_Altmayer_ [_softly_]. They're from the Rhine, as near as I can make it.
+
+_Mephistopheles_. Bring us a gimlet here!
+
+_Brander_. What shall be done with that?
+You've not the casks before the door, I take it?
+
+_Altmayer_. The landlord's tool-chest there is easily got at.
+
+_Mephistopheles_ [_takes the gimlet_] (_to Frosch_).
+What will you have? It costs but speaking.
+
+_Frosch_. How do you mean? Have you so many kinds?
+
+_Mephistopheles_. Enough to suit all sorts of minds.
+
+_Altmayer_. Aha! old sot, your lips already licking!
+
+_Frosch_. Well, then! if I must choose, let Rhine-wine fill my beaker,
+Our fatherland supplies the noblest liquor.
+
+ MEPHISTOPHELES
+ [_boring a hole in the rim of the table near the place
+ where_ FROSCH _sits_].
+Get us a little wax right off to make the stoppers!
+
+_Altmayer_. Ah, these are jugglers' tricks, and whappers!
+
+_Mephistopheles_ [_to Brander_]. And you?
+
+_Brander_. Champaigne's the wine for me,
+But then right sparkling it must be!
+
+ [MEPHISTOPHELES _bores; meanwhile one of them has made
+ the wax-stoppers and stopped the holes_.]
+
+_Brander_. Hankerings for foreign things will sometimes haunt you,
+The good so far one often finds;
+Your real German man can't bear the French, I grant you,
+And yet will gladly drink their wines.
+
+_Siebel_ [_while Mephistopheles approaches his seat_].
+I don't like sour, it sets my mouth awry,
+Let mine have real sweetness in it!
+
+_Mephistopheles_ [_bores_]. Well, you shall have Tokay this minute.
+
+_Altmayer_. No, sirs, just look me in the eye!
+I see through this, 'tis what the chaps call smoking.
+
+_Mephistopheles_. Come now! That would be serious joking,
+To make so free with worthy men.
+But quickly now! Speak out again!
+With what description can I serve you?
+
+_Altmayer_. Wait not to ask; with any, then.
+
+ [_After all the holes are bored and stopped_.]
+
+_Mephistopheles_ [_with singular gestures_].
+From the vine-stock grapes we pluck;
+Horns grow on the buck;
+Wine is juicy, the wooden table,
+Like wooden vines, to give wine is able.
+An eye for nature's depths receive!
+Here is a miracle, only believe!
+Now draw the plugs and drink your fill!
+
+ ALL
+ [_drawing the stoppers, and catching each in his glass
+ the wine he had desired_].
+Sweet spring, that yields us what we will!
+
+_Mephistopheles_. Only be careful not a drop to spill!
+ [_They drink repeatedly_.]
+
+_All_ [_sing_]. We're happy all as cannibals,
+ Five hundred hogs together.
+
+_Mephistopheles_. Look at them now, they're happy as can be!
+
+_Faust_. To go would suit my inclination.
+
+_Mephistopheles_. But first give heed, their bestiality
+Will make a glorious demonstration.
+
+ SIEBEL
+ [_drinks carelessly; the wine is spilt upon the ground
+ and turns to flame_].
+Help! fire! Ho! Help! The flames of hell!
+
+_Mephistopheles [_conjuring the flame_].
+Peace, friendly element, be still!
+ [_To the Toper_.]
+This time 'twas but a drop of fire from purgatory.
+
+_Siebel_. What does this mean? Wait there, or you'll be sorry!
+It seems you do not know us well.
+
+_Frosch_. Not twice, in this way, will it do to joke us!
+
+_Altmayer_. I vote, we give him leave himself here _scarce_ to make.
+
+_Siebel_. What, sir! How dare you undertake
+To carry on here your old hocus-pocus?
+
+_Mephistopheles_. Be still, old wine-cask!
+
+_Siebel_. Broomstick, you!
+Insult to injury add? Confound you!
+
+_Brander_. Stop there! Or blows shall rain down round you!
+
+ ALTMAYER
+ [_draws a stopper out of the table; fire flies at him_].
+I burn! I burn!
+
+_Siebel_. Foul sorcery! Shame!
+Lay on! the rascal is fair game!
+
+ [_They draw their knives and rush at_ MEPHISTOPHELES.]
+
+_Mephistopheles_ [_with a serious mien_].
+Word and shape of air!
+Change place, new meaning wear!
+Be here--and there!
+
+ [_They stand astounded and look at each other_.]
+
+_Altmayer_. Where am I? What a charming land!
+
+_Frosch_. Vine hills! My eyes! Is't true?
+
+_Siebel_. And grapes, too, close at hand!
+
+_Brander_. Beneath this green see what a stem is growing!
+See what a bunch of grapes is glowing!
+ [_He seizes_ SIEBEL _by the nose. The rest do the same to each
+ other and raise their knives._]
+
+_Mephistopheles_ [_as above_]. Loose, Error, from their eyes the band!
+How Satan plays his tricks, you need not now be told of.
+ [_He vanishes with_ FAUST, _the companions start back from each
+ other_.]
+
+_Siebel_. What ails me?
+
+_Altmayer_. How?
+
+_Frosch_. Was that thy nose, friend, I had hold of?
+
+_Brander_ [_to Siebel_]. And I have thine, too, in my hand!
+
+_Altmayer_. O what a shock! through all my limbs 'tis crawling!
+Get me a chair, be quick, I'm falling!
+
+_Frosch_. No, say what was the real case?
+
+_Siebel_. O show me where the churl is hiding!
+Alive he shall not leave the place!
+
+_Altmayer_. Out through the cellar-door I saw him riding--
+Upon a cask--he went full chase.--
+Heavy as lead my feet are growing.
+
+ [_Turning towards the table_.]
+
+My! If the wine should yet be flowing.
+
+_Siebel_. 'Twas all deception and moonshine.
+
+_Frosch_. Yet I was sure I did drink wine.
+
+_Brander_. But how about the bunches, brother?
+
+_Altmayer_. After such miracles, I'll doubt no other!
+
+
+
+
+ WITCHES' KITCHEN.
+
+ [_On a low hearth stands a great kettle over the fire. In the smoke,
+which rises from it, are seen various forms. A female monkey[28] sits by
+the kettle and skims it, and takes care that it does not run over. The
+male monkey with the young ones sits close by, warming himself. Walls and
+ceiling are adorned 'with the most singular witch-household stuff_.]
+
+
+ FAUST. MEPHISTOPHELES.
+
+_Faust_. Would that this vile witch-business were well over!
+Dost promise me I shall recover
+In this hodge-podge of craziness?
+From an old hag do I advice require?
+And will this filthy cooked-up mess
+My youth by thirty years bring nigher?
+Woe's me, if that's the best you know!
+Already hope is from my bosom banished.
+Has not a noble mind found long ago
+Some balsam to restore a youth that's vanished?
+
+_Mephistopheles_. My friend, again thou speakest a wise thought!
+I know a natural way to make thee young,--none apter!
+But in another book it must be sought,
+And is a quite peculiar chapter.
+
+_Faust_. I beg to know it.
+
+_Mephistopheles_. Well! here's one that needs no pay,
+No help of physic, nor enchanting.
+Out to the fields without delay,
+And take to hacking, digging, planting;
+Run the same round from day to day,
+A treadmill-life, contented, leading,
+With simple fare both mind and body feeding,
+Live with the beast as beast, nor count it robbery
+Shouldst thou manure, thyself, the field thou reapest;
+Follow this course and, trust to me,
+For eighty years thy youth thou keepest!
+
+_Faust_. I am not used to that, I ne'er could bring me to it,
+To wield the spade, I could not do it.
+The narrow life befits me not at all.
+
+_Mephistopheles_. So must we on the witch, then, call.
+
+_Faust_. But why just that old hag? Canst thou
+Not brew thyself the needful liquor?
+
+_Mephistopheles_. That were a pretty pastime now
+I'd build about a thousand bridges quicker.
+Science and art alone won't do,
+The work will call for patience, too;
+Costs a still spirit years of occupation:
+Time, only, strengthens the fine fermentation.
+To tell each thing that forms a part
+Would sound to thee like wildest fable!
+The devil indeed has taught the art;
+To make it not the devil is able.
+ [_Espying the animals_.]
+See, what a genteel breed we here parade!
+This is the house-boy! that's the maid!
+ [_To the animals_.]
+Where's the old lady gone a mousing?
+
+_The animals_. Carousing;
+Out she went
+By the chimney-vent!
+
+_Mephistopheles_. How long does she spend in gadding and storming?
+
+_The animals_. While we are giving our paws a warming.
+
+_Mephistopheles_ [_to Faust_]. How do you find the dainty creatures?
+
+_Faust_. Disgusting as I ever chanced to see!
+
+_Mephistopheles_. No! a discourse like this to me,
+I own, is one of life's most pleasant features;
+ [_To the animals_.]
+Say, cursed dolls, that sweat, there, toiling!
+What are you twirling with the spoon?
+
+_Animals_. A common beggar-soup we're boiling.
+
+_Mephistopheles_. You'll have a run of custom soon.
+
+ THE HE-MONKEY
+ [_Comes along and fawns on_ MEPHISTOPHELES].
+ O fling up the dice,
+ Make me rich in a trice,
+ Turn fortune's wheel over!
+ My lot is right bad,
+ If money I had,
+ My wits would recover.
+
+_Mephistopheles_. The monkey'd be as merry as a cricket,
+Would somebody give him a lottery-ticket!
+
+ [_Meanwhile the young monkeys have been playing with a great
+ ball, which they roll backward and forward_.]
+
+_The monkey_. 'The world's the ball;
+ See't rise and fall,
+ Its roll you follow;
+ Like glass it rings:
+ Both, brittle things!
+ Within 'tis hollow.
+ There it shines clear,
+ And brighter here,--
+ I live--by 'Pollo!--
+ Dear son, I pray,
+ Keep hands away!
+ _Thou_ shalt fall so!
+ 'Tis made of clay,
+ Pots are, also.
+
+_Mephistopheles_. What means the sieve?
+
+_The monkey [takes it down_]. Wert thou a thief,
+ 'Twould show the thief and shame him.
+ [_Runs to his mate and makes her look through_.]
+ Look through the sieve!
+ Discern'st thou the thief,
+ And darest not name him?
+
+_Mephistopheles [approaching the fire_]. And what's this pot?
+
+_The monkeys_. The dunce! I'll be shot!
+ He knows not the pot,
+ He knows not the kettle!
+
+_Mephistopheles_. Impertinence! Hush!
+
+_The monkey_. Here, take you the brush,
+ And sit on the settle!
+ [_He forces_ MEPHISTOPHELES _to sit down_.]
+
+ FAUST
+ [_who all this time has been standing before a looking-glass,
+ now approaching and now receding from it_].
+
+What do I see? What heavenly face
+Doth, in this magic glass, enchant me!
+O love, in mercy, now, thy swiftest pinions grant me!
+And bear me to her field of space!
+Ah, if I seek to approach what doth so haunt me,
+If from this spot I dare to stir,
+Dimly as through a mist I gaze on her!--
+The loveliest vision of a woman!
+Such lovely woman can there be?
+Must I in these reposing limbs naught human.
+But of all heavens the finest essence see?
+Was such a thing on earth seen ever?
+
+_Mephistopheles_. Why, when you see a God six days in hard work spend,
+And then cry bravo at the end,
+Of course you look for something clever.
+Look now thy fill; I have for thee
+Just such a jewel, and will lead thee to her;
+And happy, whose good fortune it shall be,
+To bear her home, a prospered wooer!
+
+[FAUST _keeps on looking into the mirror_. MEPHISTOPHELES
+_stretching himself out on the settle and playing with the brush,
+continues speaking_.]
+Here sit I like a king upon his throne,
+The sceptre in my hand,--I want the crown alone.
+
+ THE ANIMALS
+ [_who up to this time have been going through all sorts of queer antics
+ with each other, bring_ MEPHISTOPHELES _a crown with a loud cry_].
+ O do be so good,--
+ With sweat and with blood,
+ To take it and lime it;
+ [_They go about clumsily with the crown and break it into two pieces,
+ with which they jump round_.]
+ 'Tis done now! We're free!
+ We speak and we see,
+ We hear and we rhyme it;
+
+_Faust [facing the mirror_]. Woe's me! I've almost lost my wits.
+
+_Mephistopheles [pointing to the animals_].
+My head, too, I confess, is very near to spinning.
+
+_The animals_. And then if it hits
+ And every thing fits,
+ We've thoughts for our winning.
+
+_Faust [as before_]. Up to my heart the flame is flying!
+Let us begone--there's danger near!
+
+_Mephistopheles [in the former position_].
+Well, this, at least, there's no denying,
+That we have undissembled poets here.
+
+[The kettle, which the she-monkey has hitherto left unmatched, begins to
+run over; a great flame breaks out, which roars up the chimney. The_ WITCH
+_comes riding down through the flame with a terrible outcry_.]
+
+_Witch_. Ow! Ow! Ow! Ow!
+ The damned beast! The cursed sow!
+ Neglected the kettle, scorched the Frau!
+ The cursed crew!
+ [_Seeing_ FAUST _and_ MEPHISTOPHELES.]
+ And who are you?
+ And what d'ye do?
+ And what d'ye want?
+ And who sneaked in?
+ The fire-plague grim
+ Shall light on him
+ In every limb!
+
+ [_She makes a dive at the kettle with the skimmer and spatters flames
+ at _FAUST, MEPHISTOPHELES_, and the creatures. These last whimper_.]
+
+ MEPHISTOPHELES
+ [_inverting the brush which he holds in his hand, and striking
+ among the glasses and pots_].
+
+ In two! In two!
+ There lies the brew!
+ There lies the glass!
+ This joke must pass;
+ For time-beat, ass!
+ To thy melody, 'twill do.
+ [_While the_ WITCH _starts back full of wrath and horror.]
+Skeleton! Scarcecrow! Spectre! Know'st thou me,
+Thy lord and master? What prevents my dashing
+Right in among thy cursed company,
+Thyself and all thy monkey spirits smashing?
+Has the red waistcoat thy respect no more?
+Has the cock's-feather, too, escaped attention?
+Hast never seen this face before?
+My name, perchance, wouldst have me mention?
+
+_The witch_. Pardon the rudeness, sir, in me!
+But sure no cloven foot I see.
+Nor find I your two ravens either.
+
+_Mephistopheles_. I'll let thee off for this once so;
+For a long while has passed, full well I know,
+Since the last time we met together.
+The culture, too, which licks the world to shape,
+The devil himself cannot escape;
+The phantom of the North men's thoughts have left behind them,
+Horns, tail, and claws, where now d'ye find them?
+And for the foot, with which dispense I nowise can,
+'Twould with good circles hurt my standing;
+And so I've worn, some years, like many a fine young man,
+False calves to make me more commanding.
+
+_The witch [dancing_]. O I shall lose my wits, I fear,
+Do I, again, see Squire Satan here!
+
+_Mephistopheles_. Woman, the name offends my ear!
+
+_The witch_. Why so? What has it done to you?
+
+_Mephistopheles_. It has long since to fable-books been banished;
+But men are none the better for it; true,
+The wicked _one_, but not the wicked _ones_, has vanished.
+Herr Baron callst thou me, then all is right and good;
+I am a cavalier, like others. Doubt me?
+Doubt for a moment of my noble blood?
+See here the family arms I bear about me!
+ [_He makes an indecent gesture.]
+
+The witch [laughs immoderately_]. Ha! ha! full well I know you, sir!
+You are the same old rogue you always were!
+
+_Mephistopheles [to Faust_]. I pray you, carefully attend,
+This is the way to deal with witches, friend.
+
+_The witch_. Now, gentles, what shall I produce?
+
+_Mephistopheles_. A right good glassful of the well-known juice!
+And pray you, let it be the oldest;
+Age makes it doubly strong for use.
+
+_The witch_. Right gladly! Here I have a bottle,
+From which, at times, I wet my throttle;
+Which now, not in the slightest, stinks;
+A glass to you I don't mind giving;
+ [_Softly_.]
+But if this man, without preparing, drinks,
+He has not, well you know, another hour for living.
+
+_Mephistopheles_.
+'Tis a good friend of mine, whom it shall straight cheer up;
+Thy kitchen's best to give him don't delay thee.
+Thy ring--thy spell, now, quick, I pray thee,
+And give him then a good full cup.
+
+[_The_ WITCH, _with strange gestures, draws a circle, and places singular
+things in it; mean-while the glasses begin to ring, the kettle to sound
+and make music. Finally, she brings a great book and places the monkeys in
+the circle, whom she uses as a reading-desk and to hold the torches. She
+beckons_ FAUST _to come to her_.]
+
+_Faust [to Mephistopheles_].
+Hold! what will come of this? These creatures,
+These frantic gestures and distorted features,
+And all the crazy, juggling fluff,
+I've known and loathed it long enough!
+
+_Mephistopheles_. Pugh! that is only done to smoke us;
+Don't be so serious, my man!
+She must, as Doctor, play her hocus-pocus
+To make the dose work better, that's the plan.
+ [_He constrains_ FAUST _to step into the circle_.]
+
+ THE WITCH
+ [_beginning with great emphasis to declaim out of the book_]
+
+ Remember then!
+ Of One make Ten,
+ The Two let be,
+ Make even Three,
+ There's wealth for thee.
+ The Four pass o'er!
+ Of Five and Six,
+ (The witch so speaks,)
+ Make Seven and Eight,
+ The thing is straight:
+ And Nine is One
+ And Ten is none--
+ This is the witch's one-time-one![24]
+
+_Faust_. The old hag talks like one delirious.
+
+_Mephistopheles_. There's much more still, no less mysterious,
+I know it well, the whole book sounds just so!
+I've lost full many a year in poring o'er it,
+For perfect contradiction, you must know,
+A mystery stands, and fools and wise men bow before it,
+The art is old and new, my son.
+Men, in all times, by craft and terror,
+With One and Three, and Three and One,
+For truth have propagated error.
+They've gone on gabbling so a thousand years;
+Who on the fools would waste a minute?
+Man generally thinks, if words he only hears,
+Articulated noise must have some meaning in it.
+
+_The witch [goes on_]. Deep wisdom's power
+ Has, to this hour,
+ From all the world been hidden!
+ Whoso thinks not,
+ To him 'tis brought,
+ To him it comes unbidden.
+
+_Faust_. What nonsense is she talking here?
+My heart is on the point of cracking.
+In one great choir I seem to hear
+A hundred thousand ninnies clacking.
+
+_Mephistopheles_. Enough, enough, rare Sibyl, sing us
+These runes no more, thy beverage bring us,
+And quickly fill the goblet to the brim;
+This drink may by my friend be safely taken:
+Full many grades the man can reckon,
+Many good swigs have entered him.
+
+ [_The_ WITCH, _with many ceremonies, pours the drink into a cup;
+ as she puts it to_ FAUST'S _lips, there rises a light flame_.]
+
+_Mephistopheles_. Down with it! Gulp it down! 'Twill prove
+All that thy heart's wild wants desire.
+Thou, with the devil, hand and glove,[25]
+And yet wilt be afraid of fire?
+
+ [_The_ WITCH _breaks the circle_; FAUST _steps out_.]
+
+_Mephistopheles_. Now briskly forth! No rest for thee!
+
+_The witch_. Much comfort may the drink afford you!
+
+_Mephistopheles [to the witch_]. And any favor you may ask of me,
+I'll gladly on Walpurgis' night accord you.
+
+_The witch_. Here is a song, which if you sometimes sing,
+'Twill stir up in your heart a special fire.
+
+_Mephistopheles [to Faust_]. Only make haste; and even shouldst thou tire,
+Still follow me; one must perspire,
+That it may set his nerves all quivering.
+I'll teach thee by and bye to prize a noble leisure,
+And soon, too, shalt thou feel with hearty pleasure,
+How busy Cupid stirs, and shakes his nimble wing.
+
+_Faust_. But first one look in yonder glass, I pray thee!
+Such beauty I no more may find!
+
+_Mephistopheles_. Nay! in the flesh thine eyes shall soon display thee
+The model of all woman-kind.
+ [_Softly_.]
+Soon will, when once this drink shall heat thee,
+In every girl a Helen meet thee!
+
+
+
+
+ A STREET.
+
+ FAUST. MARGARET [_passing over_].
+
+_Faust_. My fair young lady, will it offend her
+If I offer my arm and escort to lend her?
+
+_Margaret_. Am neither lady, nor yet am fair!
+Can find my way home without any one's care.
+ [_Disengages herself and exit_.]
+
+_Faust_. By heavens, but then the child _is_ fair!
+I've never seen the like, I swear.
+So modest is she and so pure,
+And somewhat saucy, too, to be sure.
+The light of the cheek, the lip's red bloom,
+I shall never forget to the day of doom!
+How me cast down her lovely eyes,
+Deep in my soul imprinted lies;
+How she spoke up, so curt and tart,
+Ah, that went right to my ravished heart!
+ [_Enter_ MEPHISTOPHELES.]
+
+_Faust_. Hark, thou shalt find me a way to address her!
+
+_Mephistopheles_. Which one?
+
+_Faust_. She just went by.
+
+_Mephistopheles_. What! She?
+She came just now from her father confessor,
+Who from all sins pronounced her free;
+I stole behind her noiselessly,
+'Tis an innocent thing, who, for nothing at all,
+Must go to the confessional;
+O'er such as she no power I hold!
+
+_Faust_. But then she's over fourteen years old.
+
+_Mephistopheles_. Thou speak'st exactly like Jack Rake,
+Who every fair flower his own would make.
+And thinks there can be no favor nor fame,
+But one may straightway pluck the same.
+But 'twill not always do, we see.
+
+_Faust_. My worthy Master Gravity,
+Let not a word of the Law be spoken!
+One thing be clearly understood,--
+Unless I clasp the sweet, young blood
+This night in my arms--then, well and good:
+When midnight strikes, our bond is broken.
+
+_Mephistopheles_. Reflect on all that lies in the way!
+I need a fortnight, at least, to a day,
+For finding so much as a way to reach her.
+
+_Faust_. Had I seven hours, to call my own,
+Without the devil's aid, alone
+I'd snare with ease so young a creature.
+
+_Mephistopheles_. You talk quite Frenchman-like to-day;
+But don't be vexed beyond all measure.
+What boots it thus to snatch at pleasure?
+'Tis not so great, by a long way,
+As if you first, with tender twaddle,
+And every sort of fiddle-faddle,
+Your little doll should mould and knead,
+As one in French romances may read.
+
+_Faust_. My appetite needs no such spur.
+
+_Mephistopheles_. Now, then, without a jest or slur,
+I tell you, once for all, such speed
+With the fair creature won't succeed.
+Nothing will here by storm be taken;
+We must perforce on intrigue reckon.
+
+_Faust_. Get me some trinket the angel has blest!
+Lead me to her chamber of rest!
+Get me a 'kerchief from her neck,
+A garter get me for love's sweet sake!
+
+_Mephistopheles_. To prove to you my willingness
+To aid and serve you in this distress;
+You shall visit her chamber, by me attended,
+Before the passing day is ended.
+
+_Faust_. And see her, too? and have her?
+
+_Mephistopheles_. Nay!
+She will to a neighbor's have gone away.
+Meanwhile alone by yourself you may,
+There in her atmosphere, feast at leisure
+And revel in dreams of future pleasure.
+
+_Faust_. Shall we start at once?
+
+_Mephistopheles_. 'Tis too early yet.
+
+_Faust_. Some present to take her for me you must get.
+
+ [_Exit_.]
+
+_Mephistopheles_. Presents already! Brave! He's on the right foundation!
+Full many a noble place I know,
+And treasure buried long ago;
+Must make a bit of exploration.
+
+ [_Exit_.]
+
+
+
+
+ EVENING.
+
+ _A little cleanly Chamber_.
+
+MARGARET [_braiding and tying up her hair_.]
+I'd give a penny just to say
+What gentleman that was to-day!
+How very gallant he seemed to be,
+He's of a noble family;
+That I could read from his brow and bearing--
+And he would not have otherwise been so daring.
+ [_Exit_.]
+
+ FAUST. MEPHISTOPHELES.
+
+_Mephistopheles_. Come in, step softly, do not fear!
+
+_Faust [after a pause_]. Leave me alone, I prithee, here!
+
+_Mephistopheles [peering round_]. Not every maiden keeps so neat.
+ [_Exit_.]
+
+_Faust [gazing round_]. Welcome this hallowed still retreat!
+Where twilight weaves its magic glow.
+Seize on my heart, love-longing, sad and sweet,
+That on the dew of hope dost feed thy woe!
+How breathes around the sense of stillness,
+Of quiet, order, and content!
+In all this poverty what fulness!
+What blessedness within this prison pent!
+ [_He throws himself into a leathern chair by the bed_.]
+Take me, too! as thou hast, in years long flown,
+In joy and grief, so many a generation!
+Ah me! how oft, on this ancestral throne,
+Have troops of children climbed with exultation!
+Perhaps, when Christmas brought the Holy Guest,
+My love has here, in grateful veneration
+The grandsire's withered hand with child-lips prest.
+I feel, O maiden, circling me,
+Thy spirit of grace and fulness hover,
+Which daily like a mother teaches thee
+The table-cloth to spread in snowy purity,
+And even, with crinkled sand the floor to cover.
+Dear, godlike hand! a touch of thine
+Makes this low house a heavenly kingdom slime!
+And here!
+ [_He lifts a bed-curtain_.]
+What blissful awe my heart thrills through!
+Here for long hours could I linger.
+Here, Nature! in light dreams, thy airy finger
+The inborn angel's features drew!
+Here lay the child, when life's fresh heavings
+Its tender bosom first made warm,
+And here with pure, mysterious weavings
+The spirit wrought its godlike form!
+ And thou! What brought thee here? what power
+Stirs in my deepest soul this hour?
+What wouldst thou here? What makes thy heart so sore?
+Unhappy Faust! I know thee thus no more.
+ Breathe I a magic atmosphere?
+The will to enjoy how strong I felt it,--
+And in a dream of love am now all melted!
+Are we the sport of every puff of air?
+ And if she suddenly should enter now,
+How would she thy presumptuous folly humble!
+Big John-o'dreams! ah, how wouldst thou
+Sink at her feet, collapse and crumble!
+
+_Mephistopheles_. Quick, now! She comes! I'm looking at her.
+
+_Faust_. Away! Away! O cruel fate!
+
+_Mephistopheles_. Here is a box of moderate weight;
+I got it somewhere else--no matter!
+Just shut it up, here, in the press,
+I swear to you, 'twill turn her senses;
+I meant the trifles, I confess,
+To scale another fair one's fences.
+True, child is child and play is play.
+
+_Faust_. Shall I? I know not.
+
+_Mephistopheles_. Why delay?
+You mean perhaps to keep the bauble?
+If so, I counsel you to spare
+From idle passion hours so fair,
+And me, henceforth, all further trouble.
+I hope you are not avaricious!
+I rub my hands, I scratch my head--
+ [_He places the casket in the press and locks it up again_.]
+ (Quick! Time we sped!)--
+That the dear creature may be led
+And moulded by your will and wishes;
+And you stand here as glum,
+As one at the door of the auditorium,
+As if before your eyes you saw
+In bodily shape, with breathless awe,
+Metaphysics and physics, grim and gray!
+Away!
+ [_Exit_.]
+
+_Margaret [with a lamp_]. It seems so close, so sultry here.
+ [_She opens the window_.]
+Yet it isn't so very warm out there,
+I feel--I know not how--oh dear!
+I wish my mother 'ld come home, I declare!
+I feel a shudder all over me crawl--
+I'm a silly, timid thing, that's all!
+ [_She begins to sing, while undressing_.]
+ There was a king in Thulè,
+ To whom, when near her grave,
+ The mistress he loved so truly
+ A golden goblet gave.
+
+ He cherished it as a lover,
+ He drained it, every bout;
+ His eyes with tears ran over,
+ As oft as he drank thereout.
+
+ And when he found himself dying,
+ His towns and cities he told;
+ Naught else to his heir denying
+ Save only the goblet of gold.
+
+ His knights he straightway gathers
+ And in the midst sate he,
+ In the banquet hall of the fathers
+ In the castle over the sea.
+
+ There stood th' old knight of liquor,
+ And drank the last life-glow,
+ Then flung the holy beaker
+ Into the flood below.
+
+ He saw it plunging, drinking
+ And sinking in the roar,
+ His eyes in death were sinking,
+ He never drank one drop more.
+ [_She opens the press, to put away her clothes,
+ and discovers the casket_.]
+
+How in the world came this fine casket here?
+I locked the press, I'm very clear.
+I wonder what's inside! Dear me! it's very queer!
+Perhaps 'twas brought here as a pawn,
+In place of something mother lent.
+Here is a little key hung on,
+A single peep I shan't repent!
+What's here? Good gracious! only see!
+I never saw the like in my born days!
+On some chief festival such finery
+Might on some noble lady blaze.
+How would this chain become my neck!
+Whose may this splendor be, so lonely?
+ [_She arrays herself in it, and steps before the glass_.]
+Could I but claim the ear-rings only!
+A different figure one would make.
+What's beauty worth to thee, young blood!
+May all be very well and good;
+What then? 'Tis half for pity's sake
+They praise your pretty features.
+Each burns for gold,
+All turns on gold,--
+Alas for us! poor creatures!
+
+
+
+
+ PROMENADE.
+
+
+ FAUST [_going up and down in thought_.] MEPHISTOPHELES _to him_.
+
+_Mephistopheles_. By all that ever was jilted! By all the infernal fires!
+I wish I knew something worse, to curse as my heart desires!
+
+_Faust_. What griping pain has hold of thee?
+Such grins ne'er saw I in the worst stage-ranter!
+
+_Mephistopheles_. Oh, to the devil I'd give myself instanter,
+If I were not already he!
+
+_Faust_. Some pin's loose in your head, old fellow!
+That fits you, like a madman thus to bellow!
+
+_Mephistopheles_. Just think, the pretty toy we got for Peg,
+A priest has hooked, the cursed plague I--
+The thing came under the eye of the mother,
+And caused her a dreadful internal pother:
+The woman's scent is fine and strong;
+Snuffles over her prayer-book all day long,
+And knows, by the smell of an article, plain,
+Whether the thing is holy or profane;
+And as to the box she was soon aware
+There could not be much blessing there.
+"My child," she cried, "unrighteous gains
+Ensnare the soul, dry up the veins.
+We'll consecrate it to God's mother,
+She'll give us some heavenly manna or other!"
+Little Margaret made a wry face; "I see
+'Tis, after all, a gift horse," said she;
+"And sure, no godless one is he
+Who brought it here so handsomely."
+The mother sent for a priest (they're cunning);
+Who scarce had found what game was running,
+When he rolled his greedy eyes like a lizard,
+And, "all is rightly disposed," said he,
+"Who conquers wins, for a certainty.
+The church has of old a famous gizzard,
+She calls it little whole lands to devour,
+Yet never a surfeit got to this hour;
+The church alone, dear ladies; _sans_ question,
+Can give unrighteous gains digestion."
+
+_Faust_. That is a general pratice, too,
+Common alike with king and Jew.
+
+_Mephistopheles_. Then pocketed bracelets and chains and rings
+As if they were mushrooms or some such things,
+With no more thanks, (the greedy-guts!)
+Than if it had been a basket of nuts,
+Promised them all sorts of heavenly pay--
+And greatly edified were they.
+
+_Faust_. And Margery?
+
+_Mephistopheles_. Sits there in distress,
+And what to do she cannot guess,
+The jewels her daily and nightly thought,
+And he still more by whom they were brought.
+
+_Faust._ My heart is troubled for my pet.
+Get her at once another set!
+The first were no great things in their way.
+
+_Mephistopheles._ O yes, my gentleman finds all child's play!
+
+_Faust._ And what I wish, that mind and do!
+Stick closely to her neighbor, too.
+Don't be a devil soft as pap,
+And fetch me some new jewels, old chap!
+
+_Mephistopheles._ Yes, gracious Sir, I will with pleasure.
+ [_Exit_ FAUST.]
+Such love-sick fools will puff away
+Sun, moon, and stars, and all in the azure,
+To please a maiden's whimsies, any day.
+ [_Exit._]
+
+
+
+
+ THE NEIGHBOR'S HOUSE.
+
+
+ MARTHA [_alone]._
+My dear good man--whom God forgive!
+He has not treated me well, as I live!
+Right off into the world he's gone
+And left me on the straw alone.
+I never did vex him, I say it sincerely,
+I always loved him, God knows how dearly.
+ [_She weeps_.]
+Perhaps he's dead!--O cruel fate!--
+If I only had a certificate!
+
+ _Enter_ MARGARET.
+Dame Martha!
+
+_Martha_. What now, Margery?
+
+_Margaret_. I scarce can keep my knees from sinking!
+Within my press, again, not thinking,
+I find a box of ebony,
+With things--can't tell how grand they are,--
+More splendid than the first by far.
+
+_Martha_. You must not tell it to your mother,
+She'd serve it as she did the other.
+
+_Margaret_. Ah, only look! Behold and see!
+
+_Martha [puts them on her_]. Fortunate thing! I envy thee!
+
+_Margaret._ Alas, in the street or at church I never
+Could be seen on any account whatever.
+
+_Martha._ Come here as often as you've leisure,
+And prink yourself quite privately;
+Before the looking-glass walk up and down at pleasure,
+Fine times for both us 'twill be;
+Then, on occasions, say at some great feast,
+Can show them to the world, one at a time, at least.
+A chain, and then an ear-pearl comes to view;
+Your mother may not see, we'll make some pretext, too.
+
+_Margaret._ Who could have brought both caskets in succession?
+There's something here for just suspicion!
+ [_A knock._ ]
+Ah, God! If that's my mother--then!
+
+_Martha_ [_peeping through the blind_].
+'Tis a strange gentleman--come in!
+
+ [_Enter_ MEPHISTOPHELES.]
+Must, ladies, on your kindness reckon
+To excuse the freedom I have taken;
+ [_Steps back with profound respect at seeing_ MARGARET.]
+I would for Dame Martha Schwerdtlein inquire!
+
+_Martha._ I'm she, what, sir, is your desire?
+
+_Mephistopheles_ [_aside to her_]. I know your face, for now 'twill do;
+A distinguished lady is visiting you.
+For a call so abrupt be pardon meted,
+This afternoon it shall be repeated.
+
+_Martha [aloud]._ For all the world, think, child! my sakes!
+The gentleman you for a lady takes.
+
+_Margaret_. Ah, God! I am a poor young blood;
+The gentleman is quite too good;
+The jewels and trinkets are none of my own.
+
+_Mephistopheles_. Ah, 'tis not the jewels and trinkets alone;
+Her look is so piercing, so _distinguè_!
+How glad I am to be suffered to stay.
+
+_Martha_. What bring you, sir? I long to hear--
+
+_Mephistopheles_. Would I'd a happier tale for your ear!
+I hope you'll forgive me this one for repeating:
+Your husband is dead and sends you a greeting.
+
+_Martha_. Is dead? the faithful heart! Woe! Woe!
+My husband dead! I, too, shall go!
+
+_Margaret_. Ah, dearest Dame, despair not thou!
+
+_Mephistopheles_ Then, hear the mournful story now!
+
+_Margaret_. Ah, keep me free from love forever,
+I should never survive such a loss, no, never!
+
+_Mephistopheles_. Joy and woe, woe and joy, must have each other.
+
+_Martha_. Describe his closing hours to me!
+
+_Mephistopheles_. In Padua lies our departed brother,
+In the churchyard of St. Anthony,
+In a cool and quiet bed lies sleeping,
+In a sacred spot's eternal keeping.
+
+_Martha_. And this was all you had to bring me?
+
+_Mephistopheles_. All but one weighty, grave request!
+"Bid her, when I am dead, three hundred masses sing me!"
+With this I have made a clean pocket and breast.
+
+_Martha_. What! not a medal, pin nor stone?
+Such as, for memory's sake, no journeyman will lack,
+Saved in the bottom of his sack,
+And sooner would hunger, be a pauper--
+
+_Mephistopheles_. Madam, your case is hard, I own!
+But blame him not, he squandered ne'er a copper.
+He too bewailed his faults with penance sore,
+Ay, and his wretched luck bemoaned a great deal more.
+
+_Margaret_. Alas! that mortals so unhappy prove!
+I surely will for him pray many a requiem duly.
+
+_Mephistopheles_. You're worthy of a spouse this moment; truly
+You are a child a man might love.
+
+_Margaret_. It's not yet time for that, ah no!
+
+_Mephistopheles_. If not a husband, say, meanwhile a beau.
+It is a choice and heavenly blessing,
+Such a dear thing to one's bosom pressing.
+
+_Margaret_. With us the custom is not so.
+
+_Mephistopheles_. Custom or not! It happens, though.
+
+_Martha_. Tell on!
+
+_Mephistopheles_. I slood beside his bed, as he lay dying,
+Better than dung it was somewhat,--
+Half-rotten straw; but then, he died as Christian ought,
+And found an unpaid score, on Heaven's account-book lying.
+"How must I hate myself," he cried, "inhuman!
+So to forsake my business and my woman!
+Oh! the remembrance murders me!
+Would she might still forgive me this side heaven!"
+
+_Martha_ [_weeping_]. The dear good man! he has been long forgiven.
+
+_Mephistopheles_. "But God knows, I was less to blame than she."
+
+_Martha_. A lie! And at death's door! abominable!
+
+_Mephistopheles_. If I to judge of men half-way am able,
+He surely fibbed while passing hence.
+"Ways to kill time, (he said)--be sure, I did not need them;
+First to get children--and then bread to feed them,
+And bread, too, in the widest sense,
+And even to eat my bit in peace could not be thought on."
+
+_Martha_. Has he all faithfulness, all love, so far forgotten,
+The drudgery by day and night!
+
+_Mephistopheles_. Not so, he thought of you with all his might.
+He said: "When I from Malta went away,
+For wife and children my warm prayers ascended;
+And Heaven so far our cause befriended,
+Our ship a Turkish cruiser took one day,
+Which for the mighty Sultan bore a treasure.
+Then valor got its well-earned pay,
+And I too, who received but my just measure,
+A goodly portion bore away."
+
+_Martha_. How? Where? And he has left it somewhere buried?
+
+_Mephistopheles_. Who knows which way by the four winds 'twas carried?
+He chanced to take a pretty damsel's eye,
+As, a strange sailor, he through Naples jaunted;
+All that she did for him so tenderly,
+E'en to his blessed end the poor man haunted.
+
+_Martha_. The scamp! his children thus to plunder!
+And could not all his troubles sore
+Arrest his vile career, I wonder?
+
+_Mephistopheles_. But mark! his death wipes off the score.
+Were I in your place now, good lady;
+One year I'd mourn him piously
+And look about, meanwhiles, for a new flame already.
+
+_Martha_. Ah, God! another such as he
+I may not find with ease on this side heaven!
+Few such kind fools as this dear spouse of mine.
+Only to roving he was too much given,
+And foreign women and foreign wine,
+And that accursed game of dice.
+
+_Mephistopheles_. Mere trifles these; you need not heed 'em,
+If he, on his part, not o'er-nice,
+Winked at, in you, an occasional freedom.
+I swear, on that condition, too,
+I would, myself, 'change rings with you!
+
+_Martha_. The gentleman is pleased to jest now!
+
+_Mephistopheles [aside_]. I see it's now high time I stirred!
+She'd take the very devil at his word.
+ [_To_ MARGERY.]
+How is it with your heart, my best, now?
+
+_Margaret_. What means the gentleman?
+
+_Mephistopheles. [aside_]. Thou innocent young heart!
+ [_Aloud_.]
+Ladies, farewell!
+
+_Margaret_. Farewell!
+
+_Martha_. But quick, before we part!--
+I'd like some witness, vouching truly
+Where, how and when my love died and was buried duly.
+I've always paid to order great attention,
+Would of his death read some newspaper mention.
+
+_Mephistopheles_. Ay, my dear lady, in the mouths of two
+Good witnesses each word is true;
+I've a friend, a fine fellow, who, when you desire,
+Will render on oath what you require.
+I'll bring him here.
+
+_Martha_. O pray, sir, do!
+
+_Mephistopheles_. And this young lady 'll be there too?
+Fine boy! has travelled everywhere,
+And all politeness to the fair.
+
+_Margaret_. Before him shame my face must cover.
+
+_Mephistopheles_. Before no king the wide world over!
+
+_Martha_. Behind the house, in my garden, at leisure,
+We'll wait this eve the gentlemen's pleasure.
+
+
+
+
+ STREET.
+
+ FAUST. MEPHISTOPHELES.
+
+_Faust_. How now? What progress? Will 't come right?
+
+_Mephistopheles_. Ha, bravo? So you're all on fire?
+Full soon you'll see whom you desire.
+In neighbor Martha's grounds we are to meet tonight.
+That woman's one of nature's picking
+For pandering and gipsy-tricking!
+
+_Faust_. So far, so good!
+
+_Mephistopheles_. But one thing we must do.
+
+_Faust_. Well, one good turn deserves another, true.
+
+_Mephistopheles_. We simply make a solemn deposition
+That her lord's bones are laid in good condition
+In holy ground at Padua, hid from view.
+
+_Faust_. That's wise! But then we first must make the journey thither?
+
+_Mephistopheles. Sancta simplicitas_! no need of such to-do;
+Just swear, and ask not why or whether.
+
+_Faust_. If that's the best you have, the plan's not worth a feather.
+
+_Mephistopheles_. O holy man! now that's just you!
+In all thy life hast never, to this hour,
+To give false witness taken pains?
+Have you of God, the world, and all that it contains,
+Of man, and all that stirs within his heart and brains,
+Not given definitions with great power,
+Unscrupulous breast, unblushing brow?
+And if you search the matter clearly,
+Knew you as much thereof, to speak sincerely,
+As of Herr Schwerdtlein's death? Confess it now!
+
+_Faust_. Thou always wast a sophist and a liar.
+
+_Mephistopheles_. Ay, if one did not look a little nigher.
+For will you not, in honor, to-morrow
+Befool poor Margery to her sorrow,
+And all the oaths of true love borrow?
+
+_Faust_. And from the heart, too.
+
+_Mephistopheles_. Well and fair!
+Then there'll be talk of truth unending,
+Of love o'ermastering, all transcending--
+Will every word be heart-born there?
+
+_Faust_. Enough! It will!--If, for the passion
+That fills and thrills my being's frame,
+I find no name, no fit expression,
+Then, through the world, with all my senses, ranging,
+Seek what most strongly speaks the unchanging.
+And call this glow, within me burning,
+Infinite--endless--endless yearning,
+Is that a devilish lying game?
+
+_Mephistopheles_. I'm right, nathless!
+
+_Faust_. Now, hark to me--
+This once, I pray, and spare my lungs, old fellow--
+Whoever _will_ be right, and has a tongue to bellow,
+Is sure to be.
+But come, enough of swaggering, let's be quit,
+For thou art right, because I must submit.
+
+
+
+
+ GARDEN.
+
+ MARGARET _on_ FAUST'S _arm_. MARTHA _with_ MEPHISTOPHELES.
+ [_Promenading up and down_.]
+
+_Margaret_. The gentleman but makes me more confused
+
+With all his condescending goodness.
+Men who have travelled wide are used
+To bear with much from dread of rudeness;
+I know too well, a man of so much mind
+In my poor talk can little pleasure find.
+
+_Faust_. One look from thee, one word, delights me more
+Than this world's wisdom o'er and o'er.
+ [_Kisses her hand_.]
+
+_Margaret_. Don't take that trouble, sir! How could you bear to kiss it?
+A hand so ugly, coarse, and rough!
+How much I've had to do! must I confess it--
+Mother is more than close enough.
+ [_They pass on_.]
+
+_Martha_. And you, sir, are you always travelling so?
+
+_Mephistopheles_. Alas, that business forces us to do it!
+With what regret from many a place we go,
+Though tenderest bonds may bind us to it!
+
+_Martha_. 'Twill do in youth's tumultuous maze
+To wander round the world, a careless rover;
+But soon will come the evil days,
+And then, a lone dry stick, on the grave's brink to hover,
+For that nobody ever prays.
+
+_Mephistopheles_. The distant prospect shakes my reason.
+
+_Martha_. Then, worthy sir, bethink yourself in season.
+ [_They pass on_.]
+
+_Margaret_. Yes, out of sight and out of mind!
+Politeness you find no hard matter;
+But you have friends in plenty, better
+Than I, more sensible, more refined.
+
+_Faust_. Dear girl, what one calls sensible on earth,
+Is often vanity and nonsense.
+
+_Margaret_. How?
+
+_Faust_. Ah, that the pure and simple never know
+Aught of themselves and all their holy worth!
+That meekness, lowliness, the highest measure
+Of gifts by nature lavished, full and free--
+
+_Margaret_. One little moment, only, think of me,
+I shall to think of you have ample time and leisure.
+
+_Faust_. You're, may be, much alone?
+
+_Margaret_. Our household is but small, I own,
+And yet needs care, if truth were known.
+We have no maid; so I attend to cooking, sweeping,
+Knit, sew, do every thing, in fact;
+And mother, in all branches of housekeeping,
+Is so exact!
+Not that she need be tied so very closely down;
+We might stand higher than some others, rather;
+A nice estate was left us by my father,
+A house and garden not far out of town.
+Yet, after all, my life runs pretty quiet;
+My brother is a soldier,
+My little sister's dead;
+With the dear child indeed a wearing life I led;
+And yet with all its plagues again would gladly try it,
+The child was such a pet.
+
+_Faust_. An angel, if like thee!
+
+_Margaret_. I reared her and she heartily loved me.
+She and my father never saw each other,
+He died before her birth, and mother
+Was given up, so low she lay,
+But me, by slow degrees, recovered, day by day.
+Of course she now, long time so feeble,
+To nurse the poor little worm was unable,
+And so I reared it all alone,
+With milk and water; 'twas my own.
+Upon my bosom all day long
+It smiled and sprawled and so grew strong.
+
+_Faust_. Ah! thou hast truly known joy's fairest flower.
+
+_Margaret_. But no less truly many a heavy hour.
+The wee thing's cradle stood at night
+Close to my bed; did the least thing awake her,
+My sleep took flight;
+'Twas now to nurse her, now in bed to take her,
+Then, if she was not still, to rise,
+Walk up and down the room, and dance away her cries,
+And at the wash-tub stand, when morning streaked the skies;
+Then came the marketing and kitchen-tending,
+Day in, day out, work never-ending.
+One cannot always, sir, good temper keep;
+But then it sweetens food and sweetens sleep.
+ [_They pass on_.]
+
+_Martha_. But the poor women suffer, you must own:
+A bachelor is hard of reformation.
+
+_Mephistopheles_. Madam, it rests with such as you, alone,
+To help me mend my situation.
+
+_Martha_. Speak plainly, sir, has none your fancy taken?
+Has none made out a tender flame to waken?
+
+_Mephistopheles_. The proverb says: A man's own hearth,
+And a brave wife, all gold and pearls are worth.
+
+_Martha_. I mean, has ne'er your heart been smitten slightly?
+
+_Mephistopheles_. I have, on every hand, been entertained politely.
+
+_Martha_. Have you not felt, I mean, a serious intention?
+
+_Mephistopheles_.
+Jesting with women, that's a thing one ne'er should mention.
+
+_Martha_. Ah, you misunderstand!
+
+_Mephistopheles_. It grieves me that I should!
+But this I understand--that you are good.
+ [_They pass on_.]
+
+_Faust_. So then, my little angel recognized me,
+As I came through the garden gate?
+
+_Margaret_. Did not my downcast eyes show you surprised me?
+
+_Faust_. And thou forgav'st that liberty, of late?
+That impudence of mine, so daring,
+As thou wast home from church repairing?
+
+_Margaret_. I was confused, the like was new to me;
+No one could say a word to my dishonor.
+Ah, thought I, has he, haply, in thy manner
+Seen any boldness--impropriety?
+It seemed as if the feeling seized him,
+That he might treat this girl just as it pleased him.
+Let me confess! I knew not from what cause,
+Some flight relentings here began to threaten danger;
+I know, right angry with myself I was,
+That I could not be angrier with the stranger.
+
+_Faust_. Sweet darling!
+
+_Margaret_. Let me once!
+
+ [_She plucks a china-aster and picks off the leaves one after another_.]
+
+_Faust_. What's that for? A bouquet?
+
+_Margaret_. No, just for sport.
+
+_Faust_. How?
+
+_Margaret_. Go! you'll laugh at me; away!
+ [_She picks and murmurs to herself_.]
+
+_Faust_. What murmurest thou?
+
+_Margaret [half aloud_]. He loves me--loves me not.
+
+_Faust_. Sweet face! from heaven that look was caught!
+
+_Margaret [goes on_]. Loves me--not--loves me--not--
+ [_picking off the last leaf with tender joy_]
+He loves me!
+
+_Faust_. Yes, my child! And be this floral word
+An oracle to thee. He loves thee!
+Knowest thou all it mean? He loves thee!
+ [_Clasping both her hands_.]
+
+_Margaret_. What thrill is this!
+
+_Faust_. O, shudder not! This look of mine.
+This pressure of the hand shall tell thee
+What cannot be expressed:
+Give thyself up at once and feel a rapture,
+An ecstasy never to end!
+Never!--It's end were nothing but blank despair.
+No, unending! unending!
+
+ [MARGARET _presses his hands, extricates herself, and runs away.
+ He stands a moment in thought, then follows her_].
+
+_Martha [coming_]. The night falls fast.
+
+_Mephistopheles_. Ay, and we must away.
+
+_Martha_. If it were not for one vexation,
+I would insist upon your longer stay.
+Nobody seems to have no occupation,
+No care nor labor,
+Except to play the spy upon his neighbor;
+And one becomes town-talk, do whatsoe'er they may.
+But where's our pair of doves?
+
+_Mephistopheles_. Flown up the alley yonder.
+Light summer-birds!
+
+_Martha_. He seems attached to her.
+
+_Mephistopheles_. No wonder.
+And she to him. So goes the world, they say.
+
+
+
+
+ A SUMMER-HOUSE.
+
+ MARGARET [_darts in, hides behind the door, presses the tip of
+ her finger to her lips, and peeps through the crack_].
+
+_Margaret_. He comes!
+
+ _Enter_ FAUST.
+
+_Faust_. Ah rogue, how sly thou art!
+I've caught thee!
+ [_Kisses her_.]
+
+_Margaret [embracing him and returning the kiss_].
+Dear good man! I love thee from my heart!
+
+ [MEPHISTOPHELES _knocks_.]
+
+_Faust [stamping_]. Who's there?
+
+_Mephistopheles_. A friend!
+
+_Faust_. A beast!
+
+_Mephistopheles_. Time flies, I don't offend you?
+
+_Martha [entering_]. Yes, sir, 'tis growing late.
+
+_Faust_. May I not now attend you?
+
+_Margaret_. Mother would--Fare thee well!
+
+_Faust_. And must I leave thee then? Farewell!
+
+_Martha_. Adé!
+
+_Margaret_. Till, soon, we meet again!
+
+ [_Exeunt_ FAUST _and_ MEPHISTOPHELES.]
+
+_Margaret_. Good heavens! what such a man's one brain
+Can in itself alone contain!
+I blush my rudeness to confess,
+And answer all he says with yes.
+Am a poor, ignorant child, don't see
+What he can possibly find in me.
+
+ [_Exit_.]
+
+
+
+
+ WOODS AND CAVERN.
+
+_Faust_ [_alone_]. Spirit sublime, thou gav'st me, gav'st me all
+For which I prayed. Thou didst not lift in vain
+Thy face upon me in a flame of fire.
+Gav'st me majestic nature for a realm,
+The power to feel, enjoy her. Not alone
+A freezing, formal visit didst thou grant;
+Deep down into her breast invitedst me
+To look, as if she were a bosom-friend.
+The series of animated things
+Thou bidst pass by me, teaching me to know
+My brothers in the waters, woods, and air.
+And when the storm-swept forest creaks and groans,
+The giant pine-tree crashes, rending off
+The neighboring boughs and limbs, and with deep roar
+The thundering mountain echoes to its fall,
+To a safe cavern then thou leadest me,
+Showst me myself; and my own bosom's deep
+Mysterious wonders open on my view.
+And when before my sight the moon comes up
+With soft effulgence; from the walls of rock,
+From the damp thicket, slowly float around
+The silvery shadows of a world gone by,
+And temper meditation's sterner joy.
+ O! nothing perfect is vouchsafed to man:
+I feel it now! Attendant on this bliss,
+Which brings me ever nearer to the Gods,
+Thou gav'st me the companion, whom I now
+No more can spare, though cold and insolent;
+He makes me hate, despise myself, and turns
+Thy gifts to nothing with a word--a breath.
+He kindles up a wild-fire in my breast,
+Of restless longing for that lovely form.
+Thus from desire I hurry to enjoyment,
+And in enjoyment languish for desire.
+
+ _Enter_ MEPHISTOPHELES.
+
+_Mephistopheles_. Will not this life have tired you by and bye?
+I wonder it so long delights you?
+'Tis well enough for once the thing to try;
+Then off to where a new invites you!
+
+_Faust_. Would thou hadst something else to do,
+That thus to spoil my joy thou burnest.
+
+_Mephistopheles_. Well! well! I'll leave thee, gladly too!--
+Thou dar'st not tell me that in earnest!
+'Twere no great loss, a fellow such as you,
+So crazy, snappish, and uncivil.
+One has, all day, his hands full, and more too;
+To worm out from him what he'd have one do,
+Or not do, puzzles e'en the very devil.
+
+_Faust_. Now, that I like! That's just the tone!
+Wants thanks for boring me till I'm half dead!
+
+_Mephistopheles_. Poor son of earth, if left alone,
+What sort of life wouldst thou have led?
+How oft, by methods all my own,
+I've chased the cobweb fancies from thy head!
+And but for me, to parts unknown
+Thou from this earth hadst long since fled.
+What dost thou here through cave and crevice groping?
+Why like a hornèd owl sit moping?
+And why from dripping stone, damp moss, and rotten wood
+Here, like a toad, suck in thy food?
+Delicious pastime! Ah, I see,
+Somewhat of Doctor sticks to thee.
+
+_Faust_. What new life-power it gives me, canst thou guess--
+This conversation with the wilderness?
+Ay, couldst thou dream how sweet the employment,
+Thou wouldst be devil enough to grudge me my enjoyment.
+
+_Mephistopheles_. Ay, joy from super-earthly fountains!
+By night and day to lie upon the mountains,
+To clasp in ecstasy both earth and heaven,
+Swelled to a deity by fancy's leaven,
+Pierce, like a nervous thrill, earth's very marrow,
+Feel the whole six days' work for thee too narrow,
+To enjoy, I know not what, in blest elation,
+Then with thy lavish love o'erflow the whole creation.
+Below thy sight the mortal cast,
+And to the glorious vision give at last--
+ [_with a gesture_]
+I must not say what termination!
+
+_Faust_. Shame on thee!
+
+_Mephistopheles_. This displeases thee; well, surely,
+Thou hast a right to say "for shame" demurely.
+One must not mention that to chaste ears--never,
+Which chaste hearts cannot do without, however.
+And, in one word, I grudge you not the pleasure
+Of lying to yourself in moderate measure;
+But 'twill not hold out long, I know;
+Already thou art fast recoiling,
+And soon, at this rate, wilt be boiling
+With madness or despair and woe.
+Enough of this! Thy sweetheart sits there lonely,
+And all to her is close and drear.
+Her thoughts are on thy image only,
+She holds thee, past all utterance, dear.
+At first thy passion came bounding and rushing
+Like a brooklet o'erflowing with melted snow and rain;
+Into her heart thou hast poured it gushing:
+And now thy brooklet's dry again.
+Methinks, thy woodland throne resigning,
+'Twould better suit so great a lord
+The poor young monkey to reward
+For all the love with which she's pining.
+She finds the time dismally long;
+Stands at the window, sees the clouds on high
+Over the old town-wall go by.
+"Were I a little bird!"[26] so runneth her song
+All the day, half the night long.
+At times she'll be laughing, seldom smile,
+At times wept-out she'll seem,
+Then again tranquil, you'd deem,--
+Lovesick all the while.
+
+_Faust_. Viper! Viper!
+
+_Mephistopheles_ [_aside_]. Ay! and the prey grows riper!
+
+_Faust_. Reprobate! take thee far behind me!
+No more that lovely woman name!
+Bid not desire for her sweet person flame
+Through each half-maddened sense, again to blind me!
+
+_Mephistopheles_. What then's to do? She fancies thou hast flown,
+And more than half she's right, I own.
+
+_Faust_. I'm near her, and, though far away, my word,
+I'd not forget her, lose her; never fear it!
+I envy e'en the body of the Lord,
+Oft as those precious lips of hers draw near it.
+
+_Mephistopheles_. No doubt; and oft my envious thought reposes
+On the twin-pair that feed among the roses.
+
+_Faust_. Out, pimp!
+
+_Mephistopheles_. Well done! Your jeers I find fair game for laughter.
+The God, who made both lad and lass,
+Unwilling for a bungling hand to pass,
+Made opportunity right after.
+But come! fine cause for lamentation!
+Her chamber is your destination,
+And not the grave, I guess.
+
+_Faust_. What are the joys of heaven while her fond arms enfold me?
+O let her kindling bosom hold me!
+Feel I not always her distress?
+The houseless am I not? the unbefriended?
+The monster without aim or rest?
+That, like a cataract, from rock to rock descended
+To the abyss, with maddening greed possest:
+She, on its brink, with childlike thoughts and lowly,--
+Perched on the little Alpine field her cot,--
+This narrow world, so still and holy
+Ensphering, like a heaven, her lot.
+And I, God's hatred daring,
+Could not be content
+The rocks all headlong bearing,
+By me to ruins rent,--
+Her, yea her peace, must I o'erwhelm and bury!
+This victim, hell, to thee was necessary!
+Help me, thou fiend, the pang soon ending!
+What must be, let it quickly be!
+And let her fate upon my head descending,
+Crush, at one blow, both her and me.
+
+_Mephistopheles_. Ha! how it seethes again and glows!
+Go in and comfort her, thou dunce!
+Where such a dolt no outlet sees or knows,
+He thinks he's reached the end at once.
+None but the brave deserve the fair!
+Thou _hast_ had devil enough to make a decent show of.
+For all the world a devil in despair
+Is just the insipidest thing I know of.
+
+
+
+
+ MARGERY'S ROOM.
+
+ MARGERY [_at the spinning-wheel alone_].
+ My heart is heavy,
+ My peace is o'er;
+ I never--ah! never--
+ Shall find it more.
+ While him I crave,
+ Each place is the grave,
+ The world is all
+ Turned into gall.
+ My wretched brain
+ Has lost its wits,
+ My wretched sense
+ Is all in bits.
+ My heart is heavy,
+ My peace is o'er;
+ I never--ah! never--
+ Shall find it more.
+ Him only to greet, I
+ The street look down,
+ Him only to meet, I
+ Roam through town.
+ His lofty step,
+ His noble height,
+ His smile of sweetness,
+ His eye of might,
+ His words of magic,
+ Breathing bliss,
+ His hand's warm pressure
+ And ah! his kiss.
+ My heart is heavy,
+ My peace is o'er,
+ I never--ah! never--
+ Shall find it more.
+ My bosom yearns
+ To behold him again.
+ Ah, could I find him
+ That best of men!
+ I'd tell him then
+ How I did miss him,
+ And kiss him
+ As much as I could,
+ Die on his kisses
+ I surely should!
+
+
+
+
+ MARTHA'S GARDEN.
+
+ MARGARET. FAUST.
+
+_Margaret_. Promise me, Henry.
+
+_Faust_. What I can.
+
+_Margaret_. How is it now with thy religion, say?
+I know thou art a dear good man,
+But fear thy thoughts do not run much that way.
+
+_Faust_. Leave that, my child! Enough, thou hast my heart;
+For those I love with life I'd freely part;
+I would not harm a soul, nor of its faith bereave it.
+
+_Margaret_. That's wrong, there's one true faith--one must believe it?
+
+_Faust_. Must one?
+
+_Margaret_. Ah, could I influence thee, dearest!
+The holy sacraments thou scarce reverest.
+
+_Faust_. I honor them.
+
+_Margaret_. But yet without desire.
+Of mass and confession both thou'st long begun to tire.
+Believest thou in God?
+
+_Faust_. My. darling, who engages
+To say, I do believe in God?
+The question put to priests or sages:
+Their answer seems as if it sought
+To mock the asker.
+
+_Margaret_. Then believ'st thou not?
+
+_Faust_. Sweet face, do not misunderstand my thought!
+Who dares express him?
+And who confess him,
+Saying, I do believe?
+A man's heart bearing,
+What man has the daring
+To say: I acknowledge him not?
+The All-enfolder,
+The All-upholder,
+Enfolds, upholds He not
+Thee, me, Himself?
+Upsprings not Heaven's blue arch high o'er thee?
+Underneath thee does not earth stand fast?
+See'st thou not, nightly climbing,
+Tenderly glancing eternal stars?
+Am I not gazing eye to eye on thee?
+Through brain and bosom
+Throngs not all life to thee,
+Weaving in everlasting mystery
+Obscurely, clearly, on all sides of thee?
+Fill with it, to its utmost stretch, thy breast,
+And in the consciousness when thou art wholly blest,
+Then call it what thou wilt,
+Joy! Heart! Love! God!
+I have no name to give it!
+All comes at last to feeling;
+Name is but sound and smoke,
+Beclouding Heaven's warm glow.
+
+_Margaret_. That is all fine and good, I know;
+And just as the priest has often spoke,
+Only with somewhat different phrases.
+
+_Faust_. All hearts, too, in all places,
+Wherever Heaven pours down the day's broad blessing,
+Each in its way the truth is confessing;
+And why not I in mine, too?
+
+_Margaret_. Well, all have a way that they incline to,
+But still there is something wrong with thee;
+Thou hast no Christianity.
+
+_Faust_. Dear child!
+
+_Margaret_. It long has troubled me
+That thou shouldst keep such company.
+
+_Faust_. How so?
+
+_Margaret_. The man whom thou for crony hast,
+Is one whom I with all my soul detest.
+Nothing in all my life has ever
+Stirred up in my heart such a deep disfavor
+As the ugly face that man has got.
+
+_Faust_. Sweet plaything; fear him not!
+
+_Margaret_. His presence stirs my blood, I own.
+I can love almost all men I've ever known;
+But much as thy presence with pleasure thrills me,
+That man with a secret horror fills me.
+And then for a knave I've suspected him long!
+God pardon me, if I do him wrong!
+
+_Faust_. To make up a world such odd sticks are needed.
+
+_Margaret_. Shouldn't like to live in the house where he did!
+Whenever I see him coming in,
+He always wears such a mocking grin.
+Half cold, half grim;
+One sees, that naught has interest for him;
+'Tis writ on his brow and can't be mistaken,
+No soul in him can love awaken.
+I feel in thy arms so happy, so free,
+I yield myself up so blissfully,
+He comes, and all in me is closed and frozen now.
+
+_Faust_. Ah, thou mistrustful angel, thou!
+
+_Margaret_. This weighs on me so sore,
+That when we meet, and he is by me,
+I feel, as if I loved thee now no more.
+Nor could I ever pray, if he were nigh me,
+That eats the very heart in me;
+Henry, it must be so with thee.
+
+_Faust_. 'Tis an antipathy of thine!
+
+_Margaret_. Farewell!
+
+_Faust_. Ah, can I ne'er recline
+One little hour upon thy bosom, pressing
+My heart to thine and all my soul confessing?
+
+_Margaret_. Ah, if my chamber were alone,
+This night the bolt should give thee free admission;
+But mother wakes at every tone,
+And if she had the least suspicion,
+Heavens! I should die upon the spot!
+
+_Faust_. Thou angel, need of that there's not.
+Here is a flask! Three drops alone
+Mix with her drink, and nature
+Into a deep and pleasant sleep is thrown.
+
+_Margaret_. Refuse thee, what can I, poor creature?
+I hope, of course, it will not harm her!
+
+_Faust_. Would I advise it then, my charmer?
+
+_Margaret_. Best man, when thou dost look at me,
+I know not what, moves me to do thy will;
+I have already done so much for thee,
+Scarce any thing seems left me to fulfil.
+ [_Exit_.]
+
+ Enter_ MEPHISTOPHELES.
+
+_Mephtftopheles_. The monkey! is she gone?
+
+_Faust_. Hast played the spy again?
+
+_Mephistopheles_. I overheard it all quite fully.
+The Doctor has been well catechized then?
+Hope it will sit well on him truly.
+The maidens won't rest till they know if the men
+Believe as good old custom bids them do.
+They think: if there he yields, he'll follow our will too.
+
+_Faust_. Monster, thou wilt not, canst not see,
+How this true soul that loves so dearly,
+Yet hugs, at every cost,
+The faith which she
+Counts Heaven itself, is horror-struck sincerely
+To think of giving up her dearest man for lost.
+
+_Mephistopheles_. Thou supersensual, sensual wooer,
+A girl by the nose is leading thee.
+
+_Faust_. Abortion vile of fire and sewer!
+
+_Mephistopheles_. In physiognomy, too, her skill is masterly.
+When I am near she feels she knows not how,
+My little mask some secret meaning shows;
+She thinks, I'm certainly a genius, now,
+Perhaps the very devil--who knows?
+To-night then?--
+
+_Faust_. Well, what's that to you?
+
+_Mephistopheles_. I find my pleasure in it, too!
+
+
+
+
+ AT THE WELL.
+
+ MARGERY _and_ LIZZY _with Pitchers._
+
+_Lizzy_. Hast heard no news of Barbara to-day?
+
+_Margery_. No, not a word. I've not been out much lately.
+
+_Lizzy_. It came to me through Sybill very straightly.
+She's made a fool of herself at last, they say.
+That comes of taking airs!
+
+_Margery_. What meanst thou?
+
+_Lizzy_. Pah!
+She daily eats and drinks for two now.
+
+_Margery_. Ah!
+
+_Lizzy_. It serves the jade right for being so callow.
+How long she's been hanging upon the fellow!
+Such a promenading!
+To fair and dance parading!
+Everywhere as first she must shine,
+He was treating her always with tarts and wine;
+She began to think herself something fine,
+And let her vanity so degrade her
+That she even accepted the presents he made her.
+There was hugging and smacking, and so it went on--
+And lo! and behold! the flower is gone!
+
+_Margery_. Poor thing!
+
+_Lizzy_. Canst any pity for her feel!
+When such as we spun at the wheel,
+Our mothers kept us in-doors after dark;
+While she stood cozy with her spark,
+Or sate on the door-bench, or sauntered round,
+And never an hour too long they found.
+But now her pride may let itself down,
+To do penance at church in the sinner's gown!
+
+_Margery_. He'll certainly take her for his wife.
+
+_Lizzy_. He'd be a fool! A spruce young blade
+Has room enough to ply his trade.
+Besides, he's gone.
+
+_Margery_. Now, that's not fair!
+
+_Lizzy_. If she gets him, her lot'll be hard to bear.
+The boys will tear up her wreath, and what's more,
+We'll strew chopped straw before her door.
+
+ [_Exit._]
+
+_Margery [going home]_. Time was when I, too, instead of bewailing,
+Could boldly jeer at a poor girl's failing!
+When my scorn could scarcely find expression
+At hearing of another's transgression!
+How black it seemed! though black as could be,
+It never was black enough for me.
+I blessed my soul, and felt so high,
+And now, myself, in sin I lie!
+Yet--all that led me to it, sure,
+O God! it was so dear, so pure!
+
+
+
+
+ DONJON.[27]
+
+ [_In a niche a devotional image of the Mater Dolorosa,
+ before it pots of flowers._]
+
+MARGERY [_puts fresh flowers into the pots_].
+ Ah, hear me,
+ Draw kindly near me,
+ Mother of sorrows, heal my woe!
+
+ Sword-pierced, and stricken
+ With pangs that sicken,
+ Thou seest thy son's last life-blood flow!
+
+ Thy look--thy sighing---
+ To God are crying,
+ Charged with a son's and mother's woe!
+
+ Sad mother!
+ What other
+ Knows the pangs that eat me to the bone?
+ What within my poor heart burneth,
+ How it trembleth, how it yearneth,
+ Thou canst feel and thou alone!
+
+ Go where I will, I never
+ Find peace or hope--forever
+ Woe, woe and misery!
+
+ Alone, when all are sleeping,
+ I'm weeping, weeping, weeping,
+ My heart is crushed in me.
+
+ The pots before my window,
+ In the early morning-hours,
+ Alas, my tears bedewed them,
+ As I plucked for thee these flowers,
+
+ When the bright sun good morrow
+ In at my window said,
+ Already, in my anguish,
+ I sate there in my bed.
+
+ From shame and death redeem me, oh!
+ Draw near me,
+ And, pitying, hear me,
+ Mother of sorrows, heal my woe!
+
+
+
+
+ NIGHT.
+
+ _Street before_ MARGERY'S _Door._
+
+
+ VALENTINE [_soldier,_ MARGERY'S _brother_].
+
+When at the mess I used to sit,
+Where many a one will show his wit,
+And heard my comrades one and all
+The flower of the sex extol,
+Drowning their praise with bumpers high,
+Leaning upon my elbows, I
+Would hear the braggadocios through,
+And then, when it came my turn, too,
+Would stroke my beard and, smiling, say,
+A brimming bumper in my hand:
+All very decent in their way!
+But is there one, in all the land,
+With my sweet Margy to compare,
+A candle to hold to my sister fair?
+Bravo! Kling! Klang! it echoed round!
+One party cried: 'tis truth he speaks,
+She is the jewel of the sex!
+And the braggarts all in silence were bound.
+And now!--one could pull out his hair with vexation,
+And run up the walls for mortification!--
+Every two-legged creature that goes in breeches
+Can mock me with sneers and stinging speeches!
+And I like a guilty debtor sitting,
+For fear of each casual word am sweating!
+And though I could smash them in my ire,
+I dare not call a soul of them liar.
+
+What's that comes yonder, sneaking along?
+There are two of them there, if I see not wrong.
+Is't he, I'll give him a dose that'll cure him,
+He'll not leave the spot alive, I assure him!
+
+
+ FAUST. MEPHISTOPHELES.
+
+_Faust_. How from yon window of the sacristy
+The ever-burning lamp sends up its glimmer,
+And round the edge grows ever dimmer,
+Till in the gloom its flickerings die!
+So in my bosom all is nightlike.
+
+_Mephistopheles_. A starving tom-cat I feel quite like,
+That o'er the fire ladders crawls
+Then softly creeps, ground the walls.
+My aim's quite virtuous ne'ertheless,
+A bit of thievish lust, a bit of wantonness.
+I feel it all my members haunting--
+The glorious Walpurgis night.
+One day--then comes the feast enchanting
+That shall all pinings well requite.
+
+_Faust_. Meanwhile can that the casket be, I wonder,
+I see behind rise glittering yonder.[28]
+
+_Mephistopheles_. Yes, and thou soon shalt have the pleasure
+Of lifting out the precious treasure.
+I lately 'neath the lid did squint,
+Has piles of lion-dollars[29] in't.
+
+_Faust_. But not a jewel? Not a ring?
+To deck my mistress not a trinket?
+
+_Mephistopheles_. I caught a glimpse of some such thing,
+Sort of pearl bracelet I should think it.
+
+_Faust_. That's well! I always like to bear
+Some present when I visit my fair.
+
+_Mephistopheles_. You should not murmur if your fate is,
+To have a bit of pleasure gratis.
+Now, as the stars fill heaven with their bright throng,
+List a fine piece, artistic purely:
+I sing her here a moral song,
+To make a fool of her more surely.
+ [_Sings to the guitar_.][30]
+ What dost thou here,
+ Katrina dear,
+ At daybreak drear,
+ Before thy lover's chamber?
+ Give o'er, give o'er!
+ The maid his door
+ Lets in, no more
+ Goes out a maid--remember!
+
+ Take heed! take heed!
+ Once done, the deed
+ Ye'll rue with speed--
+ And then--good night--poor thing--a!
+ Though ne'er so fair
+ His speech, beware,
+ Until you bear
+ His ring upon your finger.
+
+_Valentine_ [_comes forward_].
+Whom lur'ft thou here? what prey dost scent?
+Rat-catching[81] offspring of perdition!
+To hell goes first the instrument!
+To hell then follows the musician!
+
+_Mephistopheles_. He 's broken the guitar! to music, then, good-bye, now.
+
+_Valentine_. A game of cracking skulls we'll try now!
+
+_Mephistopbeles_ [_to Faust_]. Never you flinch, Sir Doctor! Brisk!
+Mind every word I say---be wary!
+Stand close by me, out with your whisk!
+Thrust home upon the churl! I'll parry.
+
+_Valentine_. Then parry that!
+
+_Mephistopheles_. Be sure. Why not?
+
+_Valentine_. And that!
+
+_Mephistopheles_. With ease!
+
+_Valentine_. The devil's aid he's got!
+But what is this? My hand's already lame.
+
+_Mephistopheles_ [_to Faust_]. Thrust home!
+
+_Valentine_ [_falls_]. O woe!
+
+_Mephistopheles_. Now is the lubber tame!
+But come! We must be off. I hear a clatter;
+And cries of murder, too, that fast increase.
+I'm an old hand to manage the police,
+But then the penal court's another matter.
+
+_Martha_. Come out! Come out!
+
+_Margery_ [_at the window_]. Bring on a light!
+
+_Martha_ [_as above_]. They swear and scuffle, scream and fight.
+
+_People_. There's one, has got's death-blow!
+
+_Martha_ [_coming out_]. Where are the murderers, have they flown?
+
+_Margery_ [_coming out_]. Who's lying here?
+
+_People_. Thy mother's son.
+
+_Margery_. Almighty God! What woe!
+
+_Valentine_. I'm dying! that is quickly said,
+And even quicklier done.
+Women! Why howl, as if half-dead?
+Come, hear me, every one!
+ [_All gather round him_.]
+My Margery, look! Young art thou still,
+But managest thy matters ill,
+Hast not learned out yet quite.
+I say in confidence--think it o'er:
+Thou art just once for all a whore;
+Why, be one, then, outright.
+
+_Margery_. My brother! God! What words to me!
+
+_Valentine_. In this game let our Lord God be!
+That which is done, alas! is done.
+And every thing its course will run.
+With one you secretly begin,
+Presently more of them come in,
+And when a dozen share in thee,
+Thou art the whole town's property.
+
+When shame is born to this world of sorrow,
+The birth is carefully hid from sight,
+And the mysterious veil of night
+To cover her head they borrow;
+Yes, they would gladly stifle the wearer;
+But as she grows and holds herself high,
+She walks uncovered in day's broad eye,
+Though she has not become a whit fairer.
+The uglier her face to sight,
+The more she courts the noonday light.
+
+Already I the time can see
+When all good souls shall shrink from thee,
+Thou prostitute, when thou go'st by them,
+As if a tainted corpse were nigh them.
+Thy heart within thy breast shall quake then,
+When they look thee in the face.
+Shalt wear no gold chain more on thy neck then!
+Shalt stand no more in the holy place!
+No pleasure in point-lace collars take then,
+Nor for the dance thy person deck then!
+But into some dark corner gliding,
+'Mong beggars and cripples wilt be hiding;
+And even should God thy sin forgive,
+Wilt be curs'd on earth while thou shalt live!
+
+_Martha_. Your soul to the mercy of God surrender!
+Will you add to your load the sin of slander?
+
+_Valentine_. Could I get at thy dried-up frame,
+Vile bawd, so lost to all sense of shame!
+Then might I hope, e'en this side Heaven,
+Richly to find my sins forgiven.
+
+_Margery_. My brother! This is hell to me!
+
+_Valentine_. I tell thee, let these weak tears be!
+When thy last hold of honor broke,
+Thou gav'st my heart the heaviest stroke.
+I'm going home now through the grave
+To God, a soldier and a brave.
+ [_Dies_.]
+
+
+
+
+ CATHEDRAL.
+
+ _Service, Organ, and Singing._
+
+
+ [MARGERY _amidst a crowd of people._ EVIL SPIRIT _behind_ MARGERY.]
+
+_Evil Spirit_. How different was it with thee, Margy,
+When, innocent and artless,
+Thou cam'st here to the altar,
+From the well-thumbed little prayer-book,
+Petitions lisping,
+Half full of child's play,
+Half full of Heaven!
+Margy!
+Where are thy thoughts?
+What crime is buried
+Deep within thy heart?
+Prayest thou haply for thy mother, who
+Slept over into long, long pain, on thy account?
+Whose blood upon thy threshold lies?
+--And stirs there not, already
+Beneath thy heart a life
+Tormenting itself and thee
+With bodings of its coming hour?
+
+_Margery_. Woe! Woe!
+Could I rid me of the thoughts,
+Still through my brain backward and forward flitting,
+Against my will!
+
+_Chorus_. Dies irae, dies illa
+Solvet saeclum in favillâ.
+
+ [_Organ plays_.]
+
+_Evil Spirit_. Wrath smites thee!
+Hark! the trumpet sounds!
+The graves are trembling!
+And thy heart,
+Made o'er again
+For fiery torments,
+Waking from its ashes
+Starts up!
+
+_Margery_. Would I were hence!
+I feel as if the organ's peal
+My breath were stifling,
+The choral chant
+My heart were melting.
+
+_Chorus_. Judex ergo cum sedebit,
+Quidquid latet apparebit.
+Nil inultum remanebit.
+
+_Margery_. How cramped it feels!
+The walls and pillars
+Imprison me!
+And the arches
+Crush me!--Air!
+
+_Evil Spirit_. What! hide thee! sin and shame
+Will not be hidden!
+Air? Light?
+Woe's thee!
+
+_Chorus_. Quid sum miser tunc dicturus?
+Quem patronum rogaturus?
+Cum vix justus sit securus.
+
+_Evil Spirit_. They turn their faces,
+The glorified, from thee.
+To take thy hand, the pure ones
+Shudder with horror.
+Woe!
+
+_Chorus_. Quid sum miser tunc dicturus?
+
+_Margery_. Neighbor! your phial!--
+ [_She swoons._]
+
+
+
+
+ WALPURGIS NIGHT.[32]
+
+ _Harz Mountains._
+
+ _District of Schirke and Elend._
+
+
+ FAUST. MEPHISTOPHELES.
+
+_Mephistopheles_. Wouldst thou not like a broomstick, now, to ride on?
+At this rate we are, still, a long way off;
+I'd rather have a good tough goat, by half,
+Than the best legs a man e'er set his pride on.
+
+_Faust_. So long as I've a pair of good fresh legs to stride on,
+Enough for me this knotty staff.
+What use of shortening the way!
+Following the valley's labyrinthine winding,
+Then up this rock a pathway finding,
+From which the spring leaps down in bubbling play,
+That is what spices such a walk, I say!
+Spring through the birch-tree's veins is flowing,
+The very pine is feeling it;
+Should not its influence set our limbs a-glowing?
+
+_Mephistopheles_. I do not feel it, not a bit!
+My wintry blood runs very slowly;
+I wish my path were filled with frost and snow.
+The moon's imperfect disk, how melancholy
+It rises there with red, belated glow,
+And shines so badly, turn where'er one can turn,
+At every step he hits a rock or tree!
+With leave I'll beg a Jack-o'lantern!
+I see one yonder burning merrily.
+Heigh, there! my friend! May I thy aid desire?
+Why waste at such a rate thy fire?
+Come, light us up yon path, good fellow, pray!
+
+_Jack-o'lantern_. Out of respect, I hope I shall be able
+To rein a nature quite unstable;
+We usually take a zigzag way.
+
+_Mephistopheles_. Heigh! heigh! He thinks man's crooked course to travel.
+Go straight ahead, or, by the devil,
+I'll blow your flickering life out with a puff.
+
+_Jack-o'lantern_. You're master of the house, that's plain enough,
+So I'll comply with your desire.
+But see! The mountain's magic-mad to-night,
+And if your guide's to be a Jack-o'lantern's light,
+Strict rectitude you'll scarce require.
+
+FAUST, MEPHISTOPHELES, JACK-O'LANTERN, _in alternate song_.
+
+ Spheres of magic, dream, and vision,
+ Now, it seems, are opening o'er us.
+ For thy credit, use precision!
+ Let the way be plain before us
+ Through the lengthening desert regions.
+
+ See how trees on trees, in legions,
+ Hurrying by us, change their places,
+ And the bowing crags make faces,
+ And the rocks, long noses showing,
+ Hear them snoring, hear them blowing![33]
+
+ Down through stones, through mosses flowing,
+ See the brook and brooklet springing.
+ Hear I rustling? hear I singing?
+ Love-plaints, sweet and melancholy,
+ Voices of those days so holy?
+ All our loving, longing, yearning?
+ Echo, like a strain returning
+ From the olden times, is ringing.
+
+ Uhu! Schuhu! Tu-whit! Tu-whit!
+ Are the jay, and owl, and pewit
+ All awake and loudly calling?
+ What goes through the bushes yonder?
+ Can it be the Salamander--
+ Belly thick and legs a-sprawling?
+ Roots and fibres, snake-like, crawling,
+ Out from rocky, sandy places,
+ Wheresoe'er we turn our faces,
+ Stretch enormous fingers round us,
+ Here to catch us, there confound us;
+ Thick, black knars to life are starting,
+ Polypusses'-feelers darting
+ At the traveller. Field-mice, swarming,
+ Thousand-colored armies forming,
+ Scamper on through moss and heather!
+ And the glow-worms, in the darkling,
+ With their crowded escort sparkling,
+ Would confound us altogether.
+
+ But to guess I'm vainly trying--
+ Are we stopping? are we hieing?
+ Round and round us all seems flying,
+ Rocks and trees, that make grimaces,
+ And the mist-lights of the places
+ Ever swelling, multiplying.
+
+_Mephistopheles_. Here's my coat-tail--tightly thumb it!
+We have reached a middle summit,
+Whence one stares to see how shines
+Mammon in the mountain-mines.
+
+_Faust_. How strangely through the dim recesses
+A dreary dawning seems to glow!
+And even down the deep abysses
+Its melancholy quiverings throw!
+Here smoke is boiling, mist exhaling;
+Here from a vapory veil it gleams,
+Then, a fine thread of light, goes trailing,
+Then gushes up in fiery streams.
+The valley, here, you see it follow,
+One mighty flood, with hundred rills,
+And here, pent up in some deep hollow,
+It breaks on all sides down the hills.
+Here, spark-showers, darting up before us,
+Like golden sand-clouds rise and fall.
+But yonder see how blazes o'er us,
+All up and down, the rocky wall!
+
+_Mephistopheles_. Has not Sir Mammon gloriously lighted
+His palace for this festive night?
+Count thyself lucky for the sight:
+I catch e'en now a glimpse of noisy guests invited.
+
+_Faust_. How the mad tempest[34] sweeps the air!
+On cheek and neck the wind-gusts how they flout me.
+
+_Mephistopheles_. Must seize the rock's old ribs and hold on stoutly!
+Else will they hurl thee down the dark abysses there.
+A mist-rain thickens the gloom.
+Hark, how the forests crash and boom!
+Out fly the owls in dread and wonder;
+Splitting their columns asunder,
+Hear it, the evergreen palaces shaking!
+Boughs are twisting and breaking!
+Of stems what a grinding and moaning!
+Of roots what a creaking and groaning!
+In frightful confusion, headlong tumbling,
+They fall, with a sound of thunder rumbling,
+And, through the wreck-piled ravines and abysses,
+The tempest howls and hisses.
+Hearst thou voices high up o'er us?
+Close around us--far before us?
+Through the mountain, all along,
+Swells a torrent of magic song.
+
+_Witches_ [_in chorus_]. The witches go to the Brocken's top,
+ The stubble is yellow, and green the crop.
+ They gather there at the well-known call,
+ Sir Urian[85] sits at the head of all.
+ Then on we go o'er stone and stock:
+ The witch, she--and--the buck.
+
+_Voice_. Old Baubo comes along, I vow!
+She rides upon a farrow-sow.
+
+_Chorus_. Then honor to whom honor's due!
+ Ma'am Baubo ahead! and lead the crew!
+ A good fat sow, and ma'am on her back,
+ Then follow the witches all in a pack.
+
+_Voice_. Which way didst thou come?
+
+_Voice_. By the Ilsenstein!
+Peeped into an owl's nest, mother of mine!
+What a pair of eyes!
+
+_Voice_. To hell with your flurry!
+Why ride in such hurry!
+
+_Voice_. The hag be confounded!
+My skin flie has wounded!
+
+_Witches_ [_chorus]._ The way is broad, the way is long,
+ What means this noisy, crazy throng?
+ The broom it scratches, the fork it flicks,
+ The child is stifled, the mother breaks.
+
+_Wizards_ [_semi-chorus_]. Like housed-up snails we're creeping on,
+The women all ahead are gone.
+When to the Bad One's house we go,
+She gains a thousand steps, you know.
+
+_The other half_. We take it not precisely so;
+What she in thousand steps can go,
+Make all the haste she ever can,
+'Tis done in just one leap by man.
+
+_Voice_ [_above_]. Come on, come on, from Felsensee!
+
+_Voices_ [_from below_]. We'd gladly join your airy way.
+For wash and clean us as much as we will,
+We always prove unfruitful still.
+
+_Both chorusses_. The wind is hushed, the star shoots by,
+ The moon she hides her sickly eye.
+ The whirling, whizzing magic-choir
+ Darts forth ten thousand sparks of fire.
+
+_Voice_ [_from below_]. Ho, there! whoa, there!
+
+_Voice_ [_from above_]. Who calls from the rocky cleft below there?
+
+_Voice_ [_below_]. Take me too! take me too!
+Three hundred years I've climbed to you,
+Seeking in vain my mates to come at,
+For I can never reach the summit.
+
+_Both chorusses_. Can ride the besom, the stick can ride,
+ Can stride the pitchfork, the goat can stride;
+ Who neither will ride to-night, nor can,
+ Must be forever a ruined man.
+
+_Half-witch_ [_below_]. I hobble on--I'm out of wind--
+And still they leave me far behind!
+To find peace here in vain I come,
+I get no more than I left at home.
+
+_Chorus of witches_. The witch's salve can never fail,
+ A rag will answer for a sail,
+ Any trough will do for a ship, that's tight;
+ He'll never fly who flies not to-night.
+
+_Both chorusses_. And when the highest peak we round,
+ Then lightly graze along the ground,
+ And cover the heath, where eye can see,
+ With the flower of witch-errantry.
+ [_They alight_.]
+
+_Mephistopheles._ What squeezing and pushing, what rustling and hustling!
+What hissing and twirling, what chattering and bustling!
+How it shines and sparkles and burns and stinks!
+A true witch-element, methinks!
+Keep close! or we are parted in two winks.
+Where art thou?
+
+_Faust_ [_in the distance_]. Here!
+
+_Mephistopheles_. What! carried off already?
+Then I must use my house-right.--Steady!
+Room! Squire Voland[36] comes. Sweet people, Clear the ground!
+Here, Doctor, grasp my arm! and, at a single bound;
+Let us escape, while yet 'tis easy;
+E'en for the like of me they're far too crazy.
+See! yonder, something shines with quite peculiar glare,
+And draws me to those bushes mazy.
+Come! come! and let us slip in there.
+
+_Faust_. All-contradicting sprite! To follow thee I'm fated.
+But I must say, thy plan was very bright!
+We seek the Brocken here, on the Walpurgis night,
+Then hold ourselves, when here, completely isolated!
+
+_Mephistopheles_. What motley flames light up the heather!
+A merry club is met together,
+In a small group one's not alone.
+
+_Faust_. I'd rather be up there, I own!
+See! curling smoke and flames right blue!
+To see the Evil One they travel;
+There many a riddle to unravel.
+
+_Mephistopheles_. And tie up many another, too.
+Let the great world there rave and riot,
+We here will house ourselves in quiet.
+The saying has been long well known:
+In the great world one makes a small one of his own.
+I see young witches there quite naked all,
+And old ones who, more prudent, cover.
+For my sake some flight things look over;
+The fun is great, the trouble small.
+I hear them tuning instruments! Curs'd jangle!
+Well! one must learn with such things not to wrangle.
+Come on! Come on! For so it needs must be,
+Thou shalt at once be introduced by me.
+And I new thanks from thee be earning.
+That is no scanty space; what sayst thou, friend?
+Just take a look! thou scarce canst see the end.
+There, in a row, a hundred fires are burning;
+They dance, chat, cook, drink, love; where can be found
+Any thing better, now, the wide world round?
+
+_Faust_. Wilt thou, as things are now in this condition,
+Present thyself for devil, or magician?
+
+_Mephistopheles_. I've been much used, indeed, to going incognito;
+
+But then, on gala-day, one will his order show.
+No garter makes my rank appear,
+But then the cloven foot stands high in honor here.
+Seest thou the snail? Look there! where she comes creeping yonder!
+Had she already smelt the rat,
+I should not very greatly wonder.
+Disguise is useless now, depend on that.
+Come, then! we will from fire to fire wander,
+Thou shalt the wooer be and I the pander.
+ [_To a party who sit round expiring embers_.]
+Old gentlemen, you scarce can hear the fiddle!
+You'd gain more praise from me, ensconced there in the middle,
+'Mongst that young rousing, tousing set.
+One can, at home, enough retirement get.
+
+_General_. Trust not the people's fickle favor!
+However much thou mayst for them have done.
+Nations, as well as women, ever,
+Worship the rising, not the setting sun.
+
+_Minister_. From the right path we've drifted far away,
+The good old past my heart engages;
+Those were the real golden ages,
+When such as we held all the sway.
+
+_Parvenu_. We were no simpletons, I trow,
+And often did the thing we should not;
+But all is turning topsy-turvy now,
+And if we tried to stem the wave, we could not.
+
+_Author_. Who on the whole will read a work today,
+Of moderate sense, with any pleasure?
+And as regards the dear young people, they
+Pert and precocious are beyond all measure.
+
+_Mephistopheles_ [_who all at once appears very old_].
+The race is ripened for the judgment day:
+So I, for the last time, climb the witch-mountain, thinking,
+And, as my cask runs thick, I say,
+The world, too, on its lees is sinking.
+
+_Witch-broker_. Good gentlemen, don't hurry by!
+The opportunity's a rare one!
+My stock is an uncommon fair one,
+Please give it an attentive eye.
+There's nothing in my shop, whatever,
+But on the earth its mate is found;
+That has not proved itself right clever
+To deal mankind some fatal wound.
+No dagger here, but blood has some time stained it;
+No cup, that has not held some hot and poisonous juice,
+And stung to death the throat that drained it;
+No trinket, but did once a maid seduce;
+No sword, but hath some tie of sacred honor riven,
+Or haply from behind through foeman's neck been driven.
+
+_Mephistopheles_. You're quite behind the times, I tell you, Aunty!
+By-gones be by-gones! done is done!
+Get us up something new and jaunty!
+For new things now the people run.
+
+_Faust_. To keep my wits I must endeavor!
+Call this a fair! I swear, I never--!
+
+_Mephistopheles_. Upward the billowy mass is moving;
+You're shoved along and think, meanwhile, you're shoving.
+
+_Faust_. What woman's that?
+
+_Mephistopheles_. Mark her attentively.
+That's Lilith.[37]
+
+_Faust_. Who?
+
+_Mephistopbeles_. Adam's first wife is she.
+Beware of her one charm, those lovely tresses,
+In which she shines preeminently fair.
+When those soft meshes once a young man snare,
+How hard 'twill be to escape he little guesses.
+
+_Faust_. There sit an old one and a young together;
+They've skipped it well along the heather!
+
+_Mephistopheles_. No rest from that till night is through.
+Another dance is up; come on! let us fall to.
+
+_Faust_ [_dancing with the young one_]. A lovely dream once came to me;
+In it I saw an apple-tree;
+Two beauteous apples beckoned there,
+I climbed to pluck the fruit so fair.
+
+_The Fair one_. Apples you greatly seem to prize,
+And did so even in Paradise.
+I feel myself delighted much
+That in my garden I have such.
+
+_Mephistopheles_ [_with the old hag_]. A dismal dream once came to me;
+In it I saw a cloven tree,
+It had a ------ but still,
+I looked on it with right good-will.
+
+_The Hog_. With best respect I here salute
+The noble knight of the cloven foot!
+Let him hold a ------ near,
+If a ------ he does not fear.
+
+_Proctophantasmist_.[38] What's this ye undertake? Confounded crew!
+Have we not giv'n you demonstration?
+No spirit stands on legs in all creation,
+And here you dance just as we mortals do!
+
+_The Fair one_ [_dancing_]. What does that fellow at our ball?
+
+_Faust_ [_dancing_]. Eh! he must have a hand in all.
+What others dance that he appraises.
+Unless each step he criticizes,
+The step as good as no step he will call.
+But when we move ahead, that plagues him more than all.
+If in a circle you would still keep turning,
+As he himself in his old mill goes round,
+He would be sure to call that sound!
+And most so, if you went by his superior learning.
+
+_Proctophantasmist_. What, and you still are here! Unheard off obstinates!
+Begone! We've cleared it up! You shallow pates!
+The devilish pack from rules deliverance boasts.
+We've grown so wise, and Tegel[39] still sees ghosts.
+How long I've toiled to sweep these cobwebs from the brain,
+And yet--unheard of folly! all in vain.
+
+_The Fair one_. And yet on us the stupid bore still tries it!
+
+_Proctophantasmist_. I tell you spirits, to the face,
+I give to spirit-tyranny no place,
+My spirit cannot exercise it.
+ [_They dance on_.]
+I can't succeed to-day, I know it;
+Still, there's the journey, which I like to make,
+And hope, before the final step I take,
+To rid the world of devil and of poet.
+
+_Mephistopheles_. You'll see him shortly sit into a puddle,
+In that way his heart is reassured;
+When on his rump the leeches well shall fuddle,
+Of spirits and of spirit he'll be cured.
+ [_To_ FAUST, _who has left the dance_.]
+Why let the lovely girl slip through thy fingers,
+Who to thy dance so sweetly sang?
+
+_Faust_. Ah, right amidst her singing, sprang
+A wee red mouse from her mouth and made me cower.
+
+_Mephistopheles_. That's nothing wrong! You're in a dainty way;
+Enough, the mouse at least wan't gray.
+Who minds such thing in happy amorous hour?
+
+_Faust_. Then saw I--
+
+_Mephistopheles_. What?
+
+_Faust_. Mephisto, seest thou not
+Yon pale, fair child afar, who stands so sad and lonely,
+And moves so slowly from the spot,
+Her feet seem locked, and she drags them only.
+I must confess, she seems to me
+To look like my own good Margery.
+
+_Mephistopheles_. Leave that alone! The sight no health can bring.
+it is a magic shape, an idol, no live thing.
+To meet it never can be good!
+Its haggard look congeals a mortal's blood,
+And almost turns him into stone;
+The story of Medusa thou hast known.
+
+_Faust_. Yes, 'tis a dead one's eyes that stare upon me,
+Eyes that no loving hand e'er closed;
+That is the angel form of her who won me,
+Tis the dear breast on which I once reposed.
+
+_Mephistopheles_. 'Tis sorcery all, thou fool, misled by passion's dreams!
+For she to every one his own love seems.
+
+_Faust_. What bliss! what woe! Methinks I never
+My sight from that sweet form can sever.
+Seeft thou, not thicker than a knife-blade's back,
+A small red ribbon, fitting sweetly
+The lovely neck it clasps so neatly?
+
+_Mephistopheles_. I see the streak around her neck.
+Her head beneath her arm, you'll next behold her;
+Perseus has lopped it from her shoulder,--
+But let thy crazy passion rest!
+Come, climb with me yon hillock's breast,
+Was e'er the Prater[40] merrier then?
+And if no sorcerer's charm is o'er me,
+That is a theatre before me.
+What's doing there?
+
+_Servibilis_. They'll straight begin again.
+A bran-new piece, the very last of seven;
+To have so much, the fashion here thinks fit.
+By Dilettantes it is given;
+'Twas by a Dilettante writ.
+Excuse me, sirs, I go to greet you;
+I am the curtain-raising Dilettant.
+
+_Mephistopheles_. When I upon the Blocksberg meet you,
+That I approve; for there's your place, I grant.
+
+
+
+
+ WALPURGIS-NIGHT'S DREAM, OR OBERON AND TITANIA'S GOLDEN NUPTIALS.
+
+ _Intermezzo_.
+
+
+_Theatre manager_. Here, for once, we rest, to-day,
+Heirs of Mieding's[41] glory.
+All the scenery we display--
+Damp vale and mountain hoary!
+
+_Herald_. To make the wedding a golden one,
+Must fifty years expire;
+But when once the strife is done,
+I prize the _gold_ the higher.
+
+_Oberon_. Spirits, if my good ye mean,
+Now let all wrongs be righted;
+For to-day your king and queen
+Are once again united.
+
+_Puck_. Once let Puck coming whirling round,
+And set his foot to whisking,
+Hundreds with him throng the ground,
+Frolicking and frisking.
+
+_Ariel_. Ariel awakes the song
+With many a heavenly measure;
+Fools not few he draws along,
+But fair ones hear with pleasure.
+
+_Oberon_. Spouses who your feuds would smother,
+Take from us a moral!
+Two who wish to love each other,
+Need only first to quarrel.
+
+_Titania_. If she pouts and he looks grim,
+Take them both together,
+To the north pole carry him,
+And off with her to t'other.
+
+ _Orchestra Tutti_.
+
+_Fortissimo_. Fly-snouts and gnats'-noses, these,
+And kin in all conditions,
+Grass-hid crickets, frogs in trees,
+We take for our musicians!
+
+_Solo_. See, the Bagpipe comes! fall back!
+Soap-bubble's name he owneth.
+How the _Schnecke-schnicke-schnack_
+Through his snub-nose droneth!
+_Spirit that is just shaping itself_. Spider-foot, toad's-belly, too,
+Give the child, and winglet!
+'Tis no animalcule, true,
+But a poetic thinglet.
+
+_A pair of lovers_. Little step and lofty bound
+Through honey-dew and flowers;
+Well thou trippest o'er the ground,
+But soarst not o'er the bowers.
+
+_Curious traveller_. This must be masquerade!
+How odd!
+My very eyes believe I?
+Oberon, the beauteous God
+Here, to-night perceive I!
+
+_Orthodox_. Neither claws, nor tail I see!
+And yet, without a cavil,
+Just as "the Gods of Greece"[42] were, he
+Must also be a devil.
+
+_Northern artist_. What here I catch is, to be sure,
+But sketchy recreation;
+And yet for my Italian tour
+'Tis timely preparation.
+
+_Purist_. Bad luck has brought me here, I see!
+The rioting grows louder.
+And of the whole witch company,
+There are but two, wear powder.
+
+_Young witch_. Powder becomes, like petticoat,
+Your little, gray old woman:
+Naked I sit upon my goat,
+And show the untrimmed human.
+
+_Matron_. To stand here jawing[43] with you, we
+Too much good-breeding cherish;
+But young and tender though you be,
+I hope you'll rot and perish.
+
+_Leader of the music_. Fly-snouts and gnat-noses, please,
+Swarm not so round the naked!
+Grass-hid crickets, frogs in trees,
+Keep time and don't forsake it!
+
+_Weathercock_ [_towards one side_]. Find better company, who can!
+Here, brides attended duly!
+There, bachelors, ranged man by man,
+Most hopeful people truly!
+
+_Weathercock [towards the other side_].
+And if the ground don't open straight,
+The crazy crew to swallow,
+You'll see me, at a furious rate,
+Jump down to hell's black hollow.
+
+_Xenia[_44] We are here as insects, ah!
+Small, sharp nippers wielding,
+Satan, as our _cher papa_,
+Worthy honor yielding.
+
+_Hennings_. See how naïvely, there, the throng
+Among themselves are jesting,
+You'll hear them, I've no doubt, ere long,
+Their good kind hearts protesting.
+
+_Musagetes_. Apollo in this witches' group
+Himself right gladly loses;
+For truly I could lead this troop
+Much easier than the muses.
+
+_Ci-devant genius of the age_. Right company will raise man up.
+Come, grasp my skirt, Lord bless us!
+The Blocksberg has a good broad top,
+Like Germany's Parnassus.
+
+_Curious traveller_. Tell me who is that stiff man?
+With what stiff step he travels!
+He noses out whate'er he can.
+"He scents the Jesuit devils."
+
+_Crane_. In clear, and muddy water, too,
+The long-billed gentleman fishes;
+Our pious gentlemen we view
+Fingering in devils' dishes.
+
+_Child of this world_. Yes, with the pious ones, 'tis clear,
+"All's grist that comes to their mill;"
+They build their tabernacles here,
+On Blocksberg, as on Carmel.
+
+_Dancer_. Hark! a new choir salutes my ear!
+I hear a distant drumming.
+"Be not disturbed! 'mong reeds you hear
+The one-toned bitterns bumming."
+
+_Dancing-master._ How each his legs kicks up and flings,
+Pulls foot as best he's able!
+The clumsy hops, the crooked springs,
+'Tis quite disreputable!
+
+_Fiddler_. The scurvy pack, they hate, 'tis clear,
+Like cats and dogs, each other.
+Like Orpheus' lute, the bagpipe here
+Binds beast to beast as brother.
+
+_Dogmatist_. You'll not scream down my reason, though,
+By criticism's cavils.
+The devil's something, that I know,
+Else how could there be devils?
+
+_Idealist_. Ah, phantasy, for once thy sway
+Is guilty of high treason.
+If all I see is I, to-day,
+'Tis plain I've lost my reason.
+
+_Realist_. To me, of all life's woes and plagues,
+Substance is most provoking,
+For the first time I feel my legs
+Beneath me almost rocking.
+
+_Supernaturalist_. I'm overjoyed at being here,
+And even among these rude ones;
+For if bad spirits are, 'tis clear,
+There also must be good ones.
+
+_Skeptic_. Where'er they spy the flame they roam,
+And think rich stores to rifle,
+Here such as I are quite at home,
+For _Zweifel_ rhymes with _Teufel_.[45]
+
+_Leader of the music_. Grass-hid cricket, frogs in trees,
+You cursed dilettanti!
+Fly-snouts and gnats'-noses, peace!
+Musicians you, right jaunty!
+
+_The Clever ones_. Sans-souci we call this band
+Of merry ones that skip it;
+Unable on our feet to stand,
+Upon our heads we trip it.
+
+_The Bunglers_. Time was, we caught our tit-bits, too,
+God help us now! that's done with!
+We've danced our leathers entirely through,
+And have only bare soles to run with.
+
+_Jack-o'lanterns_. From the dirty bog we come,
+Whence we've just arisen:
+Soon in the dance here, quite at home,
+As gay young _sparks_ we'll glisten.
+
+_Shooting star_. Trailing from the sky I shot,
+Not a star there missed me:
+Crooked up in this grassy spot,
+Who to my legs will assist me?
+
+_The solid men_. Room there! room there! clear the ground!
+Grass-blades well may fall so;
+Spirits are we, but 'tis found
+They have plump limbs also.
+
+_Puck_. Heavy men! do not, I say,
+Like elephants' calves go stumping:
+Let the plumpest one to-day
+Be Puck, the ever-jumping.
+
+_Ariel_. If the spirit gave, indeed,
+If nature gave you, pinions,
+Follow up my airy lead
+To the rose-dominions!
+
+_Orchestra_ [_pianissimo_]. Gauzy mist and fleecy cloud
+Sun and wind have banished.
+Foliage rustles, reeds pipe loud,
+All the show has vanished.
+
+
+
+
+ DREARY DAY.[46]
+
+ _Field_.
+
+
+ FAUST. MEPHISTOPHELES.
+
+_Faust_. In wretchedness! In despair! Long hunted up and down the earth, a
+miserable fugitive, and caught at last! Locked up as a malefactor in
+prison, to converse with horrible torments--the sweet, unhappy creature!
+Even to this pass! even to this!--Treacherous, worthless spirit, and this
+thou hast hidden from me!--Stand up here--stand up! Roll thy devilish eyes
+round grimly in thy head! Stand and defy me with thy intolerable presence!
+Imprisoned! In irretrievable misery! Given over to evil spirits and to the
+judgment of unfeeling humanity, and me meanwhile thou lullest in insipid
+dissipations, concealest from me her growing anguish, and leavest her
+without help to perish!
+
+_Mephistopheles_. She is not the first!
+
+_Faust_. Dog! abominable monster! Change him, thou Infinite Spirit! change
+the worm back into his canine form, as he was often pleased in the night
+to trot before me, to roll before the feet of the harmless wanderer, and,
+when he fell, to hang on his shoulders. Change him again into his favorite
+shape, that he may crawl before me on his belly in the sand, and that I
+may tread him under foot, the reprobate!--Not the first! Misery! Misery!
+inconceivable by any human soul! that more than one creature ever sank
+into the depth of this wretchedness, that the first in its writhing
+death-agony did not atone for the guilt of all the rest before the eyes of
+the eternally Forgiving! My very marrow and life are consumed by the
+misery of this single one; thou grinnest away composedly at the fate of
+thousands!
+
+_Mephistopheles_. Here we are again at our wits' ends already, where the
+thread of sense, with you mortals, snaps short. Why make a partnership
+with us, if thou canst not carry it through? Wilt fly, and art not proof
+against dizziness? Did we thrust ourselves on thee, or thou on us?
+
+_Faust_. Gnash not so thy greedy teeth against me! It disgusts me!--Great
+and glorious spirit, thou that deignedst to appear to me, who knowest my
+heart and soul, why yoke me to this shame-fellow, who feeds on mischief
+and feasts on ruin?
+
+_Mephistopheles_. Hast thou done?
+
+_Faust_. Rescue her! O woe be unto thee! The most horrible curse on thee
+for thousands of years!
+
+_Mephistopheles_. I cannot loose the bonds of the avenger, nor open his
+bolts.--Rescue her!--Who was it that plunged her into ruin? I or thou?
+ [FAUST _looks wildly round_.]
+Grasp'st thou after the thunder? Well that it was not given to you
+miserable mortals! To crush an innocent respondent, that is a sort of
+tyrant's-way of getting room to breathe in embarrassment.
+
+_Faust_. Lead me to her! She shall be free!
+
+_Mephistopheles_. And the danger which thou incurrest? Know that the guilt
+of blood at thy hand still lies upon the town. Over the place of the
+slain, avenging spirits hover and lurk for the returning murderer.
+
+_Faust_. That, too, from thee? Murder and death of a world upon thee,
+monster! Lead me thither, I say, and free her!
+
+_Mephistopheles_. I will lead thee, and hear what I can do! Have I all
+power in heaven and on earth? I will becloud the turnkey's senses; possess
+thyself of the keys, and bear her out with human hand. I will watch! The
+magic horses shall be ready, and I will bear you away. So much I can do.
+
+_Faust_. Up and away!
+
+
+
+
+ NIGHT. OPEN FIELD.
+
+ FAUST. MEPHISTOPHELES.
+ _Scudding along on black horses_.
+
+_Faust_. What's doing, off there, round the gallows-tree?[47]
+
+_Mephistopheles_. Know not what they are doing and brewing.
+
+_Faust_. Up they go--down they go--wheel about, reel about.
+
+_Mephistopheles_. A witches'-crew.
+
+_Faust_. They're strewing and vowing.
+
+_Mephistopheles_. Pass on! Pass on!
+
+
+
+
+ PRISON.
+
+ FAUST [_with a bunch of keys and a lamp, before an iron door_]
+A long unwonted chill comes o'er me,
+I feel the whole great load of human woe.
+Within this clammy wall that frowns before me
+Lies one whom blinded love, not guilt, brought low!
+Thou lingerest, in hope to grow bolder!
+Thou fearest again to behold her!
+On! Thy shrinking slowly hastens the blow!
+ [_He grasps the key. Singing from within_.]
+My mother, the harlot,
+That strung me up!
+My father, the varlet,
+That ate me up!
+My sister small,
+She gathered up all
+The bones that day,
+And in a cool place did lay;
+Then I woke, a sweet bird, at a magic call;
+Fly away, fly away!
+
+_Faust [unlocking_]. She little dreams, her lover is so near,
+The clanking chains, the rustling straw can hear;
+ [_He enters_.]
+
+_Margaret [burying herself in the bed_]. Woe! woe!
+They come. O death of bitterness!
+
+_Faust_ [_softly_]. Hush! hush! I come to free thee; thou art dreaming.
+
+_Margaret_ [_prostrating herself before him_].
+Art thou a man, then feel for my distress.
+
+_Faust_. Thou'lt wake the guards with thy loud screaming!
+ [_He seizes the chains to tin lock them._]
+
+_Margaret_ [_on her knees_]. Headsman, who's given thee this right
+O'er me, this power!
+Thou com'st for me at dead of night;
+In pity spare me, one short hour!
+Wilt't not be time when Matin bell has rung?
+ [_She stands up._]
+Ah, I am yet so young, so young!
+And death pursuing!
+Fair was I too, and that was my undoing.
+My love was near, far is he now!
+Tom is the wreath, the scattered flowers lie low.
+Take not such violent hold of me!
+Spare me! what harm have I done to thee?
+Let me not in vain implore thee.
+Thou ne'er till now sawft her who lies before thee!
+
+_Faust_. O sorrow worse than death is o'er me!
+
+_Margaret_. Now I am wholly in thy power.
+But first I'd nurse my child--do not prevent me.
+I hugged it through the black night hour;
+They took it from me to torment me,
+And now they say I killed the pretty flower.
+I shall never be happy again, I know.
+They sing vile songs at me! 'Tis bad in them to do it!
+There's an old tale that ends just so,
+Who gave that meaning to it?
+
+_Faust [prostrates himself_]. A lover at thy feet is bending,
+Thy bonds of misery would be rending.
+
+_Margaret [flings herself beside him_].
+O let us kneel, the saints for aid invoking!
+See! 'neath the threshold smoking,
+Fire-breathing,
+Hell is seething!
+There prowling,
+And grim under cover,
+Satan is howling!
+
+_Faust [aloud_]. Margery! Margery!
+
+_Margaret [listening_]. That was the voice of my lover!
+ [_She springs up. The chains fall off_.]
+
+Where is he? Where? He calls. I hear him.
+I'm free! Who hinders? I will be near him.
+I'll fly to his neck! I'll hold him!
+To my bosom I'll enfold him!
+He stood on the threshold--called Margery plainly!
+Hell's howling and clattering to drown it sought vainly,--
+Through the devilish, grim scoffs, that might turn one to stone,
+I caught the sweet, loving, enrapturing tone.
+
+_Faust_. 'Tis I!
+
+_Margaret_. 'Tis thou! O say it once again.
+ [_Clasping again._]
+'Tis he! 'tis he! Where now is all my pain?
+And where the dungeon's anguish? Joy-giver!
+'Tis thou! And come to deliver!
+I am delivered!
+Again before me lies the street,
+Where for the first time thou and I did meet.
+And the garden-bower,
+Where we spent that evening hour.
+
+_Faust_ [_trying to draw her away_]. Come! Come with me!
+
+_Margaret_. O tarry!
+I tarry so gladly where thou tarriest.
+ [_Caressing him._]
+
+_Faust_. Hurry!
+Unless thou hurriest,
+Bitterly we both must rue it.
+
+_Margaret_. Kiss me! Canst no more do it?
+So short an absence, love, as this,
+And forgot how to kiss?
+What saddens me so as I hang about thy neck?
+When once, in thy words, thy looks, such a heaven of blisses
+Came o'er me, I thought my heart would break,
+And it seemed as if thou wouldst smother me with kisses.
+Kiss thou me!
+Else I kiss thee!
+ [_She embraces him._]
+Woe! woe! thy lips are cold,
+Stone-dumb.
+Where's thy love left?
+Oh! I'm bereft!
+Who robbed me?
+ [_She turns from him_]
+
+_Faust_. O come!
+Take courage, my darling! Let us go;
+I clasp-thee with unutterable glow;
+But follow me! For this alone I plead!
+
+_Margaret [turning to him_]. Is it, then, thou?
+And is it thou indeed?
+
+_Faust_. 'Tis I! Come, follow me!
+
+_Margaret_. Thou break'st my chain,
+And tak'st me to thy breast again!
+How comes it, then, that thou art not afraid of me?
+And dost thou know, my friend, who 'tis thou settest free?
+
+_Faust_. Come! come! The night is on the wane.
+
+_Margaret_. Woe! woe! My mother I've slain!
+Have drowned the babe of mine!
+Was it not sent to be mine and thine?
+Thine, too--'tis thou! Scarce true doth it seem.
+Give me thy hand! 'Tis not a dream!
+Thy blessed hand!--But ah! there's dampness here!
+Go, wipe it off! I fear
+There's blood thereon.
+Ah God! what hast thou done!
+Put up thy sword again;
+I pray thee, do!
+
+_Faust_. The past is past--there leave it then,
+Thou kill'st me too!
+
+_Margaret_. No, thou must longer tarry!
+I'll tell thee how each thou shalt bury;
+The places of sorrow
+Make ready to-morrow;
+Must give the best place to my mother,
+The very next to my brother,
+Me a little aside,
+But make not the space too wide!
+And on my right breast let the little one lie.
+No one else will be sleeping by me.
+Once, to feel _thy_ heart beat nigh me,
+Oh, 'twas a precious, a tender joy!
+But I shall have it no more--no, never;
+I seem to be forcing myself on thee ever,
+And thou repelling me freezingly;
+And 'tis thou, the same good soul, I see.
+
+_Faust_. If thou feelest 'tis I, then come with me
+
+_Margaret_. Out yonder?
+
+_Faust_. Into the open air.
+
+_Margaret_. If the grave is there,
+If death is lurking; then come!
+From here to the endless resting-place,
+And not another pace--Thou
+go'st e'en now? O, Henry, might I too.
+
+_Faust_. Thou canst! 'Tis but to will! The door stands open.
+
+_Margaret_. I dare not go; for me there's no more hoping.
+What use to fly? They lie in wait for me.
+So wretched the lot to go round begging,
+With an evil conscience thy spirit plaguing!
+So wretched the lot, an exile roaming--And
+then on my heels they are ever coming!
+
+_Faust_. I shall be with thee.
+
+_Margaret_. Make haste! make haste!
+No time to waste!
+Save thy poor child!
+Quick! follow the edge
+Of the rushing rill,
+Over the bridge
+And by the mill,
+Then into the woods beyond
+On the left where lies the plank
+Over the pond.
+Seize hold of it quick!
+To rise 'tis trying,
+It struggles still!
+Rescue! rescue!
+
+_Faust_. Bethink thyself, pray!
+A single step and thou art free!
+
+_Margaret_. Would we were by the mountain. See!
+There sits my mother on a stone,
+The sight on my brain is preying!
+There sits my mother on a stone,
+And her head is constantly swaying;
+She beckons not, nods not, her head falls o'er,
+So long she's been sleeping, she'll wake no more.
+She slept that we might take pleasure.
+O that was bliss without measure!
+
+_Faust_. Since neither reason nor prayer thou hearest;
+I must venture by force to take thee, dearest.
+
+_Margaret_. Let go! No violence will I bear!
+Take not such a murderous hold of me!
+I once did all I could to gratify thee.
+
+_Faust_. The day is breaking! Dearest! dearest!
+
+_Margaret_. Day! Ay, it is day! the last great day breaks in!
+My wedding-day it should have been!
+Tell no one thou hast been with Margery!
+Alas for my garland! The hour's advancing!
+Retreat is in vain!
+We meet again,
+But not at the dancing.
+The multitude presses, no word is spoke.
+Square, streets, all places--
+sea of faces--
+The bell is tolling, the staff is broke.
+How they seize me and bind me!
+They hurry me off to the bloody block.[48]
+The blade that quivers behind me,
+Quivers at every neck with convulsive shock;
+Dumb lies the world as the grave!
+
+_Faust_. O had I ne'er been born!
+
+_Mephistopheles [appears without_]. Up! or thou'rt lost! The morn
+Flushes the sky.
+Idle delaying! Praying and playing!
+My horses are neighing,
+They shudder and snort for the bound.
+
+_Margaret_. What's that, comes up from the ground?
+He! He! Avaunt! that face!
+What will he in the sacred place?
+He seeks me!
+
+_Faust_. Thou shalt live!
+
+_Margaret_. Great God in heaven!
+Unto thy judgment my soul have I given!
+
+_Mephistopheles [to Faust_].
+Come! come! or in the lurch I leave both her and thee!
+
+_Margaret_. Thine am I, Father! Rescue me!
+Ye angels, holy bands, attend me!
+And camp around me to defend me I
+Henry! I dread to look on thee.
+
+_Mephistopheles_. She's judged!
+
+_Voice [from above_]. She's saved!
+
+_Mephistopheles [to Faust_]. Come thou to me!
+ [_Vanishes with_ FAUST.]
+
+_Voice [from within, dying away_]. Henry! Henry!
+
+
+
+
+NOTES.
+
+
+[Footnote 1: Dedication. The idea of Faust had early entered into Goethe's
+mind. He probably began the work when he was about twenty years old. It
+was first published, as a fragment, in 1790, and did not appear in its
+present form till 1808, when its author's age was nearly sixty. By the
+"forms" are meant, of course, the shadowy personages and scenes of the
+drama.]
+
+[Footnote 2: --"Thy messengers"--
+ "He maketh the winds his-messengers,
+ The flaming lightnings his ministers."
+ _Noyes's Psalms_, c. iv. 4.]
+
+[Footnote 3: "The Word Divine." In translating the German "Werdende"
+(literally, the _becoming, developing_, or _growing_) by the term _word_,
+I mean the _word_ in the largest sense: "In the beginning was the Word,
+&c." Perhaps "nature" would be a pretty good rendering, but "word," being
+derived from "werden," and expressing philosophically and scripturally the
+going forth or manifestation of mind, seemed to me as appropriate a
+translation as any.]
+
+[Footnote 4: "The old fellow." The commentators do not seem quite agreed
+whether "den Alten" (the old one) is an entirely reverential phrase here,
+like the "ancient of days," or savors a little of profane pleasantry, like
+the title "old man" given by boys to their schoolmaster or of "the old
+gentleman" to their fathers. Considering who the speaker is, I have
+naturally inclined to the latter alternative.]
+
+[Footnote 5: "Nostradamus" (properly named Michel Notre Dame) lived
+through the first half of the sixteenth century. He was born in the south
+of France and was of Jewish extraction. As physician and astrologer, he
+was held in high honor by the French nobility and kings.]
+
+[Footnote 6: The "Macrocosm" is the great world of outward things, in
+contrast with its epitome, the little world in man, called the microcosm
+(or world in miniature).]
+
+[Footnote 7: "Famulus" seems to mean a cross between a servant and a
+scholar. The Dominie Sampson called Wagner, is appended to Faust for the
+time somewhat as Sancho is to Don Quixote. The Doctor Faust of the legend
+has a servant by that name, who seems to have been more of a _Sancho_, in
+the sense given to the word by the old New England mothers when upbraiding
+bad boys (you Sanch'!). Curiously enough, Goethe had in early life a
+(treacherous) friend named Wagner, who plagiarized part of Faust and made
+a tragedy of it.]
+
+[Footnote 8: "Mock-heroic play." We have Schlegel's authority for thus
+rendering the phrase "Haupt- und Staats-Action," (literally, "head and
+State-action,") who says that this title was given to dramas designed for
+puppets, when they treated of heroic and historical subjects.]
+
+[Footnote 9: The literal sense of this couplet in the original is:--
+ "Is he, in the bliss of becoming,
+ To creative joy near--"
+"Werde-lust" presents the same difficulty that we found in note 3. This
+same word, "Werden," is also used by the poet in the introductory theatre
+scene (page 7), where he longs for the time when he himself was
+_ripening_, growing, becoming, or _forming_, (as Hayward renders it.) I
+agree with Hayward, "the meaning probably is, that our Saviour enjoys, in
+coming to life again," (I should say, in being born into the upper life,)
+"a happiness nearly equal to that of the Creator in creating."]
+
+[Footnote 10: The Angel-chorusses in this scene present the only instances
+in which the translator, for the sake of retaining the ring and swing of
+the melody, has felt himself obliged to give a transfusion of the spirit
+of the thought, instead of its exact form.
+
+The literal meaning of the first chorus is:--
+
+ Christ is arisen!
+ Joy to the Mortal,
+ Whom the ruinous,
+ Creeping, hereditary
+ Infirmities wound round.
+
+Dr. Hedge has come nearer than any one to reconciling meaning and melody
+thus:--
+
+ "Christ has arisen!
+ Joy to our buried Head!
+ Whom the unmerited,
+ Trailing, inherited
+ Woes did imprison."
+
+The present translator, without losing sight of the fact that "the Mortal"
+means Christ, has taken the liberty (constrained by rhyme,--which is
+sometimes more than the _rudder_ of verse,) of making the congratulation
+include Humanity, as incarnated in Christ, "the second Adam."
+
+In the closing Chorus of Angels, the translator found that he could best
+preserve the spirit of the five-fold rhyme:--
+
+ "Thätig ihn preisenden,
+ Liebe beweisenden,
+ Brüderlich speisenden,
+ Predigend reisenden,
+ Wonne verheissenden,"
+
+by running it into three couplets.]
+
+[Footnote 11: The prose account of the alchymical process is as follows:--
+
+"There was red mercury, a powerfully acting body, united with the tincture
+of antimony, at a gentle heat of the water-bath. Then, being exposed to
+the heat of open fire in an aludel, (or alembic,) a sublimate filled its
+heads in succession, which, if it appeared with various hues, was the
+desired medicine."]
+
+[Footnote 12: "Salamander, &c." The four represent the spirits of the
+four elements, fire, water, air, and earth, which Faust successively
+conjures, so that, if the monster belongs in any respect to this mundane
+sphere, he may be exorcized. But it turns out that he is beyond and
+beneath all.]
+
+[Footnote 13: Here, of course, Faust makes the sign of the cross, or holds
+out a crucifix.]
+
+[Footnote 14: "Fly-God," _i.e._ Beelzebub.]
+
+[Footnote 15: The "Drudenfuss," or pentagram, was a pentagonal figure
+composed of three triangles, thus:
+[Illustration]
+
+[Footnote 16: Doctor's Feast. The inaugural feast given at taking a
+degree.]
+
+[Footnote 17: "Blood." When at the first invention of printing, the art
+was ascribed to the devil, the illuminated red ink parts were said by the
+people to be done in blood.]
+
+[Footnote 18: "The Spanish boot" was an instrument of torture, like the
+Scottish boot mentioned in Old Mortality.]
+
+[Footnote 19: "Encheiresin Naturæ." Literally, a handling of nature.]
+
+[Footnote 20: Still a famous place of public resort and entertainment. On
+the wall are two old paintings of Faust's carousal and his ride out of the
+door on a cask. One is accompanied by the following inscription, being two
+lines (Hexameter and Pentameter) broken into halves:--
+
+ "Vive, bibe, obgregare, memor
+ Fausti hujus et hujus
+ Pœnæ. Aderat clauda haec,
+ Ast erat ampla gradû. 1525."
+
+ "Live, drink, be merry, remembering
+ This Faust and his
+ Punishment. It came slowly
+ But was in ample measure."]
+
+[Footnote 21:_Frosch, Brander_, &c. These names seem to be chosen with an
+eye to adaptation, Frosch meaning frog, and Brander fireship. "Frog"
+happens also to be the nickname the students give to a pupil of the
+gymnasium, or school preparatory to the university.]
+
+[Footnote 22: Rippach is a village near Leipsic, and Mr. Hans was a
+fictitious personage about whom the students used to quiz greenhorns.]
+
+[Footnote 23: The original means literally _sea-cat_. Retzsch says, it is
+the little ring-tailed monkey.]
+
+[Footnote 24: One-time-one, _i.e._ multiplication-table.]
+
+[Footnote 25: "Hand and glove." The translator's coincidence with Miss
+Swanwick here was entirely accidental. The German is "thou and thou,"
+alluding to the fact that intimate friends among the Germans, like the
+sect of Friends, call each other _thou_.]
+
+[Footnote 26: The following is a literal translation of the song referred
+to:--
+
+ Were I a little bird,
+ Had I two wings of mine,
+ I'd fly to my dear;
+ But that can never be,
+ So I stay here.
+
+ Though I am far from thee,
+ Sleeping I'm near to thee,
+ Talk with my dear;
+ When I awake again,
+ I am alone.
+
+ Scarce is there an hour in the night,
+ When sleep does not take its flight,
+ And I think of thee,
+ How many thousand times
+ Thou gav'st thy heart to me.]
+
+[Footnote 27: Donjon. The original is _Zwinger_, which Hayward says is
+untranslatable. It probably means an old tower, such as is often found in
+the free cities, where, in a dark passage-way, a lamp is sometimes placed,
+and a devotional image near it.]
+
+[Footnote 28: It was a superstitious belief that the presence of buried
+treasure was indicated by a blue flame.]
+
+[Footnote 29: Lion-dollars--a Bohemian coin, first minted three centuries
+ago, by Count Schlick, from the mines of Joachim's-Thal. The one side
+bears a lion, the other a full length image of St. John.]
+
+[Footnote 30: An imitation of Ophelia's song: _Hamlet_, act 14, scene 5.]
+
+[Footnote 31: The Rat-catcher was supposed to have the art of drawing rats
+after him by his whistle, like a sort of Orpheus.]
+
+[Footnote 32: Walpurgis Night. May-night. Walpurgis is the female saint
+who converted the Saxons to Christianity.--The Brocken or Blocksberg is
+the highest peak of the Harz mountains, which comprise about 1350 square
+miles.--Schirke and Elend are two villages in the neighborhood.]
+
+[Footnote 33: Shelley's translation of this couplet is very fine:
+("_O si sic omnia!_")
+
+ "The giant-snouted crags, ho! ho!
+ How they snort and how they blow!"]
+
+[Footnote 34: The original is _Windsbraut_, (wind's-bride,) the word used
+in Luther's Bible to translate Paul's _Euroclydon_.]
+
+[Footnote 35: One of the names of the devil in Germany.]
+
+[Footnote 36: One of the names of Beelzebub.]
+
+[Footnote 37: "The Talmudists say that Adam had a wife called Lilis before
+he married Eve, and of her he begat nothing but devils."
+ _Burton's Anatomy of Melancholy_.
+
+A learned writer says that _Lullaby_ is derived from "Lilla, abi!" "Begone
+Lilleth!" she having been supposed to lie in wait for children to kill
+them.]
+
+[Footnote 38: This name, derived from two Greek words meaning _rump_ and
+_fancy_, was meant for Nicolai of Berlin, a great hater of Goethe's
+writings, and is explained by the fact that the man had for a long time a
+violent affection of the nerves, and by the application he made of leeches
+as a remedy, (alluded to by Mephistopheles.)]
+
+[Footnote 39: Tegel (mistranslated _pond_ by Shelley) is a small place a
+few miles from Berlin, whose inhabitants were, in 1799, hoaxed by a ghost
+story, of which the scene was laid in the former place.]
+
+[Footnote 40: The park in Vienna.]
+
+[Footnote 41: He was scene-painter to the Weimar theatre.]
+
+[Footnote 42: A poem of Schiller's, which gave great offence to the
+religious people of his day.]
+
+[Footnote 43: A literal translation of _Maulen_, but a slang-term in
+Yankee land.]
+
+[Footnote 44: Epigrams, published from time to time by Goethe and Schiller
+jointly. Hennings (whose name heads the next quatrain) was editor of the
+_Musaget_, (a title of Apollo, "leader of the muses,") and also of the
+_Genius of the Age_. The other satirical allusions to classes of
+notabilities will, without difficulty, be guessed out by the readers.]
+
+[Footnote 45: "_Doubt_ is the only rhyme for devil," in German.]
+
+[Footnote 46: The French translator, Stapfer, assigns as the probable
+reason why this scene alone, of the whole drama, should have been left in
+prose, "that it might not be said that Faust wanted any one of the
+possible forms of style."]
+
+[Footnote 47: Literally the _raven-stone_.]
+
+[Footnote 48: The _blood-seat_, in allusion to the old German custom of
+tying a woman, who was to be beheaded, into a wooden chair.]
+
+ * * * * *
+
+P. S. There is a passage on page 84, the speech of Faust, ending with the
+lines:--
+
+ Show me the fruit that, ere it's plucked, will rot,
+ And trees from which new green is daily peeping,
+
+which seems to have puzzled or misled so much, not only English
+translators, but even German critics, that the present translator has
+concluded, for once, to depart from his usual course, and play the
+commentator, by giving his idea of Goethe's meaning, which is this: Faust
+admits that the devil has all the different kinds of Sodom-apples which he
+has just enumerated, gold that melts away in the hand, glory that vanishes
+like a meteor, and pleasure that perishes in the possession. But all these
+torments are too insipid for Faust's morbid and mad hankering after the
+luxury of spiritual pain. Show me, he says, the fruit that rots _before_
+one can pluck it, and [a still stronger expression of his diseased craving
+for agony] trees that fade so quickly as to be every day just putting
+forth new green, only to tantalize one with perpetual promise and
+perpetual disappointment.
+
+
+
+
+
+End of the Project Gutenberg EBook of Faust, by Goethe
+
+*** END OF THIS PROJECT GUTENBERG EBOOK FAUST ***
+
+***** This file should be named 14460-8.txt or 14460-8.zip *****
+This and all associated files of various formats will be found in:
+ http://www.gutenberg.net/1/4/4/6/14460/
+
+Produced by Juliet Sutherland, Charles Bidwell and the PG Online
+Distributed Proofreading Team
+
+
+Updated editions will replace the previous one--the old editions
+will be renamed.
+
+Creating the works from public domain print editions means that no
+one owns a United States copyright in these works, so the Foundation
+(and you!) can copy and distribute it in the United States without
+permission and without paying copyright royalties. Special rules,
+set forth in the General Terms of Use part of this license, apply to
+copying and distributing Project Gutenberg-tm electronic works to
+protect the PROJECT GUTENBERG-tm concept and trademark. Project
+Gutenberg is a registered trademark, and may not be used if you
+charge for the eBooks, unless you receive specific permission. If you
+do not charge anything for copies of this eBook, complying with the
+rules is very easy. You may use this eBook for nearly any purpose
+such as creation of derivative works, reports, performances and
+research. They may be modified and printed and given away--you may do
+practically ANYTHING with public domain eBooks. Redistribution is
+subject to the trademark license, especially commercial
+redistribution.
+
+
+
+*** START: FULL LICENSE ***
+
+THE FULL PROJECT GUTENBERG LICENSE
+PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK
+
+To protect the Project Gutenberg-tm mission of promoting the free
+distribution of electronic works, by using or distributing this work
+(or any other work associated in any way with the phrase "Project
+Gutenberg"), you agree to comply with all the terms of the Full Project
+Gutenberg-tm License (available with this file or online at
+http://gutenberg.net/license).
+
+
+Section 1. General Terms of Use and Redistributing Project Gutenberg-tm
+electronic works
+
+1.A. By reading or using any part of this Project Gutenberg-tm
+electronic work, you indicate that you have read, understand, agree to
+and accept all the terms of this license and intellectual property
+(trademark/copyright) agreement. If you do not agree to abide by all
+the terms of this agreement, you must cease using and return or destroy
+all copies of Project Gutenberg-tm electronic works in your possession.
+If you paid a fee for obtaining a copy of or access to a Project
+Gutenberg-tm electronic work and you do not agree to be bound by the
+terms of this agreement, you may obtain a refund from the person or
+entity to whom you paid the fee as set forth in paragraph 1.E.8.
+
+1.B. "Project Gutenberg" is a registered trademark. It may only be
+used on or associated in any way with an electronic work by people who
+agree to be bound by the terms of this agreement. There are a few
+things that you can do with most Project Gutenberg-tm electronic works
+even without complying with the full terms of this agreement. See
+paragraph 1.C below. There are a lot of things you can do with Project
+Gutenberg-tm electronic works if you follow the terms of this agreement
+and help preserve free future access to Project Gutenberg-tm electronic
+works. See paragraph 1.E below.
+
+1.C. The Project Gutenberg Literary Archive Foundation ("the Foundation"
+or PGLAF), owns a compilation copyright in the collection of Project
+Gutenberg-tm electronic works. Nearly all the individual works in the
+collection are in the public domain in the United States. If an
+individual work is in the public domain in the United States and you are
+located in the United States, we do not claim a right to prevent you from
+copying, distributing, performing, displaying or creating derivative
+works based on the work as long as all references to Project Gutenberg
+are removed. Of course, we hope that you will support the Project
+Gutenberg-tm mission of promoting free access to electronic works by
+freely sharing Project Gutenberg-tm works in compliance with the terms of
+this agreement for keeping the Project Gutenberg-tm name associated with
+the work. You can easily comply with the terms of this agreement by
+keeping this work in the same format with its attached full Project
+Gutenberg-tm License when you share it without charge with others.
+
+1.D. The copyright laws of the place where you are located also govern
+what you can do with this work. Copyright laws in most countries are in
+a constant state of change. If you are outside the United States, check
+the laws of your country in addition to the terms of this agreement
+before downloading, copying, displaying, performing, distributing or
+creating derivative works based on this work or any other Project
+Gutenberg-tm work. The Foundation makes no representations concerning
+the copyright status of any work in any country outside the United
+States.
+
+1.E. Unless you have removed all references to Project Gutenberg:
+
+1.E.1. The following sentence, with active links to, or other immediate
+access to, the full Project Gutenberg-tm License must appear prominently
+whenever any copy of a Project Gutenberg-tm work (any work on which the
+phrase "Project Gutenberg" appears, or with which the phrase "Project
+Gutenberg" is associated) is accessed, displayed, performed, viewed,
+copied or distributed:
+
+This eBook is for the use of anyone anywhere at no cost and with
+almost no restrictions whatsoever. You may copy it, give it away or
+re-use it under the terms of the Project Gutenberg License included
+with this eBook or online at www.gutenberg.net
+
+1.E.2. If an individual Project Gutenberg-tm electronic work is derived
+from the public domain (does not contain a notice indicating that it is
+posted with permission of the copyright holder), the work can be copied
+and distributed to anyone in the United States without paying any fees
+or charges. If you are redistributing or providing access to a work
+with the phrase "Project Gutenberg" associated with or appearing on the
+work, you must comply either with the requirements of paragraphs 1.E.1
+through 1.E.7 or obtain permission for the use of the work and the
+Project Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or
+1.E.9.
+
+1.E.3. If an individual Project Gutenberg-tm electronic work is posted
+with the permission of the copyright holder, your use and distribution
+must comply with both paragraphs 1.E.1 through 1.E.7 and any additional
+terms imposed by the copyright holder. Additional terms will be linked
+to the Project Gutenberg-tm License for all works posted with the
+permission of the copyright holder found at the beginning of this work.
+
+1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm
+License terms from this work, or any files containing a part of this
+work or any other work associated with Project Gutenberg-tm.
+
+1.E.5. Do not copy, display, perform, distribute or redistribute this
+electronic work, or any part of this electronic work, without
+prominently displaying the sentence set forth in paragraph 1.E.1 with
+active links or immediate access to the full terms of the Project
+Gutenberg-tm License.
+
+1.E.6. You may convert to and distribute this work in any binary,
+compressed, marked up, nonproprietary or proprietary form, including any
+word processing or hypertext form. However, if you provide access to or
+distribute copies of a Project Gutenberg-tm work in a format other than
+"Plain Vanilla ASCII" or other format used in the official version
+posted on the official Project Gutenberg-tm web site (www.gutenberg.net),
+you must, at no additional cost, fee or expense to the user, provide a
+copy, a means of exporting a copy, or a means of obtaining a copy upon
+request, of the work in its original "Plain Vanilla ASCII" or other
+form. Any alternate format must include the full Project Gutenberg-tm
+License as specified in paragraph 1.E.1.
+
+1.E.7. Do not charge a fee for access to, viewing, displaying,
+performing, copying or distributing any Project Gutenberg-tm works
+unless you comply with paragraph 1.E.8 or 1.E.9.
+
+1.E.8. You may charge a reasonable fee for copies of or providing
+access to or distributing Project Gutenberg-tm electronic works provided
+that
+
+- You pay a royalty fee of 20% of the gross profits you derive from
+ the use of Project Gutenberg-tm works calculated using the method
+ you already use to calculate your applicable taxes. The fee is
+ owed to the owner of the Project Gutenberg-tm trademark, but he
+ has agreed to donate royalties under this paragraph to the
+ Project Gutenberg Literary Archive Foundation. Royalty payments
+ must be paid within 60 days following each date on which you
+ prepare (or are legally required to prepare) your periodic tax
+ returns. Royalty payments should be clearly marked as such and
+ sent to the Project Gutenberg Literary Archive Foundation at the
+ address specified in Section 4, "Information about donations to
+ the Project Gutenberg Literary Archive Foundation."
+
+- You provide a full refund of any money paid by a user who notifies
+ you in writing (or by e-mail) within 30 days of receipt that s/he
+ does not agree to the terms of the full Project Gutenberg-tm
+ License. You must require such a user to return or
+ destroy all copies of the works possessed in a physical medium
+ and discontinue all use of and all access to other copies of
+ Project Gutenberg-tm works.
+
+- You provide, in accordance with paragraph 1.F.3, a full refund of any
+ money paid for a work or a replacement copy, if a defect in the
+ electronic work is discovered and reported to you within 90 days
+ of receipt of the work.
+
+- You comply with all other terms of this agreement for free
+ distribution of Project Gutenberg-tm works.
+
+1.E.9. If you wish to charge a fee or distribute a Project Gutenberg-tm
+electronic work or group of works on different terms than are set
+forth in this agreement, you must obtain permission in writing from
+both the Project Gutenberg Literary Archive Foundation and Michael
+Hart, the owner of the Project Gutenberg-tm trademark. Contact the
+Foundation as set forth in Section 3 below.
+
+1.F.
+
+1.F.1. Project Gutenberg volunteers and employees expend considerable
+effort to identify, do copyright research on, transcribe and proofread
+public domain works in creating the Project Gutenberg-tm
+collection. Despite these efforts, Project Gutenberg-tm electronic
+works, and the medium on which they may be stored, may contain
+"Defects," such as, but not limited to, incomplete, inaccurate or
+corrupt data, transcription errors, a copyright or other intellectual
+property infringement, a defective or damaged disk or other medium, a
+computer virus, or computer codes that damage or cannot be read by
+your equipment.
+
+1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the "Right
+of Replacement or Refund" described in paragraph 1.F.3, the Project
+Gutenberg Literary Archive Foundation, the owner of the Project
+Gutenberg-tm trademark, and any other party distributing a Project
+Gutenberg-tm electronic work under this agreement, disclaim all
+liability to you for damages, costs and expenses, including legal
+fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
+LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
+PROVIDED IN PARAGRAPH F3. YOU AGREE THAT THE FOUNDATION, THE
+TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE
+LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR
+INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a
+defect in this electronic work within 90 days of receiving it, you can
+receive a refund of the money (if any) you paid for it by sending a
+written explanation to the person you received the work from. If you
+received the work on a physical medium, you must return the medium with
+your written explanation. The person or entity that provided you with
+the defective work may elect to provide a replacement copy in lieu of a
+refund. If you received the work electronically, the person or entity
+providing it to you may choose to give you a second opportunity to
+receive the work electronically in lieu of a refund. If the second copy
+is also defective, you may demand a refund in writing without further
+opportunities to fix the problem.
+
+1.F.4. Except for the limited right of replacement or refund set forth
+in paragraph 1.F.3, this work is provided to you 'AS-IS' WITH NO OTHER
+WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR ANY PURPOSE.
+
+1.F.5. Some states do not allow disclaimers of certain implied
+warranties or the exclusion or limitation of certain types of damages.
+If any disclaimer or limitation set forth in this agreement violates the
+law of the state applicable to this agreement, the agreement shall be
+interpreted to make the maximum disclaimer or limitation permitted by
+the applicable state law. The invalidity or unenforceability of any
+provision of this agreement shall not void the remaining provisions.
+
+1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the
+trademark owner, any agent or employee of the Foundation, anyone
+providing copies of Project Gutenberg-tm electronic works in accordance
+with this agreement, and any volunteers associated with the production,
+promotion and distribution of Project Gutenberg-tm electronic works,
+harmless from all liability, costs and expenses, including legal fees,
+that arise directly or indirectly from any of the following which you do
+or cause to occur: (a) distribution of this or any Project Gutenberg-tm
+work, (b) alteration, modification, or additions or deletions to any
+Project Gutenberg-tm work, and (c) any Defect you cause.
+
+
+Section 2. Information about the Mission of Project Gutenberg-tm
+
+Project Gutenberg-tm is synonymous with the free distribution of
+electronic works in formats readable by the widest variety of computers
+including obsolete, old, middle-aged and new computers. It exists
+because of the efforts of hundreds of volunteers and donations from
+people in all walks of life.
+
+Volunteers and financial support to provide volunteers with the
+assistance they need, is critical to reaching Project Gutenberg-tm's
+goals and ensuring that the Project Gutenberg-tm collection will
+remain freely available for generations to come. In 2001, the Project
+Gutenberg Literary Archive Foundation was created to provide a secure
+and permanent future for Project Gutenberg-tm and future generations.
+To learn more about the Project Gutenberg Literary Archive Foundation
+and how your efforts and donations can help, see Sections 3 and 4
+and the Foundation web page at http://www.pglaf.org.
+
+
+Section 3. Information about the Project Gutenberg Literary Archive
+Foundation
+
+The Project Gutenberg Literary Archive Foundation is a non profit
+501(c)(3) educational corporation organized under the laws of the
+state of Mississippi and granted tax exempt status by the Internal
+Revenue Service. The Foundation's EIN or federal tax identification
+number is 64-6221541. Its 501(c)(3) letter is posted at
+http://pglaf.org/fundraising. Contributions to the Project Gutenberg
+Literary Archive Foundation are tax deductible to the full extent
+permitted by U.S. federal laws and your state's laws.
+
+The Foundation's principal office is located at 4557 Melan Dr. S.
+Fairbanks, AK, 99712., but its volunteers and employees are scattered
+throughout numerous locations. Its business office is located at
+809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email
+business@pglaf.org. Email contact links and up to date contact
+information can be found at the Foundation's web site and official
+page at http://pglaf.org
+
+For additional contact information:
+ Dr. Gregory B. Newby
+ Chief Executive and Director
+ gbnewby@pglaf.org
+
+
+Section 4. Information about Donations to the Project Gutenberg
+Literary Archive Foundation
+
+Project Gutenberg-tm depends upon and cannot survive without wide
+spread public support and donations to carry out its mission of
+increasing the number of public domain and licensed works that can be
+freely distributed in machine readable form accessible by the widest
+array of equipment including outdated equipment. Many small donations
+($1 to $5,000) are particularly important to maintaining tax exempt
+status with the IRS.
+
+The Foundation is committed to complying with the laws regulating
+charities and charitable donations in all 50 states of the United
+States. Compliance requirements are not uniform and it takes a
+considerable effort, much paperwork and many fees to meet and keep up
+with these requirements. We do not solicit donations in locations
+where we have not received written confirmation of compliance. To
+SEND DONATIONS or determine the status of compliance for any
+particular state visit http://pglaf.org
+
+While we cannot and do not solicit contributions from states where we
+have not met the solicitation requirements, we know of no prohibition
+against accepting unsolicited donations from donors in such states who
+approach us with offers to donate.
+
+International donations are gratefully accepted, but we cannot make
+any statements concerning tax treatment of donations received from
+outside the United States. U.S. laws alone swamp our small staff.
+
+Please check the Project Gutenberg Web pages for current donation
+methods and addresses. Donations are accepted in a number of other
+ways including including checks, online payments and credit card
+donations. To donate, please visit: http://pglaf.org/donate
+
+
+Section 5. General Information About Project Gutenberg-tm electronic
+works.
+
+Professor Michael S. Hart is the originator of the Project Gutenberg-tm
+concept of a library of electronic works that could be freely shared
+with anyone. For thirty years, he produced and distributed Project
+Gutenberg-tm eBooks with only a loose network of volunteer support.
+
+
+Project Gutenberg-tm eBooks are often created from several printed
+editions, all of which are confirmed as Public Domain in the U.S.
+unless a copyright notice is included. Thus, we do not necessarily
+keep eBooks in compliance with any particular paper edition.
+
+
+Most people start at our Web site which has the main PG search facility:
+
+ http://www.gutenberg.net
+
+This Web site includes information about Project Gutenberg-tm,
+including how to make donations to the Project Gutenberg Literary
+Archive Foundation, how to help produce our new eBooks, and how to
+subscribe to our email newsletter to hear about new eBooks.
+
diff --git a/includes/js/dojox/storage/tests/resources/testXML.xml b/includes/js/dojox/storage/tests/resources/testXML.xml
new file mode 100644
index 0000000..3301a62
--- /dev/null
+++ b/includes/js/dojox/storage/tests/resources/testXML.xml
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="windows-1252" standalone="yes"?>
+<feed xmlns="http://purl.org/atom/ns#" version="0.3" xml:lang="en-US">
+<link href="https://www.blogger.com/atom/3191291" rel="service.post" title="Coding In Paradise" type="application/atom+xml"/>
+<link href="https://www.blogger.com/atom/3191291" rel="service.feed" title="Coding In Paradise" type="application/atom+xml"/>
+<title mode="escaped" type="text/html">Coding In Paradise</title>
+<tagline mode="escaped" type="text/html">Brad Neuberg's thoughts, feelings, and experiences.</tagline>
+<link href="http://codinginparadise.org/weblog/" rel="alternate" title="Coding In Paradise" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291</id>
+<modified>2006-01-26T01:37:22Z</modified>
+<generator url="http://www.blogger.com/" version="5.15">Blogger</generator>
+<info mode="xml" type="text/html">
+<div xmlns="http://www.w3.org/1999/xhtml">This is an Atom formatted XML site feed. It is intended to be viewed in a Newsreader or syndicated to another site. Please visit the <a href="http://help.blogger.com/bin/answer.py?answer=697">Blogger Help</a> for more info.</div>
+</info>
+<convertLineBreaks xmlns="http://www.blogger.com/atom/ns#">true</convertLineBreaks>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113823944195262179" rel="service.edit" title="Resume" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-25T17:36:00-08:00</issued>
+<modified>2006-01-26T01:37:21Z</modified>
+<created>2006-01-26T01:37:21Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/resume.html" rel="alternate" title="Resume" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113823944195262179</id>
+<title mode="escaped" type="text/html">Resume</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">I just finished and put up my resume. Resumes are hard :)</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113761645059106145" rel="service.edit" title="AJAXian Site Comparison with Alexa" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-18T12:33:00-08:00</issued>
+<modified>2006-01-18T20:34:10Z</modified>
+<created>2006-01-18T20:34:10Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/ajaxian-site-comparison-with-alexa.html" rel="alternate" title="AJAXian Site Comparison with Alexa" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113761645059106145</id>
+<title mode="escaped" type="text/html">AJAXian Site Comparison with Alexa</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">Joe Walker has created an interesting AJAX mashup using Alexa data, making Alexa a bit more useful.</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113761599631873348" rel="service.edit" title="Civil Engines Released" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-18T12:16:00-08:00</issued>
+<modified>2006-01-18T21:43:11Z</modified>
+<created>2006-01-18T20:26:36Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/civil-engines-released.html" rel="alternate" title="Civil Engines Released" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113761599631873348</id>
+<title mode="escaped" type="text/html">Civil Engines Released</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">My old cohorts with BaseSystem and OpenPortal, Christoper Tse, Paolo de Dios, and Ken Rossi of Liquid Orb Media have just shipped their software and announced their company. The company is named Civil Engines, and the software is called Civil Netizen:
+
+Civil Netizen provides a useful, secure way to easily transfer large files and groups of files between people on the Internet, getting past FTP</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113756800036562086" rel="service.edit" title="Photos of Mash Pit" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-17T23:06:00-08:00</issued>
+<modified>2006-01-18T07:13:56Z</modified>
+<created>2006-01-18T07:06:40Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/photos-of-mash-pit.html" rel="alternate" title="Photos of Mash Pit" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113756800036562086</id>
+<title mode="escaped" type="text/html">Photos of Mash Pit</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">Photos of Flash Pit are up on Flickr now:
+
+
+
+
+
+
+
+
+
+</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113756743174780868" rel="service.edit" title="Offline Access in AJAX Applications" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-17T22:56:00-08:00</issued>
+<modified>2006-01-18T19:45:28Z</modified>
+<created>2006-01-18T06:57:11Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/offline-access-in-ajax-applications.html" rel="alternate" title="Offline Access in AJAX Applications" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113756743174780868</id>
+<title mode="escaped" type="text/html">Offline Access in AJAX Applications</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">Update: Julien reports that he's not actually using AMASS in his offline work, but was inspired by it. He rolled his own access to Flash's storage capabilities using ExternalInterface, but he should be aware of the reliability and performance issues with ExternalInterface (I tried to paste 250K of text into the Wiki and the browser locked up for a long period of time as it tried to pass the data</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113756574524170757" rel="service.edit" title="Mash Pit Synopses" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-17T22:15:00-08:00</issued>
+<modified>2006-01-18T06:29:05Z</modified>
+<created>2006-01-18T06:29:05Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/mash-pit-synopses.html" rel="alternate" title="Mash Pit Synopses" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113756574524170757</id>
+<title mode="escaped" type="text/html">Mash Pit Synopses</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">Man, what an amazing event! We had a post-Mash Pit dinner and party at Lonely Palm.
+
+Here's some more info about the three projects that were produced at the end of the day.
+
+The first one was called Whuffie Tracker; the idea there was to produce a single site that could take your list of blogs and online sites, query other remote sites like Technorati and Flickr, and tell you who is talking about</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113754717012597001" rel="service.edit" title="Mash Pit 4" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-17T17:19:00-08:00</issued>
+<modified>2006-01-18T01:19:30Z</modified>
+<created>2006-01-18T01:19:30Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/mash-pit-4.html" rel="alternate" title="Mash Pit 4" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113754717012597001</id>
+<title mode="escaped" type="text/html">Mash Pit 4</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">It's demo time at Mash Pit. Everyone is furiously coding, but the clock is almost over. We'll have three demos. I'll try to blog them as people give them.</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113754482097808410" rel="service.edit" title="Mash Pit 3" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-17T16:39:00-08:00</issued>
+<modified>2006-01-18T00:40:20Z</modified>
+<created>2006-01-18T00:40:20Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/mash-pit-3.html" rel="alternate" title="Mash Pit 3" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113754482097808410</id>
+<title mode="escaped" type="text/html">Mash Pit 3</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">We're hacking away, very intensely! No time to post! Just 30 more minutes till we have to be done, at 5:15 PM. Nothing like a hard deadline to force you to make hard decisions.</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113753268191434316" rel="service.edit" title="Mash Pit 2" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-17T10:43:00-08:00</issued>
+<modified>2006-01-17T21:18:01Z</modified>
+<created>2006-01-17T21:18:01Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/mash-pit-2.html" rel="alternate" title="Mash Pit 2" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113753268191434316</id>
+<title mode="escaped" type="text/html">Mash Pit 2</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">People are doing intros, saying what their skills are and what they are interested in.
+
+We had a big brainstorming session in the morning. The goal was to focus on ideas independent of technology, to force us to focus on whether something is relevant rather than just technologically interesting.
+
+We broke for lunch, sponsored by Ning.
+
+We've formed three groups that are working independently now.</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+<entry xmlns="http://purl.org/atom/ns#">
+<link href="https://www.blogger.com/atom/3191291/113752336910726653" rel="service.edit" title="Mash Pit Starts" type="application/atom+xml"/>
+<author>
+<name>Brad GNUberg</name>
+</author>
+<issued>2006-01-17T10:36:00-08:00</issued>
+<modified>2006-01-17T18:42:49Z</modified>
+<created>2006-01-17T18:42:49Z</created>
+<link href="http://codinginparadise.org/weblog/2006/01/mash-pit-starts.html" rel="alternate" title="Mash Pit Starts" type="text/html"/>
+<id>tag:blogger.com,1999:blog-3191291.post-113752336910726653</id>
+<title mode="escaped" type="text/html">Mash Pit Starts</title>
+<summary type="application/xhtml+xml" xml:base="http://codinginparadise.org/weblog/" xml:space="preserve">
+<div xmlns="http://www.w3.org/1999/xhtml">Mash Pit is starting now, Chris is talking. We've got a full house of hackers, programmers, thinkers, and open source folks.
+
+The goal today is to somehow make the work people have been doing with Web 2.0 relevant for normal folks.
+
+We're doing introductions and introducing people to the coworking space. Thanks to Chris for setting up Mash Pit.
+
+We should be lazy today, try to reuse as much</div>
+</summary>
+<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
+</entry>
+</feed>
diff --git a/includes/js/dojox/storage/tests/test_storage.html b/includes/js/dojox/storage/tests/test_storage.html
new file mode 100644
index 0000000..dff5154
--- /dev/null
+++ b/includes/js/dojox/storage/tests/test_storage.html
@@ -0,0 +1,189 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+
+<html>
+
+<head>
+ <title>Dojo Storage Test</title>
+
+ <style type="text/css">
+ @import "../../../dojo/resources/dojo.css";
+ </style>
+
+ <!--
+ // 'forceStorageProvider' is a flag to force a particular storage type.
+ // Example:
+ //
+ //var djConfig = {
+ // isDebug: false,
+ // forceStorageProvider: "dojox.storage.FlashStorageProvider"
+ // };
+ -->
+
+ <script>
+ // most storage providers have to be loaded when the page first loads;
+ // the code below is so that we can use the storage provider pulldown,
+ // select a provider, change the URL to force this provider, and then
+ // reload the page to force this new provider
+ var loc = window.location;
+ var forceStorageProvider = undefined;
+ // does the URL have a storage provider for us to force using?
+ if(loc && loc.search && loc.search.indexOf("forceStorageProvider") != -1){
+ var m = loc.search.match(/forceStorageProvider=([a-zA-Z0-9_\.]*)/g);
+ if(m && m.length){
+ // forceStorageProvider can repeat as a query parameter if the
+ // page has been reloaded several times, so just grab the last
+ // one
+ forceStorageProvider = m[m.length - 1];
+ if(forceStorageProvider.indexOf("=") != -1){
+ forceStorageProvider = forceStorageProvider.split("=");
+ forceStorageProvider = forceStorageProvider[1];
+ }
+ }
+ }
+
+ var djConfig = {
+ isDebug: false,
+ forceStorageProvider: forceStorageProvider
+ };
+ </script>
+
+ <script type="text/javascript"
+ src="../../../dojo/dojo.js"></script>
+
+ <script type="text/javascript" src="test_storage.js"></script>
+
+ <style type="text/css">
+ h1 { margin: 0px auto 0px auto; padding-top: 0px auto 0px auto; clear: none; float: left; }
+ body { padding: 0.2em 1em 1em 1em; }
+ div { margin-bottom: 1.5em; }
+ label { margin-right: 0.6em; }
+ button { margin-right: 0.6em; }
+ form { float: right; width: 80%; }
+ #top { width: 70%; }
+ #directoryContainer { float: left; clear: left; width: 20%; }
+ #templates { text-align: center; }
+ #templates a { display: block; margin-top: 1em; }
+ #directory { width: 100%; }
+ #namespaceDirectory { width: 100%; }
+ #storageValue { vertical-align: top; width: 100%; height: 10em; }
+ #buttonContainer { text-align: center; }
+ #currentStorageProvider { font-weight: bold; }
+ #providerMetadataContainer { float: right; font-size: 9pt; }
+ #storageForm { width: 70%; }
+ .status { float: right; padding-left: 5px; padding-right: 5px; background: red; color: white; }
+ .providerMetadata { font-weight: bold; margin-bottom: 0.5em; }
+ .providerMetadataValue { font-weight: normal; }
+ .firebug { clear: both; } // clear Firebug Lite to bottom of screen
+ </style>
+
+</head>
+
+<body>
+ <div id="top">
+ <h1>Dojo.Storage Test</h1>
+ </div>
+
+ <div id="directoryContainer">
+ <h2>All Namespaces:</h2>
+ <select id="namespaceDirectory" size="3"></select>
+
+ <h2>All Keys:</h2>
+ <select id="directory" size="10">
+ </select>
+
+ <div id="templates">
+ <a href="#" onclick="return TestStorage.saveBook()">Save Test Book (238K - Faust by Goethe)</a>
+ <a href="#" onclick="return TestStorage.saveXML()">Save Test XML</a>
+ </div>
+ </div>
+
+ <form id="storageForm">
+ <h2>Save/Load Values:</h2>
+ <div>
+ <div id="providerMetadataContainer">
+ <div class="providerMetadata">
+ Supported:
+
+ <span id="isSupported" class="providerMetadataValue">
+ </span>
+ </div>
+
+ <div class="providerMetadata">
+ Supports Persistence:
+
+ <span id="isPersistent" class="providerMetadataValue">
+ </span>
+ </div>
+
+ <div class="providerMetadata">
+ Supports UI Configuration:
+
+ <span id="hasUIConfig" class="providerMetadataValue">
+ </span>
+ </div>
+
+ <div class="providerMetadata">
+ Maximum Size:
+
+ <span id="maximumSize" class="providerMetadataValue">
+ </span>
+ </div>
+
+ <div class="providerMetadata">
+ Value size:
+
+ <span id="valueSize" class="providerMetadataValue">
+ </span>
+ </div>
+
+ <div class="providerMetadata">
+ More info:
+
+ <span id="moreInfo" class="providerMetadataValue">
+ </span>
+ </div>
+ </div>
+
+ <div>
+ Storage Provider:
+
+ <select id="currentStorageProvider" size="1"></select>
+ </div>
+ </div>
+
+ <div id="storageNamespaceContainer">
+ <label for="storageNamespace">
+ Namespace:
+ </label>
+
+ <input type="text" id="storageNamespace" name="storageNamespace" size="40" disabled="true">
+ </div>
+
+ <div id="storageKeyContainer">
+ <label for="storageKey">
+ Key:
+ </label>
+
+ <input type="text" id="storageKey" name="storageKey" size="40" disabled="true">
+ </div>
+
+ <div id="storageValueContainer">
+ <label for="storageValue">
+ Value:
+ </label>
+
+ <textarea id="storageValue" name="storageValue" disabled="true"></textarea>
+ </div>
+
+ <div id="buttonContainer">
+ <button id="loadButton" disabled="true">Load</button>
+ <button id="saveButton" disabled="true">Save</button>
+ <button id="removeButton" disabled="true">Remove</button>
+ <button id="clearNamespaceButton" disabled="true">Clear Namespace</button>
+ <button id="configureButton" disabled="true">Configure</button>
+ </div>
+ </form>
+</body>
+
+</html>
diff --git a/includes/js/dojox/storage/tests/test_storage.js b/includes/js/dojox/storage/tests/test_storage.js
new file mode 100644
index 0000000..b859459
--- /dev/null
+++ b/includes/js/dojox/storage/tests/test_storage.js
@@ -0,0 +1,493 @@
+dojo.require("dojox.storage");
+
+var TestStorage = {
+ currentProvider: "default",
+ currentNamespace: dojox.storage.DEFAULT_NAMESPACE,
+
+ initialize: function(){
+ //console.debug("test_storage.initialize()");
+
+ // do we even have a storage provider?
+ if(dojox.storage.manager.available == false){
+ var o = document.createElement("option");
+ o.appendChild(document.createTextNode("None"));
+ o.value = "None";
+ o.selected = true;
+ var selector = dojo.byId("currentStorageProvider");
+ selector.disabled = true;
+ selector.appendChild(o);
+
+ alert("No storage provider is available on this browser");
+ return;
+ }
+
+ // what should our starting namespace be?
+ this._determineCurrentNamespace();
+
+ // clear out old values and enable input forms
+ dojo.byId("storageNamespace").value = this.currentNamespace;
+ dojo.byId("storageNamespace").disabled = false;
+ dojo.byId("storageKey").value = "";
+ dojo.byId("storageKey").disabled = false;
+ dojo.byId("storageValue").value = "";
+ dojo.byId("storageValue").disabled = false;
+
+ // write out available providers
+ this._printAvailableProviders();
+
+ // write out our available namespaces
+ this._printAvailableNamespaces();
+
+ // write out our available keys
+ this._printAvailableKeys();
+
+ // initialize our event handlers
+ var providerDirectory = dojo.byId("currentStorageProvider");
+ dojo.connect(providerDirectory, "onchange", this, this.providerChange);
+ var namespaceDirectory = dojo.byId("namespaceDirectory");
+ dojo.connect(namespaceDirectory, "onchange", this, this.namespaceChange);
+ var directory = dojo.byId("directory");
+ dojo.connect(directory, "onchange", this, this.directoryChange);
+ var storageValueElem = dojo.byId("storageValue");
+ dojo.connect(storageValueElem, "onkeyup", this, this.printValueSize);
+
+ // make the directory be unselected if the key name field gets focus
+ var keyNameField = dojo.byId("storageKey");
+ dojo.connect(keyNameField, "onfocus", function(evt){
+ directory.selectedIndex = -1;
+ });
+
+ // add onclick listeners to all of our buttons
+ var buttonContainer = dojo.byId("buttonContainer");
+ var currentChild = buttonContainer.firstChild;
+ while(currentChild.nextSibling != null){
+ if(currentChild.nodeType == 1){
+ var buttonName = currentChild.id;
+ var functionName = buttonName.match(/^(.*)Button$/)[1];
+ dojo.connect(currentChild, "onclick", this, this[functionName]);
+ currentChild.disabled = false;
+ }
+
+ currentChild = currentChild.nextSibling;
+ }
+
+ // print out metadata
+ this._printProviderMetadata();
+
+ // disable the configuration button if none is supported for this provider
+ if(dojox.storage.hasSettingsUI() == false){
+ dojo.byId("configureButton").disabled = true;
+ }
+ },
+
+ providerChange: function(evt){
+ var provider = evt.target.value;
+
+ // reload the page with this provider
+ var query = "";
+ if(window.location.href.indexOf("forceStorageProvider") == -1){
+ query = "?";
+ }else{
+ query = "&";
+ }
+
+ window.location.href += query + "forceStorageProvider=" + provider;
+ },
+
+ namespaceChange: function(evt){
+ var ns = evt.target.value;
+ this.currentNamespace = ns;
+
+ // update our available keys
+ this._printAvailableKeys();
+
+ // clear out our key and values
+ dojo.byId("storageNamespace").value = this.currentNamespace;
+ dojo.byId("storageKey").value = "";
+ dojo.byId("storageValue").value = "";
+ },
+
+ directoryChange: function(evt){
+ var key = evt.target.value;
+
+ // add this value into the form
+ var keyNameField = dojo.byId("storageKey");
+ keyNameField.value = key;
+
+ this._handleLoad(key);
+ },
+
+ load: function(evt){
+ // cancel the button's default behavior
+ evt.preventDefault();
+ evt.stopPropagation();
+
+ // get the key to load
+ var key = dojo.byId("storageKey").value;
+
+ if(key == null || typeof key == "undefined" || key == ""){
+ alert("Please enter a key name");
+ return;
+ }
+
+ this._handleLoad(key);
+ },
+
+ save: function(evt){
+ // cancel the button's default behavior
+ evt.preventDefault();
+ evt.stopPropagation();
+
+ // get the new values
+ var key = dojo.byId("storageKey").value;
+ var value = dojo.byId("storageValue").value;
+ var namespace = dojo.byId("storageNamespace").value;
+
+ if(key == null || typeof key == "undefined" || key == ""){
+ alert("Please enter a key name");
+ return;
+ }
+
+ if(value == null || typeof value == "undefined" || value == ""){
+ alert("Please enter a key value");
+ return;
+ }
+
+ // print out the size of the value
+ this.printValueSize();
+
+ // do the save
+ this._save(key, value, namespace);
+ },
+
+ clearNamespace: function(evt){
+ // cancel the button's default behavior
+ evt.preventDefault();
+ evt.stopPropagation();
+
+ dojox.storage.clear(this.currentNamespace);
+
+ this._printAvailableNamespaces();
+ this._printAvailableKeys();
+ },
+
+ configure: function(evt){
+ // cancel the button's default behavior
+ evt.preventDefault();
+ evt.stopPropagation();
+
+ if(dojox.storage.hasSettingsUI()){
+ // redraw our keys after the dialog is closed, in
+ // case they have all been erased
+ var self = this;
+ dojox.storage.onHideSettingsUI = function(){
+ self._printAvailableKeys();
+ }
+
+ // show the dialog
+ dojox.storage.showSettingsUI();
+ }
+ },
+
+ remove: function(evt){
+ // cancel the button's default behavior
+ evt.preventDefault();
+ evt.stopPropagation();
+
+ // determine what key to delete; if the directory has a selected value,
+ // use that; otherwise, use the key name field
+ var directory = dojo.byId("directory");
+ var keyNameField = dojo.byId("storageKey");
+ var keyValueField = dojo.byId("storageValue");
+ var key;
+ if(directory.selectedIndex != -1){
+ key = directory.value;
+ // delete this option
+ var options = directory.childNodes;
+ for(var i = 0; i < options.length; i++){
+ if(options[i].nodeType == 1 &&
+ options[i].value == key){
+ directory.removeChild(options[i]);
+ break;
+ }
+ }
+ }else{
+ key = keyNameField.value;
+ }
+
+ keyNameField.value = "";
+ keyValueField.value = "";
+
+ // now delete the value
+ this._printStatus("Removing '" + key + "'...");
+ if(this.currentNamespace == dojox.storage.DEFAULT_NAMESPACE){
+ dojox.storage.remove(key);
+ }else{
+ dojox.storage.remove(key, this.currentNamespace);
+ }
+
+ // update our UI
+ this._printAvailableNamespaces();
+ this._printStatus("Removed '" + key);
+ },
+
+ printValueSize: function(){
+ var storageValue = dojo.byId("storageValue").value;
+ var size = 0;
+ if(storageValue != null && typeof storageValue != "undefined"){
+ size = storageValue.length;
+ }
+
+ // determine the units we are dealing with
+ var units;
+ if(size < 1024)
+ units = " bytes";
+ else{
+ units = " K";
+ size = size / 1024;
+ size = Math.round(size);
+ }
+
+ size = size + units;
+
+ var valueSize = dojo.byId("valueSize");
+ valueSize.innerHTML = size;
+ },
+
+ saveBook: function(evt){
+ this._printStatus("Loading book...");
+
+ var d = dojo.xhrGet({
+ url: "resources/testBook.txt",
+ handleAs: "text"
+ });
+
+ d.addCallback(dojo.hitch(this, function(results){
+ this._printStatus("Book loaded");
+ this._save("testBook", results);
+ }));
+
+ d.addErrback(dojo.hitch(this, function(error){
+ alert("Unable to load testBook.txt: " + error);
+ }));
+
+ if(!typeof evt != "undefined" && evt != null){
+ evt.preventDefault();
+ evt.stopPropagation();
+ }
+
+ return false;
+ },
+
+ saveXML: function(evt){
+ this._printStatus("Loading XML...");
+
+ var d = dojo.xhrGet({
+ url: "resources/testXML.xml",
+ handleAs: "text"
+ });
+
+ d.addCallback(dojo.hitch(this, function(results){
+ this._printStatus("XML loaded");
+ this._save("testXML", results);
+ }));
+
+ d.addErrback(dojo.hitch(this, function(error){
+ alert("Unable to load testXML.xml: " + error);
+ }));
+
+ if(!typeof evt != "undefined" && evt != null){
+ evt.preventDefault();
+ evt.stopPropagation();
+ }
+
+ return false;
+ },
+
+ _save: function(key, value, namespace){
+ this._printStatus("Saving '" + key + "'...");
+ var self = this;
+ var saveHandler = function(status, keyName){
+ //console.debug("saveHandler, status="+status+", keyName="+keyName);
+ if(status == dojox.storage.FAILED){
+ alert("You do not have permission to store data for this web site. "
+ + "Press the Configure button to grant permission.");
+ }else if(status == dojox.storage.SUCCESS){
+ // clear out the old value
+ dojo.byId("storageKey").value = "";
+ dojo.byId("storageValue").value = "";
+ self._printStatus("Saved '" + key + "'");
+
+ if(typeof namespace != "undefined"
+ && namespace != null){
+ self.currentNamespace = namespace;
+ }
+
+ self._printAvailableKeys();
+ self._printAvailableNamespaces();
+ }
+ };
+
+ try{
+ if(namespace == dojox.storage.DEFAULT_NAMESPACE){
+ dojox.storage.put(key, value, saveHandler);
+ }else{
+ dojox.storage.put(key, value, saveHandler, namespace);
+ }
+ }catch(exp){
+ alert(exp);
+ }
+ },
+
+ _printAvailableKeys: function(){
+ var directory = dojo.byId("directory");
+
+ // clear out any old keys
+ directory.innerHTML = "";
+
+ // add new ones
+ var availableKeys;
+ if(this.currentNamespace == dojox.storage.DEFAULT_NAMESPACE){
+ availableKeys = dojox.storage.getKeys();
+ }else{
+ availableKeys = dojox.storage.getKeys(this.currentNamespace);
+ }
+
+ for (var i = 0; i < availableKeys.length; i++){
+ var optionNode = document.createElement("option");
+ optionNode.appendChild(document.createTextNode(availableKeys[i]));
+ optionNode.value = availableKeys[i];
+ directory.appendChild(optionNode);
+ }
+ },
+
+ _printAvailableNamespaces: function(){
+ var namespacesDir = dojo.byId("namespaceDirectory");
+
+ // clear out any old namespaces
+ namespacesDir.innerHTML = "";
+
+ // add new ones
+ var availableNamespaces = dojox.storage.getNamespaces();
+
+ for (var i = 0; i < availableNamespaces.length; i++){
+ var optionNode = document.createElement("option");
+ optionNode.appendChild(document.createTextNode(availableNamespaces[i]));
+ optionNode.value = availableNamespaces[i];
+ if(this.currentNamespace == availableNamespaces[i]){
+ optionNode.selected = true;
+ }
+ namespacesDir.appendChild(optionNode);
+ }
+ },
+
+ _handleLoad: function(key){
+ this._printStatus("Loading '" + key + "'...");
+
+ // get the value
+ var results;
+ if(this.currentNamespace == dojox.storage.DEFAULT_NAMESPACE){
+ results = dojox.storage.get(key);
+ }else{
+ results = dojox.storage.get(key, this.currentNamespace);
+ }
+
+ // jsonify it if it is a JavaScript object
+ if(typeof results != "string"){
+ results = dojo.toJson(results);
+ }
+
+ // print out its value
+ this._printStatus("Loaded '" + key + "'");
+ dojo.byId("storageValue").value = results;
+
+ // print out the size of the value
+ this.printValueSize();
+ },
+
+ _printProviderMetadata: function(){
+ var storageType = dojox.storage.manager.currentProvider.declaredClass;
+ var isSupported = dojox.storage.isAvailable();
+ var maximumSize = dojox.storage.getMaximumSize();
+ var permanent = dojox.storage.isPermanent();
+ var uiConfig = dojox.storage.hasSettingsUI();
+ var moreInfo = "";
+ if(dojox.storage.manager.currentProvider.declaredClass
+ == "dojox.storage.FlashStorageProvider"){
+ moreInfo = "Flash Version " + dojox.flash.info.version;
+ }
+ dojo.byId("currentStorageProvider").innerHTML = storageType;
+ dojo.byId("isSupported").innerHTML = isSupported;
+ dojo.byId("isPersistent").innerHTML = permanent;
+ dojo.byId("hasUIConfig").innerHTML = uiConfig;
+ dojo.byId("maximumSize").innerHTML = maximumSize;
+ dojo.byId("moreInfo").innerHTML = moreInfo;
+ },
+
+ _printStatus: function(message){
+ // remove the old status
+ var top = dojo.byId("top");
+ for (var i = 0; i < top.childNodes.length; i++){
+ var currentNode = top.childNodes[i];
+ if (currentNode.nodeType == 1 &&
+ currentNode.className == "status"){
+ top.removeChild(currentNode);
+ }
+ }
+
+ var status = document.createElement("span");
+ status.className = "status";
+ status.innerHTML = message;
+
+ top.appendChild(status);
+ dojo.fadeOut({node: status, duration: 2000}).play();
+ },
+
+ _determineCurrentNamespace: function(){
+ // what is current namespace?
+ var availableNamespaces = dojox.storage.getNamespaces();
+ if(this.currentNamespace == dojox.storage.DEFAULT_NAMESPACE){
+ // do we even have the default namespace in our available namespaces?
+ var defaultPresent = false;
+ for(var i = 0; i < availableNamespaces.length; i++){
+ if(availableNamespaces[i] == dojox.storage.DEFAULT_NAMESPACE){
+ defaultPresent = true;
+ }
+ }
+
+ if(!defaultPresent && availableNamespaces.length){
+ this.currentNamespace = availableNamespaces[0];
+ }
+ }
+ },
+
+ _printAvailableProviders: function(){
+ // it is scary that this timeout is needed; if it is not present,
+ // the options don't appear on Firefox and Safari, even though the
+ // page is finished loading! it might have to do with some strange
+ // interaction where our initialize method is called from ExternalInterface,
+ // which originated inside of Flash. -- Brad Neuberg
+ window.setTimeout(function(){
+ var selector = dojo.byId("currentStorageProvider");
+ var p = dojox.storage.manager.providers;
+ for(var i = 0; i < p.length; i++){
+ var name = p[i].declaredClass;
+ var o = document.createElement("option");
+ o.appendChild(document.createTextNode(name));
+ o.value = name;
+ if(dojox.storage.manager.currentProvider == p[i]){
+ o.selected = true;
+ }
+
+ selector.appendChild(o);
+ }
+ }, 1);
+ }
+};
+
+// wait until the storage system is finished loading
+if(dojox.storage.manager.isInitialized() == false){ // storage might already be loaded when we get here
+ dojo.connect(dojox.storage.manager, "loaded", TestStorage, TestStorage.initialize);
+}else{
+ dojo.connect(dojo, "loaded", TestStorage, TestStorage.initialize);
+}