1) Исправления в связи со сменой API MySQL
authorRoman Bazalevsky <rvb@rvb.name>
Thu, 19 May 2016 17:02:10 +0000 (20:02 +0300)
committerRoman Bazalevsky <rvb@rvb.name>
Thu, 19 May 2016 17:02:10 +0000 (20:02 +0300)
2) В схему добавлены все хранимые процедуры
3) Добавлен веб-интерфейс

76 files changed:
db.py
get_flibusta.py
metadata.sql
www/COPYING [new file with mode: 0644]
www/OPDS_renderer.php [new file with mode: 0644]
www/OPDS_renderer.php.bak [new file with mode: 0644]
www/README [new file with mode: 0644]
www/README.md [new file with mode: 0644]
www/about.html [new file with mode: 0644]
www/author.php [new file with mode: 0644]
www/base.php [new file with mode: 0644]
www/book.php [new file with mode: 0644]
www/checkconfig.php [new file with mode: 0644]
www/config.php [new file with mode: 0644]
www/config_default.php [new file with mode: 0644]
www/config_local.php [new file with mode: 0644]
www/data.php [new file with mode: 0644]
www/favicon.ico [new file with mode: 0644]
www/feed.php [new file with mode: 0644]
www/fetch.php [new file with mode: 0644]
www/getJSON.php [new file with mode: 0644]
www/images/allbook.png [new file with mode: 0644]
www/images/author.png [new file with mode: 0644]
www/images/language.png [new file with mode: 0644]
www/images/recent.png [new file with mode: 0644]
www/images/serie.png [new file with mode: 0644]
www/images/tag.png [new file with mode: 0644]
www/index.php [new file with mode: 0644]
www/js/jquery.sortElements.js [new file with mode: 0644]
www/lang/Localization_ca.json [new file with mode: 0644]
www/lang/Localization_de.json [new file with mode: 0644]
www/lang/Localization_en.json [new file with mode: 0644]
www/lang/Localization_es.json [new file with mode: 0644]
www/lang/Localization_fr.json [new file with mode: 0644]
www/lang/Localization_it.json [new file with mode: 0644]
www/lang/Localization_nb.json [new file with mode: 0644]
www/lang/Localization_nl.json [new file with mode: 0644]
www/lang/Localization_ru.json [new file with mode: 0644]
www/lang/Localization_zh.json [new file with mode: 0644]
www/language.php [new file with mode: 0644]
www/login.html [new file with mode: 0644]
www/resources/Magnific-Popup/jquery.magnific-popup.min.js [new file with mode: 0644]
www/resources/Magnific-Popup/magnific-popup.css [new file with mode: 0644]
www/resources/PHPMailer/LICENSE [new file with mode: 0644]
www/resources/PHPMailer/README.md [new file with mode: 0644]
www/resources/PHPMailer/class.phpmailer.php [new file with mode: 0644]
www/resources/PHPMailer/class.pop3.php [new file with mode: 0644]
www/resources/PHPMailer/class.smtp.php [new file with mode: 0644]
www/resources/doT/doT.min.js [new file with mode: 0644]
www/resources/jQuery/jquery-1.10.2.min.js [new file with mode: 0644]
www/resources/jquery-cookie/jquery.cookies.js [new file with mode: 0644]
www/resources/lru/lru.js [new file with mode: 0644]
www/resources/normalize/normalize.css [new file with mode: 0644]
www/resources/php-epub-meta/LICENSE_php-epub-meta [new file with mode: 0644]
www/resources/php-epub-meta/epub.php [new file with mode: 0644]
www/resources/php-epub-meta/tbszip.php [new file with mode: 0644]
www/sendtomail.php [new file with mode: 0644]
www/serie.php [new file with mode: 0644]
www/styles/FontAwesome.otf [new file with mode: 0644]
www/styles/font-awesome.css [new file with mode: 0644]
www/styles/fontawesome-webfont.eot [new file with mode: 0644]
www/styles/fontawesome-webfont.svg [new file with mode: 0644]
www/styles/fontawesome-webfont.ttf [new file with mode: 0644]
www/styles/fontawesome-webfont.woff [new file with mode: 0644]
www/styles/style-default.css [new file with mode: 0644]
www/styles/style-eink.css [new file with mode: 0644]
www/tag.php [new file with mode: 0644]
www/templates/default/bookdetail.html [new file with mode: 0644]
www/templates/default/footer.html [new file with mode: 0644]
www/templates/default/header.html [new file with mode: 0644]
www/templates/default/main.html [new file with mode: 0644]
www/templates/default/page.html [new file with mode: 0644]
www/tools/export_file.txt [new file with mode: 0644]
www/tools/updateLang.pl [new file with mode: 0644]
www/util.js [new file with mode: 0644]
www/web.config [new file with mode: 0644]

diff --git a/db.py b/db.py
index a39c1603913a4b5a03ecd47045a659c01a723927..d3a4912a97891823a3b6d53b9561aead8b3987b7 100644 (file)
--- a/db.py
+++ b/db.py
@@ -6,7 +6,7 @@ import ConfigParser
 def SortName(name):
   if database:
     c = database.cursor()
-    c.execute('SELECT metadata.SortStr(%s)', (name))
+    c.execute('SELECT metadata.SortStr(%s)', [name])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -15,7 +15,7 @@ def SortName(name):
 def SortAuthorName(name):
   if database:
     c = database.cursor()
-    c.execute('SELECT metadata.SortAuthor(%s)', (name))
+    c.execute('SELECT metadata.SortAuthor(%s)', [name])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -24,7 +24,7 @@ def SortAuthorName(name):
 def GetOrCreateAuthor(name):
   if database:
     c = database.cursor()
-    c.execute('SELECT metadata.GetOrCreateAuthor(%s)', (name))
+    c.execute('SELECT metadata.GetOrCreateAuthor(%s)', [name])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -33,7 +33,7 @@ def GetOrCreateAuthor(name):
 def GetOrCreateLang(name):
   if database:
     c = database.cursor()
-    c.execute('SELECT metadata.GetOrCreateLang(%s)', (name))
+    c.execute('SELECT metadata.GetOrCreateLang(%s)', [name])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -42,7 +42,7 @@ def GetOrCreateLang(name):
 def GetOrCreatePublisher(name):
   if database:
     c = database.cursor()
-    c.execute('SELECT metadata.GetOrCreatePublisher(%s)', (name))
+    c.execute('SELECT metadata.GetOrCreatePublisher(%s)', [name])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -51,7 +51,7 @@ def GetOrCreatePublisher(name):
 def GetOrCreateSeries(name):
   if database:
     c = database.cursor()
-    c.execute('SELECT metadata.GetOrCreateSeries(%s)', (name))
+    c.execute('SELECT metadata.GetOrCreateSeries(%s)', [name])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -60,7 +60,7 @@ def GetOrCreateSeries(name):
 def GetOrCreateTag(name):
   if database:
     c = database.cursor()
-    c.execute('SELECT metadata.GetOrCreateTag(%s)', (name))
+    c.execute('SELECT metadata.GetOrCreateTag(%s)', [name])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -69,7 +69,7 @@ def GetOrCreateTag(name):
 def CreateBook(title,pubdate,series_index,isbn):
   if database:
     c = database.cursor()
-    c.execute('SELECT metadata.CreateBook(%s,%s,%s,%s)', (title,pubdate,series_index,isbn))
+    c.execute('SELECT metadata.CreateBook(%s,%s,%s,%s)', [title,pubdate,series_index,isbn])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -79,7 +79,7 @@ def LinkBookToAuthors(book_id,author_ids):
   if database:
     c = database.cursor()
     for author_id in author_ids:
-      c.execute('INSERT INTO metadata.books_authors_link(book,author) VALUES (%s,%s)', (book_id,author_id))
+      c.execute('INSERT INTO metadata.books_authors_link(book,author) VALUES (%s,%s)', [book_id,author_id])
   else:
     print "No connection to DB"
     exit()
@@ -90,7 +90,7 @@ def LinkBookToLangs(book_id,lang_ids):
     io = 0
     for lang_id in lang_ids:
       io = io + 1
-      c.execute('INSERT INTO metadata.books_languages_link(book,lang_code,item_order) VALUES (%s,%s,%s)', (book_id,lang_id,io))
+      c.execute('INSERT INTO metadata.books_languages_link(book,lang_code,item_order) VALUES (%s,%s,%s)', [book_id,lang_id,io])
   else:
     print "No connection to DB"
     exit()
@@ -98,7 +98,7 @@ def LinkBookToLangs(book_id,lang_ids):
 def LinkBookToPublishers(book_id,pub_id):
   if database:
     c = database.cursor()
-    c.execute('INSERT INTO metadata.books_publishers_link(book,publisher) VALUES (%s,%s)', (book_id,pub_id))
+    c.execute('INSERT INTO metadata.books_publishers_link(book,publisher) VALUES (%s,%s)', [book_id,pub_id])
   else:
     print "No connection to DB"
     exit()
@@ -106,7 +106,7 @@ def LinkBookToPublishers(book_id,pub_id):
 def LinkBookToSeries(book_id,ser_id):
   if database:
     c = database.cursor()
-    c.execute('INSERT INTO metadata.books_series_link(book,series) VALUES (%s,%s)', (book_id,ser_id))
+    c.execute('INSERT INTO metadata.books_series_link(book,series) VALUES (%s,%s)', [book_id,ser_id])
   else:
     print "No connection to DB"
     exit()
@@ -115,7 +115,7 @@ def LinkBookToTags(book_id,tag_ids):
   if database:
     c = database.cursor()
     for tag_id in tag_ids:
-      c.execute('INSERT INTO metadata.books_tags_link(book,tag) VALUES (%s,%s)', (book_id,tag_id))
+      c.execute('INSERT INTO metadata.books_tags_link(book,tag) VALUES (%s,%s)', [book_id,tag_id])
   else:
     print "No connection to DB"
     exit()
@@ -123,8 +123,8 @@ def LinkBookToTags(book_id,tag_ids):
 def SetPath(book_id,path,dataname,filesize,cover):
   if database:
     c = database.cursor()
-    c.execute('UPDATE metadata.books SET path=%s, has_cover=%s WHERE id=%s', (path,cover,book_id))
-    c.execute('INSERT INTO metadata.data(book,format,uncompressed_size,name) values (%s,%s,%s,%s)',(book_id,'FB2',filesize,dataname))
+    c.execute('UPDATE metadata.books SET path=%s, has_cover=%s WHERE id=%s', [path,cover,book_id])
+    c.execute('INSERT INTO metadata.data(book,format,uncompressed_size,name) values (%s,%s,%s,%s)',[book_id,'FB2',filesize,dataname])
   else:
     print "No connection to DB"
     exit()
@@ -132,7 +132,7 @@ def SetPath(book_id,path,dataname,filesize,cover):
 def StoreComment(book_id,comment):
   if database:
     c = database.cursor()
-    c.execute('INSERT INTO metadata.comments(book,text) values (%s,%s)',(book_id,comment))
+    c.execute('INSERT INTO metadata.comments(book,text) values (%s,%s)',[book_id,comment])
   else:
     print "No connection to DB"
     exit()
@@ -140,7 +140,7 @@ def StoreComment(book_id,comment):
 def PathByID(book_id):
   if database:
     c = database.cursor()
-    c.execute('SELECT path FROM metadata.books WHERE id=%s',(book_id))
+    c.execute('SELECT path FROM metadata.books WHERE id=%s',[book_id])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -149,7 +149,7 @@ def PathByID(book_id):
 def DataByID(book_id,format):
   if database:
     c = database.cursor()
-    c.execute('SELECT name FROM metadata.data WHERE book=%s and format=%s',(book_id,format))
+    c.execute('SELECT name FROM metadata.data WHERE book=%s and format=%s',[book_id,format])
     return c.fetchone()[0]+'.'+format.lower()
   else:
     print "No connection to DB"
@@ -158,7 +158,7 @@ def DataByID(book_id,format):
 def DelBook(book_id):
   if database:
     c = database.cursor()
-    c.execute('DELETE FROM metadata.books WHERE id=%s',(book_id))
+    c.execute('DELETE FROM metadata.books WHERE id=%s',[book_id])
   else:
     print "No connection to DB"
     exit()
@@ -166,7 +166,7 @@ def DelBook(book_id):
 def ChangeBookFormat(book_id,old_format,new_format):
   if database:
     c = database.cursor()
-    c.execute('UPDATE metadata.data SET format=%s WHERE book=%s and format=%s',(new_format,book_id,old_format))
+    c.execute('UPDATE metadata.data SET format=%s WHERE book=%s and format=%s',[new_format,book_id,old_format])
   else:
     print "No connection to DB"
     exit()
@@ -174,7 +174,7 @@ def ChangeBookFormat(book_id,old_format,new_format):
 def TestArchive(name):
   if database:
     c = database.cursor()
-    c.execute('SELECT count(*) from metadata.processed_archives WHERE filename=%s',(name))
+    c.execute('SELECT count(*) from metadata.processed_archives WHERE filename=%s',[name])
     return c.fetchone()[0]
   else:
     print "No connection to DB"
@@ -183,7 +183,7 @@ def TestArchive(name):
 def MarkArchive(name):
   if database:
     c = database.cursor()
-    c.execute('insert into metadata.processed_archives(filename) values (%s)',(name))
+    c.execute('insert into metadata.processed_archives(filename) values (%s)',[name])
   else:
     print "No connection to DB"
     exit()
@@ -191,7 +191,7 @@ def MarkArchive(name):
 def ListByFormat(format,limit=100):
   if database:
     c = database.cursor()
-    c.execute('SELECT DISTINCT book FROM metadata.data WHERE format=%s ORDER BY book LIMIT 0,%s',(format,limit))
+    c.execute('SELECT DISTINCT book FROM metadata.data WHERE format=%s ORDER BY book LIMIT 0,%s',[format,limit])
     return c.fetchall()
   else:
     print "No connection to DB"
@@ -200,7 +200,7 @@ def ListByFormat(format,limit=100):
 def ListDups(limit=100):
   if database:
     c = database.cursor()
-    c.execute('SELECT b.title,l.author,max(b.id) id FROM metadata.books b,metadata.books_authors_link l where b.id=l.book group by b.title,l.author having count(*)>%s',(limit))
+    c.execute('SELECT b.title,l.author,max(b.id) id FROM metadata.books b,metadata.books_authors_link l where b.id=l.book group by b.title,l.author having count(*)>%s',[limit])
     return c.fetchall()
   else:
     print "No connection to DB"
@@ -209,7 +209,7 @@ def ListDups(limit=100):
 def ListByTitleAndAuthor(title,author,id=0):
   if database:
     c = database.cursor()
-    c.execute('SELECT b.id FROM metadata.books b,metadata.books_authors_link l where b.id=l.book and b.title=%s and l.author=%s and b.id<>%s',(title,author,id))
+    c.execute('SELECT b.id FROM metadata.books b,metadata.books_authors_link l where b.id=l.book and b.title=%s and l.author=%s and b.id<>%s',[title,author,id])
     return c.fetchall()
   else:
     print "No connection to DB"
index 13768c47930a9be4b4477d29c74460088a45f8da..64098473bba78122d023f2f6ec2aff990651db9b 100755 (executable)
@@ -12,7 +12,7 @@ os.environ['no_proxy']='localhost,127.0.0.1'
 proxies = {'http': 'http://localhost:3128'}
 
 
-for host in ['flibustahezeous3.onion','flibusta.i2p','flibusta.net']:
+for host in ['flibusta.lib','flibustahezeous3.onion','flibusta.i2p']:
 
   try:
     print "Trying %s" % (host)
@@ -20,13 +20,13 @@ for host in ['flibustahezeous3.onion','flibusta.i2p','flibusta.net']:
     html = BeautifulSoup(html_page)
 
     os_command = "wget -c -q -P \"%s\" http://%s/daily/%s" % (db.upload_files,host,'%s')
-    print os_command   
     matched = False 
 
     for link in html.findAll('a'):
       file = link.get("href")
       print file
       if pattern.match(file):
+        print "Pattern matched"
         matched = True
         if not db.TestArchive(file):
           print "Processing %s" % file
index 3e078ad05ebfba9bf3c18133690408ab275516d4..113734d9a7ead58406e388cf7a3604b003038398 100644 (file)
@@ -1,8 +1,8 @@
--- MySQL dump 10.13  Distrib 5.5.34, for debian-linux-gnu (x86_64)
+-- MySQL dump 10.13  Distrib 5.7.12, for Linux (x86_64)
 --
 -- Host: localhost    Database: metadata
 -- ------------------------------------------------------
--- Server version      5.5.34-0ubuntu0.13.10.1
+-- Server version      5.7.12-0ubuntu1
 
 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -29,7 +29,7 @@ CREATE TABLE `authors` (
   PRIMARY KEY (`id`),
   UNIQUE KEY `NAMEIDX` (`name`) USING BTREE,
   KEY `SORTIDX` (`sort`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=118680 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=140889 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -45,7 +45,7 @@ CREATE TABLE `books` (
   `sort` varchar(512) DEFAULT NULL,
   `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
   `pubdate` timestamp NULL DEFAULT NULL,
-  `series_index` decimal(4,2) DEFAULT '1.00',
+  `series_index` decimal(10,2) DEFAULT '1.00',
   `isbn` varchar(45) DEFAULT NULL,
   `path` varchar(2000) DEFAULT NULL,
   `uuid` varchar(128) DEFAULT NULL,
@@ -56,7 +56,7 @@ CREATE TABLE `books` (
   KEY `TITLEIDX` (`title`(255)),
   KEY `TIMESTAMPIDX` (`timestamp`),
   KEY `ISBNIDX` (`isbn`)
-) ENGINE=InnoDB AUTO_INCREMENT=728948 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1892665 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -75,8 +75,8 @@ CREATE TABLE `books_authors_link` (
   KEY `books_authors_link_aidx` (`author`),
   KEY `books_authors_link_bidx` (`book`),
   CONSTRAINT `fk_books_authors_link_auth` FOREIGN KEY (`author`) REFERENCES `authors` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
-  CONSTRAINT `fk_books_authors_link_books` FOREIGN KEY (`book`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=523239 DEFAULT CHARSET=utf8;
+  CONSTRAINT `fk_books_authors_link_books` FOREIGN KEY (`book`) REFERENCES `books_old` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=2017231 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -95,9 +95,36 @@ CREATE TABLE `books_languages_link` (
   UNIQUE KEY `book` (`book`,`lang_code`),
   KEY `books_languages_link_aidx` (`lang_code`),
   KEY `books_languages_link_bidx` (`book`),
-  CONSTRAINT `fk_books_languages_link_book` FOREIGN KEY (`book`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
+  CONSTRAINT `fk_books_languages_link_book` FOREIGN KEY (`book`) REFERENCES `books_old` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
   CONSTRAINT `fk_books_languages_link_lang` FOREIGN KEY (`lang_code`) REFERENCES `languages` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=488274 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1667797 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `books_old`
+--
+
+DROP TABLE IF EXISTS `books_old`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `books_old` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `title` varchar(512) DEFAULT NULL,
+  `sort` varchar(512) DEFAULT NULL,
+  `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `pubdate` timestamp NULL DEFAULT NULL,
+  `series_index` decimal(4,2) DEFAULT '1.00',
+  `isbn` varchar(45) DEFAULT NULL,
+  `path` varchar(2000) DEFAULT NULL,
+  `uuid` varchar(128) DEFAULT NULL,
+  `has_cover` int(11) DEFAULT '0',
+  `last_modified` timestamp NULL DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `SORTIDX` (`sort`(255)),
+  KEY `TITLEIDX` (`title`(255)),
+  KEY `TIMESTAMPIDX` (`timestamp`),
+  KEY `ISBNIDX` (`isbn`)
+) ENGINE=InnoDB AUTO_INCREMENT=1892532 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -114,9 +141,9 @@ CREATE TABLE `books_publishers_link` (
   PRIMARY KEY (`id`),
   KEY `books_publishers_link_aidx` (`publisher`),
   KEY `books_publishers_link_bidx` (`book`),
-  CONSTRAINT `fk_books_publishers_link_book` FOREIGN KEY (`book`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
+  CONSTRAINT `fk_books_publishers_link_book` FOREIGN KEY (`book`) REFERENCES `books_old` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
   CONSTRAINT `fk_books_publishers_link_pub` FOREIGN KEY (`publisher`) REFERENCES `publishers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=204595 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=981343 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -133,9 +160,9 @@ CREATE TABLE `books_series_link` (
   PRIMARY KEY (`id`),
   KEY `books_series_link_aidx` (`series`),
   KEY `books_series_link_bidx` (`book`),
-  CONSTRAINT `fk_books_series_link_book` FOREIGN KEY (`book`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
+  CONSTRAINT `fk_books_series_link_book` FOREIGN KEY (`book`) REFERENCES `books_old` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
   CONSTRAINT `fk_books_series_link_ser` FOREIGN KEY (`series`) REFERENCES `series` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=179786 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=741933 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -153,9 +180,9 @@ CREATE TABLE `books_tags_link` (
   UNIQUE KEY `book` (`book`,`tag`),
   KEY `books_tags_link_aidx` (`tag`),
   KEY `books_tags_link_bidx` (`book`),
-  CONSTRAINT `fk_books_tags_link_book` FOREIGN KEY (`book`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
+  CONSTRAINT `fk_books_tags_link_book` FOREIGN KEY (`book`) REFERENCES `books_old` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
   CONSTRAINT `fk_books_tags_link_tag` FOREIGN KEY (`tag`) REFERENCES `tags` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=544808 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=2015931 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -171,8 +198,8 @@ CREATE TABLE `comments` (
   `text` varchar(4000) DEFAULT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `book_UNIQUE` (`book`),
-  CONSTRAINT `fk_comments_book` FOREIGN KEY (`book`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=414407 DEFAULT CHARSET=utf8;
+  CONSTRAINT `fk_comments_book` FOREIGN KEY (`book`) REFERENCES `books_old` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=1457254 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -191,8 +218,23 @@ CREATE TABLE `data` (
   PRIMARY KEY (`id`),
   KEY `fk_data_book_idx` (`book`),
   KEY `format_idx` (`format`),
-  CONSTRAINT `fk_data_book` FOREIGN KEY (`book`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=728543 DEFAULT CHARSET=utf8;
+  CONSTRAINT `fk_data_book` FOREIGN KEY (`book`) REFERENCES `books_old` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=1892071 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `directories`
+--
+
+DROP TABLE IF EXISTS `directories`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `directories` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `path` varchar(256) NOT NULL,
+  `descr` varchar(2000) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -223,7 +265,7 @@ CREATE TABLE `languages` (
   `lang_code` varchar(10) DEFAULT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `lang_code_UNIQUE` (`lang_code`)
-) ENGINE=InnoDB AUTO_INCREMENT=204 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=217 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -238,7 +280,7 @@ CREATE TABLE `processed_archives` (
   `filename` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `filename` (`filename`)
-) ENGINE=InnoDB AUTO_INCREMENT=115 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1035 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -253,7 +295,7 @@ CREATE TABLE `publishers` (
   `name` longtext NOT NULL,
   `sort` longtext,
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=26395 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=31291 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -268,7 +310,7 @@ CREATE TABLE `series` (
   `name` longtext NOT NULL,
   `sort` longtext,
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=39266 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=46699 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -283,7 +325,7 @@ CREATE TABLE `tags` (
   `name` longtext NOT NULL,
   PRIMARY KEY (`id`),
   KEY `nameidx` (`name`(32))
-) ENGINE=InnoDB AUTO_INCREMENT=478 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=548 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -298,8 +340,632 @@ CREATE TABLE `tags_mapping` (
   `tag_mask` varchar(45) NOT NULL,
   `tag_result` varchar(45) NOT NULL,
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=316 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping events for database 'metadata'
+--
+
+--
+-- Dumping routines for database 'metadata'
+--
+/*!50003 DROP FUNCTION IF EXISTS `CreateBook` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `CreateBook`(title varchar(2000),pubdate datetime,series_index decimal(10,2),isbn varchar(45)) RETURNS int(11)
+begin
+  DECLARE lID INTEGER;
+  INSERT INTO books(title,sort,pubdate,series_index,isbn) VALUES (title,SortStr(title),pubdate,series_index,isbn);
+  select last_insert_id() into lID;
+  RETURN lID;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `DeleteDoubleSpaces` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `DeleteDoubleSpaces`( title VARCHAR(250) ) RETURNS varchar(250) CHARSET utf8
+    DETERMINISTIC
+BEGIN
+    DECLARE result VARCHAR(250);
+    SET result = REPLACE( title, '  ', ' ' );
+    WHILE (result <> title) DO 
+        SET title = result;
+        SET result = REPLACE( title, '  ', ' ' );
+    END WHILE;
+    RETURN result;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `GetOrCreateAuthor` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `GetOrCreateAuthor`(pAuthor varchar(255)) RETURNS int(11)
+BEGIN
+  declare lID integer;
+  select min(ID) into lID from authors where name=pAuthor;
+  if lID is null then
+    insert into authors(name,sort)
+         values(pAuthor,SortAuthor(pAuthor));
+    SET lID = last_insert_id();
+  end if;
+RETURN lID;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `GetOrCreateLang` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `GetOrCreateLang`(pLang varchar(255)) RETURNS int(11)
+BEGIN
+  declare lID integer;\r
+  declare lLang varchar(255);\r
+  select min(lang_code) into lLang from lang_alias where alias=pLang;\r
+  if lLang is null then\r
+    SET lLang = pLang;\r
+  end if;
+  select min(ID) into lID from languages where lang_code=lLang;
+  if lID is null then
+    insert into languages(lang_code)
+         values(lLang);
+    SET lID = last_insert_id();
+  end if;
+RETURN lID;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `GetOrCreatePublisher` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `GetOrCreatePublisher`(pPub varchar(255)) RETURNS int(11)
+BEGIN
+  declare lID integer;
+  select min(ID) into lID from publishers where name=pPub;
+  if lID is null then
+    insert into publishers(name,sort)
+         values(pPub,SortStr(pPub));
+    SET lID = last_insert_id();
+  end if;
+RETURN lID;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `GetOrCreateSeries` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `GetOrCreateSeries`(pSeries varchar(255)) RETURNS int(11)
+BEGIN
+  declare lID integer;
+  select min(ID) into lID from series where name=pSeries;
+  if lID is null then
+    insert into series(name,sort)
+         values(pSeries,SortStr(pSeries));
+    SET lID = last_insert_id();
+  end if;
+RETURN lID;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `GetOrCreateTag` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `GetOrCreateTag`(pTag varchar(255)) RETURNS int(11)
+BEGIN
+  declare lID integer;
+  select min(ID) into lID from tags where name=pTag;
+  if lID is null then
+    insert into tags(name)
+         values(pTag);
+    SET lID = last_insert_id();
+  end if;
+RETURN lID;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `ProcessLang` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `ProcessLang`(pOldLang varchar(64),pNewLang varchar(64)) RETURNS varchar(2000) CHARSET utf8
+BEGIN
+  declare Res varchar(2000);
+  declare lOldID integer;
+  declare lNewID integer;
+  select id into lOldID from languages where lang_code=pOldLang;
+  select id into lNewID from languages where lang_code=pNewLang;
+  SET Res = CONCAT(lOldID ,' ',lNewID);
+  insert into metadata.books_languages_link(book,lang_code)
+  select book,lNewID from metadata.books_languages_link
+    where lang_code=lOldID
+     and book not in 
+    (select book from metadata.books_languages_link
+      where lang_code=lNewID);
+  delete from metadata.books_languages_link
+   where lang_code=lOldID;
+  delete from metadata.languages where id=lOldID;
+  return Res;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `ProcessMapping` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `ProcessMapping`() RETURNS int(11)
+BEGIN
+  DECLARE counter INTEGER;
+  DECLARE done INT DEFAULT FALSE;
+  DECLARE old_tag, new_tag,dummystr VARCHAR(255);
+  DECLARE cur CURSOR FOR 
+  SELECT t1.name,t2.name FROM metadata.tags t1,metadata.tags t2,metadata.tags_mapping m 
+      where m.tag_result=t2.name and t1.name REGEXP m.tag_mask and t1.id<>t2.id;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+  OPEN cur;
+  SET counter=0;
+  tags: loop
+    FETCH cur into old_tag,new_tag;
+    IF done THEN
+      LEAVE tags;
+       END IF;
+    SELECT ProcessTags(old_tag,new_tag) INTo dummystr;
+    SET counter = counter+1;
+  END loop;
+  CLOSE cur;
+  RETURN counter;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `ProcessTags` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `ProcessTags`(pOldTag varchar(64),pNewTag varchar(64)) RETURNS varchar(2000) CHARSET utf8
+BEGIN
+  declare Res varchar(2000);
+  declare lOldID integer;
+  declare lNewID integer;
+  select id into lOldID from tags where name=pOldTag;
+  select id into lNewID from tags where name=pNewTag;
+  SET Res = CONCAT(lOldID ,' ',lNewID);
+  insert into metadata.books_tags_link(book,tag)
+  select book,lNewID from metadata.books_tags_link
+    where tag=lOldID
+     and book not in 
+    (select book from metadata.books_tags_link
+      where tag=lNewID);
+  delete from metadata.books_tags_link
+   where tag=lOldID;
+  delete from metadata.tags where id=lOldID;
+  return Res;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `SortAuthor` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `SortAuthor`(pStr varchar(2000)) RETURNS varchar(2000) CHARSET utf8
+    DETERMINISTIC
+BEGIN
+  RETURN REPLACE(SplitAuthor(SortStr(pStr)),'NO ORIGINAL NAME FOR ','');
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `SortStr` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `SortStr`(pStr varchar(2000)) RETURNS varchar(2000) CHARSET utf8
+    DETERMINISTIC
+BEGIN
+  DECLARE i INT DEFAULT 1;
+  DECLARE v_char VARCHAR(1);
+  DECLARE v_parseStr VARCHAR(2000) DEFAULT ' ';
+
+SET pStr = UPPER(pStr);
+
+IF pSTR LIKE 'A %' THEN
+  SET pSTR=SUBSTR(pStr,3);
+ELSEIF pSTR LIKE 'THE %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+ELSEIF pSTR LIKE 'EL %' THEN
+  SET pSTR=SUBSTR(pStr,4);
+ELSEIF pSTR LIKE 'IL %' THEN
+  SET pSTR=SUBSTR(pStr,4);
+ELSEIF pSTR LIKE 'L\'%' THEN
+  SET pSTR=SUBSTR(pStr,3);
+ELSEIF pSTR LIKE 'LES %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+ELSEIF pSTR LIKE 'DIE %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+ELSEIF pSTR LIKE 'DER %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+ELSEIF pSTR LIKE 'DAS %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+ELSEIF pSTR LIKE 'LA %' THEN
+  SET pSTR=SUBSTR(pStr,4);
+ELSEIF pSTR LIKE 'LOS %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+ELSEIF pSTR LIKE 'LÀ %' THEN
+  SET pSTR=SUBSTR(pStr,4);
+ELSEIF pSTR LIKE 'LE %' THEN
+  SET pSTR=SUBSTR(pStr,4);
+ELSEIF pSTR LIKE 'LAS %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+ELSEIF pSTR LIKE 'UN %' THEN
+  SET pSTR=SUBSTR(pStr,4);
+ELSEIF pSTR LIKE 'UNA %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+ELSEIF pSTR LIKE 'UNO %' THEN
+  SET pSTR=SUBSTR(pStr,5);
+END IF;
+
+WHILE (i <= LENGTH(pStr) )  DO
+  SET v_char = SUBSTR(pStr,i,1);
+  
+IF v_char REGEXP  '^[A-Z0-9АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ ]+$' OR v_char = '-' THEN  #alphanumeric
+        SET v_parseStr = CONCAT(v_parseStr,v_char);  
+        SET v_char='';
+  ELSEIF v_char='Š' collate 'utf8_bin' THEN
+        SET v_parseStr = CONCAT(v_parseStr,'S');
+        SET v_char='';
+  ELSEIF v_char='Ð' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'Dj');
+        SET v_char='';
+  ELSEIF v_char='Ž' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'Z');
+        SET v_char='';
+  ELSEIF v_char='À' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'A');
+        SET v_char='';
+  ELSEIF v_char='Á' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'A');
+        SET v_char='';
+  ELSEIF v_char='Â' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'A');
+        SET v_char='';
+  ELSEIF v_char='Ã' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'A');
+        SET v_char='';
+  ELSEIF v_char='Ä' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'A');
+        SET v_char='';
+  ELSEIF v_char='Å' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'A');
+        SET v_char='';
+  ELSEIF v_char='Æ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'A');
+        SET v_char='';
+  ELSEIF v_char='Ç' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'C');
+        SET v_char='';
+  ELSEIF v_char='È' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'E');
+        SET v_char='';
+  ELSEIF v_char='É' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'E');
+        SET v_char='';
+  ELSEIF v_char='Ê' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'E');
+        SET v_char='';
+  ELSEIF v_char='Ë' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'E');
+        SET v_char='';
+  ELSEIF v_char='Ì' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'I');
+        SET v_char='';
+  ELSEIF v_char='Í' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'I');
+        SET v_char='';
+  ELSEIF v_char='Î' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'I');
+        SET v_char='';
+  ELSEIF v_char='Ï' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'I');
+        SET v_char='';
+  ELSEIF v_char='Ñ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'N');
+        SET v_char='';
+  ELSEIF v_char='Ò' THEN
+        SET v_parseStr = CONCAT(v_parseStr,'O');
+        SET v_char='';
+  ELSEIF v_char='Ó' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'O');
+        SET v_char='';
+  ELSEIF v_char='Ô' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'O');
+        SET v_char='';
+  ELSEIF v_char='Õ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'O');
+        SET v_char='';
+  ELSEIF v_char='Ö' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'O');
+        SET v_char='';
+  ELSEIF v_char='Ø' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'O');
+        SET v_char='';
+  ELSEIF v_char='Ù' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'U');
+        SET v_char='';
+  ELSEIF v_char='Ú' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'U');
+        SET v_char='';
+  ELSEIF v_char='Û' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'U');
+        SET v_char='';
+  ELSEIF v_char='Ü' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'U');
+        SET v_char='';
+  ELSEIF v_char='Ý' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'Y');
+        SET v_char='';
+  ELSEIF v_char='Þ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'B');
+        SET v_char='';
+  ELSEIF v_char='ß' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'SS');
+        SET v_char='';
+  ELSEIF v_char='Ł' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'L');
+        SET v_char='';
+  ELSEIF v_char='Ĥ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'H');
+        SET v_char='';
+  ELSEIF v_char='Č' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'C');
+        SET v_char='';
+  END IF;
+
+  IF v_char='Ґ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'Г');
+        SET v_char='';
+  ELSEIF v_char='І' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'И');  
+        SET v_char='';
+  ELSEIF v_char='Є' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'Е');  
+        SET v_char='';
+  ELSEIF v_char='Ї' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'Й');  
+        SET v_char='';
+  ELSEIF v_char='Ў' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'У');
+        SET v_char='';
+  ELSEIF v_char='Ђ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'ДЖ');
+        SET v_char='';
+  ELSEIF v_char='Џ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'ДЖ');
+        SET v_char='';
+  ELSEIF v_char='Ѓ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'Г');
+        SET v_char='';
+  ELSEIF v_char='Љ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'ЛЬ');
+        SET v_char='';
+  ELSEIF v_char='Њ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'HЬ');
+        SET v_char='';
+  ELSEIF v_char='Ћ' collate 'utf8_bin'  THEN
+        SET v_parseStr = CONCAT(v_parseStr,'Ч');
+        SET v_char='';
+  END IF;
+
+  IF v_char='$' THEN
+        SET v_parseStr = CONCAT(v_parseStr,'S');
+        SET v_char='';
+  END IF;
+
+  SET i = i + 1;
+END WHILE;
+SET v_parseStr=trim(DeleteDoubleSpaces(v_parseStr));
+RETURN v_parseStr;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP FUNCTION IF EXISTS `SplitAuthor` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` FUNCTION `SplitAuthor`(pStr VARCHAR(2000)) RETURNS varchar(2000) CHARSET utf8
+BEGIN
+  DECLARE lLastName VARCHAR(2000);
+  DECLARE lStr VARCHAR(2000);
+  DECLARE lLastNameLen INTEGER;
+  DECLARE lFirstName VARCHAR(2000);
+  SET lStr=trim(pStr);
+  SET lLastName=substring_index(lStr,' ',-1);
+  IF lLastName<>lStr THEN
+     SET lLastNameLen=char_length(lLastName);
+     SET lFirstName=trim(substring(pStr,1,char_length(lStr)-lLastNameLen-1));
+     RETURN concat(lLastName,' ',lFirstName);
+  ELSE
+    RETURN lStr;
+  END IF;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `DropTag` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` PROCEDURE `DropTag`(pOldTag varchar(64))
+BEGIN
+  declare lOldID integer;
+  select id into lOldID from tags where name=pOldTag;
+  delete from metadata.books_tags_link
+    where tag=lOldID;
+  delete from metadata.tags where id=lOldID;  
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `ProcessLangAliases` */;
+/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client  = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection  = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
+/*!50003 SET sql_mode              = '' */ ;
+DELIMITER ;;
+CREATE DEFINER=`admin`@`%` PROCEDURE `ProcessLangAliases`()
+BEGIN\r
+  DECLARE done INT DEFAULT FALSE;\r
+  DECLARE alias,lang,dummystr VARCHAR(255);\r
+  DECLARE cur CURSOR FOR 
+    SELECT a.alias,a.lang_code FROM metadata.languages l,metadata.lang_alias a where l.lang_code=a.alias;\r
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;\r
+  OPEN cur;\r
+  langs: loop\r
+    FETCH cur into alias,lang;\r
+    IF done THEN\r
+      LEAVE langs;\r
+    END IF;\r
+    SELECT ProcessLang(alias,lang) INTO dummystr;\r
+    END loop;\r
+  CLOSE cur;\r
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode              = @saved_sql_mode */ ;
+/*!50003 SET character_set_client  = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection  = @saved_col_connection */ ;
 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
 
 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
@@ -310,4 +976,4 @@ CREATE TABLE `tags_mapping` (
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
--- Dump completed on 2013-11-30 18:05:09
+-- Dump completed on 2016-05-19 19:39:15
diff --git a/www/COPYING b/www/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/www/OPDS_renderer.php b/www/OPDS_renderer.php
new file mode 100644 (file)
index 0000000..10156ff
--- /dev/null
@@ -0,0 +1,271 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+require_once ("base.php");
+
+class OPDSRenderer
+{
+    const PAGE_OPENSEARCH = "8";
+    const PAGE_OPENSEARCH_QUERY = "9";
+
+    private $xmlStream = NULL;
+    private $updated = NULL;
+
+    private function getUpdatedTime () {
+        if (is_null ($this->updated)) {
+            $this->updated = time();
+        }
+        return date (DATE_ATOM, $this->updated);
+    }
+
+    private function getXmlStream () {
+        if (is_null ($this->xmlStream)) {
+            $this->xmlStream = new XMLWriter();
+            $this->xmlStream->openMemory();
+            $this->xmlStream->setIndent (true);
+        }
+        return $this->xmlStream;
+    }
+
+    public function getOpenSearch () {
+        global $config;
+        $xml = new XMLWriter ();
+        $xml->openMemory ();
+        $xml->setIndent (true);
+        $xml->startDocument('1.0','UTF-8');
+            $xml->startElement ("OpenSearchDescription");
+                $xml->writeAttribute ("xmlns", "http://a9.com/-/spec/opensearch/1.1/");
+                $xml->startElement ("ShortName");
+                    $xml->text ("My catalog");
+                $xml->endElement ();
+                $xml->startElement ("Description");
+                    $xml->text ("Search for ebooks");
+                $xml->endElement ();
+                $xml->startElement ("InputEncoding");
+                    $xml->text ("UTF-8");
+                $xml->endElement ();
+                $xml->startElement ("OutputEncoding");
+                    $xml->text ("UTF-8");
+                $xml->endElement ();
+                $xml->startElement ("Image");
+                    $xml->writeAttribute ("type", "image/x-icon");
+                    $xml->writeAttribute ("width", "16");
+                    $xml->writeAttribute ("height", "16");
+                    $xml->text ($config['cops_icon']);
+                $xml->endElement ();
+                $xml->startElement ("Url");
+                    $xml->writeAttribute ("type", 'application/atom+xml');
+                    $urlparam = "?query={searchTerms}";
+                    if (!is_null (GetUrlParam (DB))) $urlparam = addURLParameter ($urlparam, DB, GetUrlParam (DB));
+                    $urlparam = str_replace ("%7B", "{", $urlparam);
+                    $urlparam = str_replace ("%7D", "}", $urlparam);
+                    $xml->writeAttribute ("template", $config['cops_full_url'] . 'feed.php' . $urlparam);
+                $xml->endElement ();
+                $xml->startElement ("Query");
+                    $xml->writeAttribute ("role", "example");
+                    $xml->writeAttribute ("searchTerms", "robot");
+                $xml->endElement ();
+            $xml->endElement ();
+        $xml->endDocument();
+        return $xml->outputMemory(true);
+    }
+
+    private function startXmlDocument ($page) {
+        global $config;
+        self::getXmlStream ()->startDocument('1.0','UTF-8');
+        self::getXmlStream ()->startElement ("feed");
+            self::getXmlStream ()->writeAttribute ("xmlns", "http://www.w3.org/2005/Atom");
+            self::getXmlStream ()->writeAttribute ("xmlns:xhtml", "http://www.w3.org/1999/xhtml");
+            self::getXmlStream ()->writeAttribute ("xmlns:opds", "http://opds-spec.org/2010/catalog");
+            self::getXmlStream ()->writeAttribute ("xmlns:opensearch", "http://a9.com/-/spec/opensearch/1.1/");
+            self::getXmlStream ()->writeAttribute ("xmlns:dcterms", "http://purl.org/dc/terms/");
+            self::getXmlStream ()->startElement ("title");
+                self::getXmlStream ()->text ($page->title);
+            self::getXmlStream ()->endElement ();
+            if ($page->subtitle != "")
+            {
+                self::getXmlStream ()->startElement ("subtitle");
+                    self::getXmlStream ()->text ($page->subtitle);
+                self::getXmlStream ()->endElement ();
+            }
+            self::getXmlStream ()->startElement ("id");
+                if ($page->idPage)
+                {
+                    $idPage = $page->idPage;
+                    if (!is_null (GetUrlParam (DB))) $idPage = str_replace ("cops:", "cops:" . GetUrlParam (DB) . ":", $idPage);
+                    self::getXmlStream ()->text ($idPage);
+                }
+                else
+                {
+                    self::getXmlStream ()->text ($_SERVER['REQUEST_URI']);
+                }
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("updated");
+                self::getXmlStream ()->text (self::getUpdatedTime ());
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("icon");
+                self::getXmlStream ()->text ($page->favicon);
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("author");
+                self::getXmlStream ()->startElement ("name");
+                    self::getXmlStream ()->text ($page->authorName);
+                self::getXmlStream ()->endElement ();
+                self::getXmlStream ()->startElement ("uri");
+                    self::getXmlStream ()->text ($page->authorUri);
+                self::getXmlStream ()->endElement ();
+                self::getXmlStream ()->startElement ("email");
+                    self::getXmlStream ()->text ($page->authorEmail);
+                self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->endElement ();
+            $link = new LinkNavigation ("", "start", "Home");
+            self::renderLink ($link);
+            $link = new LinkNavigation ("?" . $_SERVER['QUERY_STRING'], "self");
+            self::renderLink ($link);
+            $urlparam = "?";
+            if (!is_null (GetUrlParam (DB))) $urlparam = addURLParameter ($urlparam, DB, GetUrlParam (DB));
+            if ($config['cops_generate_invalid_opds_stream'] == 0 || preg_match("/(MantanoReader|FBReader)/", $_SERVER['HTTP_USER_AGENT'])) {
+                // Good and compliant way of handling search
+                $urlparam = addURLParameter ($urlparam, "page", self::PAGE_OPENSEARCH);
+                $link = new Link ("feed.php" . $urlparam, "application/opensearchdescription+xml", "search", "Search here");
+            }
+            else
+            {
+                // Bad way, will be removed when OPDS client are fixed
+                $urlparam = addURLParameter ($urlparam, "query", "{searchTerms}");
+                $urlparam = str_replace ("%7B", "{", $urlparam);
+                $urlparam = str_replace ("%7D", "}", $urlparam);
+                $link = new Link ($config['cops_full_url'] . 'feed.php' . $urlparam, "application/atom+xml", "search", "Search here");
+            }
+            self::renderLink ($link);
+            if ($page->containsBook () && !is_null ($config['cops_books_filter']) && count ($config['cops_books_filter']) > 0) {
+                $Urlfilter = getURLParam ("tag", "");
+                foreach ($config['cops_books_filter'] as $lib => $filter) {
+                    $link = new LinkFacet ("?" . addURLParameter ($_SERVER['QUERY_STRING'], "tag", $filter), $lib, localize ("tagword.title"), $filter == $Urlfilter);
+                    self::renderLink ($link);
+                }
+            }
+    }
+
+    private function endXmlDocument () {
+        self::getXmlStream ()->endElement ();
+        self::getXmlStream ()->endDocument ();
+        return self::getXmlStream ()->outputMemory(true);
+    }
+
+    private function renderLink ($link) {
+        self::getXmlStream ()->startElement ("link");
+            self::getXmlStream ()->writeAttribute ("href", $link->href);
+            self::getXmlStream ()->writeAttribute ("type", $link->type);
+            if (!is_null ($link->rel)) {
+                self::getXmlStream ()->writeAttribute ("rel", $link->rel);
+            }
+            if (!is_null ($link->title)) {
+                self::getXmlStream ()->writeAttribute ("title", $link->title);
+            }
+            if (!is_null ($link->facetGroup)) {
+                self::getXmlStream ()->writeAttribute ("opds:facetGroup", $link->facetGroup);
+            }
+            if ($link->activeFacet) {
+                self::getXmlStream ()->writeAttribute ("opds:activeFacet", "true");
+            }
+        self::getXmlStream ()->endElement ();
+    }
+
+
+    private function renderEntry ($entry) {
+        self::getXmlStream ()->startElement ("title");
+            self::getXmlStream ()->text ($entry->title);
+        self::getXmlStream ()->endElement ();
+        self::getXmlStream ()->startElement ("updated");
+            self::getXmlStream ()->text (self::getUpdatedTime ());
+        self::getXmlStream ()->endElement ();
+        self::getXmlStream ()->startElement ("id");
+            self::getXmlStream ()->text ($entry->id);
+        self::getXmlStream ()->endElement ();
+        self::getXmlStream ()->startElement ("content");
+            self::getXmlStream ()->writeAttribute ("type", $entry->contentType);
+            if ($entry->contentType == "text") {
+                self::getXmlStream ()->text ($entry->content);
+            } else {
+                self::getXmlStream ()->writeRaw ($entry->content);
+            }
+        self::getXmlStream ()->endElement ();
+        foreach ($entry->linkArray as $link) {
+            self::renderLink ($link);
+        }
+
+        if (get_class ($entry) != "EntryBook") {
+            return;
+        }
+
+        foreach ($entry->book->getAuthors () as $author) {
+            self::getXmlStream ()->startElement ("author");
+                self::getXmlStream ()->startElement ("name");
+                    self::getXmlStream ()->text ($author->name);
+                self::getXmlStream ()->endElement ();
+                self::getXmlStream ()->startElement ("uri");
+                    self::getXmlStream ()->text ("feed.php" . $author->getUri ());
+                self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->endElement ();
+        }
+        foreach ($entry->book->getTags () as $category) {
+            self::getXmlStream ()->startElement ("category");
+                self::getXmlStream ()->writeAttribute ("term", $category->name);
+                self::getXmlStream ()->writeAttribute ("label", $category->name);
+            self::getXmlStream ()->endElement ();
+        }
+        if ($entry->book->getPubDate () != "") {
+            self::getXmlStream ()->startElement ("dcterms:issued");
+                self::getXmlStream ()->text (date ("Y-m-d", $entry->book->pubdate));
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("published");
+                self::getXmlStream ()->text (date ("Y-m-d", $entry->book->pubdate) . "T08:08:08Z");
+            self::getXmlStream ()->endElement ();
+        }
+
+        $lang = $entry->book->getLanguages ();
+        if (!empty ($lang)) {
+            self::getXmlStream ()->startElement ("dcterms:language");
+                self::getXmlStream ()->text ($lang);
+            self::getXmlStream ()->endElement ();
+        }
+
+    }
+
+    public function render ($page) {
+        global $config;
+        self::startXmlDocument ($page);
+        if ($page->isPaginated ())
+        {
+            self::getXmlStream ()->startElement ("opensearch:totalResults");
+                self::getXmlStream ()->text ($page->totalNumber);
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("opensearch:itemsPerPage");
+                self::getXmlStream ()->text ($config['cops_max_item_per_page']);
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("opensearch:startIndex");
+                self::getXmlStream ()->text (($page->n - 1) * $config['cops_max_item_per_page'] + 1);
+            self::getXmlStream ()->endElement ();
+            $prevLink = $page->getPrevLink ();
+            $nextLink = $page->getNextLink ();
+            if (!is_null ($prevLink)) {
+                self::renderLink ($prevLink);
+            }
+            if (!is_null ($nextLink)) {
+                self::renderLink ($nextLink);
+            }
+        }
+        foreach ($page->entryArray as $entry) {
+            self::getXmlStream ()->startElement ("entry");
+                self::renderEntry ($entry);
+            self::getXmlStream ()->endElement ();
+        }
+        return self::endXmlDocument ();
+    }
+}
+
diff --git a/www/OPDS_renderer.php.bak b/www/OPDS_renderer.php.bak
new file mode 100644 (file)
index 0000000..6795147
--- /dev/null
@@ -0,0 +1,264 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+require_once ("base.php");
+class OPDSRenderer
+{
+    const PAGE_OPENSEARCH = "8";
+    const PAGE_OPENSEARCH_QUERY = "9";
+
+    private $xmlStream = NULL;
+    private $updated = NULL;
+    
+    private function getUpdatedTime () {
+        if (is_null ($this->updated)) {
+            $this->updated = time();
+        }
+        return date (DATE_ATOM, $this->updated);
+    }
+    
+    private function getXmlStream () {
+        if (is_null ($this->xmlStream)) {
+            $this->xmlStream = new XMLWriter();
+            $this->xmlStream->openMemory();
+            $this->xmlStream->setIndent (true);
+        }
+        return $this->xmlStream;
+    }
+    
+    public function getOpenSearch () {
+        global $config;
+        $xml = new XMLWriter ();
+        $xml->openMemory ();
+        $xml->setIndent (true);
+        $xml->startDocument('1.0','UTF-8');
+            $xml->startElement ("OpenSearchDescription");
+                $xml->writeAttribute ("xmlns", "http://a9.com/-/spec/opensearch/1.1/");
+                $xml->startElement ("ShortName");
+                    $xml->text ("My catalog");
+                $xml->endElement ();
+                $xml->startElement ("Description");
+                    $xml->text ("Search for ebooks");
+                $xml->endElement ();
+                $xml->startElement ("InputEncoding");
+                    $xml->text ("UTF-8");
+                $xml->endElement ();
+                $xml->startElement ("OutputEncoding");
+                    $xml->text ("UTF-8");
+                $xml->endElement ();
+                $xml->startElement ("Image");
+                    $xml->writeAttribute ("type", "image/x-icon");
+                    $xml->writeAttribute ("width", "16");
+                    $xml->writeAttribute ("height", "16");
+                    $xml->text ($config['cops_icon']);
+                $xml->endElement ();
+                $xml->startElement ("Url");
+                    $xml->writeAttribute ("type", 'application/atom+xml');
+                    $urlparam = "?query={searchTerms}";
+                    $urlparam = str_replace ("%7B", "{", $urlparam);
+                    $urlparam = str_replace ("%7D", "}", $urlparam);
+                    $xml->writeAttribute ("template", $config['cops_full_url'] . 'feed.php' . $urlparam);
+                $xml->endElement ();
+                $xml->startElement ("Query");
+                    $xml->writeAttribute ("role", "example");
+                    $xml->writeAttribute ("searchTerms", "robot");
+                $xml->endElement ();
+            $xml->endElement ();
+        $xml->endDocument();
+        return $xml->outputMemory(true);
+    }
+    
+    private function startXmlDocument ($page) {
+        global $config;
+        self::getXmlStream ()->startDocument('1.0','UTF-8');
+        self::getXmlStream ()->startElement ("feed");
+            self::getXmlStream ()->writeAttribute ("xmlns", "http://www.w3.org/2005/Atom");
+            self::getXmlStream ()->writeAttribute ("xmlns:xhtml", "http://www.w3.org/1999/xhtml");
+            self::getXmlStream ()->writeAttribute ("xmlns:opds", "http://opds-spec.org/2010/catalog");
+            self::getXmlStream ()->writeAttribute ("xmlns:opensearch", "http://a9.com/-/spec/opensearch/1.1/");
+            self::getXmlStream ()->writeAttribute ("xmlns:dcterms", "http://purl.org/dc/terms/");
+            self::getXmlStream ()->startElement ("title");
+                self::getXmlStream ()->text ($page->title);
+            self::getXmlStream ()->endElement ();
+            if ($page->subtitle != "")
+            {
+                self::getXmlStream ()->startElement ("subtitle");
+                    self::getXmlStream ()->text ($page->subtitle);
+                self::getXmlStream ()->endElement ();
+            }
+            self::getXmlStream ()->startElement ("id");
+                if ($page->idPage)
+                {
+                    $idPage = $page->idPage;
+                    self::getXmlStream ()->text ($idPage);
+                }
+                else
+                {
+                    self::getXmlStream ()->text ($_SERVER['REQUEST_URI']);
+                }
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("updated");
+                self::getXmlStream ()->text (self::getUpdatedTime ());
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("icon");
+                self::getXmlStream ()->text ($page->favicon);
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("author");
+                self::getXmlStream ()->startElement ("name");
+                    self::getXmlStream ()->text (utf8_encode ("Sébastien Lucas"));
+                self::getXmlStream ()->endElement ();
+                self::getXmlStream ()->startElement ("uri");
+                    self::getXmlStream ()->text ("http://blog.slucas.fr");
+                self::getXmlStream ()->endElement ();
+                self::getXmlStream ()->startElement ("email");
+                    self::getXmlStream ()->text ("sebastien@slucas.fr");
+                self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->endElement ();
+            $link = new LinkNavigation ("", "start", "Home");
+            self::renderLink ($link);
+            $link = new LinkNavigation ("?" . $_SERVER['QUERY_STRING'], "self");
+            self::renderLink ($link);
+            $urlparam = "?page=" . self::PAGE_OPENSEARCH;
+            if ($config['cops_generate_invalid_opds_stream'] == 0 || preg_match("/(MantanoReader|FBReader)/", $_SERVER['HTTP_USER_AGENT'])) {
+                // Good and compliant way of handling search
+                $link = new Link ("feed.php" . $urlparam, "application/opensearchdescription+xml", "search", "Search here");
+            }
+            else
+            {
+                // Bad way, will be removed when OPDS client are fixed
+                $link = new Link ($config['cops_full_url'] . 'feed.php' . $urlparam, "application/atom+xml", "search", "Search here");
+            }
+            self::renderLink ($link);
+            if ($page->containsBook () && !is_null ($config['cops_books_filter']) && count ($config['cops_books_filter']) > 0) {
+                $Urlfilter = getURLParam ("tag", "");
+                foreach ($config['cops_books_filter'] as $lib => $filter) {
+                    $link = new LinkFacet ("?" . addURLParameter ($_SERVER['QUERY_STRING'], "tag", $filter), $lib, localize ("tagword.title"), $filter == $Urlfilter);
+                    self::renderLink ($link);
+                }
+            }
+    }
+        
+    private function endXmlDocument () {
+        self::getXmlStream ()->endElement ();
+        self::getXmlStream ()->endDocument ();
+        return self::getXmlStream ()->outputMemory(true);
+    }
+    
+    private function renderLink ($link) {
+        self::getXmlStream ()->startElement ("link");
+            self::getXmlStream ()->writeAttribute ("href", $link->href);
+            self::getXmlStream ()->writeAttribute ("type", $link->type);
+            if (!is_null ($link->rel)) {
+                self::getXmlStream ()->writeAttribute ("rel", $link->rel);
+            }
+            if (!is_null ($link->title)) {
+                self::getXmlStream ()->writeAttribute ("title", $link->title);
+            }
+            if (!is_null ($link->facetGroup)) {
+                self::getXmlStream ()->writeAttribute ("opds:facetGroup", $link->facetGroup);
+            }
+            if ($link->activeFacet) {
+                self::getXmlStream ()->writeAttribute ("opds:activeFacet", "true");
+            }
+        self::getXmlStream ()->endElement ();
+    }
+
+    
+    private function renderEntry ($entry) {
+        self::getXmlStream ()->startElement ("title");
+            self::getXmlStream ()->text ($entry->title);
+        self::getXmlStream ()->endElement ();
+        self::getXmlStream ()->startElement ("updated");
+            self::getXmlStream ()->text (self::getUpdatedTime ());
+        self::getXmlStream ()->endElement ();
+        self::getXmlStream ()->startElement ("id");
+            self::getXmlStream ()->text ($entry->id);
+        self::getXmlStream ()->endElement ();
+        self::getXmlStream ()->startElement ("content");
+            self::getXmlStream ()->writeAttribute ("type", $entry->contentType);
+            if ($entry->contentType == "text") {
+                self::getXmlStream ()->text ($entry->content);
+            } else {
+                self::getXmlStream ()->writeRaw ($entry->content);
+            }
+        self::getXmlStream ()->endElement ();
+        foreach ($entry->linkArray as $link) {
+            self::renderLink ($link);
+        }
+        
+        if (get_class ($entry) != "EntryBook") {
+            return;
+        }
+        
+        foreach ($entry->book->getAuthors () as $author) {
+            self::getXmlStream ()->startElement ("author");
+                self::getXmlStream ()->startElement ("name");
+                    self::getXmlStream ()->text ($author->name);
+                self::getXmlStream ()->endElement ();
+                self::getXmlStream ()->startElement ("uri");
+                    self::getXmlStream ()->text ("feed.php" . $author->getUri ());
+                self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->endElement ();
+        }
+        foreach ($entry->book->getTags () as $category) {
+            self::getXmlStream ()->startElement ("category");
+                self::getXmlStream ()->writeAttribute ("term", $category->name);
+                self::getXmlStream ()->writeAttribute ("label", $category->name);
+            self::getXmlStream ()->endElement ();
+        }
+        if ($entry->book->getPubDate () != "") {
+            self::getXmlStream ()->startElement ("dcterms:issued");
+                self::getXmlStream ()->text (date ("Y-m-d", $entry->book->pubdate));
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("published");
+                self::getXmlStream ()->text (date ("Y-m-d", $entry->book->pubdate) . "T08:08:08Z");
+            self::getXmlStream ()->endElement ();
+        }
+        
+        $lang = $entry->book->getLanguages ();
+        if (!empty ($lang)) {
+            self::getXmlStream ()->startElement ("dcterms:language");
+                self::getXmlStream ()->text ($lang);
+            self::getXmlStream ()->endElement ();
+        }
+
+    }
+    
+    public function render ($page) {
+        global $config;
+        self::startXmlDocument ($page);
+        if ($page->isPaginated ())
+        {
+            self::getXmlStream ()->startElement ("opensearch:totalResults");
+                self::getXmlStream ()->text ($page->totalNumber);
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("opensearch:itemsPerPage");
+                self::getXmlStream ()->text ($config['cops_max_item_per_page']);
+            self::getXmlStream ()->endElement ();
+            self::getXmlStream ()->startElement ("opensearch:startIndex");
+                self::getXmlStream ()->text (($page->n - 1) * $config['cops_max_item_per_page'] + 1);
+            self::getXmlStream ()->endElement ();
+            $prevLink = $page->getPrevLink ();
+            $nextLink = $page->getNextLink ();
+            if (!is_null ($prevLink)) {
+                self::renderLink ($prevLink);
+            }
+            if (!is_null ($nextLink)) {
+                self::renderLink ($nextLink);
+            }
+        }
+        foreach ($page->entryArray as $entry) {
+            self::getXmlStream ()->startElement ("entry");
+                self::renderEntry ($entry);
+            self::getXmlStream ()->endElement ();
+        }
+        return self::endXmlDocument ();
+    }
+}
diff --git a/www/README b/www/README
new file mode 100644 (file)
index 0000000..268e548
--- /dev/null
@@ -0,0 +1,89 @@
+= COPS =
+
+COPS stands for Calibre OPDS (and HTML) Php Server.
+
+COPS output is valid the unofficial OPDS validator : 
+http://opds-validator.appspot.com/
+
+= Why ? =
+
+In my opinion Calibre is a marvelous tool but is too big and has too much 
+dependencies to be used for its content server.
+
+That's the main reason why I coded this OPDS server. I needed a simple 
+tool to be installed on a small server (Seagate Dockstar in my case).
+
+I initially thought of Calibre2OPDS but as it generate static file no
+search was possible.
+
+Later I added an simple HTML catalog that should be usable on my Kobo.
+
+So COPS's main advantages are :
+ * No need for many dependencies.
+ * No need for a lot of CPU or RAM.
+ * Not much code.
+ * Search is available.
+ * With Dropbox / owncloud it's very easy to have an up to date OPDS server.
+ * It was fun to code.
+If you want to use the OPDS feed don't forget to specify feed.php at the end of your URL.
+
+= Prerequisites =
+
+1.     PHP 5.3 or 5.4 with GD image processing & SQLite3 support.
+2.     A web server with PHP support. I only tested with various version of Nginx.
+    Other people reported it working with Apache and Cherokee.
+3.  The path to a calibre library (metadata.db, format, & cover files).
+
+On any Debian base Linux you can use :
+ aptitude install php5-gd php5-sqlite
+
+= Install =
+
+1.  Extract the zip file to a folder in web space (visible to the web server).
+2.  If a first-time install, copy config_local.php.example to config_local.php
+3.  Edit config_local.php to match your config.
+4.  If needed add other configuration item from config_default.php
+
+If you choose to put your Calibre directory inside your web directory then you
+will have to edit /etc/nginx/mime.types to add this line :
+application/epub+zip epub;
+
+= Known problems =
+
+Not a lot ;)
+
+Please see https://github.com/seblucas/cops/issues for open issues
+
+= Need help =
+
+Please read https://github.com/seblucas/cops/wiki
+
+= Disclaimer =
+
+It's tested by me and many other users but there's still some little bugs around ;)
+
+= Credits = 
+
+ * All localization informations come from Calibre2OPDS (http://calibre2opds.com/)
+ * Locale message handling is inspired of http://www.mind-it.info/2010/02/22/a-simple-approach-to-localization-in-php/
+ * str_format function come from http://tmont.com/blargh/2010/1/string-format-in-php
+ * All icons come from Font Awesome : http://fortawesome.github.io/Font-Awesome/
+ * Thanks to all testers
+External libraries used : 
+ * JQuery : http://jquery.com/
+ * Magnific Popup : http://dimsemenov.com/plugins/magnific-popup/
+ * Php-epub-meta : https://github.com/splitbrain/php-epub-meta with some modification by me
+                   https://github.com/seblucas/php-epub-meta
+ * TbsZip : http://www.tinybutstrong.com/apps/tbszip/tbszip_help.html
+ * DoT.js : http://olado.github.io/doT/index.html
+ * PHPMailer : https://github.com/PHPMailer/PHPMailer
+ * js-lru : https://github.com/rsms/js-lru
+
+= Copyright & License =
+
+COPS - 2012-2013 (c) Sébastien Lucas <sebastien@slucas.fr>
+
+See COPYING and file headers for license info
+
diff --git a/www/README.md b/www/README.md
new file mode 100644 (file)
index 0000000..8f30b32
--- /dev/null
@@ -0,0 +1,6 @@
+cops
+====
+
+Calibre OPDS (and HTML) PHP Server : light alternative to Calibre content server / Calibre2OPDS
+
+See : http://blog.slucas.fr/en/oss/calibre-opds-php-server
diff --git a/www/about.html b/www/about.html
new file mode 100644 (file)
index 0000000..5c867d0
--- /dev/null
@@ -0,0 +1,21 @@
+<div class="bookpopup" style="max-width:700px;">\r
+<h1>About COPS</h1>\r
+<h2>Authors</h2>\r
+<p>COPS is developped and maintained by Sébastien Lucas.</p>\r
+\r
+<p>See full history on <a href="https://github.com/seblucas">Github</a> to check all authors.</p>\r
+\r
+<p>COPS use some external librairies, check README for the details.</p>\r
+<h2>Copyright</h2>\r
+<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.</p>\r
+\r
+<p>The complete content of license is provided in file COPYING within distribution and also available <a href="http://www.gnu.org/licenses/gpl-2.0.html">online</a>.</p>\r
+<h2>Contact</h2>\r
+<p>For more info please visit <a href="http://blog.slucas.fr/en/oss/calibre-opds-php-server">COPS Home Page</a></p>\r
+\r
+<p>You can also check <a href="http://www.mobileread.com/forums/showthread.php?t=170903">COPS's topic on MobileRead forum</a>.</p>\r
+<h2>Thanks</h2>\r
+<p>Thanks a lot to Kovid Goyal for <a href="http://calibre-ebook.com">Calibre</a>.</p>\r
+\r
+<p>And many thanks to all those who helped test COPS.</p>\r
+</div>
\ No newline at end of file
diff --git a/www/author.php b/www/author.php
new file mode 100644 (file)
index 0000000..9d5f0d8
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+require_once('base.php');
+
+class Author extends Base {
+    const ALL_AUTHORS_ID = "calibre:authors";
+    
+    const AUTHOR_COLUMNS = "authors.id as id, authors.name as name, authors.sort as sort, link.count as count";
+    const SQL_AUTHORS_BY_FIRST_LETTER = "select {0} from authors, (select author,count(*) as count from books_authors_link group by author) link where link.author = authors.id and authors.sort like ? order by authors.sort";
+    const SQL_ALL_AUTHORS = "select {0} from authors, (select author,count(*) as count from books_authors_link group by author) link where link.author = authors.id order by authors.sort ";
+    
+    public $id;
+    public $name;
+    public $sort;
+    
+    public function __construct($pid, $pname) {
+        $this->id = $pid;
+        $this->name = $pname;
+    }
+    
+    public function getUri () {
+        return "?page=".parent::PAGE_AUTHOR_DETAIL."&id=$this->id";
+    }
+    
+    public function getEntryId () {
+        return self::ALL_AUTHORS_ID.":".$this->id;
+    }
+    
+    public static function getEntryIdByLetter ($startingLetter) {
+        return self::ALL_AUTHORS_ID.":letter:".$startingLetter;
+    }
+
+    public static function getCount() {
+        $nAuthors = parent::getDb ()->query('select count(*) from authors')->fetchColumn(0);
+        $entry = new Entry (localize("authors.title"), self::ALL_AUTHORS_ID, 
+            str_format (localize("authors.alphabetical", $nAuthors), $nAuthors), "text", 
+            array ( new LinkNavigation ("?page=".parent::PAGE_AUTHORS_FIRST_LETTER)));
+        return $entry;
+    }
+    
+    public static function getAuthorsByFirstLetter($letter) {
+        if (!$letter) { $letter = ""; }
+        $len = mb_strlen($letter,'UTF-8')+1;
+        $result = parent::getDb ()->query('select substring(sort, 1, '.$len.') as title, count(distinct sort) sort_cnt,count(*) as count,min(id) min_id,min(sort) min_sort
+from authors
+where sort like "'.$letter.'%"
+group by substring(sort, 1, '.$len.')
+order by substring(sort, 1, '.$len.')');
+        $entryArray = array();
+        while ($post = $result->fetchObject ())
+        {
+            if ($post->count==1) {
+              $author = new Author ($post->min_id, $post->min_sort);
+              $title = $post->min_sort;
+              $entryid = $author->getEntryId();
+              $link = array ( new LinkNavigation ($author->getUri ()));
+            } elseif ($post->count > parent::maxItemsPerPage() && $post->sort_cnt>1) {
+              $page = parent::PAGE_AUTHORS_FIRST_LETTER;
+              $title= $post->title.'...';
+              $entryid = Author::getEntryIdByLetter ($post->title);
+              $link = array ( new LinkNavigation ("?page=".$page."&id=". rawurlencode ($post->title)));
+            } else {
+              $page = parent::PAGE_AUTHORS_STARTING_LETTERS;
+              $title = $post->title.'...';
+              $entryid = Author::getEntryIdByLetter ($post->title);
+              $link = array ( new LinkNavigation ("?page=".$page."&id=". rawurlencode ($post->title)));            
+            }
+            array_push ($entryArray, new Entry ($title, $entryid, 
+                str_format (localize("authorword", $post->count), $post->count), "text", 
+                $link));
+        }
+        return $entryArray;
+    }
+
+    
+    public static function getAuthorsByStartingLetter($letter) {
+        return self::getEntryArray (self::SQL_AUTHORS_BY_FIRST_LETTER, array ($letter . "%"));
+    }
+    
+    public static function getAllAuthors() {
+        return self::getEntryArray (self::SQL_ALL_AUTHORS, array ());
+    }
+    
+    public static function getEntryArray ($query, $params) {
+        list ($totalNumber, $result) = parent::executeQuery ($query, self::AUTHOR_COLUMNS, "", $params, -1);
+        $entryArray = array();
+        while ($post = $result->fetchObject ())
+        {
+            $author = new Author ($post->id, $post->sort);
+            array_push ($entryArray, new Entry ($post->sort, $author->getEntryId (), 
+                str_format (localize("bookword", $post->count), $post->count), "text", 
+                array ( new LinkNavigation ($author->getUri ()))));
+        }
+        return $entryArray;
+    }
+        
+    public static function getAuthorById ($authorId) {
+        $result = parent::getDb ()->prepare('select sort from authors where id = ?');
+        $result->execute (array ($authorId));
+        return new Author ($authorId, $result->fetchColumn (0));
+    }
+    
+    public static function getAuthorByBookId ($bookId) {
+        $result = parent::getDb ()->prepare('select authors.id as id, authors.sort as sort
+from authors, books_authors_link
+where author = authors.id
+and book = ?');
+        $result->execute (array ($bookId));
+        $authorArray = array ();
+        while ($post = $result->fetchObject ()) {
+            array_push ($authorArray, new Author ($post->id, $post->sort));
+        }
+        return $authorArray;
+    }
+}
diff --git a/www/base.php b/www/base.php
new file mode 100644 (file)
index 0000000..32f593f
--- /dev/null
@@ -0,0 +1,839 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+define ("VERSION", "0.6.1");
+date_default_timezone_set($config['default_timezone']);
+function getURLParam ($name, $default = NULL) {
+    if (!empty ($_GET) && isset($_GET[$name]) && $_GET[$name] != "") {
+        return $_GET[$name];
+    }
+    return $default;
+}
+
+function getCurrentOption ($option) {
+    global $config;
+    if (isset($_COOKIE[$option])) {
+        return $_COOKIE[$option];
+    }
+    if ($option == "style") {
+        return "default";
+    }
+    
+    if (isset($config ["cops_" . $option])) {
+        return $config ["cops_" . $option];
+    }
+    
+    return "";
+}
+
+function getCurrentCss () {
+    return "styles/style-" . getCurrentOption ("style") . ".css";
+}
+
+function getUrlWithVersion ($url) {
+    return $url . "?v=" . VERSION;
+}
+
+function xml2xhtml($xml) {
+    return preg_replace_callback('#<(\w+)([^>]*)\s*/>#s', create_function('$m', '
+        $xhtml_tags = array("br", "hr", "input", "frame", "img", "area", "link", "col", "base", "basefont", "param");
+        return in_array($m[1], $xhtml_tags) ? "<$m[1]$m[2] />" : "<$m[1]$m[2]></$m[1]>";
+    '), $xml);
+}
+
+function display_xml_error($error)
+{
+    $return .= str_repeat('-', $error->column) . "^\n";
+
+    switch ($error->level) {
+        case LIBXML_ERR_WARNING:
+            $return .= "Warning $error->code: ";
+            break;
+         case LIBXML_ERR_ERROR:
+            $return .= "Error $error->code: ";
+            break;
+        case LIBXML_ERR_FATAL:
+            $return .= "Fatal Error $error->code: ";
+            break;
+    }
+
+    $return .= trim($error->message) .
+               "\n  Line: $error->line" .
+               "\n  Column: $error->column";
+
+    if ($error->file) {
+        $return .= "\n  File: $error->file";
+    }
+
+    return "$return\n\n--------------------------------------------\n\n";
+}
+
+function are_libxml_errors_ok ()
+{
+    $errors = libxml_get_errors();
+    
+    foreach ($errors as $error) {
+        if ($error->code == 801) return false;
+    }
+    return true;
+}
+
+function html2xhtml ($html) {
+    $doc = new DOMDocument();
+    libxml_use_internal_errors(true);
+    
+    $doc->loadHTML('<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>' . 
+                        $html  . '</body></html>'); // Load the HTML
+    $output = $doc->saveXML($doc->documentElement); // Transform to an Ansi xml stream
+    $output = xml2xhtml($output);
+    if (preg_match ('#<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></meta></head><body>(.*)</body></html>#ms', $output, $matches)) {
+        $output = $matches [1]; // Remove <html><body>
+    }
+    /* 
+    // In case of error with summary, use it to debug
+    $errors = libxml_get_errors();
+
+    foreach ($errors as $error) {
+        $output .= display_xml_error($error);
+    }
+    */
+    
+    if (!are_libxml_errors_ok ()) $output = "HTML code not valid.";
+    
+    libxml_use_internal_errors(false);
+    return $output;
+}
+
+/**
+ * This method is a direct copy-paste from
+ * http://tmont.com/blargh/2010/1/string-format-in-php
+ */
+function str_format($format) {
+    $args = func_get_args();
+    $format = array_shift($args);
+    
+    preg_match_all('/(?=\{)\{(\d+)\}(?!\})/', $format, $matches, PREG_OFFSET_CAPTURE);
+    $offset = 0;
+    foreach ($matches[1] as $data) {
+        $i = $data[0];
+        $format = substr_replace($format, @$args[$i], $offset + $data[1] - 1, 2 + strlen($i));
+        $offset += strlen(@$args[$i]) - 2 - strlen($i);
+    }
+    
+    return $format;
+}
+
+/**
+ * This method is based on this page
+ * http://www.mind-it.info/2010/02/22/a-simple-approach-to-localization-in-php/
+ */
+function localize($phrase, $count=-1) {
+
+    if ($count == 0)
+        $phrase .= ".none";
+    if ($count == 1)
+        $phrase .= ".one";
+    if ($count > 1)
+        $phrase .= ".many";
+
+    /* Static keyword is used to ensure the file is loaded only once */
+    static $translations = NULL;
+    /* If no instance of $translations has occured load the language file */
+    if (is_null($translations)) {
+        $lang = "en";
+        if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
+        {
+            $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
+        }
+        $lang_file_en = NULL;
+        $lang_file = 'lang/Localization_' . $lang . '.json';
+        if (!file_exists($lang_file)) {
+            $lang_file = 'lang/' . 'Localization_en.json';
+        }
+        elseif ($lang != "en") {
+            $lang_file_en = 'lang/' . 'Localization_en.json';
+        }
+        $lang_file_content = file_get_contents($lang_file);
+        /* Load the language file as a JSON object and transform it into an associative array */
+        $translations = json_decode($lang_file_content, true);
+        if ($lang_file_en)
+        {
+            $lang_file_content = file_get_contents($lang_file_en);
+            $translations_en = json_decode($lang_file_content, true);
+            $translations = array_merge ($translations_en, $translations);
+        }
+    }
+    if (array_key_exists ($phrase, $translations)) {
+        return $translations[$phrase];
+    }
+    return $phrase;
+}
+
+function addURLParameter($urlParams, $paramName, $paramValue) {
+    $start = "";
+    if (preg_match ("#^\?(.*)#", $urlParams, $matches)) {
+        $start = "?";
+        $urlParams = $matches[1];
+    }
+    $params = array();
+    parse_str($urlParams, $params);
+    if (empty ($paramValue) && $paramValue != 0) {
+        unset ($params[$paramName]);
+    } else {
+        $params[$paramName] = $paramValue;   
+    }
+    return $start . http_build_query($params);
+}
+
+class Link
+{
+    const OPDS_THUMBNAIL_TYPE = "http://opds-spec.org/image/thumbnail";
+    const OPDS_IMAGE_TYPE = "http://opds-spec.org/image";
+    const OPDS_ACQUISITION_TYPE = "http://opds-spec.org/acquisition/open-access";
+    const OPDS_NAVIGATION_TYPE = "application/atom+xml;profile=opds-catalog;kind=navigation";
+    const OPDS_PAGING_TYPE = "application/atom+xml;profile=opds-catalog;kind=acquisition";
+    
+    public $href;
+    public $type;
+    public $rel;
+    public $title;
+    public $facetGroup;
+    public $activeFacet;
+    
+    public function __construct($phref, $ptype, $prel = NULL, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) {
+        $this->href = $phref;
+        $this->type = $ptype;
+        $this->rel = $prel;
+        $this->title = $ptitle;
+        $this->facetGroup = $pfacetGroup;
+        $this->activeFacet = $pactiveFacet;
+    }
+    
+    public function hrefXhtml () {
+        return $this->href;
+    }
+}
+
+class LinkNavigation extends Link
+{
+    public function __construct($phref, $prel = NULL, $ptitle = NULL) {
+        parent::__construct ($phref, Link::OPDS_NAVIGATION_TYPE, $prel, $ptitle);
+        if (!preg_match ("#^\?(.*)#", $this->href) && !empty ($this->href)) $this->href = "?" . $this->href;
+        if (preg_match ("/(bookdetail|getJSON).php/", $_SERVER["SCRIPT_NAME"])) {
+            $this->href = "index.php" . $this->href;
+        } else {
+            $this->href = $_SERVER["SCRIPT_NAME"] . $this->href;
+        }
+    }
+}
+
+class LinkFacet extends Link
+{
+    public function __construct($phref, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) {
+        parent::__construct ($phref, Link::OPDS_PAGING_TYPE, "http://opds-spec.org/facet", $ptitle, $pfacetGroup, $pactiveFacet);
+        $this->href = $_SERVER["SCRIPT_NAME"] . $this->href;
+    }
+}
+
+class Entry
+{
+    public $title;
+    public $id;
+    public $content;
+    public $contentType;
+    public $linkArray;
+    public $localUpdated;
+    private static $updated = NULL;
+    
+    public static $icons = array(
+        Author::ALL_AUTHORS_ID       => 'images/author.png',
+        Serie::ALL_SERIES_ID         => 'images/serie.png',
+        Book::ALL_RECENT_BOOKS_ID    => 'images/recent.png',
+        Tag::ALL_TAGS_ID             => 'images/tag.png',
+        Language::ALL_LANGUAGES_ID   => 'images/language.png',
+        "calibre:books$"             => 'images/allbook.png',
+        "calibre:books:letter"       => 'images/allbook.png'
+    );
+    
+    public function getUpdatedTime () {
+        if (!is_null ($this->localUpdated)) {
+            return date (DATE_ATOM, $this->localUpdated);
+        }
+        if (is_null (self::$updated)) {
+            self::$updated = time();
+        }
+        return date (DATE_ATOM, self::$updated);
+    }
+    
+    public function getContentArray () {
+        $navlink = "#";
+        foreach ($this->linkArray as $link) { 
+            if ($link->type != Link::OPDS_NAVIGATION_TYPE) { continue; }
+            
+            $navlink = $link->hrefXhtml ();
+        }
+        return array ( "title" => $this->title, "content" => $this->content, "navlink" => $navlink );
+    }
+    public function __construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray) {
+        global $config;
+        $this->title = $ptitle;
+        $this->id = $pid;
+        $this->content = $pcontent;
+        $this->contentType = $pcontentType;
+        $this->linkArray = $plinkArray;
+        
+        if ($config['cops_show_icons'] == 1)
+        {
+            foreach (self::$icons as $reg => $image)
+            {
+                if (preg_match ("/" . $reg . "/", $pid)) {
+                    array_push ($this->linkArray, new Link (getUrlWithVersion ($image), "image/png", Link::OPDS_THUMBNAIL_TYPE));
+                    break;
+                }
+            }
+        }
+        
+    }
+}
+
+class EntryBook extends Entry
+{
+    public $book;
+    
+    public function __construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray, $pbook) {
+        parent::__construct ($ptitle, $pid, $pcontent, $pcontentType, $plinkArray);
+        $this->book = $pbook;
+        $this->localUpdated = $pbook->timestamp;
+    }
+    
+    public function getContentArray () {
+        $entry = array ( "title" => $this->title);
+        $entry ["book"] = $this->book->getContentArray ();
+        return $entry;
+    }
+    
+    public function getCoverThumbnail () {
+        foreach ($this->linkArray as $link) {
+            if ($link->rel == Link::OPDS_THUMBNAIL_TYPE)
+                return $link->hrefXhtml ();
+        }
+        return null;
+    }
+    
+    public function getCover () {
+        foreach ($this->linkArray as $link) {
+            if ($link->rel == Link::OPDS_IMAGE_TYPE)
+                return $link->hrefXhtml ();
+        }
+        return null;
+    }
+}
+
+class Page
+{
+    public $title;
+    public $subtitle = "";
+    public $idPage;
+    public $idGet;
+    public $query;
+    public $favicon;
+    public $n;
+    public $book;
+    public $totalNumber = -1;
+    public $entryArray = array();
+    
+    public static function getPage ($pageId, $id, $query, $n)
+    {
+        switch ($pageId) {
+            case Base::PAGE_AUTHORS_FIRST_LETTER :
+                return new PageAllAuthorsLetter ($id, $query, $n);
+            case Base::PAGE_AUTHORS_STARTING_LETTERS :
+                return new PageAuthorsLetter ($id, $query, $n);
+            case Base::PAGE_AUTHOR_DETAIL :
+                return new PageAuthorDetail ($id, $query, $n);
+            case Base::PAGE_ALL_TAGS :
+                return new PageAllTags ($id, $query, $n);
+            case Base::PAGE_TAG_DETAIL :
+                return new PageTagDetail ($id, $query, $n);
+            case Base::PAGE_ALL_LANGUAGES :
+                return new PageAllLanguages ($id, $query, $n);
+            case Base::PAGE_LANGUAGE_DETAIL :
+                return new PageLanguageDetail ($id, $query, $n);             
+            case Base::PAGE_ALL_SERIES :
+                return new PageAllSeries ($id, $query, $n);
+            case Base::PAGE_SERIES_STARTING_LETTERS :
+                return new PageAllSeriesStartingLetters ($id, $query, $n);
+            case Base::PAGE_ALL_BOOKS :
+                return new PageAllBooks ($id, $query, $n);
+            case Base::PAGE_ALL_BOOKS_LETTER:
+                return new PageAllBooksLetter ($id, $query, $n);
+            case Base::PAGE_ALL_RECENT_BOOKS :
+                return new PageRecentBooks ($id, $query, $n);
+            case Base::PAGE_SERIE_DETAIL : 
+                return new PageSerieDetail ($id, $query, $n);
+            case Base::PAGE_OPENSEARCH_QUERY :
+                return new PageQueryResult ($id, $query, $n);
+            case Base::PAGE_BOOK_DETAIL :
+                return new PageBookDetail ($id, $query, $n);
+            case Base::PAGE_ABOUT :
+                return new PageAbout ($id, $query, $n);
+            case Base::PAGE_CUSTOMIZE : 
+                return new PageCustomize ($id, $query, $n);
+            default:
+                $page = new Page ($id, $query, $n);
+                $page->idPage = "cops:catalog";
+                return $page;
+        }
+    }
+    
+    public function __construct($pid, $pquery, $pn) {
+        global $config;
+        
+        $this->idGet = $pid;
+        $this->query = $pquery;
+        $this->n = $pn;
+        $this->favicon = $config['cops_icon'];
+    }
+    
+    public function InitializeContent () 
+    {
+        global $config;
+        $this->title = $config['cops_title_default'];
+        $this->subtitle = $config['cops_subtitle_default'];
+        array_push ($this->entryArray, Author::getCount());
+        $series = Serie::getCount();
+        if (!is_null ($series)) array_push ($this->entryArray, $series);
+        $tags = Tag::getCount();
+        if (!is_null ($tags)) array_push ($this->entryArray, $tags);
+        $languages = Language::getCount();
+        if (!is_null ($languages)) array_push ($this->entryArray, $languages);
+        $this->entryArray = array_merge ($this->entryArray, Book::getCount());
+    }
+
+    public function isPaginated ()
+    {
+        global $config;
+        return (getCurrentOption ("max_item_per_page") != -1 && 
+                $this->totalNumber != -1 && 
+                $this->totalNumber > getCurrentOption ("max_item_per_page"));
+    }
+    
+    public function getNextLink ()
+    {
+        global $config;
+        $currentUrl = $_SERVER['QUERY_STRING'];
+        $currentUrl = preg_replace ("/\&n=.*?$/", "", "?" . $_SERVER['QUERY_STRING']);
+        if (($this->n) * getCurrentOption ("max_item_per_page") < $this->totalNumber) {
+            return new LinkNavigation ($currentUrl . "&n=" . ($this->n + 1), "next", "Page suivante");
+        }
+        return NULL;
+    }
+    
+    public function getPrevLink ()
+    {
+        global $config;
+        $currentUrl = $_SERVER['QUERY_STRING'];
+        $currentUrl = preg_replace ("/\&n=.*?$/", "", "?" . $_SERVER['QUERY_STRING']);
+        if ($this->n > 1) {
+            return new LinkNavigation ($currentUrl . "&n=" . ($this->n - 1), "previous", "Page precedente");
+        }
+        return NULL;
+    }
+    
+    public function getMaxPage ()
+    {
+        global $config;
+        return ceil ($this->totalNumber / getCurrentOption ("max_item_per_page"));
+    }
+    
+    public function containsBook ()
+    {
+        if (count ($this->entryArray) == 0) return false;
+        if (get_class ($this->entryArray [0]) == "EntryBook") return true;
+        return false;
+    }
+
+}
+
+class PageAllAuthorsLetter extends Page
+{
+    public function InitializeContent () 
+    {
+        global $config;
+        
+        $this->idPage = Author::getEntryIdByLetter ($this->idGet);
+        $this->entryArray = Author::getAuthorsByFirstLetter ($this->idGet);
+        if ($this->idGet) {
+          $this->title = localize("authors.starting").' '.$this->idGet;
+        } else {
+          $this->title = localize("authors.title");
+        }
+    }
+}
+
+class PageAuthorsLetter extends Page
+{
+    public function InitializeContent () 
+    {
+        global $config;
+        
+        $this->idPage = Author::getEntryIdByLetter ($this->idGet);
+        $this->entryArray = Author::getAuthorsByStartingLetter ($this->idGet);
+        $this->title = str_format (localize ("splitByLetter.letter"), str_format (localize ("authorword", count ($this->entryArray)), count ($this->entryArray)), $this->idGet);
+    }
+}
+
+class PageAuthorDetail extends Page
+{
+    public function InitializeContent () 
+    {
+        $author = Author::getAuthorById ($this->idGet);
+        $this->idPage = $author->getEntryId ();
+        $this->title = $author->name;
+        list ($this->entryArray, $this->totalNumber) = Book::getBooksByAuthor ($this->idGet, $this->n);
+    }
+}
+
+class PageAllTags extends Page
+{
+    public function InitializeContent () 
+    {
+        $this->title = localize("tags.title");
+        $array = Tag::getAllTags();
+        asort($array);
+        $this->entryArray = $array;
+        $this->idPage = Tag::ALL_TAGS_ID;
+    }
+}
+
+class PageAllLanguages extends Page
+{
+    public function InitializeContent () 
+    {
+        $this->title = localize("languages.title");
+        $array = Language::getAllLanguages();
+        asort($array);
+        $this->entryArray = $array;
+        $this->idPage = Language::ALL_LANGUAGES_ID;
+    }
+}
+
+class PageTagDetail extends Page
+{
+    public function InitializeContent () 
+    {
+        $tag = Tag::getTagById ($this->idGet);
+        $this->idPage = $tag->getEntryId ();
+        $this->title = $tag->name;
+        list ($this->entryArray, $this->totalNumber) = Book::getBooksByTag ($this->idGet, $this->n);
+    }
+}
+
+class PageLanguageDetail extends Page
+{
+    public function InitializeContent () 
+    {
+        $language = Language::getLanguageById ($this->idGet);
+        $this->idPage = $language->getEntryId ();
+        $this->title = $language->lang_code;
+        list ($this->entryArray, $this->totalNumber) = Book::getBooksByLanguage ($this->idGet, $this->n);
+    }
+}
+
+class PageAllSeries extends Page
+{
+    public function InitializeContent () 
+    {
+        if ($this->idGet) {
+          $this->title = str_format (localize ("splitByLetter.letter"), str_format (localize ("series.title")), $this->idGet);
+        } else {
+          $this->title = localize("series.title");
+        }  
+        $this->entryArray = Serie::getAllSeries($this->idGet);
+        $this->idPage = Serie::getEntryIdByLetters($this->idGet);
+    }
+}
+
+class PageAllSeriesStartingLetters extends Page
+{
+    public function InitializeContent () 
+    {
+        $this->entryArray = Serie::getAllSeriesStartingLetters($this->idGet);
+        $this->title = str_format (localize ("splitByLetter.letter"), str_format (localize ("series.title")), $this->idGet);
+        $this->idPage = Serie::getEntryIdByLetters($this->idGet);
+    }
+}
+
+class PageSerieDetail extends Page
+{
+    public function InitializeContent () 
+    {
+        $serie = Serie::getSerieById ($this->idGet);
+        $this->title = $serie->name;
+        list ($this->entryArray, $this->totalNumber) = Book::getBooksBySeries ($this->idGet, $this->n);
+        $this->idPage = $serie->getEntryId ();
+    }
+}
+
+class PageAllBooks extends Page
+{
+    public function InitializeContent () 
+    {
+        $this->entryArray = Book::getAllBooks ($this->idGet);
+        if ($this->entryArray->count==1) {
+          $this->title = $this->idGet;
+        } elseif ($this->idGet) {
+          $this->title = str_format (localize ("splitByLetter.letter"), str_format (localize ("bookword.title")), $this->idGet);
+        } else {
+          $this->title = localize ("allbooks.title");
+        }  
+        $this->idPage = Book::ALL_BOOKS_ID;
+    }
+}
+
+class PageAllBooksLetter extends Page
+{
+    public function InitializeContent () 
+    {
+        list ($this->entryArray, $this->totalNumber) = Book::getBooksByStartingLetter ($this->idGet, $this->n);
+        $this->idPage = Book::getEntryIdByLetter ($this->idGet);
+        
+        $count = $this->totalNumber;
+        if ($count == -1)
+            $count = count ($this->entryArray);
+        
+        if ($count==1) {
+          $this->title = $this->idGet;
+        } else {
+          $this->title = str_format (localize ("splitByLetter.letter"), str_format (localize ("bookword", $count), $count), $this->idGet);
+        }  
+    }
+}
+
+class PageRecentBooks extends Page
+{
+    public function InitializeContent () 
+    {
+        $this->title = localize ("recent.title");
+        $this->entryArray = Book::getAllRecentBooks ();
+        $this->idPage = Book::ALL_RECENT_BOOKS_ID;
+    }
+}
+
+class PageQueryResult extends Page
+{
+    public function InitializeContent () 
+    {
+        global $config;
+        $this->title = str_format (localize ("search.result"), $this->query);
+        $currentPage = getURLParam ("current", NULL);
+        
+        switch ($currentPage) {
+            case Base::PAGE_AUTHORS_FIRST_LETTER :
+                $this->entryArray = Author::getAuthorsByStartingLetter ('%' . $this->query);
+                break;
+            default:
+                list ($this->entryArray, $this->totalNumber) = Book::getBooksByQuery ($this->query, $this->n);
+        }
+    }
+}
+
+class PageBookDetail extends Page
+{
+    public function InitializeContent () 
+    {
+        $this->book = Book::getBookById ($this->idGet);
+        $this->title = $this->book->title;
+    }
+}
+
+class PageAbout extends Page
+{
+    public function InitializeContent () 
+    {
+        $this->title = localize ("about.title");
+    }
+}
+
+class PageCustomize extends Page
+{
+    public function InitializeContent () 
+    {
+        global $config;
+        $this->title = localize ("customize.title");
+        $this->entryArray = array ();
+        
+        $use_fancybox = "";
+        if (getCurrentOption ("use_fancyapps") == 1) {
+            $use_fancybox = "checked='checked'";
+        }
+        $html_tag_filter = "";
+        if (getCurrentOption ("html_tag_filter") == 1) {
+            $html_tag_filter = "checked='checked'";
+        }
+        
+        
+        $content = "";
+        if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) {
+            $content .= '<select id="style" onchange="updateCookie (this);">';
+        }
+            foreach (glob ("styles/style-*.css") as $filename) {
+                if (preg_match ('/styles\/style-(.*?)\.css/', $filename, $m)) {
+                    $filename = $m [1];
+                }
+                $selected = "";
+                if (getCurrentOption ("style") == $filename) {
+                    if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) {
+                        $selected = "selected='selected'";
+                    } else {
+                        $selected = "checked='checked'";
+                    }
+                }
+                if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) {
+                    $content .= "<option value='{$filename}' {$selected}>{$filename}</option>";
+                } else {
+                    $content .= "<input type='radio' onchange='updateCookieFromCheckbox (this);' id='style-{$filename}' name='style' value='{$filename}' {$selected} /><label for='style-{$filename}'> {$filename} </label>";
+                }
+            }
+        if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) {
+            $content .= '</select>';
+        }
+        array_push ($this->entryArray, new Entry (localize ("customize.style"), "", 
+                                        $content, "text", 
+                                        array ()));
+        
+        $content = '<input type="checkbox" onchange="updateCookieFromCheckbox (this);" id="use_fancyapps" ' . $use_fancybox . ' />';
+        array_push ($this->entryArray, new Entry (localize ("customize.fancybox"), "", 
+                                        $content, "text", 
+                                        array ()));
+        $content = '<input type="number" onchange="updateCookie (this);" id="max_item_per_page" value="' . getCurrentOption ("max_item_per_page") . '" min="-1" max="1200" pattern="^[-+]?[0-9]+$" />';
+        array_push ($this->entryArray, new Entry (localize ("customize.paging"), "", 
+                                        $content, "text", 
+                                        array ()));
+        $content = '<input type="number" onchange="updateCookie (this);" id="max_books_pages" value="' . getCurrentOption ("max_books_pages") . '" min="-1" max="50" pattern="^[-+]?[0-9]+$" />';
+        array_push ($this->entryArray, new Entry (localize ("customize.pages"), "", 
+                                        $content, "text", 
+                                        array ()));
+        $content = '<input type="text" onchange="updateCookie (this);" id="email" value="' . getCurrentOption ("email") . '" />';
+        array_push ($this->entryArray, new Entry (localize ("customize.email"), "", 
+                                        $content, "text", 
+                                        array ()));
+        $content = '<input type="checkbox" onchange="updateCookieFromCheckbox (this);" id="html_tag_filter" ' . $html_tag_filter . ' />';
+        array_push ($this->entryArray, new Entry (localize ("customize.filter"), "", 
+                                        $content, "text", 
+                                        array ()));
+    }
+}
+
+
+abstract class Base
+{
+    const PAGE_INDEX = "index";
+    const PAGE_AUTHORS_FIRST_LETTER = "AUTH";
+    const PAGE_AUTHORS_STARTING_LETTERS = "AUTHST";
+    const PAGE_AUTHOR_DETAIL = "AUTHDET";
+    const PAGE_ALL_BOOKS = "BOOK";
+    const PAGE_ALL_BOOKS_LETTER = "BOOKST";
+    const PAGE_ALL_SERIES = "SER";
+    const PAGE_SERIES_STARTING_LETTERS = "SERST";
+    const PAGE_SERIE_DETAIL = "SERDET";
+    const PAGE_OPENSEARCH = "OPEN";
+    const PAGE_OPENSEARCH_QUERY = "OPENQ";
+    const PAGE_ALL_RECENT_BOOKS = "RECENT";
+    const PAGE_ALL_TAGS = "GENR";
+    const PAGE_TAG_DETAIL = "GENRDET";
+    const PAGE_BOOK_DETAIL = "BOOKDET";
+    const PAGE_ABOUT = "ABOUT";
+    const PAGE_ALL_LANGUAGES = "LANG";
+    const PAGE_LANGUAGE_DETAIL = "LANGDET";   
+    const PAGE_CUSTOMIZE = "OPTS"; 
+
+    const COMPATIBILITY_XML_ALDIKO = "aldiko";
+    
+    private static $db = NULL;
+
+    public static function getFileDirectory () {
+        global $config;
+        return $config['file_directory'];
+    }
+
+    public static function getDbHost () {
+        global $config;
+        return $config['db_host'];
+    }
+
+    public static function getDbUser () {
+        global $config;
+        return $config['db_user'];
+    }
+
+    public static function getDbPasswd () {
+        global $config;
+        return $config['db_passwd'];
+    }
+
+    public static function getDb () {
+        global $config;
+        if (is_null (self::$db)) {
+            try {
+                self::$db = new PDO('mysql:host='. self::getDbHost (), self::getDbUser(), self::getDbPasswd());
+                self::$db -> exec("set names utf8");
+            } catch (Exception $e) {
+                header("location: checkconfig.php?err=1");
+                exit();
+            }
+        }
+        return self::$db;
+    }
+    
+    public static function clearDb () {
+        self::$db = NULL;
+    }
+    
+    public static function executeQuery($query, $columns, $filter, $params, $n) {
+        global $config;
+        $totalResult = -1;
+        
+        if (getCurrentOption ("max_item_per_page") != -1 && $n != -1)
+        {
+            // First check total number of results
+            $query_str = str_format ($query, "count(*)", $filter);
+            $result = self::getDb ()->prepare ($query_str);
+            $result->execute ($params);
+            $totalResult = $result->fetchColumn (0);
+            
+            // Next modify the query and params
+            $query .= " limit ".(($n - 1) * getCurrentOption ("max_item_per_page")).", ".getCurrentOption ("max_item_per_page");
+        }
+
+        $query_str = str_format($query, $columns, $filter);
+        $result = self::getDb ()->prepare($query_str);
+        $result->execute ($params);
+        return array ($totalResult, $result);
+    }
+
+    public static function booksPages ()
+    {
+        global $config;
+        $result = getCurrentOption("max_books_pages");
+        if ($result=="") { $result = 10; }
+        return $result;
+    }
+    
+    public static function maxItemsPerPage()
+    {
+        global $config;
+        $result = getCurrentOption("max_item_per_page");
+        if ($result=="") { $result = 25; }
+        return $result;
+    }
+
+
+}
diff --git a/www/book.php b/www/book.php
new file mode 100644 (file)
index 0000000..4736e6a
--- /dev/null
@@ -0,0 +1,550 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+require_once('base.php');
+require_once('serie.php');
+require_once('author.php');
+require_once('tag.php');
+require_once('language.php');
+require_once('data.php');
+require_once('resources/php-epub-meta/epub.php');
+
+// Silly thing because PHP forbid string concatenation in class const
+define ('SQL_BOOKS_LEFT_JOIN', "left outer join comments on comments.book = books.id");
+define ('SQL_BOOKS_BY_FIRST_LETTER', "select {0} from books " . SQL_BOOKS_LEFT_JOIN . "
+                                                    where books.sort like ? order by books.sort");
+define ('SQL_BOOKS_BY_AUTHOR', "select {0} from books_authors_link, books " . SQL_BOOKS_LEFT_JOIN . "
+                                                    where books_authors_link.book = books.id and author = ? order by pubdate");
+define ('SQL_BOOKS_BY_SERIE', "select {0} from books_series_link, books " . SQL_BOOKS_LEFT_JOIN . "
+                                                    where books_series_link.book = books.id and series = ? order by series_index");
+define ('SQL_BOOKS_BY_TAG', "select {0} from books_tags_link, books " . SQL_BOOKS_LEFT_JOIN . "
+                                                    where books_tags_link.book = books.id and tag = ? order by sort");
+define ('SQL_BOOKS_BY_LANGUAGE', "select {0} from books_languages_link, books " . SQL_BOOKS_LEFT_JOIN . "
+                                                    where books_languages_link.book = books.id and lang_code = ? order by sort");
+define ('SQL_BOOKS_QUERY', "select {0} from books " . SQL_BOOKS_LEFT_JOIN . "
+                                                    where (exists (select null from authors, books_authors_link where book = books.id and author = authors.id and authors.name like ?) or title like ?) order by books.sort");
+define ('SQL_BOOKS_RECENT', "select {0} from books " . SQL_BOOKS_LEFT_JOIN . "
+                                                    where 1=1 order by timestamp desc limit ");
+
+class Book extends Base {
+    const ALL_BOOKS_UUID = "tag:book";
+    const ALL_BOOKS_ID = "calibre:books";
+    const ALL_RECENT_BOOKS_ID = "calibre:recentbooks";
+    const BOOK_COLUMNS = "books.id as id, books.title as title, text as comment, path, timestamp, pubdate, series_index, uuid, has_cover";
+    
+    const SQL_BOOKS_LEFT_JOIN = SQL_BOOKS_LEFT_JOIN;
+    const SQL_BOOKS_BY_FIRST_LETTER = SQL_BOOKS_BY_FIRST_LETTER;
+    const SQL_BOOKS_BY_AUTHOR = SQL_BOOKS_BY_AUTHOR;
+    const SQL_BOOKS_BY_SERIE = SQL_BOOKS_BY_SERIE;
+    const SQL_BOOKS_BY_TAG = SQL_BOOKS_BY_TAG;
+    const SQL_BOOKS_BY_LANGUAGE = SQL_BOOKS_BY_LANGUAGE;
+    const SQL_BOOKS_QUERY = SQL_BOOKS_QUERY;
+    const SQL_BOOKS_RECENT = SQL_BOOKS_RECENT;
+
+    public $id;
+    public $title;
+    public $timestamp;
+    public $pubdate;
+    public $path;
+    public $uuid;
+    public $hasCover;
+    public $relativePath;
+    public $seriesIndex;
+    public $comment;
+    public $datas = NULL;
+    public $authors = NULL;
+    public $serie = NULL;
+    public $tags = NULL;
+    public $languages = NULL;
+    public $format = array ();
+
+    
+    public function __construct($line) {
+        global $config;
+        $this->id = $line->id;
+        $this->title = $line->title;
+        $this->timestamp = strtotime ($line->timestamp);
+        $this->pubdate = strtotime ($line->pubdate);
+        $this->path = Base::getFileDirectory () . $line->path;
+        $this->relativePath = $line->path;
+        $this->seriesIndex = $line->series_index;
+        $this->comment = $line->comment;
+        $this->uuid = $line->uuid;
+        $this->hasCover = $line->has_cover;
+        if (!file_exists ($this->getFilePath ("jpg"))) {
+            // double check
+            $this->hasCover = 0;
+        }
+    }
+        
+    public function getEntryId () {
+        return self::ALL_BOOKS_UUID.":".$this->id;
+    }
+    
+    public static function getEntryIdByLetter ($startingLetter) {
+        return self::ALL_BOOKS_ID.":letter:".$startingLetter;
+    }
+    
+    public function getUri () {
+        return "?page=".parent::PAGE_BOOK_DETAIL."&id=$this->id";
+    }
+    
+    public function getContentArray () {
+        global $config;
+        $i = 0;
+        $preferedData = array ();
+        foreach ($config['cops_prefered_format'] as $format)
+        {
+            if ($i == 2) { break; }
+            if ($data = $this->getDataFormat ($format)) {
+                $i++;
+                array_push ($preferedData, array ("url" => $data->getHtmlLink (), "name" => $format));
+            }
+        }
+        $serie = $this->getSerie ();
+        if (is_null ($serie)) {
+            $sn = "";
+            $scn = "";
+            $su = "";
+        } else {
+            $sn = $serie->name;
+            $scn = str_format (localize ("content.series.data"), $this->seriesIndex, $serie->name);
+            $link = new LinkNavigation ($serie->getUri ());
+            $su = $link->hrefXhtml ();
+        }
+        
+        return array ("id" => $this->id,
+                      "hasCover" => $this->hasCover,
+                      "preferedData" => $preferedData,
+                      "pubDate" => $this->getPubDate (),
+                      "languagesName" => $this->getLanguages (),
+                      "authorsName" => $this->getAuthorsName (),
+                      "tagsName" => $this->getTagsName (),
+                      "seriesName" => $sn,
+                      "seriesIndex" => $this->seriesIndex,
+                      "seriesCompleteName" => $scn,
+                      "seriesurl" => $su);  
+    
+    }
+    public function getFullContentArray () {
+        global $config;
+        $out = $this->getContentArray ();
+        
+        $out ["coverurl"] = Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL)->hrefXhtml ();
+        $out ["thumbnailurl"] = Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL, NULL, $config['cops_html_thumbnail_height'] * 2)->hrefXhtml ();
+        $out ["content"] = $this->getComment (false);
+        $out ["datas"] = array ();
+        $dataKindle = $this->GetMostInterestingDataToSendToKindle ();
+        foreach ($this->getDatas() as $data) {
+            if ($data->format=="FB2.ZIP") { $dataformat = "FB2*"; } else { $dataformat = $data->format; }
+            $tab = array ("id" => $data->id, "format" => $dataformat, "url" => $data->getHtmlLink (), "mail" => 0);
+            if (!empty ($config['cops_mail_configuration']) && !is_null ($dataKindle) && $data->id == $dataKindle->id) {
+                $tab ["mail"] = 1;
+            }
+            array_push ($out ["datas"], $tab);
+        }
+        $out ["authors"] = array ();
+        foreach ($this->getAuthors () as $author) {
+            $link = new LinkNavigation ($author->getUri ());
+            array_push ($out ["authors"], array ("name" => $author->name, "url" => $link->hrefXhtml ()));
+        }
+        $out ["tags"] = array ();
+        foreach ($this->getTags () as $tag) {
+            $link = new LinkNavigation ($tag->getUri ());
+            array_push ($out ["tags"], array ("name" => $tag->name, "url" => $link->hrefXhtml ()));
+        }
+        ;
+        return $out;
+    }
+    
+    public function getDetailUrl ($permalink = false) {
+        global $config;
+        $urlParam = $this->getUri ();
+        return 'index.php' . $urlParam; 
+    }
+    
+    public function getTitle () {
+        return $this->title;
+    }
+    
+    public function getAuthors () {
+        if (is_null ($this->authors)) {
+            $this->authors = Author::getAuthorByBookId ($this->id);
+        }
+        return $this->authors;
+    }
+    
+    public static function getFilterString () {
+        $filter = getURLParam ("tag", NULL);
+        if (empty ($filter)) return "";
+        
+        $exists = true;
+        if (preg_match ("/^!(.*)$/", $filter, $matches)) {
+            $exists = false;
+            $filter = $matches[1];    
+        }
+        
+        $result = "exists (select null from books_tags_link, tags where books_tags_link.book = books.id and books_tags_link.tag = tags.id and tags.name = '" . $filter . "')";
+        
+        if (!$exists) {
+            $result = "not " . $result;
+        }
+    
+        return "and " . $result;
+    }
+    
+    public function getAuthorsName () {
+        return implode (", ", array_map (function ($author) { return $author->name; }, $this->getAuthors ()));
+    }
+    
+    public function getSerie () {
+        if (is_null ($this->serie)) {
+            $this->serie = Serie::getSerieByBookId ($this->id);
+        }
+        return $this->serie;
+    }
+    
+    public function getLanguages () {
+        $lang = array ();
+        $result = parent::getDb ()->prepare('select languages.lang_code
+                from books_languages_link, languages
+                where books_languages_link.lang_code = languages.id
+                and book = ?
+                order by item_order');
+        $result->execute (array ($this->id));
+        while ($post = $result->fetchObject ())
+        {
+            array_push ($lang, Language::getLanguageString($post->lang_code));
+        }
+        return implode (", ", $lang);
+    }
+    
+    public function getTags () {
+        if (is_null ($this->tags)) {
+            $this->tags = array ();
+            
+            $result = parent::getDb ()->prepare('select tags.id as id, name
+                from books_tags_link, tags
+                where tag = tags.id
+                and book = ?
+                order by name');
+            $result->execute (array ($this->id));
+            while ($post = $result->fetchObject ())
+            {
+                array_push ($this->tags, new Tag ($post->id, Tag::getTagString ($post->name)));
+            }
+        }
+        return $this->tags;
+    }
+    
+    public function getDatas ()
+    {
+        if (is_null ($this->datas)) {
+            $this->datas = array ();
+        
+            $result = parent::getDb ()->prepare('select id, format, name
+    from data where book = ?');
+            $result->execute (array ($this->id));
+            
+            while ($post = $result->fetchObject ())
+            {
+                array_push ($this->datas, new Data ($post, $this));
+            }
+        }
+        return $this->datas;
+    }
+       
+       public function GetMostInterestingDataToSendToKindle ()
+       {
+               $bestFormatForKindle = array ("EPUB", "PDF", "MOBI");
+               $bestRank = -1;
+               $bestData = NULL;
+               foreach ($this->getDatas () as $data) {
+                       $key = array_search ($data->format, $bestFormatForKindle);
+                       if ($key !== false && $key > $bestRank) {
+                               $bestRank = $key;
+                               $bestData = $data;
+                       }
+               }
+               return $bestData;
+       }
+    
+    public function getDataById ($idData)
+    {
+        foreach ($this->getDatas () as $data) {
+            if ($data->id == $idData) {
+                return $data;
+            }
+        }
+        return NULL;
+    }
+
+    
+    public function getTagsName () {
+        return implode (", ", array_map (function ($tag) { return $tag->name; }, $this->getTags ()));
+    }
+    
+    public function getPubDate () {
+        if (is_null ($this->pubdate) || ($this->pubdate <= -58979923200)) {
+            return "";
+        }
+        else {
+            return date ("Y", $this->pubdate);
+        }
+    }
+    
+    public function getComment ($withSerie = true) {
+        $addition = "";
+        $se = $this->getSerie ();
+        if (!is_null ($se) && $withSerie) {
+            $addition = $addition . "<strong>" . localize("content.series") . "</strong>" . str_format (localize ("content.series.data"), $this->seriesIndex, htmlspecialchars ($se->name)) . "<br />\n";
+        }
+        if (preg_match ("/<\/(div|p|a|span)>/", $this->comment))
+        {
+            return $addition . html2xhtml ($this->comment);
+        }
+        else
+        {
+            return $addition . htmlspecialchars ($this->comment);
+        }
+    }
+    
+    public function getDataFormat ($format) {
+        foreach ($this->getDatas () as $data)
+        {
+            if ($data->format == $format)
+            {
+                return $data;
+            }
+        }
+        return NULL;
+    }
+    
+    public function getFilePath ($extension, $idData = NULL, $relative = false)
+    {
+        $file = NULL;
+        if ($extension == "jpg")
+        {
+            $file = "cover.jpg";
+        }
+        else
+        {
+            $data = $this->getDataById ($idData);
+            if (!$data) return NULL;
+            $file = $data->name . "." . strtolower ($data->format);
+        }
+
+        if ($relative)
+        {
+            return $this->relativePath."/".$file;
+        }
+        else
+        {
+            return $this->path."/".$file;
+        }
+    }
+    
+    public function getUpdatedEpub ($idData)
+    {
+        global $config;
+        $data = $this->getDataById ($idData);
+            
+        try
+        {
+            $epub = new EPub ($data->getLocalPath ());
+            
+            $epub->Title ($this->title);
+            $authorArray = array ();
+            foreach ($this->getAuthors() as $author) {
+                $authorArray [$author->sort] = $author->name;
+            }
+            $epub->Authors ($authorArray);
+            $epub->Language ($this->getLanguages ());
+            $epub->Description ($this->getComment (false));
+            $epub->Subjects ($this->getTagsName ());
+            $epub->Cover2 ($this->getFilePath ("jpg"), "image/jpeg");
+            $epub->Calibre ($this->uuid);
+            $se = $this->getSerie ();
+            if (!is_null ($se)) {
+                $epub->Serie ($se->name);
+                $epub->SerieIndex ($this->seriesIndex);
+            }
+            if ($config['cops_provide_kepub'] == "1"  && preg_match("/Kobo/", $_SERVER['HTTP_USER_AGENT'])) {
+                $epub->updateForKepub ();
+            }
+            $epub->download ($data->getUpdatedFilenameEpub ());
+        }
+        catch (Exception $e)
+        {
+            echo "Exception : " . $e->getMessage();
+        }
+    }
+    
+    public function getLinkArray ()
+    {
+        global $config;
+        $linkArray = array();
+        
+        if ($this->hasCover)
+        {
+            array_push ($linkArray, Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL));
+            
+            array_push ($linkArray, Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL));
+        }
+        
+        foreach ($this->getDatas () as $data)
+        {
+            if ($data->isKnownType ())
+            {
+                array_push ($linkArray, $data->getDataLink (Link::OPDS_ACQUISITION_TYPE, "Download"));
+            }
+        }
+                
+        foreach ($this->getAuthors () as $author) {
+            array_push ($linkArray, new LinkNavigation ($author->getUri (), "related", str_format (localize ("bookentry.author"), localize ("splitByLetter.book.other"), $author->name)));
+        }
+        
+        $serie = $this->getSerie ();
+        if (!is_null ($serie)) {
+            array_push ($linkArray, new LinkNavigation ($serie->getUri (), "related", str_format (localize ("content.series.data"), $this->seriesIndex, $serie->name)));
+        }
+        
+        return $linkArray;
+    }
+
+    
+    public function getEntry () {    
+        return new EntryBook ($this->getTitle (), $this->getEntryId (), 
+            $this->getComment (), "text/html", 
+            $this->getLinkArray (), $this);
+    }
+    
+    public static function getBookCount() {
+        global $config;
+        $nBooks = parent::getDb ()->query('select count(*) from books')->fetchColumn(0);
+        return $nBooks;
+    }
+
+    public static function getCount() {
+        global $config;
+        $nBooks = parent::getDb ()->query('select count(*) from books')->fetchColumn(0);
+        $result = array();
+        $entry = new Entry (localize ("allbooks.title"), 
+                          self::ALL_BOOKS_ID, 
+                          str_format (localize ("allbooks.alphabetical", $nBooks), $nBooks), "text", 
+                          array ( new LinkNavigation ("?page=".parent::PAGE_ALL_BOOKS)));
+        array_push ($result, $entry);
+        $entry = new Entry (localize ("recent.title"), 
+                          self::ALL_RECENT_BOOKS_ID, 
+                          str_format (localize ("recent.list"), $config['cops_recentbooks_limit']), "text", 
+                          array ( new LinkNavigation ("?page=".parent::PAGE_ALL_RECENT_BOOKS)));
+        array_push ($result, $entry);
+        return $result;
+    }
+        
+    public static function getBooksByAuthor($authorId, $n) {
+        return self::getEntryArray (self::SQL_BOOKS_BY_AUTHOR, array ($authorId), $n);
+    }
+
+    
+    public static function getBooksBySeries($serieId, $n) {
+        return self::getEntryArray (self::SQL_BOOKS_BY_SERIE, array ($serieId), $n);
+    }
+    
+    public static function getBooksByTag($tagId, $n) {
+        return self::getEntryArray (self::SQL_BOOKS_BY_TAG, array ($tagId), $n);
+    }
+    
+    public static function getBooksByLanguage($languageId, $n) {
+        return self::getEntryArray (self::SQL_BOOKS_BY_LANGUAGE, array ($languageId), $n);
+    }
+
+    public static function getBookById($bookId) {
+        $result = parent::getDb ()->prepare('select ' . self::BOOK_COLUMNS . '
+from books ' . self::SQL_BOOKS_LEFT_JOIN . '
+where books.id = ?');
+        $result->execute (array($bookId));
+        while ($post = $result->fetchObject ())
+        {
+            $book = new Book ($post);
+            return $book;
+        }
+        return NULL;
+    }
+    
+    public static function getBookByDataId($dataId) {
+        $result = parent::getDb ()->prepare('select ' . self::BOOK_COLUMNS . ', data.name, data.format
+from data, books ' . self::SQL_BOOKS_LEFT_JOIN . '
+where data.book = books.id and data.id = ?');
+        $result->execute (array ($dataId));
+        while ($post = $result->fetchObject ())
+        {
+            $book = new Book ($post);
+            $data = new Data ($post, $book);
+            $data->id = $dataId;
+            $book->datas = array ($data);
+            return $book;
+        }
+        return NULL;
+    }
+    
+    public static function getBooksByQuery($query, $n) {
+        return self::getEntryArray (self::SQL_BOOKS_QUERY, array ("%" . $query . "%", "%" . $query . "%"), $n);
+    }
+    
+    public static function getAllBooks($letters) {
+        if (!$letters) { $letters=''; }
+        $len = mb_strlen($letters,'UTF-8')+1;
+        $result = parent::getDb ()->query('select substr(sort, 1, '.$len.') as title, count(distinct sort) sort_cnt,count(*) as count, min(id) min_id, min(sort) min_sort
+from books 
+where sort like "'.$letters.'%"
+group by substr(sort, 1, '.$len.')
+order by substr(sort, 1, '.$len.')');
+        $entryArray = array();
+        while ($post = $result->fetchObject ())
+        { 
+          if ($post->count == 1) {
+            array_push ($entryArray, new Entry ($post->min_sort, Book::getEntryIdByLetter ($post->min_sort), 
+                str_format (localize("bookword", $post->count), $post->count), "text", 
+                array ( new LinkNavigation ("?page=".parent::PAGE_BOOK_DETAIL."&id=". rawurlencode ($post->min_id)))));
+          } elseif ($post->count>parent::booksPages()*parent::maxItemsPerPage() && $post->sort_cnt>1) {
+            array_push ($entryArray, new Entry ($post->title.'...', Book::getEntryIdByLetter ($post->title), 
+                str_format (localize("bookword", $post->count), $post->count), "text", 
+                array ( new LinkNavigation ("?page=".parent::PAGE_ALL_BOOKS."&id=". rawurlencode ($post->title)))));
+          } else {
+            array_push ($entryArray, new Entry ($post->title.'...', Book::getEntryIdByLetter ($post->title), 
+                str_format (localize("bookword", $post->count), $post->count), "text", 
+                array ( new LinkNavigation ("?page=".parent::PAGE_ALL_BOOKS_LETTER."&id=". rawurlencode ($post->title)))));
+          }      
+        }
+        return $entryArray;
+    }
+    
+    public static function getBooksByStartingLetter($letter, $n) {
+        return self::getEntryArray (self::SQL_BOOKS_BY_FIRST_LETTER, array ($letter . "%"), $n);
+    }
+    
+    public static function getEntryArray ($query, $params, $n) {
+        list ($totalNumber, $result) = parent::executeQuery ($query, self::BOOK_COLUMNS, self::getFilterString (), $params, $n);
+        $entryArray = array();
+        while ($post = $result->fetchObject ())
+        {
+            $book = new Book ($post);
+            array_push ($entryArray, $book->getEntry ());
+        }
+        return array ($entryArray, $totalNumber);
+    }
+
+    
+    public static function getAllRecentBooks() {
+        global $config;
+        list ($entryArray, $totalNumber) = self::getEntryArray (self::SQL_BOOKS_RECENT . $config['cops_recentbooks_limit'], array (), -1);
+        return $entryArray;
+    }
+
+}
diff --git a/www/checkconfig.php b/www/checkconfig.php
new file mode 100644 (file)
index 0000000..bd92258
--- /dev/null
@@ -0,0 +1,103 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) Configuration check
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ *
+ */
+    require_once ("config.php");
+    require_once ("base.php");
+    
+    header ("Content-Type:text/html; charset=UTF-8");
+    
+    $err = getURLParam ("err", -1);
+    $error = NULL;
+    switch ($err) {
+        case 1 :
+            $error = "Database error";
+            break;
+    }
+
+?>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>COPS Configuration Check</title>
+    <link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion(getCurrentCss ()) ?>" media="screen" />
+</head>
+<body>
+<div class="container">
+    <header>
+        <div class="headcenter">
+            <h1>COPS Configuration Check</h1>
+        </div>
+    </header>
+    <div id="content" style="display: none;"></div>
+    <section>
+        <?php
+        if (!is_null ($error)) {
+        ?>
+        <article class="frontpage">
+            <h2>You've been redirected because COPS is not configured properly</h2>
+            <h4><?php echo $error ?></h4>
+        </article>
+        <?php
+        }
+        ?>
+        <article class="frontpage">
+            <h2>Check if GD is properly installed and loaded</h2>
+            <h4>
+            <?php 
+            if (extension_loaded('gd') && function_exists('gd_info')) {
+                echo "OK";
+            } else {
+                echo "Please install the php5-gd extension and make sure it's enabled";
+            }
+            ?>
+            </h4>
+        </article>
+        <article class="frontpage">
+            <h2>Check if MySQL is properly installed and loaded</h2>
+            <h4>
+            <?php 
+            if (extension_loaded('pdo_mysql')) {
+                echo "OK";
+            } else {
+                echo "Please install the php5-mysql extension and make sure it's enabled";
+            }
+            ?>
+            </h4>
+        </article>
+        <article class="frontpage">
+            <h2>Check if libxml is properly installed and loaded</h2>
+            <h4>
+            <?php 
+            if (extension_loaded('libxml')) {
+                echo "OK";
+            } else {
+                echo "Please make sure libxml is enabled";
+            }
+            ?>
+            </h4>
+        </article>
+        <article class="frontpage">
+            <h2>Check if database can be opened with PHP</h2>
+            <h4>
+            <?php 
+            try {
+                $db = new PDO('mysql:'. Base::getDbHost (), Base::getDbUser(), Base::getDbPasswd());
+                echo "Database OK";
+            } catch (Exception $e) {
+                echo "If the database is readable, check your php configuration. Exception detail : " . $e;
+            }
+            ?>
+            </h4>
+        </article>
+    </section>
+    <footer></footer>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/www/config.php b/www/config.php
new file mode 100644 (file)
index 0000000..ba70f9b
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+    require_once 'config_default.php';
+    if (file_exists('config_local.php'))
+        require_once 'config_local.php';
diff --git a/www/config_default.php b/www/config_default.php
new file mode 100644 (file)
index 0000000..7005178
--- /dev/null
@@ -0,0 +1,198 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+    if (!isset($config))
+        $config = array();
+  
+    /*
+     * The directory containing calibre's metadata.db file, with sub-directories
+     * containing all the formats.
+     * BEWARE : it has to end with a /
+     * You can enable multiple database with this notation instead of a simple string :
+     * $config['calibre_directory'] = array ("My database name" => "/home/directory/calibre1/", "My other database name" => "/home/directory/calibre2/");
+     */
+    $config['file_directory'] = './';
+    
+    /*
+     * SPECIFIC TO NGINX
+     * The internal directory set in nginx config file
+     * Leave empty if you don't know what you're doing
+     */
+    $config['calibre_internal_directory'] = ''; 
+
+    /*
+     * Full URL prefix (with trailing /)
+     * usefull especially for Opensearch where a full URL is sometimes required
+     * For example Mantano requires it.
+     */
+    $config['cops_full_url'] = ''; 
+    
+    /*
+     * Number of recent books to show
+     */
+    $config['cops_recentbooks_limit'] = '50'; 
+    
+    /*
+     * Catalog's title
+     */
+    $config['cops_title_default'] = "COPS";
+
+    /*
+     * Catalog's subtitle
+     */
+    $config['cops_subtitle_default'] = ""; 
+    
+    /*
+     * Wich header to use when downloading books outside the web directory
+     * Possible values are :
+     *   X-Accel-Redirect   : For Nginx
+     *   X-Sendfile         : For Lightttpd or Apache (with mod_xsendfile)
+     *   No value (default) : Let PHP handle the download
+     */
+    $config['cops_x_accel_redirect'] = "";
+    
+    /*
+     * Height of thumbnail image for OPDS
+     */
+    $config['cops_opds_thumbnail_height'] = "70";
+    
+    /*
+     * Height of thumbnail image for HTML
+     */
+    $config['cops_html_thumbnail_height'] = "164";
+
+    /*
+     * Icon for both OPDS and HTML catalog
+     * Note that this has to be a real icon (.ico)
+     */
+    $config['cops_icon'] = "favicon.ico";
+
+    /*
+     * Show icon for authors, series, tags and books on OPDS feed
+     *  1 : enable
+     *  0 : disable
+     */
+    $config['cops_show_icons'] = "1";
+    
+    /*
+     * Default timezone 
+     * Check following link for other timezones :
+     * http://www.php.net/manual/en/timezones.php
+     */
+    $config['default_timezone'] = "Europe/Moscow";
+    
+    /*
+     * Prefered format for HTML catalog
+     * The two first will be displayed in book entries
+     * The other only appear in book detail
+     */
+    $config['cops_prefered_format'] = array ("EPUB", "PDF", "AZW3", "AZW", "MOBI", "CBR", "CBZ");
+    
+    /*
+     * use URL rewriting for downloading of ebook in HTML catalog
+     * See Github wiki for more information
+     *  1 : enable
+     *  0 : disable
+     */
+    $config['cops_use_url_rewriting'] = "0";
+    
+    /*
+     * generate a invalid OPDS stream to allow bad OPDS client to use search
+     * Example of non compliant OPDS client : FBReader (was working in May 2012), Moon+ Reader
+     * Example of good OPDS client : Mantano
+     *  1 : enable support for non compliant OPDS client
+     *  0 : always generate valid OPDS code
+     */
+    $config['cops_generate_invalid_opds_stream'] = "0"; 
+    
+    /*
+     * Max number of items per page
+     * -1 unlimited
+     */
+    $config['cops_max_item_per_page'] = "-1"; 
+
+    /*
+     * split authors by first letter
+     * 1 : Yes
+     * 0 : No
+     */
+    $config['cops_author_split_first_letter'] = "1";  
+    
+    /*
+     * Enable the Lightboxes (for popups)
+     * 1 : Yes (enable)
+     * 0 : No
+     */
+    $config['cops_use_fancyapps'] = "1";  
+    
+    /*
+     * Update Epub metadata before download
+     * 1 : Yes (enable)
+     * 0 : No
+     */
+    $config['cops_update_epub-metadata'] = "0";
+    
+    /*
+     * Filter on tags to book list
+     * Only works with the OPDS catalog
+     * Usage : array ("I only want to see books using the tag : Tag1"     => "Tag1", 
+     *                "I only want to see books not using the tag : Tag1" => "!Tag1",
+     *                "I want to see every books"                         => "",
+     *
+     * Example : array ("All" => "", "Unread" => "!Read", "Read" => "Read")
+     */
+    $config['cops_books_filter'] = array ();
+    
+    /*
+     * Custom Columns to add  as an array containing the lookup names 
+     * configured in Calibre
+     *
+     * For example : array ("genre", "mycolumn");  
+     *
+     * Note that for now only the first, second and forth type of custom columns are supported
+     */
+    $config['cops_calibre_custom_column'] = array ();
+    
+    /*
+     * Rename .epub to .kepub.epub if downloaded from a Kobo eReader
+     * The ebook will then be recognized a Kepub so with chaptered paging, statistics, ...
+     * You have to enable URL rewriting if you want to enable kepup.epub download
+     * 1 : Yes (enable)
+     * 0 : No
+     */
+    $config['cops_provide_kepub'] = "0";
+
+    /* 
+     * Enable and configure Send To Kindle (or Email) feature.
+     *
+     * Don't forget to authorize the sender email you configured in your Kindle's  Approved Personal Document E-mail List.  
+     *
+     * If you want to use a simple smtp server (provided by your ISP for example), you can configure it like that :
+     * $config['cops_mail_configuration'] = array( "smtp.host"     => "smtp.free.fr",
+     *                                           "smtp.username" => "",
+     *                                           "smtp.password" => "",
+     *                                           "smtp.secure"   => "",
+     *                                           "address.from"  => "cops@slucas.fr"
+     *                                           );
+     *
+     * For Gmail (ssl is mandatory) :
+     * $config['cops_mail_configuration'] = array( "smtp.host"     => "smtp.gmail.com",
+     *                                           "smtp.username" => "YOUR GMAIL ADRESS",
+     *                                           "smtp.password" => "YOUR GMAIL PASSWORD",
+     *                                           "smtp.secure"   => "ssl",
+     *                                           "address.from"  => "cops@slucas.fr"
+     *                                           );
+     */
+    $config['cops_mail_configuration'] = NULL;
+                                                
+    /*
+     * Use filter in HTML catalog
+     * 1 : Yes (enable)
+     * 0 : No
+     */
+    $config['cops_html_tag_filter'] = "0";
diff --git a/www/config_local.php b/www/config_local.php
new file mode 100644 (file)
index 0000000..642ceca
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+    if (!isset($config))
+        $config = array();
+  
+    /*
+     * The directory containing calibre's metadata.db file, with sub-directories
+     * containing all the formats.
+     * BEWARE : it has to end with a /
+     */
+    $config['file_directory'] = '/raid/library/Books/';
+    $config['db_host'] = 'localhost';
+    $config['db_user'] = 'mydbuser';
+    $config['db_passwd'] = 'mydbpasswd';
+    
+    /*
+     * Catalog's title
+     */
+    $config['cops_title_default'] = "Книжная коллекция";
+    
+    /*
+     * use URL rewriting for downloading of ebook in HTML catalog
+     * See README for more information
+     *  1 : enable
+     *  0 : disable
+     */
+    $config['cops_use_url_rewriting'] = "0";
+    $config['cops_max_item_per_page'] = "25";
+    $config['cops_generate_invalid_opds_stream'] = "1";
+
+?>
diff --git a/www/data.php b/www/data.php
new file mode 100644 (file)
index 0000000..2219bc8
--- /dev/null
@@ -0,0 +1,139 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+require_once('base.php');
+
+class Data extends Base {
+    public $id;
+    public $name;
+    public $format;
+    public $realFormat;
+    public $extension;
+    public $book;
+    
+    public static $mimetypes = array(
+        'azw'   => 'application/x-mobipocket-ebook',
+        'azw3'  => 'application/x-mobipocket-ebook',
+        'cbz'   => 'application/x-cbz',
+        'cbr'   => 'application/x-cbr',
+        'doc'   => 'application/msword',
+        'epub'  => 'application/epub+zip',
+        'fb2'   => 'text/fb2+xml',
+        'kobo'  => 'application/x-koboreader-ebook',
+        'mobi'  => 'application/x-mobipocket-ebook',
+        'lit'   => 'application/x-ms-reader',
+        'lrs'   => 'text/x-sony-bbeb+xml',
+        'lrf'   => 'application/x-sony-bbeb',
+        'lrx'   => 'application/x-sony-bbeb',
+        'ncx'   => 'application/x-dtbncx+xml',
+        'opf'   => 'application/oebps-package+xml',
+        'otf'   => 'application/x-font-opentype',
+        'pdb'   => 'application/vnd.palm',
+        'pdf'   => 'application/pdf',
+        'prc'   => 'application/x-mobipocket-ebook',
+        'rtf'   => 'application/rtf',
+        'svg'   => 'image/svg+xml',
+        'ttf'   => 'application/x-font-truetype',
+        'wmf'   => 'image/wmf',
+        'xhtml' => 'application/xhtml+xml',
+        'xpgt'  => 'application/adobe-page-template+xml',
+        'zip'   => 'application/zip',
+        'fb2.zip' => 'application/fb2+zip'
+    );
+    
+    public function __construct($post, $book = null) {
+        $this->id = $post->id;
+        $this->name = $post->name;
+        $this->format = $post->format;
+        $this->realFormat = str_replace ("ORIGINAL_", "", $post->format);
+        $this->extension = strtolower ($this->realFormat);
+        $this->book = $book;
+    }
+    
+    public function isKnownType () {
+        return array_key_exists ($this->extension, self::$mimetypes);
+    }
+    
+    public function getMimeType () {
+        if ($this->isKnownType ()) {
+            return self::$mimetypes [$this->extension];
+        } else {
+            return "application/octet-stream";
+        }
+    }
+    
+    public function getFilename () {
+        return $this->name . "." . strtolower ($this->format);
+    }
+    
+    public function getUpdatedFilename () {
+        return $this->book->getAuthorsName () . " - " . $this->book->title;
+    }
+
+    public function getUpdatedFilenameEpub () {
+        return $this->getUpdatedFilename () . ".epub";
+    }
+
+    public function getUpdatedFilenameKepub () {
+        return $this->getUpdatedFilename () . ".kepub.epub";
+    }
+    
+    public function getDataLink ($rel, $title = NULL) {
+        return self::getBookLink ($this->book, $this->extension, $this->getMimeType (), $rel, $this->getFilename (), $this->id, $title);
+    }
+    
+    public function getLocalPath () {
+        return $this->book->path . "/" . $this->getFilename ();
+    }
+    
+    public function getHtmlLink () {
+        global $config;
+        return self::getBookLink ($this->book, $this->extension, $this->getMimeType (), NULL, $this->getFilename (), $this->id, $this->getFilename())->href;
+    }
+
+    public static function getBookLink ($book, $type, $mime, $rel, $filename, $idData, $title)
+    {
+        $id = $book->id;
+        $encoded_name=rawurlencode($filename);
+        $url = "fetch/$idData/$type/$id/$encoded_name";    
+        return new Link ($url,$mime,$rel,$filename);
+    }
+    
+    public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = NULL, $height = NULL)
+    {
+        global $config;
+        
+        $urlParam = addURLParameter("", "data", $idData);
+        
+        if (preg_match ('/^\//', Base::getFileDirectory ()) || // Linux /
+            preg_match ('/^\w\:/', Base::getFileDirectory ()) || // Windows X:
+            $rel == Link::OPDS_THUMBNAIL_TYPE ||
+            ($type == "epub" && $config['cops_update_epub-metadata']))
+        {
+            if ($type != "jpg") $urlParam = addURLParameter($urlParam, "type", $type);
+            if ($rel == Link::OPDS_THUMBNAIL_TYPE) {
+                if (is_null ($height)) {
+                    if (preg_match ('/feed.php/', $_SERVER["SCRIPT_NAME"])) {
+                        $height = $config['cops_opds_thumbnail_height'];
+                    }
+                    else
+                    {
+                        $height = $config['cops_html_thumbnail_height'];
+                    }
+                }
+                $urlParam = addURLParameter($urlParam, "height", $height);
+            }
+            $urlParam = addURLParameter($urlParam, "id", $book->id);
+            return new Link ("fetch.php?" . $urlParam, $mime, $rel, $title);
+        }
+        else
+        {
+            return new Link (str_replace('%2F','/',rawurlencode ($book->path."/".$filename)), $mime, $rel, $title);
+        }
+    }
+}
diff --git a/www/favicon.ico b/www/favicon.ico
new file mode 100644 (file)
index 0000000..9be986b
Binary files /dev/null and b/www/favicon.ico differ
diff --git a/www/feed.php b/www/feed.php
new file mode 100644 (file)
index 0000000..7949990
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) main script
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ *
+ */
+
+    require_once ("config.php");
+    require_once ("base.php");
+    require_once ("author.php");
+    require_once ("serie.php");
+    require_once ("tag.php");
+    require_once ("book.php");
+    require_once ("OPDS_renderer.php");
+    
+    header ("Content-Type:application/xml");
+    $page = getURLParam ("page", Base::PAGE_INDEX);
+    $query = getURLParam ("query");
+    $n = getURLParam ("n", "1");
+    if ($query)
+        $page = Base::PAGE_OPENSEARCH_QUERY;
+    $qid = getURLParam ("id");
+    
+    $OPDSRender = new OPDSRenderer ();
+    
+    switch ($page) {
+        case Base::PAGE_OPENSEARCH :
+            echo $OPDSRender->getOpenSearch ();
+            return;
+        default:
+            $currentPage = Page::getPage ($page, $qid, $query, $n);
+            $currentPage->InitializeContent ();
+            echo $OPDSRender->render ($currentPage);
+            return;
+            break;
+    }
diff --git a/www/fetch.php b/www/fetch.php
new file mode 100644 (file)
index 0000000..4b51f87
--- /dev/null
@@ -0,0 +1,148 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) 
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Gordon Page <gordon@incero.com> with integration/modification by Sébastien Lucas <sebastien@slucas.fr>
+ */
+    
+    require_once ("config.php");
+    require_once ("book.php");
+    require_once ("data.php");
+
+function mb_basename($filepath, $suffix = NULL) {
+    $splited = preg_split ( '/\//', rtrim ( $filepath, '/ ' ) );
+        return substr ( basename ( 'X' . $splited [count ( $splited ) - 1], 
+        $suffix ), 1 );
+        }
+
+function notFound () {
+    header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
+    header("Status: 404 Not Found");
+
+    $_SERVER['REDIRECT_STATUS'] = 404;
+}
+    
+    global $config;
+    $expires = 60*60*24*14;
+    header("Pragma: public");
+    header("Cache-Control: maxage=".$expires);
+    header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');
+    $bookId = getURLParam ("id", NULL);
+    $type = getURLParam ("type", "jpg");
+    $idData = getURLParam ("data", NULL);
+
+    if (is_null ($bookId))
+    {
+        $book = Book::getBookByDataId($idData);
+    }
+    else
+    {
+        $book = Book::getBookById($bookId);
+    }
+
+    if (!$book) {
+        notFound ();
+        return;     
+    }
+
+
+    if ($book && ($type == "jpg" || empty ($config['calibre_internal_directory']))) {
+        if ($type == "jpg") {
+            $file = $book->getFilePath ($type);
+        } else {
+            $file = $book->getFilePath ($type, $idData);
+        }
+        if (!$file || !file_exists ($file)) {
+            notFound ();
+            return;
+        }
+    }
+
+    if ($type == "jpg") {
+            header("Content-Type: image/jpeg");
+            if (isset($_GET["width"]))
+            {
+                $file = $book->getFilePath ($type);
+                // get image size
+                if($size = GetImageSize($file)){
+                    $w = $size[0];
+                    $h = $size[1];
+                    //set new size
+                    $nw = $_GET["width"];
+                    $nh = ($nw*$h)/$w;
+                }
+                else{
+                    //set new size
+                    $nw = "160";
+                    $nh = "120";
+                }
+                //draw the image
+                $src_img = imagecreatefromjpeg($file);
+                $dst_img = imagecreatetruecolor($nw,$nh);
+                imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $nw, $nh, $w, $h);//resizing the image
+                imagejpeg($dst_img,null,80);
+                imagedestroy($src_img);
+                imagedestroy($dst_img);
+                return;
+            }
+            if (isset($_GET["height"]))
+            {
+                $file = $book->getFilePath ($type);
+                // get image size
+                if($size = GetImageSize($file)){
+                    $w = $size[0];
+                    $h = $size[1];
+                    //set new size
+                    $nh = $_GET["height"];
+                    $nw = ($nh*$w)/$h;
+                }
+                else{
+                    //set new size
+                    $nw = "160";
+                    $nh = "120";
+                }
+                //draw the image
+                $src_img = imagecreatefromjpeg($file);
+                $dst_img = imagecreatetruecolor($nw,$nh);
+                imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $nw, $nh, $w, $h);//resizing the image
+                imagejpeg($dst_img,null,80);
+                imagedestroy($src_img);
+                imagedestroy($dst_img);
+                return;
+            }
+    }
+
+    $file = $book->getFilePath ($type, $idData, false);
+
+    $filename = $dir . $file;
+
+    if ($type == "jpg") {
+        header('Content-Type: image/jpg');
+        header('Content-Disposition: filename="' . mb_basename ($file) . '"');
+#    } elseif ($type == "fb2.zip") {
+#        $z = new ZipArchive();
+#        $z->open($filename);  
+#        $zname = $z->getNameIndex(0);
+#        $zstat = $z->statIndex(0);   
+#        header('Content-Type: text/fb2+xml');
+#        header('Content-Disposition: filename="' . $zname . '"');
+    } else {
+        header("Content-Type: " . Data::$mimetypes[$type]);
+        header('Content-Disposition: attachment; filename="' . mb_basename ($file) . '"');
+    }
+    
+    if (empty ($config['cops_x_accel_redirect'])) {
+        $filename = $dir . $file;
+#        if ($type == "fb2.zip") {
+#          $fp = $z->getStream($zname);
+#          header("Content-Length: " . $zstat['size']);
+#        } else {
+          $fp = fopen($filename, 'rb');
+          header("Content-Length: " . filesize($filename));
+#         }
+        fpassthru($fp);
+    }
+    else {
+        header ($config['cops_x_accel_redirect'] . ": " . $dir . $file);
+    }
diff --git a/www/getJSON.php b/www/getJSON.php
new file mode 100644 (file)
index 0000000..e599f53
--- /dev/null
@@ -0,0 +1,99 @@
+<?php\r
+/**\r
+ * COPS (Calibre OPDS PHP Server) HTML main script\r
+ *\r
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)\r
+ * @author     Sébastien Lucas <sebastien@slucas.fr>\r
+ *\r
+ */\r
\r
+    require_once ("config.php");\r
+    require_once ("base.php");\r
+    require_once ("author.php");\r
+    require_once ("serie.php");\r
+    require_once ("tag.php");\r
+    require_once ("language.php");\r
+    require_once ("book.php");\r
+    \r
+    header ("Content-Type:application/json;charset=utf-8");\r
+    $page = getURLParam ("page", Base::PAGE_INDEX);\r
+    $query = getURLParam ("query");\r
+    $qid = getURLParam ("id");\r
+    $n = getURLParam ("n", "1");\r
+    \r
+    $currentPage = Page::getPage ($page, $qid, $query, $n);\r
+    $currentPage->InitializeContent ();\r
+    \r
+    $out = array ( "title" => $currentPage->title);\r
+    $entries = array ();\r
+    foreach ($currentPage->entryArray as $entry) {\r
+        array_push ($entries, $entry->getContentArray ());\r
+    }\r
+    if (!is_null ($currentPage->book)) {\r
+        $out ["book"] = $currentPage->book->getFullContentArray ();\r
+    }\r
+    $out ["page"] = $page;\r
+    $out ["entries"] = $entries;\r
+    $out ["isPaginated"] = 0;\r
+    if ($currentPage->isPaginated ()) {\r
+        $prevLink = $currentPage->getPrevLink ();\r
+        $nextLink = $currentPage->getNextLink ();\r
+        $out ["isPaginated"] = 1;\r
+        $out ["prevLink"] = "";\r
+        if (!is_null ($prevLink)) {\r
+            $out ["prevLink"] = $prevLink->hrefXhtml ();\r
+        }\r
+        $out ["nextLink"] = "";\r
+        if (!is_null ($nextLink)) {\r
+            $out ["nextLink"] = $nextLink->hrefXhtml ();\r
+        }\r
+        $out ["maxPage"] = $currentPage->getMaxPage ();\r
+        $out ["currentPage"] = $currentPage->n;\r
+    }\r
+    if (!is_null (getURLParam ("complete"))) { \r
+        $out ["const"] = array ("version" => VERSION, "i18n" => array (\r
+                       "coverAlt" => localize("i18n.coversection"),\r
+                       "authorsTitle" => localize("authors.title"),\r
+                       "bookwordTitle" => localize("bookword.title"),\r
+                       "tagsTitle" => localize("tags.title"),\r
+                       "seriesTitle" => localize("series.title"),\r
+                       "customizeTitle" => localize ("customize.title"),\r
+                       "aboutTitle" => localize ("about.title"),\r
+                       "previousAlt" => localize ("paging.previous.alternate"),\r
+                       "nextAlt" => localize ("paging.next.alternate"),\r
+                       "searchAlt" => localize ("search.alternate"),\r
+                       "sortAlt" => localize ("sort.alternate"),\r
+                       "homeAlt" => localize ("home.alternate"),\r
+                       "settingsAlt" => localize ("settings.alternate"),\r
+                       "permalinkAlt" => localize ("permalink.alternate"),\r
+                       "pubdateTitle" => localize("pubdate.title"),\r
+                       "languagesTitle" => localize("language.title"),\r
+                       "contentTitle" => localize("content.summary"),\r
+                       "sortorderAsc" => localize("search.sortorder.asc"),\r
+                       "sortorderDesc" => localize("search.sortorder.desc"),\r
+                       "customizeEmail" => localize("customize.email")),\r
+                   "url" => array (\r
+                       "detailUrl" => "index.php?page=".Base::PAGE_BOOK_DETAIL."&id={0}",\r
+                       "coverUrl" => "fetch.php?id={0}",\r
+                       "thumbnailUrl" => "fetch.php?height=" . $config['cops_html_thumbnail_height'] . "&id={0}"),\r
+                   "config" => array (\r
+                       "use_fancyapps" => $config ["cops_use_fancyapps"],\r
+                       "max_item_per_page" => $config['cops_max_item_per_page'],\r
+                       "html_tag_filter" => $config['cops_html_tag_filter']));\r
+   }\r
+\r
+    $out ["containsBook"] = 0;\r
+    if ($currentPage->containsBook ()) {\r
+        $out ["containsBook"] = 1;\r
+    }\r
+    \r
+    $out["abouturl"] = "index.php?page=".Base::PAGE_ABOUT;\r
+    \r
+    if ($page == Base::PAGE_ABOUT) {\r
+        $out ["fullhtml"] = file_get_contents('about.html');\r
+    }\r
+    \r
+    $out ["homeurl"] = "index.php";\r
+    \r
+    echo json_encode ($out);\r
+\r
diff --git a/www/images/allbook.png b/www/images/allbook.png
new file mode 100644 (file)
index 0000000..7d863f9
Binary files /dev/null and b/www/images/allbook.png differ
diff --git a/www/images/author.png b/www/images/author.png
new file mode 100644 (file)
index 0000000..79f35cc
Binary files /dev/null and b/www/images/author.png differ
diff --git a/www/images/language.png b/www/images/language.png
new file mode 100644 (file)
index 0000000..9757fc6
Binary files /dev/null and b/www/images/language.png differ
diff --git a/www/images/recent.png b/www/images/recent.png
new file mode 100644 (file)
index 0000000..783c833
Binary files /dev/null and b/www/images/recent.png differ
diff --git a/www/images/serie.png b/www/images/serie.png
new file mode 100644 (file)
index 0000000..0f9ed4d
Binary files /dev/null and b/www/images/serie.png differ
diff --git a/www/images/tag.png b/www/images/tag.png
new file mode 100644 (file)
index 0000000..9757fc6
Binary files /dev/null and b/www/images/tag.png differ
diff --git a/www/index.php b/www/index.php
new file mode 100644 (file)
index 0000000..b64caa0
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) HTML main script
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ *
+ */
+    require_once ("config.php");
+    require_once ("base.php");
+    require_once ("author.php");
+    require_once ("serie.php");
+    require_once ("tag.php");
+    require_once ("language.php");
+    require_once ("book.php");
+    
+    // If we detect that an OPDS reader try to connect try to redirect to feed.php
+    if (preg_match("/(PocketBook|MantanoReader|FBReader|Stanza|Aldiko|Moon+ Reader|CoolReader)/", $_SERVER['HTTP_USER_AGENT'])) {
+        header("location: feed.php");
+        exit ();
+    }
+    
+    header ("Content-Type:text/html;charset=utf-8");
+    $page = getURLParam ("page", Base::PAGE_INDEX);
+    $query = getURLParam ("query");
+    $qid = getURLParam ("id");
+    $n = getURLParam ("n", "1");
+?>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>COPS</title>
+    <script type="text/javascript" src="<?php echo getUrlWithVersion("resources/jQuery/jquery-1.10.2.min.js") ?>"></script>
+    <script type="text/javascript" src="<?php echo getUrlWithVersion("resources/jquery-cookie/jquery.cookies.js") ?>"></script>
+    <script type="text/javascript" src="<?php echo getUrlWithVersion("resources/Magnific-Popup/jquery.magnific-popup.min.js") ?>"></script>
+    <link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/Magnific-Popup/magnific-popup.css") ?>" media="screen" />
+    <script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.sortElements.js") ?>"></script>
+    <script type="text/javascript" src="<?php echo getUrlWithVersion("resources/doT/doT.min.js") ?>"></script>
+    <script type="text/javascript" src="<?php echo getUrlWithVersion("resources/lru/lru.js") ?>"></script>
+    <script type="text/javascript" src="<?php echo getUrlWithVersion("util.js") ?>"></script>
+    <link rel="related" href="<?php echo $config['cops_full_url'] ?>feed.php" type="application/atom+xml;profile=opds-catalog" title="<?php echo $config['cops_title_default']; ?>" /> 
+    <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
+    <link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Open+Sans:400,300italic,800,300,400italic,600,600italic,700,700italic,800italic' />
+    <link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/normalize/normalize.css") ?>" />
+    <link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("styles/font-awesome.css") ?>" media="screen" />
+    <link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion(getCurrentCss ()) ?>" media="screen" />
+    <script type="text/javascript">
+    
+        $(document).ready(function() {
+            // Handler for .ready() called.
+            
+            var url = "<?php echo "getJSON.php?" . addURLParameter ($_SERVER["QUERY_STRING"], "complete", 1); ?>";
+            
+            $.when($.get('templates/default/header.html'),
+                   $.get('templates/default/footer.html'),
+                   $.get('templates/default/bookdetail.html'),
+                   $.get('templates/default/main.html'),
+                   $.get('templates/default/page.html'),
+                   $.getJSON(url)).done(function(header, footer, bookdetail, main, page, data){
+                templateBookDetail = doT.template (bookdetail [0]);
+                
+                var defMain = {
+                    bookdetail: bookdetail [0]
+                };
+                
+                templateMain = doT.template (main [0], undefined, defMain);
+                
+                var defPage = {
+                    header: header [0],
+                    footer: footer [0],
+                    main  : main [0],
+                    bookdetail: bookdetail [0]
+                };
+                
+                templatePage = doT.template (page [0], undefined, defPage);
+                currentData = data [0];
+                
+                updatePage (data [0]);
+                cache.put (url, data [0]);
+                history.replaceState(url, "", window.location);
+                handleLinks ();
+            });
+            
+        });
+        
+        
+
+    </script>
+</head>
+<body>
+</body>
+</html>
\ No newline at end of file
diff --git a/www/js/jquery.sortElements.js b/www/js/jquery.sortElements.js
new file mode 100644 (file)
index 0000000..bf1902d
--- /dev/null
@@ -0,0 +1,69 @@
+/**\r
+ * jQuery.fn.sortElements\r
+ * --------------\r
+ * @author James Padolsey (http://james.padolsey.com)\r
+ * @version 0.11\r
+ * @updated 18-MAR-2010\r
+ * --------------\r
+ * @param Function comparator:\r
+ *   Exactly the same behaviour as [1,2,3].sort(comparator)\r
+ *   \r
+ * @param Function getSortable\r
+ *   A function that should return the element that is\r
+ *   to be sorted. The comparator will run on the\r
+ *   current collection, but you may want the actual\r
+ *   resulting sort to occur on a parent or another\r
+ *   associated element.\r
+ *   \r
+ *   E.g. $('td').sortElements(comparator, function(){\r
+ *      return this.parentNode; \r
+ *   })\r
+ *   \r
+ *   The <td>'s parent (<tr>) will be sorted instead\r
+ *   of the <td> itself.\r
+ */\r
+jQuery.fn.sortElements = (function(){\r
+    \r
+    var sort = [].sort;\r
+    \r
+    return function(comparator, getSortable) {\r
+        \r
+        getSortable = getSortable || function(){return this;};\r
+        \r
+        var placements = this.map(function(){\r
+            \r
+            var sortElement = getSortable.call(this),\r
+                parentNode = sortElement.parentNode,\r
+                \r
+                // Since the element itself will change position, we have\r
+                // to have some way of storing it's original position in\r
+                // the DOM. The easiest way is to have a 'flag' node:\r
+                nextSibling = parentNode.insertBefore(\r
+                    document.createTextNode(''),\r
+                    sortElement.nextSibling\r
+                );\r
+            \r
+            return function() {\r
+                \r
+                if (parentNode === this) {\r
+                    throw new Error(\r
+                        "You can't sort elements if any one is a descendant of another."\r
+                    );\r
+                }\r
+                \r
+                // Insert before flag:\r
+                parentNode.insertBefore(this, nextSibling);\r
+                // Remove flag:\r
+                parentNode.removeChild(nextSibling);\r
+                \r
+            };\r
+            \r
+        });\r
+       \r
+        return sort.call(this, comparator).each(function(i){\r
+            placements[i].call(getSortable.call(this));\r
+        });\r
+        \r
+    };\r
+    \r
+})();
\ No newline at end of file
diff --git a/www/lang/Localization_ca.json b/www/lang/Localization_ca.json
new file mode 100644 (file)
index 0000000..9d99966
--- /dev/null
@@ -0,0 +1,100 @@
+{\r
+"boolean.yes":"si",\r
+"splitByLetter.letter":"{0} ({1})",\r
+"home.title":"Catàleg principal",\r
+"link.fullentry":"Entrada sencera",\r
+"title.nextpage":"propera pàg. ({0} de {1})",\r
+"title.lastpage":"pàg. següent (darrera)",\r
+"title.numberOfPages":"{0} ({1} pàgines)",\r
+"bookword.title":"Llibres",\r
+"bookword.none":"Cap llibre",\r
+"bookword.one":"1 llibre",\r
+"bookword.many":"{0} llibres",\r
+"authorword.title":"Autors",\r
+"authorword.none":"Cap autor",\r
+"authorword.one":"1 autor",\r
+"authorword.many":"{0} autors",\r
+"taglevelword.title":"Nivells d'etiquetes",\r
+"taglevelword.none":"Cap nivell d'etiquetes",\r
+"taglevelword.one":"1 nivell d'etiqueta",\r
+"taglevelword.many":"{0} nivells d'etiquetes",\r
+"seriesword.none":"Cap sèrie",\r
+"seriesword.one":"1 sèrie",\r
+"seriesword.many":"sèries",\r
+"tagword.title":"Etiquetes",\r
+"tagword.none":"Cap etiqueta",\r
+"tagword.one":"1 etiqueta",\r
+"tagword.many":"etiquetes",\r
+"content.tags":"Etiquetes:",\r
+"content.series.data":"Llibre {0} de la sèrie {1}",\r
+"content.publisher":"Editorial:",\r
+"content.publisher.data":"Publicat el {1} por {0}",\r
+"content.summary":"Sinopsi:",\r
+"bookentry.series":"Llibre {0} de la sèrie {1}",\r
+"bookentry.author":"{0} de {1}",\r
+"bookentry.tags":"{0} en {1}",\r
+"bookentry.ratings":"{0} puntuats {1}",\r
+"bookentry.goodreads":"El llibre a Goodreads",\r
+"bookentry.goodreads.review":"Comenta'l a Goodreads",\r
+"bookentry.goodreads.author":"{0} a Goodreads",\r
+"bookentry.wikipedia":"El llibre a la Wikipedia",\r
+"bookentry.wikipedia.author":"{0} a Wikipedia",\r
+"bookentry.librarything":"El llibre a LibraryThing",\r
+"bookentry.librarything.author":"{0} a LibraryThing",\r
+"bookentry.amazon":"El llibre a Amazon",\r
+"bookentry.amazon.author":"{0} a Amazon",\r
+"bookentry.isfdb.author":"{0} a ISFDB",\r
+"bookentry.download":"Descarrega el llibre com a {0}",\r
+"bookentry.rated":"{0} {1}",\r
+"bookentry.fullentrylink":"Entrada sencera",\r
+"tags.title":"Etiquetes",\r
+"tags.categorized":"Llistat per categories de les {0} etiquetes",\r
+"tags.categorized.single":"Llistat per categories de la única etiqueta",\r
+"tags.alphabetical.many":"{0} etiquetes ordenades alfabèticament",\r
+"tags.alphabetical.one":"Llistat alfabètic de la única etiqueta",\r
+"splitByLetter.tag.other":"Altres etiquetes",\r
+"authors.series.title":"Sèries",\r
+"authors.title":"Autors",\r
+"authors.alphabetical.many":"{0} autors ordenats alfabèticament",\r
+"authors.alphabetical.one":"Índex s'un sol autor",\r
+"splitByLetter.author.other":"Altres autors",\r
+"series.title":"Sèries",\r
+"series.alphabetical.many":"{0} sèries ordenades alfabèticament",\r
+"series.alphabetical.one":"Índex alfabètic d'una sola sèrie",\r
+"splitByLetter.series.other":"Altres sèries",\r
+"recent.title":"Els més recents",\r
+"recent.list":"{0} darrers títols incorporats",\r
+"recent.list.single":"El llibre més recent",\r
+"rating.title":"Valoració",\r
+"rating.summary":"{0}, agrupats per valoració",\r
+"allbooks.title":"Tots els llibres",\r
+"allbooks.alphabetical.many":"{0} llibres ordenats alfabèticament",\r
+"allbooks.alphabetical.one":"Índex d'un sol llibre",\r
+"splitByLetter.book.other":"Altres llibres",\r
+"main.title":"Biblioteca generada per Calibre",\r
+"main.summary":"{0} ha catalogat {1}",\r
+"i18n.downloads":"Descàrregues, enllaços i altres catàlegs",\r
+"i18n.links":"Enllaços i altres catàlegs",\r
+"i18n.downloadfile":"Descarregar arxiu",\r
+"i18n.downloadsection":"Descàrregues, enllaços i més",\r
+"i18n.relatedsection":"Catàlegs relacionats",\r
+"i18n.linksection":"Enllaços externs",\r
+"i18n.backToMain":"Tornar a la pàgina d'inici del catàleg",\r
+"i18n.summarysection":"Resum",\r
+"i18n.dateGenerated":"Catàleg creat el {0}",\r
+"deeplevel.summary":"{0} per autors, etiquetes, etc.",\r
+"about.summary":"Notes d'ús",\r
+"usage.intro":"Les opcions provenen de l'arxiu de configuració present a: {0}",\r
+"language.title":"Idioma",\r
+"config.Language.description":"Aquesta opció canvia l'idioma del programa; fes servir un codi ISO estàndard, p.e: EN, FR, DE, ES...)",\r
+"config.Language.possible":"Valors posibles: {0}",\r
+"intro.goal":"Genear catàleg OPDS i HTML des de la biblioteca del Calibre",\r
+"intro.team.title":"L'equip de Calibre2Opds:",\r
+"intro.team.list1":"David Pierron - Programador principal",\r
+"intro.team.list2":"Dave Walker - gurú, opcions, gestió i tester extraordinari",\r
+"intro.team.list4":"Douglas Steele - programador",\r
+"intro.team.list5":"Jane Litte - beta tester i recolzament moral",\r
+"intro.thanks.1":"Gràcies especials a Kb Sriram, que no només ha programat Trook, un gestor de biblioteques OPDS excel·lent i compatible",\r
+"intro.thanks.2":"amb el Nook, sinó que, a més, ha estat tan amable de donar un Nook",\r
+"fin":"fi"\r
+}\r
diff --git a/www/lang/Localization_de.json b/www/lang/Localization_de.json
new file mode 100644 (file)
index 0000000..2ecc1e4
--- /dev/null
@@ -0,0 +1,123 @@
+{\r
+"boolean.no":"nein",\r
+"boolean.yes":"ja",\r
+"splitByLetter.letter":"{0} unter {1}",\r
+"home.title":"Hauptkatalog",\r
+"link.fullentry":"Vollständiger Eintrag",\r
+"title.nextpage":"nächste Seite ({0} von {1})",\r
+"title.lastpage":"nächste Seite (letzte)",\r
+"title.numberOfPages":"{0} ({1} Seiten)",\r
+"bookword.title":"Bücher",\r
+"bookword.none":"Kein Buch",\r
+"bookword.one":"1 Buch",\r
+"bookword.many":"{0} Bücher",\r
+"authorword.title":"Autoren",\r
+"authorword.none":"Kein Autor",\r
+"authorword.one":"1 Autor",\r
+"authorword.many":"{0} Autoren",\r
+"taglevelword.title":"Schlagwortebenen",\r
+"taglevelword.none":"Keine Schlagwortebene",\r
+"taglevelword.one":"1 Schlagwortebene",\r
+"taglevelword.many":"{0} Schlagwortebenen",\r
+"seriesword.title":"Serien",\r
+"seriesword.none":"Keine Serie",\r
+"seriesword.one":"1 Serie",\r
+"seriesword.many":"{0} Serien",\r
+"tagword.title":"Schlagwörter",\r
+"tagword.none":"Kein Schlagwort",\r
+"tagword.one":"1 Schlagwort",\r
+"tagword.many":"{0} Schlagwörter",\r
+"content.tags":"Schlagwörter: ",\r
+"content.series":"Serien: ",\r
+"content.series.data":"Buch {0} der {1} - Reihe",\r
+"content.publisher":"Verlag: ",\r
+"content.published":"Veröffentlicht:",\r
+"content.publisher.data":"Veröffentlicht {1} von {0}",\r
+"content.summary":"Inhalt: ",\r
+"bookentry.series":"Buch {0} der {1} - Reihe",\r
+"bookentry.author":"{0} von {1}",\r
+"bookentry.tags":"{0} unter {1}",\r
+"bookentry.ratings":"{0} bewertet mit {1}",\r
+"bookentry.goodreads":"Dieses Buch bei Goodreads",\r
+"bookentry.goodreads.review":"Rezensiere dieses Buch bei Goodreads",\r
+"bookentry.goodreads.author":"{0} bei Goodreads",\r
+"bookentry.wikipedia":"Dieses Buch bei Wikipedia",\r
+"bookentry.wikipedia.author":"{0} bei Wikipedia",\r
+"bookentry.librarything":"Dieses Buch bei LibraryThing",\r
+"bookentry.librarything.author":"{0} bei LibraryThing",\r
+"bookentry.amazon":"Dieses Buch bei Amazon",\r
+"bookentry.amazon.author":"{0} bei Amazon",\r
+"bookentry.isfdb.author":"{0} bei ISFDB",\r
+"bookentry.download":"Lade dieses eBook als {0}",\r
+"bookentry.rated":"{0} {1}",\r
+"bookentry.fullentrylink":"Vollständiger Eintrag",\r
+"tags.title":"Schlagwörter",\r
+"tags.categorized":"Index der {0} Schlagwörter nach Kategorien",\r
+"tags.categorized.single":"Index des Schlagworts nach Kategorien",\r
+"tags.alphabetical.many":"Alphabetischer Index der {0} Schlagwörter",\r
+"tags.alphabetical.one":"Alphabetischer Index des Schlagworts",\r
+"splitByLetter.tag.other":"Andere Schlagwörter",\r
+"authors.series.title":"Serien: {0}",\r
+"authors.title":"Autoren",\r
+"authors.alphabetical.many":"Alphabetischer Index der {0} Autoren",\r
+"authors.alphabetical.one":"Alphabetischer Index des Autors",\r
+"splitByLetter.author.other":"Andere Autoren",\r
+"series.title":"Serien",\r
+"series.alphabetical.many":"Alphabetischer Index der {0} Serien",\r
+"series.alphabetical.one":"Alphabetischer Index der Serie",\r
+"splitByLetter.series.other":"Andere Serien",\r
+"recent.title":"Neuzugänge",\r
+"recent.list":"{0} neue Bücher",\r
+"recent.list.single":"Das neueste einzige Buch",\r
+"rating.title":"Bewertung",\r
+"rating.summary":"{0}, gruppiert nach Bewertung",\r
+"allbooks.title":"Alle Bücher",\r
+"allbooks.alphabetical.many":"Alphabetischer Index der {0} Bücher",\r
+"allbooks.alphabetical.one":"Alphabetischer Index des einzigen Buchs",\r
+"splitByLetter.book.other":"Andere Bücher",\r
+"main.title":"Calibre Bibliothek",\r
+"main.summary":"{0} hat {1} katalogisierte Bücher",\r
+"startup.newhome":"Standard-Konfigurationsverzeichnis wurde in {0} umgeleitet",\r
+"startup.redirectfound":".redirect-Datei in {0} gefunden",\r
+"startup.redirectreadfail":"… konnte .redirect-Datei nicht lesen",\r
+"startup.redirectnotfound":"… Verzeichnis {0} für Umleitung nicht gefunden",\r
+"startup.redirectabandoned":"… Umleitung nicht durchgeführt",\r
+"startup.redirecting":"Home-Verzeichnis in {0} umgeleitet",\r
+"startup.configusing":"Benutze Konfigurations-Verzeichnis {0}",\r
+"startup.folderuserhome":"Suche Konfigurations-Verzeichnis in Benutzer-Verzeichnis {0}",\r
+"startup.foldertilde":"Suche Konfigurations-Verzeichnis in ~ („Tilde-Verzeichnis“) {0}",\r
+"startup.folderjar":"Suche Konfigurations-Verzeichnis ab der .jar-Datei {0}",\r
+"startup.foldernotexist":"… angegebener Verzeichnis existiert nicht",\r
+"i18n.and":"und",\r
+"i18n.downloads":"Downloads, Links und andere Kataloge",\r
+"i18n.links":"Links und andere Kataloge",\r
+"i18n.coversection":"Umschlag",\r
+"i18n.downloadfile":"Download Datei",\r
+"i18n.downloadsection":"Downloads",\r
+"i18n.relatedsection":"Verwandte Kataloge",\r
+"i18n.linksection":"Externe Links",\r
+"i18n.backToMain":"Zurück zur Hauptseite des Katalogs",\r
+"i18n.summarysection":"Zusammenfassung",\r
+"i18n.dateGenerated":"Katalog erstellt am {0}",\r
+"deeplevel.summary":"{0} aufgeschlüsselt nach Autoren, Schlagwörter, etc.",\r
+"about.summary":"Anmerkungen zur Verwendung von Calibre2Opds",\r
+"usage.intro":"Die Optionen werden der Konfigurationsdatei in {0} entnommen",\r
+"language.title":"Sprache",\r
+"config.Language.description":"Diese Einstellung ändert die verwendete Sprache des Programms; verwende den Standard ISO Sprachcode (z.B. EN, FR, DE …)",\r
+"config.Language.possible":"Mögliche Werte : {0}",\r
+"intro.goal":"Erstelle OPDS und HTML Kataloge der Calibre eBooks Datenbank",\r
+"intro.wiki.title":"Calibre2opds Projektseite:",\r
+"intro.wiki.url":"http://calibre2opds.com",\r
+"intro.team.title":"Das Calibre2Opds Team:",\r
+"intro.team.list1":"David Pierron - Hauptprogrammer",\r
+"intro.team.list2":"Dave Walker - Guru, Manager der Features und Tester der Extraklasse",\r
+"intro.team.list3":"Farid Soussi - CSS und HTML Guru",\r
+"intro.team.list4":"Douglas Steele - Programmierung",\r
+"intro.team.list5":"Jane Litte - Beta Tests und moralische Unterstützung",\r
+"intro.thanks.1":"Speziellen Dank an Kb Sriram, der nicht nur Trook, eine exzellente und OPDS kompatible ",\r
+"intro.thanks.2":"Bibliotheksverwaltung programmierte, sondern auch einen Nook spendete!",\r
+"search.result":"Suchergebnis für",\r
+"search.sortorder.asc":"Auf",\r
+"search.sortorder.desc":"Ab",\r
+"fin":"fin"\r
+}\r
diff --git a/www/lang/Localization_en.json b/www/lang/Localization_en.json
new file mode 100644 (file)
index 0000000..298e2f6
--- /dev/null
@@ -0,0 +1,338 @@
+{\r
+"boolean.no":"no",\r
+"boolean.yes":"yes",\r
+"splitByLetter.letter":"{0} starting with {1}",\r
+"home.title":"Main catalog",\r
+"link.fullentry":"Full entry",\r
+"title.nextpage":"next page ({0} of {1})",\r
+"title.lastpage":"next page (last)",\r
+"title.numberOfPages":"{0} ({1} pages)",\r
+"pubdate.title":"Publication year",\r
+"bookword.title":"Books",\r
+"bookword.none":"No book",\r
+"bookword.one":"1 book",\r
+"bookword.many":"{0} books",\r
+"authorword.title":"Authors",\r
+"authorword.none":"No author",\r
+"authorword.one":"1 author",\r
+"authorword.many":"{0} authors",\r
+"taglevelword.title":"Tag levels",\r
+"taglevelword.none":"No tag level",\r
+"taglevelword.one":"1 tag level",\r
+"taglevelword.many":"{0} tag levels",\r
+"seriesword.title":"Series",\r
+"seriesword.none":"No series",\r
+"seriesword.one":"1 series",\r
+"seriesword.many":"{0} series",\r
+"tagword.title":"Tags",\r
+"tagword.none":"No tag",\r
+"tagword.one":"1 tag",\r
+"tagword.many":"{0} tags",\r
+"content.tags":"Tags:",\r
+"content.series":"Series:",\r
+"content.series.data":"Book {0} in the {1} series",\r
+"content.publisher":"Publisher:",\r
+"content.published":"Published:",\r
+"content.added":"Added: ",\r
+"content.modified":"Modified:",\r
+"content.publisher.data":"Published {1} by {0}",\r
+"content.summary":"Summary",\r
+"bookentry.series":"Book {0} in the {1} series",\r
+"bookentry.author":"{0} by {1}",\r
+"bookentry.tags":"{0} in {1}",\r
+"bookentry.ratings":"{0} rated {1}",\r
+"bookentry.goodreads":"This book on Goodreads",\r
+"bookentry.goodreads.review":"Review this book on Goodreads",\r
+"bookentry.goodreads.author":"{0} on Goodreads",\r
+"bookentry.wikipedia":"This book on Wikipedia",\r
+"bookentry.wikipedia.author":"{0} on Wikipedia",\r
+"bookentry.librarything":"This book on LibraryThing",\r
+"bookentry.librarything.author":"{0} on LibraryThing",\r
+"bookentry.amazon":"This book on Amazon",\r
+"bookentry.amazon.author":"{0} on Amazon",\r
+"bookentry.isfdb.author":"{0} on ISFDB",\r
+"bookentry.download":"Download this ebook as {0}",\r
+"bookentry.rated":"{0} {1}",\r
+"bookentry.fullentrylink":"Full entry",\r
+"languages.title":"Languages",\r
+"languages.categorized":"Categorized index of the {0} languages",\r
+"languages.categorized.single":"Categorized index of the single language",\r
+"languages.alphabetical.many":"Alphabetical index of the {0} languages",\r
+"languages.alphabetical.one":"Alphabetical index of the single language",\r
+"languages.alphabetical.none":"Alphabetical index of absolutely no language",\r
+"languages.abk":"Abkhaz",\r
+"languages.aaf":"Afar",\r
+"languages.afr":"Afrikaans",\r
+"languages.aka":"Akan",\r
+"languages.sqi":"Albanian",\r
+"languages.amh":"Amharic",\r
+"languages.ara":"Arabic",\r
+"languages.arg":"Aragonese",\r
+"languages.hye":"Armenian",\r
+"languages.asm":"Assamese",\r
+"languages.ava":"Avaric",\r
+"languages.ave":"Avestan",\r
+"languages.aym":"Aymara",\r
+"languages.aze":"Azerbaijani",\r
+"languages.bam":"Bambara",\r
+"languages.bak":"Bashkir",\r
+"languages.eus":"Basque",\r
+"languages.bel":"Belarusian",\r
+"languages.ben":"Bengali",\r
+"languages.bih":"Bihari",\r
+"languages.bis":"Bislama",\r
+"languages.bos":"Bosnian",\r
+"languages.bre":"Breton",\r
+"languages.bul":"Bulgarian",\r
+"languages.mya":"Burmese",\r
+"languages.cat":"Catalan",\r
+"languages.cha":"Chamorro",\r
+"languages.che":"Chechen",\r
+"languages.nya":"Chichewa",\r
+"languages.zho":"Chinese",\r
+"languages.chv":"Chuvash",\r
+"languages.cor":"Cornish",\r
+"languages.cos":"Corsican",\r
+"languages.cre":"Cree",\r
+"languages.hrv":"Croatian",\r
+"languages.ces":"Czech",\r
+"languages.dan":"Danish",\r
+"languages.div":"Divehi",\r
+"languages.nld":"Dutch",\r
+"languages.dzo":"Dzongkha",\r
+"languages.eng":"English",\r
+"languages.epo":"Esperanto",\r
+"languages.est":"Estonian",\r
+"languages.ewe":"Ewe",\r
+"languages.fao":"Faroese",\r
+"languages.fij":"Fijian",\r
+"languages.fin":"Finnish",\r
+"languages.fra":"French",\r
+"languages.ful":"Fula",\r
+"languages.glg":"Galician",\r
+"languages.kat":"Georgian",\r
+"languages.deu":"German",\r
+"languages.ell":"Greek",\r
+"languages.grn":"Guaraní",\r
+"languages.guj":"Gujarati",\r
+"languages.hat":"Haitian",\r
+"languages.hau":"Hausa",\r
+"languages.hed":"Hebrew",\r
+"languages.her":"Herero",\r
+"languages.hin":"Hindi",\r
+"languages.hmo":"Hiri Motu",\r
+"languages.hun":"Hungarian",\r
+"languages.ina":"Interlingua",\r
+"languages.ind":"Indonesian",\r
+"languages.ile":"Interlingue",\r
+"languages.gle":"Irish",\r
+"languages.ibo":"Igbo",\r
+"languages.ipk":"Inupiaq",\r
+"languages.ido":"Ido",\r
+"languages.isl":"Icelandic",\r
+"languages.ita":"Italian",\r
+"languages.iku":"Inuktitut",\r
+"languages.jpn":"Japanese",\r
+"languages.jav":"Javanese",\r
+"languages.kal":"Kalaallisut",\r
+"languages.kan":"Kannada",\r
+"languages.kau":"Kanuri",\r
+"languages.kas":"Kashmiri",\r
+"languages.kaz":"Kazakh",\r
+"languages.khm":"Khmer",\r
+"languages.kik":"Kikuyu",\r
+"languages.kin":"Kinyarwanda",\r
+"languages.kir":"Kyrgyz",\r
+"languages.kom":"Komi",\r
+"languages.kon":"Kongo",\r
+"languages.kor":"Korean",\r
+"languages.kur":"Kurdish",\r
+"languages.kua":"Kwanyama",\r
+"languages.lat":"Latin",\r
+"languages.ltz":"Luxembourgish",\r
+"languages.lug":"Ganda",\r
+"languages.lim":"Limburgish",\r
+"languages.lin":"Lingala",\r
+"languages.lao":"Lao",\r
+"languages.lit":"Lithuanian",\r
+"languages.lub":"Luba-Katanga",\r
+"languages.lav":"Latvian",\r
+"languages.glv":"Manx",\r
+"languages.mkd":"Macedonian",\r
+"languages.mlg":"Malagasy",\r
+"languages.msa":"Malay",\r
+"languages.mal":"Malayalam",\r
+"languages.mlt":"Maltese",\r
+"languages.mri":"Māori",\r
+"languages.mar":"Marathi",\r
+"languages.mah":"Marshallese",\r
+"languages.mon":"Mongolian",\r
+"languages.nau":"Nauru",\r
+"languages.nav":"Navajo",\r
+"languages.nob":"Norwegian Bokmål",\r
+"languages.nde":"North Ndebele",\r
+"languages.nep":"Nepali",\r
+"languages.ndo":"Ndonga",\r
+"languages.nno":"Norwegian Nynorsk",\r
+"languages.nor":"Norwegian",\r
+"languages.iii":"Nuosu",\r
+"languages.nbl":"South Ndebele",\r
+"languages.oci":"Occitan",\r
+"languages.oji":"Ojibwe",\r
+"languages.chu":"Old Church Slavonic",\r
+"languages.orm":"Oromo",\r
+"languages.ori":"Oriya",\r
+"languages.oss":"Ossetian",\r
+"languages.pan":"Panjabi",\r
+"languages.pli":"Pāli",\r
+"languages.fas":"Persian",\r
+"languages.pol":"Polish",\r
+"languages.pus":"Pashto",\r
+"languages.por":"Portuguese",\r
+"languages.que":"Quechua",\r
+"languages.roh":"Romansh",\r
+"languages.run":"Kirundi",\r
+"languages.ron":"Romanian",\r
+"languages.rus":"Russian",\r
+"languages.san":"Sanskrit",\r
+"languages.srd":"Sardinian",\r
+"languages.snd":"Sindhi",\r
+"languages.sme":"Northern Sami",\r
+"languages.smo":"Samoan",\r
+"languages.sag":"Sango",\r
+"languages.srp":"Serbian",\r
+"languages.gla":"Scottish Gaelic",\r
+"languages.sna":"Shona",\r
+"languages.sin":"Sinhala",\r
+"languages.slk":"Slovak",\r
+"languages.slv":"Slovene",\r
+"languages.som":"Somali",\r
+"languages.sot":"Southern Sotho",\r
+"languages.spa":"Spanish",\r
+"languages.sun":"Sundanese",\r
+"languages.swa":"Swahili",\r
+"languages.ssw":"Swati",\r
+"languages.swe":"Swedish",\r
+"languages.tam":"Tamil",\r
+"languages.tel":"Telugu",\r
+"languages.tgk":"Tajik",\r
+"languages.tha":"Thai",\r
+"languages.tir":"Tigrinya",\r
+"languages.bod":"Tibetan Standard",\r
+"languages.tuk":"Turkmen",\r
+"languages.tgl":"Tagalog",\r
+"languages.tsn":"Tswana",\r
+"languages.ton":"Tonga",\r
+"languages.tur":"Turkish",\r
+"languages.tso":"Tsonga",\r
+"languages.tat":"Tatar",\r
+"languages.twi":"Twi",\r
+"languages.tah":"Tahitian",\r
+"languages.uig":"Uighur",\r
+"languages.ukr":"Ukrainian",\r
+"languages.urd":"Urdu",\r
+"languages.uzb":"Uzbek",\r
+"languages.ven":"Venda",\r
+"languages.vie":"Vietnamese",\r
+"languages.vol":"Volapük",\r
+"languages.win":"Walloon",\r
+"languages.cym":"Welsh",\r
+"languages.wol":"Wolof",\r
+"languages.fry":"Western Frisian",\r
+"languages.xho":"Xhosa",\r
+"languages.yid":"Yiddish",\r
+"languages.yor":"Yoruba",\r
+"languages.zha":"Zhuang",\r
+"languages.zul":"Zulu",\r
+"tags.title":"Tags",\r
+"tags.categorized":"Categorized index of the {0} tags",\r
+"tags.categorized.single":"Categorized index of the single tag",\r
+"tags.alphabetical.many":"Alphabetical index of the {0} tags",\r
+"tags.alphabetical.one":"Alphabetical index of the single tag",\r
+"tags.alphabetical.none":"Alphabetical index of absolutely no tag",\r
+"splitByLetter.tag.other":"Other tags",\r
+"authors.series.title":"Series: {0}",\r
+"authors.title":"Authors",\r
+"authors.alphabetical.many":"Alphabetical index of the {0} authors",\r
+"authors.alphabetical.one":"Alphabetical index of the single author",\r
+"authors.alphabetical.none":"Alphabetical index of absolutely no author",\r
+"splitByLetter.author.other":"Other authors",\r
+"series.title":"Series",\r
+"series.alphabetical.many":"Alphabetical index of the {0} series",\r
+"series.alphabetical.one":"Alphabetical index of the single series",\r
+"series.alphabetical.none":"Alphabetical index of absolutely no series",\r
+"splitByLetter.series.other":"Other series",\r
+"recent.title":"Recent additions",\r
+"recent.list":"{0} most recent books",\r
+"recent.list.single":"Most recent single book",\r
+"rating.title":"Rating",\r
+"rating.summary":"{0}, grouped by rating",\r
+"allbooks.title":"All books",\r
+"allbooks.alphabetical.many":"Alphabetical index of the {0} books",\r
+"allbooks.alphabetical.one":"Alphabetical index of the single book",\r
+"allbooks.alphabetical.none":"Alphabetical index of absolutely no book",\r
+"splitByLetter.book.other":"Other books",\r
+"main.title":"Calibre library",\r
+"main.summary":"{0} has catalogued {1}",\r
+"startup.newhome":"Default configuration folder home redirected to {0}",\r
+"startup.redirectfound":".redirect file found in {0}",\r
+"startup.redirectreadfail":"... failure reading .redirect file",\r
+"startup.redirectnotfound":"... unable to find redirect folder {0}",\r
+"startup.redirectabandoned":"... so redirect abandoned",\r
+"startup.redirecting":"redirecting home folder to {0}",\r
+"startup.configusing":"Using configuration folder {0}",\r
+"startup.folderuserhome":"Try configuration folder in user home folder {0}",\r
+"startup.foldertilde":"Try configuration folder from tilde folder {0}",\r
+"startup.folderjar":"Try configuration folder from .jar location {0}",\r
+"startup.foldernotexist":"... but specified folder does not exist",\r
+"i18n.and":"and",\r
+"i18n.downloads":"Downloads, links and other catalogs",\r
+"i18n.links":"Links and other catalogs",\r
+"i18n.coversection":"Cover",\r
+"i18n.downloadfile":"Download file",\r
+"i18n.downloadsection":"Downloads",\r
+"i18n.relatedsection":"Related catalogs",\r
+"i18n.linksection":"External links",\r
+"i18n.backToMain":"Back to the main page of the catalog",\r
+"i18n.summarysection":"Description",\r
+"i18n.dateGenerated":"Catalog generated on {0}",\r
+"deeplevel.summary":"{0} broken up by authors, tags, etc. ",\r
+"about.title":"About COPS",\r
+"customize.title":"Customize COPS",\r
+"about.summary":"Notes on using Calibre2Opds",\r
+"usage.intro":"The options are taken from the configuration file located at {0}",\r
+"language.title":"Language",\r
+"config.Language.description":"This setting changes the language used by the program ; use the standard ISO language code (e.g. EN, FR, DE...)",\r
+"config.Language.possible":"Possible values : {0}",\r
+"intro.goal":"Generate OPDS and HTML catalogs from your Calibre ebooks database",\r
+"intro.wiki.title":"The project''s home : ",\r
+"intro.wiki.url":"http://calibre2opds.com",\r
+"intro.team.title":"The Calibre2Opds team :",\r
+"intro.team.list1":"David Pierron - main programmer",\r
+"intro.team.list2":"Dave Walker - guru, features manager and tester extraordinaire",\r
+"intro.team.list3":"Farid Soussi - css and html guru",\r
+"intro.team.list4":"Douglas Steele - programmer",\r
+"intro.team.list5":"Jane Litte - beta tester and moral support",\r
+"intro.thanks.1":"Special thanks to Kb Sriram, who not only programmed Trook, an excellent and OPDS compatible ",\r
+"intro.thanks.2":"library manager for the Nook, but also was kind enough to donate a Nook !",\r
+"search.result":"Search result for *{0}*",\r
+"search.sortorder.asc":"Asc",\r
+"search.sortorder.desc":"Desc",\r
+"permalink.alternate":"Permalink",\r
+"home.alternate":"Home",\r
+"search.alternate":"Search",\r
+"sort.alternate":"Sort",\r
+"settings.alternate":"Settings and Menu",\r
+"paging.next.alternate":"Next",\r
+"paging.previous.alternate":"Previous",\r
+"customize.title":"Customize COPS UI",\r
+"customize.style":"Theme",\r
+"customize.fancybox":"Use a Lightbox",\r
+"customize.paging":"Max number of books per page (-1 to disable)",\r
+"customize.pages":"Max number of pages at one level",\r
+"customize.email":"Set your email (to allow book emailing)",\r
+"customize.filter":"Enable tag filtering",\r
+"mail.messagenotsent":"Message could not be sent.",\r
+"mail.messagesent":"Message has been sent",\r
+"fin":"fin"\r
+}\r
diff --git a/www/lang/Localization_es.json b/www/lang/Localization_es.json
new file mode 100644 (file)
index 0000000..83f3049
--- /dev/null
@@ -0,0 +1,100 @@
+{\r
+"boolean.yes":"si",\r
+"splitByLetter.letter":"{0} que empiezan por {1}",\r
+"home.title":"Catalogo principal",\r
+"link.fullentry":"Entrada completa",\r
+"title.nextpage":"next page ({0} de {1})",\r
+"title.lastpage":"pagina siguiente (ultima)",\r
+"title.numberOfPages":"{0} ({1} paginas)",\r
+"bookword.title":"Libros",\r
+"bookword.none":"Sin libros",\r
+"bookword.one":"1 libro",\r
+"bookword.many":"{0} libros",\r
+"authorword.title":"Autores",\r
+"authorword.none":"Sin autor",\r
+"authorword.one":"1 autor",\r
+"authorword.many":"{0} autores",\r
+"taglevelword.title":"Niveles de Etiquetas",\r
+"taglevelword.none":"Sin nivel de etiquetas",\r
+"taglevelword.one":"1 nivel de etiqueta",\r
+"taglevelword.many":"{0} niveles de etiquetas",\r
+"seriesword.none":"Sin series",\r
+"seriesword.one":"1 serie",\r
+"seriesword.many":"series",\r
+"tagword.title":"Etiquetas",\r
+"tagword.none":"Sin etiquetas",\r
+"tagword.one":"1 etiqueta",\r
+"tagword.many":"etiquetas",\r
+"content.tags":"Etiquetas:",\r
+"content.series.data":"Libro {0} en la {1} serie",\r
+"content.publisher":"Editorial:",\r
+"content.publisher.data":"Publicado {1} por {0}",\r
+"content.summary":"Sumario:",\r
+"bookentry.series":"Libro {0} en la {1} serie",\r
+"bookentry.author":"{0} de {1}",\r
+"bookentry.tags":"{0} en {1}",\r
+"bookentry.ratings":"{0} puntuados {1}",\r
+"bookentry.goodreads":"Este libro en Goodreads",\r
+"bookentry.goodreads.review":"Comenta este libro en Goodreads",\r
+"bookentry.goodreads.author":"{0} en Goodreads",\r
+"bookentry.wikipedia":"Este libro en Wikipedia",\r
+"bookentry.wikipedia.author":"{0} en Wikipedia",\r
+"bookentry.librarything":"Este libro en LibraryThing",\r
+"bookentry.librarything.author":"{0} en LibraryThing",\r
+"bookentry.amazon":"Este libro en Amazon",\r
+"bookentry.amazon.author":"{0} en Amazon",\r
+"bookentry.isfdb.author":"{0} en ISFDB",\r
+"bookentry.download":"Descargar este libro como {0}",\r
+"bookentry.rated":"{0} {1}",\r
+"bookentry.fullentrylink":"Entrada completa",\r
+"tags.title":"etiquetas",\r
+"tags.categorized":"Listado por categorias de las {0} etiquetas",\r
+"tags.categorized.single":"Listado por categorias de la unica etiqueta",\r
+"tags.alphabetical.many":"Listado alfabético de las {0} etiquetas",\r
+"tags.alphabetical.one":"Listado Alfabético de la unica etiqueta",\r
+"splitByLetter.tag.other":"Otras etiquetas",\r
+"authors.series.title":"Series",\r
+"authors.title":"Autores",\r
+"authors.alphabetical.many":"Indice alfabético de {0}",\r
+"authors.alphabetical.one":"Indice de un solo autor",\r
+"splitByLetter.author.other":"Otros Autores",\r
+"series.title":"Series:",\r
+"series.alphabetical.many":"Indice alfabético de {0}",\r
+"series.alphabetical.one":"Indice de una sola serie",\r
+"splitByLetter.series.other":"Otras series",\r
+"recent.title":"Añadidos recientemente",\r
+"recent.list":"{0} libros más recientes",\r
+"recent.list.single":"El libro más reciente",\r
+"rating.title":"Valoración",\r
+"rating.summary":"{0}, agrupados por valoración",\r
+"allbooks.title":"Todos los libros",\r
+"allbooks.alphabetical.many":"Indice alfabético de {0} libros",\r
+"allbooks.alphabetical.one":"Indice de un solo ",\r
+"splitByLetter.book.other":"Otros libros",\r
+"main.title":"Biblioteca generada de calibre",\r
+"main.summary":"{0} ha catalogado {1}",\r
+"i18n.downloads":"Descargas, enlaces y otros catálogos",\r
+"i18n.links":"Enlaces y otros catálogos",\r
+"i18n.downloadfile":"Descargar fichero",\r
+"i18n.downloadsection":"Descargas, enlaces y otros",\r
+"i18n.relatedsection":"Catálogos relacionados",\r
+"i18n.linksection":"Enlaces externos",\r
+"i18n.backToMain":"Volver a la página de inicio del catálogo",\r
+"i18n.summarysection":"Resumen",\r
+"i18n.dateGenerated":"Catálogo creado el {0}",\r
+"deeplevel.summary":"{0} por autores, etiquetas, etc.",\r
+"about.summary":"Notas de Uso",\r
+"usage.intro":"Las opciones provienen del fichero de configuración presente en: {0}",\r
+"language.title":"Idioma",\r
+"config.Language.description":"Esta opción cambia el idioma del programa; use un código ISO estándar  (ej: EN, FR, DE, ES...)",\r
+"config.Language.possible":"Valores posibles: {0}",\r
+"intro.goal":"Genear catálogos OPDS y HTML desde la biblioteca de calibre",\r
+"intro.team.title":"El equipo de Calibre2Opds:",\r
+"intro.team.list1":"David Pierron - Programador principal",\r
+"intro.team.list2":"Dave Walker - guru, opciones, gestión y tester extraordinaire",\r
+"intro.team.list4":"Douglas Steele - programador",\r
+"intro.team.list5":"Jane Litte - beta tester y apoyo moral",\r
+"intro.thanks.1":"Gracias especiales a Kb Sriram, que no solo ha programado Trook, un gestor de bibliotecas OPDS excelente y compatible",\r
+"intro.thanks.2":"con el Nook, sino que además ha sido tan amable de donar un Nook",\r
+"fin":"fin"\r
+}\r
diff --git a/www/lang/Localization_fr.json b/www/lang/Localization_fr.json
new file mode 100644 (file)
index 0000000..840e38d
--- /dev/null
@@ -0,0 +1,131 @@
+{\r
+"boolean.no":"non",\r
+"boolean.yes":"oui",\r
+"splitByLetter.letter":"{0} débutant par {1}",\r
+"home.title":"Catalogue principal",\r
+"link.fullentry":"Entrée complète",\r
+"title.nextpage":"page suivante ({0} sur {1})",\r
+"title.lastpage":"page suivante (dernière)",\r
+"title.numberOfPages":"{0} ({1} pages)",\r
+"pubdate.title":"Année de publication",\r
+"bookword.title":"Livres",\r
+"bookword.none":"Aucun livre",\r
+"bookword.one":"1 livre",\r
+"bookword.many":"{0} livres",\r
+"authorword.title":"Auteurs",\r
+"authorword.none":"Pas d'auteur",\r
+"authorword.one":"1 auteur",\r
+"authorword.many":"{0} auteurs",\r
+"taglevelword.title":"Niveaux",\r
+"taglevelword.none":"Pas de niveau",\r
+"taglevelword.one":"1 niveau",\r
+"taglevelword.many":"{0} niveaux",\r
+"seriesword.title":"Collections",\r
+"seriesword.none":"Pas de collection",\r
+"seriesword.one":"1 collection",\r
+"seriesword.many":"{0} collections",\r
+"tagword.title":"Étiquettes",\r
+"tagword.none":"Sans étiquette",\r
+"tagword.one":"1 étiquette",\r
+"tagword.many":"{0} étiquettes",\r
+"content.tags":"Étiquettes:",\r
+"content.series":"Collection:",\r
+"content.series.data":"Livre {0} dans la collection {1}",\r
+"content.publisher":"Editeur:",\r
+"content.published":"Publié:",\r
+"content.publisher.data":"Publié {0} le {1}",\r
+"content.summary":"Résumé:",\r
+"bookentry.series":"Livre {0} dans la collection {1}",\r
+"bookentry.author":"{0} de {1}",\r
+"bookentry.tags":"{0} dans {1}",\r
+"bookentry.ratings":"{0} notés {1}",\r
+"bookentry.goodreads":"Ce livre sur Goodreads",\r
+"bookentry.goodreads.review":"Critique du livre sur Goodreads",\r
+"bookentry.goodreads.author":"{0} sur Goodreads",\r
+"bookentry.wikipedia":"Ce livre sur Wikipedia",\r
+"bookentry.wikipedia.author":"{0} sur Wikipedia",\r
+"bookentry.librarything":"Ce livre sur LibraryThing",\r
+"bookentry.librarything.author":"{0} sur LibraryThing",\r
+"bookentry.amazon":"Ce livre sur Amazon",\r
+"bookentry.amazon.author":"{0} sur Amazon",\r
+"bookentry.isfdb.author":"{0} sur ISFDB",\r
+"bookentry.download":"Télécharger ce livre au format {0}",\r
+"bookentry.rated":"{0} {1}",\r
+"bookentry.fullentrylink":"Entrée complète",\r
+"languages.title":"Langues",\r
+"languages.alphabetical.many":"Index alphabétique des {0} langues",\r
+"languages.alphabetical.one":"Index alphabétique de la seule langue",\r
+"tags.title":"Étiquettes",\r
+"tags.categorized":"Index ordonné des {0} étiquettes",\r
+"tags.categorized.single":"Index ordonné de la seule étiquette disponible",\r
+"tags.alphabetical.many":"Index alphabétique des {0} étiquettes",\r
+"tags.alphabetical.one":"Index alphabétique de la seule étiquette",\r
+"splitByLetter.tag.other":"Autres étiquettes",\r
+"authors.series.title":"Collection: {0}",\r
+"authors.title":"Auteurs",\r
+"authors.alphabetical.many":"Index alphabétique des {0} auteurs",\r
+"authors.alphabetical.one":"Index alphabétique du seul auteur",\r
+"splitByLetter.author.other":"Autres auteurs",\r
+"series.title":"Collections",\r
+"series.alphabetical.many":"Index alphabétique de {0} collections",\r
+"series.alphabetical.one":"Index alphabétique de la seule collection",\r
+"splitByLetter.series.other":"Autres collections",\r
+"recent.title":"Ajouts récents",\r
+"recent.list":"{0} livres les plus récents",\r
+"recent.list.single":"Ajouté récemment",\r
+"rating.title":"Appréciations",\r
+"rating.summary":"{0}, par appréciation",\r
+"allbooks.title":"Tous les livres",\r
+"allbooks.alphabetical.many":"Index alphabétique des {0} livres",\r
+"allbooks.alphabetical.one":"Index alphabétique du seul livre",\r
+"splitByLetter.book.other":"Autres livres",\r
+"main.title":"Bibliothèque gérée par Calibre",\r
+"main.summary":"{0} a catalogué {1}",\r
+"i18n.downloads":"Téléchargements, liens et autres catalogues",\r
+"i18n.links":"Liens et autres catalogues",\r
+"i18n.coversection":"Couverture",\r
+"i18n.downloadfile":"Télécharger fichier",\r
+"i18n.downloadsection":"Téléchargements",\r
+"i18n.relatedsection":"Catalogues similaires",\r
+"i18n.linksection":"Liens externes",\r
+"i18n.backToMain":"Page principale du catalogue",\r
+"i18n.summarysection":"Résumé",\r
+"i18n.dateGenerated":"Catalogue généré le {0}",\r
+"deeplevel.summary":"{0} par auteur, étiquette, etc.",\r
+"about.title":"A propos de COPS",\r
+"about.summary":"Notes d'utilisation",\r
+"usage.intro":"Les options sont tirées du fichier de configuration qui se trouve ici : {0}",\r
+"language.title":"Langue",\r
+"config.Language.description":"Fixe la langue utilisée par le programme ; Code ISO Standard (ex: EN, FR, DE...)",\r
+"config.Language.possible":"Valeurs proposées : {0}",\r
+"intro.goal":"Génère des catalogues OPDS et HTML à partir de votre base de données de Calibre",\r
+"intro.wiki.title":"Le site du projet :",\r
+"intro.team.title":"L'équipe Calibre2Opds :",\r
+"intro.team.list1":"David Pierron - programmeur principal",\r
+"intro.team.list2":"Dave Walker - guru, responsable des fonctionnalités et testeur extraordinaire",\r
+"intro.team.list3":"Farid Soussi - guru HTML et CSS",\r
+"intro.team.list4":"Douglas Steele - programmeur",\r
+"intro.team.list5":"Jane Litte - beta testeuse et soutien moral",\r
+"intro.thanks.1":"Remerciements particuliers à Kb Sriram, qui est l'auteur de Trook, un excellent",\r
+"intro.thanks.2":"gestionnaire de bibliothèque pour Nook, et a m'a fait cadeau d'un Nook !",\r
+"search.result":"Résultats pour *{0}*",\r
+"search.sortorder.asc":"Crois.",\r
+"search.sortorder.desc":"Décrois.",\r
+"permalink.alternate":"Permalien",\r
+"home.alternate":"Accueil",\r
+"search.alternate":"Rechercher",\r
+"sort.alternate":"Trier",\r
+"paging.next.alternate":"Suivant",\r
+"paging.previous.alternate":"Précédent",\r
+"customize.title":"Paramétrage de COPS",\r
+"customize.style":"Thème",\r
+"customize.fancybox":"Utiliser une Lightbox",\r
+"customize.paging":"Nombre de livres par page (-1 pour désactiver)",\r
+"customize.email":"Adresse email (pour l'envoi automatique de livres)",\r
+"customize.filter":"Filtrage via les étiquettes",\r
+"languages.eng":"Anglais",\r
+"languages.fra":"Français",\r
+"mail.messagenotsent":"Le message n'a pas pu être envoyé.",\r
+"mail.messagesent":"Le message a été envoyé",\r
+"fin":"fin"\r
+}\r
diff --git a/www/lang/Localization_it.json b/www/lang/Localization_it.json
new file mode 100644 (file)
index 0000000..ee5b369
--- /dev/null
@@ -0,0 +1,102 @@
+{\r
+"boolean.yes":"sì",\r
+"splitByLetter.letter":"{0} che iniziano per {1}",\r
+"home.title":"Catalogo principale",\r
+"link.fullentry":"Scheda completa",\r
+"title.nextpage":"pagina seguente ({0} di {1})",\r
+"title.lastpage":"pagina seguente (ultima)",\r
+"title.numberOfPages":"{0} ({1} pagine)",\r
+"bookword.title":"Libri",\r
+"bookword.none":"Nessun libro",\r
+"bookword.one":"1 libro",\r
+"bookword.many":"{0} libri",\r
+"authorword.title":"Autori",\r
+"authorword.none":"Senza autore",\r
+"authorword.one":"1 autore",\r
+"authorword.many":"{0} autori",\r
+"taglevelword.title":"Livelli",\r
+"taglevelword.none":"Nessun livello",\r
+"taglevelword.one":"1 livello",\r
+"taglevelword.many":"{0} livelli",\r
+"seriesword.title":"Collane",\r
+"seriesword.none":"Nessuna collana",\r
+"seriesword.one":"1 collana",\r
+"seriesword.many":"{0} collane",\r
+"tagword.title":"Argomenti",\r
+"tagword.none":"Senza argomento",\r
+"tagword.one":"1 argomento",\r
+"tagword.many":"{0} argomenti",\r
+"content.tags":"Argomenti:",\r
+"content.series":"Collana:",\r
+"content.series.data":"Libro {0} nella collana {1}",\r
+"content.publisher":"Editore:",\r
+"content.publisher.data":"Pubblicato {0} il {1}",\r
+"content.summary":"Riassunto:",\r
+"bookentry.series":"Libro {0} nella collana {1}",\r
+"bookentry.author":"{0} di {1}",\r
+"bookentry.ratings":"{0} annotati {1}",\r
+"bookentry.goodreads":"Questo libro su Goodreads",\r
+"bookentry.goodreads.review":"Commenta questo libro su Goodreads",\r
+"bookentry.goodreads.author":"{0} su Goodreads",\r
+"bookentry.wikipedia":"Questo libro su Wikipedia",\r
+"bookentry.wikipedia.author":"{0} su Wikipedia",\r
+"bookentry.librarything":"Questo libro su LibraryThing",\r
+"bookentry.librarything.author":"{0} su LibraryThing",\r
+"bookentry.amazon":"Questo libro su Amazon",\r
+"bookentry.amazon.author":"{0} su Amazon",\r
+"bookentry.isfdb.author":"{0} su ISFDB",\r
+"bookentry.download":"Scarica questo libro nel formato {0}",\r
+"bookentry.rated":"{0} {1}",\r
+"bookentry.fullentrylink":"Scheda completa",\r
+"tags.title":"Argomenti",\r
+"tags.categorized":"Indice ordinato di {0} argomenti",\r
+"tags.categorized.single":"Indice ordinato del solo argomento disponibile",\r
+"tags.alphabetical.many":"Indice alfabetico di {0} argomenti",\r
+"tags.alphabetical.one":"Indice alfabetico del solo argomento",\r
+"splitByLetter.tag.other":"Altri argomenti",\r
+"authors.series.title":"Collane: {0}",\r
+"authors.title":"Autori",\r
+"authors.alphabetical.many":"Indice alfabetico di {0} autori",\r
+"authors.alphabetical.one":"Indice alfabetico di un solo autore",\r
+"splitByLetter.author.other":"Altri autori",\r
+"series.title":"Collane",\r
+"series.alphabetical.many":"Indice alfabetico di {0} collane",\r
+"series.alphabetical.one":"Indice alfabetico di una sola collana",\r
+"splitByLetter.series.other":"Altre collane",\r
+"recent.title":"Ultime aggiunte",\r
+"recent.list":" I {0} libri più recenti",\r
+"recent.list.single":"Il libro più recente",\r
+"rating.title":"Valutazioni",\r
+"rating.summary":"{0}, per valutazioni",\r
+"allbooks.title":"Tutti i libri",\r
+"allbooks.alphabetical.many":"Indice alfabetico di {0} libri",\r
+"allbooks.alphabetical.one":"Indice alfabetico di un solo libro",\r
+"splitByLetter.book.other":"Altri libri",\r
+"main.title":"Biblioteca generata da Calibre",\r
+"main.summary":"{0} ha catalogato {1}",\r
+"i18n.downloads":"Scarica, collegamenti e altri cataloghi",\r
+"i18n.links":"Collegamenti e altri cataloghi",\r
+"i18n.downloadfile":"Scarica il documento",\r
+"i18n.downloadsection":"Scaricati",\r
+"i18n.relatedsection":"Cataloghi simili",\r
+"i18n.linksection":"Collegamenti esterni",\r
+"i18n.backToMain":"Pagina principale del catalogo",\r
+"i18n.summarysection":"Riassunto",\r
+"i18n.dateGenerated":"Catalogo generato il {0}",\r
+"deeplevel.summary":"{0} par autore, etichetta, ecc.",\r
+"about.summary":"Note d'utilizzo",\r
+"usage.intro":"Le opzioni sono prese dal file di configuraziones che si trova qui: {0}",\r
+"language.title":"Lingua",\r
+"config.Language.description":"Scegli la lingua da utilizzare ; usa il codice ISO standard (es: EN, FR, DE...)",\r
+"config.Language.possible":"Valori proposti: {0}",\r
+"intro.goal":"Crea cataloghi OPDS e HTML a partire dalla tua banca dati di Calibre",\r
+"intro.wiki.title":"Il sito del progetto: ",\r
+"intro.team.title":"Il team Calibre2Opds:",\r
+"intro.team.list1":"David Pierron - programmatore principale",\r
+"intro.team.list2":"Dave Walker - guru, responsabile delle funzionalità e collaudatore straordinario",\r
+"intro.team.list4":"Douglas Steele - programmatore",\r
+"intro.team.list5":"Jane Litte - collaudatrice beta e sostegno morale",\r
+"intro.thanks.1":"Un ringraziamento particolare a Kb Sriram, autore di Trook, un eccellente ",\r
+"intro.thanks.2":"gestore di biblioteche per Nook, che mi ha regalato un Nook!",\r
+"fin":"fin"\r
+}\r
diff --git a/www/lang/Localization_nb.json b/www/lang/Localization_nb.json
new file mode 100644 (file)
index 0000000..6b0ce37
--- /dev/null
@@ -0,0 +1,144 @@
+{
+"boolean.no":"nei",
+"boolean.yes":"ja",
+"splitByLetter.letter":"{0} begynner med {1}",
+"home.title":"Hovedkatalog",
+"link.fullentry":"Full oppføring",
+"title.nextpage":"neste side ({0} av {1})",
+"title.lastpage":"neste side (siste)",
+"title.numberOfPages":"{0} ({1} sider)",
+"pubdate.title":"Publikasjonsår",
+"bookword.title":"Bøker",
+"bookword.none":"Ingen bøker",
+"bookword.one":"1 bok",
+"bookword.many":"{0} bøker",
+"authorword.title":"Forfattere",
+"authorword.none":"Ingen forfattere",
+"authorword.one":"1 forfatter",
+"authorword.many":"{0} forfattere",
+"taglevelword.title":"Stikkordnivåer",
+"taglevelword.none":"Ingen stikkordnivåer",
+"taglevelword.one":"1 stikkordnivå",
+"taglevelword.many":"{0} stikkordnivå",
+"seriesword.title":"Serier",
+"seriesword.none":"Ingen serier",
+"seriesword.one":"1 serie",
+"seriesword.many":"{0} serier",
+"tagword.title":"Stikkord",
+"tagword.none":"Ingen stikkord",
+"tagword.one":"1 stikkord",
+"tagword.many":"{0} stikkord",
+"content.tags":"Stikkord:",
+"content.series":"Serier:",
+"content.series.data":"Bok {0} i serien {1}",
+"content.publisher":"Utgiver:",
+"content.published":"Utgitt:",
+"content.added":"Lagt til: ",
+"content.modified":"Endret:",
+"content.publisher.data":"Utgitt {1} av {0}",
+"content.summary":"Sammendrag",
+"bookentry.series":"Bok {0} i serien {1}",
+"bookentry.author":"{0} av {1}",
+"bookentry.tags":"{0} i {1}",
+"bookentry.ratings":"{0} rated {1}",
+"bookentry.goodreads":"Denne boka på Goodreads",
+"bookentry.goodreads.review":"Anmeld denne boka på Goodreads",
+"bookentry.goodreads.author":"{0} på Goodreads",
+"bookentry.wikipedia":"Denne boka på Wikipedia",
+"bookentry.wikipedia.author":"{0} på Wikipedia",
+"bookentry.librarything":"Denne boka på LibraryThing",
+"bookentry.librarything.author":"{0} på LibraryThing",
+"bookentry.amazon":"Denne boka på Amazon",
+"bookentry.amazon.author":"{0} på Amazon",
+"bookentry.isfdb.author":"{0} på ISFDB",
+"bookentry.download":"Last ned denne eboka som {0}",
+"bookentry.rated":"{0} {1}",
+"bookentry.fullentrylink":"Full oppføring",
+"languages.title":"Språk",
+"languages.categorized":"Kategorisert indeks for de {0} språkene",
+"languages.categorized.single":"Kategorisert indeks for ett enkelt språk",
+"languages.alphabetical.many":"Alfabetisk indek for de {0} språkene",
+"languages.alphabetical.one":"Alfabetisk indeks for ett enkelt språk",
+"languages.alphabetical.none":"Alfabetisk indeks for absolutt ingen språk",
+"languages.nob":"Norsk bokmål",
+"tags.title":"Stikkord",
+"tags.categorized":"Kategorisert indeks for {0} stikkord",
+"tags.categorized.single":"Kategorisert indeks for ett enkelt stikkord",
+"tags.alphabetical.many":"Alfabetisk indeks for {0} stikkord",
+"tags.alphabetical.one":"Alfabetisk indeks for ett enkelt stikkord",
+"tags.alphabetical.none":"Alfabetisk indeks for ingen stikkord",
+"splitByLetter.tag.other":"Andre stikkord",
+"authors.series.title":"Serier: {0}",
+"authors.title":"Forfattere",
+"authors.alphabetical.many":"Alfabetisk indeks for {0} forfattere",
+"authors.alphabetical.one":"Alfabetisk indeks for èn forfatter",
+"authors.alphabetical.none":"Alfabetisk indeks for ingen forfattere",
+"splitByLetter.author.other":"Andre forfattere",
+"series.title":"Serier",
+"series.alphabetical.many":"Alfabetisk indeks for {0} serier",
+"series.alphabetical.one":"Alfabetisk indeks for èn enkelt serie",
+"series.alphabetical.none":"Alfabetisk indeks for ingen serier",
+"splitByLetter.series.other":"Andre serier",
+"recent.title":"Nylig lagt til",
+"recent.list":"{0} nyeste bøker",
+"recent.list.single":"Nyeste enkeltbok",
+"rating.title":"Vurdering",
+"rating.summary":"{0}, gruppert etter vurdering",
+"allbooks.title":"Alle bøker",
+"allbooks.alphabetical.many":"Alfabetisk indeks for {0} bøker",
+"allbooks.alphabetical.one":"Alfabetisk indeks for èn enkelt bok",
+"allbooks.alphabetical.none":"Alfabetisk indeks for absolutt ingen bøker",
+"splitByLetter.book.other":"Andre bøker",
+"main.title":"Calibre-bibliotek",
+"main.summary":"{0} har katalogisert {1}",
+"startup.newhome":"Standard konfigurasjonsmappe omdirigert til {0}",
+"startup.redirectfound":".redirect fil finnet i {0}",
+"startup.redirectreadfail":"... feil ved innlesing av .redirect fil",
+"startup.redirectnotfound":"... kunne ikke finne omdirigeringsmappe {0}",
+"startup.redirectabandoned":"... så omdirigering er avbrutt",
+"startup.redirecting":"omdirigerer hjemmemappe til {0}",
+"startup.configusing":"Bruker konfigurasjonsmappe {0}",
+"startup.folderuserhome":"Prøv konfigurasjonsmappe i brukers hjemmemappe {0}",
+"startup.foldertilde":"Prøv konfigurasjonsmappe fra tilde-mappe {0}",
+"startup.folderjar":"Prøv konfigurasjonsmappe fra .jar plassering {0}",
+"startup.foldernotexist":"... men spesifisert mappe eksisterer ikke",
+"i18n.and":"og",
+"i18n.downloads":"Nedlastinger, lenker og andre kataloger",
+"i18n.links":"Lenker og andre kataloger",
+"i18n.coversection":"Omslag",
+"i18n.downloadfile":"Last ned fil",
+"i18n.downloadsection":"Nedlastinger",
+"i18n.relatedsection":"Relaterte kataloger",
+"i18n.linksection":"Eksterne lenker",
+"i18n.backToMain":"Tilbake til hovedside for katalogen",
+"i18n.summarysection":"Beskrivelse",
+"i18n.dateGenerated":"Katalog generert den {0}",
+"deeplevel.summary":"{0} brutt ned på forfattere, stikkord, osv. ",
+"about.title":"Om COPS",
+"about.summary":"Merknader om bruk av Calibre2Opds",
+"usage.intro":"Innstillinger er tatt fra konfigurasjonsfila som ligger i {0}",
+"language.title":"Språk",
+"config.Language.description":"Denne innstillingen endrer språket som benyttes av programmet; bruk standard ISO språkkoder (e.g. EN, FR, DE...)",
+"config.Language.possible":"Mulige verdier : {0}",
+"intro.goal":"Generer OPDS- og HTML-kataloger fra din Calibre ebokdatabase",
+"intro.wiki.title":"Prosjektets hjemmeside : ",
+"intro.wiki.url":"http://calibre2opds.com",
+"intro.team.title":"Calibre2Opds-teamet :",
+"intro.team.list1":"David Pierron - main programmer",
+"intro.team.list2":"Dave Walker - guru, features manager and tester extraordinaire",
+"intro.team.list3":"Farid Soussi - css and html guru",
+"intro.team.list4":"Douglas Steele - programmer",
+"intro.team.list5":"Jane Litte - beta tester and moral support",
+"intro.thanks.1":"Special thanks to Kb Sriram, who not only programmed Trook, an excellent and OPDS compatible ",
+"intro.thanks.2":"library manager for the Nook, but also was kind enough to donate a Nook !",
+"search.result":"Søkeresultat for *{0}*",
+"search.sortorder.asc":"Stigende",
+"search.sortorder.desc":"Synkende",
+"permalink.alternate":"Permalenke",
+"home.alternate":"Hjem",
+"search.alternate":"Søk",
+"sort.alternate":"Sorter",
+"paging.next.alternate":"Neste",
+"paging.previous.alternate":"Forrige",
+"fin":"fin"
+}
diff --git a/www/lang/Localization_nl.json b/www/lang/Localization_nl.json
new file mode 100644 (file)
index 0000000..6b9efae
--- /dev/null
@@ -0,0 +1,122 @@
+{\r
+"boolean.no":"nee",\r
+"boolean.yes":"ja",\r
+"splitByLetter.letter":"{0} beginnend met {1}",\r
+"home.title":"Hoofd catalogus",\r
+"link.fullentry":"Volledige invoer",\r
+"title.nextpage":"Volgende pagina ({0} van {1})",\r
+"title.lastpage":"Volgende pagina (last)",\r
+"title.numberOfPages":"{0} ({1} paginas)",\r
+"bookword.title":"Boeken",\r
+"bookword.none":"Geen boek",\r
+"bookword.one":"1 boek",\r
+"bookword.many":"{0} boeken",\r
+"authorword.title":"Auteurs",\r
+"authorword.none":"Geen auteur",\r
+"authorword.one":"1 auteur",\r
+"authorword.many":"{0} auteurs",\r
+"taglevelword.title":"Tag niveaus",\r
+"taglevelword.none":"Geen tag niveau",\r
+"taglevelword.one":"1 tag niveau",\r
+"taglevelword.many":"{0} tag niveaus",\r
+"seriesword.title":"Series",\r
+"seriesword.none":"Geen series",\r
+"seriesword.one":"1 serie",\r
+"seriesword.many":"{0} series",\r
+"tagword.title":"Tags",\r
+"tagword.none":"Geen tag",\r
+"tagword.one":"1 tag",\r
+"tagword.many":"{0} tags",\r
+"content.tags":"Tags:",\r
+"content.series":"Series:",\r
+"content.series.data":"Boek {0} in de {1} serie",\r
+"content.publisher":"Uitgever:",\r
+"content.published":"Uitgegeven:",\r
+"content.added":"Toegevoegd: ",\r
+"content.modified":"Gewijzigd:",\r
+"content.publisher.data":"Uitgegeven {1} door {0}",\r
+"content.summary":"Samenvatting",\r
+"bookentry.series":"Boek {0} in de {1} serie",\r
+"bookentry.author":"{0} door {1}",\r
+"bookentry.tags":"{0} in {1}",\r
+"bookentry.ratings":"{0} rated {1}",\r
+"bookentry.goodreads":"Dit boek op Goodreads",\r
+"bookentry.goodreads.review":"Review dit boek op Goodreads",\r
+"bookentry.goodreads.author":"{0} op Goodreads",\r
+"bookentry.wikipedia":"Dit boek op Wikipedia",\r
+"bookentry.wikipedia.author":"{0} op Wikipedia",\r
+"bookentry.librarything":"Dit boek op LibraryThing",\r
+"bookentry.librarything.author":"{0} op LibraryThing",\r
+"bookentry.amazon":"Dit boek op Amazon",\r
+"bookentry.amazon.author":"{0} op Amazon",\r
+"bookentry.isfdb.author":"{0} op ISFDB",\r
+"bookentry.download":"Download dit eboek als {0}",\r
+"bookentry.rated":"{0} {1}",\r
+"bookentry.fullentrylink":"Volledige invoer",\r
+"tags.title":"Tags",\r
+"tags.categorized":"Gecategorizeerde index van {0} tags",\r
+"tags.categorized.single":"Gecategorizeerde index van 1 tag",\r
+"tags.alphabetical.many":"Alfabetische index van {0} tags",\r
+"tags.alphabetical.one":"Alfabetische index van 1 tag",\r
+"splitByLetter.tag.other":"Andere tags",\r
+"authors.series.title":"Series: {0}",\r
+"authors.title":"Auteurs",\r
+"authors.alphabetical.many":"Alfabetische index van {0} auteurs",\r
+"authors.alphabetical.one":"Alfabetische index van 1 auteur",\r
+"splitByLetter.author.other":"Andere auteurs",\r
+"series.title":"Series",\r
+"series.alphabetical.many":"Alfabetische index van {0} series",\r
+"series.alphabetical.one":"Alfabetische index van 1 serie",\r
+"splitByLetter.series.other":"Andere series",\r
+"recent.title":"Recent toegevoegd",\r
+"recent.list":"{0} meest recente boeken",\r
+"recent.list.single":"Meest recente boek",\r
+"rating.title":"Rating",\r
+"rating.summary":"{0}, gegroepeerd per rating",\r
+"allbooks.title":"Alle boeken",\r
+"allbooks.alphabetical.many":"Alfabetische index van {0} boeken",\r
+"allbooks.alphabetical.one":"Alfabetische index van 1 boek",\r
+"splitByLetter.book.other":"Andere boeken",\r
+"main.title":"Calibre bibliotheek",\r
+"main.summary":"{0} heeft gecatalogiseerd {1}",\r
+"startup.newhome":"Standaard configuratie folder home doorverwezen naar {0}",\r
+"startup.redirectfound":".redirect file gevonden in {0}",\r
+"startup.redirectreadfail":"... fout bij lezen .redirect file",\r
+"startup.redirectnotfound":"... niet in staat doorverwijs folder {0} te vinden",\r
+"startup.redirectabandoned":"... dus doorverwijzing niet uitgevoerd",\r
+"startup.redirecting":"home folder wordt doorverwezen naar {0}",\r
+"startup.configusing":"Gebruikt configuratie folder {0}",\r
+"startup.folderuserhome":"Probeer configuratie folder in user home folder {0}",\r
+"startup.foldertilde":"Probeer configuratie folder uit tilde folder {0}",\r
+"startup.folderjar":"Probeer configuratie folder uit .jar locatie {0}",\r
+"startup.foldernotexist":"... maar gespecificeerde folder bestaat niet",\r
+"i18n.and":"en",\r
+"i18n.downloads":"Downloads, links en andere catalogi",\r
+"i18n.links":"Links en andere catalogi",\r
+"i18n.coversection":"Omslag",\r
+"i18n.downloadfile":"Download bestand",\r
+"i18n.downloadsection":"Downloads",\r
+"i18n.relatedsection":"Gerelateerde catalogi",\r
+"i18n.linksection":"Externe links",\r
+"i18n.backToMain":"Terug naar de hoofdpagina van de catalogus",\r
+"i18n.summarysection":"Omschrijving",\r
+"i18n.dateGenerated":"Catalogus gegenereerd op {0}",\r
+"deeplevel.summary":"{0} uitgesplitst naar auteurs, tags, etc. ",\r
+"about.summary":"Notities hoe Calibre2Opds te gebruiken",\r
+"usage.intro":"De opties worden uit het configuratie bestand {0} gebruikt",\r
+"language.title":"Taal",\r
+"config.Language.description":"Deze setting verandert de taal van het programma ; gebruik de standaard ISO taal code (e.g. EN, FR, DE...)",\r
+"config.Language.possible":"Mogelijke waardes : {0}",\r
+"intro.goal":"Genereer OPDS and HTML catalogi van je Calibre eboeken database",\r
+"intro.wiki.title":"The project''s home : ",\r
+"intro.wiki.url":"http://calibre2opds.com",\r
+"intro.team.title":"The Calibre2Opds team :",\r
+"intro.team.list1":"David Pierron - main programmer",\r
+"intro.team.list2":"Dave Walker - guru, features manager and tester extraordinaire",\r
+"intro.team.list3":"Farid Soussi - css and html guru",\r
+"intro.team.list4":"Douglas Steele - programmer",\r
+"intro.team.list5":"Jane Litte - beta tester and moral support",\r
+"intro.thanks.1":"Special thanks to Kb Sriram, who not only programmed Trook, an excellent and OPDS compatible ",\r
+"intro.thanks.2":"library manager for the Nook, but also was kind enough to donate a Nook !",\r
+"fin":"Einde"\r
+}\r
diff --git a/www/lang/Localization_ru.json b/www/lang/Localization_ru.json
new file mode 100644 (file)
index 0000000..d7cdb38
--- /dev/null
@@ -0,0 +1,305 @@
+{\r
+"boolean.no":"нет",\r
+"boolean.yes":"да",\r
+"splitByLetter.letter":"{0} начиная с {1}",\r
+"home.title":"Основной каталог",\r
+"link.fullentry":"Полный перечень",\r
+"title.nextpage":"следующая страница ({0} из {1})",\r
+"title.lastpage":"следующая страница (последняя)",\r
+"title.numberOfPages":"{0} ({1} страницы(а))",\r
+"pubdate.title":"Год публикации",\r
+"bookword.title":"Книги",\r
+"bookword.none":"Нет книг",\r
+"bookword.one":"1 книга",\r
+"bookword.many":"{0} книг(и)",\r
+"authorword.title":"Авторы",\r
+"authorword.none":"Нет авторов",\r
+"authorword.one":"1 автор",\r
+"authorword.many":"{0} авторов(а)",\r
+"taglevelword.title":"Уровни жанров",\r
+"taglevelword.none":"Нет уровней жанров",\r
+"taglevelword.one":"1 уровень жанров",\r
+"taglevelword.many":"{0} уровней(я) жанров",\r
+"seriesword.title":"Серии",\r
+"seriesword.none":"Нет серий",\r
+"seriesword.one":"1 серия",\r
+"seriesword.many":"{0} серий(и)",\r
+"tagword.title":"Жанры",\r
+"tagword.none":"Нет жанров",\r
+"tagword.one":"1 жанр",\r
+"tagword.many":"{0} жанров",\r
+"content.tags":"Жанры:",\r
+"content.series":"Серии:",\r
+"content.series.data":"Книга {0} в {1} серии",\r
+"content.publisher":"Издательство:",\r
+"content.published":"Опубликовано:",\r
+"content.publisher.data":"Опубликовано {1} издательством {0}",\r
+"content.summary":"Краткое содержание:",\r
+"bookentry.series":"Книга {0} в {1} серии",\r
+"bookentry.author":"{0} из {1}",\r
+"bookentry.tags":"{0} в {1}",\r
+"bookentry.ratings":"{0} оценено {1}",\r
+"bookentry.goodreads":"Эта книга на Goodreads",\r
+"bookentry.goodreads.review":"Обзор этой книги на Goodreads",\r
+"bookentry.goodreads.author":"{0} на Goodreads",\r
+"bookentry.wikipedia":"Эта книга на Wikipedia",\r
+"bookentry.wikipedia.author":"{0} на Wikipedia",\r
+"bookentry.librarything":"Эта книга на LibraryThing",\r
+"bookentry.librarything.author":"{0} на LibraryThing",\r
+"bookentry.amazon":"Эта книга на Amazon",\r
+"bookentry.amazon.author":"{0} на Amazon",\r
+"bookentry.isfdb.author":"{0} на ISFDB",\r
+"bookentry.download":"Скачать эту электронную книгу в формате {0}",\r
+"bookentry.rated":"{0} {1}",\r
+"bookentry.fullentrylink":"Полный перечень",\r
+"tags.title":"Жанры",\r
+"tags.categorized":"Категорированный указатель для {0} жанров",\r
+"tags.categorized.single":"Категорированный указатель для одного жанра",\r
+"tags.alphabetical.many":"Алфавитный указатель для {0} жанров",\r
+"tags.alphabetical.one":"Алфавитный указатель для одного жанра",\r
+"splitByLetter.tag.other":"Другие жанры",\r
+"authors.series.title":"Серии: {0}",\r
+"authors.title":"Авторы",\r
+"authors.starting":"Авторы, начинающиеся с",\r
+"authors.alphabetical.many":"Алфавитный указатель для {0} авторов",\r
+"authors.alphabetical.one":"Алфавитный указатель для одного автора",\r
+"splitByLetter.author.other":"Другие авторы",\r
+"series.title":"Серии",\r
+"series.alphabetical.many":"Алфавитный указатель для {0} серий",\r
+"series.alphabetical.one":"Алфавитный указатель для одной серии",\r
+"splitByLetter.series.other":"Другие серии",\r
+"recent.title":"Недавние поступления",\r
+"recent.list":"{0} недавно поступивших(ие) книг(и)",\r
+"recent.list.single":"Недавно поступившая одна книга",\r
+"rating.title":"Рейтинг",\r
+"rating.summary":"{0}, сгруппировано по рейтингу",\r
+"allbooks.title":"Все книги",\r
+"allbooks.alphabetical.many":"Алфавитный указатель всех {0} книг",\r
+"allbooks.alphabetical.one":"Алфавитный указатель одной книги",\r
+"splitByLetter.book.other":"Другие книги",\r
+"main.title":"Библиотека Calibre",\r
+"main.summary":"{0} каталогизировано {1}",\r
+"i18n.and":"и",\r
+"i18n.downloads":"Файлы для скачивания, ссылки и другие каталоги",\r
+"i18n.links":"Ссылки и другие каталоги",\r
+"i18n.coversection":"Обложка",\r
+"i18n.downloadfile":"Скачать файл",\r
+"i18n.downloadsection":"Файлы для скачивания",\r
+"i18n.relatedsection":"Связанные каталоги",\r
+"i18n.linksection":"Внешние ссылки",\r
+"i18n.backToMain":"Назад на заглавную страницу каталога",\r
+"i18n.summarysection":"Краткое содержание",\r
+"i18n.dateGenerated":"Каталог создан {0}",\r
+"deeplevel.summary":"{0} разбито по авторам, тэгам и т.д.",\r
+"about.summary":"Примечания по использованию Calibre2Opds",\r
+"about.title":"О программе",\r
+"usage.intro":"Эта опция взята из файла конфигурации, расположенного в {0}",\r
+"language.title":"Язык",\r
+"languages.title":"Языки",\r
+"languages.categorized":"Указатель для {0} языков",\r
+"languages.categorized.single":"Указатель для одного языка",\r
+"languages.alphabetical.many":"Алфавитный указатель для {0} языков",\r
+"languages.alphabetical.one":"Алфавитный указатель для одного языка",\r
+"languages.ba":"Башкирский",\r
+"languages.by":"Белорусский",\r
+"languages.id":"Индонезийский",\r
+"languages.cz":"Чешский",\r
+"languages.en":"Английский",\r
+"languages.de":"Немецкий",\r
+"languages.it":"Итальянский",\r
+"languages.is":"Исландский",\r
+"languages.eo":"Эсперанто",\r
+"languages.la":"Латышский",\r
+"languages.sp":"Испанский",\r
+"languages.jp":"Японский",\r
+"languages.ru":"Русский",\r
+"languages.fr":"Французский",\r
+"languages.ua":"Украинский",\r
+"languages.zh":"Китайский",\r
+"languages.pl":"Польский",\r
+"languages.sv":"Шведский",\r
+"languages.sr":"Сербский",\r
+"languages.sk":"Словацкий",\r
+"languages.fi":"Финский",\r
+"languages.az":"Азербайджанский",\r
+"languages.bg":"Болгарский",\r
+"languages.es":"Эстонский",\r
+"languages.cu":"Церковно-славянский",\r
+"languages.hr":"Хорватский",\r
+"languages.hu":"Венгерский",\r
+"languages.kk":"Казахский",\r
+"languages.lv":"Литовский",\r
+"languages.pt":"Португальский",\r
+"languages.ro":"Румынский",\r
+"languages.uz":"Узбекский",\r
+"languages.vi":"Вьетнамский",\r
+"languages.nl":"Голландский",\r
+"languages.ca":"Каталанский",\r
+"languages.cv":"Чувашский",\r
+"languages.da":"Датский",\r
+"languages.el":"Греческий",\r
+"languages.no":"Норвежский",\r
+"languages.tu":"Туркменский",\r
+"languages.tg":"Таджикский",\r
+"languages.tr":"Турецкий",\r
+"languages.ga":"Гэльский",\r
+"tags.sf_history":"Альтернативная история",\r
+"tags.sf_action":"Боевая Фантастика",\r
+"tags.sf_epic":"Эпическая Фантастика",\r
+"tags.sf_heroic":"Героическая фантастика",\r
+"tags.sf_detective":"Детективная Фантастика",\r
+"tags.sf_cyberpunk":"Киберпанк",\r
+"tags.sf_space":"Космическая Фантастика",\r
+"tags.sf_social":"Социальная фантастика",\r
+"tags.sf_horror":"Ужасы и Мистика",\r
+"tags.sf_humor":"Юмористическая фантастика",\r
+"tags.sf_fantasy":"Фэнтези",\r
+"tags.sf":"Научная Фантастика",\r
+"tags.child_sf":"Детская Фантастика",\r
+"tags.det_classic":"Классический Детектив",\r
+"tags.det_police":"Полицейский Детектив",\r
+"tags.det_action":"Боевики",\r
+"tags.det_irony":"Иронический Детектив",\r
+"tags.det_history":"Исторический Детектив",\r
+"tags.det_espionage":"Шпионский Детектив",\r
+"tags.det_crime":"Криминальный Детектив",\r
+"tags.det_political":"Политический Детектив",\r
+"tags.det_maniac":"Маньяки",\r
+"tags.det_hard":"Крутой Детектив",\r
+"tags.thriller":"Триллеры",\r
+"tags.detective":"Детектив",\r
+"tags.sf_detective":"Детективная Фантастика",\r
+"tags.child_det":"Детские Остросюжетные",\r
+"tags.love_detective":"Остросюжетные Любовные Романы",\r
+"tags.prose":"Проза",\r
+"tags.prose_classic":"Классическая Проза",\r
+"tags.prose_history":"Историческая Проза",\r
+"tags.prose_contemporary":"Современная Проза",\r
+"tags.prose_counter":"Контркультура",\r
+"tags.prose_rus_classic":"Русская Классика",\r
+"tags.prose_su_classics":"Советская Классика",\r
+"tags.humor_prose":"Юмористическая Проза",\r
+"tags.child_prose":"Детская Проза",\r
+"tags.love":"Любовные романы",\r
+"tags.love_contemporary":"Современные Любовные Романы",\r
+"tags.love_history":"Исторические Любовные Романы",\r
+"tags.love_detective":"Остросюжетные Любовные Романы",\r
+"tags.love_short":"Короткие Любовные Романы",\r
+"tags.love_erotica":"Эротика",\r
+"tags.adv_western":"Вестерны",\r
+"tags.adv_history":"Исторические Приключения",\r
+"tags.adv_indian":"Приключения: Индейцы",\r
+"tags.adv_maritime":"Морские Приключения",\r
+"tags.adv_geo":"Путешествия и География",\r
+"tags.adv_animal":"Природа и Животные",\r
+"tags.adventure":"Приключения: Прочее",\r
+"tags.child_adv":"Детские Приключения",\r
+"tags.children":"Детское",\r
+"tags.child_tale":"Сказки",\r
+"tags.child_verse":"Детские Стихи",\r
+"tags.child_prose":"Детская Проза",\r
+"tags.child_sf":"Детская Фантастика",\r
+"tags.child_det":"Детские Остросюжетные",\r
+"tags.child_adv":"Детские Приключения",\r
+"tags.child_education":"Детская Образовательная литература",\r
+"tags.children":"Детское: Прочее",\r
+"tags.poetry":"Поэзия",\r
+"tags.dramaturgy":"Драматургия",\r
+"tags.humor_verse":"Юмористические Стихи",\r
+"tags.child_verse":"Детские Стихи",\r
+"tags.antique_ant":"Античная Литература",\r
+"tags.antique_european":"Европейская Старинная Литература",\r
+"tags.antique_russian":"Древнерусская Литература",\r
+"tags.antique_east":"Древневосточная Литература",\r
+"tags.antique_myths":"Мифы. Легенды. Эпос",\r
+"tags.antique":"Старинная Литература: Прочее",\r
+"tags.sci_history":"История",\r
+"tags.sci_earth":"Науки о Земле",\r
+"tags.sci_psychology":"Психология",\r
+"tags.sci_culture":"Культурология",\r
+"tags.sci_religion":"Религиоведение",\r
+"tags.sci_philosophy":"Философия",\r
+"tags.sci_politics":"Политика",\r
+"tags.sci_business":"Деловая литература",\r
+"tags.sci_juris":"Юриспруденция",\r
+"tags.sci_linguistic":"Языкознание",\r
+"tags.sci_medicine":"Медицина",\r
+"tags.sci_phys":"Физика",\r
+"tags.sci_math":"Математика",\r
+"tags.sci_chem":"Химия",\r
+"tags.sci_biology":"Биология",\r
+"tags.sci_tech":"Технические",\r
+"tags.science":"Научно-образовательная: Прочее",\r
+"tags.adv_animal":"Природа и Животные",\r
+"tags.comp_www":"Интернет",\r
+"tags.comp_programming":"Программирование",\r
+"tags.comp_hard":"Компьютерное Железо",\r
+"tags.comp_soft":"Программы",\r
+"tags.comp_db":"Базы Данных",\r
+"tags.comp_osnet":"ОС и Сети",\r
+"tags.computers":"Компьютеры: Прочее",\r
+"tags.ref_encyc":"Энциклопедии",\r
+"tags.ref_dict":"Словари",\r
+"tags.ref_ref":"Справочники",\r
+"tags.ref_guide":"Руководства",\r
+"tags.reference":"Справочная Литература: Прочее",\r
+"tags.nonf_biography":"Биографии и Мемуары",\r
+"tags.nonf_publicism":"Публицистика",\r
+"tags.nonf_criticism":"Критика",\r
+"tags.nonfiction":"Документальное: Прочее",\r
+"tags.nonf_military":"Военное дело",\r
+"tags.music":"Музыка",\r
+"tags.design":"Искусство, Дизайн",\r
+"tags.adv_animal":"Природа и Животные",\r
+"tags.religion_rel":"Религия",\r
+"tags.religion_esoterics":"Эзотерика",\r
+"tags.religion_self":"Самосовершенствование",\r
+"tags.religion":"Религия и духовность: Прочее",\r
+"tags.sci_religion":"Религиоведение",\r
+"tags.humor_anecdote":"Анекдоты",\r
+"tags.humor_prose":"Юмористическая Проза",\r
+"tags.humor_verse":"Юмористические Стихи",\r
+"tags.humor":"Юмор: Прочее",\r
+"tags.home_cooking":"Кулинария",\r
+"tags.home_pets":"Домашние Животные",\r
+"tags.home_crafts":"Хобби, Ремесла",\r
+"tags.home_entertain":"Развлечения",\r
+"tags.home_health":"Здоровье",\r
+"tags.home_garden":"Сад и Огород",\r
+"tags.home_diy":"Сделай Сам",\r
+"tags.home_sport":"Спорт",\r
+"tags.home_sex":"Эротика, Секс",\r
+"tags.home":"Дом и Семья: Прочее",\r
+"tags.other":"Прочее",\r
+"tags.prose_military":"Военная литература",\r
+"config.Language.description":"Эта опция устанавливает язык, используемый программой; используйте стандартный ISO код языка (например, EN, FR, DE...)",\r
+"config.Language.possible":"Возможные значения : {0}",\r
+"intro.goal":"Генерация OPDS и HTML каталогов вашей базы электронных книг Calibre",\r
+"intro.team.title":"Команда Calibre2Opds :",\r
+"intro.team.list1":"David Pierron - главный программист",\r
+"intro.team.list2":"Dave Walker - гуру, менеджер по фукциональности и исключительный тестер",\r
+"intro.team.list4":"Douglas Steele - программист",\r
+"intro.team.list5":"Jane Litte - бэта-тестер и моральная поддержка",\r
+"intro.thanks.1":"Особые благодарности Kb Sriram, который программировал Trook, отличный и OPDS-совместимый",\r
+"intro.thanks.2":"менеджер библиотеки Nook, для благодарности достаточно оказать спонсорскую помощь Nook !",\r
+"fin":"Конец",\r
+"customize.title":"Настройки внешнего вида",  \r
+"customize.style":"Стиль",\r
+"customize.fancybox":"Использовать лайтбокс",\r
+"customize.paging":"Максимальное количество элементов на странице (-1 - показывать все)",\r
+"customize.pages":"Максимальное количество страниц на одном уровне",\r
+"customize.email":"Адрес электроннной почты (для отправки файлов почтой)",\r
+"customize.filter":"Включить фильтрацию по жанрам",\r
+"search.result":"Результаты поиска по *{0}*",\r
+"search.sortorder.asc":"Возр.",\r
+"search.sortorder.desc":"Убыв.",\r
+"permalink.alternate":"Постоянная ссылка",\r
+"home.alternate":"Домой",\r
+"settings.alternate":"Опции",\r
+"search.alternate":"Поиск",\r
+"sort.alternate":"Сортировать",\r
+"paging.next.alternate":"Дальше",\r
+"paging.previous.alternate":"Назад",\r
+"mail.messagenotsent":"Невозможно отправить сообщение",\r
+"mail.messagesent":"Сообщение отправлено"\r
+}\r
diff --git a/www/lang/Localization_zh.json b/www/lang/Localization_zh.json
new file mode 100644 (file)
index 0000000..f40531d
--- /dev/null
@@ -0,0 +1,137 @@
+{
+"boolean.no":"否",
+"boolean.yes":"是",
+"splitByLetter.letter":"{0} 以 {1} 开头",
+"home.title":"目录",
+"link.fullentry":"全部条目",
+"title.nextpage":"下一页 ({0} of {1})",
+"title.lastpage":"最后一页",
+"title.numberOfPages":"{0} (共 {1} 页)",
+"pubdate.title":"出版时间",
+"bookword.title":"书名",
+"bookword.none":"没有书籍",
+"bookword.one":"1 本书籍",
+"bookword.many":"{0} 本书籍",
+"authorword.title":"作者",
+"authorword.none":"未知",
+"authorword.one":"1 位作者",
+"authorword.many":"{0} 位作者",
+"taglevelword.title":"Tag levels",
+"taglevelword.none":"No tag level",
+"taglevelword.one":"1 tag level",
+"taglevelword.many":"{0} tag levels",
+"seriesword.title":"系列",
+"seriesword.none":"没有系列",
+"seriesword.one":"1 个系列",
+"seriesword.many":"{0} 系列",
+"tagword.title":"标签",
+"tagword.none":"没有标签",
+"tagword.one":"1 个标签",
+"tagword.many":"{0} 标签",
+"content.tags":"标签:",
+"content.series":"系列:",
+"content.series.data":"{0} 系列的第 {0} 本",
+"content.publisher":"出版社:",
+"content.published":"出版时间",
+"content.added":"添加了: ",
+"content.modified":"修改了:",
+"content.publisher.data":"由 {0} 出版于 {1}",
+"content.summary":"概要",
+"bookentry.series":"Book {0} in the {1} series",
+"bookentry.author":"{0} 由作者 {1}",
+"bookentry.tags":"{0} 在标签 {1}",
+"bookentry.ratings":"{0} 评分 {1}",
+"bookentry.goodreads":"Goodreads 上的这本书",
+"bookentry.goodreads.review":"在 Goodreads上评论这本书",
+"bookentry.goodreads.author":"{0} 在 Goodreads",
+"bookentry.wikipedia":"维基百科上的这本书",
+"bookentry.wikipedia.author":"{0} 在维基百科上",
+"bookentry.librarything":"LibraryThing 上的这本书",
+"bookentry.librarything.author":"{0} 在 LibraryThing",
+"bookentry.amazon":"Amazon上的这本书",
+"bookentry.amazon.author":"{0} 在 Amazon",
+"bookentry.isfdb.author":"{0} 在 ISFDB",
+"bookentry.download":"下载这本书 {0}",
+"bookentry.rated":"{0} {1}",
+"bookentry.fullentrylink":"全部条目",
+"tags.title":"标签",
+"tags.categorized":"Categorized index of the {0} tags",
+"tags.categorized.single":"Categorized index of the single tag",
+"tags.alphabetical.many":"{0} 个标签的字母索引",
+"tags.alphabetical.one":"Alphabetical index of the single tag",
+"tags.alphabetical.none":"Alphabetical index of absolutely no tag",
+"splitByLetter.tag.other":"其他标签",
+"authors.series.title":"系列: {0}",
+"authors.title":"作者",
+"authors.alphabetical.many":"{0} 位作者的字母索引",
+"authors.alphabetical.one":"Alphabetical index of the single author",
+"authors.alphabetical.none":"Alphabetical index of absolutely no author",
+"splitByLetter.author.other":"其他作者",
+"series.title":"系列",
+"series.alphabetical.many":"{0} 个系列的字母索引",
+"series.alphabetical.one":"Alphabetical index of the single series",
+"series.alphabetical.none":"Alphabetical index of absolutely no series",
+"splitByLetter.series.other":"其他系列",
+"recent.title":"最近添加",
+"recent.list":"{0} 本最近添加的书",
+"recent.list.single":"Most recent single book",
+"rating.title":"Rating",
+"rating.summary":"{0}, 根据评分分组",
+"allbooks.title":"所有书籍",
+"allbooks.alphabetical.many":"{0} 本书籍的字母索引",
+"allbooks.alphabetical.one":"Alphabetical index of the single book",
+"allbooks.alphabetical.none":"Alphabetical index of absolutely no book",
+"splitByLetter.book.other":"其他书籍",
+"main.title":"Calibre 书架",
+"main.summary":"{0} has catalogued {1}",
+"startup.newhome":"Default configuration folder home redirected to {0}",
+"startup.redirectfound":".redirect file found in {0}",
+"startup.redirectreadfail":"... failure reading .redirect file",
+"startup.redirectnotfound":"... unable to find redirect folder {0}",
+"startup.redirectabandoned":"... so redirect abandoned",
+"startup.redirecting":"redirecting home folder to {0}",
+"startup.configusing":"Using configuration folder {0}",
+"startup.folderuserhome":"Try configuration folder in user home folder {0}",
+"startup.foldertilde":"Try configuration folder from tilde folder {0}",
+"startup.folderjar":"Try configuration folder from .jar location {0}",
+"startup.foldernotexist":"... but specified folder does not exist",
+"i18n.and":"和",
+"i18n.downloads":"下载,链接和其他目录 ",
+"i18n.links":"链接和其他目录",
+"i18n.coversection":"封面",
+"i18n.downloadfile":"下载文件",
+"i18n.downloadsection":"下载",
+"i18n.relatedsection":"相关目录",
+"i18n.linksection":"外部链接",
+"i18n.backToMain":"返回目录主页",
+"i18n.summarysection":"描述",
+"i18n.dateGenerated":"目录生成于 {0}",
+"deeplevel.summary":"{0} broken up by authors, tags, etc. ",
+"about.title":"关于COPS",
+"about.summary":"关于Calibre2Opds的说明",
+"usage.intro":"选项从此配置文件生成 {0}",
+"language.title":"语言",
+"config.Language.description":"此项设置将会改变程序使用的语言 ; 请使用ISO标准语言代码 (例如 EN, FR, DE...)",
+"config.Language.possible":"可能的选项 : {0}",
+"intro.goal":"从你的 Calibre 数据库生成 OPDS 和 HTML 目录",
+"intro.wiki.title":"项目主页 : ",
+"intro.wiki.url":"http://calibre2opds.com",
+"intro.team.title":"项目人员 :",
+"intro.team.list1":"David Pierron - main programmer",
+"intro.team.list2":"Dave Walker - guru, features manager and tester extraordinaire",
+"intro.team.list3":"Farid Soussi - css and html guru",
+"intro.team.list4":"Douglas Steele - programmer",
+"intro.team.list5":"Jane Litte - beta tester and moral support",
+"intro.thanks.1":"Special thanks to Kb Sriram, who not only programmed Trook, an excellent and OPDS compatible ",
+"intro.thanks.2":"library manager for the Nook, but also was kind enough to donate a Nook !",
+"search.result":"*{0}* 的搜索结果",
+"search.sortorder.asc":"升序",
+"search.sortorder.desc":"降序",
+"permalink.alternate":"永久链接",
+"home.alternate":"首页",
+"search.alternate":"搜索",
+"sort.alternate":"排序",
+"paging.next.alternate":"下一页",
+"paging.previous.alternate":"上一页",
+"fin":"fin"
+}
diff --git a/www/language.php b/www/language.php
new file mode 100644 (file)
index 0000000..646c658
--- /dev/null
@@ -0,0 +1,75 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+require_once('base.php');
+
+class language extends Base {
+    const ALL_LANGUAGES_ID = "calibre:languages";
+    
+    public $id;
+    public $lang_code;
+    
+    public function __construct($pid, $plang_code) {
+        $this->id = $pid;
+        $this->lang_code = $plang_code;
+    }
+    
+    public function getUri () {
+        return "?page=".parent::PAGE_LANGUAGE_DETAIL."&id=$this->id";
+    }
+    
+    public function getEntryId () {
+        return self::ALL_LANGUAGES_ID.":".$this->id;
+    }
+    
+    public static function getLanguageString ($code) {
+        $string = localize("languages.".$code);
+        if (preg_match ("/^languages/", $string)) {
+            return $code;
+        }
+        return $string;
+    }
+
+    public static function getCount() {
+        $nLanguages = parent::getDb ()->query('select count(*) from languages')->fetchColumn(0);
+        if ($nLanguages == 0) return NULL;
+        $entry = new Entry (localize("languages.title"), self::ALL_LANGUAGES_ID, 
+            str_format (localize("languages.alphabetical", $nLanguages), $nLanguages), "text", 
+            array ( new LinkNavigation ("?page=".parent::PAGE_ALL_LANGUAGES)));
+        return $entry;
+    }
+       
+    public static function getLanguageById ($languageId) {
+        $result = parent::getDb ()->prepare('select id, lang_code  from languages where id = ?');
+        $result->execute (array ($languageId));
+        if ($post = $result->fetchObject ()) {
+            return new Language ($post->id, Language::getLanguageString ($post->lang_code));
+        }
+        return NULL;
+    }
+    
+
+
+    public static function getAllLanguages() {
+        $result = parent::getDb ()->query('select languages.id as id, languages.lang_code as lang_code, link.count as count
+from languages, 
+(select lang_code,count(*) as count from books_languages_link group by lang_code) link
+where languages.id = link.lang_code
+group by languages.id, link.lang_code
+order by languages.lang_code');
+        $entryArray = array();
+        while ($post = $result->fetchObject ())
+        {
+            $language = new Language ($post->id, $post->lang_code);
+            array_push ($entryArray, new Entry (Language::getLanguageString ($language->lang_code), $language->getEntryId (), 
+                str_format (localize("bookword", $post->count), $post->count), "text", 
+                array ( new LinkNavigation ($language->getUri ()))));
+        }
+        return $entryArray;
+    }
+}
diff --git a/www/login.html b/www/login.html
new file mode 100644 (file)
index 0000000..e4ce813
--- /dev/null
@@ -0,0 +1,97 @@
+<!DOCTYPE html>\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />\r
+    <title>COPS</title>\r
+    <script type="text/javascript" src="resources/jQuery/jquery-1.10.2.min.js"></script>\r
+    <link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Open+Sans:400,300italic,800,300,400italic,600,600italic,700,700italic,800italic' />\r
+    <style media="screen" type="text/css">\r
+        body{\r
+            background:white;\r
+            font-family:'Open Sans';\r
+        }\r
+        \r
+        #block{\r
+            width:230px;\r
+            height:113px;\r
+            margin:auto;\r
+            background:#2c3e50;\r
+            margin-top:100px;\r
+            border-radius:2px;\r
+        }\r
+        \r
+        #block:before{\r
+            content:'';\r
+            display:block;\r
+            width:230px;\r
+            height:3px;\r
+        }\r
+        \r
+        #block:after{\r
+            content:'';\r
+            display:block;\r
+        }\r
+        \r
+        #block input[type=text],#block  input[type=password] {\r
+            font-family:'Open Sans';\r
+            width:156px;\r
+            height:32px;\r
+            margin:15px 15px;\r
+            border:0;\r
+            border-radius:2px;\r
+            display:block;\r
+            font-size:18px;\r
+        }\r
+        \r
+        #block input[type=password]{\r
+            width:156px;\r
+            height:32px;\r
+            margin:-5px 15px;\r
+        }\r
+        #submit{\r
+            position:absolute;\r
+            width:33px;\r
+            height:34px;\r
+            background:#9b59b6;\r
+            margin:15px;\r
+            color:#ffffff;\r
+            border:0;\r
+            margin:-29px 180px;\r
+            font-size:22px;\r
+            padding:0;\r
+        }\r
+    </style>\r
+    <script>\r
+        $(document).ready(function()\r
+        {\r
+            $('#loginForm').submit(function()\r
+            {\r
+              var username = $('#user').val();\r
+              var password = $('#password').val();\r
+\r
+              $.ajax(\r
+                {\r
+                  'password' : password,\r
+                  'username' : username,\r
+                  'url'      : 'index.php',\r
+                  'type'     : 'GET',\r
+                  'success'  : function(){ window.location = 'index.php'; },\r
+                  'error'    : function(){ alert('Bad Login Details');},\r
+                }\r
+              );\r
+\r
+              return false;\r
+            });\r
+        });\r
+    </script>\r
+</head>\r
+<body>\r
+    <form id="loginForm">\r
+    <div id="block">\r
+        <input id="user" type="text" placeholder="Username" required="required" />\r
+        <input id="password" type="password" placeholder="Password" required="required" />\r
+        <input id="submit" type="submit" value="&#x2192;" />\r
+    </div>\r
+    </form>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/www/resources/Magnific-Popup/jquery.magnific-popup.min.js b/www/resources/Magnific-Popup/jquery.magnific-popup.min.js
new file mode 100644 (file)
index 0000000..333e86d
--- /dev/null
@@ -0,0 +1,4 @@
+/*! Magnific Popup - v0.9.3 - 2013-07-16
+* http://dimsemenov.com/plugins/magnific-popup/
+* Copyright (c) 2013 Dmitry Semenov; */
+(function(e){var t,i,n,o,a,r,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",v="."+g,h="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,i){t.ev.on(g+e+v,i)},k=function(t,i,n,o){var a=document.createElement("div");return a.className="mfp-"+t,n&&(a.innerHTML=n),o?i&&i.appendChild(a):(a=e(a),i&&a.appendTo(i)),a},T=function(i,n){t.ev.triggerHandler(g+i,n),t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,e.isArray(n)?n:[n]))},E=function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).trigger("focus")},S=function(i){return i===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=i),t.currTemplate.closeBtn},P=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},_=function(i){if(!e(i).hasClass(y)){var n=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(n&&o)return!0;if(!t.content||e(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||e.contains(t.content[0],i)){if(n)return!0}else if(o&&e.contains(document,i))return!0;return!1}},O=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var i=navigator.appVersion;t.isIE7=-1!==i.indexOf("MSIE 7."),t.isIE8=-1!==i.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(i),t.isIOS=/iphone|ipad|ipod/gi.test(i),t.supportsTransition=O(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=e(document.body),o=e(document),t.popupsCache={}},open:function(i){var n;if(i.isObj===!1){t.items=i.items.toArray(),t.index=0;var a,s=i.items;for(n=0;s.length>n;n++)if(a=s[n],a.parsed&&(a=a.el[0]),a===i.el[0]){t.index=n;break}}else t.items=e.isArray(i.items)?i.items:[i.items],t.index=i.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],r="",t.ev=i.mainEl&&i.mainEl.length?i.mainEl.eq(0):o,i.key?(t.popupsCache[i.key]||(t.popupsCache[i.key]={}),t.currTemplate=t.popupsCache[i.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,i),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+v,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+v,function(e){_(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(n=0;l.length>n;n++){var c=l[n];c=c.charAt(0).toUpperCase()+c.slice(1),t["init"+c].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,i,n){i.close_replaceWith=S(n.type)}),r+=" mfp-close-btn-in"):t.wrap.append(S())),t.st.alignTop&&(r+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+v,function(e){27===e.keyCode&&t.close()}),I.on("resize"+v,function(){t.updateSize()}),t.st.closeOnContentClick||(r+=" mfp-auto-cursor"),r&&t.wrap.addClass(r);var d=t.wH=I.height(),u={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(u.paddingRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):u.overflow="hidden");var g=t.st.mainClass;t.isIE7&&(g+=" mfp-ie7"),g&&t._addClassToMFP(g),t.updateItemHTML(),T("BuildControls"),e("html").css(u),t.bgOverlay.add(t.wrap).prependTo(document.body),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(h),E()):t.bgOverlay.addClass(h),o.on("focusin"+v,function(i){return i.target===t.wrap[0]||e.contains(t.wrap[0],i.target)?void 0:(E(),!1)})},16),t.isOpen=!0,t.updateSize(d),T(f)},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var i=C+" "+h+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(i+=t.st.mainClass+" "),t._removeClassFromMFP(i),t.fixedContentPos){var n={paddingRight:""};t.isIE7?e("body, html").css("overflow",""):n.overflow="",e("html").css(n)}o.off("keyup"+v+" focusin"+v),t.ev.off(v),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).trigger("focus"),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,n=window.innerHeight*i;t.wrap.css("height",n),t.wH=n}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var i=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),i.parsed||(i=t.parseEl(t.index));var n=i.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",n]),t.currItem=i,!t.currTemplate[n]){var o=t.st[n]?t.st[n].markup:!1;T("FirstMarkupParse",o),t.currTemplate[n]=o?e(o):!0}a&&a!==i.type&&t.container.removeClass("mfp-"+a+"-holder");var r=t["get"+n.charAt(0).toUpperCase()+n.slice(1)](i,t.currTemplate[n]);t.appendContent(r,n),i.preloaded=!0,T(m,i),a=i.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,i){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[i]===!0?t.content.find(".mfp-close").length||t.content.append(S()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var n=t.items[i],o=n.type;if(n=n.tagName?{el:e(n)}:{data:n,src:n.src},n.el){for(var a=t.types,r=0;a.length>r;r++)if(n.el.hasClass("mfp-"+a[r])){o=a[r];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=o||t.st.type||"inline",n.index=i,n.parsed=!0,t.items[i]=n,T("ElementParse",n),t.items[i]},addGroup:function(e,i){var n=function(n){n.mfpEl=this,t._openClick(n,e,i)};i||(i={});var o="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(o).on(o,n)):(i.isObj=!1,i.delegate?e.off(o).on(o,i.delegate,n):(i.items=e,e.off(o).on(o,n)))},_openClick:function(i,n,o){var a=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(a||2!==i.which&&!i.ctrlKey&&!i.metaKey){var r=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(r)if(e.isFunction(r)){if(!r.call(t))return!0}else if(r>I.width())return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),o.el=e(i.mfpEl),o.delegate&&(o.items=n.find(o.delegate)),t.open(o)}},updateStatus:function(e,n){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),n||"loading"!==e||(n=t.st.tLoading);var o={status:e,text:n};T("UpdateStatus",o),e=o.status,n=o.text,t.preloader.html(n),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),i=e}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_parseMarkup:function(t,i,n){var o;n.data&&(i=e.extend(n.data,i)),T(p,[t,i,n]),e.each(i,function(e,i){if(void 0===i||i===!1)return!0;if(o=e.split("_"),o.length>1){var n=t.find(v+"-"+o[0]);if(n.length>0){var a=o[1];"replaceWith"===a?n[0]!==i[0]&&n.replaceWith(i):"img"===a?n.is("img")?n.attr("src",i):n.replaceWith('<img src="'+i+'" class="'+n.attr("class")+'" />'):n.attr(o[1],i)}}else t.find(v+"-"+e).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(e,t){return P(),e||(e={}),e.isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return e.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(e.magnificPopup.defaults[t]=i.options),e.extend(this.proto,i.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(i){P();var n=e(this);if("string"==typeof i)if("open"===i){var o,a=b?n.data("magnificPopup"):n[0].magnificPopup,r=parseInt(arguments[1],10)||0;a.items?o=a.items[r]:(o=n,a.delegate&&(o=o.find(a.delegate)),o=o.eq(r)),t._openClick({mfpEl:o},n,a)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else b?n.data("magnificPopup",i):n[0].magnificPopup=i,t.addGroup(n,i);return n};var z,M,B,H="inline",L=function(){B&&(M.after(B.addClass(z)).detach(),B=null)};e.magnificPopup.registerModule(H,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(H),x(l+"."+H,function(){L()})},getInline:function(i,n){if(L(),i.src){var o=t.st.inline,a=e(i.src);if(a.length){var r=a[0].parentNode;r&&r.tagName&&(M||(z=o.hiddenClass,M=k(z),z="mfp-"+z),B=a.after(M).detach().removeClass(z)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),a=e("<div>");return i.inlineElement=a,a}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var A,F="ajax",j=function(){A&&n.removeClass(A)};e.magnificPopup.registerModule(F,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(F),A=t.st.ajax.cursor,x(l+"."+F,function(){j(),t.req&&t.req.abort()})},getAjax:function(i){A&&n.addClass(A),t.updateStatus("loading");var o=e.extend({url:i.src,success:function(n,o,a){var r={data:n,xhr:a};T("ParseAjax",r),t.appendContent(e(r.data),F),i.finished=!0,j(),E(),setTimeout(function(){t.wrap.addClass(h)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){j(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var N,W=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=t.st.image.titleSrc;if(n){if(e.isFunction(n))return n.call(t,i);if(i.el)return i.el.attr(n)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><div class="mfp-img"></div><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,i=".image";t.types.push("image"),x(f+i,function(){"image"===t.currItem.type&&e.cursor&&n.addClass(e.cursor)}),x(l+i,function(){e.cursor&&n.removeClass(e.cursor),I.off("resize"+v)}),x("Resize"+i,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,N&&clearInterval(N),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],o=function(a){N&&clearInterval(N),N=setInterval(function(){return n.naturalWidth>0?(t._onImageHasSize(e),void 0):(i>200&&clearInterval(N),i++,3===i?o(10):40===i?o(50):100===i&&o(500),void 0)},a)};o(1)},getImage:function(i,n){var o=0,a=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(a,100):r()))},r=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",s.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},s=t.st.image,l=n.find(".mfp-img");if(l.length){var c=new Image;c.className="mfp-img",i.img=e(c).on("load.mfploader",a).on("error.mfploader",r),c.src=i.src,l.is("img")&&(i.img=i.img.clone()),i.img[0].naturalWidth>0&&(i.hasSize=!0)}return t._parseMarkup(n,{title:W(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(N&&clearInterval(N),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var R,Z=function(){return void 0===R&&(R=void 0!==document.createElement("p").style.MozTransform),R};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e=t.st.zoom,i=".zoom";if(e.enabled&&t.supportsTransition){var n,o,a=e.duration,r=function(t){var i=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+e.duration/1e3+"s "+e.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},a="transition";return o["-webkit-"+a]=o["-moz-"+a]=o["-o-"+a]=o[a]=n,i.css(o),i},s=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(n),t.content.css("visibility","hidden"),image=t._getItemToZoom(),!image)return s(),void 0;o=r(image),o.css(t._getOffset()),t.wrap.append(o),n=setTimeout(function(){o.css(t._getOffset(!0)),n=setTimeout(function(){s(),setTimeout(function(){o.remove(),image=o=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(n),t.st.removalDelay=a,!image){if(image=t._getItemToZoom(),!image)return;o=r(image)}o.css(t._getOffset(!0)),t.wrap.append(o),t.content.css("visibility","hidden"),setTimeout(function(){o.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(s(),o&&o.remove())})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var n;n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=n.offset(),a=parseInt(n.css("padding-top"),10),r=parseInt(n.css("padding-bottom"),10);o.top-=e(window).scrollTop()-a;var s={width:n.width(),height:(b?n.innerHeight():n[0].offsetHeight)-r-a};return Z()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var q="iframe",D="//about:blank",K=function(e){if(t.currTemplate[q]){var i=t.currTemplate[q].find("iframe");i.length&&(e||(i[0].src=D),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(q,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(q),x("BeforeChange",function(e,t,i){t!==i&&(t===q?K():i===q&&K(!0))}),x(l+"."+q,function(){K()})},getIframe:function(i,n){var o=i.src,a=t.st.iframe;e.each(a.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var r={};return a.srcAction&&(r[a.srcAction]=o),t._parseMarkup(n,r,i),t.updateStatus("ready"),n}}});var Y=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},U=function(e,t,i){return e.replace("%curr%",t+1).replace("%total%",i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,n=".mfp-gallery",a=Boolean(e.fn.mfpFastClick);return t.direction=!0,i&&i.enabled?(r+=" mfp-gallery",x(f+n,function(){i.navigateByImgClick&&t.wrap.on("click"+n,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+n,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+n,function(e,i){i.text&&(i.text=U(i.text,t.currItem.index,t.items.length))}),x(p+n,function(e,n,o,a){var r=t.items.length;o.counter=r>1?U(i.tCounter,a.index,r):""}),x("BuildControls"+n,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,o=t.arrowLeft=e(n.replace("%title%",i.tPrev).replace("%dir%","left")).addClass(y),r=t.arrowRight=e(n.replace("%title%",i.tNext).replace("%dir%","right")).addClass(y),s=a?"mfpFastClick":"click";o[s](function(){t.prev()}),r[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",r[0],!1,!0),k("a",r[0],!1,!0)),t.container.append(o.add(r))}}),x(m+n,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+n,function(){o.off(n),t.wrap.off("click"+n),t.arrowLeft&&a&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=Y(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=Y(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,n=Math.min(i[0],t.items.length),o=Math.min(i[1],t.items.length);for(e=1;(t.direction?o:n)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?n:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=Y(i),!t.items[i].preloaded){var n=t.items[i];n.parsed||(n=t.parseEl(i)),T("LazyLoad",n),"image"===n.type&&(n.img=e('<img class="mfp-img" />').on("load.mfploader",function(){n.hasSize=!0}).on("error.mfploader",function(){n.hasSize=!0,n.loadError=!0,T("LazyLoadError",n)}).attr("src",n.src)),n.preloaded=!0}}}});var G="retina";e.magnificPopup.registerModule(G,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;i=isNaN(i)?i():i,i>1&&(x("ImageHasSize."+G,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),x("ElementParse."+G,function(t,n){n.src=e.replaceSrc(n,i)}))}}}}),function(){var t=1e3,i="ontouchstart"in window,n=function(){I.off("touchmove"+a+" touchend"+a)},o="mfpFastClick",a="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var r,s=e(this);if(i){var l,c,d,u,p,f;s.on("touchstart"+a,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+a,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,n())}).on("touchend"+a,function(e){n(),u||f>1||(r=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){r=!1},t),o())})})}s.on("click"+a,function(){r||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+a+" click"+a),i&&I.off("touchmove"+a+" touchend"+a)}}()})(window.jQuery||window.Zepto);
\ No newline at end of file
diff --git a/www/resources/Magnific-Popup/magnific-popup.css b/www/resources/Magnific-Popup/magnific-popup.css
new file mode 100644 (file)
index 0000000..c49d02d
--- /dev/null
@@ -0,0 +1,394 @@
+/* Magnific Popup CSS */
+.mfp-bg {
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 1042;
+  overflow: hidden;
+  position: fixed;
+  background: #0b0b0b;
+  opacity: 0.8;
+  filter: alpha(opacity=80); }
+
+.mfp-wrap {
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 1043;
+  position: fixed;
+  outline: none !important;
+  -webkit-backface-visibility: hidden; }
+
+.mfp-container {
+  text-align: center;
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+  padding: 0 8px;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box; }
+
+.mfp-container:before {
+  content: '';
+  display: inline-block;
+  height: 100%;
+  vertical-align: middle; }
+
+.mfp-align-top .mfp-container:before {
+  display: none; }
+
+.mfp-content {
+  position: relative;
+  display: inline-block;
+  vertical-align: middle;
+  margin: 0 auto;
+  text-align: left;
+  z-index: 1045; }
+
+.mfp-inline-holder .mfp-content,
+.mfp-ajax-holder .mfp-content {
+  width: 100%;
+  cursor: auto; }
+
+.mfp-ajax-cur {
+  cursor: progress; }
+
+.mfp-zoom-out-cur,
+.mfp-zoom-out-cur .mfp-image-holder .mfp-close {
+  cursor: -moz-zoom-out;
+  cursor: -webkit-zoom-out;
+  cursor: zoom-out; }
+
+.mfp-zoom {
+  cursor: pointer;
+  cursor: -webkit-zoom-in;
+  cursor: -moz-zoom-in;
+  cursor: zoom-in; }
+
+.mfp-auto-cursor .mfp-content {
+  cursor: auto; }
+
+.mfp-close,
+.mfp-arrow,
+.mfp-preloader,
+.mfp-counter {
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  user-select: none; }
+
+.mfp-loading.mfp-figure {
+  display: none; }
+
+.mfp-hide {
+  display: none !important; }
+
+.mfp-preloader {
+  color: #cccccc;
+  position: absolute;
+  top: 50%;
+  width: auto;
+  text-align: center;
+  margin-top: -0.8em;
+  left: 8px;
+  right: 8px;
+  z-index: 1044; }
+
+.mfp-preloader a {
+  color: #cccccc; }
+
+.mfp-preloader a:hover {
+  color: white; }
+
+.mfp-s-ready .mfp-preloader {
+  display: none; }
+
+.mfp-s-error .mfp-content {
+  display: none; }
+
+button.mfp-close,
+button.mfp-arrow {
+  overflow: visible;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+  display: block;
+  padding: 0;
+  z-index: 1046; }
+
+button::-moz-focus-inner {
+  padding: 0;
+  border: 0; }
+
+.mfp-close {
+  width: 44px;
+  height: 44px;
+  line-height: 44px;
+  position: absolute;
+  right: 0;
+  top: 0;
+  text-decoration: none;
+  text-align: center;
+  opacity: 0.65;
+  padding: 0 0 18px 10px;
+  color: white;
+  font-style: normal;
+  font-size: 28px;
+  font-family: Arial, Baskerville, monospace; }
+  .mfp-close:hover, .mfp-close:focus {
+    opacity: 1; }
+  .mfp-close:active {
+    top: 1px; }
+
+.mfp-close-btn-in .mfp-close {
+  color: #333333; }
+
+.mfp-image-holder .mfp-close,
+.mfp-iframe-holder .mfp-close {
+  color: white;
+  right: -6px;
+  text-align: right;
+  padding-right: 6px;
+  width: 100%; }
+
+.mfp-counter {
+  position: absolute;
+  top: 0;
+  right: 0;
+  color: #cccccc;
+  font-size: 12px;
+  line-height: 18px; }
+
+.mfp-arrow {
+  position: absolute;
+  opacity: 0.65;
+  margin: 0;
+  top: 50%;
+  margin-top: -55px;
+  padding: 0;
+  width: 90px;
+  height: 110px;
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
+
+.mfp-arrow:active {
+  margin-top: -54px; }
+
+.mfp-arrow:hover,
+.mfp-arrow:focus {
+  opacity: 1; }
+
+.mfp-arrow:before, .mfp-arrow:after,
+.mfp-arrow .mfp-b,
+.mfp-arrow .mfp-a {
+  content: '';
+  display: block;
+  width: 0;
+  height: 0;
+  position: absolute;
+  left: 0;
+  top: 0;
+  margin-top: 35px;
+  margin-left: 35px;
+  border: medium inset transparent; }
+.mfp-arrow:after,
+.mfp-arrow .mfp-a {
+  border-top-width: 13px;
+  border-bottom-width: 13px;
+  top: 8px; }
+.mfp-arrow:before,
+.mfp-arrow .mfp-b {
+  border-top-width: 21px;
+  border-bottom-width: 21px; }
+
+.mfp-arrow-left {
+  left: 0; }
+  .mfp-arrow-left:after,
+  .mfp-arrow-left .mfp-a {
+    border-right: 17px solid white;
+    margin-left: 31px; }
+  .mfp-arrow-left:before,
+  .mfp-arrow-left .mfp-b {
+    margin-left: 25px;
+    border-right: 27px solid #3f3f3f; }
+
+.mfp-arrow-right {
+  right: 0; }
+  .mfp-arrow-right:after,
+  .mfp-arrow-right .mfp-a {
+    border-left: 17px solid white;
+    margin-left: 39px; }
+  .mfp-arrow-right:before,
+  .mfp-arrow-right .mfp-b {
+    border-left: 27px solid #3f3f3f; }
+
+.mfp-iframe-holder {
+  padding-top: 40px;
+  padding-bottom: 40px; }
+
+.mfp-iframe-holder .mfp-content {
+  line-height: 0;
+  width: 100%;
+  max-width: 900px; }
+
+.mfp-iframe-scaler {
+  width: 100%;
+  height: 0;
+  overflow: hidden;
+  padding-top: 56.25%; }
+
+.mfp-iframe-scaler iframe {
+  position: absolute;
+  display: block;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+  background: black; }
+
+.mfp-iframe-holder .mfp-close {
+  top: -40px; }
+
+/* Main image in popup */
+img.mfp-img {
+  width: auto;
+  max-width: 100%;
+  height: auto;
+  display: block;
+  line-height: 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  padding: 40px 0 40px;
+  margin: 0 auto; }
+
+/* The shadow behind the image */
+.mfp-figure:after {
+  content: '';
+  position: absolute;
+  left: 0;
+  top: 40px;
+  bottom: 40px;
+  display: block;
+  right: 0;
+  width: auto;
+  height: auto;
+  z-index: -1;
+  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+  background: #444444; }
+
+.mfp-figure {
+  line-height: 0; }
+
+.mfp-bottom-bar {
+  margin-top: -36px;
+  position: absolute;
+  top: 100%;
+  left: 0;
+  width: 100%;
+  cursor: auto; }
+
+.mfp-title {
+  text-align: left;
+  line-height: 18px;
+  color: #f3f3f3;
+  word-break: break-word;
+  padding-right: 36px; }
+
+.mfp-figure small {
+  color: #bdbdbd;
+  display: block;
+  font-size: 12px;
+  line-height: 14px; }
+
+.mfp-image-holder .mfp-content {
+  max-width: 100%; }
+
+.mfp-gallery .mfp-image-holder .mfp-figure {
+  cursor: pointer; }
+
+@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
+  /**
+   * Remove all paddings around the image on small screen
+   */
+  .mfp-img-mobile .mfp-image-holder {
+    padding-left: 0;
+    padding-right: 0; }
+
+  .mfp-img-mobile img.mfp-img {
+    padding: 0; }
+
+  /* The shadow behind the image */
+  .mfp-img-mobile .mfp-figure:after {
+    top: 0;
+    bottom: 0; }
+
+  .mfp-img-mobile .mfp-bottom-bar {
+    background: rgba(0, 0, 0, 0.6);
+    bottom: 0;
+    margin: 0;
+    top: auto;
+    padding: 3px 5px;
+    position: fixed;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box; }
+
+  .mfp-img-mobile .mfp-bottom-bar:empty {
+    padding: 0; }
+
+  .mfp-img-mobile .mfp-counter {
+    right: 5px;
+    top: 3px; }
+
+  .mfp-img-mobile .mfp-close {
+    top: 0;
+    right: 0;
+    width: 35px;
+    height: 35px;
+    line-height: 35px;
+    background: rgba(0, 0, 0, 0.6);
+    position: fixed;
+    text-align: center;
+    padding: 0; }
+
+  .mfp-img-mobile .mfp-figure small {
+    display: inline;
+    margin-left: 5px; } }
+@media all and (max-width: 900px) {
+  .mfp-arrow {
+    -webkit-transform: scale(0.75);
+    transform: scale(0.75); }
+
+  .mfp-arrow-left {
+    -webkit-transform-origin: 0;
+    transform-origin: 0; }
+
+  .mfp-arrow-right {
+    -webkit-transform-origin: 100%;
+    transform-origin: 100%; }
+
+  .mfp-container {
+    padding-left: 6px;
+    padding-right: 6px; } }
+.mfp-ie7 .mfp-img {
+  padding: 0; }
+.mfp-ie7 .mfp-bottom-bar {
+  width: 600px;
+  left: 50%;
+  margin-left: -300px;
+  margin-top: 5px;
+  padding-bottom: 5px; }
+.mfp-ie7 .mfp-container {
+  padding: 0; }
+.mfp-ie7 .mfp-content {
+  padding-top: 44px; }
+.mfp-ie7 .mfp-close {
+  top: 0;
+  right: 0;
+  padding-top: 0; }
diff --git a/www/resources/PHPMailer/LICENSE b/www/resources/PHPMailer/LICENSE
new file mode 100644 (file)
index 0000000..f3f1b3b
--- /dev/null
@@ -0,0 +1,504 @@
+                 GNU LESSER GENERAL PUBLIC LICENSE
+                      Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                 GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/www/resources/PHPMailer/README.md b/www/resources/PHPMailer/README.md
new file mode 100644 (file)
index 0000000..671141d
--- /dev/null
@@ -0,0 +1,134 @@
+# PHPMailer - A full-featured email creation and transfer class for PHP
+
+Build status: [![Build Status](https://travis-ci.org/Synchro/PHPMailer.png)](https://travis-ci.org/Synchro/PHPMailer)
+
+## Class Features
+
+- Probably the world's most popular code for sending email from PHP!
+- Used by many open-source projects: Drupal, SugarCRM, Yii, Joomla! and many more
+- Integrated SMTP support - send without a local mail server
+- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
+- Multipart/alternative emails for mail clients that do not read HTML email
+- Support for 8bit, base64, binary, and quoted-printable encoding
+- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms
+- Native language support
+- Compatible with PHP 5.0 and later
+- Much more!
+
+## Why you might need it
+
+Many PHP developers utilize email in their code. The only PHP function that supports this is the mail() function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments.
+
+Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the mail() function directly is just plain wrong!
+*Please* don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc.
+
+The PHP mail() function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server.
+
+## License
+
+This software is licenced under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html). Please read LICENSE for information on the
+software availability and distribution.
+
+## Installation
+
+PHPMailer is available via [Composer/Packagist](https://packagist.org/packages/phpmailer/phpmailer). Alternatively, just copy the contents of the PHPMailer folder into somewhere that's in your PHP `include_path` setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub.
+
+
+## A Simple Example
+
+```php
+<?php
+require 'class.phpmailer.php';
+
+$mail = new PHPMailer;
+
+$mail->IsSMTP();                                      // Set mailer to use SMTP
+$mail->Host = 'smtp1.example.com;smtp2.example.com';  // Specify main and backup server
+$mail->SMTPAuth = true;                               // Enable SMTP authentication
+$mail->Username = 'jswan';                            // SMTP username
+$mail->Password = 'secret';                           // SMTP password
+$mail->SMTPSecure = 'tls';                            // Enable encryption, 'ssl' also accepted
+
+$mail->From = 'from@example.com';
+$mail->FromName = 'Mailer';
+$mail->AddAddress('josh@example.net', 'Josh Adams');  // Add a recipient
+$mail->AddAddress('ellen@example.com');               // Name is optional
+$mail->AddReplyTo('info@example.com', 'Information');
+$mail->AddCC('cc@example.com');
+$mail->AddBCC('bcc@example.com');
+
+$mail->WordWrap = 50;                                 // Set word wrap to 50 characters
+$mail->AddAttachment('/var/tmp/file.tar.gz');         // Add attachments
+$mail->AddAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name
+$mail->IsHTML(true);                                  // Set email format to HTML
+
+$mail->Subject = 'Here is the subject';
+$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
+$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
+
+if(!$mail->Send()) {
+   echo 'Message could not be sent.';
+   echo 'Mailer Error: ' . $mail->ErrorInfo;
+   exit;
+}
+
+echo 'Message has been sent';
+```
+
+You'll find plenty more to play with in the `examples` folder.
+
+That's it. You should now be ready to use PHPMailer!
+
+## Localization
+PHPMailer defaults to English, but in the `languages` folder you'll find numerous translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
+
+```php
+// To load the French version
+$mail->SetLanguage('fr', '/optional/path/to/language/directory/');
+```
+
+## Documentation
+
+You'll find some basic user-level docs in the docs folder, and you can generate complete API-level documentation using the `generatedocs.sh` shell script in the docs folder, though you'll need to install [PHPDocumentor](http://www.phpdoc.org) first.
+
+## Tests
+
+You'll find a PHPUnit test script in the `test` folder.
+
+Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.png)](https://travis-ci.org/PHPMailer/PHPMailer)
+
+If this isn't passing, is there something you can do to help?
+
+## Contributing
+
+Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
+
+We're particularly interested in fixing edge-cases, expanding test coverage and updating translations.
+
+With the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone:
+
+git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git
+
+Please *don't* use the SourceForge or Google Code projects any more.
+
+## Changelog
+
+See changelog.md
+
+## History
+- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/).
+- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004.
+- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
+- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer).
+- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer.
+- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub.
+
+### What's changed since moving from SourceForge?
+- Official successor to the SourceForge and Google Code projects.
+- Test suite.
+- Continuous integration with Travis-CI.
+- Composer support.
+- Rolling releases.
+- Additional languages and language strings.
+- CRAM-MD5 authentication support.
+- Preserves full repo history of authors, commits and branches from the original SourceForge project.
diff --git a/www/resources/PHPMailer/class.phpmailer.php b/www/resources/PHPMailer/class.phpmailer.php
new file mode 100644 (file)
index 0000000..667f187
--- /dev/null
@@ -0,0 +1,2810 @@
+<?php
+/*~ class.phpmailer.php
+.---------------------------------------------------------------------------.
+|  Software: PHPMailer - PHP email class                                    |
+|   Version: 5.2.6                                                          |
+|      Site: https://github.com/PHPMailer/PHPMailer/                        |
+| ------------------------------------------------------------------------- |
+|    Admins: Marcus Bointon                                                 |
+|    Admins: Jim Jagielski                                                  |
+|   Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
+|          : Marcus Bointon (coolbru) phpmailer@synchromedia.co.uk          |
+|          : Jim Jagielski (jimjag) jimjag@gmail.com                        |
+|   Founder: Brent R. Matzelle (original founder)                           |
+| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved.              |
+| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved.               |
+| Copyright (c) 2001-2003, Brent R. Matzelle                                |
+| ------------------------------------------------------------------------- |
+|   License: Distributed under the Lesser General Public License (LGPL)     |
+|            http://www.gnu.org/copyleft/lesser.html                        |
+| This program is distributed in the hope that it will be useful - WITHOUT  |
+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
+| FITNESS FOR A PARTICULAR PURPOSE.                                         |
+'---------------------------------------------------------------------------'
+*/
+
+/**
+ * PHPMailer - PHP email creation and transport class
+ * NOTE: Requires PHP version 5 or later
+ * @package PHPMailer
+ * @author Andy Prevost
+ * @author Marcus Bointon
+ * @author Jim Jagielski
+ * @copyright 2010 - 2012 Jim Jagielski
+ * @copyright 2004 - 2009 Andy Prevost
+ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ */
+
+if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n");
+
+/**
+ * PHP email creation and transport class
+ * @package PHPMailer
+ */
+class PHPMailer {
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PUBLIC
+  /////////////////////////////////////////////////
+
+  /**
+   * Email priority (1 = High, 3 = Normal, 5 = low).
+   * @var int
+   */
+  public $Priority          = 3;
+
+  /**
+   * Sets the CharSet of the message.
+   * @var string
+   */
+  public $CharSet           = 'iso-8859-1';
+
+  /**
+   * Sets the Content-type of the message.
+   * @var string
+   */
+  public $ContentType       = 'text/plain';
+
+  /**
+   * Sets the Encoding of the message. Options for this are
+   *  "8bit", "7bit", "binary", "base64", and "quoted-printable".
+   * @var string
+   */
+  public $Encoding          = '8bit';
+
+  /**
+   * Holds the most recent mailer error message.
+   * @var string
+   */
+  public $ErrorInfo         = '';
+
+  /**
+   * Sets the From email address for the message.
+   * @var string
+   */
+  public $From              = 'root@localhost';
+
+  /**
+   * Sets the From name of the message.
+   * @var string
+   */
+  public $FromName          = 'Root User';
+
+  /**
+   * Sets the Sender email (Return-Path) of the message.  If not empty,
+   * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
+   * @var string
+   */
+  public $Sender            = '';
+
+  /**
+   * Sets the Return-Path of the message.  If empty, it will
+   * be set to either From or Sender.
+   * @var string
+   */
+  public $ReturnPath        = '';
+
+  /**
+   * Sets the Subject of the message.
+   * @var string
+   */
+  public $Subject           = '';
+
+  /**
+   * Sets the Body of the message.  This can be either an HTML or text body.
+   * If HTML then run IsHTML(true).
+   * @var string
+   */
+  public $Body              = '';
+
+  /**
+   * Sets the text-only body of the message.  This automatically sets the
+   * email to multipart/alternative.  This body can be read by mail
+   * clients that do not have HTML email capability such as mutt. Clients
+   * that can read HTML will view the normal Body.
+   * @var string
+   */
+  public $AltBody           = '';
+
+  /**
+   * Stores the complete compiled MIME message body.
+   * @var string
+   * @access protected
+   */
+  protected $MIMEBody       = '';
+
+  /**
+   * Stores the complete compiled MIME message headers.
+   * @var string
+   * @access protected
+   */
+  protected $MIMEHeader     = '';
+
+  /**
+   * Stores the extra header list which CreateHeader() doesn't fold in
+   * @var string
+   * @access protected
+   */
+  protected $mailHeader     = '';
+
+  /**
+   * Sets word wrapping on the body of the message to a given number of
+   * characters.
+   * @var int
+   */
+  public $WordWrap          = 0;
+
+  /**
+   * Method to send mail: ("mail", "sendmail", or "smtp").
+   * @var string
+   */
+  public $Mailer            = 'mail';
+
+  /**
+   * Sets the path of the sendmail program.
+   * @var string
+   */
+  public $Sendmail          = '/usr/sbin/sendmail';
+
+  /**
+   * Determine if mail() uses a fully sendmail compatible MTA that
+   * supports sendmail's "-oi -f" options
+   * @var boolean
+   */
+  public $UseSendmailOptions   = true;
+
+  /**
+   * Path to PHPMailer plugins.  Useful if the SMTP class
+   * is in a different directory than the PHP include path.
+   * @var string
+   */
+  public $PluginDir         = '';
+
+  /**
+   * Sets the email address that a reading confirmation will be sent.
+   * @var string
+   */
+  public $ConfirmReadingTo  = '';
+
+  /**
+   * Sets the hostname to use in Message-Id and Received headers
+   * and as default HELO string. If empty, the value returned
+   * by SERVER_NAME is used or 'localhost.localdomain'.
+   * @var string
+   */
+  public $Hostname          = '';
+
+  /**
+   * Sets the message ID to be used in the Message-Id header.
+   * If empty, a unique id will be generated.
+   * @var string
+   */
+  public $MessageID         = '';
+
+  /**
+   * Sets the message Date to be used in the Date header.
+   * If empty, the current date will be added.
+   * @var string
+   */
+  public $MessageDate       = '';
+
+  /////////////////////////////////////////////////
+  // PROPERTIES FOR SMTP
+  /////////////////////////////////////////////////
+
+  /**
+   * Sets the SMTP hosts.
+   *
+   * All hosts must be separated by a
+   * semicolon.  You can also specify a different port
+   * for each host by using this format: [hostname:port]
+   * (e.g. "smtp1.example.com:25;smtp2.example.com").
+   * Hosts will be tried in order.
+   * @var string
+   */
+  public $Host          = 'localhost';
+
+  /**
+   * Sets the default SMTP server port.
+   * @var int
+   */
+  public $Port          = 25;
+
+  /**
+   * Sets the SMTP HELO of the message (Default is $Hostname).
+   * @var string
+   */
+  public $Helo          = '';
+
+  /**
+   * Sets connection prefix. Options are "", "ssl" or "tls"
+   * @var string
+   */
+  public $SMTPSecure    = '';
+
+  /**
+   * Sets SMTP authentication. Utilizes the Username and Password variables.
+   * @var bool
+   */
+  public $SMTPAuth      = false;
+
+  /**
+   * Sets SMTP username.
+   * @var string
+   */
+  public $Username      = '';
+
+  /**
+   * Sets SMTP password.
+   * @var string
+   */
+  public $Password      = '';
+
+  /**
+   *  Sets SMTP auth type. Options are LOGIN | PLAIN | NTLM | CRAM-MD5 (default LOGIN)
+   *  @var string
+   */
+  public $AuthType      = '';
+
+  /**
+   *  Sets SMTP realm.
+   *  @var string
+   */
+  public $Realm         = '';
+
+  /**
+   *  Sets SMTP workstation.
+   *  @var string
+   */
+  public $Workstation   = '';
+
+  /**
+   * Sets the SMTP server timeout in seconds.
+   * This function will not work with the win32 version.
+   * @var int
+   */
+  public $Timeout       = 10;
+
+  /**
+   * Sets SMTP class debugging on or off.
+   * @var bool
+   */
+  public $SMTPDebug     = false;
+
+  /**
+   * Sets the function/method to use for debugging output.
+   * Right now we only honor "echo" or "error_log"
+   * @var string
+   */
+  public $Debugoutput     = "echo";
+
+  /**
+   * Prevents the SMTP connection from being closed after each mail
+   * sending.  If this is set to true then to close the connection
+   * requires an explicit call to SmtpClose().
+   * @var bool
+   */
+  public $SMTPKeepAlive = false;
+
+  /**
+   * Provides the ability to have the TO field process individual
+   * emails, instead of sending to entire TO addresses
+   * @var bool
+   */
+  public $SingleTo      = false;
+
+   /**
+   * If SingleTo is true, this provides the array to hold the email addresses
+   * @var bool
+   */
+  public $SingleToArray = array();
+
+  /**
+   * Should we allow sending messages with empty body?
+   * @var bool
+   */
+  public $AllowEmpty = false;
+
+    /**
+   * Provides the ability to change the generic line ending
+   * NOTE: The default remains '\n'. We force CRLF where we KNOW
+   *        it must be used via self::CRLF
+   * @var string
+   */
+  public $LE              = "\n";
+
+   /**
+   * Used with DKIM Signing
+   * required parameter if DKIM is enabled
+   *
+   * domain selector example domainkey
+   * @var string
+   */
+  public $DKIM_selector   = '';
+
+  /**
+   * Used with DKIM Signing
+   * required if DKIM is enabled, in format of email address 'you@yourdomain.com' typically used as the source of the email
+   * @var string
+   */
+  public $DKIM_identity   = '';
+
+  /**
+   * Used with DKIM Signing
+   * optional parameter if your private key requires a passphras
+   * @var string
+   */
+  public $DKIM_passphrase   = '';
+
+  /**
+   * Used with DKIM Singing
+   * required if DKIM is enabled, in format of email address 'domain.com'
+   * @var string
+   */
+  public $DKIM_domain     = '';
+
+  /**
+   * Used with DKIM Signing
+   * required if DKIM is enabled, path to private key file
+   * @var string
+   */
+  public $DKIM_private    = '';
+
+  /**
+   * Callback Action function name.
+   * The function that handles the result of the send email action.
+   * It is called out by Send() for each email sent.
+   *
+   * Value can be:
+   * - 'function_name' for function names
+   * - 'Class::Method' for static method calls
+   * - array($object, 'Method') for calling methods on $object
+   * See http://php.net/is_callable manual page for more details.
+   *
+   * Parameters:
+   *   bool    $result        result of the send action
+   *   string  $to            email address of the recipient
+   *   string  $cc            cc email addresses
+   *   string  $bcc           bcc email addresses
+   *   string  $subject       the subject
+   *   string  $body          the email body
+   *   string  $from          email address of sender
+   * @var string
+   */
+  public $action_function = ''; //'callbackAction';
+
+  /**
+   * Sets the PHPMailer Version number
+   * @var string
+   */
+  public $Version         = '5.2.6';
+
+  /**
+   * What to use in the X-Mailer header
+   * @var string NULL for default, whitespace for None, or actual string to use
+   */
+  public $XMailer         = '';
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PRIVATE AND PROTECTED
+  /////////////////////////////////////////////////
+
+  /**
+   * @var SMTP An instance of the SMTP sender class
+   * @access protected
+   */
+  protected   $smtp           = null;
+  /**
+   * @var array An array of 'to' addresses
+   * @access protected
+   */
+  protected   $to             = array();
+  /**
+   * @var array An array of 'cc' addresses
+   * @access protected
+   */
+  protected   $cc             = array();
+  /**
+   * @var array An array of 'bcc' addresses
+   * @access protected
+   */
+  protected   $bcc            = array();
+  /**
+   * @var array An array of reply-to name and address
+   * @access protected
+   */
+  protected   $ReplyTo        = array();
+  /**
+   * @var array An array of all kinds of addresses: to, cc, bcc, replyto
+   * @access protected
+   */
+  protected   $all_recipients = array();
+  /**
+   * @var array An array of attachments
+   * @access protected
+   */
+  protected   $attachment     = array();
+  /**
+   * @var array An array of custom headers
+   * @access protected
+   */
+  protected   $CustomHeader   = array();
+  /**
+   * @var string The message's MIME type
+   * @access protected
+   */
+  protected   $message_type   = '';
+  /**
+   * @var array An array of MIME boundary strings
+   * @access protected
+   */
+  protected   $boundary       = array();
+  /**
+   * @var array An array of available languages
+   * @access protected
+   */
+  protected   $language       = array();
+  /**
+   * @var integer The number of errors encountered
+   * @access protected
+   */
+  protected   $error_count    = 0;
+  /**
+   * @var string The filename of a DKIM certificate file
+   * @access protected
+   */
+  protected   $sign_cert_file = '';
+  /**
+   * @var string The filename of a DKIM key file
+   * @access protected
+   */
+  protected   $sign_key_file  = '';
+  /**
+   * @var string The password of a DKIM key
+   * @access protected
+   */
+  protected   $sign_key_pass  = '';
+  /**
+   * @var boolean Whether to throw exceptions for errors
+   * @access protected
+   */
+  protected   $exceptions     = false;
+
+  /////////////////////////////////////////////////
+  // CONSTANTS
+  /////////////////////////////////////////////////
+
+  const STOP_MESSAGE  = 0; // message only, continue processing
+  const STOP_CONTINUE = 1; // message?, likely ok to continue processing
+  const STOP_CRITICAL = 2; // message, plus full stop, critical error reached
+  const CRLF = "\r\n";     // SMTP RFC specified EOL
+
+  /////////////////////////////////////////////////
+  // METHODS, VARIABLES
+  /////////////////////////////////////////////////
+
+  /**
+   * Calls actual mail() function, but in a safe_mode aware fashion
+   * Also, unless sendmail_path points to sendmail (or something that
+   * claims to be sendmail), don't pass params (not a perfect fix,
+   * but it will do)
+   * @param string $to To
+   * @param string $subject Subject
+   * @param string $body Message Body
+   * @param string $header Additional Header(s)
+   * @param string $params Params
+   * @access private
+   * @return bool
+   */
+  private function mail_passthru($to, $subject, $body, $header, $params) {
+    if ( ini_get('safe_mode') || !($this->UseSendmailOptions) ) {
+        $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header);
+    } else {
+        $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header, $params);
+    }
+    return $rt;
+  }
+
+  /**
+   * Outputs debugging info via user-defined method
+   * @param string $str
+   */
+  private function edebug($str) {
+    if ($this->Debugoutput == "error_log") {
+        error_log($str);
+    } else {
+        echo $str;
+    }
+  }
+
+  /**
+   * Constructor
+   * @param boolean $exceptions Should we throw external exceptions?
+   */
+  public function __construct($exceptions = false) {
+    $this->exceptions = ($exceptions == true);
+  }
+
+  /**
+   * Destructor
+   */
+  public function __destruct() {
+      if ($this->Mailer == 'smtp') { //Close any open SMTP connection nicely
+          $this->SmtpClose();
+      }
+  }
+
+  /**
+   * Sets message type to HTML.
+   * @param bool $ishtml
+   * @return void
+   */
+  public function IsHTML($ishtml = true) {
+    if ($ishtml) {
+      $this->ContentType = 'text/html';
+    } else {
+      $this->ContentType = 'text/plain';
+    }
+  }
+
+  /**
+   * Sets Mailer to send message using SMTP.
+   * @return void
+   */
+  public function IsSMTP() {
+    $this->Mailer = 'smtp';
+  }
+
+  /**
+   * Sets Mailer to send message using PHP mail() function.
+   * @return void
+   */
+  public function IsMail() {
+    $this->Mailer = 'mail';
+  }
+
+  /**
+   * Sets Mailer to send message using the $Sendmail program.
+   * @return void
+   */
+  public function IsSendmail() {
+    if (!stristr(ini_get('sendmail_path'), 'sendmail')) {
+      $this->Sendmail = '/var/qmail/bin/sendmail';
+    }
+    $this->Mailer = 'sendmail';
+  }
+
+  /**
+   * Sets Mailer to send message using the qmail MTA.
+   * @return void
+   */
+  public function IsQmail() {
+    if (stristr(ini_get('sendmail_path'), 'qmail')) {
+      $this->Sendmail = '/var/qmail/bin/sendmail';
+    }
+    $this->Mailer = 'sendmail';
+  }
+
+  /////////////////////////////////////////////////
+  // METHODS, RECIPIENTS
+  /////////////////////////////////////////////////
+
+  /**
+   * Adds a "To" address.
+   * @param string $address
+   * @param string $name
+   * @return boolean true on success, false if address already used
+   */
+  public function AddAddress($address, $name = '') {
+    return $this->AddAnAddress('to', $address, $name);
+  }
+
+  /**
+   * Adds a "Cc" address.
+   * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
+   * @param string $address
+   * @param string $name
+   * @return boolean true on success, false if address already used
+   */
+  public function AddCC($address, $name = '') {
+    return $this->AddAnAddress('cc', $address, $name);
+  }
+
+  /**
+   * Adds a "Bcc" address.
+   * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
+   * @param string $address
+   * @param string $name
+   * @return boolean true on success, false if address already used
+   */
+  public function AddBCC($address, $name = '') {
+    return $this->AddAnAddress('bcc', $address, $name);
+  }
+
+  /**
+   * Adds a "Reply-to" address.
+   * @param string $address
+   * @param string $name
+   * @return boolean
+   */
+  public function AddReplyTo($address, $name = '') {
+    return $this->AddAnAddress('Reply-To', $address, $name);
+  }
+
+  /**
+   * Adds an address to one of the recipient arrays
+   * Addresses that have been added already return false, but do not throw exceptions
+   * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo'
+   * @param string $address The email address to send to
+   * @param string $name
+   * @throws phpmailerException
+   * @return boolean true on success, false if address already used or invalid in some way
+   * @access protected
+   */
+  protected function AddAnAddress($kind, $address, $name = '') {
+    if (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) {
+      $this->SetError($this->Lang('Invalid recipient array').': '.$kind);
+      if ($this->exceptions) {
+        throw new phpmailerException('Invalid recipient array: ' . $kind);
+      }
+      if ($this->SMTPDebug) {
+        $this->edebug($this->Lang('Invalid recipient array').': '.$kind);
+      }
+      return false;
+    }
+    $address = trim($address);
+    $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
+    if (!$this->ValidateAddress($address)) {
+      $this->SetError($this->Lang('invalid_address').': '. $address);
+      if ($this->exceptions) {
+        throw new phpmailerException($this->Lang('invalid_address').': '.$address);
+      }
+      if ($this->SMTPDebug) {
+        $this->edebug($this->Lang('invalid_address').': '.$address);
+      }
+      return false;
+    }
+    if ($kind != 'Reply-To') {
+      if (!isset($this->all_recipients[strtolower($address)])) {
+        array_push($this->$kind, array($address, $name));
+        $this->all_recipients[strtolower($address)] = true;
+        return true;
+      }
+    } else {
+      if (!array_key_exists(strtolower($address), $this->ReplyTo)) {
+        $this->ReplyTo[strtolower($address)] = array($address, $name);
+      return true;
+    }
+  }
+  return false;
+}
+
+  /**
+   * Set the From and FromName properties
+   * @param string $address
+   * @param string $name
+   * @param int $auto Also set Reply-To and Sender
+   * @throws phpmailerException
+   * @return boolean
+   */
+  public function SetFrom($address, $name = '', $auto = 1) {
+    $address = trim($address);
+    $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
+    if (!$this->ValidateAddress($address)) {
+      $this->SetError($this->Lang('invalid_address').': '. $address);
+      if ($this->exceptions) {
+        throw new phpmailerException($this->Lang('invalid_address').': '.$address);
+      }
+      if ($this->SMTPDebug) {
+        $this->edebug($this->Lang('invalid_address').': '.$address);
+      }
+      return false;
+    }
+    $this->From = $address;
+    $this->FromName = $name;
+    if ($auto) {
+      if (empty($this->ReplyTo)) {
+        $this->AddAnAddress('Reply-To', $address, $name);
+      }
+      if (empty($this->Sender)) {
+        $this->Sender = $address;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Check that a string looks roughly like an email address should
+   * Static so it can be used without instantiation, public so people can overload
+   * Conforms to RFC5322: Uses *correct* regex on which FILTER_VALIDATE_EMAIL is
+   * based; So why not use FILTER_VALIDATE_EMAIL? Because it was broken to
+   * not allow a@b type valid addresses :(
+   * @link http://squiloople.com/2009/12/20/email-address-validation/
+   * @copyright regex Copyright Michael Rushton 2009-10 | http://squiloople.com/ | Feel free to use and redistribute this code. But please keep this copyright notice.
+   * @param string $address The email address to check
+   * @return boolean
+   * @static
+   * @access public
+   */
+  public static function ValidateAddress($address) {
+      if (defined('PCRE_VERSION')) { //Check this instead of extension_loaded so it works when that function is disabled
+          if (version_compare(PCRE_VERSION, '8.0') >= 0) {
+              return (boolean)preg_match('/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address);
+          } else {
+              //Fall back to an older regex that doesn't need a recent PCRE
+              return (boolean)preg_match('/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD', $address);
+          }
+      } else {
+          //No PCRE! Do something _very_ approximate!
+          //Check the address is 3 chars or longer and contains an @ that's not the first or last char
+          return (strlen($address) >= 3 and strpos($address, '@') >= 1 and strpos($address, '@') != strlen($address) - 1);
+      }
+  }
+
+  /////////////////////////////////////////////////
+  // METHODS, MAIL SENDING
+  /////////////////////////////////////////////////
+
+  /**
+   * Creates message and assigns Mailer. If the message is
+   * not sent successfully then it returns false.  Use the ErrorInfo
+   * variable to view description of the error.
+   * @throws phpmailerException
+   * @return bool
+   */
+  public function Send() {
+    try {
+      if(!$this->PreSend()) return false;
+      return $this->PostSend();
+    } catch (phpmailerException $e) {
+      $this->mailHeader = '';
+      $this->SetError($e->getMessage());
+      if ($this->exceptions) {
+        throw $e;
+      }
+      return false;
+    }
+  }
+
+  /**
+   * Prep mail by constructing all message entities
+   * @throws phpmailerException
+   * @return bool
+   */
+  public function PreSend() {
+    try {
+      $this->mailHeader = "";
+      if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {
+        throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL);
+      }
+
+      // Set whether the message is multipart/alternative
+      if(!empty($this->AltBody)) {
+        $this->ContentType = 'multipart/alternative';
+      }
+
+      $this->error_count = 0; // reset errors
+      $this->SetMessageType();
+      //Refuse to send an empty message unless we are specifically allowing it
+      if (!$this->AllowEmpty and empty($this->Body)) {
+        throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL);
+      }
+
+      $this->MIMEHeader = $this->CreateHeader();
+      $this->MIMEBody = $this->CreateBody();
+
+      // To capture the complete message when using mail(), create
+      // an extra header list which CreateHeader() doesn't fold in
+      if ($this->Mailer == 'mail') {
+        if (count($this->to) > 0) {
+          $this->mailHeader .= $this->AddrAppend("To", $this->to);
+        } else {
+          $this->mailHeader .= $this->HeaderLine("To", "undisclosed-recipients:;");
+        }
+        $this->mailHeader .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader(trim($this->Subject))));
+      }
+
+      // digitally sign with DKIM if enabled
+      if (!empty($this->DKIM_domain) && !empty($this->DKIM_private) && !empty($this->DKIM_selector) && !empty($this->DKIM_domain) && file_exists($this->DKIM_private)) {
+        $header_dkim = $this->DKIM_Add($this->MIMEHeader . $this->mailHeader, $this->EncodeHeader($this->SecureHeader($this->Subject)), $this->MIMEBody);
+        $this->MIMEHeader = str_replace("\r\n", "\n", $header_dkim) . $this->MIMEHeader;
+      }
+
+      return true;
+
+    } catch (phpmailerException $e) {
+      $this->SetError($e->getMessage());
+      if ($this->exceptions) {
+        throw $e;
+      }
+      return false;
+    }
+  }
+
+  /**
+   * Actual Email transport function
+   * Send the email via the selected mechanism
+   * @throws phpmailerException
+   * @return bool
+   */
+  public function PostSend() {
+    try {
+      // Choose the mailer and send through it
+      switch($this->Mailer) {
+        case 'sendmail':
+          return $this->SendmailSend($this->MIMEHeader, $this->MIMEBody);
+        case 'smtp':
+          return $this->SmtpSend($this->MIMEHeader, $this->MIMEBody);
+        case 'mail':
+          return $this->MailSend($this->MIMEHeader, $this->MIMEBody);
+        default:
+          return $this->MailSend($this->MIMEHeader, $this->MIMEBody);
+      }
+    } catch (phpmailerException $e) {
+      $this->SetError($e->getMessage());
+      if ($this->exceptions) {
+        throw $e;
+      }
+      if ($this->SMTPDebug) {
+        $this->edebug($e->getMessage()."\n");
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Sends mail using the $Sendmail program.
+   * @param string $header The message headers
+   * @param string $body The message body
+   * @throws phpmailerException
+   * @access protected
+   * @return bool
+   */
+  protected function SendmailSend($header, $body) {
+    if ($this->Sender != '') {
+      $sendmail = sprintf("%s -oi -f%s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
+    } else {
+      $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));
+    }
+    if ($this->SingleTo === true) {
+      foreach ($this->SingleToArray as $val) {
+        if(!@$mail = popen($sendmail, 'w')) {
+          throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
+        }
+        fputs($mail, "To: " . $val . "\n");
+        fputs($mail, $header);
+        fputs($mail, $body);
+        $result = pclose($mail);
+        // implement call back function if it exists
+        $isSent = ($result == 0) ? 1 : 0;
+        $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);
+        if($result != 0) {
+          throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
+        }
+      }
+    } else {
+      if(!@$mail = popen($sendmail, 'w')) {
+        throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
+      }
+      fputs($mail, $header);
+      fputs($mail, $body);
+      $result = pclose($mail);
+      // implement call back function if it exists
+      $isSent = ($result == 0) ? 1 : 0;
+      $this->doCallback($isSent, $this->to, $this->cc, $this->bcc, $this->Subject, $body);
+      if($result != 0) {
+        throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Sends mail using the PHP mail() function.
+   * @param string $header The message headers
+   * @param string $body The message body
+   * @throws phpmailerException
+   * @access protected
+   * @return bool
+   */
+  protected function MailSend($header, $body) {
+    $toArr = array();
+    foreach($this->to as $t) {
+      $toArr[] = $this->AddrFormat($t);
+    }
+    $to = implode(', ', $toArr);
+
+    if (empty($this->Sender)) {
+      $params = " ";
+    } else {
+      $params = sprintf("-f%s", $this->Sender);
+    }
+    if ($this->Sender != '' and !ini_get('safe_mode')) {
+      $old_from = ini_get('sendmail_from');
+      ini_set('sendmail_from', $this->Sender);
+    }
+      $rt = false;
+    if ($this->SingleTo === true && count($toArr) > 1) {
+      foreach ($toArr as $val) {
+        $rt = $this->mail_passthru($val, $this->Subject, $body, $header, $params);
+        // implement call back function if it exists
+        $isSent = ($rt == 1) ? 1 : 0;
+        $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);
+      }
+    } else {
+      $rt = $this->mail_passthru($to, $this->Subject, $body, $header, $params);
+      // implement call back function if it exists
+      $isSent = ($rt == 1) ? 1 : 0;
+      $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body);
+    }
+    if (isset($old_from)) {
+      ini_set('sendmail_from', $old_from);
+    }
+    if(!$rt) {
+      throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL);
+    }
+    return true;
+  }
+
+  /**
+   * Sends mail via SMTP using PhpSMTP
+   * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
+   * @param string $header The message headers
+   * @param string $body The message body
+   * @throws phpmailerException
+   * @uses SMTP
+   * @access protected
+   * @return bool
+   */
+  protected function SmtpSend($header, $body) {
+    require_once $this->PluginDir . 'class.smtp.php';
+    $bad_rcpt = array();
+
+    if(!$this->SmtpConnect()) {
+      throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL);
+    }
+    $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
+    if(!$this->smtp->Mail($smtp_from)) {
+      $this->SetError($this->Lang('from_failed') . $smtp_from . ' : ' .implode(',', $this->smtp->getError()));
+      throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL);
+    }
+
+    // Attempt to send attach all recipients
+    foreach($this->to as $to) {
+      if (!$this->smtp->Recipient($to[0])) {
+        $bad_rcpt[] = $to[0];
+        // implement call back function if it exists
+        $isSent = 0;
+        $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body);
+      } else {
+        // implement call back function if it exists
+        $isSent = 1;
+        $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body);
+      }
+    }
+    foreach($this->cc as $cc) {
+      if (!$this->smtp->Recipient($cc[0])) {
+        $bad_rcpt[] = $cc[0];
+        // implement call back function if it exists
+        $isSent = 0;
+        $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body);
+      } else {
+        // implement call back function if it exists
+        $isSent = 1;
+        $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body);
+      }
+    }
+    foreach($this->bcc as $bcc) {
+      if (!$this->smtp->Recipient($bcc[0])) {
+        $bad_rcpt[] = $bcc[0];
+        // implement call back function if it exists
+        $isSent = 0;
+        $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body);
+      } else {
+        // implement call back function if it exists
+        $isSent = 1;
+        $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body);
+      }
+    }
+
+
+    if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses
+      $badaddresses = implode(', ', $bad_rcpt);
+      throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses);
+    }
+    if(!$this->smtp->Data($header . $body)) {
+      throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL);
+    }
+    if($this->SMTPKeepAlive == true) {
+      $this->smtp->Reset();
+    } else {
+        $this->smtp->Quit();
+        $this->smtp->Close();
+    }
+    return true;
+  }
+
+  /**
+   * Initiates a connection to an SMTP server.
+   * Returns false if the operation failed.
+   * @uses SMTP
+   * @access public
+   * @throws phpmailerException
+   * @return bool
+   */
+  public function SmtpConnect() {
+    if(is_null($this->smtp)) {
+      $this->smtp = new SMTP;
+    }
+
+    $this->smtp->Timeout = $this->Timeout;
+    $this->smtp->do_debug = $this->SMTPDebug;
+    $hosts = explode(';', $this->Host);
+    $index = 0;
+    $connection = $this->smtp->Connected();
+
+    // Retry while there is no connection
+    try {
+      while($index < count($hosts) && !$connection) {
+        $hostinfo = array();
+        if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) {
+          $host = $hostinfo[1];
+          $port = $hostinfo[2];
+        } else {
+          $host = $hosts[$index];
+          $port = $this->Port;
+        }
+
+        $tls = ($this->SMTPSecure == 'tls');
+        $ssl = ($this->SMTPSecure == 'ssl');
+
+        if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) {
+
+          $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname());
+          $this->smtp->Hello($hello);
+
+          if ($tls) {
+            if (!$this->smtp->StartTLS()) {
+              throw new phpmailerException($this->Lang('connect_host'));
+            }
+
+            //We must resend HELO after tls negotiation
+            $this->smtp->Hello($hello);
+          }
+
+          $connection = true;
+          if ($this->SMTPAuth) {
+            if (!$this->smtp->Authenticate($this->Username, $this->Password, $this->AuthType, $this->Realm, $this->Workstation)) {
+              throw new phpmailerException($this->Lang('authenticate'));
+            }
+          }
+        }
+        $index++;
+        if (!$connection) {
+          throw new phpmailerException($this->Lang('connect_host'));
+        }
+      }
+    } catch (phpmailerException $e) {
+      $this->smtp->Reset();
+      if ($this->exceptions) {
+        throw $e;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Closes the active SMTP session if one exists.
+   * @return void
+   */
+  public function SmtpClose() {
+    if ($this->smtp !== null) {
+      if($this->smtp->Connected()) {
+        $this->smtp->Quit();
+        $this->smtp->Close();
+      }
+    }
+  }
+
+  /**
+   * Sets the language for all class error messages.
+   * Returns false if it cannot load the language file.  The default language is English.
+   * @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br")
+   * @param string $lang_path Path to the language file directory
+   * @return bool
+   * @access public
+   */
+  function SetLanguage($langcode = 'en', $lang_path = 'language/') {
+    //Define full set of translatable strings
+    $PHPMAILER_LANG = array(
+      'authenticate'         => 'SMTP Error: Could not authenticate.',
+      'connect_host'         => 'SMTP Error: Could not connect to SMTP host.',
+      'data_not_accepted'    => 'SMTP Error: Data not accepted.',
+      'empty_message'        => 'Message body empty',
+      'encoding'             => 'Unknown encoding: ',
+      'execute'              => 'Could not execute: ',
+      'file_access'          => 'Could not access file: ',
+      'file_open'            => 'File Error: Could not open file: ',
+      'from_failed'          => 'The following From address failed: ',
+      'instantiate'          => 'Could not instantiate mail function.',
+      'invalid_address'      => 'Invalid address',
+      'mailer_not_supported' => ' mailer is not supported.',
+      'provide_address'      => 'You must provide at least one recipient email address.',
+      'recipients_failed'    => 'SMTP Error: The following recipients failed: ',
+      'signing'              => 'Signing Error: ',
+      'smtp_connect_failed'  => 'SMTP Connect() failed.',
+      'smtp_error'           => 'SMTP server error: ',
+      'variable_set'         => 'Cannot set or reset variable: '
+    );
+    //Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"!
+    $l = true;
+    if ($langcode != 'en') { //There is no English translation file
+      $l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php';
+    }
+    $this->language = $PHPMAILER_LANG;
+    return ($l == true); //Returns false if language not found
+  }
+
+  /**
+  * Return the current array of language strings
+  * @return array
+  */
+  public function GetTranslations() {
+    return $this->language;
+  }
+
+  /////////////////////////////////////////////////
+  // METHODS, MESSAGE CREATION
+  /////////////////////////////////////////////////
+
+  /**
+   * Creates recipient headers.
+   * @access public
+   * @param string $type
+   * @param array $addr
+   * @return string
+   */
+  public function AddrAppend($type, $addr) {
+    $addr_str = $type . ': ';
+    $addresses = array();
+    foreach ($addr as $a) {
+      $addresses[] = $this->AddrFormat($a);
+    }
+    $addr_str .= implode(', ', $addresses);
+    $addr_str .= $this->LE;
+
+    return $addr_str;
+  }
+
+  /**
+   * Formats an address correctly.
+   * @access public
+   * @param string $addr
+   * @return string
+   */
+  public function AddrFormat($addr) {
+    if (empty($addr[1])) {
+      return $this->SecureHeader($addr[0]);
+    } else {
+      return $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">";
+    }
+  }
+
+  /**
+   * Wraps message for use with mailers that do not
+   * automatically perform wrapping and for quoted-printable.
+   * Original written by philippe.
+   * @param string $message The message to wrap
+   * @param integer $length The line length to wrap to
+   * @param boolean $qp_mode Whether to run in Quoted-Printable mode
+   * @access public
+   * @return string
+   */
+  public function WrapText($message, $length, $qp_mode = false) {
+    $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;
+    // If utf-8 encoding is used, we will need to make sure we don't
+    // split multibyte characters when we wrap
+    $is_utf8 = (strtolower($this->CharSet) == "utf-8");
+    $lelen = strlen($this->LE);
+    $crlflen = strlen(self::CRLF);
+
+    $message = $this->FixEOL($message);
+    if (substr($message, -$lelen) == $this->LE) {
+      $message = substr($message, 0, -$lelen);
+    }
+
+    $line = explode($this->LE, $message);   // Magic. We know FixEOL uses $LE
+    $message = '';
+    for ($i = 0 ;$i < count($line); $i++) {
+      $line_part = explode(' ', $line[$i]);
+      $buf = '';
+      for ($e = 0; $e<count($line_part); $e++) {
+        $word = $line_part[$e];
+        if ($qp_mode and (strlen($word) > $length)) {
+          $space_left = $length - strlen($buf) - $crlflen;
+          if ($e != 0) {
+            if ($space_left > 20) {
+              $len = $space_left;
+              if ($is_utf8) {
+                $len = $this->UTF8CharBoundary($word, $len);
+              } elseif (substr($word, $len - 1, 1) == "=") {
+                $len--;
+              } elseif (substr($word, $len - 2, 1) == "=") {
+                $len -= 2;
+              }
+              $part = substr($word, 0, $len);
+              $word = substr($word, $len);
+              $buf .= ' ' . $part;
+              $message .= $buf . sprintf("=%s", self::CRLF);
+            } else {
+              $message .= $buf . $soft_break;
+            }
+            $buf = '';
+          }
+          while (strlen($word) > 0) {
+            if ($length <= 0) {
+                break;
+            }
+            $len = $length;
+            if ($is_utf8) {
+              $len = $this->UTF8CharBoundary($word, $len);
+            } elseif (substr($word, $len - 1, 1) == "=") {
+              $len--;
+            } elseif (substr($word, $len - 2, 1) == "=") {
+              $len -= 2;
+            }
+            $part = substr($word, 0, $len);
+            $word = substr($word, $len);
+
+            if (strlen($word) > 0) {
+              $message .= $part . sprintf("=%s", self::CRLF);
+            } else {
+              $buf = $part;
+            }
+          }
+        } else {
+          $buf_o = $buf;
+          $buf .= ($e == 0) ? $word : (' ' . $word);
+
+          if (strlen($buf) > $length and $buf_o != '') {
+            $message .= $buf_o . $soft_break;
+            $buf = $word;
+          }
+        }
+      }
+      $message .= $buf . self::CRLF;
+    }
+
+    return $message;
+  }
+
+  /**
+   * Finds last character boundary prior to maxLength in a utf-8
+   * quoted (printable) encoded string.
+   * Original written by Colin Brown.
+   * @access public
+   * @param string $encodedText utf-8 QP text
+   * @param int    $maxLength   find last character boundary prior to this length
+   * @return int
+   */
+  public function UTF8CharBoundary($encodedText, $maxLength) {
+    $foundSplitPos = false;
+    $lookBack = 3;
+    while (!$foundSplitPos) {
+      $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);
+      $encodedCharPos = strpos($lastChunk, "=");
+      if ($encodedCharPos !== false) {
+        // Found start of encoded character byte within $lookBack block.
+        // Check the encoded byte value (the 2 chars after the '=')
+        $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2);
+        $dec = hexdec($hex);
+        if ($dec < 128) { // Single byte character.
+          // If the encoded char was found at pos 0, it will fit
+          // otherwise reduce maxLength to start of the encoded char
+          $maxLength = ($encodedCharPos == 0) ? $maxLength :
+          $maxLength - ($lookBack - $encodedCharPos);
+          $foundSplitPos = true;
+        } elseif ($dec >= 192) { // First byte of a multi byte character
+          // Reduce maxLength to split at start of character
+          $maxLength = $maxLength - ($lookBack - $encodedCharPos);
+          $foundSplitPos = true;
+        } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back
+          $lookBack += 3;
+        }
+      } else {
+        // No encoded character found
+        $foundSplitPos = true;
+      }
+    }
+    return $maxLength;
+  }
+
+
+  /**
+   * Set the body wrapping.
+   * @access public
+   * @return void
+   */
+  public function SetWordWrap() {
+    if($this->WordWrap < 1) {
+      return;
+    }
+
+    switch($this->message_type) {
+      case 'alt':
+      case 'alt_inline':
+      case 'alt_attach':
+      case 'alt_inline_attach':
+        $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);
+        break;
+      default:
+        $this->Body = $this->WrapText($this->Body, $this->WordWrap);
+        break;
+    }
+  }
+
+  /**
+   * Assembles message header.
+   * @access public
+   * @return string The assembled header
+   */
+  public function CreateHeader() {
+    $result = '';
+
+    // Set the boundaries
+    $uniq_id = md5(uniqid(time()));
+    $this->boundary[1] = 'b1_' . $uniq_id;
+    $this->boundary[2] = 'b2_' . $uniq_id;
+    $this->boundary[3] = 'b3_' . $uniq_id;
+
+    if ($this->MessageDate == '') {
+      $result .= $this->HeaderLine('Date', self::RFCDate());
+    } else {
+      $result .= $this->HeaderLine('Date', $this->MessageDate);
+    }
+
+    if ($this->ReturnPath) {
+      $result .= $this->HeaderLine('Return-Path', '<'.trim($this->ReturnPath).'>');
+    } elseif ($this->Sender == '') {
+      $result .= $this->HeaderLine('Return-Path', '<'.trim($this->From).'>');
+    } else {
+      $result .= $this->HeaderLine('Return-Path', '<'.trim($this->Sender).'>');
+    }
+
+    // To be created automatically by mail()
+    if($this->Mailer != 'mail') {
+      if ($this->SingleTo === true) {
+        foreach($this->to as $t) {
+          $this->SingleToArray[] = $this->AddrFormat($t);
+        }
+      } else {
+        if(count($this->to) > 0) {
+          $result .= $this->AddrAppend('To', $this->to);
+        } elseif (count($this->cc) == 0) {
+          $result .= $this->HeaderLine('To', 'undisclosed-recipients:;');
+        }
+      }
+    }
+
+    $from = array();
+    $from[0][0] = trim($this->From);
+    $from[0][1] = $this->FromName;
+    $result .= $this->AddrAppend('From', $from);
+
+    // sendmail and mail() extract Cc from the header before sending
+    if(count($this->cc) > 0) {
+      $result .= $this->AddrAppend('Cc', $this->cc);
+    }
+
+    // sendmail and mail() extract Bcc from the header before sending
+    if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) {
+      $result .= $this->AddrAppend('Bcc', $this->bcc);
+    }
+
+    if(count($this->ReplyTo) > 0) {
+      $result .= $this->AddrAppend('Reply-To', $this->ReplyTo);
+    }
+
+    // mail() sets the subject itself
+    if($this->Mailer != 'mail') {
+      $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject)));
+    }
+
+    if($this->MessageID != '') {
+      $result .= $this->HeaderLine('Message-ID', $this->MessageID);
+    } else {
+      $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);
+    }
+    $result .= $this->HeaderLine('X-Priority', $this->Priority);
+    if ($this->XMailer == '') {
+        $result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (https://github.com/PHPMailer/PHPMailer/)');
+    } else {
+      $myXmailer = trim($this->XMailer);
+      if ($myXmailer) {
+        $result .= $this->HeaderLine('X-Mailer', $myXmailer);
+      }
+    }
+
+    if($this->ConfirmReadingTo != '') {
+      $result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>');
+    }
+
+    // Add custom headers
+    for($index = 0; $index < count($this->CustomHeader); $index++) {
+      $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
+    }
+    if (!$this->sign_key_file) {
+      $result .= $this->HeaderLine('MIME-Version', '1.0');
+      $result .= $this->GetMailMIME();
+    }
+
+    return $result;
+  }
+
+  /**
+   * Returns the message MIME.
+   * @access public
+   * @return string
+   */
+  public function GetMailMIME() {
+    $result = '';
+    switch($this->message_type) {
+      case 'inline':
+        $result .= $this->HeaderLine('Content-Type', 'multipart/related;');
+        $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
+        break;
+      case 'attach':
+      case 'inline_attach':
+      case 'alt_attach':
+      case 'alt_inline_attach':
+        $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;');
+        $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
+        break;
+      case 'alt':
+      case 'alt_inline':
+        $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
+        $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
+        break;
+      default:
+        // Catches case 'plain': and case '':
+        $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding);
+        $result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset='.$this->CharSet);
+        break;
+    }
+
+    if($this->Mailer != 'mail') {
+      $result .= $this->LE;
+    }
+
+    return $result;
+  }
+
+  /**
+   * Returns the MIME message (headers and body). Only really valid post PreSend().
+   * @access public
+   * @return string
+   */
+  public function GetSentMIMEMessage() {
+    return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody;
+  }
+
+
+  /**
+   * Assembles the message body.  Returns an empty string on failure.
+   * @access public
+   * @throws phpmailerException
+   * @return string The assembled message body
+   */
+  public function CreateBody() {
+    $body = '';
+
+    if ($this->sign_key_file) {
+      $body .= $this->GetMailMIME().$this->LE;
+    }
+
+    $this->SetWordWrap();
+
+    switch($this->message_type) {
+      case 'inline':
+        $body .= $this->GetBoundary($this->boundary[1], '', '', '');
+        $body .= $this->EncodeString($this->Body, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->AttachAll('inline', $this->boundary[1]);
+        break;
+      case 'attach':
+        $body .= $this->GetBoundary($this->boundary[1], '', '', '');
+        $body .= $this->EncodeString($this->Body, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->AttachAll('attachment', $this->boundary[1]);
+        break;
+      case 'inline_attach':
+        $body .= $this->TextLine('--' . $this->boundary[1]);
+        $body .= $this->HeaderLine('Content-Type', 'multipart/related;');
+        $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"');
+        $body .= $this->LE;
+        $body .= $this->GetBoundary($this->boundary[2], '', '', '');
+        $body .= $this->EncodeString($this->Body, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->AttachAll('inline', $this->boundary[2]);
+        $body .= $this->LE;
+        $body .= $this->AttachAll('attachment', $this->boundary[1]);
+        break;
+      case 'alt':
+        $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');
+        $body .= $this->EncodeString($this->AltBody, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->GetBoundary($this->boundary[1], '', 'text/html', '');
+        $body .= $this->EncodeString($this->Body, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->EndBoundary($this->boundary[1]);
+        break;
+      case 'alt_inline':
+        $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');
+        $body .= $this->EncodeString($this->AltBody, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->TextLine('--' . $this->boundary[1]);
+        $body .= $this->HeaderLine('Content-Type', 'multipart/related;');
+        $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"');
+        $body .= $this->LE;
+        $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', '');
+        $body .= $this->EncodeString($this->Body, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->AttachAll('inline', $this->boundary[2]);
+        $body .= $this->LE;
+        $body .= $this->EndBoundary($this->boundary[1]);
+        break;
+      case 'alt_attach':
+        $body .= $this->TextLine('--' . $this->boundary[1]);
+        $body .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
+        $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"');
+        $body .= $this->LE;
+        $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '');
+        $body .= $this->EncodeString($this->AltBody, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', '');
+        $body .= $this->EncodeString($this->Body, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->EndBoundary($this->boundary[2]);
+        $body .= $this->LE;
+        $body .= $this->AttachAll('attachment', $this->boundary[1]);
+        break;
+      case 'alt_inline_attach':
+        $body .= $this->TextLine('--' . $this->boundary[1]);
+        $body .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
+        $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"');
+        $body .= $this->LE;
+        $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '');
+        $body .= $this->EncodeString($this->AltBody, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->TextLine('--' . $this->boundary[2]);
+        $body .= $this->HeaderLine('Content-Type', 'multipart/related;');
+        $body .= $this->TextLine("\tboundary=\"" . $this->boundary[3] . '"');
+        $body .= $this->LE;
+        $body .= $this->GetBoundary($this->boundary[3], '', 'text/html', '');
+        $body .= $this->EncodeString($this->Body, $this->Encoding);
+        $body .= $this->LE.$this->LE;
+        $body .= $this->AttachAll('inline', $this->boundary[3]);
+        $body .= $this->LE;
+        $body .= $this->EndBoundary($this->boundary[2]);
+        $body .= $this->LE;
+        $body .= $this->AttachAll('attachment', $this->boundary[1]);
+        break;
+      default:
+        // catch case 'plain' and case ''
+        $body .= $this->EncodeString($this->Body, $this->Encoding);
+        break;
+    }
+
+    if ($this->IsError()) {
+      $body = '';
+    } elseif ($this->sign_key_file) {
+      try {
+        if (!defined('PKCS7_TEXT')) {
+            throw new phpmailerException($this->Lang('signing').' OpenSSL extension missing.');
+        }
+        $file = tempnam(sys_get_temp_dir(), 'mail');
+        file_put_contents($file, $body); //TODO check this worked
+        $signed = tempnam(sys_get_temp_dir(), 'signed');
+        if (@openssl_pkcs7_sign($file, $signed, 'file://'.realpath($this->sign_cert_file), array('file://'.realpath($this->sign_key_file), $this->sign_key_pass), null)) {
+          @unlink($file);
+          $body = file_get_contents($signed);
+          @unlink($signed);
+        } else {
+          @unlink($file);
+          @unlink($signed);
+          throw new phpmailerException($this->Lang('signing').openssl_error_string());
+        }
+      } catch (phpmailerException $e) {
+        $body = '';
+        if ($this->exceptions) {
+          throw $e;
+        }
+      }
+    }
+    return $body;
+  }
+
+  /**
+   * Returns the start of a message boundary.
+   * @access protected
+   * @param string $boundary
+   * @param string $charSet
+   * @param string $contentType
+   * @param string $encoding
+   * @return string
+   */
+  protected function GetBoundary($boundary, $charSet, $contentType, $encoding) {
+    $result = '';
+    if($charSet == '') {
+      $charSet = $this->CharSet;
+    }
+    if($contentType == '') {
+      $contentType = $this->ContentType;
+    }
+    if($encoding == '') {
+      $encoding = $this->Encoding;
+    }
+    $result .= $this->TextLine('--' . $boundary);
+    $result .= sprintf("Content-Type: %s; charset=%s", $contentType, $charSet);
+    $result .= $this->LE;
+    $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding);
+    $result .= $this->LE;
+
+    return $result;
+  }
+
+  /**
+   * Returns the end of a message boundary.
+   * @access protected
+   * @param string $boundary
+   * @return string
+   */
+  protected function EndBoundary($boundary) {
+    return $this->LE . '--' . $boundary . '--' . $this->LE;
+  }
+
+  /**
+   * Sets the message type.
+   * @access protected
+   * @return void
+   */
+  protected function SetMessageType() {
+    $this->message_type = array();
+    if($this->AlternativeExists()) $this->message_type[] = "alt";
+    if($this->InlineImageExists()) $this->message_type[] = "inline";
+    if($this->AttachmentExists()) $this->message_type[] = "attach";
+    $this->message_type = implode("_", $this->message_type);
+    if($this->message_type == "") $this->message_type = "plain";
+  }
+
+  /**
+   * Returns a formatted header line.
+   * @access public
+   * @param string $name
+   * @param string $value
+   * @return string
+   */
+  public function HeaderLine($name, $value) {
+    return $name . ': ' . $value . $this->LE;
+  }
+
+  /**
+   * Returns a formatted mail line.
+   * @access public
+   * @param string $value
+   * @return string
+   */
+  public function TextLine($value) {
+    return $value . $this->LE;
+  }
+
+  /////////////////////////////////////////////////
+  // CLASS METHODS, ATTACHMENTS
+  /////////////////////////////////////////////////
+
+  /**
+   * Adds an attachment from a path on the filesystem.
+   * Returns false if the file could not be found
+   * or accessed.
+   * @param string $path Path to the attachment.
+   * @param string $name Overrides the attachment name.
+   * @param string $encoding File encoding (see $Encoding).
+   * @param string $type File extension (MIME) type.
+   * @throws phpmailerException
+   * @return bool
+   */
+  public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
+    try {
+      if ( !@is_file($path) ) {
+        throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE);
+      }
+      $filename = basename($path);
+      if ( $name == '' ) {
+        $name = $filename;
+      }
+
+      $this->attachment[] = array(
+        0 => $path,
+        1 => $filename,
+        2 => $name,
+        3 => $encoding,
+        4 => $type,
+        5 => false,  // isStringAttachment
+        6 => 'attachment',
+        7 => 0
+      );
+
+    } catch (phpmailerException $e) {
+      $this->SetError($e->getMessage());
+      if ($this->exceptions) {
+        throw $e;
+      }
+      if ($this->SMTPDebug) {
+        $this->edebug($e->getMessage()."\n");
+      }
+      if ( $e->getCode() == self::STOP_CRITICAL ) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+  * Return the current array of attachments
+  * @return array
+  */
+  public function GetAttachments() {
+    return $this->attachment;
+  }
+
+  /**
+   * Attaches all fs, string, and binary attachments to the message.
+   * Returns an empty string on failure.
+   * @access protected
+   * @param string $disposition_type
+   * @param string $boundary
+   * @return string
+   */
+  protected function AttachAll($disposition_type, $boundary) {
+    // Return text of body
+    $mime = array();
+    $cidUniq = array();
+    $incl = array();
+
+    // Add all attachments
+    foreach ($this->attachment as $attachment) {
+      // CHECK IF IT IS A VALID DISPOSITION_FILTER
+      if($attachment[6] == $disposition_type) {
+        // Check for string attachment
+        $string = '';
+        $path = '';
+        $bString = $attachment[5];
+        if ($bString) {
+          $string = $attachment[0];
+        } else {
+          $path = $attachment[0];
+        }
+
+        $inclhash = md5(serialize($attachment));
+        if (in_array($inclhash, $incl)) { continue; }
+        $incl[]      = $inclhash;
+        $filename    = $attachment[1];
+        $name        = $attachment[2];
+        $encoding    = $attachment[3];
+        $type        = $attachment[4];
+        $disposition = $attachment[6];
+        $cid         = $attachment[7];
+        if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; }
+        $cidUniq[$cid] = true;
+
+        $mime[] = sprintf("--%s%s", $boundary, $this->LE);
+        $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE);
+        $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE);
+
+        if($disposition == 'inline') {
+          $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);
+        }
+
+        $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE);
+
+        // Encode as string attachment
+        if($bString) {
+          $mime[] = $this->EncodeString($string, $encoding);
+          if($this->IsError()) {
+            return '';
+          }
+          $mime[] = $this->LE.$this->LE;
+        } else {
+          $mime[] = $this->EncodeFile($path, $encoding);
+          if($this->IsError()) {
+            return '';
+          }
+          $mime[] = $this->LE.$this->LE;
+        }
+      }
+    }
+
+    $mime[] = sprintf("--%s--%s", $boundary, $this->LE);
+
+    return implode("", $mime);
+  }
+
+  /**
+   * Encodes attachment in requested format.
+   * Returns an empty string on failure.
+   * @param string $path The full path to the file
+   * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
+   * @throws phpmailerException
+   * @see EncodeFile()
+   * @access protected
+   * @return string
+   */
+  protected function EncodeFile($path, $encoding = 'base64') {
+    try {
+      if (!is_readable($path)) {
+        throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE);
+      }
+      $magic_quotes = get_magic_quotes_runtime();
+      if ($magic_quotes) {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+          set_magic_quotes_runtime(0);
+        } else {
+          ini_set('magic_quotes_runtime', 0);
+        }
+      }
+      $file_buffer  = file_get_contents($path);
+      $file_buffer  = $this->EncodeString($file_buffer, $encoding);
+      if ($magic_quotes) {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+          set_magic_quotes_runtime($magic_quotes);
+        } else {
+          ini_set('magic_quotes_runtime', $magic_quotes);
+        }
+      }
+      return $file_buffer;
+    } catch (Exception $e) {
+      $this->SetError($e->getMessage());
+      return '';
+    }
+  }
+
+  /**
+   * Encodes string to requested format.
+   * Returns an empty string on failure.
+   * @param string $str The text to encode
+   * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
+   * @access public
+   * @return string
+   */
+  public function EncodeString($str, $encoding = 'base64') {
+    $encoded = '';
+    switch(strtolower($encoding)) {
+      case 'base64':
+        $encoded = chunk_split(base64_encode($str), 76, $this->LE);
+        break;
+      case '7bit':
+      case '8bit':
+        $encoded = $this->FixEOL($str);
+        //Make sure it ends with a line break
+        if (substr($encoded, -(strlen($this->LE))) != $this->LE)
+          $encoded .= $this->LE;
+        break;
+      case 'binary':
+        $encoded = $str;
+        break;
+      case 'quoted-printable':
+        $encoded = $this->EncodeQP($str);
+        break;
+      default:
+        $this->SetError($this->Lang('encoding') . $encoding);
+        break;
+    }
+    return $encoded;
+  }
+
+  /**
+   * Encode a header string to best (shortest) of Q, B, quoted or none.
+   * @access public
+   * @param string $str
+   * @param string $position
+   * @return string
+   */
+  public function EncodeHeader($str, $position = 'text') {
+    $x = 0;
+
+    switch (strtolower($position)) {
+      case 'phrase':
+        if (!preg_match('/[\200-\377]/', $str)) {
+          // Can't use addslashes as we don't know what value has magic_quotes_sybase
+          $encoded = addcslashes($str, "\0..\37\177\\\"");
+          if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) {
+            return ($encoded);
+          } else {
+            return ("\"$encoded\"");
+          }
+        }
+        $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);
+        break;
+      case 'comment':
+        $x = preg_match_all('/[()"]/', $str, $matches);
+        // Fall-through
+      case 'text':
+      default:
+        $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
+        break;
+    }
+
+    if ($x == 0) { //There are no chars that need encoding
+      return ($str);
+    }
+
+    $maxlen = 75 - 7 - strlen($this->CharSet);
+    // Try to select the encoding which should produce the shortest output
+    if ($x > strlen($str)/3) { //More than a third of the content will need encoding, so B encoding will be most efficient
+      $encoding = 'B';
+      if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) {
+        // Use a custom function which correctly encodes and wraps long
+        // multibyte strings without breaking lines within a character
+        $encoded = $this->Base64EncodeWrapMB($str, "\n");
+      } else {
+        $encoded = base64_encode($str);
+        $maxlen -= $maxlen % 4;
+        $encoded = trim(chunk_split($encoded, $maxlen, "\n"));
+      }
+    } else {
+      $encoding = 'Q';
+      $encoded = $this->EncodeQ($str, $position);
+      $encoded = $this->WrapText($encoded, $maxlen, true);
+      $encoded = str_replace('='.self::CRLF, "\n", trim($encoded));
+    }
+
+    $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded);
+    $encoded = trim(str_replace("\n", $this->LE, $encoded));
+
+    return $encoded;
+  }
+
+  /**
+   * Checks if a string contains multibyte characters.
+   * @access public
+   * @param string $str multi-byte text to wrap encode
+   * @return bool
+   */
+  public function HasMultiBytes($str) {
+    if (function_exists('mb_strlen')) {
+      return (strlen($str) > mb_strlen($str, $this->CharSet));
+    } else { // Assume no multibytes (we can't handle without mbstring functions anyway)
+      return false;
+    }
+  }
+
+  /**
+   * Correctly encodes and wraps long multibyte strings for mail headers
+   * without breaking lines within a character.
+   * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php
+   * @access public
+   * @param string $str multi-byte text to wrap encode
+   * @param string $lf string to use as linefeed/end-of-line
+   * @return string
+   */
+  public function Base64EncodeWrapMB($str, $lf=null) {
+    $start = "=?".$this->CharSet."?B?";
+    $end = "?=";
+    $encoded = "";
+    if ($lf === null) {
+      $lf = $this->LE;
+    }
+
+    $mb_length = mb_strlen($str, $this->CharSet);
+    // Each line must have length <= 75, including $start and $end
+    $length = 75 - strlen($start) - strlen($end);
+    // Average multi-byte ratio
+    $ratio = $mb_length / strlen($str);
+    // Base64 has a 4:3 ratio
+    $offset = $avgLength = floor($length * $ratio * .75);
+
+    for ($i = 0; $i < $mb_length; $i += $offset) {
+      $lookBack = 0;
+
+      do {
+        $offset = $avgLength - $lookBack;
+        $chunk = mb_substr($str, $i, $offset, $this->CharSet);
+        $chunk = base64_encode($chunk);
+        $lookBack++;
+      }
+      while (strlen($chunk) > $length);
+
+      $encoded .= $chunk . $lf;
+    }
+
+    // Chomp the last linefeed
+    $encoded = substr($encoded, 0, -strlen($lf));
+    return $encoded;
+  }
+
+  /**
+   * Encode string to RFC2045 (6.7) quoted-printable format
+   * @access public
+   * @param string $string The text to encode
+   * @param integer $line_max Number of chars allowed on a line before wrapping
+   * @return string
+   * @link PHP version adapted from http://www.php.net/manual/en/function.quoted-printable-decode.php#89417
+   */
+  public function EncodeQP($string, $line_max = 76) {
+    if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3)
+      return quoted_printable_encode($string);
+    }
+    //Fall back to a pure PHP implementation
+    $string = str_replace(array('%20', '%0D%0A.', '%0D%0A', '%'), array(' ', "\r\n=2E", "\r\n", '='), rawurlencode($string));
+    $string = preg_replace('/[^\r\n]{'.($line_max - 3).'}[^=\r\n]{2}/', "$0=\r\n", $string);
+    return $string;
+  }
+
+  /**
+   * Wrapper to preserve BC for old QP encoding function that was removed
+   * @see EncodeQP()
+   * @access public
+   * @param string $string
+   * @param integer $line_max
+   * @param bool $space_conv
+   * @return string
+   */
+  public function EncodeQPphp($string, $line_max = 76, $space_conv = false) {
+    return $this->EncodeQP($string, $line_max);
+  }
+
+  /**
+   * Encode string to q encoding.
+   * @link http://tools.ietf.org/html/rfc2047
+   * @param string $str the text to encode
+   * @param string $position Where the text is going to be used, see the RFC for what that means
+   * @access public
+   * @return string
+   */
+  public function EncodeQ($str, $position = 'text') {
+    //There should not be any EOL in the string
+       $pattern="";
+    $encoded = str_replace(array("\r", "\n"), '', $str);
+    switch (strtolower($position)) {
+      case 'phrase':
+        $pattern = '^A-Za-z0-9!*+\/ -';
+        break;
+
+      case 'comment':
+        $pattern = '\(\)"';
+        //note that we don't break here!
+        //for this reason we build the $pattern without including delimiters and []
+
+      case 'text':
+      default:
+        //Replace every high ascii, control =, ? and _ characters
+        //We put \075 (=) as first value to make sure it's the first one in being converted, preventing double encode
+        $pattern = '\075\000-\011\013\014\016-\037\077\137\177-\377' . $pattern;
+        break;
+    }
+
+    if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) {
+      foreach (array_unique($matches[0]) as $char) {
+        $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded);
+      }
+    }
+
+    //Replace every spaces to _ (more readable than =20)
+    return str_replace(' ', '_', $encoded);
+}
+
+
+  /**
+   * Adds a string or binary attachment (non-filesystem) to the list.
+   * This method can be used to attach ascii or binary data,
+   * such as a BLOB record from a database.
+   * @param string $string String attachment data.
+   * @param string $filename Name of the attachment.
+   * @param string $encoding File encoding (see $Encoding).
+   * @param string $type File extension (MIME) type.
+   * @return void
+   */
+  public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') {
+    // Append to $attachment array
+    $this->attachment[] = array(
+      0 => $string,
+      1 => $filename,
+      2 => basename($filename),
+      3 => $encoding,
+      4 => $type,
+      5 => true,  // isStringAttachment
+      6 => 'attachment',
+      7 => 0
+    );
+  }
+
+  /**
+   * Add an embedded attachment from a file.
+   * This can include images, sounds, and just about any other document type.
+   * Be sure to set the $type to an image type for images:
+   * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'.
+   * @param string $path Path to the attachment.
+   * @param string $cid Content ID of the attachment; Use this to reference
+   *        the content when using an embedded image in HTML.
+   * @param string $name Overrides the attachment name.
+   * @param string $encoding File encoding (see $Encoding).
+   * @param string $type File MIME type.
+   * @return bool True on successfully adding an attachment
+   */
+  public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
+
+    if ( !@is_file($path) ) {
+      $this->SetError($this->Lang('file_access') . $path);
+      return false;
+    }
+
+    $filename = basename($path);
+    if ( $name == '' ) {
+      $name = $filename;
+    }
+
+    // Append to $attachment array
+    $this->attachment[] = array(
+      0 => $path,
+      1 => $filename,
+      2 => $name,
+      3 => $encoding,
+      4 => $type,
+      5 => false,  // isStringAttachment
+      6 => 'inline',
+      7 => $cid
+    );
+    return true;
+  }
+
+
+  /**
+   * Add an embedded stringified attachment.
+   * This can include images, sounds, and just about any other document type.
+   * Be sure to set the $type to an image type for images:
+   * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'.
+   * @param string $string The attachment binary data.
+   * @param string $cid Content ID of the attachment; Use this to reference
+   *        the content when using an embedded image in HTML.
+   * @param string $name
+   * @param string $encoding File encoding (see $Encoding).
+   * @param string $type MIME type.
+   * @return bool True on successfully adding an attachment
+   */
+  public function AddStringEmbeddedImage($string, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
+    // Append to $attachment array
+    $this->attachment[] = array(
+      0 => $string,
+      1 => $name,
+      2 => $name,
+      3 => $encoding,
+      4 => $type,
+      5 => true,  // isStringAttachment
+      6 => 'inline',
+      7 => $cid
+    );
+    return true;
+  }
+
+  /**
+   * Returns true if an inline attachment is present.
+   * @access public
+   * @return bool
+   */
+  public function InlineImageExists() {
+    foreach($this->attachment as $attachment) {
+      if ($attachment[6] == 'inline') {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Returns true if an attachment (non-inline) is present.
+   * @return bool
+   */
+  public function AttachmentExists() {
+    foreach($this->attachment as $attachment) {
+      if ($attachment[6] == 'attachment') {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Does this message have an alternative body set?
+   * @return bool
+   */
+  public function AlternativeExists() {
+    return !empty($this->AltBody);
+  }
+
+  /////////////////////////////////////////////////
+  // CLASS METHODS, MESSAGE RESET
+  /////////////////////////////////////////////////
+
+  /**
+   * Clears all recipients assigned in the TO array.  Returns void.
+   * @return void
+   */
+  public function ClearAddresses() {
+    foreach($this->to as $to) {
+      unset($this->all_recipients[strtolower($to[0])]);
+    }
+    $this->to = array();
+  }
+
+  /**
+   * Clears all recipients assigned in the CC array.  Returns void.
+   * @return void
+   */
+  public function ClearCCs() {
+    foreach($this->cc as $cc) {
+      unset($this->all_recipients[strtolower($cc[0])]);
+    }
+    $this->cc = array();
+  }
+
+  /**
+   * Clears all recipients assigned in the BCC array.  Returns void.
+   * @return void
+   */
+  public function ClearBCCs() {
+    foreach($this->bcc as $bcc) {
+      unset($this->all_recipients[strtolower($bcc[0])]);
+    }
+    $this->bcc = array();
+  }
+
+  /**
+   * Clears all recipients assigned in the ReplyTo array.  Returns void.
+   * @return void
+   */
+  public function ClearReplyTos() {
+    $this->ReplyTo = array();
+  }
+
+  /**
+   * Clears all recipients assigned in the TO, CC and BCC
+   * array.  Returns void.
+   * @return void
+   */
+  public function ClearAllRecipients() {
+    $this->to = array();
+    $this->cc = array();
+    $this->bcc = array();
+    $this->all_recipients = array();
+  }
+
+  /**
+   * Clears all previously set filesystem, string, and binary
+   * attachments.  Returns void.
+   * @return void
+   */
+  public function ClearAttachments() {
+    $this->attachment = array();
+  }
+
+  /**
+   * Clears all custom headers.  Returns void.
+   * @return void
+   */
+  public function ClearCustomHeaders() {
+    $this->CustomHeader = array();
+  }
+
+  /////////////////////////////////////////////////
+  // CLASS METHODS, MISCELLANEOUS
+  /////////////////////////////////////////////////
+
+  /**
+   * Adds the error message to the error container.
+   * @access protected
+   * @param string $msg
+   * @return void
+   */
+  protected function SetError($msg) {
+    $this->error_count++;
+    if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {
+      $lasterror = $this->smtp->getError();
+      if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) {
+        $msg .= '<p>' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . "</p>\n";
+      }
+    }
+    $this->ErrorInfo = $msg;
+  }
+
+  /**
+   * Returns the proper RFC 822 formatted date.
+   * @access public
+   * @return string
+   * @static
+   */
+  public static function RFCDate() {
+    //Set the time zone to whatever the default is to avoid 500 errors
+    //Will default to UTC if it's not set properly in php.ini
+    date_default_timezone_set(@date_default_timezone_get());
+    return date('D, j M Y H:i:s O');
+  }
+
+  /**
+   * Returns the server hostname or 'localhost.localdomain' if unknown.
+   * @access protected
+   * @return string
+   */
+  protected function ServerHostname() {
+    if (!empty($this->Hostname)) {
+      $result = $this->Hostname;
+    } elseif (isset($_SERVER['SERVER_NAME'])) {
+      $result = $_SERVER['SERVER_NAME'];
+    } else {
+      $result = 'localhost.localdomain';
+    }
+
+    return $result;
+  }
+
+  /**
+   * Returns a message in the appropriate language.
+   * @access protected
+   * @param string $key
+   * @return string
+   */
+  protected function Lang($key) {
+    if(count($this->language) < 1) {
+      $this->SetLanguage('en'); // set the default language
+    }
+
+    if(isset($this->language[$key])) {
+      return $this->language[$key];
+    } else {
+      return 'Language string failed to load: ' . $key;
+    }
+  }
+
+  /**
+   * Returns true if an error occurred.
+   * @access public
+   * @return bool
+   */
+  public function IsError() {
+    return ($this->error_count > 0);
+  }
+
+  /**
+   * Changes every end of line from CRLF, CR or LF to $this->LE.
+   * @access public
+   * @param string $str String to FixEOL
+   * @return string
+   */
+  public function FixEOL($str) {
+       // condense down to \n
+       $nstr = str_replace(array("\r\n", "\r"), "\n", $str);
+       // Now convert LE as needed
+       if ($this->LE !== "\n") {
+               $nstr = str_replace("\n", $this->LE, $nstr);
+       }
+    return  $nstr;
+  }
+
+  /**
+   * Adds a custom header. $name value can be overloaded to contain
+   * both header name and value (name:value)
+   * @access public
+   * @param string $name custom header name
+   * @param string $value header value
+   * @return void
+   */
+  public function AddCustomHeader($name, $value=null) {
+       if ($value === null) {
+               // Value passed in as name:value
+               $this->CustomHeader[] = explode(':', $name, 2);
+       } else {
+               $this->CustomHeader[] = array($name, $value);
+       }
+  }
+
+  /**
+   * Creates a message from an HTML string, making modifications for inline images and backgrounds
+   * and creates a plain-text version by converting the HTML
+   * Overwrites any existing values in $this->Body and $this->AltBody
+   * @access public
+   * @param string $message HTML message string
+   * @param string $basedir baseline directory for path
+   * @param bool $advanced Whether to use the advanced HTML to text converter
+   * @return string $message
+   */
+  public function MsgHTML($message, $basedir = '', $advanced = false) {
+    preg_match_all("/(src|background)=[\"'](.*)[\"']/Ui", $message, $images);
+    if(isset($images[2])) {
+      foreach($images[2] as $i => $url) {
+        // do not change urls for absolute images (thanks to corvuscorax)
+        if (!preg_match('#^[A-z]+://#', $url)) {
+          $filename = basename($url);
+          $directory = dirname($url);
+          if ($directory == '.') {
+            $directory = '';
+          }
+          $cid = 'cid:' . md5($url);
+          $ext = pathinfo($filename, PATHINFO_EXTENSION);
+          $mimeType  = self::_mime_types($ext);
+          if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; }
+          if ( strlen($directory) > 1 && substr($directory, -1) != '/') { $directory .= '/'; }
+          if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($url), $filename, 'base64', $mimeType) ) {
+            $message = preg_replace("/".$images[1][$i]."=[\"']".preg_quote($url, '/')."[\"']/Ui", $images[1][$i]."=\"".$cid."\"", $message);
+          }
+        }
+      }
+    }
+    $this->IsHTML(true);
+    $this->Body = $message;
+    $this->AltBody = $this->html2text($message, $advanced);
+    if (empty($this->AltBody)) {
+      $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n";
+    }
+    return $message;
+  }
+
+    /**
+     * Convert an HTML string into a plain text version
+     * @param string $html The HTML text to convert
+     * @param bool $advanced Should this use the more complex html2text converter or just a simple one?
+     * @return string
+     */
+  public function html2text($html, $advanced = false) {
+    if ($advanced) {
+      require_once 'extras/class.html2text.php';
+      $h = new html2text($html);
+      return $h->get_text();
+    }
+    return html_entity_decode(trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s', '', $html))), ENT_QUOTES, $this->CharSet);
+  }
+
+  /**
+   * Gets the MIME type of the embedded or inline image
+   * @param string $ext File extension
+   * @access public
+   * @return string MIME type of ext
+   * @static
+   */
+  public static function _mime_types($ext = '') {
+    $mimes = array(
+      'xl'    =>  'application/excel',
+      'hqx'   =>  'application/mac-binhex40',
+      'cpt'   =>  'application/mac-compactpro',
+      'bin'   =>  'application/macbinary',
+      'doc'   =>  'application/msword',
+      'word'  =>  'application/msword',
+      'class' =>  'application/octet-stream',
+      'dll'   =>  'application/octet-stream',
+      'dms'   =>  'application/octet-stream',
+      'exe'   =>  'application/octet-stream',
+      'lha'   =>  'application/octet-stream',
+      'lzh'   =>  'application/octet-stream',
+      'psd'   =>  'application/octet-stream',
+      'sea'   =>  'application/octet-stream',
+      'so'    =>  'application/octet-stream',
+      'oda'   =>  'application/oda',
+      'pdf'   =>  'application/pdf',
+      'ai'    =>  'application/postscript',
+      'eps'   =>  'application/postscript',
+      'ps'    =>  'application/postscript',
+      'smi'   =>  'application/smil',
+      'smil'  =>  'application/smil',
+      'mif'   =>  'application/vnd.mif',
+      'xls'   =>  'application/vnd.ms-excel',
+      'ppt'   =>  'application/vnd.ms-powerpoint',
+      'wbxml' =>  'application/vnd.wap.wbxml',
+      'wmlc'  =>  'application/vnd.wap.wmlc',
+      'dcr'   =>  'application/x-director',
+      'dir'   =>  'application/x-director',
+      'dxr'   =>  'application/x-director',
+      'dvi'   =>  'application/x-dvi',
+      'gtar'  =>  'application/x-gtar',
+      'php3'  =>  'application/x-httpd-php',
+      'php4'  =>  'application/x-httpd-php',
+      'php'   =>  'application/x-httpd-php',
+      'phtml' =>  'application/x-httpd-php',
+      'phps'  =>  'application/x-httpd-php-source',
+      'js'    =>  'application/x-javascript',
+      'swf'   =>  'application/x-shockwave-flash',
+      'sit'   =>  'application/x-stuffit',
+      'tar'   =>  'application/x-tar',
+      'tgz'   =>  'application/x-tar',
+      'xht'   =>  'application/xhtml+xml',
+      'xhtml' =>  'application/xhtml+xml',
+      'zip'   =>  'application/zip',
+      'mid'   =>  'audio/midi',
+      'midi'  =>  'audio/midi',
+      'mp2'   =>  'audio/mpeg',
+      'mp3'   =>  'audio/mpeg',
+      'mpga'  =>  'audio/mpeg',
+      'aif'   =>  'audio/x-aiff',
+      'aifc'  =>  'audio/x-aiff',
+      'aiff'  =>  'audio/x-aiff',
+      'ram'   =>  'audio/x-pn-realaudio',
+      'rm'    =>  'audio/x-pn-realaudio',
+      'rpm'   =>  'audio/x-pn-realaudio-plugin',
+      'ra'    =>  'audio/x-realaudio',
+      'wav'   =>  'audio/x-wav',
+      'bmp'   =>  'image/bmp',
+      'gif'   =>  'image/gif',
+      'jpeg'  =>  'image/jpeg',
+      'jpe'   =>  'image/jpeg',
+      'jpg'   =>  'image/jpeg',
+      'png'   =>  'image/png',
+      'tiff'  =>  'image/tiff',
+      'tif'   =>  'image/tiff',
+      'eml'   =>  'message/rfc822',
+      'css'   =>  'text/css',
+      'html'  =>  'text/html',
+      'htm'   =>  'text/html',
+      'shtml' =>  'text/html',
+      'log'   =>  'text/plain',
+      'text'  =>  'text/plain',
+      'txt'   =>  'text/plain',
+      'rtx'   =>  'text/richtext',
+      'rtf'   =>  'text/rtf',
+      'xml'   =>  'text/xml',
+      'xsl'   =>  'text/xml',
+      'mpeg'  =>  'video/mpeg',
+      'mpe'   =>  'video/mpeg',
+      'mpg'   =>  'video/mpeg',
+      'mov'   =>  'video/quicktime',
+      'qt'    =>  'video/quicktime',
+      'rv'    =>  'video/vnd.rn-realvideo',
+      'avi'   =>  'video/x-msvideo',
+      'movie' =>  'video/x-sgi-movie'
+    );
+    return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];
+  }
+
+  /**
+   * Set (or reset) Class Objects (variables)
+   *
+   * Usage Example:
+   * $page->set('X-Priority', '3');
+   *
+   * @access public
+   * @param string $name
+   * @param mixed $value
+   * NOTE: will not work with arrays, there are no arrays to set/reset
+   * @throws phpmailerException
+   * @return bool
+   * @todo Should this not be using __set() magic function?
+   */
+  public function set($name, $value = '') {
+    try {
+      if (isset($this->$name) ) {
+        $this->$name = $value;
+      } else {
+        throw new phpmailerException($this->Lang('variable_set') . $name, self::STOP_CRITICAL);
+      }
+    } catch (Exception $e) {
+      $this->SetError($e->getMessage());
+      if ($e->getCode() == self::STOP_CRITICAL) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Strips newlines to prevent header injection.
+   * @access public
+   * @param string $str
+   * @return string
+   */
+  public function SecureHeader($str) {
+    return trim(str_replace(array("\r", "\n"), '', $str));
+  }
+
+  /**
+   * Set the private key file and password to sign the message.
+   *
+   * @access public
+   * @param string $cert_filename
+   * @param string $key_filename
+   * @param string $key_pass Password for private key
+   */
+  public function Sign($cert_filename, $key_filename, $key_pass) {
+    $this->sign_cert_file = $cert_filename;
+    $this->sign_key_file = $key_filename;
+    $this->sign_key_pass = $key_pass;
+  }
+
+  /**
+   * Set the private key file and password to sign the message.
+   *
+   * @access public
+   * @param string $txt
+   * @return string
+   */
+  public function DKIM_QP($txt) {
+    $line = '';
+    for ($i = 0; $i < strlen($txt); $i++) {
+      $ord = ord($txt[$i]);
+      if ( ((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) ) {
+        $line .= $txt[$i];
+      } else {
+        $line .= "=".sprintf("%02X", $ord);
+      }
+    }
+    return $line;
+  }
+
+  /**
+   * Generate DKIM signature
+   *
+   * @access public
+   * @param string $s Header
+   * @throws phpmailerException
+   * @return string
+   */
+  public function DKIM_Sign($s) {
+    if (!defined('PKCS7_TEXT')) {
+        if ($this->exceptions) {
+            throw new phpmailerException($this->Lang("signing").' OpenSSL extension missing.');
+        }
+        return '';
+    }
+    $privKeyStr = file_get_contents($this->DKIM_private);
+    if ($this->DKIM_passphrase != '') {
+      $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
+    } else {
+      $privKey = $privKeyStr;
+    }
+    if (openssl_sign($s, $signature, $privKey)) {
+      return base64_encode($signature);
+    }
+    return '';
+  }
+
+  /**
+   * Generate DKIM Canonicalization Header
+   *
+   * @access public
+   * @param string $s Header
+   * @return string
+   */
+  public function DKIM_HeaderC($s) {
+    $s = preg_replace("/\r\n\s+/", " ", $s);
+    $lines = explode("\r\n", $s);
+    foreach ($lines as $key => $line) {
+      list($heading, $value) = explode(":", $line, 2);
+      $heading = strtolower($heading);
+      $value = preg_replace("/\s+/", " ", $value) ; // Compress useless spaces
+      $lines[$key] = $heading.":".trim($value) ; // Don't forget to remove WSP around the value
+    }
+    $s = implode("\r\n", $lines);
+    return $s;
+  }
+
+  /**
+   * Generate DKIM Canonicalization Body
+   *
+   * @access public
+   * @param string $body Message Body
+   * @return string
+   */
+  public function DKIM_BodyC($body) {
+    if ($body == '') return "\r\n";
+    // stabilize line endings
+    $body = str_replace("\r\n", "\n", $body);
+    $body = str_replace("\n", "\r\n", $body);
+    // END stabilize line endings
+    while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") {
+      $body = substr($body, 0, strlen($body) - 2);
+    }
+    return $body;
+  }
+
+  /**
+   * Create the DKIM header, body, as new header
+   *
+   * @access public
+   * @param string $headers_line Header lines
+   * @param string $subject Subject
+   * @param string $body Body
+   * @return string
+   */
+  public function DKIM_Add($headers_line, $subject, $body) {
+    $DKIMsignatureType    = 'rsa-sha1'; // Signature & hash algorithms
+    $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
+    $DKIMquery            = 'dns/txt'; // Query method
+    $DKIMtime             = time() ; // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)
+    $subject_header       = "Subject: $subject";
+    $headers              = explode($this->LE, $headers_line);
+    $from_header          = '';
+    $to_header            = '';
+    $current = '';
+    foreach($headers as $header) {
+      if (strpos($header, 'From:') === 0) {
+        $from_header = $header;
+        $current = 'from_header';
+      } elseif (strpos($header, 'To:') === 0) {
+        $to_header = $header;
+        $current = 'to_header';
+      } else {
+        if($current && strpos($header, ' =?') === 0){
+          $$current .= $header;
+        } else {
+          $current = '';
+        }
+      }
+    }
+    $from     = str_replace('|', '=7C', $this->DKIM_QP($from_header));
+    $to       = str_replace('|', '=7C', $this->DKIM_QP($to_header));
+    $subject  = str_replace('|', '=7C', $this->DKIM_QP($subject_header)) ; // Copied header fields (dkim-quoted-printable
+    $body     = $this->DKIM_BodyC($body);
+    $DKIMlen  = strlen($body) ; // Length of body
+    $DKIMb64  = base64_encode(pack("H*", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body
+    $ident    = ($this->DKIM_identity == '')? '' : " i=" . $this->DKIM_identity . ";";
+    $dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this->DKIM_selector . ";\r\n".
+                "\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n".
+                "\th=From:To:Subject;\r\n".
+                "\td=" . $this->DKIM_domain . ";" . $ident . "\r\n".
+                "\tz=$from\r\n".
+                "\t|$to\r\n".
+                "\t|$subject;\r\n".
+                "\tbh=" . $DKIMb64 . ";\r\n".
+                "\tb=";
+    $toSign   = $this->DKIM_HeaderC($from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs);
+    $signed   = $this->DKIM_Sign($toSign);
+    return $dkimhdrs.$signed."\r\n";
+  }
+
+  /**
+   * Perform callback
+   * @param boolean $isSent
+   * @param string $to
+   * @param string $cc
+   * @param string $bcc
+   * @param string $subject
+   * @param string $body
+   * @param string $from
+   */
+  protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from = null) {
+    if (!empty($this->action_function) && is_callable($this->action_function)) {
+      $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from);
+      call_user_func_array($this->action_function, $params);
+    }
+  }
+}
+
+/**
+ * Exception handler for PHPMailer
+ * @package PHPMailer
+ */
+class phpmailerException extends Exception {
+  /**
+   * Prettify error message output
+   * @return string
+   */
+  public function errorMessage() {
+    $errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
+    return $errorMsg;
+  }
+}
diff --git a/www/resources/PHPMailer/class.pop3.php b/www/resources/PHPMailer/class.pop3.php
new file mode 100644 (file)
index 0000000..17bb675
--- /dev/null
@@ -0,0 +1,418 @@
+<?php
+/*~ class.pop3.php
+.---------------------------------------------------------------------------.
+|  Software: PHPMailer - PHP email class                                    |
+|   Version: 5.2.6                                                          |
+|      Site: https://github.com/PHPMailer/PHPMailer/                        |
+| ------------------------------------------------------------------------- |
+|    Admins: Marcus Bointon                                                 |
+|    Admins: Jim Jagielski                                                  |
+|   Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
+|          : Marcus Bointon (coolbru) coolbru@users.sourceforge.net         |
+|          : Jim Jagielski (jimjag) jimjag@gmail.com                        |
+|   Founder: Brent R. Matzelle (original founder)                           |
+| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved.              |
+| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved.               |
+| Copyright (c) 2001-2003, Brent R. Matzelle                                |
+| ------------------------------------------------------------------------- |
+|   License: Distributed under the Lesser General Public License (LGPL)     |
+|            http://www.gnu.org/copyleft/lesser.html                        |
+| This program is distributed in the hope that it will be useful - WITHOUT  |
+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
+| FITNESS FOR A PARTICULAR PURPOSE.                                         |
+'---------------------------------------------------------------------------'
+*/
+
+/**
+ * PHPMailer - PHP POP Before SMTP Authentication Class
+ * NOTE: Designed for use with PHP version 5 and up
+ * @package PHPMailer
+ * @author Andy Prevost
+ * @author Marcus Bointon
+ * @author Jim Jagielski
+ * @copyright 2010 - 2012 Jim Jagielski
+ * @copyright 2004 - 2009 Andy Prevost
+ * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
+ */
+
+/**
+ * PHP POP-Before-SMTP Authentication Class
+ *
+ * Version 5.2.6
+ *
+ * @license: LGPL, see PHPMailer License
+ *
+ * Specifically for PHPMailer to allow POP before SMTP authentication.
+ * Does not yet work with APOP - if you have an APOP account, contact Jim Jagielski
+ * and we can test changes to this script.
+ *
+ * This class is based on the structure of the SMTP class originally authored by Chris Ryan
+ *
+ * This class is rfc 1939 compliant and implements all the commands
+ * required for POP3 connection, authentication and disconnection.
+ *
+ * @package PHPMailer
+ * @author Richard Davey (orig) <rich@corephp.co.uk>
+ * @author Andy Prevost
+ * @author Jim Jagielski
+ */
+
+class POP3 {
+  /**
+   * Default POP3 port
+   * @var int
+   */
+  public $POP3_PORT = 110;
+
+  /**
+   * Default Timeout
+   * @var int
+   */
+  public $POP3_TIMEOUT = 30;
+
+  /**
+   * POP3 Carriage Return + Line Feed
+   * @var string
+   */
+  public $CRLF = "\r\n";
+
+  /**
+   * Displaying Debug warnings? (0 = now, 1+ = yes)
+   * @var int
+   */
+  public $do_debug = 2;
+
+  /**
+   * POP3 Mail Server
+   * @var string
+   */
+  public $host;
+
+  /**
+   * POP3 Port
+   * @var int
+   */
+  public $port;
+
+  /**
+   * POP3 Timeout Value
+   * @var int
+   */
+  public $tval;
+
+  /**
+   * POP3 Username
+   * @var string
+   */
+  public $username;
+
+  /**
+   * POP3 Password
+   * @var string
+   */
+  public $password;
+
+  /**
+   * Sets the POP3 PHPMailer Version number
+   * @var string
+   */
+  public $Version         = '5.2.6';
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PRIVATE AND PROTECTED
+  /////////////////////////////////////////////////
+
+  /**
+   * @var resource Resource handle for the POP connection socket
+   */
+  private $pop_conn;
+  /**
+   * @var boolean Are we connected?
+   */
+  private $connected;
+  /**
+   * @var array Error container
+   */
+  private $error;     //  Error log array
+
+  /**
+   * Constructor, sets the initial values
+   * @access public
+   * @return POP3
+   */
+  public function __construct() {
+    $this->pop_conn  = 0;
+    $this->connected = false;
+    $this->error     = null;
+  }
+
+  /**
+   * Combination of public events - connect, login, disconnect
+   * @access public
+   * @param string $host
+   * @param bool|int $port
+   * @param bool|int $tval
+   * @param string $username
+   * @param string $password
+   * @param int $debug_level
+   * @return bool
+   */
+  public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
+    $this->host = $host;
+
+    //  If no port value is passed, retrieve it
+    if ($port == false) {
+      $this->port = $this->POP3_PORT;
+    } else {
+      $this->port = $port;
+    }
+
+    //  If no port value is passed, retrieve it
+    if ($tval == false) {
+      $this->tval = $this->POP3_TIMEOUT;
+    } else {
+      $this->tval = $tval;
+    }
+
+    $this->do_debug = $debug_level;
+    $this->username = $username;
+    $this->password = $password;
+
+    //  Refresh the error log
+    $this->error = null;
+
+    //  Connect
+    $result = $this->Connect($this->host, $this->port, $this->tval);
+
+    if ($result) {
+      $login_result = $this->Login($this->username, $this->password);
+
+      if ($login_result) {
+        $this->Disconnect();
+
+        return true;
+      }
+
+    }
+
+    //  We need to disconnect regardless if the login succeeded
+    $this->Disconnect();
+
+    return false;
+  }
+
+  /**
+   * Connect to the POP3 server
+   * @access public
+   * @param string $host
+   * @param bool|int $port
+   * @param integer $tval
+   * @return boolean
+   */
+  public function Connect ($host, $port = false, $tval = 30) {
+    //  Are we already connected?
+    if ($this->connected) {
+      return true;
+    }
+
+    /*
+    On Windows this will raise a PHP Warning error if the hostname doesn't exist.
+    Rather than supress it with @fsockopen, let's capture it cleanly instead
+    */
+
+    set_error_handler(array(&$this, 'catchWarning'));
+
+    //  Connect to the POP3 server
+    $this->pop_conn = fsockopen($host,    //  POP3 Host
+                  $port,    //  Port #
+                  $errno,   //  Error Number
+                  $errstr,  //  Error Message
+                  $tval);   //  Timeout (seconds)
+
+    //  Restore the error handler
+    restore_error_handler();
+
+    //  Does the Error Log now contain anything?
+    if ($this->error && $this->do_debug >= 1) {
+      $this->displayErrors();
+    }
+
+    //  Did we connect?
+    if ($this->pop_conn == false) {
+      //  It would appear not...
+      $this->error = array(
+        'error' => "Failed to connect to server $host on port $port",
+        'errno' => $errno,
+        'errstr' => $errstr
+      );
+
+      if ($this->do_debug >= 1) {
+        $this->displayErrors();
+      }
+
+      return false;
+    }
+
+    //  Increase the stream time-out
+
+    //  Check for PHP 4.3.0 or later
+    if (version_compare(phpversion(), '5.0.0', 'ge')) {
+      stream_set_timeout($this->pop_conn, $tval, 0);
+    } else {
+      //  Does not work on Windows
+      if (substr(PHP_OS, 0, 3) !== 'WIN') {
+        socket_set_timeout($this->pop_conn, $tval, 0);
+      }
+    }
+
+    //  Get the POP3 server response
+    $pop3_response = $this->getResponse();
+
+    //  Check for the +OK
+    if ($this->checkResponse($pop3_response)) {
+      //  The connection is established and the POP3 server is talking
+      $this->connected = true;
+      return true;
+    }
+    return false;
+  }
+
+  /**
+   * Login to the POP3 server (does not support APOP yet)
+   * @access public
+   * @param string $username
+   * @param string $password
+   * @return boolean
+   */
+  public function Login ($username = '', $password = '') {
+    if ($this->connected == false) {
+      $this->error = 'Not connected to POP3 server';
+
+      if ($this->do_debug >= 1) {
+        $this->displayErrors();
+      }
+    }
+
+    if (empty($username)) {
+      $username = $this->username;
+    }
+
+    if (empty($password)) {
+      $password = $this->password;
+    }
+
+    $pop_username = "USER $username" . $this->CRLF;
+    $pop_password = "PASS $password" . $this->CRLF;
+
+    //  Send the Username
+    $this->sendString($pop_username);
+    $pop3_response = $this->getResponse();
+
+    if ($this->checkResponse($pop3_response)) {
+      //  Send the Password
+      $this->sendString($pop_password);
+      $pop3_response = $this->getResponse();
+
+      if ($this->checkResponse($pop3_response)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Disconnect from the POP3 server
+   * @access public
+   */
+  public function Disconnect () {
+    $this->sendString('QUIT');
+
+    fclose($this->pop_conn);
+  }
+
+  /////////////////////////////////////////////////
+  //  Private Methods
+  /////////////////////////////////////////////////
+
+  /**
+   * Get the socket response back.
+   * $size is the maximum number of bytes to retrieve
+   * @access private
+   * @param integer $size
+   * @return string
+   */
+  private function getResponse ($size = 128) {
+    $pop3_response = fgets($this->pop_conn, $size);
+
+    return $pop3_response;
+  }
+
+  /**
+   * Send a string down the open socket connection to the POP3 server
+   * @access private
+   * @param string $string
+   * @return integer
+   */
+  private function sendString ($string) {
+    $bytes_sent = fwrite($this->pop_conn, $string, strlen($string));
+
+    return $bytes_sent;
+  }
+
+  /**
+   * Checks the POP3 server response for +OK or -ERR
+   * @access private
+   * @param string $string
+   * @return boolean
+   */
+  private function checkResponse ($string) {
+    if (substr($string, 0, 3) !== '+OK') {
+      $this->error = array(
+        'error' => "Server reported an error: $string",
+        'errno' => 0,
+        'errstr' => ''
+      );
+
+      if ($this->do_debug >= 1) {
+        $this->displayErrors();
+      }
+
+      return false;
+    } else {
+      return true;
+    }
+
+  }
+
+  /**
+   * If debug is enabled, display the error message array
+   * @access private
+   */
+  private function displayErrors () {
+    echo '<pre>';
+
+    foreach ($this->error as $single_error) {
+      print_r($single_error);
+    }
+
+    echo '</pre>';
+  }
+
+  /**
+   * Takes over from PHP for the socket warning handler
+   * @access private
+   * @param integer $errno
+   * @param string $errstr
+   * @param string $errfile
+   * @param integer $errline
+   */
+  private function catchWarning ($errno, $errstr, $errfile, $errline) {
+    $this->error[] = array(
+      'error' => "Connecting to the POP3 server raised a PHP warning: ",
+      'errno' => $errno,
+      'errstr' => $errstr
+    );
+  }
+
+  //  End of class
+}
diff --git a/www/resources/PHPMailer/class.smtp.php b/www/resources/PHPMailer/class.smtp.php
new file mode 100644 (file)
index 0000000..8444eb8
--- /dev/null
@@ -0,0 +1,1088 @@
+<?php
+/*~ class.smtp.php
+.---------------------------------------------------------------------------.
+|  Software: PHPMailer - PHP email class                                    |
+|   Version: 5.2.6                                                          |
+|      Site: https://github.com/PHPMailer/PHPMailer/                        |
+| ------------------------------------------------------------------------- |
+|    Admins: Marcus Bointon                                                 |
+|    Admins: Jim Jagielski                                                  |
+|   Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
+|          : Marcus Bointon (coolbru) phpmailer@synchromedia.co.uk          |
+|          : Jim Jagielski (jimjag) jimjag@gmail.com                        |
+|   Founder: Brent R. Matzelle (original founder)                           |
+| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved.              |
+| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved.               |
+| Copyright (c) 2001-2003, Brent R. Matzelle                                |
+| ------------------------------------------------------------------------- |
+|   License: Distributed under the Lesser General Public License (LGPL)     |
+|            http://www.gnu.org/copyleft/lesser.html                        |
+| This program is distributed in the hope that it will be useful - WITHOUT  |
+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
+| FITNESS FOR A PARTICULAR PURPOSE.                                         |
+'---------------------------------------------------------------------------'
+*/
+
+/**
+ * PHPMailer - PHP SMTP email transport class
+ * NOTE: Designed for use with PHP version 5 and up
+ * @package PHPMailer
+ * @author Andy Prevost
+ * @author Marcus Bointon
+ * @copyright 2004 - 2008 Andy Prevost
+ * @author Jim Jagielski
+ * @copyright 2010 - 2012 Jim Jagielski
+ * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
+ */
+
+/**
+ * PHP RFC821 SMTP client
+ *
+ * Implements all the RFC 821 SMTP commands except TURN which will always return a not implemented error.
+ * SMTP also provides some utility methods for sending mail to an SMTP server.
+ * @author Chris Ryan
+ * @package PHPMailer
+ */
+
+class SMTP {
+  /**
+   *  SMTP server port
+   *  @var int
+   */
+  public $SMTP_PORT = 25;
+
+  /**
+   *  SMTP reply line ending (don't change)
+   *  @var string
+   */
+  public $CRLF = "\r\n";
+
+  /**
+   *  Debug output level; 0 for no output
+   *  @var int
+   */
+  public $do_debug = 0;
+
+  /**
+   * Sets the function/method to use for debugging output.
+   * Right now we only honor 'echo' or 'error_log'
+   * @var string
+   */
+  public $Debugoutput     = 'echo';
+
+  /**
+   *  Sets VERP use on/off (default is off)
+   *  @var bool
+   */
+  public $do_verp = false;
+
+  /**
+   * Sets the SMTP timeout value for reads, in seconds
+   * @var int
+   */
+  public $Timeout         = 15;
+
+  /**
+   * Sets the SMTP timelimit value for reads, in seconds
+   * @var int
+   */
+  public $Timelimit       = 30;
+
+  /**
+   * Sets the SMTP PHPMailer Version number
+   * @var string
+   */
+  public $Version         = '5.2.6';
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PRIVATE AND PROTECTED
+  /////////////////////////////////////////////////
+
+  /**
+   * @var resource The socket to the server
+   */
+  private $smtp_conn;
+  /**
+   * @var string Error message, if any, for the last call
+   */
+  private $error;
+  /**
+   * @var string The reply the server sent to us for HELO
+   */
+  private $helo_rply;
+
+  /**
+   * Outputs debugging info via user-defined method
+   * @param string $str
+   */
+  private function edebug($str) {
+    if ($this->Debugoutput == 'error_log') {
+        error_log($str);
+    } else {
+        echo $str;
+    }
+  }
+
+  /**
+   * Initialize the class so that the data is in a known state.
+   * @access public
+   * @return SMTP
+   */
+  public function __construct() {
+    $this->smtp_conn = 0;
+    $this->error = null;
+    $this->helo_rply = null;
+
+    $this->do_debug = 0;
+  }
+
+  /////////////////////////////////////////////////
+  // CONNECTION FUNCTIONS
+  /////////////////////////////////////////////////
+
+  /**
+   * Connect to the server specified on the port specified.
+   * If the port is not specified use the default SMTP_PORT.
+   * If tval is specified then a connection will try and be
+   * established with the server for that number of seconds.
+   * If tval is not specified the default is 30 seconds to
+   * try on the connection.
+   *
+   * SMTP CODE SUCCESS: 220
+   * SMTP CODE FAILURE: 421
+   * @access public
+   * @param string $host
+   * @param int $port
+   * @param int $tval
+   * @return bool
+   */
+  public function Connect($host, $port = 0, $tval = 30) {
+    // set the error val to null so there is no confusion
+    $this->error = null;
+
+    // make sure we are __not__ connected
+    if($this->connected()) {
+      // already connected, generate error
+      $this->error = array('error' => 'Already connected to a server');
+      return false;
+    }
+
+    if(empty($port)) {
+      $port = $this->SMTP_PORT;
+    }
+
+    // connect to the smtp server
+    $this->smtp_conn = @fsockopen($host,    // the host of the server
+                                 $port,    // the port to use
+                                 $errno,   // error number if any
+                                 $errstr,  // error message if any
+                                 $tval);   // give up after ? secs
+    // verify we connected properly
+    if(empty($this->smtp_conn)) {
+      $this->error = array('error' => 'Failed to connect to server',
+                           'errno' => $errno,
+                           'errstr' => $errstr);
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ": $errstr ($errno)" . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+
+    // SMTP server can take longer to respond, give longer timeout for first read
+    // Windows does not have support for this timeout function
+    if(substr(PHP_OS, 0, 3) != 'WIN') {
+     $max = ini_get('max_execution_time');
+     if ($max != 0 && $tval > $max) { // don't bother if unlimited
+      @set_time_limit($tval);
+     }
+     stream_set_timeout($this->smtp_conn, $tval, 0);
+    }
+
+    // get any announcement
+    $announce = $this->get_lines();
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $announce . $this->CRLF . '<br />');
+    }
+
+    return true;
+  }
+
+  /**
+   * Initiate a TLS communication with the server.
+   *
+   * SMTP CODE 220 Ready to start TLS
+   * SMTP CODE 501 Syntax error (no parameters allowed)
+   * SMTP CODE 454 TLS not available due to temporary reason
+   * @access public
+   * @return bool success
+   */
+  public function StartTLS() {
+    $this->error = null; # to avoid confusion
+
+    if(!$this->connected()) {
+      $this->error = array('error' => 'Called StartTLS() without being connected');
+      return false;
+    }
+
+    $this->client_send('STARTTLS' . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply, 0, 3);
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $rply . $this->CRLF . '<br />');
+    }
+
+    if($code != 220) {
+      $this->error =
+         array('error'     => 'STARTTLS not accepted from server',
+               'smtp_code' => $code,
+               'smtp_msg'  => substr($rply, 4));
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+
+    // Begin encrypted connection
+    if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Performs SMTP authentication.  Must be run after running the
+   * Hello() method.  Returns true if successfully authenticated.
+   * @access public
+   * @param string $username
+   * @param string $password
+   * @param string $authtype
+   * @param string $realm
+   * @param string $workstation
+   * @return bool
+   */
+  public function Authenticate($username, $password, $authtype='LOGIN', $realm='', $workstation='') {
+    if (empty($authtype)) {
+      $authtype = 'LOGIN';
+    }
+
+    switch ($authtype) {
+      case 'PLAIN':
+        // Start authentication
+        $this->client_send('AUTH PLAIN' . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+        if($code != 334) {
+          $this->error =
+            array('error' => 'AUTH not accepted from server',
+                  'smtp_code' => $code,
+                  'smtp_msg' => substr($rply, 4));
+          if($this->do_debug >= 1) {
+            $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+          }
+          return false;
+        }
+        // Send encoded username and password
+          $this->client_send(base64_encode("\0".$username."\0".$password) . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+        if($code != 235) {
+          $this->error =
+            array('error' => 'Authentication not accepted from server',
+                  'smtp_code' => $code,
+                  'smtp_msg' => substr($rply, 4));
+          if($this->do_debug >= 1) {
+            $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+          }
+          return false;
+        }
+        break;
+      case 'LOGIN':
+        // Start authentication
+        $this->client_send('AUTH LOGIN' . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+        if($code != 334) {
+          $this->error =
+            array('error' => 'AUTH not accepted from server',
+                  'smtp_code' => $code,
+                  'smtp_msg' => substr($rply, 4));
+          if($this->do_debug >= 1) {
+            $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+          }
+          return false;
+        }
+
+        // Send encoded username
+        $this->client_send(base64_encode($username) . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+        if($code != 334) {
+          $this->error =
+            array('error' => 'Username not accepted from server',
+                  'smtp_code' => $code,
+                  'smtp_msg' => substr($rply, 4));
+          if($this->do_debug >= 1) {
+            $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+          }
+          return false;
+        }
+
+        // Send encoded password
+        $this->client_send(base64_encode($password) . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+        if($code != 235) {
+          $this->error =
+            array('error' => 'Password not accepted from server',
+                  'smtp_code' => $code,
+                  'smtp_msg' => substr($rply, 4));
+          if($this->do_debug >= 1) {
+            $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+          }
+          return false;
+        }
+        break;
+      case 'NTLM':
+        /*
+         * ntlm_sasl_client.php
+         ** Bundled with Permission
+         **
+         ** How to telnet in windows: http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx
+         ** PROTOCOL Documentation http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication
+         */
+        require_once 'extras/ntlm_sasl_client.php';
+        $temp = new stdClass();
+        $ntlm_client = new ntlm_sasl_client_class;
+        if(! $ntlm_client->Initialize($temp)){//let's test if every function its available
+            $this->error = array('error' => $temp->error);
+            if($this->do_debug >= 1) {
+                $this->edebug('You need to enable some modules in your php.ini file: ' . $this->error['error'] . $this->CRLF);
+            }
+            return false;
+        }
+        $msg1 = $ntlm_client->TypeMsg1($realm, $workstation);//msg1
+
+        $this->client_send('AUTH NTLM ' . base64_encode($msg1) . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+
+        if($code != 334) {
+            $this->error =
+                array('error' => 'AUTH not accepted from server',
+                      'smtp_code' => $code,
+                      'smtp_msg' => substr($rply, 4));
+            if($this->do_debug >= 1) {
+                $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF);
+            }
+            return false;
+        }
+
+        $challenge = substr($rply, 3);//though 0 based, there is a white space after the 3 digit number....//msg2
+        $challenge = base64_decode($challenge);
+        $ntlm_res = $ntlm_client->NTLMResponse(substr($challenge, 24, 8), $password);
+        $msg3 = $ntlm_client->TypeMsg3($ntlm_res, $username, $realm, $workstation);//msg3
+        // Send encoded username
+        $this->client_send(base64_encode($msg3) . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+        if($code != 235) {
+            $this->error =
+                array('error' => 'Could not authenticate',
+                      'smtp_code' => $code,
+                      'smtp_msg' => substr($rply, 4));
+            if($this->do_debug >= 1) {
+                $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF);
+            }
+            return false;
+        }
+        break;
+      case 'CRAM-MD5':
+        // Start authentication
+        $this->client_send('AUTH CRAM-MD5' . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+        if($code != 334) {
+          $this->error =
+            array('error' => 'AUTH not accepted from server',
+                  'smtp_code' => $code,
+                  'smtp_msg' => substr($rply, 4));
+          if($this->do_debug >= 1) {
+            $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+          }
+          return false;
+        }
+
+        // Get the challenge
+        $challenge = base64_decode(substr($rply, 4));
+
+        // Build the response
+        $response = $username . ' ' . $this->hmac($challenge, $password);
+
+        // Send encoded credentials
+        $this->client_send(base64_encode($response) . $this->CRLF);
+
+        $rply = $this->get_lines();
+        $code = substr($rply, 0, 3);
+
+        if($code != 334) {
+          $this->error =
+            array('error' => 'Credentials not accepted from server',
+                  'smtp_code' => $code,
+                  'smtp_msg' => substr($rply, 4));
+          if($this->do_debug >= 1) {
+            $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+          }
+          return false;
+        }
+        break;
+    }
+    return true;
+  }
+
+  /**
+   * Works like hash_hmac('md5', $data, $key) in case that function is not available
+   * @access private
+   * @param string $data
+   * @param string $key
+   * @return string
+   */
+  private function hmac($data, $key) {
+      if (function_exists('hash_hmac')) {
+          return hash_hmac('md5', $data, $key);
+      }
+
+      // The following borrowed from http://php.net/manual/en/function.mhash.php#27225
+
+      // RFC 2104 HMAC implementation for php.
+      // Creates an md5 HMAC.
+      // Eliminates the need to install mhash to compute a HMAC
+      // Hacked by Lance Rushing
+
+      $b = 64; // byte length for md5
+      if (strlen($key) > $b) {
+          $key = pack('H*', md5($key));
+      }
+      $key  = str_pad($key, $b, chr(0x00));
+      $ipad = str_pad('', $b, chr(0x36));
+      $opad = str_pad('', $b, chr(0x5c));
+      $k_ipad = $key ^ $ipad ;
+      $k_opad = $key ^ $opad;
+
+      return md5($k_opad  . pack('H*', md5($k_ipad . $data)));
+  }
+
+  /**
+   * Returns true if connected to a server otherwise false
+   * @access public
+   * @return bool
+   */
+  public function Connected() {
+    if(!empty($this->smtp_conn)) {
+      $sock_status = stream_get_meta_data($this->smtp_conn);
+      if($sock_status['eof']) {
+        // the socket is valid but we are not connected
+        if($this->do_debug >= 1) {
+            $this->edebug('SMTP -> NOTICE:' . $this->CRLF . 'EOF caught while checking if connected');
+        }
+        $this->Close();
+        return false;
+      }
+      return true; // everything looks good
+    }
+    return false;
+  }
+
+  /**
+   * Closes the socket and cleans up the state of the class.
+   * It is not considered good to use this function without
+   * first trying to use QUIT.
+   * @access public
+   * @return void
+   */
+  public function Close() {
+    $this->error = null; // so there is no confusion
+    $this->helo_rply = null;
+    if(!empty($this->smtp_conn)) {
+      // close the connection and cleanup
+      fclose($this->smtp_conn);
+      $this->smtp_conn = 0;
+    }
+  }
+
+  /////////////////////////////////////////////////
+  // SMTP COMMANDS
+  /////////////////////////////////////////////////
+
+  /**
+   * Issues a data command and sends the msg_data to the server
+   * finializing the mail transaction. $msg_data is the message
+   * that is to be send with the headers. Each header needs to be
+   * on a single line followed by a <CRLF> with the message headers
+   * and the message body being seperated by and additional <CRLF>.
+   *
+   * Implements rfc 821: DATA <CRLF>
+   *
+   * SMTP CODE INTERMEDIATE: 354
+   *     [data]
+   *     <CRLF>.<CRLF>
+   *     SMTP CODE SUCCESS: 250
+   *     SMTP CODE FAILURE: 552, 554, 451, 452
+   * SMTP CODE FAILURE: 451, 554
+   * SMTP CODE ERROR  : 500, 501, 503, 421
+   * @access public
+   * @param string $msg_data
+   * @return bool
+   */
+  public function Data($msg_data) {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+              'error' => 'Called Data() without being connected');
+      return false;
+    }
+
+    $this->client_send('DATA' . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply, 0, 3);
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $rply . $this->CRLF . '<br />');
+    }
+
+    if($code != 354) {
+      $this->error =
+        array('error' => 'DATA command not accepted from server',
+              'smtp_code' => $code,
+              'smtp_msg' => substr($rply, 4));
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+
+    /* the server is ready to accept data!
+     * according to rfc 821 we should not send more than 1000
+     * including the CRLF
+     * characters on a single line so we will break the data up
+     * into lines by \r and/or \n then if needed we will break
+     * each of those into smaller lines to fit within the limit.
+     * in addition we will be looking for lines that start with
+     * a period '.' and append and additional period '.' to that
+     * line. NOTE: this does not count towards limit.
+     */
+
+    // normalize the line breaks so we know the explode works
+    $msg_data = str_replace("\r\n", "\n", $msg_data);
+    $msg_data = str_replace("\r", "\n", $msg_data);
+    $lines = explode("\n", $msg_data);
+
+    /* we need to find a good way to determine is headers are
+     * in the msg_data or if it is a straight msg body
+     * currently I am assuming rfc 822 definitions of msg headers
+     * and if the first field of the first line (':' sperated)
+     * does not contain a space then it _should_ be a header
+     * and we can process all lines before a blank "" line as
+     * headers.
+     */
+
+    $field = substr($lines[0], 0, strpos($lines[0], ':'));
+    $in_headers = false;
+    if(!empty($field) && !strstr($field, ' ')) {
+      $in_headers = true;
+    }
+
+    $max_line_length = 998; // used below; set here for ease in change
+
+    while(list(, $line) = @each($lines)) {
+      $lines_out = null;
+      if($line == '' && $in_headers) {
+        $in_headers = false;
+      }
+      // ok we need to break this line up into several smaller lines
+      while(strlen($line) > $max_line_length) {
+        $pos = strrpos(substr($line, 0, $max_line_length), ' ');
+
+        // Patch to fix DOS attack
+        if(!$pos) {
+          $pos = $max_line_length - 1;
+          $lines_out[] = substr($line, 0, $pos);
+          $line = substr($line, $pos);
+        } else {
+          $lines_out[] = substr($line, 0, $pos);
+          $line = substr($line, $pos + 1);
+        }
+
+        /* if processing headers add a LWSP-char to the front of new line
+         * rfc 822 on long msg headers
+         */
+        if($in_headers) {
+          $line = "\t" . $line;
+        }
+      }
+      $lines_out[] = $line;
+
+      // send the lines to the server
+      while(list(, $line_out) = @each($lines_out)) {
+        if(strlen($line_out) > 0)
+        {
+          if(substr($line_out, 0, 1) == '.') {
+            $line_out = '.' . $line_out;
+          }
+        }
+        $this->client_send($line_out . $this->CRLF);
+      }
+    }
+
+    // message data has been sent
+    $this->client_send($this->CRLF . '.' . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply, 0, 3);
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $rply . $this->CRLF . '<br />');
+    }
+
+    if($code != 250) {
+      $this->error =
+        array('error' => 'DATA not accepted from server',
+              'smtp_code' => $code,
+              'smtp_msg' => substr($rply, 4));
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * Sends the HELO command to the smtp server.
+   * This makes sure that we and the server are in
+   * the same known state.
+   *
+   * Implements from rfc 821: HELO <SP> <domain> <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE ERROR  : 500, 501, 504, 421
+   * @access public
+   * @param string $host
+   * @return bool
+   */
+  public function Hello($host = '') {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+            'error' => 'Called Hello() without being connected');
+      return false;
+    }
+
+    // if hostname for HELO was not specified send default
+    if(empty($host)) {
+      // determine appropriate default to send to server
+      $host = 'localhost';
+    }
+
+    // Send extended hello first (RFC 2821)
+    if(!$this->SendHello('EHLO', $host)) {
+      if(!$this->SendHello('HELO', $host)) {
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+  /**
+   * Sends a HELO/EHLO command.
+   * @access private
+   * @param string $hello
+   * @param string $host
+   * @return bool
+   */
+  private function SendHello($hello, $host) {
+    $this->client_send($hello . ' ' . $host . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply, 0, 3);
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER: ' . $rply . $this->CRLF . '<br />');
+    }
+
+    if($code != 250) {
+      $this->error =
+        array('error' => $hello . ' not accepted from server',
+              'smtp_code' => $code,
+              'smtp_msg' => substr($rply, 4));
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+
+    $this->helo_rply = $rply;
+
+    return true;
+  }
+
+  /**
+   * Starts a mail transaction from the email address specified in
+   * $from. Returns true if successful or false otherwise. If True
+   * the mail transaction is started and then one or more Recipient
+   * commands may be called followed by a Data command.
+   *
+   * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE SUCCESS: 552, 451, 452
+   * SMTP CODE SUCCESS: 500, 501, 421
+   * @access public
+   * @param string $from
+   * @return bool
+   */
+  public function Mail($from) {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+              'error' => 'Called Mail() without being connected');
+      return false;
+    }
+
+    $useVerp = ($this->do_verp ? ' XVERP' : '');
+    $this->client_send('MAIL FROM:<' . $from . '>' . $useVerp . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply, 0, 3);
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $rply . $this->CRLF . '<br />');
+    }
+
+    if($code != 250) {
+      $this->error =
+        array('error' => 'MAIL not accepted from server',
+              'smtp_code' => $code,
+              'smtp_msg' => substr($rply, 4));
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * Sends the quit command to the server and then closes the socket
+   * if there is no error or the $close_on_error argument is true.
+   *
+   * Implements from rfc 821: QUIT <CRLF>
+   *
+   * SMTP CODE SUCCESS: 221
+   * SMTP CODE ERROR  : 500
+   * @access public
+   * @param bool $close_on_error
+   * @return bool
+   */
+  public function Quit($close_on_error = true) {
+    $this->error = null; // so there is no confusion
+
+    if(!$this->connected()) {
+      $this->error = array(
+              'error' => 'Called Quit() without being connected');
+      return false;
+    }
+
+    // send the quit command to the server
+    $this->client_send('quit' . $this->CRLF);
+
+    // get any good-bye messages
+    $byemsg = $this->get_lines();
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $byemsg . $this->CRLF . '<br />');
+    }
+
+    $rval = true;
+    $e = null;
+
+    $code = substr($byemsg, 0, 3);
+    if($code != 221) {
+      // use e as a tmp var cause Close will overwrite $this->error
+      $e = array('error' => 'SMTP server rejected quit command',
+                 'smtp_code' => $code,
+                 'smtp_rply' => substr($byemsg, 4));
+      $rval = false;
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $e['error'] . ': ' . $byemsg . $this->CRLF . '<br />');
+      }
+    }
+
+    if(empty($e) || $close_on_error) {
+      $this->Close();
+    }
+
+    return $rval;
+  }
+
+  /**
+   * Sends the command RCPT to the SMTP server with the TO: argument of $to.
+   * Returns true if the recipient was accepted false if it was rejected.
+   *
+   * Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250, 251
+   * SMTP CODE FAILURE: 550, 551, 552, 553, 450, 451, 452
+   * SMTP CODE ERROR  : 500, 501, 503, 421
+   * @access public
+   * @param string $to
+   * @return bool
+   */
+  public function Recipient($to) {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+              'error' => 'Called Recipient() without being connected');
+      return false;
+    }
+
+    $this->client_send('RCPT TO:<' . $to . '>' . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply, 0, 3);
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $rply . $this->CRLF . '<br />');
+    }
+
+    if($code != 250 && $code != 251) {
+      $this->error =
+        array('error' => 'RCPT not accepted from server',
+              'smtp_code' => $code,
+              'smtp_msg' => substr($rply, 4));
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * Sends the RSET command to abort and transaction that is
+   * currently in progress. Returns true if successful false
+   * otherwise.
+   *
+   * Implements rfc 821: RSET <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE ERROR  : 500, 501, 504, 421
+   * @access public
+   * @return bool
+   */
+  public function Reset() {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array('error' => 'Called Reset() without being connected');
+      return false;
+    }
+
+    $this->client_send('RSET' . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply, 0, 3);
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $rply . $this->CRLF . '<br />');
+    }
+
+    if($code != 250) {
+      $this->error =
+        array('error' => 'RSET failed',
+              'smtp_code' => $code,
+              'smtp_msg' => substr($rply, 4));
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Starts a mail transaction from the email address specified in
+   * $from. Returns true if successful or false otherwise. If True
+   * the mail transaction is started and then one or more Recipient
+   * commands may be called followed by a Data command. This command
+   * will send the message to the users terminal if they are logged
+   * in and send them an email.
+   *
+   * Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE SUCCESS: 552, 451, 452
+   * SMTP CODE SUCCESS: 500, 501, 502, 421
+   * @access public
+   * @param string $from
+   * @return bool
+   */
+  public function SendAndMail($from) {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+          'error' => 'Called SendAndMail() without being connected');
+      return false;
+    }
+
+    $this->client_send('SAML FROM:' . $from . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply, 0, 3);
+
+    if($this->do_debug >= 2) {
+      $this->edebug('SMTP -> FROM SERVER:' . $rply . $this->CRLF . '<br />');
+    }
+
+    if($code != 250) {
+      $this->error =
+        array('error' => 'SAML not accepted from server',
+              'smtp_code' => $code,
+              'smtp_msg' => substr($rply, 4));
+      if($this->do_debug >= 1) {
+        $this->edebug('SMTP -> ERROR: ' . $this->error['error'] . ': ' . $rply . $this->CRLF . '<br />');
+      }
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * This is an optional command for SMTP that this class does not
+   * support. This method is here to make the RFC821 Definition
+   * complete for this class and __may__ be implimented in the future
+   *
+   * Implements from rfc 821: TURN <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE FAILURE: 502
+   * SMTP CODE ERROR  : 500, 503
+   * @access public
+   * @return bool
+   */
+  public function Turn() {
+    $this->error = array('error' => 'This method, TURN, of the SMTP '.
+                                    'is not implemented');
+    if($this->do_debug >= 1) {
+      $this->edebug('SMTP -> NOTICE: ' . $this->error['error'] . $this->CRLF . '<br />');
+    }
+    return false;
+  }
+
+  /**
+  * Sends data to the server
+  * @param string $data
+  * @access public
+  * @return Integer number of bytes sent to the server or FALSE on error
+  */
+  public function client_send($data) {
+      if ($this->do_debug >= 1) {
+          $this->edebug("CLIENT -> SMTP: $data" . $this->CRLF . '<br />');
+      }
+      return fwrite($this->smtp_conn, $data);
+  }
+
+  /**
+  * Get the current error
+  * @access public
+  * @return array
+  */
+  public function getError() {
+    return $this->error;
+  }
+
+  /////////////////////////////////////////////////
+  // INTERNAL FUNCTIONS
+  /////////////////////////////////////////////////
+
+  /**
+   * Read in as many lines as possible
+   * either before eof or socket timeout occurs on the operation.
+   * With SMTP we can tell if we have more lines to read if the
+   * 4th character is '-' symbol. If it is a space then we don't
+   * need to read anything else.
+   * @access private
+   * @return string
+   */
+  private function get_lines() {
+    $data = '';
+    $endtime = 0;
+    /* If for some reason the fp is bad, don't inf loop */
+    if (!is_resource($this->smtp_conn)) {
+      return $data;
+    }
+    stream_set_timeout($this->smtp_conn, $this->Timeout);
+    if ($this->Timelimit > 0) {
+      $endtime = time() + $this->Timelimit;
+    }
+    while(is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
+      $str = @fgets($this->smtp_conn, 515);
+      if($this->do_debug >= 4) {
+        $this->edebug("SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />');
+        $this->edebug("SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />');
+      }
+      $data .= $str;
+      if($this->do_debug >= 4) {
+        $this->edebug("SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '<br />');
+      }
+      // if 4th character is a space, we are done reading, break the loop
+      if(substr($str, 3, 1) == ' ') { break; }
+      // Timed-out? Log and break
+      $info = stream_get_meta_data($this->smtp_conn);
+      if ($info['timed_out']) {
+        if($this->do_debug >= 4) {
+          $this->edebug('SMTP -> get_lines(): timed-out (' . $this->Timeout . ' seconds) <br />');
+        }
+        break;
+      }
+      // Now check if reads took too long
+      if ($endtime) {
+        if (time() > $endtime) {
+          if($this->do_debug >= 4) {
+            $this->edebug('SMTP -> get_lines(): timelimit reached (' . $this->Timelimit . ' seconds) <br />');
+          }
+          break;
+        }
+      }
+    }
+    return $data;
+  }
+
+}
diff --git a/www/resources/doT/doT.min.js b/www/resources/doT/doT.min.js
new file mode 100644 (file)
index 0000000..1f05f62
--- /dev/null
@@ -0,0 +1,7 @@
+/* Laura Doktorova https://github.com/olado/doT */(function(){function o(){var a={"&":"&#38;","<":"&#60;",">":"&#62;",'"':"&#34;","'":"&#39;","/":"&#47;"},b=/&(?!#?\w+;)|<|>|"|'|\//g;return function(){return this?this.replace(b,function(c){return a[c]||c}):this}}function p(a,b,c){return(typeof b==="string"?b:b.toString()).replace(a.define||i,function(l,e,f,g){if(e.indexOf("def.")===0)e=e.substring(4);if(!(e in c))if(f===":"){a.defineParams&&g.replace(a.defineParams,function(n,h,d){c[e]={arg:h,text:d}});e in c||(c[e]=g)}else(new Function("def","def['"+
+e+"']="+g))(c);return""}).replace(a.use||i,function(l,e){if(a.useParams)e=e.replace(a.useParams,function(g,n,h,d){if(c[h]&&c[h].arg&&d){g=(h+":"+d).replace(/'|\\/g,"_");c.__exp=c.__exp||{};c.__exp[g]=c[h].text.replace(RegExp("(^|[^\\w$])"+c[h].arg+"([^\\w$])","g"),"$1"+d+"$2");return n+"def.__exp['"+g+"']"}});var f=(new Function("def","return "+e))(c);return f?p(a,f,c):f})}function m(a){return a.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}var j={version:"1.0.0",templateSettings:{evaluate:/\{\{([\s\S]+?\}?)\}\}/g,
+interpolate:/\{\{=([\s\S]+?)\}\}/g,encode:/\{\{!([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,useParams:/(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,defineParams:/^\s*([\w$]+):([\s\S]+)/,conditional:/\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,varname:"it",strip:true,append:true,selfcontained:false},template:undefined,
+compile:undefined};if(typeof module!=="undefined"&&module.exports)module.exports=j;else if(typeof define==="function"&&define.amd)define(function(){return j});else(function(){return this||(0,eval)("this")})().doT=j;String.prototype.encodeHTML=o();var q={append:{start:"'+(",end:")+'",endencode:"||'').toString().encodeHTML()+'"},split:{start:"';out+=(",end:");out+='",endencode:"||'').toString().encodeHTML();out+='"}},i=/$^/;j.template=function(a,b,c){b=b||j.templateSettings;var l=b.append?q.append:
+q.split,e,f=0,g;a=b.use||b.define?p(b,a,c||{}):a;a=("var out='"+(b.strip?a.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):a).replace(/'|\\/g,"\\$&").replace(b.interpolate||i,function(h,d){return l.start+m(d)+l.end}).replace(b.encode||i,function(h,d){e=true;return l.start+m(d)+l.endencode}).replace(b.conditional||i,function(h,d,k){return d?k?"';}else if("+m(k)+"){out+='":"';}else{out+='":k?"';if("+m(k)+"){out+='":"';}out+='"}).replace(b.iterate||i,function(h,
+d,k,r){if(!d)return"';} } out+='";f+=1;g=r||"i"+f;d=m(d);return"';var arr"+f+"="+d+";if(arr"+f+"){var "+k+","+g+"=-1,l"+f+"=arr"+f+".length-1;while("+g+"<l"+f+"){"+k+"=arr"+f+"["+g+"+=1];out+='"}).replace(b.evaluate||i,function(h,d){return"';"+m(d)+"out+='"})+"';return out;").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/(\s|;|\}|^|\{)out\+='';/g,"$1").replace(/\+''/g,"").replace(/(\s|;|\}|^|\{)out\+=''\+/g,"$1out+=");if(e&&b.selfcontained)a="String.prototype.encodeHTML=("+
+o.toString()+"());"+a;try{return new Function(b.varname,a)}catch(n){typeof console!=="undefined"&&console.log("Could not create a template function: "+a);throw n;}};j.compile=function(a,b){return j.template(a,null,b)}})();
diff --git a/www/resources/jQuery/jquery-1.10.2.min.js b/www/resources/jQuery/jquery-1.10.2.min.js
new file mode 100644 (file)
index 0000000..da41706
--- /dev/null
@@ -0,0 +1,6 @@
+/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
+//@ sourceMappingURL=jquery-1.10.2.min.map
+*/
+(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
+}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
+u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
diff --git a/www/resources/jquery-cookie/jquery.cookies.js b/www/resources/jquery-cookie/jquery.cookies.js
new file mode 100644 (file)
index 0000000..7401208
--- /dev/null
@@ -0,0 +1,8 @@
+/*!
+ * jQuery Cookie Plugin v1.3.1
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2013 Klaus Hartl
+ * Released under the MIT license
+ */
+(function(a,b,c){function e(a){return a}function f(a){return g(decodeURIComponent(a.replace(d," ")))}function g(a){return 0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")),a}function h(a){return i.json?JSON.parse(a):a}var d=/\+/g,i=a.cookie=function(d,g,j){if(g!==c){if(j=a.extend({},i.defaults,j),null===g&&(j.expires=-1),"number"==typeof j.expires){var k=j.expires,l=j.expires=new Date;l.setDate(l.getDate()+k)}return g=i.json?JSON.stringify(g):g+"",b.cookie=[encodeURIComponent(d),"=",i.raw?g:encodeURIComponent(g),j.expires?"; expires="+j.expires.toUTCString():"",j.path?"; path="+j.path:"",j.domain?"; domain="+j.domain:"",j.secure?"; secure":""].join("")}for(var m=i.raw?e:f,n=b.cookie.split("; "),o=d?null:{},p=0,q=n.length;q>p;p++){var r=n[p].split("="),s=m(r.shift()),t=m(r.join("="));if(d&&d===s){o=h(t);break}d||(o[s]=h(t))}return o};i.defaults={},a.removeCookie=function(b,c){return null!==a.cookie(b)?(a.cookie(b,null,c),!0):!1}})(jQuery,document);
\ No newline at end of file
diff --git a/www/resources/lru/lru.js b/www/resources/lru/lru.js
new file mode 100644 (file)
index 0000000..d014942
--- /dev/null
@@ -0,0 +1,249 @@
+/**\r
+ * A doubly linked list-based Least Recently Used (LRU) cache. Will keep most\r
+ * recently used items while discarding least recently used items when its limit\r
+ * is reached.\r
+ *\r
+ * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson <http://hunch.se/>\r
+ * See README.md for details.\r
+ *\r
+ * Illustration of the design:\r
+ *\r
+ *       entry             entry             entry             entry\r
+ *       ______            ______            ______            ______\r
+ *      | head |.newer => |      |.newer => |      |.newer => | tail |\r
+ *      |  A   |          |  B   |          |  C   |          |  D   |\r
+ *      |______| <= older.|______| <= older.|______| <= older.|______|\r
+ *\r
+ *  removed  <--  <--  <--  <--  <--  <--  <--  <--  <--  <--  <--  added\r
+ */\r
+function LRUCache (limit) {\r
+  // Current size of the cache. (Read-only).\r
+  this.size = 0;\r
+  // Maximum number of items this cache can hold.\r
+  this.limit = limit;\r
+  this._keymap = {};\r
+}\r
+\r
+/**\r
+ * Put <value> into the cache associated with <key>. Returns the entry which was\r
+ * removed to make room for the new entry. Otherwise undefined is returned\r
+ * (i.e. if there was enough room already).\r
+ */\r
+LRUCache.prototype.put = function(key, value) {\r
+  var entry = {key:key, value:value};\r
+  // Note: No protection agains replacing, and thus orphan entries. By design.\r
+  this._keymap[key] = entry;\r
+  if (this.tail) {\r
+    // link previous tail to the new tail (entry)\r
+    this.tail.newer = entry;\r
+    entry.older = this.tail;\r
+  } else {\r
+    // we're first in -- yay\r
+    this.head = entry;\r
+  }\r
+  // add new entry to the end of the linked list -- it's now the freshest entry.\r
+  this.tail = entry;\r
+  if (this.size === this.limit) {\r
+    // we hit the limit -- remove the head\r
+    return this.shift();\r
+  } else {\r
+    // increase the size counter\r
+    this.size++;\r
+  }\r
+}\r
+\r
+/**\r
+ * Purge the least recently used (oldest) entry from the cache. Returns the\r
+ * removed entry or undefined if the cache was empty.\r
+ *\r
+ * If you need to perform any form of finalization of purged items, this is a\r
+ * good place to do it. Simply override/replace this function:\r
+ *\r
+ *   var c = new LRUCache(123);\r
+ *   c.shift = function() {\r
+ *     var entry = LRUCache.prototype.shift.call(this);\r
+ *     doSomethingWith(entry);\r
+ *     return entry;\r
+ *   }\r
+ */\r
+LRUCache.prototype.shift = function() {\r
+  // todo: handle special case when limit == 1\r
+  var entry = this.head;\r
+  if (entry) {\r
+    if (this.head.newer) {\r
+      this.head = this.head.newer;\r
+      this.head.older = undefined;\r
+    } else {\r
+      this.head = undefined;\r
+    }\r
+    // Remove last strong reference to <entry> and remove links from the purged\r
+    // entry being returned:\r
+    entry.newer = entry.older = undefined;\r
+    // delete is slow, but we need to do this to avoid uncontrollable growth:\r
+    delete this._keymap[entry.key];\r
+  }\r
+  return entry;\r
+}\r
+\r
+/**\r
+ * Get and register recent use of <key>. Returns the value associated with <key>\r
+ * or undefined if not in cache.\r
+ */\r
+LRUCache.prototype.get = function(key, returnEntry) {\r
+  // First, find our cache entry\r
+  var entry = this._keymap[key];\r
+  if (entry === undefined) return; // Not cached. Sorry.\r
+  // As <key> was found in the cache, register it as being requested recently\r
+  if (entry === this.tail) {\r
+    // Already the most recenlty used entry, so no need to update the list\r
+    return entry.value;\r
+  }\r
+  // HEAD--------------TAIL\r
+  //   <.older   .newer>\r
+  //  <--- add direction --\r
+  //   A  B  C  <D>  E\r
+  if (entry.newer) {\r
+    if (entry === this.head)\r
+      this.head = entry.newer;\r
+    entry.newer.older = entry.older; // C <-- E.\r
+  }\r
+  if (entry.older)\r
+    entry.older.newer = entry.newer; // C. --> E\r
+  entry.newer = undefined; // D --x\r
+  entry.older = this.tail; // D. --> E\r
+  if (this.tail)\r
+    this.tail.newer = entry; // E. <-- D\r
+  this.tail = entry;\r
+  return returnEntry ? entry : entry.value;\r
+}\r
+\r
+// ----------------------------------------------------------------------------\r
+// Following code is optional and can be removed without breaking the core\r
+// functionality.\r
+\r
+/**\r
+ * Check if <key> is in the cache without registering recent use. Feasible if\r
+ * you do not want to chage the state of the cache, but only "peek" at it.\r
+ * Returns the entry associated with <key> if found, or undefined if not found.\r
+ */\r
+LRUCache.prototype.find = function(key) {\r
+  return this._keymap[key];\r
+}\r
+\r
+/**\r
+ * Update the value of entry with <key>. Returns the old value, or undefined if\r
+ * entry was not in the cache.\r
+ */\r
+LRUCache.prototype.set = function(key, value) {\r
+  var oldvalue, entry = this.get(key, true);\r
+  if (entry) {\r
+    oldvalue = entry.value;\r
+    entry.value = value;\r
+  } else {\r
+    oldvalue = this.put(key, value);\r
+    if (oldvalue) oldvalue = oldvalue.value;\r
+  }\r
+  return oldvalue;\r
+}\r
+\r
+/**\r
+ * Remove entry <key> from cache and return its value. Returns undefined if not\r
+ * found.\r
+ */\r
+LRUCache.prototype.remove = function(key) {\r
+  var entry = this._keymap[key];\r
+  if (!entry) return;\r
+  delete this._keymap[entry.key]; // need to do delete unfortunately\r
+  if (entry.newer && entry.older) {\r
+    // relink the older entry with the newer entry\r
+    entry.older.newer = entry.newer;\r
+    entry.newer.older = entry.older;\r
+  } else if (entry.newer) {\r
+    // remove the link to us\r
+    entry.newer.older = undefined;\r
+    // link the newer entry to head\r
+    this.head = entry.newer;\r
+  } else if (entry.older) {\r
+    // remove the link to us\r
+    entry.older.newer = undefined;\r
+    // link the newer entry to head\r
+    this.tail = entry.older;\r
+  } else {// if(entry.older === undefined && entry.newer === undefined) {\r
+    this.head = this.tail = undefined;\r
+  }\r
+\r
+  this.size--;\r
+  return entry.value;\r
+}\r
+\r
+/** Removes all entries */\r
+LRUCache.prototype.removeAll = function() {\r
+  // This should be safe, as we never expose strong refrences to the outside\r
+  this.head = this.tail = undefined;\r
+  this.size = 0;\r
+  this._keymap = {};\r
+}\r
+\r
+/**\r
+ * Return an array containing all keys of entries stored in the cache object, in\r
+ * arbitrary order.\r
+ */\r
+if (typeof Object.keys === 'function') {\r
+  LRUCache.prototype.keys = function() { return Object.keys(this._keymap); }\r
+} else {\r
+  LRUCache.prototype.keys = function() {\r
+    var keys = [];\r
+    for (var k in this._keymap) keys.push(k);\r
+    return keys;\r
+  }\r
+}\r
+\r
+/**\r
+ * Call `fun` for each entry. Starting with the newest entry if `desc` is a true\r
+ * value, otherwise starts with the oldest (head) enrty and moves towards the\r
+ * tail.\r
+ *\r
+ * `fun` is called with 3 arguments in the context `context`:\r
+ *   `fun.call(context, Object key, Object value, LRUCache self)`\r
+ */\r
+LRUCache.prototype.forEach = function(fun, context, desc) {\r
+  if (context === true) { desc = true; context = undefined; }\r
+  else if (typeof context !== 'object') context = this;\r
+  if (desc) {\r
+    var entry = this.tail;\r
+    while (entry) {\r
+      fun.call(context, entry.key, entry.value, this);\r
+      entry = entry.older;\r
+    }\r
+  } else {\r
+    var entry = this.head;\r
+    while (entry) {\r
+      fun.call(context, entry.key, entry.value, this);\r
+      entry = entry.newer;\r
+    }\r
+  }\r
+}\r
+\r
+/** Returns a JSON (array) representation */\r
+LRUCache.prototype.toJSON = function() {\r
+  var s = [], entry = this.head;\r
+  while (entry) {\r
+    s.push({key:entry.key.toJSON(), value:entry.value.toJSON()});\r
+    entry = entry.newer;\r
+  }\r
+  return s;\r
+}\r
+\r
+/** Returns a String representation */\r
+LRUCache.prototype.toString = function() {\r
+  var s = '', entry = this.head;\r
+  while (entry) {\r
+    s += String(entry.key)+':'+entry.value;\r
+    if (entry = entry.newer)\r
+      s += ' < ';\r
+  }\r
+  return s;\r
+}\r
+\r
+// Export ourselves\r
+if (typeof this === 'object') this.LRUCache = LRUCache;\r
diff --git a/www/resources/normalize/normalize.css b/www/resources/normalize/normalize.css
new file mode 100644 (file)
index 0000000..6adf56e
--- /dev/null
@@ -0,0 +1,396 @@
+/*! normalize.css v2.1.2 | MIT License | git.io/normalize */
+
+/* ==========================================================================
+   HTML5 display definitions
+   ========================================================================== */
+
+/**
+ * Correct `block` display not defined in IE 8/9.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+    display: block;
+}
+
+/**
+ * Correct `inline-block` display not defined in IE 8/9.
+ */
+
+audio,
+canvas,
+video {
+    display: inline-block;
+}
+
+/**
+ * Prevent modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+
+audio:not([controls]) {
+    display: none;
+    height: 0;
+}
+
+/**
+ * Address styling not present in IE 8/9.
+ */
+
+[hidden] {
+    display: none;
+}
+
+/* ==========================================================================
+   Base
+   ========================================================================== */
+
+/**
+ * 1. Set default font family to sans-serif.
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
+ *    user zoom.
+ */
+
+html {
+    font-family: sans-serif; /* 1 */
+    -ms-text-size-adjust: 100%; /* 2 */
+    -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/**
+ * Remove default margin.
+ */
+
+body {
+    margin: 0;
+}
+
+/* ==========================================================================
+   Links
+   ========================================================================== */
+
+/**
+ * Address `outline` inconsistency between Chrome and other browsers.
+ */
+
+a:focus {
+    outline: thin dotted;
+}
+
+/**
+ * Improve readability when focused and also mouse hovered in all browsers.
+ */
+
+a:active,
+a:hover {
+    outline: 0;
+}
+
+/* ==========================================================================
+   Typography
+   ========================================================================== */
+
+/**
+ * Address variable `h1` font-size and margin within `section` and `article`
+ * contexts in Firefox 4+, Safari 5, and Chrome.
+ */
+
+h1 {
+    font-size: 2em;
+    margin: 0.67em 0;
+}
+
+/**
+ * Address styling not present in IE 8/9, Safari 5, and Chrome.
+ */
+
+abbr[title] {
+    border-bottom: 1px dotted;
+}
+
+/**
+ * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
+ */
+
+b,
+strong {
+    font-weight: bold;
+}
+
+/**
+ * Address styling not present in Safari 5 and Chrome.
+ */
+
+dfn {
+    font-style: italic;
+}
+
+/**
+ * Address differences between Firefox and other browsers.
+ */
+
+hr {
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+    height: 0;
+}
+
+/**
+ * Address styling not present in IE 8/9.
+ */
+
+mark {
+    background: #ff0;
+    color: #000;
+}
+
+/**
+ * Correct font family set oddly in Safari 5 and Chrome.
+ */
+
+code,
+kbd,
+pre,
+samp {
+    font-family: monospace, serif;
+    font-size: 1em;
+}
+
+/**
+ * Improve readability of pre-formatted text in all browsers.
+ */
+
+pre {
+    white-space: pre-wrap;
+}
+
+/**
+ * Set consistent quote types.
+ */
+
+q {
+    quotes: "\201C" "\201D" "\2018" "\2019";
+}
+
+/**
+ * Address inconsistent and variable font size in all browsers.
+ */
+
+small {
+    font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+    font-size: 75%;
+    line-height: 0;
+    position: relative;
+    vertical-align: baseline;
+}
+
+sup {
+    top: -0.5em;
+}
+
+sub {
+    bottom: -0.25em;
+}
+
+/* ==========================================================================
+   Embedded content
+   ========================================================================== */
+
+/**
+ * Remove border when inside `a` element in IE 8/9.
+ */
+
+img {
+    border: 0;
+}
+
+/**
+ * Correct overflow displayed oddly in IE 9.
+ */
+
+svg:not(:root) {
+    overflow: hidden;
+}
+
+/* ==========================================================================
+   Figures
+   ========================================================================== */
+
+/**
+ * Address margin not present in IE 8/9 and Safari 5.
+ */
+
+figure {
+    margin: 0;
+}
+
+/* ==========================================================================
+   Forms
+   ========================================================================== */
+
+/**
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+    border: 1px solid #c0c0c0;
+    margin: 0 2px;
+    padding: 0.35em 0.625em 0.75em;
+}
+
+/**
+ * 1. Correct `color` not being inherited in IE 8/9.
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
+ */
+
+legend {
+    border: 0; /* 1 */
+    padding: 0; /* 2 */
+}
+
+/**
+ * 1. Correct font family not being inherited in all browsers.
+ * 2. Correct font size not being inherited in all browsers.
+ * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
+ */
+
+button,
+input,
+select,
+textarea {
+    font-family: inherit; /* 1 */
+    font-size: 100%; /* 2 */
+    margin: 0; /* 3 */
+}
+
+/**
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+
+button,
+input {
+    line-height: normal;
+}
+
+/**
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
+ * All other form control elements do not inherit `text-transform` values.
+ * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
+ * Correct `select` style inheritance in Firefox 4+ and Opera.
+ */
+
+button,
+select {
+    text-transform: none;
+}
+
+/**
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ *    and `video` controls.
+ * 2. Correct inability to style clickable `input` types in iOS.
+ * 3. Improve usability and consistency of cursor style between image-type
+ *    `input` and others.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+    -webkit-appearance: button; /* 2 */
+    cursor: pointer; /* 3 */
+}
+
+/**
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+html input[disabled] {
+    cursor: default;
+}
+
+/**
+ * 1. Address box sizing set to `content-box` in IE 8/9.
+ * 2. Remove excess padding in IE 8/9.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+    box-sizing: border-box; /* 1 */
+    padding: 0; /* 2 */
+}
+
+/**
+ * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
+ * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
+ *    (include `-moz` to future-proof).
+ */
+
+input[type="search"] {
+    -webkit-appearance: textfield; /* 1 */
+    -moz-box-sizing: content-box;
+    -webkit-box-sizing: content-box; /* 2 */
+    box-sizing: content-box;
+}
+
+/**
+ * Remove inner padding and search cancel button in Safari 5 and Chrome
+ * on OS X.
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+    -webkit-appearance: none;
+}
+
+/**
+ * Remove inner padding and border in Firefox 4+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+    border: 0;
+    padding: 0;
+}
+
+/**
+ * 1. Remove default vertical scrollbar in IE 8/9.
+ * 2. Improve readability and alignment in all browsers.
+ */
+
+textarea {
+    overflow: auto; /* 1 */
+    vertical-align: top; /* 2 */
+}
+
+/* ==========================================================================
+   Tables
+   ========================================================================== */
+
+/**
+ * Remove most spacing between table cells.
+ */
+
+table {
+    border-collapse: collapse;
+    border-spacing: 0;
+}
diff --git a/www/resources/php-epub-meta/LICENSE_php-epub-meta b/www/resources/php-epub-meta/LICENSE_php-epub-meta
new file mode 100644 (file)
index 0000000..2fcf6f9
--- /dev/null
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Andreas Gohr <andi@splitbrain.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+All code created or modified by Sébastien Lucas <sebastien@slucas.fr> is licensed
+under GPL 2 (http://www.gnu.org/licenses/gpl.html).
\ No newline at end of file
diff --git a/www/resources/php-epub-meta/epub.php b/www/resources/php-epub-meta/epub.php
new file mode 100644 (file)
index 0000000..ac62346
--- /dev/null
@@ -0,0 +1,736 @@
+<?php
+/**
+ * PHP EPub Meta library
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Sébastien Lucas <sebastien@slucas.fr>
+ */
+require_once(realpath( dirname( __FILE__ ) ) . '/tbszip.php');
+
+define ("METADATA_FILE", "META-INF/container.xml");
+class EPub {
+    public $xml; //FIXME change to protected, later
+    public $toc;
+    protected $xpath;
+    protected $toc_xpath;
+    protected $file;
+    protected $meta;
+    protected $zip;
+    protected $coverpath='';
+    protected $namespaces;
+    protected $imagetoadd='';
+
+    /**
+     * Constructor
+     *
+     * @param string $file path to epub file to work on
+     * @throws Exception if metadata could not be loaded
+     */
+    public function __construct($file){
+        // open file
+        $this->file = $file;
+        $this->zip = new clsTbsZip();
+        if(!$this->zip->Open($this->file)){
+            throw new Exception('Failed to read epub file');
+        }
+
+        // read container data
+        if (!$this->zip->FileExists(METADATA_FILE)) {
+            throw new Exception ("Unable to find metadata.xml");
+        }
+        
+        $data = $this->zip->FileRead(METADATA_FILE);
+        if($data == false){
+            throw new Exception('Failed to access epub container data');
+        }
+        $xml = new DOMDocument();
+        $xml->registerNodeClass('DOMElement','EPubDOMElement');
+        $xml->loadXML($data);
+        $xpath = new EPubDOMXPath($xml);
+        $nodes = $xpath->query('//n:rootfiles/n:rootfile[@media-type="application/oebps-package+xml"]');
+        $this->meta = $nodes->item(0)->attr('full-path');
+
+        // load metadata
+        if (!$this->zip->FileExists($this->meta)) {
+            throw new Exception ("Unable to find " . $this->meta);
+        }
+        
+        $data = $this->zip->FileRead($this->meta);
+        if(!$data){
+            throw new Exception('Failed to access epub metadata');
+        }
+        $this->xml =  new DOMDocument();
+        $this->xml->registerNodeClass('DOMElement','EPubDOMElement');
+        $this->xml->loadXML($data);
+        $this->xml->formatOutput = true;
+        $this->xpath = new EPubDOMXPath($this->xml);
+    }
+    
+    public function initSpineComponent ()
+    {
+        $spine = $this->xpath->query('//opf:spine')->item(0);
+        $tocid = $spine->getAttribute('toc');
+        $tochref = $this->xpath->query("//opf:manifest/opf:item[@id='$tocid']")->item(0)->attr('href');
+        $tocpath = dirname($this->meta).'/'.$tochref; 
+        // read epub toc
+        if (!$this->zip->FileExists($tocpath)) {
+            throw new Exception ("Unable to find " . $tocpath);
+        }
+        
+        $data = $this->zip->FileRead($tocpath);
+        $this->toc =  new DOMDocument();
+        $this->toc->registerNodeClass('DOMElement','EPubDOMElement');
+        $this->toc->loadXML($data);
+        $this->toc_xpath = new EPubDOMXPath($this->toc);
+        $rootNamespace = $this->toc->lookupNamespaceUri($this->toc->namespaceURI); 
+        $this->toc_xpath->registerNamespace('x', $rootNamespace);
+    }
+
+    /**
+     * file name getter
+     */
+    public function file(){
+        return $this->file;
+    }
+    
+    /**
+     * Close the epub file
+     */
+    public function close (){
+        $this->zip->FileCancelModif($this->meta);
+        // TODO : Add cancelation of cover image
+        $this->zip->Close ();
+    }
+
+    /**
+     * Remove iTunes files
+     */
+    public function cleanITunesCrap () {
+        if ($this->zip->FileExists("iTunesMetadata.plist")) {
+            $this->zip->FileReplace ("iTunesMetadata.plist", false);
+        }
+        if ($this->zip->FileExists("iTunesArtwork")) {
+            $this->zip->FileReplace ("iTunesArtwork", false);
+        }
+    }
+
+    /**
+     * Writes back all meta data changes
+     */
+    public function save(){
+        $this->download ();
+        $this->zip->close();
+    }
+    
+    /**
+     * Get the updated epub
+     */
+    public function download($file=false){
+        $this->zip->FileReplace($this->meta,$this->xml->saveXML());
+        // add the cover image
+        if($this->imagetoadd){
+            $this->zip->FileReplace($this->coverpath,file_get_contents($this->imagetoadd));
+            $this->imagetoadd='';
+        }
+        if ($file) $this->zip->Flush(TBSZIP_DOWNLOAD, $file);
+    }
+
+    /**
+     * Get the components list as an array
+     */
+    public function components(){
+        $spine = array();
+        $nodes = $this->xpath->query('//opf:spine/opf:itemref');
+        foreach($nodes as $node){
+            $idref =  $node->getAttribute('idref');
+            $spine[] = $this->xpath->query("//opf:manifest/opf:item[@id='$idref']")->item(0)->getAttribute('href');
+        }
+        return $spine;
+    }
+    
+    /**
+     * Get the component content
+     */
+    public function component($comp) {
+        $path = dirname($this->meta).'/'.$comp;
+        if (!$this->zip->FileExists($path)) {
+            throw new Exception ("Unable to find " . $path);
+        }
+        
+        $data = $this->zip->FileRead($path);
+        $data = preg_replace ("/src=[\"']([\w\/\.]*?)[\"']/", "src='epubfs.php?comp=$1'", $data);
+        $data = preg_replace ("/href=[\"']([\w\/\.]*?)[\"']/", "href='epubfs.php?comp=$1'", $data);
+        return $data;
+    }
+    
+    /**
+     * Get the component content type
+     */
+    public function componentContentType($comp) {
+        return $this->xpath->query("//opf:manifest/opf:item[@href='$comp']")->item(0)->getAttribute('media-type');
+    }
+
+    /**
+     * Get the Epub content (TOC) as an array
+     *
+     * For each chapter there is a "title" and a "src"
+     */
+    public function contents(){
+        $contents = array();
+        $nodes = $this->toc_xpath->query('//x:ncx/x:navMap/x:navPoint');
+        foreach($nodes as $node){
+            $title = $this->toc_xpath->query('x:navLabel/x:text', $node)->item(0)->nodeValue;
+            $src = $this->toc_xpath->query('x:content', $node)->item(0)->attr('src');
+            $contents[] =  array("title" => $title, "src" => $src);
+        }
+        return $contents;
+    }
+    
+
+    /**
+     * Get or set the book author(s)
+     *
+     * Authors should be given with a "file-as" and a real name. The file as
+     * is used for sorting in e-readers.
+     *
+     * Example:
+     *
+     * array(
+     *      'Pratchett, Terry'   => 'Terry Pratchett',
+     *      'Simpson, Jacqeline' => 'Jacqueline Simpson',
+     * )
+     *
+     * @params array $authors
+     */
+    public function Authors($authors=false){
+        // set new data
+        if($authors !== false){
+            // Author where given as a comma separated list
+            if(is_string($authors)){
+                if($authors == ''){
+                    $authors = array();
+                }else{
+                    $authors = explode(',',$authors);
+                    $authors = array_map('trim',$authors);
+                }
+            }
+
+            // delete existing nodes
+            $nodes = $this->xpath->query('//opf:metadata/dc:creator[@opf:role="aut"]');
+            foreach($nodes as $node) $node->delete();
+
+            // add new nodes
+            $parent = $this->xpath->query('//opf:metadata')->item(0);
+            foreach($authors as $as => $name){
+                if(is_int($as)) $as = $name; //numeric array given
+                $node = $parent->newChild('dc:creator',$name);
+                $node->attr('opf:role', 'aut');
+                $node->attr('opf:file-as', $as);
+            }
+
+            $this->reparse();
+        }
+
+        // read current data
+        $rolefix = false;
+        $authors = array();
+        $nodes = $this->xpath->query('//opf:metadata/dc:creator[@opf:role="aut"]');
+        if($nodes->length == 0){
+            // no nodes where found, let's try again without role
+            $nodes = $this->xpath->query('//opf:metadata/dc:creator');
+            $rolefix = true;
+        }
+        foreach($nodes as $node){
+            $name = $node->nodeValue;
+            $as   = $node->attr('opf:file-as');
+            if(!$as){
+                $as = $name;
+                $node->attr('opf:file-as',$as);
+            }
+            if($rolefix){
+                $node->attr('opf:role','aut');
+            }
+            $authors[$as] = $name;
+        }
+        return $authors;
+    }
+
+    /**
+     * Set or get the book title
+     *
+     * @param string $title
+     */
+    public function Title($title=false){
+        return $this->getset('dc:title',$title);
+    }
+
+    /**
+     * Set or get the book's language
+     *
+     * @param string $lang
+     */
+    public function Language($lang=false){
+        return $this->getset('dc:language',$lang);
+    }
+
+    /**
+     * Set or get the book' publisher info
+     *
+     * @param string $publisher
+     */
+    public function Publisher($publisher=false){
+        return $this->getset('dc:publisher',$publisher);
+    }
+
+    /**
+     * Set or get the book's copyright info
+     *
+     * @param string $rights
+     */
+    public function Copyright($rights=false){
+        return $this->getset('dc:rights',$rights);
+    }
+
+    /**
+     * Set or get the book's description
+     *
+     * @param string $description
+     */
+    public function Description($description=false){
+        return $this->getset('dc:description',$description);
+    }
+
+    /**
+     * Set or get the book's ISBN number
+     *
+     * @param string $isbn
+     */
+    public function ISBN($isbn=false){
+        return $this->getset('dc:identifier',$isbn,'opf:scheme','ISBN');
+    }
+
+    /**
+     * Set or get the Google Books ID
+     *
+     * @param string $google
+     */
+    public function Google($google=false){
+        return $this->getset('dc:identifier',$google,'opf:scheme','GOOGLE');
+    }
+
+    /**
+     * Set or get the Amazon ID of the book
+     *
+     * @param string $amazon
+     */
+    public function Amazon($amazon=false){
+        return $this->getset('dc:identifier',$amazon,'opf:scheme','AMAZON');
+    }
+    
+    /**
+     * Set or get the Calibre UUID of the book
+     *
+     * @param string $uuid
+     */
+    public function Calibre($uuid=false){
+        return $this->getset('dc:identifier',$uuid,'opf:scheme','calibre');
+    }
+
+    /**
+     * Set or get the Serie of the book
+     *
+     * @param string $serie
+     */
+    public function Serie($serie=false){
+        return $this->getset('opf:meta',$serie,'name','calibre:series','content');
+    }
+    
+    /**
+     * Set or get the Serie Index of the book
+     *
+     * @param string $serieIndex
+     */
+    public function SerieIndex($serieIndex=false){
+        return $this->getset('opf:meta',$serieIndex,'name','calibre:series_index','content');
+    }
+    
+    /**
+     * Set or get the book's subjects (aka. tags)
+     *
+     * Subject should be given as array, but a comma separated string will also
+     * be accepted.
+     *
+     * @param array $subjects
+     */
+    public function Subjects($subjects=false){
+        // setter
+        if($subjects !== false){
+            if(is_string($subjects)){
+                if($subjects === ''){
+                    $subjects = array();
+                }else{
+                    $subjects = explode(',',$subjects);
+                    $subjects = array_map('trim',$subjects);
+                }
+            }
+
+            // delete previous
+            $nodes = $this->xpath->query('//opf:metadata/dc:subject');
+            foreach($nodes as $node){
+                $node->delete();
+            }
+            // add new ones
+            $parent = $this->xpath->query('//opf:metadata')->item(0);
+            foreach($subjects as $subj){
+                $node = $this->xml->createElement('dc:subject',htmlspecialchars($subj));
+                $node = $parent->appendChild($node);
+            }
+
+            $this->reparse();
+        }
+
+        //getter
+        $subjects = array();
+        $nodes = $this->xpath->query('//opf:metadata/dc:subject');
+        foreach($nodes as $node){
+            $subjects[] =  $node->nodeValue;
+        }
+        return $subjects;
+    }
+
+    /**
+     * Read the cover data
+     *
+     * Returns an associative array with the following keys:
+     *
+     *   mime  - filetype (usually image/jpeg)
+     *   data  - the binary image data
+     *   found - the internal path, or false if no image is set in epub
+     *
+     * When no image is set in the epub file, the binary data for a transparent
+     * GIF pixel is returned.
+     *
+     * When adding a new image this function return no or old data because the
+     * image contents are not in the epub file, yet. The image will be added when
+     * the save() method is called.
+     *
+     * @param  string $path local filesystem path to a new cover image
+     * @param  string $mime mime type of the given file
+     * @return array
+     */
+    public function Cover($path=false, $mime=false){
+        // set cover
+        if($path !== false){
+            // remove current pointer
+            $nodes = $this->xpath->query('//opf:metadata/opf:meta[@name="cover"]');
+            foreach($nodes as $node) $node->delete();
+            // remove previous manifest entries if they where made by us
+            $nodes = $this->xpath->query('//opf:manifest/opf:item[@id="php-epub-meta-cover"]');
+            foreach($nodes as $node) $node->delete();
+
+            if($path){
+                // add pointer
+                $parent = $this->xpath->query('//opf:metadata')->item(0);
+                $node = $parent->newChild('opf:meta');
+                $node->attr('opf:name','cover');
+                $node->attr('opf:content','php-epub-meta-cover');
+
+                // add manifest
+                $parent = $this->xpath->query('//opf:manifest')->item(0);
+                $node = $parent->newChild('opf:item');
+                $node->attr('id','php-epub-meta-cover');
+                $node->attr('opf:href','php-epub-meta-cover.img');
+                $node->attr('opf:media-type',$mime);
+
+                // remember path for save action
+                $this->imagetoadd = $path;
+            }
+
+            $this->reparse();
+        }
+
+        // load cover
+        $nodes = $this->xpath->query('//opf:metadata/opf:meta[@name="cover"]');
+        if(!$nodes->length) return $this->no_cover();
+        $coverid = (String) $nodes->item(0)->attr('opf:content');
+        if(!$coverid) return $this->no_cover();
+
+        $nodes = $this->xpath->query('//opf:manifest/opf:item[@id="'.$coverid.'"]');
+        if(!$nodes->length) return $this->no_cover();
+        $mime = $nodes->item(0)->attr('opf:media-type');
+        $path = $nodes->item(0)->attr('opf:href');
+        $path = dirname('/'.$this->meta).'/'.$path; // image path is relative to meta file
+        $path = ltrim($path,'/');
+
+        $zip = new ZipArchive();
+        if(!@$zip->open($this->file)){
+            throw new Exception('Failed to read epub file');
+        }
+        $data = $zip->getFromName($path);
+
+        return array(
+            'mime'  => $mime,
+            'data'  => $data,
+            'found' => $path
+        );
+    }
+    
+    public function getCoverItem () {
+        $nodes = $this->xpath->query('//opf:metadata/opf:meta[@name="cover"]');
+        if(!$nodes->length) return NULL;
+        
+        $coverid = (String) $nodes->item(0)->attr('opf:content');
+        if(!$coverid) return NULL;
+
+        $nodes = $this->xpath->query('//opf:manifest/opf:item[@id="'.$coverid.'"]');
+        if(!$nodes->length) return NULL;
+
+        return $nodes->item(0);
+    }
+    
+    public function updateForKepub () {
+        $item = $this->getCoverItem ();
+        if (!is_null ($item)) {
+            $item->attr('opf:properties', 'cover-image');
+        }
+    }
+    
+    public function Cover2($path=false, $mime=false){
+        $hascover = true;
+        $item = $this->getCoverItem ();
+        if (is_null ($item)) {
+            $hascover = false;
+        } else {
+            $mime = $item->attr('opf:media-type');
+            $this->coverpath = $item->attr('opf:href');
+            $this->coverpath = dirname('/'.$this->meta).'/'.$this->coverpath; // image path is relative to meta file
+            $this->coverpath = ltrim($this->coverpath,'\\');
+            $this->coverpath = ltrim($this->coverpath,'/');
+        }
+        
+        // set cover
+        if($path !== false){
+            if (!$hascover) return; // TODO For now only update
+
+            if($path){
+                $item->attr('opf:media-type',$mime);
+
+                // remember path for save action
+                $this->imagetoadd = $path;
+            }
+
+            $this->reparse();
+        }
+        
+        if (!$hascover) return $this->no_cover();
+    }
+
+    /**
+     * A simple getter/setter for simple meta attributes
+     *
+     * It should only be used for attributes that are expected to be unique
+     *
+     * @param string $item   XML node to set/get
+     * @param string $value  New node value
+     * @param string $att    Attribute name
+     * @param string $aval   Attribute value
+     * @param string $datt   Destination attribute
+     */
+    protected function getset($item,$value=false,$att=false,$aval=false,$datt=false){
+        // construct xpath
+        $xpath = '//opf:metadata/'.$item;
+        if($att){
+            $xpath .= "[@$att=\"$aval\"]";
+        }
+
+        // set value
+        if($value !== false){
+            $value = htmlspecialchars($value);
+            $nodes = $this->xpath->query($xpath);
+            if($nodes->length == 1 ){
+                if($value === ''){
+                    // the user want's to empty this value -> delete the node
+                    $nodes->item(0)->delete();
+                }else{
+                    // replace value
+                    if ($datt){
+                        $nodes->item(0)->attr ($datt, $value);
+                    }else{
+                        $nodes->item(0)->nodeValue = $value;
+                    }
+                }
+            }else{
+                // if there are multiple matching nodes for some reason delete
+                // them. we'll replace them all with our own single one
+                foreach($nodes as $n) $n->delete();
+                // readd them
+                if($value){
+                    $parent = $this->xpath->query('//opf:metadata')->item(0);
+
+                    $node = $parent->newChild ($item);
+                    if($att) $node->attr($att,$aval);
+                    if ($datt){
+                        $node->attr ($datt, $value);
+                    }else{
+                        $node->nodeValue = $value;
+                    }
+                }
+            }
+
+            $this->reparse();
+        }
+
+        // get value
+        $nodes = $this->xpath->query($xpath);
+        if($nodes->length){
+            if ($datt){
+                return $nodes->item(0)->attr ($datt);
+            }else{
+                return $nodes->item(0)->nodeValue;
+            }
+        }else{
+            return '';
+        }
+    }
+
+    /**
+     * Return a not found response for Cover()
+     */
+    protected function no_cover(){
+        return array(
+            'data'  => base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAEALAAAAAABAAEAAAIBTAA7'),
+            'mime'  => 'image/gif',
+            'found' => false
+        );
+    }
+
+    /**
+     * Reparse the DOM tree
+     *
+     * I had to rely on this because otherwise xpath failed to find the newly
+     * added nodes
+     */
+    protected function reparse() {
+        $this->xml->loadXML($this->xml->saveXML());
+        $this->xpath = new EPubDOMXPath($this->xml);
+    }
+}
+
+class EPubDOMXPath extends DOMXPath {
+    public function __construct(DOMDocument $doc){
+        parent::__construct($doc);
+
+        if(is_a($doc->documentElement, 'EPubDOMElement')){
+            foreach($doc->documentElement->namespaces as $ns => $url){
+                $this->registerNamespace($ns,$url);
+            }
+        }
+    }
+}
+
+class EPubDOMElement extends DOMElement {
+    public $namespaces = array(
+        'n'   => 'urn:oasis:names:tc:opendocument:xmlns:container',
+        'opf' => 'http://www.idpf.org/2007/opf',
+        'dc'  => 'http://purl.org/dc/elements/1.1/'
+    );
+
+
+    public function __construct($name, $value='', $namespaceURI=''){
+        list($ns,$name) = $this->splitns($name);
+        $value = htmlspecialchars($value);
+        if(!$namespaceURI && $ns){
+            $namespaceURI = $this->namespaces[$ns];
+        }
+        parent::__construct($name, $value, $namespaceURI);
+    }
+
+
+    /**
+     * Create and append a new child
+     *
+     * Works with our epub namespaces and omits default namespaces
+     */
+    public function newChild($name, $value=''){
+        list($ns,$local) = $this->splitns($name);
+        if($ns){
+            $nsuri = $this->namespaces[$ns];
+            if($this->isDefaultNamespace($nsuri)){
+                $name  = $local;
+                $nsuri = '';
+            }
+        }
+
+        // this doesn't call the construcor: $node = $this->ownerDocument->createElement($name,$value);
+        $node = new EPubDOMElement($name,$value,$nsuri);
+        return $this->appendChild($node);
+    }
+
+    /**
+     * Split given name in namespace prefix and local part
+     *
+     * @param  string $name
+     * @return array  (namespace, name)
+     */
+    public function splitns($name){
+        $list = explode(':',$name,2);
+        if(count($list) < 2) array_unshift($list,'');
+        return $list;
+    }
+
+    /**
+     * Simple EPub namespace aware attribute accessor
+     */
+    public function attr($attr,$value=null){
+        list($ns,$attr) = $this->splitns($attr);
+
+        $nsuri = '';
+        if($ns){
+            $nsuri = $this->namespaces[$ns];
+            if(!$this->namespaceURI){
+                if($this->isDefaultNamespace($nsuri)){
+                    $nsuri = '';
+                }
+            }elseif($this->namespaceURI == $nsuri){
+                 $nsuri = '';
+            }
+        }
+
+        if(!is_null($value)){
+            if($value === false){
+                // delete if false was given
+                if($nsuri){
+                    $this->removeAttributeNS($nsuri,$attr);
+                }else{
+                    $this->removeAttribute($attr);
+                }
+            }else{
+                // modify if value was given
+                if($nsuri){
+                    $this->setAttributeNS($nsuri,$attr,$value);
+                }else{
+                    $this->setAttribute($attr,$value);
+                }
+            }
+        }else{
+            // return value if none was given
+            if($nsuri){
+                return $this->getAttributeNS($nsuri,$attr);
+            }else{
+                return $this->getAttribute($attr);
+            }
+        }
+    }
+
+    /**
+     * Remove this node from the DOM
+     */
+    public function delete(){
+        $this->parentNode->removeChild($this);
+    }
+
+}
+
+
diff --git a/www/resources/php-epub-meta/tbszip.php b/www/resources/php-epub-meta/tbszip.php
new file mode 100644 (file)
index 0000000..fbbb8cb
--- /dev/null
@@ -0,0 +1,924 @@
+<?php
+
+/*
+TbsZip version 2.12
+Date    : 2013-03-16
+Author  : Skrol29 (email: http://www.tinybutstrong.com/onlyyou.html)
+Licence : LGPL
+This class is independent from any other classes and has been originally created for the OpenTbs plug-in
+for TinyButStrong Template Engine (TBS). OpenTbs makes TBS able to merge OpenOffice and Ms Office documents.
+Visit http://www.tinybutstrong.com
+*/
+
+define('TBSZIP_DOWNLOAD',1);   // download (default)
+define('TBSZIP_NOHEADER',4);   // option to use with DOWNLOAD: no header is sent
+define('TBSZIP_FILE',8);       // output to file  , or add from file
+define('TBSZIP_STRING',32);    // output to string, or add from string
+
+class clsTbsZip {
+
+       function __construct() {
+               $this->Meth8Ok = extension_loaded('zlib'); // check if Zlib extension is available. This is need for compress and uncompress with method 8.
+               $this->DisplayError = true;
+               $this->ArchFile = '';
+               $this->Error = false;
+       }
+
+       function CreateNew($ArchName='new.zip') {
+       // Create a new virtual empty archive, the name will be the default name when the archive is flushed.
+               if (!isset($this->Meth8Ok)) $this->__construct();  // for PHP 4 compatibility
+               $this->Close(); // note that $this->ArchHnd is set to false here
+               $this->Error = false;
+               $this->ArchFile = $ArchName;
+               $this->ArchIsNew = true;
+               $bin = 'PK'.chr(05).chr(06).str_repeat(chr(0), 18);
+               $this->CdEndPos = strlen($bin) - 4;
+               $this->CdInfo = array('disk_num_curr'=>0, 'disk_num_cd'=>0, 'file_nbr_curr'=>0, 'file_nbr_tot'=>0, 'l_cd'=>0, 'p_cd'=>0, 'l_comm'=>0, 'v_comm'=>'', 'bin'=>$bin);
+               $this->CdPos = $this->CdInfo['p_cd'];
+       }
+
+       function Open($ArchFile, $UseIncludePath=false) {
+       // Open the zip archive
+               if (!isset($this->Meth8Ok)) $this->__construct();  // for PHP 4 compatibility
+               $this->Close(); // close handle and init info
+               $this->Error = false;
+               $this->ArchFile = $ArchFile;
+               $this->ArchIsNew = false;
+               // open the file
+               $this->ArchHnd = fopen($ArchFile, 'rb', $UseIncludePath);
+               $ok = !($this->ArchHnd===false);
+               if ($ok) $ok = $this->CentralDirRead();
+               return $ok;
+       }
+
+       function Close() {
+               if (isset($this->ArchHnd) and ($this->ArchHnd!==false)) fclose($this->ArchHnd);
+               $this->ArchFile = '';
+               $this->ArchHnd = false;
+               $this->CdInfo = array();
+               $this->CdFileLst = array();
+               $this->CdFileNbr = 0;
+               $this->CdFileByName = array();
+               $this->VisFileLst = array();
+               $this->ArchCancelModif();
+       }
+
+       function ArchCancelModif() {
+               $this->LastReadComp = false; // compression of the last read file (1=compressed, 0=stored not compressed, -1= stored compressed but read uncompressed)
+               $this->LastReadIdx = false;  // index of the last file read
+               $this->ReplInfo = array();
+               $this->ReplByPos = array();
+               $this->AddInfo = array();
+       }
+
+       function FileAdd($Name, $Data, $DataType=TBSZIP_STRING, $Compress=true) {
+
+               if ($Data===false) return $this->FileCancelModif($Name, false); // Cancel a previously added file
+
+               // Save information for adding a new file into the archive
+               $Diff = 30 + 46 + 2*strlen($Name); // size of the header + cd info
+               $Ref = $this->_DataCreateNewRef($Data, $DataType, $Compress, $Diff, $Name);
+               if ($Ref===false) return false;
+               $Ref['name'] = $Name;
+               $this->AddInfo[] = $Ref;
+               return $Ref['res'];
+
+       }
+
+       function CentralDirRead() {
+               $cd_info = 'PK'.chr(05).chr(06); // signature of the Central Directory
+               $cd_pos = -22;
+               $this->_MoveTo($cd_pos, SEEK_END);
+               $b = $this->_ReadData(4);
+               if ($b!==$cd_info) return $this->RaiseError('The End of Central Rirectory Record is not found.');
+
+               $this->CdEndPos = ftell($this->ArchHnd) - 4;
+               $this->CdInfo = $this->CentralDirRead_End($cd_info);
+               $this->CdFileLst = array();
+               $this->CdFileNbr = $this->CdInfo['file_nbr_curr'];
+               $this->CdPos = $this->CdInfo['p_cd'];
+
+               if ($this->CdFileNbr<=0) return $this->RaiseError('No header found in the Central Directory.');
+               if ($this->CdPos<=0) return $this->RaiseError('No position found for the Central Directory.');
+
+               $this->_MoveTo($this->CdPos);
+               for ($i=0;$i<$this->CdFileNbr;$i++) {
+                       $x = $this->CentralDirRead_File($i);
+                       if ($x!==false) {
+                               $this->CdFileLst[$i] = $x;
+                               $this->CdFileByName[$x['v_name']] = $i;
+                       }
+               }
+               return true;
+       }
+
+       function CentralDirRead_End($cd_info) {
+               $b = $cd_info.$this->_ReadData(18);
+               $x = array();
+               $x['disk_num_curr'] = $this->_GetDec($b,4,2);  // number of this disk
+               $x['disk_num_cd'] = $this->_GetDec($b,6,2);    // number of the disk with the start of the central directory
+               $x['file_nbr_curr'] = $this->_GetDec($b,8,2);  // total number of entries in the central directory on this disk
+               $x['file_nbr_tot'] = $this->_GetDec($b,10,2);  // total number of entries in the central directory
+               $x['l_cd'] = $this->_GetDec($b,12,4);          // size of the central directory
+               $x['p_cd'] = $this->_GetDec($b,16,4);          // position of start of central directory with respect to the starting disk number
+               $x['l_comm'] = $this->_GetDec($b,20,2);        // .ZIP file comment length
+               $x['v_comm'] = $this->_ReadData($x['l_comm']); // .ZIP file comment
+               $x['bin'] = $b.$x['v_comm'];
+               return $x;
+       }
+
+       function CentralDirRead_File($idx) {
+
+               $b = $this->_ReadData(46);
+
+               $x = $this->_GetHex($b,0,4);
+               if ($x!=='h:02014b50') return $this->RaiseError("Signature of Central Directory Header #".$idx." (file information) expected but not found at position ".$this->_TxtPos(ftell($this->ArchHnd) - 46).".");
+
+               $x = array();
+               $x['vers_used'] = $this->_GetDec($b,4,2);
+               $x['vers_necess'] = $this->_GetDec($b,6,2);
+               $x['purp'] = $this->_GetBin($b,8,2);
+               $x['meth'] = $this->_GetDec($b,10,2);
+               $x['time'] = $this->_GetDec($b,12,2);
+               $x['date'] = $this->_GetDec($b,14,2);
+               $x['crc32'] = $this->_GetDec($b,16,4);
+               $x['l_data_c'] = $this->_GetDec($b,20,4);
+               $x['l_data_u'] = $this->_GetDec($b,24,4);
+               $x['l_name'] = $this->_GetDec($b,28,2);
+               $x['l_fields'] = $this->_GetDec($b,30,2);
+               $x['l_comm'] = $this->_GetDec($b,32,2);
+               $x['disk_num'] = $this->_GetDec($b,34,2);
+               $x['int_file_att'] = $this->_GetDec($b,36,2);
+               $x['ext_file_att'] = $this->_GetDec($b,38,4);
+               $x['p_loc'] = $this->_GetDec($b,42,4);
+               $x['v_name'] = $this->_ReadData($x['l_name']);
+               $x['v_fields'] = $this->_ReadData($x['l_fields']);
+               $x['v_comm'] = $this->_ReadData($x['l_comm']);
+
+               $x['bin'] = $b.$x['v_name'].$x['v_fields'].$x['v_comm'];
+
+               return $x;
+       }
+
+       function RaiseError($Msg) {
+               if ($this->DisplayError) echo '<strong>'.get_class($this).' ERROR :</strong> '.$Msg.'<br>'."\r\n";
+               $this->Error = $Msg;
+               return false;
+       }
+
+       function Debug($FileHeaders=false) {
+
+               $this->DisplayError = true;
+
+               if ($FileHeaders) {
+                       // Calculations first in order to have error messages before other information
+                       $idx = 0;
+                       $pos = 0;
+                       $pos_stop = $this->CdInfo['p_cd'];
+                       $this->_MoveTo($pos);
+                       while ( ($pos<$pos_stop) && ($ok = $this->_ReadFile($idx,false)) ) {
+                               $this->VisFileLst[$idx]['p_this_header (debug_mode only)'] = $pos;
+                               $pos = ftell($this->ArchHnd);
+                               $idx++;
+                       }
+               }
+               
+               $nl = "\r\n";
+               echo "<pre>";
+               
+               echo "-------------------------------".$nl;
+               echo "End of Central Directory record".$nl;
+               echo "-------------------------------".$nl;
+               print_r($this->DebugArray($this->CdInfo));
+
+               echo $nl;
+               echo "-------------------------".$nl;
+               echo "Central Directory headers".$nl;
+               echo "-------------------------".$nl;
+               print_r($this->DebugArray($this->CdFileLst));
+
+               if ($FileHeaders) {
+                       echo $nl;
+                       echo "------------------".$nl;
+                       echo "Local File headers".$nl;
+                       echo "------------------".$nl;
+                       print_r($this->DebugArray($this->VisFileLst));
+               }
+
+               echo "</pre>";
+               
+       }
+
+       function DebugArray($arr) {
+               foreach ($arr as $k=>$v) {
+                       if (is_array($v)) {
+                               $arr[$k] = $this->DebugArray($v);
+                       } elseif (substr($k,0,2)=='p_') {
+                               $arr[$k] = $this->_TxtPos($v);
+                       }
+               }
+               return $arr;
+       }
+       
+       function FileExists($NameOrIdx) {
+               return ($this->FileGetIdx($NameOrIdx)!==false);
+       }
+
+       function FileGetIdx($NameOrIdx) {
+       // Check if a file name, or a file index exists in the Central Directory, and return its index
+               if (is_string($NameOrIdx)) {
+                       if (isset($this->CdFileByName[$NameOrIdx])) {
+                               return $this->CdFileByName[$NameOrIdx];
+                       } else {
+                               return false;
+                       }
+               } else {
+                       if (isset($this->CdFileLst[$NameOrIdx])) {
+                               return $NameOrIdx;
+                       } else {
+                               return false;
+                       }
+               }
+       }
+
+       function FileGetIdxAdd($Name) {
+       // Check if a file name exists in the list of file to add, and return its index
+               if (!is_string($Name)) return false;
+               $idx_lst = array_keys($this->AddInfo);
+               foreach ($idx_lst as $idx) {
+                       if ($this->AddInfo[$idx]['name']===$Name) return $idx;
+               }
+               return false;
+       }
+
+       function FileRead($NameOrIdx, $Uncompress=true) {
+
+               $this->LastReadComp = false; // means the file is not found
+               $this->LastReadIdx = false;
+
+               $idx = $this->FileGetIdx($NameOrIdx);
+               if ($idx===false) return $this->RaiseError('File "'.$NameOrIdx.'" is not found in the Central Directory.');
+
+               $pos = $this->CdFileLst[$idx]['p_loc'];
+               $this->_MoveTo($pos);
+
+               $this->LastReadIdx = $idx; // Can be usefull to get the idx
+
+               $Data = $this->_ReadFile($idx, true);
+
+               // Manage uncompression
+               $Comp = 1; // means the contents stays compressed
+               $meth = $this->CdFileLst[$idx]['meth'];
+               if ($meth==8) {
+                       if ($Uncompress) {
+                               if ($this->Meth8Ok) {
+                                       $Data = gzinflate($Data);
+                                       $Comp = -1; // means uncompressed
+                               } else {
+                                       $this->RaiseError('Unable to uncompress file "'.$NameOrIdx.'" because extension Zlib is not installed.');
+                               }
+                       }
+               } elseif($meth==0) {
+                       $Comp = 0; // means stored without compression
+               } else {
+                       if ($Uncompress) $this->RaiseError('Unable to uncompress file "'.$NameOrIdx.'" because it is compressed with method '.$meth.'.');
+               }
+               $this->LastReadComp = $Comp;
+
+               return $Data;
+
+       }
+
+       function _ReadFile($idx, $ReadData) {
+       // read the file header (and maybe the data ) in the archive, assuming the cursor in at a new file position
+
+               $b = $this->_ReadData(30);
+               
+               $x = $this->_GetHex($b,0,4);
+               if ($x!=='h:04034b50') return $this->RaiseError("Signature of Local File Header #".$idx." (data section) expected but not found at position ".$this->_TxtPos(ftell($this->ArchHnd)-30).".");
+
+               $x = array();
+               $x['vers'] = $this->_GetDec($b,4,2);
+               $x['purp'] = $this->_GetBin($b,6,2);
+               $x['meth'] = $this->_GetDec($b,8,2);
+               $x['time'] = $this->_GetDec($b,10,2);
+               $x['date'] = $this->_GetDec($b,12,2);
+               $x['crc32'] = $this->_GetDec($b,14,4);
+               $x['l_data_c'] = $this->_GetDec($b,18,4);
+               $x['l_data_u'] = $this->_GetDec($b,22,4);
+               $x['l_name'] = $this->_GetDec($b,26,2);
+               $x['l_fields'] = $this->_GetDec($b,28,2);
+               $x['v_name'] = $this->_ReadData($x['l_name']);
+               $x['v_fields'] = $this->_ReadData($x['l_fields']);
+
+               $x['bin'] = $b.$x['v_name'].$x['v_fields'];
+
+               // Read Data
+               if (isset($this->CdFileLst[$idx])) {
+                       $len_cd = $this->CdFileLst[$idx]['l_data_c'];
+                       if ($x['l_data_c']==0) {
+                               // Sometimes, the size is not specified in the local information.
+                               $len = $len_cd;
+                       } else {
+                               $len = $x['l_data_c'];
+                               if ($len!=$len_cd) {
+                                       //echo "TbsZip Warning: Local information for file #".$idx." says len=".$len.", while Central Directory says len=".$len_cd.".";
+                               }
+                       }
+               } else {
+                       $len = $x['l_data_c'];
+                       if ($len==0) $this->RaiseError("File Data #".$idx." cannt be read because no length is specified in the Local File Header and its Central Directory information has not been found.");
+               }
+
+               if ($ReadData) {
+                       $Data = $this->_ReadData($len);
+               } else {
+                       $this->_MoveTo($len, SEEK_CUR);
+               }
+               
+               // Description information
+               $desc_ok = ($x['purp'][2+3]=='1');
+               if ($desc_ok) {
+                       $b = $this->_ReadData(12);
+                       $s = $this->_GetHex($b,0,4);
+                       $d = 0;
+                       // the specification says the signature may or may not be present
+                       if ($s=='h:08074b50') {
+                               $b .= $this->_ReadData(4); 
+                               $d = 4;
+                               $x['desc_bin'] = $b;
+                               $x['desc_sign'] = $s;
+                       } else {
+                               $x['desc_bin'] = $b;
+                       }
+                       $x['desc_crc32']    = $this->_GetDec($b,0+$d,4);
+                       $x['desc_l_data_c'] = $this->_GetDec($b,4+$d,4);
+                       $x['desc_l_data_u'] = $this->_GetDec($b,8+$d,4);
+               }
+
+               // Save file info without the data
+               $this->VisFileLst[$idx] = $x;
+
+               // Return the info
+               if ($ReadData) {
+                       return $Data;
+               } else {
+                       return true;
+               }
+
+       }
+
+       function FileReplace($NameOrIdx, $Data, $DataType=TBSZIP_STRING, $Compress=true) {
+       // Store replacement information.
+
+               $idx = $this->FileGetIdx($NameOrIdx);
+               if ($idx===false) return $this->RaiseError('File "'.$NameOrIdx.'" is not found in the Central Directory.');
+
+               $pos = $this->CdFileLst[$idx]['p_loc'];
+
+               if ($Data===false) {
+                       // file to delete
+                       $this->ReplInfo[$idx] = false;
+                       $Result = true;
+               } else {
+                       // file to replace
+                       $Diff = - $this->CdFileLst[$idx]['l_data_c'];
+                       $Ref = $this->_DataCreateNewRef($Data, $DataType, $Compress, $Diff, $NameOrIdx);
+                       if ($Ref===false) return false;
+                       $this->ReplInfo[$idx] = $Ref;
+                       $Result = $Ref['res'];
+               }
+
+               $this->ReplByPos[$pos] = $idx;
+
+               return $Result;
+
+       }
+
+       function FileCancelModif($NameOrIdx, $ReplacedAndDeleted=true) {
+       // cancel added, modified or deleted modifications on a file in the archive
+       // return the number of cancels
+
+               $nbr = 0;
+
+               if ($ReplacedAndDeleted) {
+                       // replaced or deleted files
+                       $idx = $this->FileGetIdx($NameOrIdx);
+                       if ($idx!==false) {
+                               if (isset($this->ReplInfo[$idx])) {
+                                       $pos = $this->CdFileLst[$idx]['p_loc'];
+                                       unset($this->ReplByPos[$pos]);
+                                       unset($this->ReplInfo[$idx]);
+                                       $nbr++;
+                               }
+                       }
+               }
+
+               // added files
+               $idx = $this->FileGetIdxAdd($NameOrIdx);
+               if ($idx!==false) {
+                       unset($this->AddInfo[$idx]);
+                       $nbr++;
+               }
+
+               return $nbr;
+
+       }
+
+       function Flush($Render=TBSZIP_DOWNLOAD, $File='', $ContentType='') {
+
+               if ( ($File!=='') && ($this->ArchFile===$File)) {
+                       $this->RaiseError('Method Flush() cannot overwrite the current opened archive: \''.$File.'\''); // this makes corrupted zip archives without PHP error.
+                       return false;
+               }
+
+               $ArchPos = 0;
+               $Delta = 0;
+               $FicNewPos = array();
+               $DelLst = array(); // idx of deleted files
+               $DeltaCdLen = 0; // delta of the CD's size
+
+               $now = time();
+               $date  = $this->_MsDos_Date($now);
+               $time  = $this->_MsDos_Time($now);
+
+               if (!$this->OutputOpen($Render, $File, $ContentType)) return false;
+
+               // output modified zipped files and unmodified zipped files that are beetween them
+               ksort($this->ReplByPos);
+               foreach ($this->ReplByPos as $ReplPos => $ReplIdx) {
+                       // output data from the zip archive which is before the data to replace
+                       $this->OutputFromArch($ArchPos, $ReplPos);
+                       // get current file information
+                       if (!isset($this->VisFileLst[$ReplIdx])) $this->_ReadFile($ReplIdx, false);
+                       $FileInfo =& $this->VisFileLst[$ReplIdx];
+                       $b1 = $FileInfo['bin'];
+                       if (isset($FileInfo['desc_bin'])) {
+                               $b2 = $FileInfo['desc_bin'];
+                       } else {
+                               $b2 = '';
+                       }
+                       $info_old_len = strlen($b1) + $this->CdFileLst[$ReplIdx]['l_data_c'] + strlen($b2); // $FileInfo['l_data_c'] may have a 0 value in some archives
+                       // get replacement information
+                       $ReplInfo =& $this->ReplInfo[$ReplIdx];
+                       if ($ReplInfo===false) {
+                               // The file is to be deleted
+                               $Delta = $Delta - $info_old_len; // headers and footers are also deleted
+                               $DelLst[$ReplIdx] = true;
+                       } else {
+                               // prepare the header of the current file
+                               $this->_DataPrepare($ReplInfo); // get data from external file if necessary
+                               $this->_PutDec($b1, $time, 10, 2); // time
+                               $this->_PutDec($b1, $date, 12, 2); // date
+                               $this->_PutDec($b1, $ReplInfo['crc32'], 14, 4); // crc32
+                               $this->_PutDec($b1, $ReplInfo['len_c'], 18, 4); // l_data_c
+                               $this->_PutDec($b1, $ReplInfo['len_u'], 22, 4); // l_data_u
+                               if ($ReplInfo['meth']!==false) $this->_PutDec($b1, $ReplInfo['meth'], 8, 2); // meth
+                               // prepare the bottom description if the zipped file, if any
+                               if ($b2!=='') {
+                                       $d = (strlen($b2)==16) ? 4 : 0; // offset because of the signature if any
+                                       $this->_PutDec($b2, $ReplInfo['crc32'], $d+0, 4); // crc32
+                                       $this->_PutDec($b2, $ReplInfo['len_c'], $d+4, 4); // l_data_c
+                                       $this->_PutDec($b2, $ReplInfo['len_u'], $d+8, 4); // l_data_u
+                               }
+                               // output data
+                               $this->OutputFromString($b1.$ReplInfo['data'].$b2);
+                               unset($ReplInfo['data']); // save PHP memory
+                               $Delta = $Delta + $ReplInfo['diff'] + $ReplInfo['len_c'];
+                       }
+                       // Update the delta of positions for zipped files which are physically after the currently replaced one
+                       for ($i=0;$i<$this->CdFileNbr;$i++) {
+                               if ($this->CdFileLst[$i]['p_loc']>$ReplPos) {
+                                       $FicNewPos[$i] = $this->CdFileLst[$i]['p_loc'] + $Delta;
+                               }
+                       }
+                       // Update the current pos in the archive
+                       $ArchPos = $ReplPos + $info_old_len;
+               }
+
+               // Ouput all the zipped files that remain before the Central Directory listing
+               if ($this->ArchHnd!==false) $this->OutputFromArch($ArchPos, $this->CdPos); // ArchHnd is false if CreateNew() has been called
+               $ArchPos = $this->CdPos;
+
+               // Output file to add
+               $AddNbr = count($this->AddInfo);
+               $AddDataLen = 0; // total len of added data (inlcuding file headers)
+               if ($AddNbr>0) {
+                       $AddPos = $ArchPos + $Delta; // position of the start
+                       $AddLst = array_keys($this->AddInfo);
+                       foreach ($AddLst as $idx) {
+                               $n = $this->_DataOuputAddedFile($idx, $AddPos);
+                               $AddPos += $n;
+                               $AddDataLen += $n;
+                       }
+               }
+
+               // Modifiy file information in the Central Directory for replaced files
+               $b2 = '';
+               $old_cd_len = 0;
+               for ($i=0;$i<$this->CdFileNbr;$i++) {
+                       $b1 = $this->CdFileLst[$i]['bin'];
+                       $old_cd_len += strlen($b1);
+                       if (!isset($DelLst[$i])) {
+                               if (isset($FicNewPos[$i])) $this->_PutDec($b1, $FicNewPos[$i], 42, 4);   // p_loc
+                               if (isset($this->ReplInfo[$i])) {
+                                       $ReplInfo =& $this->ReplInfo[$i];
+                                       $this->_PutDec($b1, $time, 12, 2); // time
+                                       $this->_PutDec($b1, $date, 14, 2); // date
+                                       $this->_PutDec($b1, $ReplInfo['crc32'], 16, 4); // crc32
+                                       $this->_PutDec($b1, $ReplInfo['len_c'], 20, 4); // l_data_c
+                                       $this->_PutDec($b1, $ReplInfo['len_u'], 24, 4); // l_data_u
+                                       if ($ReplInfo['meth']!==false) $this->_PutDec($b1, $ReplInfo['meth'], 10, 2); // meth
+                               }
+                               $b2 .= $b1;
+                       }
+               }
+               $this->OutputFromString($b2);
+               $ArchPos += $old_cd_len;
+               $DeltaCdLen =  $DeltaCdLen + strlen($b2) - $old_cd_len;
+               // Output until "end of central directory record"
+               if ($this->ArchHnd!==false) $this->OutputFromArch($ArchPos, $this->CdEndPos); // ArchHnd is false if CreateNew() has been called
+
+               // Output file information of the Central Directory for added files
+               if ($AddNbr>0) {
+                       $b2 = '';
+                       foreach ($AddLst as $idx) {
+                               $b2 .= $this->AddInfo[$idx]['bin'];
+                       }
+                       $this->OutputFromString($b2);
+                       $DeltaCdLen += strlen($b2);
+               }
+
+               // Output "end of central directory record"
+               $b2 = $this->CdInfo['bin'];
+               $DelNbr = count($DelLst);
+               if ( ($AddNbr>0) or ($DelNbr>0) ) {
+                       // total number of entries in the central directory on this disk
+                       $n = $this->_GetDec($b2, 8, 2);
+                       $this->_PutDec($b2, $n + $AddNbr - $DelNbr,  8, 2);
+                       // total number of entries in the central directory
+                       $n = $this->_GetDec($b2, 10, 2);
+                       $this->_PutDec($b2, $n + $AddNbr - $DelNbr, 10, 2);
+                       // size of the central directory
+                       $n = $this->_GetDec($b2, 12, 4);
+                       $this->_PutDec($b2, $n + $DeltaCdLen, 12, 4);
+                       $Delta = $Delta + $AddDataLen;
+               }
+               $this->_PutDec($b2, $this->CdPos+$Delta , 16, 4); // p_cd  (offset of start of central directory with respect to the starting disk number)
+               $this->OutputFromString($b2);
+
+               $this->OutputClose();
+
+               return true;
+
+       }
+
+       // ----------------
+       // output functions
+       // ----------------
+
+       function OutputOpen($Render, $File, $ContentType) {
+
+               if (($Render & TBSZIP_FILE)==TBSZIP_FILE) {
+                       $this->OutputMode = TBSZIP_FILE;
+                       if (''.$File=='') $File = basename($this->ArchFile).'.zip';
+                       $this->OutputHandle = @fopen($File, 'w');
+                       if ($this->OutputHandle===false) {
+                               $this->RaiseError('Method Flush() cannot overwrite the target file \''.$File.'\'. This may not be a valid file path or the file may be locked by another process or because of a denied permission.');
+                               return false;
+                       }
+               } elseif (($Render & TBSZIP_STRING)==TBSZIP_STRING) {
+                       $this->OutputMode = TBSZIP_STRING;
+                       $this->OutputSrc = '';
+               } elseif (($Render & TBSZIP_DOWNLOAD)==TBSZIP_DOWNLOAD) {
+                       $this->OutputMode = TBSZIP_DOWNLOAD;
+                       // Output the file
+                       if (''.$File=='') $File = basename($this->ArchFile);
+                       if (($Render & TBSZIP_NOHEADER)==TBSZIP_NOHEADER) {
+                       } else {
+                               header ('Pragma: no-cache');
+                               if ($ContentType!='') header ('Content-Type: '.$ContentType);
+                               header('Content-Disposition: attachment; filename="'.$File.'"');
+                               header('Expires: 0');
+                               header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+                               header('Cache-Control: public');
+                               header('Content-Description: File Transfer'); 
+                               header('Content-Transfer-Encoding: binary');
+                               $Len = $this->_EstimateNewArchSize();
+                               if ($Len!==false) header('Content-Length: '.$Len); 
+                       }
+               }
+
+               return true;
+
+       }
+
+       function OutputFromArch($pos, $pos_stop) {
+               $len = $pos_stop - $pos;
+               if ($len<0) return;
+               $this->_MoveTo($pos);
+               $block = 1024;
+               while ($len>0) {
+                       $l = min($len, $block);
+                       $x = $this->_ReadData($l);
+                       $this->OutputFromString($x);
+                       $len = $len - $l;
+               }
+               unset($x);
+       }
+
+       function OutputFromString($data) {
+               if ($this->OutputMode===TBSZIP_DOWNLOAD) {
+                       echo $data; // donwload
+               } elseif ($this->OutputMode===TBSZIP_STRING) {
+                       $this->OutputSrc .= $data; // to string
+               } elseif (TBSZIP_FILE) {
+                       fwrite($this->OutputHandle, $data); // to file
+               }
+       }
+
+       function OutputClose() {
+               if ( ($this->OutputMode===TBSZIP_FILE) && ($this->OutputHandle!==false) ) {
+                       fclose($this->OutputHandle);
+                       $this->OutputHandle = false;
+               }
+       }
+
+       // ----------------
+       // Reading functions
+       // ----------------
+
+       function _MoveTo($pos, $relative = SEEK_SET) {
+               fseek($this->ArchHnd, $pos, $relative);
+       }
+
+       function _ReadData($len) {
+               if ($len>0) {
+                       $x = fread($this->ArchHnd, $len);
+                       return $x;
+               } else {
+                       return '';
+               }
+       }
+
+       // ----------------
+       // Take info from binary data
+       // ----------------
+
+       function _GetDec($txt, $pos, $len) {
+               $x = substr($txt, $pos, $len);
+               $z = 0;
+               for ($i=0;$i<$len;$i++) {
+                       $asc = ord($x[$i]);
+                       if ($asc>0) $z = $z + $asc*pow(256,$i);
+               }
+               return $z;
+       }
+
+       function _GetHex($txt, $pos, $len) {
+               $x = substr($txt, $pos, $len);
+               return 'h:'.bin2hex(strrev($x));
+       }
+
+       function _GetBin($txt, $pos, $len) {
+               $x = substr($txt, $pos, $len);
+               $z = '';
+               for ($i=0;$i<$len;$i++) {
+                       $asc = ord($x[$i]);
+                       if (isset($x[$i])) {
+                               for ($j=0;$j<8;$j++) {
+                                       $z .= ($asc & pow(2,$j)) ? '1' : '0';
+                               }
+                       } else {
+                               $z .= '00000000';
+                       }
+               }
+               return 'b:'.$z;
+       }
+
+       // ----------------
+       // Put info into binary data
+       // ----------------
+
+       function _PutDec(&$txt, $val, $pos, $len) {
+               $x = '';
+               for ($i=0;$i<$len;$i++) {
+                       if ($val==0) {
+                               $z = 0;
+                       } else {
+                               $z = intval($val % 256);
+                               if (($val<0) && ($z!=0)) { // ($z!=0) is very important, example: val=-420085702
+                                       // special opration for negative value. If the number id too big, PHP stores it into a signed integer. For example: crc32('coucou') => -256185401 instead of  4038781895. NegVal = BigVal - (MaxVal+1) = BigVal - 256^4
+                                       $val = ($val - $z)/256 -1;
+                                       $z = 256 + $z;
+                               } else {
+                                       $val = ($val - $z)/256;
+                               }
+                       }
+                       $x .= chr($z);
+               }
+               $txt = substr_replace($txt, $x, $pos, $len);
+       }
+
+       function _MsDos_Date($Timestamp = false) {
+               // convert a date-time timstamp into the MS-Dos format
+               $d = ($Timestamp===false) ? getdate() : getdate($Timestamp);
+               return (($d['year']-1980)*512) + ($d['mon']*32) + $d['mday'];
+       }
+       function _MsDos_Time($Timestamp = false) {
+               // convert a date-time timstamp into the MS-Dos format
+               $d = ($Timestamp===false) ? getdate() : getdate($Timestamp);
+               return ($d['hours']*2048) + ($d['minutes']*32) + intval($d['seconds']/2); // seconds are rounded to an even number in order to save 1 bit
+       }
+
+       function _MsDos_Debug($date, $time) {
+               // Display the formated date and time. Just for debug purpose.
+               // date end time are encoded on 16 bits (2 bytes) : date = yyyyyyymmmmddddd , time = hhhhhnnnnnssssss
+               $y = ($date & 65024)/512 + 1980;
+               $m = ($date & 480)/32;
+               $d = ($date & 31);
+               $h = ($time & 63488)/2048;
+               $i = ($time & 1984)/32;
+               $s = ($time & 31) * 2; // seconds have been rounded to an even number in order to save 1 bit
+               return $y.'-'.str_pad($m,2,'0',STR_PAD_LEFT).'-'.str_pad($d,2,'0',STR_PAD_LEFT).' '.str_pad($h,2,'0',STR_PAD_LEFT).':'.str_pad($i,2,'0',STR_PAD_LEFT).':'.str_pad($s,2,'0',STR_PAD_LEFT);
+       }
+
+       function _TxtPos($pos) {
+               // Return the human readable position in both decimal and hexa
+               return $pos." (h:".dechex($pos).")";
+       }
+       
+       function _DataOuputAddedFile($Idx, $PosLoc) {
+
+               $Ref =& $this->AddInfo[$Idx];
+               $this->_DataPrepare($Ref); // get data from external file if necessary
+
+               // Other info
+               $now = time();
+               $date  = $this->_MsDos_Date($now);
+               $time  = $this->_MsDos_Time($now);
+               $len_n = strlen($Ref['name']);
+               $purp  = 2048 ; // purpose // +8 to indicates that there is an extended local header 
+
+               // Header for file in the data section 
+               $b = 'PK'.chr(03).chr(04).str_repeat(' ',26); // signature
+               $this->_PutDec($b,20,4,2); //vers = 20
+               $this->_PutDec($b,$purp,6,2); // purp
+               $this->_PutDec($b,$Ref['meth'],8,2);  // meth
+               $this->_PutDec($b,$time,10,2); // time
+               $this->_PutDec($b,$date,12,2); // date
+               $this->_PutDec($b,$Ref['crc32'],14,4); // crc32
+               $this->_PutDec($b,$Ref['len_c'],18,4); // l_data_c
+               $this->_PutDec($b,$Ref['len_u'],22,4); // l_data_u
+               $this->_PutDec($b,$len_n,26,2); // l_name
+               $this->_PutDec($b,0,28,2); // l_fields
+               $b .= $Ref['name']; // name
+               $b .= ''; // fields
+
+               // Output the data
+               $this->OutputFromString($b.$Ref['data']);
+               $OutputLen = strlen($b) + $Ref['len_c']; // new position of the cursor
+               unset($Ref['data']); // save PHP memory
+
+               // Information for file in the Central Directory
+               $b = 'PK'.chr(01).chr(02).str_repeat(' ',42); // signature
+               $this->_PutDec($b,20,4,2);  // vers_used = 20
+               $this->_PutDec($b,20,6,2);  // vers_necess = 20
+               $this->_PutDec($b,$purp,8,2);  // purp
+               $this->_PutDec($b,$Ref['meth'],10,2); // meth
+               $this->_PutDec($b,$time,12,2); // time
+               $this->_PutDec($b,$date,14,2); // date
+               $this->_PutDec($b,$Ref['crc32'],16,4); // crc32
+               $this->_PutDec($b,$Ref['len_c'],20,4); // l_data_c
+               $this->_PutDec($b,$Ref['len_u'],24,4); // l_data_u
+               $this->_PutDec($b,$len_n,28,2); // l_name
+               $this->_PutDec($b,0,30,2); // l_fields
+               $this->_PutDec($b,0,32,2); // l_comm
+               $this->_PutDec($b,0,34,2); // disk_num
+               $this->_PutDec($b,0,36,2); // int_file_att
+               $this->_PutDec($b,0,38,4); // ext_file_att
+               $this->_PutDec($b,$PosLoc,42,4); // p_loc
+               $b .= $Ref['name']; // v_name
+               $b .= ''; // v_fields
+               $b .= ''; // v_comm
+
+               $Ref['bin'] = $b;
+
+               return $OutputLen;
+
+       }
+
+       function _DataCreateNewRef($Data, $DataType, $Compress, $Diff, $NameOrIdx) {
+
+               if (is_array($Compress)) {
+                       $result = 2;
+                       $meth = $Compress['meth'];
+                       $len_u = $Compress['len_u'];
+                       $crc32 = $Compress['crc32'];
+                       $Compress = false;
+               } elseif ($Compress and ($this->Meth8Ok)) {
+                       $result = 1;
+                       $meth = 8;
+                       $len_u = false; // means unknown
+                       $crc32 = false;
+               } else {
+                       $result = ($Compress) ? -1 : 0;
+                       $meth = 0;
+                       $len_u = false;
+                       $crc32 = false;
+                       $Compress = false;
+               }
+
+               if ($DataType==TBSZIP_STRING) {
+                       $path = false;
+                       if ($Compress) {
+                               // we compress now in order to save PHP memory
+                               $len_u = strlen($Data);
+                               $crc32 = crc32($Data);
+                               $Data = gzdeflate($Data);
+                               $len_c = strlen($Data);
+                       } else {
+                               $len_c = strlen($Data);
+                               if ($len_u===false) {
+                                       $len_u = $len_c;
+                                       $crc32 = crc32($Data);
+                               }
+                       }
+               } else {
+                       $path = $Data;
+                       $Data = false;
+                       if (file_exists($path)) {
+                               $fz = filesize($path);
+                               if ($len_u===false) $len_u = $fz;
+                               $len_c = ($Compress) ? false : $fz;
+                       } else {
+                               return $this->RaiseError("Cannot add the file '".$path."' because it is not found.");
+                       }
+               }
+
+               // at this step $Data and $crc32 can be false only in case of external file, and $len_c is false only in case of external file to compress
+               return array('data'=>$Data, 'path'=>$path, 'meth'=>$meth, 'len_u'=>$len_u, 'len_c'=>$len_c, 'crc32'=>$crc32, 'diff'=>$Diff, 'res'=>$result);
+
+       }
+
+       function _DataPrepare(&$Ref) {
+       // returns the real size of data
+               if ($Ref['path']!==false) {
+                       $Ref['data'] = file_get_contents($Ref['path']);
+                       if ($Ref['crc32']===false) $Ref['crc32'] = crc32($Ref['data']);
+                       if ($Ref['len_c']===false) {
+                               // means the data must be compressed
+                               $Ref['data'] = gzdeflate($Ref['data']);
+                               $Ref['len_c'] = strlen($Ref['data']);
+                       }
+               }
+       }
+
+       function _EstimateNewArchSize($Optim=true) {
+       // Return the size of the new archive, or false if it cannot be calculated (because of external file that must be compressed before to be insered)
+
+               if ($this->ArchIsNew) {
+                       $Len = strlen($this->CdInfo['bin']);
+               } else {
+                       $Len = filesize($this->ArchFile);
+               }
+
+               // files to replace or delete
+               foreach ($this->ReplByPos as $i) {
+                       $Ref =& $this->ReplInfo[$i];
+                       if ($Ref===false) {
+                               // file to delete
+                               $Info =& $this->CdFileLst[$i];
+                               if (!isset($this->VisFileLst[$i])) {
+                                       if ($Optim) return false; // if $Optimization is set to true, then we d'ont rewind to read information
+                                       $this->_MoveTo($Info['p_loc']);
+                                       $this->_ReadFile($i, false);
+                               }
+                               $Vis =& $this->VisFileLst[$i];
+                               $Len += -strlen($Vis['bin']) -strlen($Info['bin']) - $Info['l_data_c'];
+                               if (isset($Vis['desc_bin'])) $Len += -strlen($Vis['desc_bin']);
+                       } elseif ($Ref['len_c']===false) {
+                               return false; // information not yet known
+                       } else {
+                               // file to replace
+                               $Len += $Ref['len_c'] + $Ref['diff'];
+                       }
+               }
+
+               // files to add
+               $i_lst = array_keys($this->AddInfo);
+               foreach ($i_lst as $i) {
+                       $Ref =& $this->AddInfo[$i];
+                       if ($Ref['len_c']===false) {
+                               return false; // information not yet known
+                       } else {
+                               $Len += $Ref['len_c'] + $Ref['diff'];
+                       }
+               }
+
+               return $Len;
+
+       }
+
+}
\ No newline at end of file
diff --git a/www/sendtomail.php b/www/sendtomail.php
new file mode 100644 (file)
index 0000000..632752a
--- /dev/null
@@ -0,0 +1,69 @@
+<?php\r
+\r
+require_once ("config.php");\r
+require_once "resources/PHPMailer/class.phpmailer.php";\r
+require_once "book.php";\r
+\r
+if (is_null ($config['cops_mail_configuration']) ||\r
+    !is_array ($config['cops_mail_configuration']) ||\r
+    empty ($config['cops_mail_configuration']["smtp.host"]) ||\r
+    empty ($config['cops_mail_configuration']["address.from"])) {\r
+    echo "NOK. bad configuration of $config ['cops_mail_configuration']";\r
+    exit;\r
+}\r
+\r
+$idData = $_REQUEST["data"];\r
+if (empty ($idData)) {\r
+    echo 'No data sent.';\r
+    exit;\r
+}\r
+$emailDest = $_REQUEST["email"];\r
+if (empty ($emailDest)) {\r
+    echo 'No email sent.';\r
+    exit;\r
+}\r
+\r
+$book = Book::getBookByDataId($idData);\r
+$data = $book->getDataById ($idData);\r
+\r
+if (filesize ($data->getLocalPath ()) > 10 * 1024 * 1024) {\r
+    echo 'Attachement too big';\r
+    exit;\r
+}\r
+\r
+$mail = new PHPMailer;\r
+\r
+$mail->IsSMTP();\r
+$mail->Timeout = 30; // 30 seconds as some files can be big\r
+$mail->Host = $config['cops_mail_configuration']["smtp.host"];\r
+if (!empty ($config['cops_mail_configuration']["smtp.secure"])) {\r
+    $mail->SMTPSecure = $config['cops_mail_configuration']["smtp.secure"];\r
+    $mail->Port = 465;\r
+}\r
+$mail->SMTPAuth = !empty ($config['cops_mail_configuration']["smtp.username"]);\r
+if (!empty ($config['cops_mail_configuration']["smtp.username"])) $mail->Username = $config['cops_mail_configuration']["smtp.username"];\r
+if (!empty ($config['cops_mail_configuration']["smtp.password"])) $mail->Password = $config['cops_mail_configuration']["smtp.password"];\r
+if (!empty ($config['cops_mail_configuration']["smtp.secure"])) $mail->SMTPSecure = $config['cops_mail_configuration']["smtp.secure"];\r
+\r
+$mail->From = $config['cops_mail_configuration']["address.from"];\r
+$mail->FromName = $config['cops_title_default'];\r
+\r
+foreach (explode (";", $emailDest) as $emailAddress) {\r
+    if (empty ($emailAddress)) { continue; }\r
+    $mail->AddAddress($emailAddress);\r
+}\r
+\r
+$mail->AddAttachment($data->getLocalPath ());\r
+\r
+$mail->IsHTML(false); \r
+$mail->Subject = 'Sent by COPS';\r
+$mail->Body    = 'Sent by COPS';\r
+\r
+if(!$mail->Send()) {\r
+   echo localize ("mail.messagenotsent");\r
+   echo 'Mailer Error: ' . $mail->ErrorInfo;\r
+   exit;\r
+}\r
+\r
+echo localize ("mail.messagesent");\r
+\r
diff --git a/www/serie.php b/www/serie.php
new file mode 100644 (file)
index 0000000..7dcf9c8
--- /dev/null
@@ -0,0 +1,122 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+require_once('base.php');
+
+class Serie extends Base {
+    const ALL_SERIES_ID = "calibre:series";
+    
+    public $id;
+    public $name;
+    
+    public function __construct($pid, $pname) {
+        $this->id = $pid;
+        $this->name = $pname;
+    }
+    
+    public function getUri () {
+        return "?page=".parent::PAGE_SERIE_DETAIL."&id=$this->id";
+    }
+    
+    public function getEntryId () {
+        return self::ALL_SERIES_ID.":".$this->id;
+    }
+
+    public function getEntryIdByLetters ($letters) {
+        return self::ALL_SERIES_ID.":letters:".$letters;
+    }
+
+    public static function getCount() {
+        $nSeries = parent::getDb ()->query('select count(*) from series')->fetchColumn(0);
+        if ($nSeries == 0) return NULL;
+        $entry = new Entry (localize("series.title"), self::ALL_SERIES_ID, 
+            str_format (localize("series.alphabetical", $nSeries), $nSeries), "text", 
+            array ( new LinkNavigation ("?page=".parent::PAGE_ALL_SERIES)));
+        return $entry;
+    }
+    
+    public static function getSerieByBookId ($bookId) {
+        $result = parent::getDb ()->prepare('select  series.id as id, name
+from books_series_link, series
+where series.id = series and book = ?');
+        $result->execute (array ($bookId));
+        if ($post = $result->fetchObject ()) {
+            return new Serie ($post->id, $post->name);
+        }
+        return NULL;
+    }
+    
+    public static function getSerieById ($serieId) {
+        $result = parent::getDb ()->prepare('select id, name  from series where id = ?');
+        $result->execute (array ($serieId));
+        if ($post = $result->fetchObject ()) {
+            return new Serie ($post->id, $post->name);
+        }
+        return NULL;
+    }
+
+    public static function getAllSeries($letters) {
+        if (!$letters) { $letters=''; }
+        $len = mb_strlen($letters,'UTF-8')+1;
+        $result = parent::getDb ()->query('select 
+substr(series.sort,1,'.$len.') as sort, 
+sum(count) as count, 
+count(distinct series.id) ser_count, 
+count(distinct series.sort) sort_cnt, 
+min(series.id) min_id, min(series.sort) min_sort
+from series, 
+(select series,count(*) as count from books_series_link group by series) link
+where series.id = link.series and series.sort like "'.$letters.'%"
+group by substr(series.sort,1,'.$len.')
+order by substr(series.sort,1,'.$len.')');
+        $entryArray = array();
+        while ($post = $result->fetchObject ())
+        {
+            if ($post->ser_count==1) {
+              $serie = new Serie ($post->min_id, $post->min_sort);
+              $title = $serie->name;
+              $link = array ( new LinkNavigation ($serie->getUri ()));
+            } elseif ($post->ser_count > parent::maxItemsPerPage() && $post->sort_cnt>1) {
+              $page = parent::PAGE_ALL_SERIES;
+              $title = $post->sort.'...';
+              $link = array ( new LinkNavigation ("?page=".$page."&id=". rawurlencode ($post->sort)));
+            } else {
+              $page = parent::PAGE_SERIES_STARTING_LETTERS;
+              $title = $post->sort.'...';
+              $link = array ( new LinkNavigation ("?page=".$page."&id=". rawurlencode ($post->sort)));
+            }
+            array_push ($entryArray, new Entry ($title, Serie::getEntryIdByLetters($post->sort), 
+              str_format (localize("bookword", $post->count), $post->count), "text", 
+              $link ));
+                                            
+        }
+        return $entryArray;
+    }
+
+    
+    public static function getAllSeriesStartingLetters($letters) {
+        $result = parent::getDb ()->query('
+select 
+series.id as id, series.name as name, series.sort as sort,
+sum(count) as count
+from series, 
+(select series,count(*) as count from books_series_link group by series) link
+where series.id = link.series and series.sort like "'.$letters.'%"
+group by series.id, series.name, series.sort
+order by series.sort');
+        $entryArray = array();
+        while ($post = $result->fetchObject ())
+        {
+            $serie = new Serie ($post->id, $post->sort);
+            array_push ($entryArray, new Entry ($serie->name, $serie->getEntryId (), 
+                str_format (localize("bookword", $post->count), $post->count), "text", 
+                array ( new LinkNavigation ($serie->getUri ()))));
+        }
+        return $entryArray;
+    }
+}
diff --git a/www/styles/FontAwesome.otf b/www/styles/FontAwesome.otf
new file mode 100644 (file)
index 0000000..7012545
Binary files /dev/null and b/www/styles/FontAwesome.otf differ
diff --git a/www/styles/font-awesome.css b/www/styles/font-awesome.css
new file mode 100644 (file)
index 0000000..77d011a
--- /dev/null
@@ -0,0 +1,1479 @@
+/*!
+ *  Font Awesome 3.2.1
+ *  the iconic font designed for Bootstrap
+ *  ------------------------------------------------------------------------------
+ *  The full suite of pictographic icons, examples, and documentation can be
+ *  found at http://fontawesome.io.  Stay up to date on Twitter at
+ *  http://twitter.com/fontawesome.
+ *
+ *  License
+ *  ------------------------------------------------------------------------------
+ *  - The Font Awesome font is licensed under SIL OFL 1.1 -
+ *    http://scripts.sil.org/OFL
+ *  - Font Awesome CSS, LESS, and SASS files are licensed under MIT License -
+ *    http://opensource.org/licenses/mit-license.html
+ *  - Font Awesome documentation licensed under CC BY 3.0 -
+ *    http://creativecommons.org/licenses/by/3.0/
+ *  - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
+ *    "Font Awesome by Dave Gandy - http://fontawesome.io"
+ *
+ *  Author - Dave Gandy
+ *  ------------------------------------------------------------------------------
+ *  Email: dave@fontawesome.io
+ *  Twitter: http://twitter.com/byscuits
+ *  Work: Lead Product Designer @ Kyruus - http://kyruus.com
+ */
+/* FONT PATH
+ * -------------------------- */
+@font-face {
+  font-family: 'FontAwesome';
+  src: url('fontawesome-webfont.eot?v=3.2.1');
+  src: url('fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), url('fontawesome-webfont.woff?v=3.2.1') format('woff'), url('fontawesome-webfont.ttf?v=3.2.1') format('truetype'), url('fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');
+  font-weight: normal;
+  font-style: normal;
+}
+/* FONT AWESOME CORE
+ * -------------------------- */
+[class^="icon-"],
+[class*=" icon-"] {
+  font-family: FontAwesome;
+  font-weight: normal;
+  font-style: normal;
+  text-decoration: inherit;
+  -webkit-font-smoothing: antialiased;
+  *margin-right: .3em;
+}
+[class^="icon-"]:before,
+[class*=" icon-"]:before {
+  text-decoration: inherit;
+  display: inline-block;
+  speak: none;
+}
+/* makes the font 33% larger relative to the icon container */
+.icon-large:before {
+  vertical-align: -10%;
+  font-size: 1.3333333333333333em;
+}
+/* makes sure icons active on rollover in links */
+a [class^="icon-"],
+a [class*=" icon-"] {
+  display: inline;
+}
+/* increased font size for icon-large */
+[class^="icon-"].icon-fixed-width,
+[class*=" icon-"].icon-fixed-width {
+  display: inline-block;
+  width: 1.1428571428571428em;
+  text-align: right;
+  padding-right: 0.2857142857142857em;
+}
+[class^="icon-"].icon-fixed-width.icon-large,
+[class*=" icon-"].icon-fixed-width.icon-large {
+  width: 1.4285714285714286em;
+}
+.icons-ul {
+  margin-left: 2.142857142857143em;
+  list-style-type: none;
+}
+.icons-ul > li {
+  position: relative;
+}
+.icons-ul .icon-li {
+  position: absolute;
+  left: -2.142857142857143em;
+  width: 2.142857142857143em;
+  text-align: center;
+  line-height: inherit;
+}
+[class^="icon-"].hide,
+[class*=" icon-"].hide {
+  display: none;
+}
+.icon-muted {
+  color: #eeeeee;
+}
+.icon-light {
+  color: #ffffff;
+}
+.icon-dark {
+  color: #333333;
+}
+.icon-border {
+  border: solid 1px #eeeeee;
+  padding: .2em .25em .15em;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+.icon-2x {
+  font-size: 2em;
+}
+.icon-2x.icon-border {
+  border-width: 2px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+.icon-3x {
+  font-size: 3em;
+}
+.icon-3x.icon-border {
+  border-width: 3px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.icon-4x {
+  font-size: 4em;
+}
+.icon-4x.icon-border {
+  border-width: 4px;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+}
+.icon-5x {
+  font-size: 5em;
+}
+.icon-5x.icon-border {
+  border-width: 5px;
+  -webkit-border-radius: 7px;
+  -moz-border-radius: 7px;
+  border-radius: 7px;
+}
+.pull-right {
+  float: right;
+}
+.pull-left {
+  float: left;
+}
+[class^="icon-"].pull-left,
+[class*=" icon-"].pull-left {
+  margin-right: .3em;
+}
+[class^="icon-"].pull-right,
+[class*=" icon-"].pull-right {
+  margin-left: .3em;
+}
+/* BOOTSTRAP SPECIFIC CLASSES
+ * -------------------------- */
+/* Bootstrap 2.0 sprites.less reset */
+[class^="icon-"],
+[class*=" icon-"] {
+  display: inline;
+  width: auto;
+  height: auto;
+  line-height: normal;
+  vertical-align: baseline;
+  background-image: none;
+  background-position: 0% 0%;
+  background-repeat: repeat;
+  margin-top: 0;
+}
+/* more sprites.less reset */
+.icon-white,
+.nav-pills > .active > a > [class^="icon-"],
+.nav-pills > .active > a > [class*=" icon-"],
+.nav-list > .active > a > [class^="icon-"],
+.nav-list > .active > a > [class*=" icon-"],
+.navbar-inverse .nav > .active > a > [class^="icon-"],
+.navbar-inverse .nav > .active > a > [class*=" icon-"],
+.dropdown-menu > li > a:hover > [class^="icon-"],
+.dropdown-menu > li > a:hover > [class*=" icon-"],
+.dropdown-menu > .active > a > [class^="icon-"],
+.dropdown-menu > .active > a > [class*=" icon-"],
+.dropdown-submenu:hover > a > [class^="icon-"],
+.dropdown-submenu:hover > a > [class*=" icon-"] {
+  background-image: none;
+}
+/* keeps Bootstrap styles with and without icons the same */
+.btn [class^="icon-"].icon-large,
+.nav [class^="icon-"].icon-large,
+.btn [class*=" icon-"].icon-large,
+.nav [class*=" icon-"].icon-large {
+  line-height: .9em;
+}
+.btn [class^="icon-"].icon-spin,
+.nav [class^="icon-"].icon-spin,
+.btn [class*=" icon-"].icon-spin,
+.nav [class*=" icon-"].icon-spin {
+  display: inline-block;
+}
+.nav-tabs [class^="icon-"],
+.nav-pills [class^="icon-"],
+.nav-tabs [class*=" icon-"],
+.nav-pills [class*=" icon-"],
+.nav-tabs [class^="icon-"].icon-large,
+.nav-pills [class^="icon-"].icon-large,
+.nav-tabs [class*=" icon-"].icon-large,
+.nav-pills [class*=" icon-"].icon-large {
+  line-height: .9em;
+}
+.btn [class^="icon-"].pull-left.icon-2x,
+.btn [class*=" icon-"].pull-left.icon-2x,
+.btn [class^="icon-"].pull-right.icon-2x,
+.btn [class*=" icon-"].pull-right.icon-2x {
+  margin-top: .18em;
+}
+.btn [class^="icon-"].icon-spin.icon-large,
+.btn [class*=" icon-"].icon-spin.icon-large {
+  line-height: .8em;
+}
+.btn.btn-small [class^="icon-"].pull-left.icon-2x,
+.btn.btn-small [class*=" icon-"].pull-left.icon-2x,
+.btn.btn-small [class^="icon-"].pull-right.icon-2x,
+.btn.btn-small [class*=" icon-"].pull-right.icon-2x {
+  margin-top: .25em;
+}
+.btn.btn-large [class^="icon-"],
+.btn.btn-large [class*=" icon-"] {
+  margin-top: 0;
+}
+.btn.btn-large [class^="icon-"].pull-left.icon-2x,
+.btn.btn-large [class*=" icon-"].pull-left.icon-2x,
+.btn.btn-large [class^="icon-"].pull-right.icon-2x,
+.btn.btn-large [class*=" icon-"].pull-right.icon-2x {
+  margin-top: .05em;
+}
+.btn.btn-large [class^="icon-"].pull-left.icon-2x,
+.btn.btn-large [class*=" icon-"].pull-left.icon-2x {
+  margin-right: .2em;
+}
+.btn.btn-large [class^="icon-"].pull-right.icon-2x,
+.btn.btn-large [class*=" icon-"].pull-right.icon-2x {
+  margin-left: .2em;
+}
+/* Fixes alignment in nav lists */
+.nav-list [class^="icon-"],
+.nav-list [class*=" icon-"] {
+  line-height: inherit;
+}
+/* EXTRAS
+ * -------------------------- */
+/* Stacked and layered icon */
+.icon-stack {
+  position: relative;
+  display: inline-block;
+  width: 2em;
+  height: 2em;
+  line-height: 2em;
+  vertical-align: -35%;
+}
+.icon-stack [class^="icon-"],
+.icon-stack [class*=" icon-"] {
+  display: block;
+  text-align: center;
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  font-size: 1em;
+  line-height: inherit;
+  *line-height: 2em;
+}
+.icon-stack .icon-stack-base {
+  font-size: 2em;
+  *line-height: 1em;
+}
+/* Animated rotating icon */
+.icon-spin {
+  display: inline-block;
+  -moz-animation: spin 2s infinite linear;
+  -o-animation: spin 2s infinite linear;
+  -webkit-animation: spin 2s infinite linear;
+  animation: spin 2s infinite linear;
+}
+/* Prevent stack and spinners from being taken inline when inside a link */
+a .icon-stack,
+a .icon-spin {
+  display: inline-block;
+  text-decoration: none;
+}
+@-moz-keyframes spin {
+  0% {
+    -moz-transform: rotate(0deg);
+  }
+  100% {
+    -moz-transform: rotate(359deg);
+  }
+}
+@-webkit-keyframes spin {
+  0% {
+    -webkit-transform: rotate(0deg);
+  }
+  100% {
+    -webkit-transform: rotate(359deg);
+  }
+}
+@-o-keyframes spin {
+  0% {
+    -o-transform: rotate(0deg);
+  }
+  100% {
+    -o-transform: rotate(359deg);
+  }
+}
+@-ms-keyframes spin {
+  0% {
+    -ms-transform: rotate(0deg);
+  }
+  100% {
+    -ms-transform: rotate(359deg);
+  }
+}
+@keyframes spin {
+  0% {
+    transform: rotate(0deg);
+  }
+  100% {
+    transform: rotate(359deg);
+  }
+}
+/* Icon rotations and mirroring */
+.icon-rotate-90:before {
+  -webkit-transform: rotate(90deg);
+  -moz-transform: rotate(90deg);
+  -ms-transform: rotate(90deg);
+  -o-transform: rotate(90deg);
+  transform: rotate(90deg);
+  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
+}
+.icon-rotate-180:before {
+  -webkit-transform: rotate(180deg);
+  -moz-transform: rotate(180deg);
+  -ms-transform: rotate(180deg);
+  -o-transform: rotate(180deg);
+  transform: rotate(180deg);
+  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
+}
+.icon-rotate-270:before {
+  -webkit-transform: rotate(270deg);
+  -moz-transform: rotate(270deg);
+  -ms-transform: rotate(270deg);
+  -o-transform: rotate(270deg);
+  transform: rotate(270deg);
+  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+}
+.icon-flip-horizontal:before {
+  -webkit-transform: scale(-1, 1);
+  -moz-transform: scale(-1, 1);
+  -ms-transform: scale(-1, 1);
+  -o-transform: scale(-1, 1);
+  transform: scale(-1, 1);
+}
+.icon-flip-vertical:before {
+  -webkit-transform: scale(1, -1);
+  -moz-transform: scale(1, -1);
+  -ms-transform: scale(1, -1);
+  -o-transform: scale(1, -1);
+  transform: scale(1, -1);
+}
+/* ensure rotation occurs inside anchor tags */
+a .icon-rotate-90:before,
+a .icon-rotate-180:before,
+a .icon-rotate-270:before,
+a .icon-flip-horizontal:before,
+a .icon-flip-vertical:before {
+  display: inline-block;
+}
+/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
+   readers do not read off random characters that represent icons */
+.icon-glass:before {
+  content: "\f000";
+}
+.icon-music:before {
+  content: "\f001";
+}
+.icon-search:before {
+  content: "\f002";
+}
+.icon-envelope-alt:before {
+  content: "\f003";
+}
+.icon-heart:before {
+  content: "\f004";
+}
+.icon-star:before {
+  content: "\f005";
+}
+.icon-star-empty:before {
+  content: "\f006";
+}
+.icon-user:before {
+  content: "\f007";
+}
+.icon-film:before {
+  content: "\f008";
+}
+.icon-th-large:before {
+  content: "\f009";
+}
+.icon-th:before {
+  content: "\f00a";
+}
+.icon-th-list:before {
+  content: "\f00b";
+}
+.icon-ok:before {
+  content: "\f00c";
+}
+.icon-remove:before {
+  content: "\f00d";
+}
+.icon-zoom-in:before {
+  content: "\f00e";
+}
+.icon-zoom-out:before {
+  content: "\f010";
+}
+.icon-power-off:before,
+.icon-off:before {
+  content: "\f011";
+}
+.icon-signal:before {
+  content: "\f012";
+}
+.icon-gear:before,
+.icon-cog:before {
+  content: "\f013";
+}
+.icon-trash:before {
+  content: "\f014";
+}
+.icon-home:before {
+  content: "\f015";
+}
+.icon-file-alt:before {
+  content: "\f016";
+}
+.icon-time:before {
+  content: "\f017";
+}
+.icon-road:before {
+  content: "\f018";
+}
+.icon-download-alt:before {
+  content: "\f019";
+}
+.icon-download:before {
+  content: "\f01a";
+}
+.icon-upload:before {
+  content: "\f01b";
+}
+.icon-inbox:before {
+  content: "\f01c";
+}
+.icon-play-circle:before {
+  content: "\f01d";
+}
+.icon-rotate-right:before,
+.icon-repeat:before {
+  content: "\f01e";
+}
+.icon-refresh:before {
+  content: "\f021";
+}
+.icon-list-alt:before {
+  content: "\f022";
+}
+.icon-lock:before {
+  content: "\f023";
+}
+.icon-flag:before {
+  content: "\f024";
+}
+.icon-headphones:before {
+  content: "\f025";
+}
+.icon-volume-off:before {
+  content: "\f026";
+}
+.icon-volume-down:before {
+  content: "\f027";
+}
+.icon-volume-up:before {
+  content: "\f028";
+}
+.icon-qrcode:before {
+  content: "\f029";
+}
+.icon-barcode:before {
+  content: "\f02a";
+}
+.icon-tag:before {
+  content: "\f02b";
+}
+.icon-tags:before {
+  content: "\f02c";
+}
+.icon-book:before {
+  content: "\f02d";
+}
+.icon-bookmark:before {
+  content: "\f02e";
+}
+.icon-print:before {
+  content: "\f02f";
+}
+.icon-camera:before {
+  content: "\f030";
+}
+.icon-font:before {
+  content: "\f031";
+}
+.icon-bold:before {
+  content: "\f032";
+}
+.icon-italic:before {
+  content: "\f033";
+}
+.icon-text-height:before {
+  content: "\f034";
+}
+.icon-text-width:before {
+  content: "\f035";
+}
+.icon-align-left:before {
+  content: "\f036";
+}
+.icon-align-center:before {
+  content: "\f037";
+}
+.icon-align-right:before {
+  content: "\f038";
+}
+.icon-align-justify:before {
+  content: "\f039";
+}
+.icon-list:before {
+  content: "\f03a";
+}
+.icon-indent-left:before {
+  content: "\f03b";
+}
+.icon-indent-right:before {
+  content: "\f03c";
+}
+.icon-facetime-video:before {
+  content: "\f03d";
+}
+.icon-picture:before {
+  content: "\f03e";
+}
+.icon-pencil:before {
+  content: "\f040";
+}
+.icon-map-marker:before {
+  content: "\f041";
+}
+.icon-adjust:before {
+  content: "\f042";
+}
+.icon-tint:before {
+  content: "\f043";
+}
+.icon-edit:before {
+  content: "\f044";
+}
+.icon-share:before {
+  content: "\f045";
+}
+.icon-check:before {
+  content: "\f046";
+}
+.icon-move:before {
+  content: "\f047";
+}
+.icon-step-backward:before {
+  content: "\f048";
+}
+.icon-fast-backward:before {
+  content: "\f049";
+}
+.icon-backward:before {
+  content: "\f04a";
+}
+.icon-play:before {
+  content: "\f04b";
+}
+.icon-pause:before {
+  content: "\f04c";
+}
+.icon-stop:before {
+  content: "\f04d";
+}
+.icon-forward:before {
+  content: "\f04e";
+}
+.icon-fast-forward:before {
+  content: "\f050";
+}
+.icon-step-forward:before {
+  content: "\f051";
+}
+.icon-eject:before {
+  content: "\f052";
+}
+.icon-chevron-left:before {
+  content: "\f053";
+}
+.icon-chevron-right:before {
+  content: "\f054";
+}
+.icon-plus-sign:before {
+  content: "\f055";
+}
+.icon-minus-sign:before {
+  content: "\f056";
+}
+.icon-remove-sign:before {
+  content: "\f057";
+}
+.icon-ok-sign:before {
+  content: "\f058";
+}
+.icon-question-sign:before {
+  content: "\f059";
+}
+.icon-info-sign:before {
+  content: "\f05a";
+}
+.icon-screenshot:before {
+  content: "\f05b";
+}
+.icon-remove-circle:before {
+  content: "\f05c";
+}
+.icon-ok-circle:before {
+  content: "\f05d";
+}
+.icon-ban-circle:before {
+  content: "\f05e";
+}
+.icon-arrow-left:before {
+  content: "\f060";
+}
+.icon-arrow-right:before {
+  content: "\f061";
+}
+.icon-arrow-up:before {
+  content: "\f062";
+}
+.icon-arrow-down:before {
+  content: "\f063";
+}
+.icon-mail-forward:before,
+.icon-share-alt:before {
+  content: "\f064";
+}
+.icon-resize-full:before {
+  content: "\f065";
+}
+.icon-resize-small:before {
+  content: "\f066";
+}
+.icon-plus:before {
+  content: "\f067";
+}
+.icon-minus:before {
+  content: "\f068";
+}
+.icon-asterisk:before {
+  content: "\f069";
+}
+.icon-exclamation-sign:before {
+  content: "\f06a";
+}
+.icon-gift:before {
+  content: "\f06b";
+}
+.icon-leaf:before {
+  content: "\f06c";
+}
+.icon-fire:before {
+  content: "\f06d";
+}
+.icon-eye-open:before {
+  content: "\f06e";
+}
+.icon-eye-close:before {
+  content: "\f070";
+}
+.icon-warning-sign:before {
+  content: "\f071";
+}
+.icon-plane:before {
+  content: "\f072";
+}
+.icon-calendar:before {
+  content: "\f073";
+}
+.icon-random:before {
+  content: "\f074";
+}
+.icon-comment:before {
+  content: "\f075";
+}
+.icon-magnet:before {
+  content: "\f076";
+}
+.icon-chevron-up:before {
+  content: "\f077";
+}
+.icon-chevron-down:before {
+  content: "\f078";
+}
+.icon-retweet:before {
+  content: "\f079";
+}
+.icon-shopping-cart:before {
+  content: "\f07a";
+}
+.icon-folder-close:before {
+  content: "\f07b";
+}
+.icon-folder-open:before {
+  content: "\f07c";
+}
+.icon-resize-vertical:before {
+  content: "\f07d";
+}
+.icon-resize-horizontal:before {
+  content: "\f07e";
+}
+.icon-bar-chart:before {
+  content: "\f080";
+}
+.icon-twitter-sign:before {
+  content: "\f081";
+}
+.icon-facebook-sign:before {
+  content: "\f082";
+}
+.icon-camera-retro:before {
+  content: "\f083";
+}
+.icon-key:before {
+  content: "\f084";
+}
+.icon-gears:before,
+.icon-cogs:before {
+  content: "\f085";
+}
+.icon-comments:before {
+  content: "\f086";
+}
+.icon-thumbs-up-alt:before {
+  content: "\f087";
+}
+.icon-thumbs-down-alt:before {
+  content: "\f088";
+}
+.icon-star-half:before {
+  content: "\f089";
+}
+.icon-heart-empty:before {
+  content: "\f08a";
+}
+.icon-signout:before {
+  content: "\f08b";
+}
+.icon-linkedin-sign:before {
+  content: "\f08c";
+}
+.icon-pushpin:before {
+  content: "\f08d";
+}
+.icon-external-link:before {
+  content: "\f08e";
+}
+.icon-signin:before {
+  content: "\f090";
+}
+.icon-trophy:before {
+  content: "\f091";
+}
+.icon-github-sign:before {
+  content: "\f092";
+}
+.icon-upload-alt:before {
+  content: "\f093";
+}
+.icon-lemon:before {
+  content: "\f094";
+}
+.icon-phone:before {
+  content: "\f095";
+}
+.icon-unchecked:before,
+.icon-check-empty:before {
+  content: "\f096";
+}
+.icon-bookmark-empty:before {
+  content: "\f097";
+}
+.icon-phone-sign:before {
+  content: "\f098";
+}
+.icon-twitter:before {
+  content: "\f099";
+}
+.icon-facebook:before {
+  content: "\f09a";
+}
+.icon-github:before {
+  content: "\f09b";
+}
+.icon-unlock:before {
+  content: "\f09c";
+}
+.icon-credit-card:before {
+  content: "\f09d";
+}
+.icon-rss:before {
+  content: "\f09e";
+}
+.icon-hdd:before {
+  content: "\f0a0";
+}
+.icon-bullhorn:before {
+  content: "\f0a1";
+}
+.icon-bell:before {
+  content: "\f0a2";
+}
+.icon-certificate:before {
+  content: "\f0a3";
+}
+.icon-hand-right:before {
+  content: "\f0a4";
+}
+.icon-hand-left:before {
+  content: "\f0a5";
+}
+.icon-hand-up:before {
+  content: "\f0a6";
+}
+.icon-hand-down:before {
+  content: "\f0a7";
+}
+.icon-circle-arrow-left:before {
+  content: "\f0a8";
+}
+.icon-circle-arrow-right:before {
+  content: "\f0a9";
+}
+.icon-circle-arrow-up:before {
+  content: "\f0aa";
+}
+.icon-circle-arrow-down:before {
+  content: "\f0ab";
+}
+.icon-globe:before {
+  content: "\f0ac";
+}
+.icon-wrench:before {
+  content: "\f0ad";
+}
+.icon-tasks:before {
+  content: "\f0ae";
+}
+.icon-filter:before {
+  content: "\f0b0";
+}
+.icon-briefcase:before {
+  content: "\f0b1";
+}
+.icon-fullscreen:before {
+  content: "\f0b2";
+}
+.icon-group:before {
+  content: "\f0c0";
+}
+.icon-link:before {
+  content: "\f0c1";
+}
+.icon-cloud:before {
+  content: "\f0c2";
+}
+.icon-beaker:before {
+  content: "\f0c3";
+}
+.icon-cut:before {
+  content: "\f0c4";
+}
+.icon-copy:before {
+  content: "\f0c5";
+}
+.icon-paperclip:before,
+.icon-paper-clip:before {
+  content: "\f0c6";
+}
+.icon-save:before {
+  content: "\f0c7";
+}
+.icon-sign-blank:before {
+  content: "\f0c8";
+}
+.icon-reorder:before {
+  content: "\f0c9";
+}
+.icon-list-ul:before {
+  content: "\f0ca";
+}
+.icon-list-ol:before {
+  content: "\f0cb";
+}
+.icon-strikethrough:before {
+  content: "\f0cc";
+}
+.icon-underline:before {
+  content: "\f0cd";
+}
+.icon-table:before {
+  content: "\f0ce";
+}
+.icon-magic:before {
+  content: "\f0d0";
+}
+.icon-truck:before {
+  content: "\f0d1";
+}
+.icon-pinterest:before {
+  content: "\f0d2";
+}
+.icon-pinterest-sign:before {
+  content: "\f0d3";
+}
+.icon-google-plus-sign:before {
+  content: "\f0d4";
+}
+.icon-google-plus:before {
+  content: "\f0d5";
+}
+.icon-money:before {
+  content: "\f0d6";
+}
+.icon-caret-down:before {
+  content: "\f0d7";
+}
+.icon-caret-up:before {
+  content: "\f0d8";
+}
+.icon-caret-left:before {
+  content: "\f0d9";
+}
+.icon-caret-right:before {
+  content: "\f0da";
+}
+.icon-columns:before {
+  content: "\f0db";
+}
+.icon-sort:before {
+  content: "\f0dc";
+}
+.icon-sort-down:before {
+  content: "\f0dd";
+}
+.icon-sort-up:before {
+  content: "\f0de";
+}
+.icon-envelope:before {
+  content: "\f0e0";
+}
+.icon-linkedin:before {
+  content: "\f0e1";
+}
+.icon-rotate-left:before,
+.icon-undo:before {
+  content: "\f0e2";
+}
+.icon-legal:before {
+  content: "\f0e3";
+}
+.icon-dashboard:before {
+  content: "\f0e4";
+}
+.icon-comment-alt:before {
+  content: "\f0e5";
+}
+.icon-comments-alt:before {
+  content: "\f0e6";
+}
+.icon-bolt:before {
+  content: "\f0e7";
+}
+.icon-sitemap:before {
+  content: "\f0e8";
+}
+.icon-umbrella:before {
+  content: "\f0e9";
+}
+.icon-paste:before {
+  content: "\f0ea";
+}
+.icon-lightbulb:before {
+  content: "\f0eb";
+}
+.icon-exchange:before {
+  content: "\f0ec";
+}
+.icon-cloud-download:before {
+  content: "\f0ed";
+}
+.icon-cloud-upload:before {
+  content: "\f0ee";
+}
+.icon-user-md:before {
+  content: "\f0f0";
+}
+.icon-stethoscope:before {
+  content: "\f0f1";
+}
+.icon-suitcase:before {
+  content: "\f0f2";
+}
+.icon-bell-alt:before {
+  content: "\f0f3";
+}
+.icon-coffee:before {
+  content: "\f0f4";
+}
+.icon-food:before {
+  content: "\f0f5";
+}
+.icon-file-text-alt:before {
+  content: "\f0f6";
+}
+.icon-building:before {
+  content: "\f0f7";
+}
+.icon-hospital:before {
+  content: "\f0f8";
+}
+.icon-ambulance:before {
+  content: "\f0f9";
+}
+.icon-medkit:before {
+  content: "\f0fa";
+}
+.icon-fighter-jet:before {
+  content: "\f0fb";
+}
+.icon-beer:before {
+  content: "\f0fc";
+}
+.icon-h-sign:before {
+  content: "\f0fd";
+}
+.icon-plus-sign-alt:before {
+  content: "\f0fe";
+}
+.icon-double-angle-left:before {
+  content: "\f100";
+}
+.icon-double-angle-right:before {
+  content: "\f101";
+}
+.icon-double-angle-up:before {
+  content: "\f102";
+}
+.icon-double-angle-down:before {
+  content: "\f103";
+}
+.icon-angle-left:before {
+  content: "\f104";
+}
+.icon-angle-right:before {
+  content: "\f105";
+}
+.icon-angle-up:before {
+  content: "\f106";
+}
+.icon-angle-down:before {
+  content: "\f107";
+}
+.icon-desktop:before {
+  content: "\f108";
+}
+.icon-laptop:before {
+  content: "\f109";
+}
+.icon-tablet:before {
+  content: "\f10a";
+}
+.icon-mobile-phone:before {
+  content: "\f10b";
+}
+.icon-circle-blank:before {
+  content: "\f10c";
+}
+.icon-quote-left:before {
+  content: "\f10d";
+}
+.icon-quote-right:before {
+  content: "\f10e";
+}
+.icon-spinner:before {
+  content: "\f110";
+}
+.icon-circle:before {
+  content: "\f111";
+}
+.icon-mail-reply:before,
+.icon-reply:before {
+  content: "\f112";
+}
+.icon-github-alt:before {
+  content: "\f113";
+}
+.icon-folder-close-alt:before {
+  content: "\f114";
+}
+.icon-folder-open-alt:before {
+  content: "\f115";
+}
+.icon-expand-alt:before {
+  content: "\f116";
+}
+.icon-collapse-alt:before {
+  content: "\f117";
+}
+.icon-smile:before {
+  content: "\f118";
+}
+.icon-frown:before {
+  content: "\f119";
+}
+.icon-meh:before {
+  content: "\f11a";
+}
+.icon-gamepad:before {
+  content: "\f11b";
+}
+.icon-keyboard:before {
+  content: "\f11c";
+}
+.icon-flag-alt:before {
+  content: "\f11d";
+}
+.icon-flag-checkered:before {
+  content: "\f11e";
+}
+.icon-terminal:before {
+  content: "\f120";
+}
+.icon-code:before {
+  content: "\f121";
+}
+.icon-reply-all:before {
+  content: "\f122";
+}
+.icon-mail-reply-all:before {
+  content: "\f122";
+}
+.icon-star-half-full:before,
+.icon-star-half-empty:before {
+  content: "\f123";
+}
+.icon-location-arrow:before {
+  content: "\f124";
+}
+.icon-crop:before {
+  content: "\f125";
+}
+.icon-code-fork:before {
+  content: "\f126";
+}
+.icon-unlink:before {
+  content: "\f127";
+}
+.icon-question:before {
+  content: "\f128";
+}
+.icon-info:before {
+  content: "\f129";
+}
+.icon-exclamation:before {
+  content: "\f12a";
+}
+.icon-superscript:before {
+  content: "\f12b";
+}
+.icon-subscript:before {
+  content: "\f12c";
+}
+.icon-eraser:before {
+  content: "\f12d";
+}
+.icon-puzzle-piece:before {
+  content: "\f12e";
+}
+.icon-microphone:before {
+  content: "\f130";
+}
+.icon-microphone-off:before {
+  content: "\f131";
+}
+.icon-shield:before {
+  content: "\f132";
+}
+.icon-calendar-empty:before {
+  content: "\f133";
+}
+.icon-fire-extinguisher:before {
+  content: "\f134";
+}
+.icon-rocket:before {
+  content: "\f135";
+}
+.icon-maxcdn:before {
+  content: "\f136";
+}
+.icon-chevron-sign-left:before {
+  content: "\f137";
+}
+.icon-chevron-sign-right:before {
+  content: "\f138";
+}
+.icon-chevron-sign-up:before {
+  content: "\f139";
+}
+.icon-chevron-sign-down:before {
+  content: "\f13a";
+}
+.icon-html5:before {
+  content: "\f13b";
+}
+.icon-css3:before {
+  content: "\f13c";
+}
+.icon-anchor:before {
+  content: "\f13d";
+}
+.icon-unlock-alt:before {
+  content: "\f13e";
+}
+.icon-bullseye:before {
+  content: "\f140";
+}
+.icon-ellipsis-horizontal:before {
+  content: "\f141";
+}
+.icon-ellipsis-vertical:before {
+  content: "\f142";
+}
+.icon-rss-sign:before {
+  content: "\f143";
+}
+.icon-play-sign:before {
+  content: "\f144";
+}
+.icon-ticket:before {
+  content: "\f145";
+}
+.icon-minus-sign-alt:before {
+  content: "\f146";
+}
+.icon-check-minus:before {
+  content: "\f147";
+}
+.icon-level-up:before {
+  content: "\f148";
+}
+.icon-level-down:before {
+  content: "\f149";
+}
+.icon-check-sign:before {
+  content: "\f14a";
+}
+.icon-edit-sign:before {
+  content: "\f14b";
+}
+.icon-external-link-sign:before {
+  content: "\f14c";
+}
+.icon-share-sign:before {
+  content: "\f14d";
+}
+.icon-compass:before {
+  content: "\f14e";
+}
+.icon-collapse:before {
+  content: "\f150";
+}
+.icon-collapse-top:before {
+  content: "\f151";
+}
+.icon-expand:before {
+  content: "\f152";
+}
+.icon-euro:before,
+.icon-eur:before {
+  content: "\f153";
+}
+.icon-gbp:before {
+  content: "\f154";
+}
+.icon-dollar:before,
+.icon-usd:before {
+  content: "\f155";
+}
+.icon-rupee:before,
+.icon-inr:before {
+  content: "\f156";
+}
+.icon-yen:before,
+.icon-jpy:before {
+  content: "\f157";
+}
+.icon-renminbi:before,
+.icon-cny:before {
+  content: "\f158";
+}
+.icon-won:before,
+.icon-krw:before {
+  content: "\f159";
+}
+.icon-bitcoin:before,
+.icon-btc:before {
+  content: "\f15a";
+}
+.icon-file:before {
+  content: "\f15b";
+}
+.icon-file-text:before {
+  content: "\f15c";
+}
+.icon-sort-by-alphabet:before {
+  content: "\f15d";
+}
+.icon-sort-by-alphabet-alt:before {
+  content: "\f15e";
+}
+.icon-sort-by-attributes:before {
+  content: "\f160";
+}
+.icon-sort-by-attributes-alt:before {
+  content: "\f161";
+}
+.icon-sort-by-order:before {
+  content: "\f162";
+}
+.icon-sort-by-order-alt:before {
+  content: "\f163";
+}
+.icon-thumbs-up:before {
+  content: "\f164";
+}
+.icon-thumbs-down:before {
+  content: "\f165";
+}
+.icon-youtube-sign:before {
+  content: "\f166";
+}
+.icon-youtube:before {
+  content: "\f167";
+}
+.icon-xing:before {
+  content: "\f168";
+}
+.icon-xing-sign:before {
+  content: "\f169";
+}
+.icon-youtube-play:before {
+  content: "\f16a";
+}
+.icon-dropbox:before {
+  content: "\f16b";
+}
+.icon-stackexchange:before {
+  content: "\f16c";
+}
+.icon-instagram:before {
+  content: "\f16d";
+}
+.icon-flickr:before {
+  content: "\f16e";
+}
+.icon-adn:before {
+  content: "\f170";
+}
+.icon-bitbucket:before {
+  content: "\f171";
+}
+.icon-bitbucket-sign:before {
+  content: "\f172";
+}
+.icon-tumblr:before {
+  content: "\f173";
+}
+.icon-tumblr-sign:before {
+  content: "\f174";
+}
+.icon-long-arrow-down:before {
+  content: "\f175";
+}
+.icon-long-arrow-up:before {
+  content: "\f176";
+}
+.icon-long-arrow-left:before {
+  content: "\f177";
+}
+.icon-long-arrow-right:before {
+  content: "\f178";
+}
+.icon-apple:before {
+  content: "\f179";
+}
+.icon-windows:before {
+  content: "\f17a";
+}
+.icon-android:before {
+  content: "\f17b";
+}
+.icon-linux:before {
+  content: "\f17c";
+}
+.icon-dribbble:before {
+  content: "\f17d";
+}
+.icon-skype:before {
+  content: "\f17e";
+}
+.icon-foursquare:before {
+  content: "\f180";
+}
+.icon-trello:before {
+  content: "\f181";
+}
+.icon-female:before {
+  content: "\f182";
+}
+.icon-male:before {
+  content: "\f183";
+}
+.icon-gittip:before {
+  content: "\f184";
+}
+.icon-sun:before {
+  content: "\f185";
+}
+.icon-moon:before {
+  content: "\f186";
+}
+.icon-archive:before {
+  content: "\f187";
+}
+.icon-bug:before {
+  content: "\f188";
+}
+.icon-vk:before {
+  content: "\f189";
+}
+.icon-weibo:before {
+  content: "\f18a";
+}
+.icon-renren:before {
+  content: "\f18b";
+}
diff --git a/www/styles/fontawesome-webfont.eot b/www/styles/fontawesome-webfont.eot
new file mode 100644 (file)
index 0000000..0662cb9
Binary files /dev/null and b/www/styles/fontawesome-webfont.eot differ
diff --git a/www/styles/fontawesome-webfont.svg b/www/styles/fontawesome-webfont.svg
new file mode 100644 (file)
index 0000000..2edb4ec
--- /dev/null
@@ -0,0 +1,399 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="fontawesomeregular" horiz-adv-x="1536" >
+<font-face units-per-em="1792" ascent="1536" descent="-256" />
+<missing-glyph horiz-adv-x="448" />
+<glyph unicode=" "  horiz-adv-x="448" />
+<glyph unicode="&#x09;" horiz-adv-x="448" />
+<glyph unicode="&#xa0;" horiz-adv-x="448" />
+<glyph unicode="&#xa8;" horiz-adv-x="1792" />
+<glyph unicode="&#xa9;" horiz-adv-x="1792" />
+<glyph unicode="&#xae;" horiz-adv-x="1792" />
+<glyph unicode="&#xb4;" horiz-adv-x="1792" />
+<glyph unicode="&#xc6;" horiz-adv-x="1792" />
+<glyph unicode="&#x2000;" horiz-adv-x="768" />
+<glyph unicode="&#x2001;" />
+<glyph unicode="&#x2002;" horiz-adv-x="768" />
+<glyph unicode="&#x2003;" />
+<glyph unicode="&#x2004;" horiz-adv-x="512" />
+<glyph unicode="&#x2005;" horiz-adv-x="384" />
+<glyph unicode="&#x2006;" horiz-adv-x="256" />
+<glyph unicode="&#x2007;" horiz-adv-x="256" />
+<glyph unicode="&#x2008;" horiz-adv-x="192" />
+<glyph unicode="&#x2009;" horiz-adv-x="307" />
+<glyph unicode="&#x200a;" horiz-adv-x="85" />
+<glyph unicode="&#x202f;" horiz-adv-x="307" />
+<glyph unicode="&#x205f;" horiz-adv-x="384" />
+<glyph unicode="&#x2122;" horiz-adv-x="1792" />
+<glyph unicode="&#x221e;" horiz-adv-x="1792" />
+<glyph unicode="&#x2260;" horiz-adv-x="1792" />
+<glyph unicode="&#xe000;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#xf000;" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
+<glyph unicode="&#xf001;" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf002;" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf003;" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf004;" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
+<glyph unicode="&#xf005;" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf006;" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf007;" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf008;" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf009;" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf00a;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00b;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00c;" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
+<glyph unicode="&#xf00d;" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
+<glyph unicode="&#xf00e;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf010;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
+<glyph unicode="&#xf011;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
+<glyph unicode="&#xf012;" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf013;" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
+<glyph unicode="&#xf014;" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf015;" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
+<glyph unicode="&#xf016;" horiz-adv-x="1280" d="M128 0h1024v768h-416q-40 0 -68 28t-28 68v416h-512v-1280zM768 896h376q-10 29 -22 41l-313 313q-12 12 -41 22v-376zM1280 864v-896q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h640q40 0 88 -20t76 -48l312 -312q28 -28 48 -76t20 -88z " />
+<glyph unicode="&#xf017;" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf018;" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
+<glyph unicode="&#xf019;" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
+<glyph unicode="&#xf01a;" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01b;" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01c;" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
+<glyph unicode="&#xf01d;" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01e;" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
+<glyph unicode="&#xf021;" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf022;" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
+<glyph unicode="&#xf023;" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf024;" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf025;" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
+<glyph unicode="&#xf026;" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf027;" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
+<glyph unicode="&#xf028;" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
+<glyph unicode="&#xf029;" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
+<glyph unicode="&#xf02a;" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
+<glyph unicode="&#xf02b;" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02c;" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02d;" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
+<glyph unicode="&#xf02e;" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf02f;" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
+<glyph unicode="&#xf030;" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf031;" horiz-adv-x="1664" d="M725 977l-170 -450q73 -1 153.5 -2t119 -1.5t52.5 -0.5l29 2q-32 95 -92 241q-53 132 -92 211zM21 -128h-21l2 79q22 7 80 18q89 16 110 31q20 16 48 68l237 616l280 724h75h53l11 -21l205 -480q103 -242 124 -297q39 -102 96 -235q26 -58 65 -164q24 -67 65 -149 q22 -49 35 -57q22 -19 69 -23q47 -6 103 -27q6 -39 6 -57q0 -14 -1 -26q-80 0 -192 8q-93 8 -189 8q-79 0 -135 -2l-200 -11l-58 -2q0 45 4 78l131 28q56 13 68 23q12 12 12 27t-6 32l-47 114l-92 228l-450 2q-29 -65 -104 -274q-23 -64 -23 -84q0 -31 17 -43 q26 -21 103 -32q3 0 13.5 -2t30 -5t40.5 -6q1 -28 1 -58q0 -17 -2 -27q-66 0 -349 20l-48 -8q-81 -14 -167 -14z" />
+<glyph unicode="&#xf032;" horiz-adv-x="1408" d="M555 15q76 -32 140 -32q131 0 216 41t122 113q38 70 38 181q0 114 -41 180q-58 94 -141 126q-80 32 -247 32q-74 0 -101 -10v-144l-1 -173l3 -270q0 -15 12 -44zM541 761q43 -7 109 -7q175 0 264 65t89 224q0 112 -85 187q-84 75 -255 75q-52 0 -130 -13q0 -44 2 -77 q7 -122 6 -279l-1 -98q0 -43 1 -77zM0 -128l2 94q45 9 68 12q77 12 123 31q17 27 21 51q9 66 9 194l-2 497q-5 256 -9 404q-1 87 -11 109q-1 4 -12 12q-18 12 -69 15q-30 2 -114 13l-4 83l260 6l380 13l45 1q5 0 14 0.5t14 0.5q1 0 21.5 -0.5t40.5 -0.5h74q88 0 191 -27 q43 -13 96 -39q57 -29 102 -76q44 -47 65 -104t21 -122q0 -70 -32 -128t-95 -105q-26 -20 -150 -77q177 -41 267 -146q92 -106 92 -236q0 -76 -29 -161q-21 -62 -71 -117q-66 -72 -140 -108q-73 -36 -203 -60q-82 -15 -198 -11l-197 4q-84 2 -298 -11q-33 -3 -272 -11z" />
+<glyph unicode="&#xf033;" horiz-adv-x="1024" d="M0 -126l17 85q4 1 77 20q76 19 116 39q29 37 41 101l27 139l56 268l12 64q8 44 17 84.5t16 67t12.5 46.5t9 30.5t3.5 11.5l29 157l16 63l22 135l8 50v38q-41 22 -144 28q-28 2 -38 4l19 103l317 -14q39 -2 73 -2q66 0 214 9q33 2 68 4.5t36 2.5q-2 -19 -6 -38 q-7 -29 -13 -51q-55 -19 -109 -31q-64 -16 -101 -31q-12 -31 -24 -88q-9 -44 -13 -82q-44 -199 -66 -306l-61 -311l-38 -158l-43 -235l-12 -45q-2 -7 1 -27q64 -15 119 -21q36 -5 66 -10q-1 -29 -7 -58q-7 -31 -9 -41q-18 0 -23 -1q-24 -2 -42 -2q-9 0 -28 3q-19 4 -145 17 l-198 2q-41 1 -174 -11q-74 -7 -98 -9z" />
+<glyph unicode="&#xf034;" horiz-adv-x="1792" d="M81 1407l54 -27q20 -5 211 -5h130l19 3l115 1l215 -1h293l34 -2q14 -1 28 7t21 16l7 8l42 1q15 0 28 -1v-104.5t1 -131.5l1 -100l-1 -58q0 -32 -4 -51q-39 -15 -68 -18q-25 43 -54 128q-8 24 -15.5 62.5t-11.5 65.5t-6 29q-13 15 -27 19q-7 2 -42.5 2t-103.5 -1t-111 -1 q-34 0 -67 -5q-10 -97 -8 -136l1 -152v-332l3 -359l-1 -147q-1 -46 11 -85q49 -25 89 -32q2 0 18 -5t44 -13t43 -12q30 -8 50 -18q5 -45 5 -50q0 -10 -3 -29q-14 -1 -34 -1q-110 0 -187 10q-72 8 -238 8q-88 0 -233 -14q-48 -4 -70 -4q-2 22 -2 26l-1 26v9q21 33 79 49 q139 38 159 50q9 21 12 56q8 192 6 433l-5 428q-1 62 -0.5 118.5t0.5 102.5t-2 57t-6 15q-6 5 -14 6q-38 6 -148 6q-43 0 -100 -13.5t-73 -24.5q-13 -9 -22 -33t-22 -75t-24 -84q-6 -19 -19.5 -32t-20.5 -13q-44 27 -56 44v297v86zM1744 128q33 0 42 -18.5t-11 -44.5 l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80z" />
+<glyph unicode="&#xf035;" d="M81 1407l54 -27q20 -5 211 -5h130l19 3l115 1l446 -1h318l34 -2q14 -1 28 7t21 16l7 8l42 1q15 0 28 -1v-104.5t1 -131.5l1 -100l-1 -58q0 -32 -4 -51q-39 -15 -68 -18q-25 43 -54 128q-8 24 -15.5 62.5t-11.5 65.5t-6 29q-13 15 -27 19q-7 2 -58.5 2t-138.5 -1t-128 -1 q-94 0 -127 -5q-10 -97 -8 -136l1 -152v52l3 -359l-1 -147q-1 -46 11 -85q49 -25 89 -32q2 0 18 -5t44 -13t43 -12q30 -8 50 -18q5 -45 5 -50q0 -10 -3 -29q-14 -1 -34 -1q-110 0 -187 10q-72 8 -238 8q-82 0 -233 -13q-45 -5 -70 -5q-2 22 -2 26l-1 26v9q21 33 79 49 q139 38 159 50q9 21 12 56q6 137 6 433l-5 44q0 265 -2 278q-2 11 -6 15q-6 5 -14 6q-38 6 -148 6q-50 0 -168.5 -14t-132.5 -24q-13 -9 -22 -33t-22 -75t-24 -84q-6 -19 -19.5 -32t-20.5 -13q-44 27 -56 44v297v86zM1505 113q26 -20 26 -49t-26 -49l-162 -126 q-26 -20 -44.5 -11t-18.5 42v80h-1024v-80q0 -33 -18.5 -42t-44.5 11l-162 126q-26 20 -26 49t26 49l162 126q26 20 44.5 11t18.5 -42v-80h1024v80q0 33 18.5 42t44.5 -11z" />
+<glyph unicode="&#xf036;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf037;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf038;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf039;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf03a;" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03b;" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03c;" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03d;" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
+<glyph unicode="&#xf03e;" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf040;" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
+<glyph unicode="&#xf041;" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
+<glyph unicode="&#xf042;" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf043;" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
+<glyph unicode="&#xf044;" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
+<glyph unicode="&#xf045;" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf046;" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
+<glyph unicode="&#xf047;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf048;" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
+<glyph unicode="&#xf049;" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
+<glyph unicode="&#xf04a;" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
+<glyph unicode="&#xf04b;" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
+<glyph unicode="&#xf04c;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04d;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04e;" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf050;" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf051;" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
+<glyph unicode="&#xf052;" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
+<glyph unicode="&#xf053;" horiz-adv-x="1152" d="M742 -37l-652 651q-37 37 -37 90.5t37 90.5l652 651q37 37 90.5 37t90.5 -37l75 -75q37 -37 37 -90.5t-37 -90.5l-486 -486l486 -485q37 -38 37 -91t-37 -90l-75 -75q-37 -37 -90.5 -37t-90.5 37z" />
+<glyph unicode="&#xf054;" horiz-adv-x="1152" d="M1099 704q0 -52 -37 -91l-652 -651q-37 -37 -90 -37t-90 37l-76 75q-37 39 -37 91q0 53 37 90l486 486l-486 485q-37 39 -37 91q0 53 37 90l76 75q36 38 90 38t90 -38l652 -651q37 -37 37 -90z" />
+<glyph unicode="&#xf055;" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf056;" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
+<glyph unicode="&#xf057;" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf058;" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf059;" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05a;" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05b;" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf05c;" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05d;" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05e;" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
+<glyph unicode="&#xf060;" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
+<glyph unicode="&#xf061;" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
+<glyph unicode="&#xf062;" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
+<glyph unicode="&#xf063;" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
+<glyph unicode="&#xf064;" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
+<glyph unicode="&#xf065;" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf066;" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
+<glyph unicode="&#xf067;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf068;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf069;" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
+<glyph unicode="&#xf06a;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
+<glyph unicode="&#xf06b;" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf06c;" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
+<glyph unicode="&#xf06d;" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
+<glyph unicode="&#xf06e;" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
+<glyph unicode="&#xf070;" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
+<glyph unicode="&#xf071;" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
+<glyph unicode="&#xf072;" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
+<glyph unicode="&#xf073;" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf074;" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf075;" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf076;" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf077;" horiz-adv-x="1664" d="M1611 320q0 -53 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-486 485l-486 -485q-36 -38 -90 -38t-90 38l-75 75q-38 36 -38 90q0 53 38 91l651 651q37 37 90 37q52 0 91 -37l650 -651q38 -38 38 -91z" />
+<glyph unicode="&#xf078;" horiz-adv-x="1664" d="M1611 832q0 -53 -37 -90l-651 -651q-38 -38 -91 -38q-54 0 -90 38l-651 651q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l486 -486l486 486q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
+<glyph unicode="&#xf079;" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
+<glyph unicode="&#xf07a;" horiz-adv-x="1664" d="M640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5 l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5 t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf07b;" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07c;" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07d;" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf07e;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf080;" horiz-adv-x="1920" d="M512 512v-384h-256v384h256zM896 1024v-896h-256v896h256zM1280 768v-640h-256v640h256zM1664 1152v-1024h-256v1024h256zM1792 32v1216q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5z M1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf081;" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf082;" d="M1307 618l23 219h-198v109q0 49 15.5 68.5t71.5 19.5h110v219h-175q-152 0 -218 -72t-66 -213v-131h-131v-219h131v-635h262v635h175zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf083;" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf084;" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
+<glyph unicode="&#xf085;" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
+<glyph unicode="&#xf086;" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
+<glyph unicode="&#xf087;" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf088;" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
+<glyph unicode="&#xf089;" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
+<glyph unicode="&#xf08a;" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
+<glyph unicode="&#xf08b;" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
+<glyph unicode="&#xf08c;" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf08d;" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
+<glyph unicode="&#xf08e;" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf090;" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf091;" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf092;" d="M394 184q-8 -9 -20 3q-13 11 -4 19q8 9 20 -3q12 -11 4 -19zM352 245q9 -12 0 -19q-8 -6 -17 7t0 18q9 7 17 -6zM291 305q-5 -7 -13 -2q-10 5 -7 12q3 5 13 2q10 -5 7 -12zM322 271q-6 -7 -16 3q-9 11 -2 16q6 6 16 -3q9 -11 2 -16zM451 159q-4 -12 -19 -6q-17 4 -13 15 t19 7q16 -5 13 -16zM514 154q0 -11 -16 -11q-17 -2 -17 11q0 11 16 11q17 2 17 -11zM572 164q2 -10 -14 -14t-18 8t14 15q16 2 18 -9zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39 t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103 q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5 h-224q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf093;" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
+<glyph unicode="&#xf094;" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
+<glyph unicode="&#xf095;" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
+<glyph unicode="&#xf096;" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf097;" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf098;" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf099;" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
+<glyph unicode="&#xf09a;" horiz-adv-x="768" d="M511 980h257l-30 -284h-227v-824h-341v824h-170v284h170v171q0 182 86 275.5t283 93.5h227v-284h-142q-39 0 -62.5 -6.5t-34 -23.5t-13.5 -34.5t-3 -49.5v-142z" />
+<glyph unicode="&#xf09b;" d="M1536 640q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5 q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23 q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf09c;" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="&#xf09d;" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
+<glyph unicode="&#xf09e;" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
+<glyph unicode="&#xf0a0;" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
+<glyph unicode="&#xf0a1;" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
+<glyph unicode="&#xf0a2;" horiz-adv-x="1664" d="M848 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM183 128h1298q-164 181 -246.5 411.5t-82.5 484.5q0 256 -320 256t-320 -256q0 -254 -82.5 -484.5t-246.5 -411.5zM1664 128q0 -52 -38 -90t-90 -38 h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q190 161 287 397.5t97 498.5q0 165 96 262t264 117q-8 18 -8 37q0 40 28 68t68 28t68 -28t28 -68q0 -19 -8 -37q168 -20 264 -117t96 -262q0 -262 97 -498.5t287 -397.5z" />
+<glyph unicode="&#xf0a3;" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
+<glyph unicode="&#xf0a4;" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf0a5;" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf0a6;" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
+<glyph unicode="&#xf0a7;" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
+<glyph unicode="&#xf0a8;" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0a9;" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0aa;" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ab;" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ac;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
+<glyph unicode="&#xf0ad;" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" />
+<glyph unicode="&#xf0ae;" horiz-adv-x="1792" d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0b0;" horiz-adv-x="1408" d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" />
+<glyph unicode="&#xf0b1;" horiz-adv-x="1792" d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf0b2;" d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z " />
+<glyph unicode="&#xf0c0;" horiz-adv-x="1920" d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" />
+<glyph unicode="&#xf0c1;" horiz-adv-x="1664" d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" />
+<glyph unicode="&#xf0c2;" horiz-adv-x="1920" d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z " />
+<glyph unicode="&#xf0c3;" horiz-adv-x="1664" d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" />
+<glyph unicode="&#xf0c4;" horiz-adv-x="1792" d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" />
+<glyph unicode="&#xf0c5;" horiz-adv-x="1792" d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" />
+<glyph unicode="&#xf0c6;" horiz-adv-x="1408" d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 z" />
+<glyph unicode="&#xf0c7;" d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0c8;" d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0c9;" d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0ca;" horiz-adv-x="1792" d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf0cb;" horiz-adv-x="1792" d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 122t0.5 121v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5 t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf0cc;" horiz-adv-x="1792" d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 97 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -55 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" />
+<glyph unicode="&#xf0cd;" d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" />
+<glyph unicode="&#xf0ce;" horiz-adv-x="1664" d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 z" />
+<glyph unicode="&#xf0d0;" horiz-adv-x="1664" d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" />
+<glyph unicode="&#xf0d1;" horiz-adv-x="1792" d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d2;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0d3;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" />
+<glyph unicode="&#xf0d4;" d="M678 -57q0 -38 -10 -71h-380q-95 0 -171.5 56.5t-103.5 147.5q24 45 69 77.5t100 49.5t107 24t107 7q32 0 49 -2q6 -4 30.5 -21t33 -23t31 -23t32 -25.5t27.5 -25.5t26.5 -29.5t21 -30.5t17.5 -34.5t9.5 -36t4.5 -40.5zM385 294q-234 -7 -385 -85v433q103 -118 273 -118 q32 0 70 5q-21 -61 -21 -86q0 -67 63 -149zM558 805q0 -100 -43.5 -160.5t-140.5 -60.5q-51 0 -97 26t-78 67.5t-56 93.5t-35.5 104t-11.5 99q0 96 51.5 165t144.5 69q66 0 119 -41t84 -104t47 -130t16 -128zM1536 896v-736q0 -119 -84.5 -203.5t-203.5 -84.5h-468 q39 73 39 157q0 66 -22 122.5t-55.5 93t-72 71t-72 59.5t-55.5 54.5t-22 59.5q0 36 23 68t56 61.5t65.5 64.5t55.5 93t23 131t-26.5 145.5t-75.5 118.5q-6 6 -14 11t-12.5 7.5t-10 9.5t-10.5 17h135l135 64h-437q-138 0 -244.5 -38.5t-182.5 -133.5q0 126 81 213t207 87h960 q119 0 203.5 -84.5t84.5 -203.5v-96h-256v256h-128v-256h-256v-128h256v-256h128v256h256z" />
+<glyph unicode="&#xf0d5;" horiz-adv-x="1664" d="M876 71q0 21 -4.5 40.5t-9.5 36t-17.5 34.5t-21 30.5t-26.5 29.5t-27.5 25.5t-32 25.5t-31 23t-33 23t-30.5 21q-17 2 -50 2q-54 0 -106 -7t-108 -25t-98 -46t-69 -75t-27 -107q0 -68 35.5 -121.5t93 -84t120.5 -45.5t127 -15q59 0 112.5 12.5t100.5 39t74.5 73.5 t27.5 110zM756 933q0 60 -16.5 127.5t-47 130.5t-84 104t-119.5 41q-93 0 -144 -69t-51 -165q0 -47 11.5 -99t35.5 -104t56 -93.5t78 -67.5t97 -26q97 0 140.5 60.5t43.5 160.5zM625 1408h437l-135 -79h-135q71 -45 110 -126t39 -169q0 -74 -23 -131.5t-56 -92.5t-66 -64.5 t-56 -61t-23 -67.5q0 -26 16.5 -51t43 -48t58.5 -48t64 -55.5t58.5 -66t43 -85t16.5 -106.5q0 -160 -140 -282q-152 -131 -420 -131q-59 0 -119.5 10t-122 33.5t-108.5 58t-77 89t-30 121.5q0 61 37 135q32 64 96 110.5t145 71t155 36t150 13.5q-64 83 -64 149q0 12 2 23.5 t5 19.5t8 21.5t7 21.5q-40 -5 -70 -5q-149 0 -255.5 98t-106.5 246q0 140 95 250.5t234 141.5q94 20 187 20zM1664 1152v-128h-256v-256h-128v256h-256v128h256v256h128v-256h256z" />
+<glyph unicode="&#xf0d6;" horiz-adv-x="1920" d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d7;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d8;" horiz-adv-x="1024" d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0d9;" horiz-adv-x="640" d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf0da;" horiz-adv-x="640" d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0db;" horiz-adv-x="1664" d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf0dc;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0dd;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0de;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0e0;" horiz-adv-x="1792" d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" />
+<glyph unicode="&#xf0e1;" d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" />
+<glyph unicode="&#xf0e2;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" />
+<glyph unicode="&#xf0e3;" horiz-adv-x="1792" d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" />
+<glyph unicode="&#xf0e4;" horiz-adv-x="1792" d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf0e5;" horiz-adv-x="1792" d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf0e6;" horiz-adv-x="1792" d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" />
+<glyph unicode="&#xf0e7;" horiz-adv-x="896" d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" />
+<glyph unicode="&#xf0e8;" horiz-adv-x="1792" d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 z" />
+<glyph unicode="&#xf0e9;" horiz-adv-x="1664" d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf0ea;" horiz-adv-x="1792" d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0eb;" horiz-adv-x="1024" d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" />
+<glyph unicode="&#xf0ec;" horiz-adv-x="1792" d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf0ed;" horiz-adv-x="1920" d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="&#xf0ee;" horiz-adv-x="1920" d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="&#xf0f0;" horiz-adv-x="1408" d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf0f1;" horiz-adv-x="1408" d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="&#xf0f2;" horiz-adv-x="1792" d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 t66 -158z" />
+<glyph unicode="&#xf0f3;" horiz-adv-x="1664" d="M848 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1664 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q190 161 287 397.5t97 498.5 q0 165 96 262t264 117q-8 18 -8 37q0 40 28 68t68 28t68 -28t28 -68q0 -19 -8 -37q168 -20 264 -117t96 -262q0 -262 97 -498.5t287 -397.5z" />
+<glyph unicode="&#xf0f4;" horiz-adv-x="1920" d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf0f5;" horiz-adv-x="1408" d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f6;" horiz-adv-x="1280" d="M1024 352v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23 -9t9 -23zM1024 608v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23 -9t9 -23zM128 0h1024v768h-416q-40 0 -68 28t-28 68v416h-512v-1280z M768 896h376q-10 29 -22 41l-313 313q-12 12 -41 22v-376zM1280 864v-896q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h640q40 0 88 -20t76 -48l312 -312q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0f7;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f8;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f9;" horiz-adv-x="1920" d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0fa;" horiz-adv-x="1792" d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf0fb;" horiz-adv-x="1920" d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q261 -58 287 -93z" />
+<glyph unicode="&#xf0fc;" horiz-adv-x="1664" d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" />
+<glyph unicode="&#xf0fd;" d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0fe;" d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf100;" horiz-adv-x="1024" d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" />
+<glyph unicode="&#xf101;" horiz-adv-x="1024" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf102;" horiz-adv-x="1152" d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf103;" horiz-adv-x="1152" d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf104;" horiz-adv-x="640" d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf105;" horiz-adv-x="640" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf106;" horiz-adv-x="1152" d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf107;" horiz-adv-x="1152" d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf108;" horiz-adv-x="1920" d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf109;" horiz-adv-x="1920" d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" />
+<glyph unicode="&#xf10a;" horiz-adv-x="1152" d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf10b;" horiz-adv-x="768" d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf10c;" d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf10d;" horiz-adv-x="1664" d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" />
+<glyph unicode="&#xf10e;" horiz-adv-x="1664" d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" />
+<glyph unicode="&#xf110;" horiz-adv-x="1568" d="M496 192q0 -60 -42.5 -102t-101.5 -42q-60 0 -102 42t-42 102t42 102t102 42q59 0 101.5 -42t42.5 -102zM928 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -66 -47 -113t-113 -47t-113 47t-47 113 t47 113t113 47t113 -47t47 -113zM1360 192q0 -46 -33 -79t-79 -33t-79 33t-33 79t33 79t79 33t79 -33t33 -79zM528 1088q0 -73 -51.5 -124.5t-124.5 -51.5t-124.5 51.5t-51.5 124.5t51.5 124.5t124.5 51.5t124.5 -51.5t51.5 -124.5zM992 1280q0 -80 -56 -136t-136 -56 t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1536 640q0 -40 -28 -68t-68 -28t-68 28t-28 68t28 68t68 28t68 -28t28 -68zM1328 1088q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5z" />
+<glyph unicode="&#xf111;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf112;" horiz-adv-x="1792" d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" />
+<glyph unicode="&#xf113;" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" />
+<glyph unicode="&#xf114;" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf115;" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " />
+<glyph unicode="&#xf116;" horiz-adv-x="1152" d="M896 608v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224h224q14 0 23 -9t9 -23zM1024 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 -28 t-28 -68v-704q0 -40 28 -68t68 -28h704q40 0 68 28t28 68zM1152 928v-704q0 -92 -65.5 -158t-158.5 -66h-704q-93 0 -158.5 66t-65.5 158v704q0 93 65.5 158.5t158.5 65.5h704q93 0 158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf117;" horiz-adv-x="1152" d="M928 1152q93 0 158.5 -65.5t65.5 -158.5v-704q0 -92 -65.5 -158t-158.5 -66h-704q-93 0 -158.5 66t-65.5 158v704q0 93 65.5 158.5t158.5 65.5h704zM1024 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 -28t-28 -68v-704q0 -40 28 -68t68 -28h704q40 0 68 28t28 68z M864 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576z" />
+<glyph unicode="&#xf118;" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf119;" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf11a;" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf11b;" horiz-adv-x="1920" d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" />
+<glyph unicode="&#xf11c;" horiz-adv-x="1920" d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf11d;" horiz-adv-x="1792" d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="&#xf11e;" horiz-adv-x="1792" d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="&#xf120;" horiz-adv-x="1664" d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 t9 -23z" />
+<glyph unicode="&#xf121;" horiz-adv-x="1920" d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" />
+<glyph unicode="&#xf122;" horiz-adv-x="1792" d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" />
+<glyph unicode="&#xf123;" horiz-adv-x="1664" d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" />
+<glyph unicode="&#xf124;" horiz-adv-x="1408" d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" />
+<glyph unicode="&#xf125;" horiz-adv-x="1664" d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf126;" horiz-adv-x="1024" d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 q-2 -287 -226 -414q-68 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="&#xf127;" horiz-adv-x="1664" d="M439 265l-256 -256q-10 -9 -23 -9q-12 0 -23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="&#xf128;" horiz-adv-x="1024" d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" />
+<glyph unicode="&#xf129;" horiz-adv-x="640" d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf12a;" horiz-adv-x="640" d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" />
+<glyph unicode="&#xf12b;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1534 846v-206h-514l-3 27 q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5t-65.5 -51.5t-30.5 -63h232v80 h126z" />
+<glyph unicode="&#xf12c;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1536 -50v-206h-514l-4 27 q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73h232v80h126z" />
+<glyph unicode="&#xf12d;" horiz-adv-x="1920" d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" />
+<glyph unicode="&#xf12e;" horiz-adv-x="1664" d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" />
+<glyph unicode="&#xf130;" horiz-adv-x="1152" d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" />
+<glyph unicode="&#xf131;" horiz-adv-x="1408" d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" />
+<glyph unicode="&#xf132;" horiz-adv-x="1280" d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf133;" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf134;" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
+<glyph unicode="&#xf135;" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
+<glyph unicode="&#xf136;" horiz-adv-x="1792" d="M1708 881l-188 -881h-304l181 849q4 21 1 43q-4 20 -16 35q-10 14 -28 24q-18 9 -40 9h-197l-205 -960h-303l204 960h-304l-205 -960h-304l272 1280h1139q157 0 245 -118q86 -116 52 -281z" />
+<glyph unicode="&#xf137;" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf138;" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf139;" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf13a;" d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf13b;" horiz-adv-x="1408" d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" />
+<glyph unicode="&#xf13c;" horiz-adv-x="1792" d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" />
+<glyph unicode="&#xf13d;" horiz-adv-x="1792" d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-13 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf13e;" horiz-adv-x="1152" d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 v-320h736z" />
+<glyph unicode="&#xf140;" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf141;" horiz-adv-x="1408" d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf142;" horiz-adv-x="384" d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf143;" d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 232 -177 396t-396 177q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128q13 0 23 10 t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf144;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 q16 -8 32 -8q17 0 32 9z" />
+<glyph unicode="&#xf145;" horiz-adv-x="1792" d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" />
+<glyph unicode="&#xf146;" d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="&#xf147;" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf148;" horiz-adv-x="1024" d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" />
+<glyph unicode="&#xf149;" horiz-adv-x="1024" d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" />
+<glyph unicode="&#xf14a;" d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14b;" d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14c;" d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14d;" d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q10 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14e;" d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf150;" d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf151;" d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf152;" d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf153;" horiz-adv-x="1024" d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" />
+<glyph unicode="&#xf154;" horiz-adv-x="1024" d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" />
+<glyph unicode="&#xf155;" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" />
+<glyph unicode="&#xf156;" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf157;" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
+<glyph unicode="&#xf158;" horiz-adv-x="1664" d="M1664 352v-32q0 -132 -94 -226t-226 -94h-128q-132 0 -226 94t-94 226v480h-224q-2 -102 -14.5 -190.5t-30.5 -156t-48.5 -126.5t-57 -99.5t-67.5 -77.5t-69.5 -58.5t-74 -44t-69 -32t-65.5 -25.5q-4 -2 -32 -13q-8 -2 -12 -2q-22 0 -30 20l-71 178q-5 13 0 25t17 17 q7 3 20 7.5t18 6.5q31 12 46.5 18.5t44.5 20t45.5 26t42 32.5t40.5 42.5t34.5 53.5t30.5 68.5t22.5 83.5t17 103t6.5 123h-256q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h1216q14 0 23 -9t9 -23v-160q0 -14 -9 -23t-23 -9h-224v-512q0 -26 19 -45t45 -19h128q26 0 45 19t19 45 v64q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1280 1376v-160q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h960q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf159;" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf15a;" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
+<glyph unicode="&#xf15b;" horiz-adv-x="1280" d="M1280 768v-800q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h544v-544q0 -40 28 -68t68 -28h544zM1277 896h-509v509q82 -15 132 -65l312 -312q50 -50 65 -132z" />
+<glyph unicode="&#xf15c;" horiz-adv-x="1280" d="M1024 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1024 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1280 768v-800q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28 t-28 68v1344q0 40 28 68t68 28h544v-544q0 -40 28 -68t68 -28h544zM1277 896h-509v509q82 -15 132 -65l312 -312q50 -50 65 -132z" />
+<glyph unicode="&#xf15d;" horiz-adv-x="1664" d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 l230 -662h70z" />
+<glyph unicode="&#xf15e;" horiz-adv-x="1664" d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 v119h121z" />
+<glyph unicode="&#xf160;" horiz-adv-x="1792" d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf161;" horiz-adv-x="1792" d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf162;" d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" />
+<glyph unicode="&#xf163;" d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" />
+<glyph unicode="&#xf164;" horiz-adv-x="1664" d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" />
+<glyph unicode="&#xf165;" horiz-adv-x="1664" d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" />
+<glyph unicode="&#xf166;" d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 16 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 q21 -28 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78l24 -69t23 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38q-51 0 -78 -38 q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf167;" d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-37 -51 -106 -51q-67 0 -105 51 q-28 38 -28 118v175q0 80 28 117q38 51 105 51q69 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" />
+<glyph unicode="&#xf168;" horiz-adv-x="1408" d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 q25 45 64 45h241q22 0 31 -15z" />
+<glyph unicode="&#xf169;" d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf16a;" horiz-adv-x="1792" d="M1280 640q0 37 -30 54l-512 320q-31 20 -65 2q-33 -18 -33 -56v-640q0 -38 33 -56q16 -8 31 -8q20 0 34 10l512 320q30 17 30 54zM1792 640q0 -96 -1 -150t-8.5 -136.5t-22.5 -147.5q-16 -73 -69 -123t-124 -58q-222 -25 -671 -25t-671 25q-71 8 -124.5 58t-69.5 123 q-14 65 -21.5 147.5t-8.5 136.5t-1 150t1 150t8.5 136.5t22.5 147.5q16 73 69 123t124 58q222 25 671 25t671 -25q71 -8 124.5 -58t69.5 -123q14 -65 21.5 -147.5t8.5 -136.5t1 -150z" />
+<glyph unicode="&#xf16b;" horiz-adv-x="1792" d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" />
+<glyph unicode="&#xf16c;" horiz-adv-x="1408" d="M928 135v-151l-707 -1v151zM1169 481v-701l-1 -35v-1h-1132l-35 1h-1v736h121v-618h928v618h120zM241 393l704 -65l-13 -150l-705 65zM309 709l683 -183l-39 -146l-683 183zM472 1058l609 -360l-77 -130l-609 360zM832 1389l398 -585l-124 -85l-399 584zM1285 1536 l121 -697l-149 -26l-121 697z" />
+<glyph unicode="&#xf16d;" d="M1362 110v648h-135q20 -63 20 -131q0 -126 -64 -232.5t-174 -168.5t-240 -62q-197 0 -337 135.5t-140 327.5q0 68 20 131h-141v-648q0 -26 17.5 -43.5t43.5 -17.5h1069q25 0 43 17.5t18 43.5zM1078 643q0 124 -90.5 211.5t-218.5 87.5q-127 0 -217.5 -87.5t-90.5 -211.5 t90.5 -211.5t217.5 -87.5q128 0 218.5 87.5t90.5 211.5zM1362 1003v165q0 28 -20 48.5t-49 20.5h-174q-29 0 -49 -20.5t-20 -48.5v-165q0 -29 20 -49t49 -20h174q29 0 49 20t20 49zM1536 1211v-1142q0 -81 -58 -139t-139 -58h-1142q-81 0 -139 58t-58 139v1142q0 81 58 139 t139 58h1142q81 0 139 -58t58 -139z" />
+<glyph unicode="&#xf16e;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" />
+<glyph unicode="&#xf170;" d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf171;" horiz-adv-x="1408" d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" />
+<glyph unicode="&#xf172;" d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf173;" horiz-adv-x="1024" d="M390 1408h219v-388h364v-241h-364v-394q0 -136 14 -172q13 -37 52 -60q50 -31 117 -31q117 0 232 76v-242q-102 -48 -178 -65q-77 -19 -173 -19q-105 0 -186 27q-78 25 -138 75q-58 51 -79 105q-22 54 -22 161v539h-170v217q91 30 155 84q64 55 103 132q39 78 54 196z " />
+<glyph unicode="&#xf174;" d="M1123 127v181q-88 -56 -174 -56q-51 0 -88 23q-29 17 -39 45q-11 30 -11 129v295h274v181h-274v291h-164q-11 -90 -40 -147t-78 -99q-48 -40 -116 -63v-163h127v-404q0 -78 17 -121q17 -42 59 -78q43 -37 104 -57q62 -20 140 -20q67 0 129 14q57 13 134 49zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf175;" horiz-adv-x="768" d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" />
+<glyph unicode="&#xf176;" horiz-adv-x="768" d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" />
+<glyph unicode="&#xf177;" horiz-adv-x="1792" d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf178;" horiz-adv-x="1792" d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" />
+<glyph unicode="&#xf179;" horiz-adv-x="1408" d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q112 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" />
+<glyph unicode="&#xf17a;" horiz-adv-x="1664" d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" />
+<glyph unicode="&#xf17b;" horiz-adv-x="1408" d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" />
+<glyph unicode="&#xf17c;" d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-7 -10 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18l-4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-14 -1 -7 -7l4 -2 q14 -4 18 -31q0 -3 8 2zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5t-30 -18.5 t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43q-19 4 -51 9.5 t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49t-14 -48 q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54q110 143 124 195 q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5t-40.5 -33.5t-61 -14 q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5t15.5 47.5q1 -31 8 -56.5 t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" />
+<glyph unicode="&#xf17d;" d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -6 6.5 -17.5t7.5 -16.5q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf17e;" d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" />
+<glyph unicode="&#xf180;" horiz-adv-x="1664" d="M1483 512l-587 -587q-52 -53 -127.5 -53t-128.5 53l-587 587q-53 53 -53 128t53 128l587 587q53 53 128 53t128 -53l265 -265l-398 -399l-188 188q-42 42 -99 42q-59 0 -100 -41l-120 -121q-42 -40 -42 -99q0 -58 42 -100l406 -408q30 -28 67 -37l6 -4h28q60 0 99 41 l619 619l2 -3q53 -53 53 -128t-53 -128zM1406 1138l120 -120q14 -15 14 -36t-14 -36l-730 -730q-17 -15 -37 -15v0q-4 0 -6 1q-18 2 -30 14l-407 408q-14 15 -14 36t14 35l121 120q13 15 35 15t36 -15l252 -252l574 575q15 15 36 15t36 -15z" />
+<glyph unicode="&#xf181;" d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf182;" horiz-adv-x="1280" d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf183;" horiz-adv-x="1024" d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf184;" d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf185;" horiz-adv-x="1792" d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" />
+<glyph unicode="&#xf186;" d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" />
+<glyph unicode="&#xf187;" horiz-adv-x="1792" d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf188;" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
+<glyph unicode="&#xf189;" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" />
+<glyph unicode="&#xf18a;" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
+<glyph unicode="&#xf18b;" horiz-adv-x="1920" d="M805 163q-122 -67 -261 -67q-141 0 -261 67q98 61 167 149t94 191q25 -103 94 -191t167 -149zM453 1176v-344q0 -179 -89.5 -326t-234.5 -217q-129 152 -129 351q0 200 129.5 352t323.5 184zM958 991q-128 -152 -128 -351q0 -201 128 -351q-145 70 -234.5 218t-89.5 328 v341q196 -33 324 -185zM1638 163q-122 -67 -261 -67q-141 0 -261 67q98 61 167 149t94 191q25 -103 94 -191t167 -149zM1286 1176v-344q0 -179 -91 -326t-237 -217v0q133 154 133 351q0 195 -133 351q129 151 328 185zM1920 640q0 -201 -129 -351q-145 70 -234.5 218 t-89.5 328v341q194 -32 323.5 -184t129.5 -352z" />
+<glyph unicode="&#xf18c;" horiz-adv-x="1792" />
+<glyph unicode="&#xf18d;" horiz-adv-x="1792" />
+<glyph unicode="&#xf18e;" horiz-adv-x="1792" />
+<glyph unicode="&#xf500;" horiz-adv-x="1792" />
+</font>
+</defs></svg> 
\ No newline at end of file
diff --git a/www/styles/fontawesome-webfont.ttf b/www/styles/fontawesome-webfont.ttf
new file mode 100644 (file)
index 0000000..d365924
Binary files /dev/null and b/www/styles/fontawesome-webfont.ttf differ
diff --git a/www/styles/fontawesome-webfont.woff b/www/styles/fontawesome-webfont.woff
new file mode 100644 (file)
index 0000000..b9bd17e
Binary files /dev/null and b/www/styles/fontawesome-webfont.woff differ
diff --git a/www/styles/style-default.css b/www/styles/style-default.css
new file mode 100644 (file)
index 0000000..434cff6
--- /dev/null
@@ -0,0 +1,395 @@
+/* Global Box Sizing and Font-Smoothing */
+*, *:after, *:before {
+    box-sizing:border-box;
+    -webkit-box-sizing:border-box;
+    -moz-box-sizing:border-box;
+    -webkit-font-smoothing:antialiased;
+    -moz-font-smoothing:antialiased;
+    -o-font-smoothing:antialiased;
+    font-smoothing:antialiased;
+    text-rendering:optimizeLegibility;
+}
+
+html { font-size: 100%; -webkit-text-size-adjust: 100%; 
+                          -ms-text-size-adjust: 100%; }
+
+body {
+    font-family: 'Open Sans', sans-serif;
+    line-height:18px;
+    color: #1c1c1c; /* Lighter on the eyes than #000 Black */
+    margin: 0px; background: #cccccc; background-size: cover;
+}
+
+img {
+    border: 0px;
+    max-width: 100%;
+    height: auto;
+    width: auto\9; /* ie8 */
+}
+
+/* ==========================================================================
+   Typography stuff goes here
+   ========================================================================== */
+h1,h2,h3,h4,h5,h6 { font-weight: bold; margin:0; padding:0;}
+/*h1 see mediaqueries*/ 
+h2 {font-size: 1.2em;}
+h3 {font-size: 1.1em;}
+h4 {font-size: 1.0em; }
+h5 {font-size: 0.83em;}
+h6 {font-size: 0.75em;}
+
+a:hover, a:focus, a:active { outline: none; }
+a { color: #000066; font-weight: 800; text-decoration: none;}
+a:hover { color:#000; text-decoration: none; }
+.frontpage a {display:block; }
+.frontpage a:hover { width: 100%; background-color: #778899;}
+.books:hover { width: 100%; background-color: #778899; }
+.link a:hover { display:inline-block; width: 100%; background-color: #778899;  /*Dirty IE Hack*/  zoom: 1;  *display: inline;}
+
+.mfp-content .bookpopup {
+  position: relative;
+  background: #FFF;
+  padding: 20px;
+  width: auto;
+  max-width: 700px;
+  margin: 20px auto;
+}
+
+#email {
+width: 300px;
+}
+
+.filtered {
+display: none;
+}
+
+#filter {
+clear:both;
+}
+
+#filter ul {
+margin: 0;
+padding: 0;
+list-style-type: none;
+text-align: left;
+text-transform:none; 
+}
+
+li {
+display: inline-block;
+padding: .2em 1em;
+margin: 2px;
+color: black;
+background-color: white;
+opacity: 0.5;
+}
+
+.filter-include { 
+    border-left:thick solid blue;
+    opacity: 1;
+}
+
+.filter-exclude { 
+    border-right:thick solid red;
+    opacity: 1;
+}
+
+
+img
+{
+margin:0;
+padding:0;
+border:0;
+}
+
+/* =============================================================================
+   Main container stuff goes here and other globals
+   ========================================================================== */
+.container{
+ background: #414141; border:1px solid #000; border-radius:10px;
+    max-width:800px;width:95%;margin:0 auto;position:relative; }
+
+/* =============================================================================
+   Header stuff goes here
+   ========================================================================== */
+header {
+    clear:both; 
+    color:white; 
+    text-align:center; 
+    text-transform:uppercase; 
+    display:block;
+    box-shadow:inset 0px -5px 8px #000000;
+    min-height:70px;
+    border-radius: 10px 10px 0px 0px; 
+}
+
+.hicon{
+    display:inline-block;
+    color:lightgray;
+    text-align: center;
+    vertical-align: bottom;
+    text-shadow: 2px 2px 2px black;
+}
+
+.submit {
+    color: lightgray;
+    cursor: pointer;
+    background-color: transparent;
+    background-image: none;
+    border-color: transparent;
+    -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+    -webkit-box-shadow: none;
+     -moz-box-shadow: none;
+          box-shadow: none; 
+}
+
+.hicon64{
+    font-size: 64px;
+    line-height: 64px;
+    width: 64px;
+    height: 64px;
+}
+
+.hicon32{
+    font-size: 24px;
+    line-height: 32px;
+    width: 32px;
+    height: 32px;
+}
+
+.headleft {
+    float: left;
+}
+
+.headcenter
+{
+float:none;
+margin:auto;
+text-align:center;
+height:70px;
+display:table;
+}
+
+header h1{
+    display: table-cell;
+    vertical-align: middle;
+    text-align: center;
+    line-height: 100%;
+    text-shadow: 0px 4px 3px rgba(0,0,0,0.4),
+                 0px 8px 13px rgba(0,0,0,0.1),
+                 0px 18px 23px rgba(0,0,0,0.1);
+}
+
+.headright {
+    float: right;
+}
+
+/* =============================================================================
+   Section and Article stuff goes here
+   ========================================================================== */
+section {
+clear:both;
+background-color: #fff;
+}
+
+article {
+border-bottom: 1px solid black;
+max-width:800px;
+}
+
+/*-------------frontpage article-------------*/
+
+.frontpage h2 {
+    padding: 5px 0 0 5px;
+}
+
+.frontpage h4 {
+    padding: 5px 0 5px 20px;
+     font-style: italic;
+}
+
+/*-------------books article-------------*/
+.books {
+    clear: both;
+    min-height: 90px;
+}
+
+.books .cover {
+    float:left;
+    margin: 4px 10px 4px 4px;
+    width: 60px;
+    height: 82px;
+}
+
+.bookpopup .cover {
+    float:left;
+    margin: 4px 10px 4px 4px;
+    width: 100px;
+    height: 150px;
+}
+
+.cover img {
+    max-width:100%;
+    max-height:100%;
+    color: white;
+}
+
+.download {
+    float: right;
+    line-height:40px;
+    text-align: right;
+    margin: 6px;
+}
+
+.download a {
+    border-radius: 6px;
+    box-shadow:0 0 10px #000;
+    background: darkgray;  
+    background: radial-gradient(#666, black);
+    color: #EEE;
+    text-decoration : none;
+    font-weight: bold;
+    padding: 5px 10px 5px 10px;
+    text-align: center;
+}
+
+.download img {
+    vertical-align:middle;
+}
+
+.books h4{
+    display: inline;
+    font-style: italic;
+}
+
+/*-------------books popup article-------------*/
+.bookpopup h2{
+    margin: 15px 15px; 
+}
+
+.bookpopup h3{
+    display:inline;  /*Dirty IE Hack*/  zoom: 1;  *display: inline;
+}
+
+.bookpopup h4{
+    border-top: 1px solid black;
+}
+
+.fullclickpopup{
+    display: block;
+}
+
+section .bookpopup{
+    padding: 8px 8px;
+}
+
+/* =============================================================================
+   Footer stuff goes here
+   ========================================================================== */
+footer
+{
+clear:both;
+color:white;
+box-shadow:inset 0px 5px 8px #000000;
+border-radius: 0px 0px 10px 10px; 
+height:32px;
+}
+
+.footleft
+{
+float:left;
+height:32px;
+}
+
+
+.footright
+{
+float:right;
+height:32px;
+}
+
+.footcenter
+{
+margin:auto;
+text-align:center;
+height:32px;
+display:table;
+font-weight: bold;
+}
+
+.footcenter p, .footcenter a
+{
+display: table-cell;
+vertical-align: middle;
+text-align: center;
+line-height: 100%;
+}
+
+/* =============================================================================
+   Aside stuff goes here
+   ========================================================================== */   
+#tool
+{
+width:100%;
+overflow: hidden;
+}
+
+
+/*-------------Search Aside-------------*/
+#tool input[type=search]
+{
+vertical-align: middle;
+width: 100%;
+margin: 3px;
+}
+
+.stop select
+{
+vertical-align: middle;
+margin: 4px;
+}
+
+#sort
+{
+cursor:pointer;
+}
+
+.stop
+{
+display: block;
+overflow: hidden;
+}
+
+/* =============================================================================
+   Mediaquerie stuff goes here
+   ========================================================================== */
+/* 100px and greater */
+@media only screen and (min-width: 100px) {
+h1 {font-size: 1em;}
+.container { width:100%; }
+}
+   
+/* 320px and greater */
+@media only screen and (min-width: 320px) {
+h1 {font-size: 1.2em;}
+}
+
+/* 480px and greater */
+@media only screen and (min-width: 480px) {
+h1 {font-size: 1.5em;}
+body {  font-size: 1em;/*12px/16px */
+            font-weight:450; /* Better supported than 'lighter' attribute */
+    }
+}
+
+/* 768px and greater */
+@media only screen and (min-width: 768px) {
+h1 {font-size: 2em; line-height: 1em;}
+.container { box-shadow:0 0 20px #000; }
+body {  margin: 5px; 
+            font-size: 0.85em;/*12px/16px */
+            font-weight:400; /* Better supported than 'lighter' attribute */
+    }
+}
\ No newline at end of file
diff --git a/www/styles/style-eink.css b/www/styles/style-eink.css
new file mode 100644 (file)
index 0000000..815b1eb
--- /dev/null
@@ -0,0 +1,401 @@
+/* Global Box Sizing and Font-Smoothing */
+*, *:after, *:before {
+    box-sizing:border-box;
+    -webkit-box-sizing:border-box;
+    -moz-box-sizing:border-box;
+    -webkit-font-smoothing:antialiased;
+    -moz-font-smoothing:antialiased;
+    -o-font-smoothing:antialiased;
+    font-smoothing:antialiased;
+    text-rendering:optimizeLegibility;
+}
+
+html { font-size: 100%; -webkit-text-size-adjust: 100%; 
+                          -ms-text-size-adjust: 100%; }
+
+body {
+    font-family: 'Open Sans', sans-serif;
+    line-height:18px;
+    color: #1c1c1c; /* Lighter on the eyes than #000 Black */
+    margin: 0px; background: #cccccc; background-size: cover;
+}
+
+img {
+    border: 0px;
+    max-width: 100%;
+    height: auto;
+    width: auto\9; /* ie8 */
+       opacity: 1;
+}
+
+/* ==========================================================================
+   Typography stuff goes here
+   ========================================================================== */
+h1,h2,h3,h4,h5,h6 { font-weight: bold; margin:0; padding:0;}
+/*h1 see mediaqueries*/ 
+h2 {font-size: 1.2em;}
+h3 {font-size: 1.1em;}
+h4 {font-size: 1.0em; }
+h5 {font-size: 0.83em;}
+h6 {font-size: 0.75em;}
+
+a:hover, a:focus, a:active { outline: none; }
+a {
+       color: black;
+       text-decoration: none;
+       font-weight: bold;
+}
+a:hover { color:#000; text-decoration: none; }
+.frontpage a {display:block; }
+.frontpage a:hover { width: 100%; background-color: white;}
+.books:hover { width: 100%; background-color: silver; }
+.link a:hover { display:inline-block; width: 100%; background-color: #778899;  /*Dirty IE Hack*/  zoom: 1;  *display: inline;}
+
+.mfp-content .bookpopup {
+  position: relative;
+  background: #FFF;
+  padding: 20px;
+  width: auto;
+  max-width: 700px;
+  margin: 20px auto;
+}
+
+#email {
+width: 300px;
+}
+
+.filtered {
+display: none;
+}
+
+#filter {
+clear:both;
+}
+
+#filter ul {
+margin: 0;
+padding: 0;
+list-style-type: none;
+text-align: left;
+text-transform:none; 
+font-variant: normal;
+}
+
+li {
+display: inline-block;
+padding: .2em 1em;
+margin: 2px;
+color: black;
+background-color: #ddd;
+opacity: 0.5;
+}
+
+.filter-include { 
+    border-left:thick solid blue;
+    opacity: 1;
+}
+
+.filter-exclude { 
+    border-right:thick solid red;
+    opacity: 1;
+}
+
+
+img
+{
+margin:0;
+padding:0;
+border:0;
+}
+
+/* =============================================================================
+   Main container stuff goes here and other globals
+   ========================================================================== */
+.container{
+       border:1px solid #000; border-radius:10px;
+    max-width:800px;width:95%;margin:0 auto;position:relative;
+       background-color: white;
+}
+
+/* =============================================================================
+   Header stuff goes here
+   ========================================================================== */
+header {
+    clear:both; 
+    color: black; 
+    text-align:center;
+       display:block;
+    min-height:70px;
+    border-radius: 10px 10px 0px 0px;
+       border-bottom: 2px dashed gray;
+       font-variant: small-caps;
+       letter-spacing: 2px;
+}
+
+.hicon{
+    display:inline-block;
+    color:black;
+    text-align: center;
+    vertical-align: bottom;
+}
+
+.submit {
+    color: black;
+    cursor: pointer;
+    background-color: transparent;
+    background-image: none;
+    border-color: transparent;
+    -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+    -webkit-box-shadow: none;
+     -moz-box-shadow: none;
+          box-shadow: none; 
+}
+
+.hicon64{
+    font-size: 64px;
+    line-height: 64px;
+    width: 64px;
+    height: 64px;
+}
+
+.hicon32{
+    font-size: 24px;
+    line-height: 32px;
+    width: 32px;
+    height: 32px;
+}
+
+.headleft {
+    float: left;
+}
+
+.headcenter
+{
+float:none;
+margin:auto;
+text-align:center;
+height:70px;
+display:table;
+}
+
+header h1{
+    display: table-cell;
+    vertical-align: middle;
+    text-align: center;
+    line-height: 100%;
+}
+
+.headright {
+    float: right;
+}
+
+/* =============================================================================
+   Section and Article stuff goes here
+   ========================================================================== */
+section {
+clear:both;
+background-color: #fff;
+}
+
+article {
+border-bottom: 1px solid black;
+max-width:800px;
+}
+
+/*-------------frontpage article-------------*/
+
+.frontpage h2 {
+       text-align: center;
+       letter-spacing: 2px;
+       color: black;
+       font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
+       padding: 5px 0;
+}
+
+.frontpage h4 {
+    padding: 5px 0;
+       text-align: center;
+       color: gray;
+        font-style: italic;
+        font-size: 13px;
+        text-decoration: overline;
+ }
+
+/*-------------books article-------------*/
+.books {
+    clear: both;
+    min-height: 90px;
+}
+
+.books .cover {
+    float:left;
+    margin: 4px 10px 4px 4px;
+    width: 60px;
+    height: 82px;
+}
+
+.bookpopup .cover {
+    float:left;
+    margin: 4px 10px 4px 4px;
+    width: 100px;
+    height: 150px;
+}
+
+.cover img {
+    max-width:100%;
+    max-height:100%;
+    color: white;
+}
+
+.download {
+    float: right;
+    line-height:40px;
+    text-align: right;
+    margin: 6px;
+}
+
+.download a {
+    border-radius: 2px;
+    background: black;  
+    color: white;
+    text-decoration : none;
+    font-weight: bold;
+    padding: 5px 10px 5px 10px;
+}
+
+
+.books h4{
+    display: inline;
+    font-style: italic;
+}
+
+/*-------------books popup article-------------*/
+.bookpopup h2{
+    margin: 15px 15px; 
+}
+
+.bookpopup h3{
+    display:inline;  /*Dirty IE Hack*/  zoom: 1;  *display: inline;
+}
+
+.bookpopup h4{
+    border-top: 1px solid black;
+}
+
+.fullclickpopup{
+    display: block;
+       color: black;
+}
+
+section .bookpopup{
+    padding: 8px 8px;
+}
+
+/* =============================================================================
+   Footer stuff goes here
+   ========================================================================== */
+footer
+{
+clear:both;
+color:white;
+border-radius: 0px 0px 10px 10px; 
+height:32px;
+}
+
+.footleft
+{
+float:left;
+height:32px;
+}
+
+.footright
+{
+float:right;
+height:32px;
+}
+
+.footcenter
+{
+margin:auto;
+text-align:center;
+height:32px;
+display:table;
+color: black;
+font-weight: bold;
+}
+
+.footcenter p, .footcenter a
+{
+display: table-cell;
+vertical-align: middle;
+text-align: center;
+line-height: 100%;
+}
+
+/* =============================================================================
+   Aside stuff goes here
+   ========================================================================== */   
+#tool
+{
+width:100%;
+overflow: hidden;
+}
+
+
+/*-------------Search Aside-------------*/
+#tool input[type=text]
+{
+vertical-align: middle;
+width: 100%;
+margin: 5px;
+}
+
+.stop select
+{
+vertical-align: middle;
+margin: 5px;
+}
+
+#sort
+{
+cursor:pointer;
+}
+
+.stop
+{
+display: block;
+overflow: hidden;
+}
+
+/* =============================================================================
+   Mediaquerie stuff goes here
+   ========================================================================== */
+/* 100px and greater */
+@media only screen and (min-width: 100px) {
+h1 {font-size: 1em;}
+.container { width:100%; }
+}
+   
+/* 320px and greater */
+@media only screen and (min-width: 320px) {
+h1 {font-size: 1.2em;}
+}
+
+/* 480px and greater */
+@media only screen and (min-width: 480px) {
+h1 {font-size: 1.5em;}
+body {  font-size: 1em;/*12px/16px */
+            font-weight:450; /* Better supported than 'lighter' attribute */
+    }
+}
+
+/* 768px and greater */
+@media only screen and (min-width: 768px) {
+h1 {font-size: 2em; line-height: 1em;}
+body {  margin: 5px; 
+            font-size: 0.85em;/*12px/16px */
+            font-weight:400; /* Better supported than 'lighter' attribute */
+    }
+}
\ No newline at end of file
diff --git a/www/tag.php b/www/tag.php
new file mode 100644 (file)
index 0000000..e73b9c0
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+/**
+ * COPS (Calibre OPDS PHP Server) class file
+ *
+ * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author     Sébastien Lucas <sebastien@slucas.fr>
+ */
+
+require_once('base.php');
+
+class tag extends Base {
+    const ALL_TAGS_ID = "calibre:tags";
+    
+    public $id;
+    public $name;
+    
+    public function __construct($pid, $pname) {
+        $this->id = $pid;
+        $this->name = $pname;
+    }
+
+    public static function getTagString ($code) {
+        $string = localize("tags.".$code);
+        if (preg_match ("/^tag/", $string)) {
+           return $code;
+        }
+        return $string;
+     }
+                                                    
+    
+    public function getUri () {
+        return "?page=".parent::PAGE_TAG_DETAIL."&id=$this->id";
+    }
+    
+    public function getEntryId () {
+        return self::ALL_TAGS_ID.":".$this->id;
+    }
+
+    public static function getCount() {
+        $nTags = parent::getDb ()->query('select count(*) from tags')->fetchColumn(0);
+        if ($nTags == 0) return NULL;
+        $entry = new Entry (localize("tags.title"), self::ALL_TAGS_ID, 
+            str_format (localize("tags.alphabetical", $nTags), $nTags), "text", 
+            array ( new LinkNavigation ("?page=".parent::PAGE_ALL_TAGS)));
+        return $entry;
+    }
+       
+    public static function getTagById ($tagId) {
+        $result = parent::getDb ()->prepare('select id, name  from tags where id = ?');
+        $result->execute (array ($tagId));
+        if ($post = $result->fetchObject ()) {
+            return new Tag ($post->id, Tag::getTagString ($post->name));
+        }
+        return NULL;
+    }
+    
+    public static function getAllTags() {
+        $result = parent::getDb ()->query('select tags.id as id, tags.name as name, link.count
+from tags, 
+(select tag,count(*) as count from books_tags_link group by tag) link
+where tags.id = link.tag
+order by tags.name');
+        $entryArray = array();
+        while ($post = $result->fetchObject ())
+        {
+            $tag = new Tag ($post->id, Tag::getTagString ($post->name));
+            array_push ($entryArray, new Entry ($tag->name, $tag->getEntryId (), 
+                str_format (localize("bookword", $post->count), $post->count), "text", 
+                array ( new LinkNavigation ($tag->getUri ()))));
+        }
+        return $entryArray;
+    }
+}
diff --git a/www/templates/default/bookdetail.html b/www/templates/default/bookdetail.html
new file mode 100644 (file)
index 0000000..84c7334
--- /dev/null
@@ -0,0 +1,53 @@
+<article class="bookpopup">\r
+    <span class="cover">\r
+        {{? it.book.hasCover == 1}}\r
+        <a href="{{=it.book.coverurl}}">\r
+          <img src="{{=it.book.thumbnailurl}}" alt="{{=it.const.i18n.coverAlt}}" />\r
+        </a>\r
+        {{?}}\r
+    </span>\r
+    <h2 class="download">\r
+        {{~it.book.datas:data:i}}\r
+        <a href="{{=data.url}}">{{=data.format}}</a>\r
+        {{? data.mail == 1}}\r
+        <a id="mailButton" title="Mail" href="empty.php" onclick="sendToMailAddress (this, {{=data.id}}); return false;"><i class="icon-envelope icon-large"></i></a>\r
+        {{?}}\r
+        <br />\r
+        {{~}}\r
+    </h2>\r
+    <h1><a title="{{=it.const.i18n.permalinkAlt}}" rel="bookmark" href="{{=strformat (it.const.url.detailUrl, it.book.id)}}"><i class="icon-link"></i></a>{{=htmlEscape (it.title)}}</h1>\r
+    <p class="popupless">\r
+        <h3>{{=it.const.i18n.authorsTitle}}: </h3>\r
+        {{~it.book.authors:author:j}}\r
+        {{? j > 0}}, {{?}}<a href="{{=author.url}}">{{=htmlEscape (author.name)}}</a>\r
+        {{~}}\r
+    </p>\r
+    {{? it.book.tagsName != ""}}\r
+    <p class="popupless">\r
+        <h3>{{=it.const.i18n.tagsTitle}}: </h3>\r
+        {{~it.book.tags:tag:k}}\r
+        {{? k > 0}}, {{?}}<a href="{{=tag.url}}">{{=htmlEscape (tag.name)}}</a>\r
+        {{~}}\r
+    </p>\r
+    {{?}}\r
+    {{? it.book.seriesName != ""}}\r
+    <p class="popupless">\r
+        <h3><a href="{{=it.book.seriesurl}}">{{=it.const.i18n.seriesTitle}}</a> : </h3>{{=htmlEscape (it.book.seriesCompleteName)}}\r
+    </p>\r
+    {{?}}\r
+    {{? it.book.pubDate != ""}}\r
+    <p class="popupless">\r
+        <h3>{{=it.const.i18n.pubdateTitle}}: </h3>{{=it.book.pubDate}}\r
+    </p>\r
+    {{?}}\r
+    {{? it.book.languagesName != ""}}\r
+    <p class="popupless">\r
+        <h3>{{=it.const.i18n.languagesTitle}}: </h3>{{=it.book.languagesName}}\r
+    </p>\r
+    {{?}}\r
+    {{? it.book.content != ""}}\r
+    <br />\r
+    <h4>{{=it.const.i18n.contentTitle}}</h4>\r
+    <div>{{=it.book.content}}</div>\r
+    {{?}}\r
+</article>
\ No newline at end of file
diff --git a/www/templates/default/footer.html b/www/templates/default/footer.html
new file mode 100644 (file)
index 0000000..886fcbd
--- /dev/null
@@ -0,0 +1,15 @@
+<footer>\r
+    <div class="footleft">\r
+        <a href="index.php?page=OPTS"><div title="{{=it.const.i18n.customizeTitle}}" class="hicon hicon32"><i class="icon-wrench"></i></div></a>\r
+    </div>\r
+    <div class="footright">\r
+        <a class="fancyabout" href="{{=it.abouturl}}"><div title="{{=it.const.i18n.aboutTitle}}" class="hicon hicon32"><i class="icon-info-sign"></i></div></a>\r
+    </div>\r
+    {{? it.isPaginated == 1}}\r
+    <div class="footcenter">\r
+        {{? it.prevLink != ""}}<a id="prevLink" href="{{=it.prevLink}}" ><div title="{{=it.const.i18n.previousAlt}}" class="hicon hicon32"><i class="icon-angle-left"></i></div></a>{{?}}\r
+        <p> {{=it.currentPage}} / {{=it.maxPage}} </p>\r
+        {{? it.nextLink != ""}}<a id="nextLink" href="{{=it.nextLink}}" ><div title="{{=it.const.i18n.nextAlt}}" class="hicon hicon32"><i class="icon-angle-right"></i></div></a>{{?}}\r
+    </div>\r
+    {{?}}\r
+</footer>
\ No newline at end of file
diff --git a/www/templates/default/header.html b/www/templates/default/header.html
new file mode 100644 (file)
index 0000000..6e48c38
--- /dev/null
@@ -0,0 +1,48 @@
+<header>\r
+    <a class="headleft" href="{{=it.homeurl}}">\r
+        <div title="{{=it.const.i18n.homeAlt}}" class="hicon hicon64"><i class="icon-home"></i></div>\r
+    </a>\r
+    <div title="{{=it.const.i18n.settingsAlt}}" class="hicon hicon64 headright"><i class="icon-cog" id="searchImage"></i></div>\r
+    <div class="headcenter">\r
+        <h1>{{=it.title}}</h1>\r
+    </div>\r
+    <div id="tool" style="display: none">\r
+        <div style="float: left; width: 50%">\r
+            <form id="searchForm" action="index.php" method="get">\r
+                <div  style="float: right">\r
+                    <!--<label for="submitsearch" class="hicon hicon32"><i class="icon-search"></i></label>\r
+                    <input id="submitsearch" type="submit" value="Go" class="icon- submit" />-->\r
+                    <button title="{{=it.const.i18n.searchAlt}}" type="submit" class="hicon hicon32 submit">\r
+                        <i class="icon-search"></i>\r
+                    </button>\r
+                </div>\r
+                <div class="stop">\r
+                    <input type="hidden" name="current" value="{{=it.page}}" />\r
+                    <input type="hidden" name="page" value="9" />\r
+                    <input type="search" name="query" />\r
+                </div>\r
+            </form>\r
+        </div>\r
+        <div id="sortForm" style="float: right; width: 45%; display: none">\r
+            <div style="float: right">\r
+                <div title="{{=it.const.i18n.sortAlt}}" id="sort" class="hicon hicon32"><i class="icon-sort"></i></div>\r
+            </div>\r
+            <div class="stop">\r
+                <select id="sortchoice">\r
+                    <option value="st">{{=it.const.i18n.bookwordTitle}}</option>\r
+                    <option value="sa">{{=it.const.i18n.authorsTitle}}</option>\r
+                    <option value="ss">{{=it.const.i18n.seriesTitle}}</option>\r
+                    <option value="sp">{{=it.const.i18n.pubdateTitle}}</option>\r
+                </select>\r
+                <select id="sortorder">\r
+                    <option value="asc">{{=it.const.i18n.sortorderAsc}}</option>\r
+                    <option value="desc">{{=it.const.i18n.sortorderDesc}}</option>\r
+                </select> \r
+            </div>\r
+        </div>\r
+        <div id="filter">\r
+            <ul>\r
+            </ul>\r
+        </div>\r
+    </div>\r
+</header>\r
diff --git a/www/templates/default/main.html b/www/templates/default/main.html
new file mode 100644 (file)
index 0000000..1ae48ac
--- /dev/null
@@ -0,0 +1,46 @@
+<section>\r
+{{? it.page == "BOOKDET" || it.page == "ABOUT"}}\r
+    {{? it.page == "BOOKDET"}}\r
+        {{#def.bookdetail}}\r
+    {{??}}\r
+        {{= it.fullhtml}}\r
+    {{?}}\r
+{{??}}\r
+{{~it.entries:entry:i}}\r
+    {{? it.containsBook == 0}}\r
+    <article>\r
+        <div class="frontpage">\r
+            {{? entry.navlink != "#"}}<a href="{{=entry.navlink}}">{{?}}\r
+                <h2>{{=htmlEscape (entry.title)}}</h2>\r
+                <h4>{{=entry.content}}</h4> \r
+            {{? entry.navlink != "#"}}</a>{{?}}\r
+        </div>\r
+    </article>\r
+    {{??}}\r
+    <article class="books">\r
+            <span class="cover">\r
+            {{? entry.book.hasCover == 1}}\r
+                <a data-fancybox-group="group" class="fancycover" href="{{=strformat (it.const.url.coverUrl, entry.book.id)}}">\r
+                    <img src="{{=strformat (it.const.url.thumbnailUrl, entry.book.id)}}" alt="{{=it.const.i18n.coverAlt}}" />\r
+                </a>\r
+            {{?}}\r
+            </span>\r
+            <h2 class="download">\r
+                {{~entry.book.preferedData:data:j}}\r
+                 <a href="{{=data.url}}">{{=data.name}}</a><br />\r
+                {{~}}\r
+            </h2>\r
+            <a class="fancydetail" href="{{=strformat (it.const.url.detailUrl, entry.book.id)}}">\r
+            <div class="fullclickpopup">\r
+                <h2><span class="st">{{=htmlEscape (entry.title)}}</span>\r
+                {{? entry.book.pubDate != ""}}<span class="sp">({{=entry.book.pubDate}})</span>{{?}}\r
+                </h2>\r
+                <h4>{{=it.const.i18n.authorsTitle}} : </h4><span class="sa">{{=htmlEscape (entry.book.authorsName)}}</span><br />\r
+                {{? entry.book.tagsName != ""}}<h4>{{=it.const.i18n.tagsTitle}} : </h4><span class="se">{{=htmlEscape (entry.book.tagsName)}}</span><br />{{?}}\r
+                {{? entry.book.seriesName != ""}}<h4>{{=it.const.i18n.seriesTitle}} : </h4><span class="ss">{{=htmlEscape (entry.book.seriesName)}} ({{=entry.book.seriesIndex}})</span><br />{{?}}\r
+            </div></a>\r
+        </article>\r
+    {{?}}\r
+{{~}}\r
+{{?}}\r
+</section>
\ No newline at end of file
diff --git a/www/templates/default/page.html b/www/templates/default/page.html
new file mode 100644 (file)
index 0000000..85757f0
--- /dev/null
@@ -0,0 +1,5 @@
+<div class="container">    \r
+{{#def.header}}\r
+{{#def.main}}\r
+{{#def.footer}}\r
+</div>
\ No newline at end of file
diff --git a/www/tools/export_file.txt b/www/tools/export_file.txt
new file mode 100644 (file)
index 0000000..f706a7f
--- /dev/null
@@ -0,0 +1,71 @@
+'   Output a file\r
+'   If there is no translation then we output the line as a comment\r
+'   that starts with #EN# indicating that translation is required\r
+\r
+\r
+Sub Export_File(sType, iCol As Integer)\r
+\r
+    Dim oFile As Integer\r
+    Dim iRow As Integer\r
+    Dim iBlankLines As Integer\r
+    Dim sLangCode As String\r
+    Dim sOut As String\r
+    Dim sTemp As String\r
+    Dim bOut() As Byte\r
+    Dim shSheet As Worksheet: Set shSheet = Worksheets(sType)\r
+    \r
+    sFilename = sType & "_" & LCase$(shSheet.Cells(cLanguageCodeRow, iCol).Value) & ".json"\r
+    oFile = FreeFile()\r
+    sFullPath = Application.ActiveWorkbook.Path & "\" & sFilename\r
+    On Error Resume Next\r
+    Kill sFullPath\r
+    Open sFullPath For Output As #oFile\r
+    Close #oFile\r
+    On Error GoTo 0\r
+    Open sFullPath For Binary Access Write As #oFile\r
+    ' Output comment on version as first line\r
+    sOut = "{" & vbCrLf\r
+    bOut = UnicodeToBytes(Worksheets(cConfiguration).Cells(cOutputFormatRow, cOutputFormatCol), sOut)\r
+    Put #oFile, , bOut\r
+    \r
+    iRow = cFirstDataRow\r
+    Do\r
+        sTemp = shSheet.Cells(iRow, cKeywordCol).Value\r
+        sOut = "// " & sTemp\r
+'        Print #oFile, sTemp;\r
+        If Len(sTemp) = 0 Then\r
+            iBlankLines = iBlankLines + 1\r
+        Else\r
+            iBlankLines = 0\r
+            If Not isComment(sTemp) And (Not (sTemp Like "config*") Or sTemp Like "config.Language*") And Not sTemp Like "gui*" And Not sTemp Like "error*" And Not sTemp Like "info*" And Not sTemp Like "stats*" Then\r
+                sOut = """" & sTemp & """" & ":"\r
+'                Print #oFile, "=";\r
+                sTemp = shSheet.Cells(iRow, iCol).Value\r
+                If Len(sTemp) > 0 Then\r
+                    sOut = sOut & """" & sTemp & ""","\r
+                    sOut = sOut & vbCrLf\r
+                    bOut = UnicodeToBytes(Worksheets(cConfiguration).Cells(cOutputFormatRow, cOutputFormatCol), sOut)\r
+                    Put #oFile, , bOut\r
+'                    Print #oFile, sTemp;\r
+                Else\r
+                    ' If no language specific one supplied then\r
+                    ' output English one as a comment starting with '#EN#'\r
+                    ' (as long this is not the english column with empty value)\r
+                    If iCol <> cEnglishLangCol Then\r
+                        sOut = "// EN" & sOut\r
+                    End If\r
+                    sOut = sOut & shSheet.Cells(iRow, 3).Value\r
+'                    Print #oFile, shSheet.Cells(iRow, 3).Value;\r
+                End If\r
+            End If\r
+        End If\r
+'        Print #oFile, ""        ' Force new line\r
+        iRow = iRow + 1\r
+    Loop Until (iBlankLines > 5)\r
+    \r
+    sOut = """fin"":""fin""" & vbCrLf & "}" & vbCrLf\r
+    bOut = UnicodeToBytes(Worksheets(cConfiguration).Cells(cOutputFormatRow, cOutputFormatCol), sOut)\r
+    Put #oFile, , bOut\r
+    \r
+    Close #oFile\r
+End Sub\r
diff --git a/www/tools/updateLang.pl b/www/tools/updateLang.pl
new file mode 100644 (file)
index 0000000..66caca0
--- /dev/null
@@ -0,0 +1,96 @@
+#!/usr/bin/perl
+
+# Program :  COPS localization string generator 
+# Version :  0.0.1
+#
+# Author  :  Sébastien Lucas
+# License :  GPLv2
+#
+
+use strict;
+
+my @strings = ();
+my %values;
+my %allstrings;
+
+# Load php files looking for strings to localize
+
+opendir (my($dirhandle), "../") or die ("Directory not found\n");
+for (readdir ($dirhandle)) {
+    next if (-d $_ ); # skip directories
+    next if (/^[.]/); # skip dot-files
+    next if not (/(.+)[.]php$/);
+    
+    my $file = "../" . $_;
+    debug ("text file: " . $_ . "\n");
+    my $content = loadFile ($file);
+    
+    while ($content =~ /localize\s*\("([\w\.]*?)"\)/igs) {
+        $allstrings{$1} = "";
+        debug (" * $1 \n");
+    }
+    
+    while ($content =~ /localize\s*\("([\w\.]*?)"\s*,/igs) {
+        $allstrings{$1 . ".none"} = "";
+        $allstrings{$1 . ".one"} = "";
+        $allstrings{$1 . ".many"} = "";
+        debug (" *** $1 \n");
+    }
+}
+closedir $dirhandle;
+
+@strings = sort (keys (%allstrings));
+
+# Load existing json files with strings and values
+
+opendir (my($dirhandle), "../lang") or die ("Directory not found\n");
+for (readdir ($dirhandle)) {
+    next if (-d $_ ); # skip directories
+    next if (/^[.]/); # skip dot-files
+    next if not (/(.+)[.]json$/);
+    
+    my $file = "../lang/" . $_;    
+    (my $lang = $_) =~ s/Localization_(\w\w)\.json/$1/;
+    debug ("language file: $_ / $lang \n");
+    
+    my $content = loadFile ($file);
+    
+    while ($content =~ /"(.*?)"\:"(.*?)",/igs) {
+        #push @strings, $1;
+        $values{$lang}{$1} = $2;
+        #debug (" * $1 \n");
+    }
+    
+    open OUTPUT, ">$file.new";
+    
+    print OUTPUT "{\n";
+    foreach my $name (@strings) {
+        print OUTPUT "\"$name\":\"$values{$lang}{$name}\",\n";
+    }
+    print OUTPUT "\"end\":\"end\"\n";
+    print OUTPUT "}\n";
+    
+    close OUTPUT;
+}
+closedir $dirhandle;
+
+
+
+sub loadFile {
+    my ($file) = @_;
+    my $save = $/;
+    $/ = undef;
+    
+    open INPUT, "<$file";
+    my $content = <INPUT>;
+    close INPUT;
+
+    $/ = $save;
+    
+    return $content;
+}
+
+sub debug {
+    #uncomment next line for debug messages
+    print @_;
+}
\ No newline at end of file
diff --git a/www/util.js b/www/util.js
new file mode 100644 (file)
index 0000000..8c9d353
--- /dev/null
@@ -0,0 +1,368 @@
+// util.js\r
+// copyright Sébastien Lucas\r
+// https://github.com/seblucas/cops\r
+\r
+var templatePage, templateBookDetail, templateMain, currentData, before, filterList;\r
+\r
+var cache = new LRUCache(30);\r
+\r
+var DEBUG = true;\r
+var isPushStateEnabled = window.history && window.history.pushState && window.history.replaceState &&\r
+  // pushState isn't reliable on iOS until 5.\r
+  !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/);\r
+\r
+function debug_log(text) {\r
+    if ( DEBUG ) {\r
+        console.log(text);\r
+    }\r
+}\r
+\r
+function updateCookie (id) {\r
+    if($(id).prop('pattern') && !$(id).val().match(new RegExp ($(id).prop('pattern')))) {\r
+        return;\r
+    }\r
+    var name = $(id).attr('id');\r
+    var value = $(id).val ();\r
+    $.cookie(name, value, { expires: 365 });\r
+}\r
+\r
+function updateCookieFromCheckbox (id) {\r
+    var name = $(id).attr('id');\r
+    if ((/^style/).test (name)) {\r
+        name = "style";\r
+    }\r
+    if ($(id).is(":checked"))\r
+    {\r
+        if ($(id).is(':radio')) {\r
+            $.cookie(name, $(id).val (), { expires: 365 });\r
+        } else {\r
+            $.cookie(name, '1', { expires: 365 });\r
+        }\r
+    }\r
+    else\r
+    {\r
+        $.cookie(name, '0', { expires: 365 });\r
+    }\r
+}\r
+\r
+function elapsed () {\r
+    var elapsedTime = new Date () - before; \r
+    return "Elapsed : " + elapsedTime;\r
+}\r
+\r
+function retourMail(data, textStatus, jqXHR ) {\r
+    $("#mailButton :first-child").removeClass ("icon-spinner icon-spin").addClass ("icon-envelope");\r
+    alert (data);\r
+}\r
+\r
+function sendToMailAddress (component, dataid) {\r
+    var email = $.cookie ('email');\r
+    if (!$.cookie ('email')) {\r
+        email = window.prompt (currentData.const.i18n.customizeEmail, "");\r
+        $.cookie ('email', email, { expires: 365 });\r
+    }\r
+    var url = 'sendtomail.php';\r
+    $("#mailButton :first-child").removeClass ("icon-envelope").addClass ("icon-spinner icon-spin");\r
+    $.ajax ({'url': url, 'type': 'post', 'data': { 'data':  dataid, 'email': email }, 'success': retourMail});\r
+}\r
+\r
+function strformat () {\r
+    var s = arguments[0];\r
+    for (var i = 0; i < arguments.length - 1; i++) {\r
+        var reg = new RegExp("\\{" + i + "\\}", "gm");\r
+        s = s.replace(reg, arguments[i + 1]);\r
+    }\r
+    return s;\r
+}\r
+\r
+function isDefined(x) {\r
+    var undefinedVar;\r
+    return x !== undefinedVar;\r
+}\r
+\r
+function getCurrentOption (option) {\r
+    if (!$.cookie (option)) {\r
+        if (currentData && currentData.const && currentData.const.config && currentData.const.config [option]) {\r
+            return currentData.const.config [option];\r
+        }\r
+    }\r
+    return $.cookie (option);\r
+}\r
+\r
+function htmlEscape(str) {\r
+    return String(str)\r
+            .replace(/&/g, '&amp;')\r
+            .replace('"', '&quot;')\r
+            .replace("'", '&#39;')\r
+            .replace(/</g, '&lt;')\r
+            .replace(/>/g, '&gt;');\r
+}\r
+\r
+/************************************************\r
+ * All functions needed to filter the book list by tags\r
+ ************************************************\r
+ */\r
+\r
+function getTagList () {\r
+    var tagList = {};\r
+    $(".se").each (function(){\r
+        if ($(this).parents (".filtered").length > 0) { return; }\r
+        var taglist = $(this).text();\r
+\r
+        var tagarray = taglist.split (",");\r
+        for (var i in tagarray) {\r
+            var tag = tagarray [i].replace(/^\s+/g,'').replace(/\s+$/g,'');\r
+            tagList [tag] = 1;\r
+        }\r
+    });\r
+    return tagList;\r
+}\r
+\r
+function doFilter () {\r
+    $(".books").removeClass("filtered");\r
+    if (jQuery.isEmptyObject(filterList)) {\r
+        updateFilters ();\r
+        return;\r
+    }\r
+    \r
+    $(".se").each (function(){\r
+        var taglist = ", " + $(this).text() + ", ";\r
+        var toBeFiltered = false;\r
+        for (var filter in filterList) {\r
+            var onlyThisTag = filterList [filter];\r
+            filter = ', ' + filter + ', ';\r
+            var myreg = new RegExp (filter);\r
+            if (myreg.test (taglist)) {\r
+                if (onlyThisTag === false) {\r
+                    toBeFiltered = true;\r
+                }\r
+            } else {\r
+                if (onlyThisTag === true) {\r
+                    toBeFiltered = true;\r
+                }\r
+            }\r
+        }\r
+        if (toBeFiltered) { $(this).parents (".books").addClass ("filtered"); }\r
+    });\r
+    updateFilters ();\r
+}\r
+\r
+function updateFilters () {\r
+    var tagList = getTagList ();\r
+    \r
+    // If there is already some filters then let's prepare to update the list\r
+    $("#filter ul li").each (function () {\r
+        var text = $(this).text ();\r
+        if (isDefined (tagList [text]) || $(this).attr ('class')) {\r
+            tagList [text] = 0;\r
+        } else {\r
+            tagList [text] = -1;\r
+        }\r
+    });\r
+    \r
+    // Update the filter -1 to remove, 1 to add, 0 already there\r
+    for (var tag in tagList) {\r
+        var tagValue = tagList [tag];\r
+        if (tagValue === -1) {\r
+            $("#filter ul li:contains('" + tag + "')").remove();\r
+        }\r
+        if (tagValue === 1) {\r
+            $("#filter ul").append ("<li>" + tag + "</li>");\r
+        }\r
+    }\r
+    \r
+    $("#filter ul").append ("<li> СБРОСИТЬ </li>");\r
+    \r
+    // Sort the list alphabetically\r
+    $('#filter ul li').sortElements(function(a, b){\r
+        return $(a).text() > $(b).text() ? 1 : -1;\r
+    });\r
+}\r
+\r
+function handleFilterEvents () {\r
+    $("#filter ul").on ("click", "li", function(){\r
+        var filter = $(this).text ();\r
+        if (filter === " СБРОСИТЬ ") {\r
+            filterList = {};\r
+            $("#filter ul li").removeClass ("filter-exclude");\r
+            $("#filter ul li").removeClass ("filter-include");\r
+            doFilter ();\r
+            return;\r
+        }\r
+        switch ($(this).attr("class")) {\r
+            case "filter-include" :\r
+                $(this).attr("class", "filter-exclude");\r
+                filterList [filter] = false;\r
+                break;\r
+            case "filter-exclude" :\r
+                $(this).removeClass ("filter-exclude"); \r
+                delete filterList [filter];\r
+                break;\r
+            default :\r
+                $(this).attr("class", "filter-include");\r
+                filterList [filter] = true;\r
+                break;\r
+        }\r
+        doFilter ();\r
+    });\r
+}\r
+\r
+/************************************************\r
+ * Functions to handle Ajax navigation\r
+ ************************************************\r
+ */\r
+\r
+function navigateTo (url) {\r
+    before = new Date ();\r
+    var jsonurl = url.replace ("index", "getJSON");\r
+    var cachedData = cache.get (jsonurl);\r
+    if (cachedData) {\r
+        history.pushState(jsonurl, "", url);\r
+        updatePage (cachedData);\r
+    } else {\r
+        $.getJSON(jsonurl, function(data) {\r
+            history.pushState(jsonurl, "", url);\r
+            cache.put (jsonurl, data);\r
+            updatePage (data);\r
+        });\r
+    }\r
+}\r
+\r
+function updatePage (data) {\r
+    var result;\r
+    filterList = {};\r
+    data ["const"] = currentData ["const"];\r
+    if ($("section").length && currentData.isPaginated === 0 &&  data.isPaginated === 0) {\r
+        // Partial update (for now disabled)\r
+        debug_log ("Partial update");\r
+        debug_log(templateMain);\r
+        result = templateMain (data);\r
+        debug_log ("Result: ");\r
+        debug_log (result);\r
+        $("h1").html (data.title);\r
+        $("section").html (result);\r
+    } else {\r
+        // Full update\r
+        result = templatePage (data);\r
+        $("body").html (result);\r
+    }\r
+    document.title = data.title;\r
+    currentData = data;\r
+    \r
+    debug_log (elapsed ());\r
+    \r
+    if ($.cookie('toolbar') === '1') { $("#tool").show (); }\r
+    if (currentData.containsBook === 1) {\r
+        $("#sortForm").show ();\r
+        if (getCurrentOption ("html_tag_filter") === "1") {\r
+            $("#filter ul").empty ();\r
+            updateFilters ();\r
+            handleFilterEvents ();\r
+        }\r
+    } else {\r
+        $("#sortForm").hide ();\r
+    }\r
+}\r
+\r
+function handleLinks () {\r
+    $("body").on ("click", "a[href^='index']", link_Clicked);\r
+    $("body").on ("submit", "#searchForm", search_Submitted);\r
+    $("body").on ("click", "#sort", function(){\r
+        $('.books').sortElements(function(a, b){\r
+            var test = 1;\r
+            if ($("#sortorder").val() === "desc")\r
+            {\r
+                test = -1;\r
+            }\r
+            return $(a).find ("." + $("#sortchoice").val()).text() > $(b).find ("." + $("#sortchoice").val()).text() ? test : -test;\r
+        });\r
+    });\r
+    \r
+    $("body").on ("click", ".headright", function(){\r
+        if ($("#tool").is(":hidden")) {\r
+            $("#tool").slideDown("slow");\r
+            $.cookie('toolbar', '1', { expires: 365 });\r
+        } else {\r
+            $("#tool").slideUp();\r
+            $.removeCookie('toolbar');\r
+        }\r
+    });\r
+    $("body").magnificPopup({\r
+        delegate: '.fancycover', // child items selector, by clicking on it popup will open\r
+        type: 'image',\r
+        gallery:{enabled:true, preload: [0,2]},\r
+        disableOn: function() {\r
+          if( getCurrentOption ("use_fancyapps") === "1" ) {\r
+            return true;\r
+          } \r
+          return false;\r
+        }\r
+    });\r
+}\r
+\r
+function link_Clicked (event) {\r
+    var currentLink = $(this);\r
+    debug_log("Link clicked");\r
+    if (!isPushStateEnabled ||\r
+        currentData.page === "OPTS") { \r
+        return;\r
+    }\r
+    event.preventDefault();\r
+    var url = currentLink.attr('href');\r
+    \r
+    if ($(".mfp-ready").length)\r
+    {\r
+        $.magnificPopup.close();\r
+    }\r
+    \r
+    // The bookdetail / about should be displayed in a lightbox\r
+    if (getCurrentOption ("use_fancyapps") === "1" && \r
+        (currentLink.hasClass ("fancydetail") || currentLink.hasClass ("fancyabout"))) {\r
+        debug_log('Lighhtbox mode on');\r
+        before = new Date ();\r
+        var jsonurl = url.replace ("index", "getJSON");\r
+        $.getJSON(jsonurl, function(data) {\r
+            data ["const"] = currentData ["const"];\r
+            var detail = "";\r
+            if (data.page === "ABOUT") {\r
+                detail = data.fullhtml;\r
+            } else {\r
+                detail = templateBookDetail (data);\r
+            }\r
+            $.magnificPopup.open({\r
+              items: {\r
+                src: detail,\r
+                type: 'inline'\r
+              }\r
+            });\r
+            debug_log (elapsed ());\r
+        });\r
+        return;\r
+    }\r
+    navigateTo (url);\r
+}\r
+\r
+function search_Submitted (event) {\r
+    if (!isPushStateEnabled ||\r
+        currentData.page === "OPTS") { \r
+        return;\r
+    }\r
+    event.preventDefault();\r
+    var url = strformat ("index.php?page=OPENQ&current={0}&query={1}", currentData.page, $("input[name=query]").val ());\r
+    navigateTo (url);\r
+}\r
+\r
+window.onpopstate = function(event) {\r
+    before = new Date ();\r
+    var data = cache.get (event.state);\r
+    updatePage (data);\r
+};\r
+\r
+$(document).keydown(function(e){\r
+    if (e.keyCode === 37 && $("#prevLink").length > 0) {\r
+        navigateTo ($("#prevLink").attr('href'));\r
+    }\r
+    if (e.keyCode === 39  && $("#nextLink").length > 0) {\r
+        navigateTo ($("#nextLink").attr('href'));\r
+    }\r
+});
\ No newline at end of file
diff --git a/www/web.config b/www/web.config
new file mode 100644 (file)
index 0000000..4505425
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<configuration>\r
+    <system.webServer>\r
+        <staticContent>\r
+            <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="14.00:00:00" />\r
+        </staticContent>\r
+    </system.webServer>\r
+</configuration>
\ No newline at end of file